@opengis/cms 0.0.32 → 0.0.34

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,4 +1,4 @@
1
- (function(qe,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],e):(qe=typeof globalThis<"u"?globalThis:qe||self,e(qe.cms={},qe.Vue,qe.vueRouter))})(this,function(qe,e,rt){"use strict";/**
1
+ (function(qe,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],e):(qe=typeof globalThis<"u"?globalThis:qe||self,e(qe.cms={},qe.Vue,qe.vueRouter))})(this,function(qe,e,nt){"use strict";/**
2
2
  * @license lucide-vue-next v0.344.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -8,17 +8,17 @@
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
- */const Fi=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ge=(l,t)=>({size:a,strokeWidth:r=2,absoluteStrokeWidth:n,color:o,class:s,...i},{attrs:c,slots:u})=>e.h("svg",{...da,width:a||da.width,height:a||da.height,stroke:o||da.stroke,"stroke-width":n?Number(r)*24/Number(a):r,...c,class:["lucide",`lucide-${Fi(l)}`],...i},[...t.map(d=>e.h(...d)),...u.default?[u.default()]:[]]);/**
11
+ */const Oi=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ge=(l,t)=>({size:a,strokeWidth:n=2,absoluteStrokeWidth:r,color:o,class:s,...i},{attrs:c,slots:u})=>e.h("svg",{...da,width:a||da.width,height:a||da.height,stroke:o||da.stroke,"stroke-width":r?Number(n)*24/Number(a):n,...c,class:["lucide",`lucide-${Oi(l)}`],...i},[...t.map(d=>e.h(...d)),...u.default?[u.default()]:[]]);/**
12
12
  * @license lucide-vue-next v0.344.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 Ii=ge("ActivityIcon",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/**
16
+ */const Pi=ge("ActivityIcon",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/**
17
17
  * @license lucide-vue-next v0.344.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 Oi=ge("ArrowLeftIcon",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
21
+ */const Ri=ge("ArrowLeftIcon",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
22
22
  * @license lucide-vue-next v0.344.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
@@ -28,22 +28,22 @@
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 wn=ge("CheckCircleIcon",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
31
+ */const _r=ge("CheckCircleIcon",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
32
32
  * @license lucide-vue-next v0.344.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 _n=ge("CheckSquareIcon",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]]);/**
36
+ */const Er=ge("CheckSquareIcon",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]]);/**
37
37
  * @license lucide-vue-next v0.344.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 En=ge("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
41
+ */const Cr=ge("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
42
42
  * @license lucide-vue-next v0.344.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 Pi=ge("ChevronLeftIcon",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
46
+ */const ji=ge("ChevronLeftIcon",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
47
47
  * @license lucide-vue-next v0.344.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
@@ -53,22 +53,22 @@
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 Ri=ge("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
56
+ */const Ui=ge("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
57
57
  * @license lucide-vue-next v0.344.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 Qa=ge("DownloadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
61
+ */const Ja=ge("DownloadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
62
62
  * @license lucide-vue-next v0.344.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 Ui=ge("ExternalLinkIcon",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
66
+ */const zi=ge("ExternalLinkIcon",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
67
67
  * @license lucide-vue-next v0.344.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 Ja=ge("EyeIcon",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
71
+ */const en=ge("EyeIcon",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
72
72
  * @license lucide-vue-next v0.344.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
@@ -78,32 +78,32 @@
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 yl=ge("FileIcon",[["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"}]]);/**
81
+ */const kl=ge("FileIcon",[["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"}]]);/**
82
82
  * @license lucide-vue-next v0.344.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 Cn=ge("FolderIcon",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
86
+ */const Vr=ge("FolderIcon",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
87
87
  * @license lucide-vue-next v0.344.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 ji=ge("GlobeIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
91
+ */const Hi=ge("GlobeIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
92
92
  * @license lucide-vue-next v0.344.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 Vn=ge("GripVerticalIcon",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
96
+ */const Nr=ge("GripVerticalIcon",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
97
97
  * @license lucide-vue-next v0.344.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 Nn=ge("HashIcon",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
101
+ */const vr=ge("HashIcon",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
102
102
  * @license lucide-vue-next v0.344.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 kl=ge("HelpCircleIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
106
+ */const xl=ge("HelpCircleIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
107
107
  * @license lucide-vue-next v0.344.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
@@ -113,27 +113,27 @@
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 xl=ge("LayersIcon",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
116
+ */const wl=ge("LayersIcon",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
117
117
  * @license lucide-vue-next v0.344.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 zi=ge("LayoutGridIcon",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
121
+ */const qi=ge("LayoutGridIcon",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
122
122
  * @license lucide-vue-next v0.344.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 Hi=ge("LayoutTemplateIcon",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/**
126
+ */const Gi=ge("LayoutTemplateIcon",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/**
127
127
  * @license lucide-vue-next v0.344.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 vn=ge("LinkIcon",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
131
+ */const Br=ge("LinkIcon",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
132
132
  * @license lucide-vue-next v0.344.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
- */const Bn=ge("ListTreeIcon",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
136
+ */const Sr=ge("ListTreeIcon",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
137
137
  * @license lucide-vue-next v0.344.0 - ISC
138
138
  *
139
139
  * This source code is licensed under the ISC license.
@@ -143,42 +143,42 @@
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const er=ge("Loader2Icon",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
146
+ */const tn=ge("Loader2Icon",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
147
147
  * @license lucide-vue-next v0.344.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const Sn=ge("PencilIcon",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
151
+ */const Dr=ge("PencilIcon",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
152
152
  * @license lucide-vue-next v0.344.0 - ISC
153
153
  *
154
154
  * This source code is licensed under the ISC license.
155
155
  * See the LICENSE file in the root directory of this source tree.
156
- */const rl=ge("PlusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
156
+ */const sl=ge("PlusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
157
157
  * @license lucide-vue-next v0.344.0 - ISC
158
158
  *
159
159
  * This source code is licensed under the ISC license.
160
160
  * See the LICENSE file in the root directory of this source tree.
161
- */const qi=ge("SaveIcon",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/**
161
+ */const Wi=ge("SaveIcon",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/**
162
162
  * @license lucide-vue-next v0.344.0 - ISC
163
163
  *
164
164
  * This source code is licensed under the ISC license.
165
165
  * See the LICENSE file in the root directory of this source tree.
166
- */const tr=ge("SearchIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
166
+ */const ln=ge("SearchIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
167
167
  * @license lucide-vue-next v0.344.0 - ISC
168
168
  *
169
169
  * This source code is licensed under the ISC license.
170
170
  * See the LICENSE file in the root directory of this source tree.
171
- */const wl=ge("SquarePenIcon",[["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.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]]);/**
171
+ */const _l=ge("SquarePenIcon",[["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.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]]);/**
172
172
  * @license lucide-vue-next v0.344.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
- */const Gt=ge("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
176
+ */const Kt=ge("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
177
177
  * @license lucide-vue-next v0.344.0 - ISC
178
178
  *
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
- */const Gi=ge("TrashIcon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/**
181
+ */const Ki=ge("TrashIcon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/**
182
182
  * @license lucide-vue-next v0.344.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
@@ -188,53 +188,54 @@
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
- */const Wi=ge("UserIcon",[["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"}]]);/**
191
+ */const Yi=ge("UserIcon",[["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"}]]);/**
192
192
  * @license lucide-vue-next v0.344.0 - ISC
193
193
  *
194
194
  * This source code is licensed under the ISC license.
195
195
  * See the LICENSE file in the root directory of this source tree.
196
- */const lr=ge("UsersIcon",[["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"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
196
+ */const an=ge("UsersIcon",[["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"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
197
197
  * @license lucide-vue-next v0.344.0 - ISC
198
198
  *
199
199
  * This source code is licensed under the ISC license.
200
200
  * See the LICENSE file in the root directory of this source tree.
201
- */const Dn=ge("XCircleIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
201
+ */const Ar=ge("XCircleIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
202
202
  * @license lucide-vue-next v0.344.0 - ISC
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
- */const Ki=ge("ZapIcon",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);/*!
206
+ */const Xi=ge("ZapIcon",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);/*!
207
207
  * shared v11.1.5
208
208
  * (c) 2025 kazuya kawaguchi
209
209
  * Released under the MIT License.
210
- */const Ct=typeof window<"u";let pt,nl;if(process.env.NODE_ENV!=="production"){const l=Ct&&window.performance;l&&l.mark&&l.measure&&l.clearMarks&&l.clearMeasures&&(pt=t=>{l.mark(t)},nl=(t,a,r)=>{l.measure(t,a,r),l.clearMarks(a),l.clearMarks(r)})}const Yi=/\{([0-9a-zA-Z]+)\}/g;function ha(l,...t){return t.length===1&&Ee(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),l.replace(Yi,(a,r)=>t.hasOwnProperty(r)?t[r]:"")}const St=(l,t=!1)=>t?Symbol.for(l):Symbol(l),Xi=(l,t,a)=>Zi({l,k:t,s:a}),Zi=l=>JSON.stringify(l).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ze=l=>typeof l=="number"&&isFinite(l),Qi=l=>ar(l)==="[object Date]",_l=l=>ar(l)==="[object RegExp]",ga=l=>ke(l)&&Object.keys(l).length===0,Ge=Object.assign,Ji=Object.create,Se=(l=null)=>Ji(l);let An;const ol=()=>An||(An=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Se());function Mn(l){return l.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const ec=Object.prototype.hasOwnProperty;function Vt(l,t){return ec.call(l,t)}const Pe=Array.isArray,De=l=>typeof l=="function",J=l=>typeof l=="string",Ce=l=>typeof l=="boolean",Ee=l=>l!==null&&typeof l=="object",tc=l=>Ee(l)&&De(l.then)&&De(l.catch),Tn=Object.prototype.toString,ar=l=>Tn.call(l),ke=l=>ar(l)==="[object Object]",lc=l=>l==null?"":Pe(l)||ke(l)&&l.toString===Tn?JSON.stringify(l,null,2):String(l);function rr(l,t=""){return l.reduce((a,r,n)=>n===0?a+r:a+t+r,"")}const Ln=2;function ac(l,t=0,a=l.length){const r=l.split(/\r?\n/);let n=0;const o=[];for(let s=0;s<r.length;s++)if(n+=r[s].length+1,n>=t){for(let i=s-Ln;i<=s+Ln||a>n;i++){if(i<0||i>=r.length)continue;const c=i+1;o.push(`${c}${" ".repeat(3-String(c).length)}| ${r[i]}`);const u=r[i].length;if(i===s){const d=t-(n-u)+1,m=Math.max(1,a>n?u-d:a-t);o.push(" | "+" ".repeat(d)+"^".repeat(m))}else if(i>s){if(a>n){const d=Math.max(Math.min(a-n,u),1);o.push(" | "+"^".repeat(d))}n+=u+1}}break}return o.join(`
211
- `)}function Wt(l,t){typeof console<"u"&&(console.warn("[intlify] "+l),t&&console.warn(t.stack))}const $n={};function nr(l){$n[l]||($n[l]=!0,Wt(l))}function or(){const l=new Map;return{events:l,on(a,r){const n=l.get(a);n&&n.push(r)||l.set(a,[r])},off(a,r){const n=l.get(a);n&&n.splice(n.indexOf(r)>>>0,1)},emit(a,r){(l.get(a)||[]).slice().map(n=>n(r)),(l.get("*")||[]).slice().map(n=>n(a,r))}}}const ba=l=>!Ee(l)||Pe(l);function ya(l,t){if(ba(l)||ba(t))throw new Error("Invalid value");const a=[{src:l,des:t}];for(;a.length;){const{src:r,des:n}=a.pop();Object.keys(r).forEach(o=>{o!=="__proto__"&&(Ee(r[o])&&!Ee(n[o])&&(n[o]=Array.isArray(r[o])?[]:Se()),ba(n[o])||ba(r[o])?n[o]=r[o]:a.push({src:r[o],des:n[o]}))})}}/*!
210
+ */const Ct=typeof window<"u";let pt,il;if(process.env.NODE_ENV!=="production"){const l=Ct&&window.performance;l&&l.mark&&l.measure&&l.clearMarks&&l.clearMeasures&&(pt=t=>{l.mark(t)},il=(t,a,n)=>{l.measure(t,a,n),l.clearMarks(a),l.clearMarks(n)})}const Zi=/\{([0-9a-zA-Z]+)\}/g;function ha(l,...t){return t.length===1&&Ee(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),l.replace(Zi,(a,n)=>t.hasOwnProperty(n)?t[n]:"")}const St=(l,t=!1)=>t?Symbol.for(l):Symbol(l),Qi=(l,t,a)=>Ji({l,k:t,s:a}),Ji=l=>JSON.stringify(l).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ze=l=>typeof l=="number"&&isFinite(l),ec=l=>nn(l)==="[object Date]",El=l=>nn(l)==="[object RegExp]",ga=l=>ke(l)&&Object.keys(l).length===0,Ge=Object.assign,tc=Object.create,Se=(l=null)=>tc(l);let Mr;const cl=()=>Mr||(Mr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Se());function Tr(l){return l.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const lc=Object.prototype.hasOwnProperty;function Vt(l,t){return lc.call(l,t)}const Pe=Array.isArray,De=l=>typeof l=="function",ee=l=>typeof l=="string",Ce=l=>typeof l=="boolean",Ee=l=>l!==null&&typeof l=="object",ac=l=>Ee(l)&&De(l.then)&&De(l.catch),Lr=Object.prototype.toString,nn=l=>Lr.call(l),ke=l=>nn(l)==="[object Object]",nc=l=>l==null?"":Pe(l)||ke(l)&&l.toString===Lr?JSON.stringify(l,null,2):String(l);function rn(l,t=""){return l.reduce((a,n,r)=>r===0?a+n:a+t+n,"")}const $r=2;function rc(l,t=0,a=l.length){const n=l.split(/\r?\n/);let r=0;const o=[];for(let s=0;s<n.length;s++)if(r+=n[s].length+1,r>=t){for(let i=s-$r;i<=s+$r||a>r;i++){if(i<0||i>=n.length)continue;const c=i+1;o.push(`${c}${" ".repeat(3-String(c).length)}| ${n[i]}`);const u=n[i].length;if(i===s){const d=t-(r-u)+1,m=Math.max(1,a>r?u-d:a-t);o.push(" | "+" ".repeat(d)+"^".repeat(m))}else if(i>s){if(a>r){const d=Math.max(Math.min(a-r,u),1);o.push(" | "+"^".repeat(d))}r+=u+1}}break}return o.join(`
211
+ `)}function Yt(l,t){typeof console<"u"&&(console.warn("[intlify] "+l),t&&console.warn(t.stack))}const Fr={};function on(l){Fr[l]||(Fr[l]=!0,Yt(l))}function sn(){const l=new Map;return{events:l,on(a,n){const r=l.get(a);r&&r.push(n)||l.set(a,[n])},off(a,n){const r=l.get(a);r&&r.splice(r.indexOf(n)>>>0,1)},emit(a,n){(l.get(a)||[]).slice().map(r=>r(n)),(l.get("*")||[]).slice().map(r=>r(a,n))}}}const ya=l=>!Ee(l)||Pe(l);function ba(l,t){if(ya(l)||ya(t))throw new Error("Invalid value");const a=[{src:l,des:t}];for(;a.length;){const{src:n,des:r}=a.pop();Object.keys(n).forEach(o=>{o!=="__proto__"&&(Ee(n[o])&&!Ee(r[o])&&(r[o]=Array.isArray(n[o])?[]:Se()),ya(r[o])||ya(n[o])?r[o]=n[o]:a.push({src:n[o],des:r[o]}))})}}/*!
212
212
  * message-compiler v11.1.5
213
213
  * (c) 2025 kazuya kawaguchi
214
214
  * Released under the MIT License.
215
- */function rc(l,t,a){return{line:l,column:t,offset:a}}function sr(l,t,a){return{start:l,end:t}}const ce={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},nc=17,oc={[ce.EXPECTED_TOKEN]:"Expected token: '{0}'",[ce.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[ce.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[ce.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[ce.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[ce.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[ce.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[ce.EMPTY_PLACEHOLDER]:"Empty placeholder",[ce.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[ce.INVALID_LINKED_FORMAT]:"Invalid linked format",[ce.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[ce.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[ce.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[ce.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[ce.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[ce.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function El(l,t,a={}){const{domain:r,messages:n,args:o}=a,s=process.env.NODE_ENV!=="production"?ha((n||oc)[l]||"",...o||[]):l,i=new SyntaxError(String(s));return i.code=l,t&&(i.location=t),i.domain=r,i}function sc(l){throw l}const ic=/<\/?[\w\s="/.':;#-\/]+>/,cc=l=>ic.test(l),Rt=" ",dc="\r",nt=`
216
- `,uc="\u2028",mc="\u2029";function pc(l){const t=l;let a=0,r=1,n=1,o=0;const s=V=>t[V]===dc&&t[V+1]===nt,i=V=>t[V]===nt,c=V=>t[V]===mc,u=V=>t[V]===uc,d=V=>s(V)||i(V)||c(V)||u(V),m=()=>a,f=()=>r,p=()=>n,y=()=>o,h=V=>s(V)||c(V)||u(V)?nt:t[V],g=()=>h(a),b=()=>h(a+o);function w(){return o=0,d(a)&&(r++,n=0),s(a)&&a++,a++,n++,t[a]}function x(){return s(a+o)&&o++,o++,t[a+o]}function k(){a=0,r=1,n=1,o=0}function _(V=0){o=V}function N(){const V=a+o;for(;V!==a;)w();o=0}return{index:m,line:f,column:p,peekOffset:y,charAt:h,currentChar:g,currentPeek:b,next:w,peek:x,reset:k,resetPeek:_,skipToPeek:N}}const Kt=void 0,fc=".",Fn="'",hc="tokenizer";function gc(l,t={}){const a=t.location!==!1,r=pc(l),n=()=>r.index(),o=()=>rc(r.line(),r.column(),r.index()),s=o(),i=n(),c={currentType:13,offset:i,startLoc:s,endLoc:s,lastType:13,lastOffset:i,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},u=()=>c,{onError:d}=t;function m(C,v,H,...re){const Te=u();if(v.column+=H,v.offset+=H,d){const Le=a?sr(Te.startLoc,v):null,be=El(C,Le,{domain:hc,args:re});d(be)}}function f(C,v,H){C.endLoc=o(),C.currentType=v;const re={type:v};return a&&(re.loc=sr(C.startLoc,C.endLoc)),H!=null&&(re.value=H),re}const p=C=>f(C,13);function y(C,v){return C.currentChar()===v?(C.next(),v):(m(ce.EXPECTED_TOKEN,o(),0,v),"")}function h(C){let v="";for(;C.currentPeek()===Rt||C.currentPeek()===nt;)v+=C.currentPeek(),C.peek();return v}function g(C){const v=h(C);return C.skipToPeek(),v}function b(C){if(C===Kt)return!1;const v=C.charCodeAt(0);return v>=97&&v<=122||v>=65&&v<=90||v===95}function w(C){if(C===Kt)return!1;const v=C.charCodeAt(0);return v>=48&&v<=57}function x(C,v){const{currentType:H}=v;if(H!==2)return!1;h(C);const re=b(C.currentPeek());return C.resetPeek(),re}function k(C,v){const{currentType:H}=v;if(H!==2)return!1;h(C);const re=C.currentPeek()==="-"?C.peek():C.currentPeek(),Te=w(re);return C.resetPeek(),Te}function _(C,v){const{currentType:H}=v;if(H!==2)return!1;h(C);const re=C.currentPeek()===Fn;return C.resetPeek(),re}function N(C,v){const{currentType:H}=v;if(H!==7)return!1;h(C);const re=C.currentPeek()===".";return C.resetPeek(),re}function V(C,v){const{currentType:H}=v;if(H!==8)return!1;h(C);const re=b(C.currentPeek());return C.resetPeek(),re}function P(C,v){const{currentType:H}=v;if(!(H===7||H===11))return!1;h(C);const re=C.currentPeek()===":";return C.resetPeek(),re}function $(C,v){const{currentType:H}=v;if(H!==9)return!1;const re=()=>{const Le=C.currentPeek();return Le==="{"?b(C.peek()):Le==="@"||Le==="|"||Le===":"||Le==="."||Le===Rt||!Le?!1:Le===nt?(C.peek(),re()):A(C,!1)},Te=re();return C.resetPeek(),Te}function M(C){h(C);const v=C.currentPeek()==="|";return C.resetPeek(),v}function A(C,v=!0){const H=(Te=!1,Le="")=>{const be=C.currentPeek();return be==="{"||be==="@"||!be?Te:be==="|"?!(Le===Rt||Le===nt):be===Rt?(C.peek(),H(!0,Rt)):be===nt?(C.peek(),H(!0,nt)):!0},re=H();return v&&C.resetPeek(),re}function q(C,v){const H=C.currentChar();return H===Kt?Kt:v(H)?(C.next(),H):null}function Q(C){const v=C.charCodeAt(0);return v>=97&&v<=122||v>=65&&v<=90||v>=48&&v<=57||v===95||v===36}function R(C){return q(C,Q)}function I(C){const v=C.charCodeAt(0);return v>=97&&v<=122||v>=65&&v<=90||v>=48&&v<=57||v===95||v===36||v===45}function F(C){return q(C,I)}function D(C){const v=C.charCodeAt(0);return v>=48&&v<=57}function z(C){return q(C,D)}function ee(C){const v=C.charCodeAt(0);return v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102}function me(C){return q(C,ee)}function Ne(C){let v="",H="";for(;v=z(C);)H+=v;return H}function Ke(C){let v="";for(;;){const H=C.currentChar();if(H==="{"||H==="}"||H==="@"||H==="|"||!H)break;if(H===Rt||H===nt)if(A(C))v+=H,C.next();else{if(M(C))break;v+=H,C.next()}else v+=H,C.next()}return v}function qt(C){g(C);let v="",H="";for(;v=F(C);)H+=v;return C.currentChar()===Kt&&m(ce.UNTERMINATED_CLOSING_BRACE,o(),0),H}function Re(C){g(C);let v="";return C.currentChar()==="-"?(C.next(),v+=`-${Ne(C)}`):v+=Ne(C),C.currentChar()===Kt&&m(ce.UNTERMINATED_CLOSING_BRACE,o(),0),v}function Ye(C){return C!==Fn&&C!==nt}function vt(C){g(C),y(C,"'");let v="",H="";for(;v=q(C,Ye);)v==="\\"?H+=yt(C):H+=v;const re=C.currentChar();return re===nt||re===Kt?(m(ce.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),re===nt&&(C.next(),y(C,"'")),H):(y(C,"'"),H)}function yt(C){const v=C.currentChar();switch(v){case"\\":case"'":return C.next(),`\\${v}`;case"u":return Et(C,v,4);case"U":return Et(C,v,6);default:return m(ce.UNKNOWN_ESCAPE_SEQUENCE,o(),0,v),""}}function Et(C,v,H){y(C,v);let re="";for(let Te=0;Te<H;Te++){const Le=me(C);if(!Le){m(ce.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${v}${re}${C.currentChar()}`);break}re+=Le}return`\\${v}${re}`}function Pt(C){return C!=="{"&&C!=="}"&&C!==Rt&&C!==nt}function at(C){g(C);let v="",H="";for(;v=q(C,Pt);)H+=v;return H}function st(C){let v="",H="";for(;v=R(C);)H+=v;return H}function U(C){const v=H=>{const re=C.currentChar();return re==="{"||re==="@"||re==="|"||re==="("||re===")"||!re||re===Rt?H:(H+=re,C.next(),v(H))};return v("")}function Y(C){g(C);const v=y(C,"|");return g(C),v}function le(C,v){let H=null;switch(C.currentChar()){case"{":return v.braceNest>=1&&m(ce.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),C.next(),H=f(v,2,"{"),g(C),v.braceNest++,H;case"}":return v.braceNest>0&&v.currentType===2&&m(ce.EMPTY_PLACEHOLDER,o(),0),C.next(),H=f(v,3,"}"),v.braceNest--,v.braceNest>0&&g(C),v.inLinked&&v.braceNest===0&&(v.inLinked=!1),H;case"@":return v.braceNest>0&&m(ce.UNTERMINATED_CLOSING_BRACE,o(),0),H=ae(C,v)||p(v),v.braceNest=0,H;default:{let Te=!0,Le=!0,be=!0;if(M(C))return v.braceNest>0&&m(ce.UNTERMINATED_CLOSING_BRACE,o(),0),H=f(v,1,Y(C)),v.braceNest=0,v.inLinked=!1,H;if(v.braceNest>0&&(v.currentType===4||v.currentType===5||v.currentType===6))return m(ce.UNTERMINATED_CLOSING_BRACE,o(),0),v.braceNest=0,de(C,v);if(Te=x(C,v))return H=f(v,4,qt(C)),g(C),H;if(Le=k(C,v))return H=f(v,5,Re(C)),g(C),H;if(be=_(C,v))return H=f(v,6,vt(C)),g(C),H;if(!Te&&!Le&&!be)return H=f(v,12,at(C)),m(ce.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,H.value),g(C),H;break}}return H}function ae(C,v){const{currentType:H}=v;let re=null;const Te=C.currentChar();switch((H===7||H===8||H===11||H===9)&&(Te===nt||Te===Rt)&&m(ce.INVALID_LINKED_FORMAT,o(),0),Te){case"@":return C.next(),re=f(v,7,"@"),v.inLinked=!0,re;case".":return g(C),C.next(),f(v,8,".");case":":return g(C),C.next(),f(v,9,":");default:return M(C)?(re=f(v,1,Y(C)),v.braceNest=0,v.inLinked=!1,re):N(C,v)||P(C,v)?(g(C),ae(C,v)):V(C,v)?(g(C),f(v,11,st(C))):$(C,v)?(g(C),Te==="{"?le(C,v)||re:f(v,10,U(C))):(H===7&&m(ce.INVALID_LINKED_FORMAT,o(),0),v.braceNest=0,v.inLinked=!1,de(C,v))}}function de(C,v){let H={type:13};if(v.braceNest>0)return le(C,v)||p(v);if(v.inLinked)return ae(C,v)||p(v);switch(C.currentChar()){case"{":return le(C,v)||p(v);case"}":return m(ce.UNBALANCED_CLOSING_BRACE,o(),0),C.next(),f(v,3,"}");case"@":return ae(C,v)||p(v);default:{if(M(C))return H=f(v,1,Y(C)),v.braceNest=0,v.inLinked=!1,H;if(A(C))return f(v,0,Ke(C));break}}return H}function Ae(){const{currentType:C,offset:v,startLoc:H,endLoc:re}=c;return c.lastType=C,c.lastOffset=v,c.lastStartLoc=H,c.lastEndLoc=re,c.offset=n(),c.startLoc=o(),r.currentChar()===Kt?f(c,13):de(r,c)}return{nextToken:Ae,currentOffset:n,currentPosition:o,context:u}}const bc="parser",yc=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function kc(l,t,a){switch(l){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(t||a,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function xc(l={}){const t=l.location!==!1,{onError:a}=l;function r(b,w,x,k,..._){const N=b.currentPosition();if(N.offset+=k,N.column+=k,a){const V=t?sr(x,N):null,P=El(w,V,{domain:bc,args:_});a(P)}}function n(b,w,x){const k={type:b};return t&&(k.start=w,k.end=w,k.loc={start:x,end:x}),k}function o(b,w,x,k){t&&(b.end=w,b.loc&&(b.loc.end=x))}function s(b,w){const x=b.context(),k=n(3,x.offset,x.startLoc);return k.value=w,o(k,b.currentOffset(),b.currentPosition()),k}function i(b,w){const x=b.context(),{lastOffset:k,lastStartLoc:_}=x,N=n(5,k,_);return N.index=parseInt(w,10),b.nextToken(),o(N,b.currentOffset(),b.currentPosition()),N}function c(b,w){const x=b.context(),{lastOffset:k,lastStartLoc:_}=x,N=n(4,k,_);return N.key=w,b.nextToken(),o(N,b.currentOffset(),b.currentPosition()),N}function u(b,w){const x=b.context(),{lastOffset:k,lastStartLoc:_}=x,N=n(9,k,_);return N.value=w.replace(yc,kc),b.nextToken(),o(N,b.currentOffset(),b.currentPosition()),N}function d(b){const w=b.nextToken(),x=b.context(),{lastOffset:k,lastStartLoc:_}=x,N=n(8,k,_);return w.type!==11?(r(b,ce.UNEXPECTED_EMPTY_LINKED_MODIFIER,x.lastStartLoc,0),N.value="",o(N,k,_),{nextConsumeToken:w,node:N}):(w.value==null&&r(b,ce.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Dt(w)),N.value=w.value||"",o(N,b.currentOffset(),b.currentPosition()),{node:N})}function m(b,w){const x=b.context(),k=n(7,x.offset,x.startLoc);return k.value=w,o(k,b.currentOffset(),b.currentPosition()),k}function f(b){const w=b.context(),x=n(6,w.offset,w.startLoc);let k=b.nextToken();if(k.type===8){const _=d(b);x.modifier=_.node,k=_.nextConsumeToken||b.nextToken()}switch(k.type!==9&&r(b,ce.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Dt(k)),k=b.nextToken(),k.type===2&&(k=b.nextToken()),k.type){case 10:k.value==null&&r(b,ce.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Dt(k)),x.key=m(b,k.value||"");break;case 4:k.value==null&&r(b,ce.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Dt(k)),x.key=c(b,k.value||"");break;case 5:k.value==null&&r(b,ce.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Dt(k)),x.key=i(b,k.value||"");break;case 6:k.value==null&&r(b,ce.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Dt(k)),x.key=u(b,k.value||"");break;default:{r(b,ce.UNEXPECTED_EMPTY_LINKED_KEY,w.lastStartLoc,0);const _=b.context(),N=n(7,_.offset,_.startLoc);return N.value="",o(N,_.offset,_.startLoc),x.key=N,o(x,_.offset,_.startLoc),{nextConsumeToken:k,node:x}}}return o(x,b.currentOffset(),b.currentPosition()),{node:x}}function p(b){const w=b.context(),x=w.currentType===1?b.currentOffset():w.offset,k=w.currentType===1?w.endLoc:w.startLoc,_=n(2,x,k);_.items=[];let N=null;do{const $=N||b.nextToken();switch(N=null,$.type){case 0:$.value==null&&r(b,ce.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Dt($)),_.items.push(s(b,$.value||""));break;case 5:$.value==null&&r(b,ce.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Dt($)),_.items.push(i(b,$.value||""));break;case 4:$.value==null&&r(b,ce.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Dt($)),_.items.push(c(b,$.value||""));break;case 6:$.value==null&&r(b,ce.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Dt($)),_.items.push(u(b,$.value||""));break;case 7:{const M=f(b);_.items.push(M.node),N=M.nextConsumeToken||null;break}}}while(w.currentType!==13&&w.currentType!==1);const V=w.currentType===1?w.lastOffset:b.currentOffset(),P=w.currentType===1?w.lastEndLoc:b.currentPosition();return o(_,V,P),_}function y(b,w,x,k){const _=b.context();let N=k.items.length===0;const V=n(1,w,x);V.cases=[],V.cases.push(k);do{const P=p(b);N||(N=P.items.length===0),V.cases.push(P)}while(_.currentType!==13);return N&&r(b,ce.MUST_HAVE_MESSAGES_IN_PLURAL,x,0),o(V,b.currentOffset(),b.currentPosition()),V}function h(b){const w=b.context(),{offset:x,startLoc:k}=w,_=p(b);return w.currentType===13?_:y(b,x,k,_)}function g(b){const w=gc(b,Ge({},l)),x=w.context(),k=n(0,x.offset,x.startLoc);return t&&k.loc&&(k.loc.source=b),k.body=h(w),l.onCacheKey&&(k.cacheKey=l.onCacheKey(b)),x.currentType!==13&&r(w,ce.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,b[x.offset]||""),o(k,w.currentOffset(),w.currentPosition()),k}return{parse:g}}function Dt(l){if(l.type===13)return"EOF";const t=(l.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function wc(l,t={}){const a={ast:l,helpers:new Set};return{context:()=>a,helper:o=>(a.helpers.add(o),o)}}function In(l,t){for(let a=0;a<l.length;a++)ir(l[a],t)}function ir(l,t){switch(l.type){case 1:In(l.cases,t),t.helper("plural");break;case 2:In(l.items,t);break;case 6:{ir(l.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function _c(l,t={}){const a=wc(l);a.helper("normalize"),l.body&&ir(l.body,a);const r=a.context();l.helpers=Array.from(r.helpers)}function Ec(l){const t=l.body;return t.type===2?On(t):t.cases.forEach(a=>On(a)),l}function On(l){if(l.items.length===1){const t=l.items[0];(t.type===3||t.type===9)&&(l.static=t.value,delete t.value)}else{const t=[];for(let a=0;a<l.items.length;a++){const r=l.items[a];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===l.items.length){l.static=rr(t);for(let a=0;a<l.items.length;a++){const r=l.items[a];(r.type===3||r.type===9)&&delete r.value}}}}const Cc="minifier";function Cl(l){switch(l.t=l.type,l.type){case 0:{const t=l;Cl(t.body),t.b=t.body,delete t.body;break}case 1:{const t=l,a=t.cases;for(let r=0;r<a.length;r++)Cl(a[r]);t.c=a,delete t.cases;break}case 2:{const t=l,a=t.items;for(let r=0;r<a.length;r++)Cl(a[r]);t.i=a,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=l;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=l;Cl(t.key),t.k=t.key,delete t.key,t.modifier&&(Cl(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=l;t.i=t.index,delete t.index;break}case 4:{const t=l;t.k=t.key,delete t.key;break}default:if(process.env.NODE_ENV!=="production")throw El(ce.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:Cc,args:[l.type]})}delete l.type}const Vc="parser";function Nc(l,t){const{sourceMap:a,filename:r,breakLineCode:n,needIndent:o}=t,s=t.location!==!1,i={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:n,needIndent:o,indentLevel:0};s&&l.loc&&(i.source=l.loc.source);const c=()=>i;function u(g,b){i.code+=g}function d(g,b=!0){const w=b?n:"";u(o?w+" ".repeat(g):w)}function m(g=!0){const b=++i.indentLevel;g&&d(b)}function f(g=!0){const b=--i.indentLevel;g&&d(b)}function p(){d(i.indentLevel)}return{context:c,push:u,indent:m,deindent:f,newline:p,helper:g=>`_${g}`,needIndent:()=>i.needIndent}}function vc(l,t){const{helper:a}=l;l.push(`${a("linked")}(`),Vl(l,t.key),t.modifier?(l.push(", "),Vl(l,t.modifier),l.push(", _type")):l.push(", undefined, _type"),l.push(")")}function Bc(l,t){const{helper:a,needIndent:r}=l;l.push(`${a("normalize")}([`),l.indent(r());const n=t.items.length;for(let o=0;o<n&&(Vl(l,t.items[o]),o!==n-1);o++)l.push(", ");l.deindent(r()),l.push("])")}function Sc(l,t){const{helper:a,needIndent:r}=l;if(t.cases.length>1){l.push(`${a("plural")}([`),l.indent(r());const n=t.cases.length;for(let o=0;o<n&&(Vl(l,t.cases[o]),o!==n-1);o++)l.push(", ");l.deindent(r()),l.push("])")}}function Dc(l,t){t.body?Vl(l,t.body):l.push("null")}function Vl(l,t){const{helper:a}=l;switch(t.type){case 0:Dc(l,t);break;case 1:Sc(l,t);break;case 2:Bc(l,t);break;case 6:vc(l,t);break;case 8:l.push(JSON.stringify(t.value),t);break;case 7:l.push(JSON.stringify(t.value),t);break;case 5:l.push(`${a("interpolate")}(${a("list")}(${t.index}))`,t);break;case 4:l.push(`${a("interpolate")}(${a("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:l.push(JSON.stringify(t.value),t);break;case 3:l.push(JSON.stringify(t.value),t);break;default:if(process.env.NODE_ENV!=="production")throw El(ce.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:Vc,args:[t.type]})}}const Ac=(l,t={})=>{const a=J(t.mode)?t.mode:"normal",r=J(t.filename)?t.filename:"message.intl",n=!!t.sourceMap,o=t.breakLineCode!=null?t.breakLineCode:a==="arrow"?";":`
217
- `,s=t.needIndent?t.needIndent:a!=="arrow",i=l.helpers||[],c=Nc(l,{mode:a,filename:r,sourceMap:n,breakLineCode:o,needIndent:s});c.push(a==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(s),i.length>0&&(c.push(`const { ${rr(i.map(m=>`${m}: _${m}`),", ")} } = ctx`),c.newline()),c.push("return "),Vl(c,l),c.deindent(s),c.push("}"),delete l.helpers;const{code:u,map:d}=c.context();return{ast:l,code:u,map:d?d.toJSON():void 0}};function Mc(l,t={}){const a=Ge({},t),r=!!a.jit,n=!!a.minify,o=a.optimize==null?!0:a.optimize,i=xc(a).parse(l);return r?(o&&Ec(i),n&&Cl(i),{ast:i,code:""}):(_c(i,a),Ac(i,a))}/*!
215
+ */function oc(l,t,a){return{line:l,column:t,offset:a}}function cn(l,t,a){return{start:l,end:t}}const ce={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},sc=17,ic={[ce.EXPECTED_TOKEN]:"Expected token: '{0}'",[ce.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[ce.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[ce.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[ce.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[ce.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[ce.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[ce.EMPTY_PLACEHOLDER]:"Empty placeholder",[ce.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[ce.INVALID_LINKED_FORMAT]:"Invalid linked format",[ce.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[ce.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[ce.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[ce.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[ce.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[ce.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Cl(l,t,a={}){const{domain:n,messages:r,args:o}=a,s=process.env.NODE_ENV!=="production"?ha((r||ic)[l]||"",...o||[]):l,i=new SyntaxError(String(s));return i.code=l,t&&(i.location=t),i.domain=n,i}function cc(l){throw l}const dc=/<\/?[\w\s="/.':;#-\/]+>/,uc=l=>dc.test(l),Rt=" ",mc="\r",rt=`
216
+ `,pc="\u2028",fc="\u2029";function hc(l){const t=l;let a=0,n=1,r=1,o=0;const s=E=>t[E]===mc&&t[E+1]===rt,i=E=>t[E]===rt,c=E=>t[E]===fc,u=E=>t[E]===pc,d=E=>s(E)||i(E)||c(E)||u(E),m=()=>a,h=()=>n,f=()=>r,y=()=>o,k=E=>s(E)||c(E)||u(E)?rt:t[E],g=()=>k(a),p=()=>k(a+o);function x(){return o=0,d(a)&&(n++,r=0),s(a)&&a++,a++,r++,t[a]}function w(){return s(a+o)&&o++,o++,t[a+o]}function b(){a=0,n=1,r=1,o=0}function _(E=0){o=E}function V(){const E=a+o;for(;E!==a;)x();o=0}return{index:m,line:h,column:f,peekOffset:y,charAt:k,currentChar:g,currentPeek:p,next:x,peek:w,reset:b,resetPeek:_,skipToPeek:V}}const Xt=void 0,gc=".",Ir="'",yc="tokenizer";function bc(l,t={}){const a=t.location!==!1,n=hc(l),r=()=>n.index(),o=()=>oc(n.line(),n.column(),n.index()),s=o(),i=r(),c={currentType:13,offset:i,startLoc:s,endLoc:s,lastType:13,lastOffset:i,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},u=()=>c,{onError:d}=t;function m(N,v,q,...ne){const Te=u();if(v.column+=q,v.offset+=q,d){const Le=a?cn(Te.startLoc,v):null,ye=Cl(N,Le,{domain:yc,args:ne});d(ye)}}function h(N,v,q){N.endLoc=o(),N.currentType=v;const ne={type:v};return a&&(ne.loc=cn(N.startLoc,N.endLoc)),q!=null&&(ne.value=q),ne}const f=N=>h(N,13);function y(N,v){return N.currentChar()===v?(N.next(),v):(m(ce.EXPECTED_TOKEN,o(),0,v),"")}function k(N){let v="";for(;N.currentPeek()===Rt||N.currentPeek()===rt;)v+=N.currentPeek(),N.peek();return v}function g(N){const v=k(N);return N.skipToPeek(),v}function p(N){if(N===Xt)return!1;const v=N.charCodeAt(0);return v>=97&&v<=122||v>=65&&v<=90||v===95}function x(N){if(N===Xt)return!1;const v=N.charCodeAt(0);return v>=48&&v<=57}function w(N,v){const{currentType:q}=v;if(q!==2)return!1;k(N);const ne=p(N.currentPeek());return N.resetPeek(),ne}function b(N,v){const{currentType:q}=v;if(q!==2)return!1;k(N);const ne=N.currentPeek()==="-"?N.peek():N.currentPeek(),Te=x(ne);return N.resetPeek(),Te}function _(N,v){const{currentType:q}=v;if(q!==2)return!1;k(N);const ne=N.currentPeek()===Ir;return N.resetPeek(),ne}function V(N,v){const{currentType:q}=v;if(q!==7)return!1;k(N);const ne=N.currentPeek()===".";return N.resetPeek(),ne}function E(N,v){const{currentType:q}=v;if(q!==8)return!1;k(N);const ne=p(N.currentPeek());return N.resetPeek(),ne}function M(N,v){const{currentType:q}=v;if(!(q===7||q===11))return!1;k(N);const ne=N.currentPeek()===":";return N.resetPeek(),ne}function D(N,v){const{currentType:q}=v;if(q!==9)return!1;const ne=()=>{const Le=N.currentPeek();return Le==="{"?p(N.peek()):Le==="@"||Le==="|"||Le===":"||Le==="."||Le===Rt||!Le?!1:Le===rt?(N.peek(),ne()):$(N,!1)},Te=ne();return N.resetPeek(),Te}function A(N){k(N);const v=N.currentPeek()==="|";return N.resetPeek(),v}function $(N,v=!0){const q=(Te=!1,Le="")=>{const ye=N.currentPeek();return ye==="{"||ye==="@"||!ye?Te:ye==="|"?!(Le===Rt||Le===rt):ye===Rt?(N.peek(),q(!0,Rt)):ye===rt?(N.peek(),q(!0,rt)):!0},ne=q();return v&&N.resetPeek(),ne}function U(N,v){const q=N.currentChar();return q===Xt?Xt:v(q)?(N.next(),q):null}function W(N){const v=N.charCodeAt(0);return v>=97&&v<=122||v>=65&&v<=90||v>=48&&v<=57||v===95||v===36}function O(N){return U(N,W)}function I(N){const v=N.charCodeAt(0);return v>=97&&v<=122||v>=65&&v<=90||v>=48&&v<=57||v===95||v===36||v===45}function F(N){return U(N,I)}function T(N){const v=N.charCodeAt(0);return v>=48&&v<=57}function z(N){return U(N,T)}function Q(N){const v=N.charCodeAt(0);return v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102}function me(N){return U(N,Q)}function Ne(N){let v="",q="";for(;v=z(N);)q+=v;return q}function Ke(N){let v="";for(;;){const q=N.currentChar();if(q==="{"||q==="}"||q==="@"||q==="|"||!q)break;if(q===Rt||q===rt)if($(N))v+=q,N.next();else{if(A(N))break;v+=q,N.next()}else v+=q,N.next()}return v}function Wt(N){g(N);let v="",q="";for(;v=F(N);)q+=v;return N.currentChar()===Xt&&m(ce.UNTERMINATED_CLOSING_BRACE,o(),0),q}function Re(N){g(N);let v="";return N.currentChar()==="-"?(N.next(),v+=`-${Ne(N)}`):v+=Ne(N),N.currentChar()===Xt&&m(ce.UNTERMINATED_CLOSING_BRACE,o(),0),v}function Ye(N){return N!==Ir&&N!==rt}function vt(N){g(N),y(N,"'");let v="",q="";for(;v=U(N,Ye);)v==="\\"?q+=bt(N):q+=v;const ne=N.currentChar();return ne===rt||ne===Xt?(m(ce.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),ne===rt&&(N.next(),y(N,"'")),q):(y(N,"'"),q)}function bt(N){const v=N.currentChar();switch(v){case"\\":case"'":return N.next(),`\\${v}`;case"u":return Et(N,v,4);case"U":return Et(N,v,6);default:return m(ce.UNKNOWN_ESCAPE_SEQUENCE,o(),0,v),""}}function Et(N,v,q){y(N,v);let ne="";for(let Te=0;Te<q;Te++){const Le=me(N);if(!Le){m(ce.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${v}${ne}${N.currentChar()}`);break}ne+=Le}return`\\${v}${ne}`}function Pt(N){return N!=="{"&&N!=="}"&&N!==Rt&&N!==rt}function at(N){g(N);let v="",q="";for(;v=U(N,Pt);)q+=v;return q}function st(N){let v="",q="";for(;v=O(N);)q+=v;return q}function j(N){const v=q=>{const ne=N.currentChar();return ne==="{"||ne==="@"||ne==="|"||ne==="("||ne===")"||!ne||ne===Rt?q:(q+=ne,N.next(),v(q))};return v("")}function X(N){g(N);const v=y(N,"|");return g(N),v}function le(N,v){let q=null;switch(N.currentChar()){case"{":return v.braceNest>=1&&m(ce.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),N.next(),q=h(v,2,"{"),g(N),v.braceNest++,q;case"}":return v.braceNest>0&&v.currentType===2&&m(ce.EMPTY_PLACEHOLDER,o(),0),N.next(),q=h(v,3,"}"),v.braceNest--,v.braceNest>0&&g(N),v.inLinked&&v.braceNest===0&&(v.inLinked=!1),q;case"@":return v.braceNest>0&&m(ce.UNTERMINATED_CLOSING_BRACE,o(),0),q=ae(N,v)||f(v),v.braceNest=0,q;default:{let Te=!0,Le=!0,ye=!0;if(A(N))return v.braceNest>0&&m(ce.UNTERMINATED_CLOSING_BRACE,o(),0),q=h(v,1,X(N)),v.braceNest=0,v.inLinked=!1,q;if(v.braceNest>0&&(v.currentType===4||v.currentType===5||v.currentType===6))return m(ce.UNTERMINATED_CLOSING_BRACE,o(),0),v.braceNest=0,de(N,v);if(Te=w(N,v))return q=h(v,4,Wt(N)),g(N),q;if(Le=b(N,v))return q=h(v,5,Re(N)),g(N),q;if(ye=_(N,v))return q=h(v,6,vt(N)),g(N),q;if(!Te&&!Le&&!ye)return q=h(v,12,at(N)),m(ce.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,q.value),g(N),q;break}}return q}function ae(N,v){const{currentType:q}=v;let ne=null;const Te=N.currentChar();switch((q===7||q===8||q===11||q===9)&&(Te===rt||Te===Rt)&&m(ce.INVALID_LINKED_FORMAT,o(),0),Te){case"@":return N.next(),ne=h(v,7,"@"),v.inLinked=!0,ne;case".":return g(N),N.next(),h(v,8,".");case":":return g(N),N.next(),h(v,9,":");default:return A(N)?(ne=h(v,1,X(N)),v.braceNest=0,v.inLinked=!1,ne):V(N,v)||M(N,v)?(g(N),ae(N,v)):E(N,v)?(g(N),h(v,11,st(N))):D(N,v)?(g(N),Te==="{"?le(N,v)||ne:h(v,10,j(N))):(q===7&&m(ce.INVALID_LINKED_FORMAT,o(),0),v.braceNest=0,v.inLinked=!1,de(N,v))}}function de(N,v){let q={type:13};if(v.braceNest>0)return le(N,v)||f(v);if(v.inLinked)return ae(N,v)||f(v);switch(N.currentChar()){case"{":return le(N,v)||f(v);case"}":return m(ce.UNBALANCED_CLOSING_BRACE,o(),0),N.next(),h(v,3,"}");case"@":return ae(N,v)||f(v);default:{if(A(N))return q=h(v,1,X(N)),v.braceNest=0,v.inLinked=!1,q;if($(N))return h(v,0,Ke(N));break}}return q}function Ae(){const{currentType:N,offset:v,startLoc:q,endLoc:ne}=c;return c.lastType=N,c.lastOffset=v,c.lastStartLoc=q,c.lastEndLoc=ne,c.offset=r(),c.startLoc=o(),n.currentChar()===Xt?h(c,13):de(n,c)}return{nextToken:Ae,currentOffset:r,currentPosition:o,context:u}}const kc="parser",xc=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function wc(l,t,a){switch(l){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(t||a,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function _c(l={}){const t=l.location!==!1,{onError:a}=l;function n(p,x,w,b,..._){const V=p.currentPosition();if(V.offset+=b,V.column+=b,a){const E=t?cn(w,V):null,M=Cl(x,E,{domain:kc,args:_});a(M)}}function r(p,x,w){const b={type:p};return t&&(b.start=x,b.end=x,b.loc={start:w,end:w}),b}function o(p,x,w,b){t&&(p.end=x,p.loc&&(p.loc.end=w))}function s(p,x){const w=p.context(),b=r(3,w.offset,w.startLoc);return b.value=x,o(b,p.currentOffset(),p.currentPosition()),b}function i(p,x){const w=p.context(),{lastOffset:b,lastStartLoc:_}=w,V=r(5,b,_);return V.index=parseInt(x,10),p.nextToken(),o(V,p.currentOffset(),p.currentPosition()),V}function c(p,x){const w=p.context(),{lastOffset:b,lastStartLoc:_}=w,V=r(4,b,_);return V.key=x,p.nextToken(),o(V,p.currentOffset(),p.currentPosition()),V}function u(p,x){const w=p.context(),{lastOffset:b,lastStartLoc:_}=w,V=r(9,b,_);return V.value=x.replace(xc,wc),p.nextToken(),o(V,p.currentOffset(),p.currentPosition()),V}function d(p){const x=p.nextToken(),w=p.context(),{lastOffset:b,lastStartLoc:_}=w,V=r(8,b,_);return x.type!==11?(n(p,ce.UNEXPECTED_EMPTY_LINKED_MODIFIER,w.lastStartLoc,0),V.value="",o(V,b,_),{nextConsumeToken:x,node:V}):(x.value==null&&n(p,ce.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Dt(x)),V.value=x.value||"",o(V,p.currentOffset(),p.currentPosition()),{node:V})}function m(p,x){const w=p.context(),b=r(7,w.offset,w.startLoc);return b.value=x,o(b,p.currentOffset(),p.currentPosition()),b}function h(p){const x=p.context(),w=r(6,x.offset,x.startLoc);let b=p.nextToken();if(b.type===8){const _=d(p);w.modifier=_.node,b=_.nextConsumeToken||p.nextToken()}switch(b.type!==9&&n(p,ce.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Dt(b)),b=p.nextToken(),b.type===2&&(b=p.nextToken()),b.type){case 10:b.value==null&&n(p,ce.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Dt(b)),w.key=m(p,b.value||"");break;case 4:b.value==null&&n(p,ce.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Dt(b)),w.key=c(p,b.value||"");break;case 5:b.value==null&&n(p,ce.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Dt(b)),w.key=i(p,b.value||"");break;case 6:b.value==null&&n(p,ce.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Dt(b)),w.key=u(p,b.value||"");break;default:{n(p,ce.UNEXPECTED_EMPTY_LINKED_KEY,x.lastStartLoc,0);const _=p.context(),V=r(7,_.offset,_.startLoc);return V.value="",o(V,_.offset,_.startLoc),w.key=V,o(w,_.offset,_.startLoc),{nextConsumeToken:b,node:w}}}return o(w,p.currentOffset(),p.currentPosition()),{node:w}}function f(p){const x=p.context(),w=x.currentType===1?p.currentOffset():x.offset,b=x.currentType===1?x.endLoc:x.startLoc,_=r(2,w,b);_.items=[];let V=null;do{const D=V||p.nextToken();switch(V=null,D.type){case 0:D.value==null&&n(p,ce.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Dt(D)),_.items.push(s(p,D.value||""));break;case 5:D.value==null&&n(p,ce.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Dt(D)),_.items.push(i(p,D.value||""));break;case 4:D.value==null&&n(p,ce.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Dt(D)),_.items.push(c(p,D.value||""));break;case 6:D.value==null&&n(p,ce.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Dt(D)),_.items.push(u(p,D.value||""));break;case 7:{const A=h(p);_.items.push(A.node),V=A.nextConsumeToken||null;break}}}while(x.currentType!==13&&x.currentType!==1);const E=x.currentType===1?x.lastOffset:p.currentOffset(),M=x.currentType===1?x.lastEndLoc:p.currentPosition();return o(_,E,M),_}function y(p,x,w,b){const _=p.context();let V=b.items.length===0;const E=r(1,x,w);E.cases=[],E.cases.push(b);do{const M=f(p);V||(V=M.items.length===0),E.cases.push(M)}while(_.currentType!==13);return V&&n(p,ce.MUST_HAVE_MESSAGES_IN_PLURAL,w,0),o(E,p.currentOffset(),p.currentPosition()),E}function k(p){const x=p.context(),{offset:w,startLoc:b}=x,_=f(p);return x.currentType===13?_:y(p,w,b,_)}function g(p){const x=bc(p,Ge({},l)),w=x.context(),b=r(0,w.offset,w.startLoc);return t&&b.loc&&(b.loc.source=p),b.body=k(x),l.onCacheKey&&(b.cacheKey=l.onCacheKey(p)),w.currentType!==13&&n(x,ce.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,p[w.offset]||""),o(b,x.currentOffset(),x.currentPosition()),b}return{parse:g}}function Dt(l){if(l.type===13)return"EOF";const t=(l.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function Ec(l,t={}){const a={ast:l,helpers:new Set};return{context:()=>a,helper:o=>(a.helpers.add(o),o)}}function Or(l,t){for(let a=0;a<l.length;a++)dn(l[a],t)}function dn(l,t){switch(l.type){case 1:Or(l.cases,t),t.helper("plural");break;case 2:Or(l.items,t);break;case 6:{dn(l.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function Cc(l,t={}){const a=Ec(l);a.helper("normalize"),l.body&&dn(l.body,a);const n=a.context();l.helpers=Array.from(n.helpers)}function Vc(l){const t=l.body;return t.type===2?Pr(t):t.cases.forEach(a=>Pr(a)),l}function Pr(l){if(l.items.length===1){const t=l.items[0];(t.type===3||t.type===9)&&(l.static=t.value,delete t.value)}else{const t=[];for(let a=0;a<l.items.length;a++){const n=l.items[a];if(!(n.type===3||n.type===9)||n.value==null)break;t.push(n.value)}if(t.length===l.items.length){l.static=rn(t);for(let a=0;a<l.items.length;a++){const n=l.items[a];(n.type===3||n.type===9)&&delete n.value}}}}const Nc="minifier";function Vl(l){switch(l.t=l.type,l.type){case 0:{const t=l;Vl(t.body),t.b=t.body,delete t.body;break}case 1:{const t=l,a=t.cases;for(let n=0;n<a.length;n++)Vl(a[n]);t.c=a,delete t.cases;break}case 2:{const t=l,a=t.items;for(let n=0;n<a.length;n++)Vl(a[n]);t.i=a,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=l;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=l;Vl(t.key),t.k=t.key,delete t.key,t.modifier&&(Vl(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=l;t.i=t.index,delete t.index;break}case 4:{const t=l;t.k=t.key,delete t.key;break}default:if(process.env.NODE_ENV!=="production")throw Cl(ce.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:Nc,args:[l.type]})}delete l.type}const vc="parser";function Bc(l,t){const{sourceMap:a,filename:n,breakLineCode:r,needIndent:o}=t,s=t.location!==!1,i={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};s&&l.loc&&(i.source=l.loc.source);const c=()=>i;function u(g,p){i.code+=g}function d(g,p=!0){const x=p?r:"";u(o?x+" ".repeat(g):x)}function m(g=!0){const p=++i.indentLevel;g&&d(p)}function h(g=!0){const p=--i.indentLevel;g&&d(p)}function f(){d(i.indentLevel)}return{context:c,push:u,indent:m,deindent:h,newline:f,helper:g=>`_${g}`,needIndent:()=>i.needIndent}}function Sc(l,t){const{helper:a}=l;l.push(`${a("linked")}(`),Nl(l,t.key),t.modifier?(l.push(", "),Nl(l,t.modifier),l.push(", _type")):l.push(", undefined, _type"),l.push(")")}function Dc(l,t){const{helper:a,needIndent:n}=l;l.push(`${a("normalize")}([`),l.indent(n());const r=t.items.length;for(let o=0;o<r&&(Nl(l,t.items[o]),o!==r-1);o++)l.push(", ");l.deindent(n()),l.push("])")}function Ac(l,t){const{helper:a,needIndent:n}=l;if(t.cases.length>1){l.push(`${a("plural")}([`),l.indent(n());const r=t.cases.length;for(let o=0;o<r&&(Nl(l,t.cases[o]),o!==r-1);o++)l.push(", ");l.deindent(n()),l.push("])")}}function Mc(l,t){t.body?Nl(l,t.body):l.push("null")}function Nl(l,t){const{helper:a}=l;switch(t.type){case 0:Mc(l,t);break;case 1:Ac(l,t);break;case 2:Dc(l,t);break;case 6:Sc(l,t);break;case 8:l.push(JSON.stringify(t.value),t);break;case 7:l.push(JSON.stringify(t.value),t);break;case 5:l.push(`${a("interpolate")}(${a("list")}(${t.index}))`,t);break;case 4:l.push(`${a("interpolate")}(${a("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:l.push(JSON.stringify(t.value),t);break;case 3:l.push(JSON.stringify(t.value),t);break;default:if(process.env.NODE_ENV!=="production")throw Cl(ce.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:vc,args:[t.type]})}}const Tc=(l,t={})=>{const a=ee(t.mode)?t.mode:"normal",n=ee(t.filename)?t.filename:"message.intl",r=!!t.sourceMap,o=t.breakLineCode!=null?t.breakLineCode:a==="arrow"?";":`
217
+ `,s=t.needIndent?t.needIndent:a!=="arrow",i=l.helpers||[],c=Bc(l,{mode:a,filename:n,sourceMap:r,breakLineCode:o,needIndent:s});c.push(a==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(s),i.length>0&&(c.push(`const { ${rn(i.map(m=>`${m}: _${m}`),", ")} } = ctx`),c.newline()),c.push("return "),Nl(c,l),c.deindent(s),c.push("}"),delete l.helpers;const{code:u,map:d}=c.context();return{ast:l,code:u,map:d?d.toJSON():void 0}};function Lc(l,t={}){const a=Ge({},t),n=!!a.jit,r=!!a.minify,o=a.optimize==null?!0:a.optimize,i=_c(a).parse(l);return n?(o&&Vc(i),r&&Vl(i),{ast:i,code:""}):(Cc(i,a),Tc(i,a))}/*!
218
218
  * core-base v11.1.5
219
219
  * (c) 2025 kazuya kawaguchi
220
220
  * Released under the MIT License.
221
- */function Tc(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ol().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ol().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function kt(l){return Ee(l)&&cr(l)===0&&(Vt(l,"b")||Vt(l,"body"))}const Pn=["b","body"];function Lc(l){return Yt(l,Pn)}const Rn=["c","cases"];function $c(l){return Yt(l,Rn,[])}const Un=["s","static"];function Fc(l){return Yt(l,Un)}const jn=["i","items"];function Ic(l){return Yt(l,jn,[])}const zn=["t","type"];function cr(l){return Yt(l,zn)}const Hn=["v","value"];function ka(l,t){const a=Yt(l,Hn);if(a!=null)return a;throw Ol(t)}const qn=["m","modifier"];function Oc(l){return Yt(l,qn)}const Gn=["k","key"];function Pc(l){const t=Yt(l,Gn);if(t)return t;throw Ol(6)}function Yt(l,t,a){for(let r=0;r<t.length;r++){const n=t[r];if(Vt(l,n)&&l[n]!=null)return l[n]}return a}const Wn=[...Pn,...Rn,...Un,...jn,...Gn,...qn,...Hn,...zn];function Ol(l){return new Error(`unhandled node type: ${l}`)}function dr(l){return a=>Rc(a,l)}function Rc(l,t){const a=Lc(t);if(a==null)throw Ol(0);if(cr(a)===1){const o=$c(a);return l.plural(o.reduce((s,i)=>[...s,Kn(l,i)],[]))}else return Kn(l,a)}function Kn(l,t){const a=Fc(t);if(a!=null)return l.type==="text"?a:l.normalize([a]);{const r=Ic(t).reduce((n,o)=>[...n,ur(l,o)],[]);return l.normalize(r)}}function ur(l,t){const a=cr(t);switch(a){case 3:return ka(t,a);case 9:return ka(t,a);case 4:{const r=t;if(Vt(r,"k")&&r.k)return l.interpolate(l.named(r.k));if(Vt(r,"key")&&r.key)return l.interpolate(l.named(r.key));throw Ol(a)}case 5:{const r=t;if(Vt(r,"i")&&ze(r.i))return l.interpolate(l.list(r.i));if(Vt(r,"index")&&ze(r.index))return l.interpolate(l.list(r.index));throw Ol(a)}case 6:{const r=t,n=Oc(r),o=Pc(r);return l.linked(ur(l,o),n?ur(l,n):void 0,l.type)}case 7:return ka(t,a);case 8:return ka(t,a);default:throw new Error(`unhandled node on format message part: ${a}`)}}const Uc="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function jc(l,t){t&&cc(l)&&Wt(ha(Uc,{source:l}))}const zc=l=>l;let xa=Se();function Hc(l,t={}){let a=!1;const r=t.onError||sc;return t.onError=n=>{a=!0,r(n)},{...Mc(l,t),detectError:a}}function qc(l,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&J(l)){const a=Ce(t.warnHtmlMessage)?t.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&jc(l,a);const n=(t.onCacheKey||zc)(l),o=xa[n];if(o)return o;const{ast:s,detectError:i}=Hc(l,{...t,location:process.env.NODE_ENV!=="production",jit:!0}),c=dr(s);return i?c:xa[n]=c}else{if(process.env.NODE_ENV!=="production"&&!kt(l))return Wt(`the message that is resolve with key '${t.key}' is not supported for jit compilation`),()=>l;const a=l.cacheKey;if(a){const r=xa[a];return r||(xa[a]=dr(l))}else return dr(l)}}let Pl=null;function Gc(l){Pl=l}function Wc(l,t,a){Pl&&Pl.emit("i18n:init",{timestamp:Date.now(),i18n:l,version:t,meta:a})}const Kc=Yc("function:translate");function Yc(l){return t=>Pl&&Pl.emit(l,t)}const tt={INVALID_ARGUMENT:nc,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Xc=24;function Ut(l){return El(l,null,process.env.NODE_ENV!=="production"?{messages:Zc}:void 0)}const Zc={[tt.INVALID_ARGUMENT]:"Invalid arguments",[tt.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[tt.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[tt.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[tt.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[tt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[tt.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function mr(l,t){return t.locale!=null?Yn(t.locale):Yn(l.locale)}let pr;function Yn(l){if(J(l))return l;if(De(l)){if(l.resolvedOnce&&pr!=null)return pr;if(l.constructor.name==="Function"){const t=l();if(tc(t))throw Ut(tt.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return pr=t}else throw Ut(tt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Ut(tt.NOT_SUPPORT_LOCALE_TYPE)}function Qc(l,t,a){return[...new Set([a,...Pe(t)?t:Ee(t)?Object.keys(t):J(t)?[t]:[a]])]}function Xn(l,t,a){const r=J(a)?a:Rl,n=l;n.__localeChainCache||(n.__localeChainCache=new Map);let o=n.__localeChainCache.get(r);if(!o){o=[];let s=[a];for(;Pe(s);)s=Zn(o,s,t);const i=Pe(t)||!ke(t)?t:t.default?t.default:null;s=J(i)?[i]:i,Pe(s)&&Zn(o,s,!1),n.__localeChainCache.set(r,o)}return o}function Zn(l,t,a){let r=!0;for(let n=0;n<t.length&&Ce(r);n++){const o=t[n];J(o)&&(r=Jc(l,t[n],a))}return r}function Jc(l,t,a){let r;const n=t.split("-");do{const o=n.join("-");r=ed(l,o,a),n.splice(-1,1)}while(n.length&&r===!0);return r}function ed(l,t,a){let r=!1;if(!l.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";const n=t.replace(/!/g,"");l.push(n),(Pe(a)||ke(a))&&a[n]&&(r=a[n])}return r}const Xt=[];Xt[0]={w:[0],i:[3,0],"[":[4],o:[7]},Xt[1]={w:[1],".":[2],"[":[4],o:[7]},Xt[2]={w:[2],i:[3,0],0:[3,0]},Xt[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Xt[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Xt[5]={"'":[4,0],o:8,l:[5,0]},Xt[6]={'"':[4,0],o:8,l:[6,0]};const td=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function ld(l){return td.test(l)}function ad(l){const t=l.charCodeAt(0),a=l.charCodeAt(l.length-1);return t===a&&(t===34||t===39)?l.slice(1,-1):l}function rd(l){if(l==null)return"o";switch(l.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return l;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function nd(l){const t=l.trim();return l.charAt(0)==="0"&&isNaN(parseInt(l))?!1:ld(t)?ad(t):"*"+t}function od(l){const t=[];let a=-1,r=0,n=0,o,s,i,c,u,d,m;const f=[];f[0]=()=>{s===void 0?s=i:s+=i},f[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},f[2]=()=>{f[0](),n++},f[3]=()=>{if(n>0)n--,r=4,f[0]();else{if(n=0,s===void 0||(s=nd(s),s===!1))return!1;f[1]()}};function p(){const y=l[a+1];if(r===5&&y==="'"||r===6&&y==='"')return a++,i="\\"+y,f[0](),!0}for(;r!==null;)if(a++,o=l[a],!(o==="\\"&&p())){if(c=rd(o),m=Xt[r],u=m[c]||m.l||8,u===8||(r=u[0],u[1]!==void 0&&(d=f[u[1]],d&&(i=o,d()===!1))))return;if(r===7)return t}}const Qn=new Map;function sd(l,t){return Ee(l)?l[t]:null}function id(l,t){if(!Ee(l))return null;let a=Qn.get(t);if(a||(a=od(t),a&&Qn.set(t,a)),!a)return null;const r=a.length;let n=l,o=0;for(;o<r;){const s=a[o];if(Wn.includes(s)&&kt(n))return null;const i=n[s];if(i===void 0||De(n))return null;n=i,o++}return n}const it={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},cd=8,dd={[it.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[it.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[it.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[it.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[it.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[it.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[it.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function sl(l,...t){return ha(dd[l],...t)}const ud="11.1.5",wa=-1,Rl="en-US",_a="",Jn=l=>`${l.charAt(0).toLocaleUpperCase()}${l.substr(1)}`;function md(){return{upper:(l,t)=>t==="text"&&J(l)?l.toUpperCase():t==="vnode"&&Ee(l)&&"__v_isVNode"in l?l.children.toUpperCase():l,lower:(l,t)=>t==="text"&&J(l)?l.toLowerCase():t==="vnode"&&Ee(l)&&"__v_isVNode"in l?l.children.toLowerCase():l,capitalize:(l,t)=>t==="text"&&J(l)?Jn(l):t==="vnode"&&Ee(l)&&"__v_isVNode"in l?Jn(l.children):l}}let eo;function pd(l){eo=l}let to;function fd(l){to=l}let lo;function hd(l){lo=l}let ao=null;const gd=l=>{ao=l},bd=()=>ao;let ro=null;const no=l=>{ro=l},yd=()=>ro;let oo=0;function kd(l={}){const t=De(l.onWarn)?l.onWarn:Wt,a=J(l.version)?l.version:ud,r=J(l.locale)||De(l.locale)?l.locale:Rl,n=De(r)?Rl:r,o=Pe(l.fallbackLocale)||ke(l.fallbackLocale)||J(l.fallbackLocale)||l.fallbackLocale===!1?l.fallbackLocale:n,s=ke(l.messages)?l.messages:fr(n),i=ke(l.datetimeFormats)?l.datetimeFormats:fr(n),c=ke(l.numberFormats)?l.numberFormats:fr(n),u=Ge(Se(),l.modifiers,md()),d=l.pluralRules||Se(),m=De(l.missing)?l.missing:null,f=Ce(l.missingWarn)||_l(l.missingWarn)?l.missingWarn:!0,p=Ce(l.fallbackWarn)||_l(l.fallbackWarn)?l.fallbackWarn:!0,y=!!l.fallbackFormat,h=!!l.unresolving,g=De(l.postTranslation)?l.postTranslation:null,b=ke(l.processor)?l.processor:null,w=Ce(l.warnHtmlMessage)?l.warnHtmlMessage:!0,x=!!l.escapeParameter,k=De(l.messageCompiler)?l.messageCompiler:eo;process.env.NODE_ENV!=="production"&&De(l.messageCompiler)&&nr(sl(it.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const _=De(l.messageResolver)?l.messageResolver:to||sd,N=De(l.localeFallbacker)?l.localeFallbacker:lo||Qc,V=Ee(l.fallbackContext)?l.fallbackContext:void 0,P=l,$=Ee(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,M=Ee(P.__numberFormatters)?P.__numberFormatters:new Map,A=Ee(P.__meta)?P.__meta:{};oo++;const q={version:a,cid:oo,locale:r,fallbackLocale:o,messages:s,modifiers:u,pluralRules:d,missing:m,missingWarn:f,fallbackWarn:p,fallbackFormat:y,unresolving:h,postTranslation:g,processor:b,warnHtmlMessage:w,escapeParameter:x,messageCompiler:k,messageResolver:_,localeFallbacker:N,fallbackContext:V,onWarn:t,__meta:A};return q.datetimeFormats=i,q.numberFormats=c,q.__datetimeFormatters=$,q.__numberFormatters=M,process.env.NODE_ENV!=="production"&&(q.__v_emitter=P.__v_emitter!=null?P.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&Wc(q,a,A),q}const fr=l=>({[l]:Se()});function Ea(l,t){return l instanceof RegExp?l.test(t):l}function so(l,t){return l instanceof RegExp?l.test(t):l}function hr(l,t,a,r,n){const{missing:o,onWarn:s}=l;if(process.env.NODE_ENV!=="production"){const i=l.__v_emitter;i&&i.emit("missing",{locale:a,key:t,type:n,groupId:`${n}:${t}`})}if(o!==null){const i=o(l,a,t,n);return J(i)?i:t}else return process.env.NODE_ENV!=="production"&&so(r,t)&&s(sl(it.NOT_FOUND_KEY,{key:t,locale:a})),t}function Ul(l,t,a){const r=l;r.__localeChainCache=new Map,l.localeFallbacker(l,a,t)}function io(l,t){return l===t?!1:l.split("-")[0]===t.split("-")[0]}function xd(l,t){const a=t.indexOf(l);if(a===-1)return!1;for(let r=a+1;r<t.length;r++)if(io(l,t[r]))return!0;return!1}const co=typeof Intl<"u",uo={dateTimeFormat:co&&typeof Intl.DateTimeFormat<"u",numberFormat:co&&typeof Intl.NumberFormat<"u"};function mo(l,...t){const{datetimeFormats:a,unresolving:r,fallbackLocale:n,onWarn:o,localeFallbacker:s}=l,{__datetimeFormatters:i}=l;if(process.env.NODE_ENV!=="production"&&!uo.dateTimeFormat)return o(sl(it.CANNOT_FORMAT_DATE)),_a;const[c,u,d,m]=gr(...t),f=Ce(d.missingWarn)?d.missingWarn:l.missingWarn,p=Ce(d.fallbackWarn)?d.fallbackWarn:l.fallbackWarn,y=!!d.part,h=mr(l,d),g=s(l,n,h);if(!J(c)||c==="")return new Intl.DateTimeFormat(h,m).format(u);let b={},w,x=null,k=h,_=null;const N="datetime format";for(let $=0;$<g.length;$++){if(w=_=g[$],process.env.NODE_ENV!=="production"&&h!==w&&Ea(p,c)&&o(sl(it.FALLBACK_TO_DATE_FORMAT,{key:c,target:w})),process.env.NODE_ENV!=="production"&&h!==w){const M=l.__v_emitter;M&&M.emit("fallback",{type:N,key:c,from:k,to:_,groupId:`${N}:${c}`})}if(b=a[w]||{},x=b[c],ke(x))break;hr(l,c,w,f,N),k=_}if(!ke(x)||!J(w))return r?wa:c;let V=`${w}__${c}`;ga(m)||(V=`${V}__${JSON.stringify(m)}`);let P=i.get(V);return P||(P=new Intl.DateTimeFormat(w,Ge({},x,m)),i.set(V,P)),y?P.formatToParts(u):P.format(u)}const po=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function gr(...l){const[t,a,r,n]=l,o=Se();let s=Se(),i;if(J(t)){const c=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!c)throw Ut(tt.INVALID_ISO_DATE_ARGUMENT);const u=c[3]?c[3].trim().startsWith("T")?`${c[1].trim()}${c[3].trim()}`:`${c[1].trim()}T${c[3].trim()}`:c[1].trim();i=new Date(u);try{i.toISOString()}catch{throw Ut(tt.INVALID_ISO_DATE_ARGUMENT)}}else if(Qi(t)){if(isNaN(t.getTime()))throw Ut(tt.INVALID_DATE_ARGUMENT);i=t}else if(ze(t))i=t;else throw Ut(tt.INVALID_ARGUMENT);return J(a)?o.key=a:ke(a)&&Object.keys(a).forEach(c=>{po.includes(c)?s[c]=a[c]:o[c]=a[c]}),J(r)?o.locale=r:ke(r)&&(s=r),ke(n)&&(s=n),[o.key||"",i,o,s]}function fo(l,t,a){const r=l;for(const n in a){const o=`${t}__${n}`;r.__datetimeFormatters.has(o)&&r.__datetimeFormatters.delete(o)}}function ho(l,...t){const{numberFormats:a,unresolving:r,fallbackLocale:n,onWarn:o,localeFallbacker:s}=l,{__numberFormatters:i}=l;if(process.env.NODE_ENV!=="production"&&!uo.numberFormat)return o(sl(it.CANNOT_FORMAT_NUMBER)),_a;const[c,u,d,m]=br(...t),f=Ce(d.missingWarn)?d.missingWarn:l.missingWarn,p=Ce(d.fallbackWarn)?d.fallbackWarn:l.fallbackWarn,y=!!d.part,h=mr(l,d),g=s(l,n,h);if(!J(c)||c==="")return new Intl.NumberFormat(h,m).format(u);let b={},w,x=null,k=h,_=null;const N="number format";for(let $=0;$<g.length;$++){if(w=_=g[$],process.env.NODE_ENV!=="production"&&h!==w&&Ea(p,c)&&o(sl(it.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:w})),process.env.NODE_ENV!=="production"&&h!==w){const M=l.__v_emitter;M&&M.emit("fallback",{type:N,key:c,from:k,to:_,groupId:`${N}:${c}`})}if(b=a[w]||{},x=b[c],ke(x))break;hr(l,c,w,f,N),k=_}if(!ke(x)||!J(w))return r?wa:c;let V=`${w}__${c}`;ga(m)||(V=`${V}__${JSON.stringify(m)}`);let P=i.get(V);return P||(P=new Intl.NumberFormat(w,Ge({},x,m)),i.set(V,P)),y?P.formatToParts(u):P.format(u)}const go=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function br(...l){const[t,a,r,n]=l,o=Se();let s=Se();if(!ze(t))throw Ut(tt.INVALID_ARGUMENT);const i=t;return J(a)?o.key=a:ke(a)&&Object.keys(a).forEach(c=>{go.includes(c)?s[c]=a[c]:o[c]=a[c]}),J(r)?o.locale=r:ke(r)&&(s=r),ke(n)&&(s=n),[o.key||"",i,o,s]}function bo(l,t,a){const r=l;for(const n in a){const o=`${t}__${n}`;r.__numberFormatters.has(o)&&r.__numberFormatters.delete(o)}}const wd=l=>l,_d=l=>"",Ed="text",Cd=l=>l.length===0?"":rr(l),Vd=lc;function yo(l,t){return l=Math.abs(l),t===2?l?l>1?1:0:1:l?Math.min(l,2):0}function Nd(l){const t=ze(l.pluralIndex)?l.pluralIndex:-1;return l.named&&(ze(l.named.count)||ze(l.named.n))?ze(l.named.count)?l.named.count:ze(l.named.n)?l.named.n:t:t}function vd(l,t){t.count||(t.count=l),t.n||(t.n=l)}function Bd(l={}){const t=l.locale,a=Nd(l),r=Ee(l.pluralRules)&&J(t)&&De(l.pluralRules[t])?l.pluralRules[t]:yo,n=Ee(l.pluralRules)&&J(t)&&De(l.pluralRules[t])?yo:void 0,o=b=>b[r(a,b.length,n)],s=l.list||[],i=b=>s[b],c=l.named||Se();ze(l.pluralIndex)&&vd(a,c);const u=b=>c[b];function d(b,w){const x=De(l.messages)?l.messages(b,!!w):Ee(l.messages)?l.messages[b]:!1;return x||(l.parent?l.parent.message(b):_d)}const m=b=>l.modifiers?l.modifiers[b]:wd,f=ke(l.processor)&&De(l.processor.normalize)?l.processor.normalize:Cd,p=ke(l.processor)&&De(l.processor.interpolate)?l.processor.interpolate:Vd,y=ke(l.processor)&&J(l.processor.type)?l.processor.type:Ed,g={list:i,named:u,plural:o,linked:(b,...w)=>{const[x,k]=w;let _="text",N="";w.length===1?Ee(x)?(N=x.modifier||N,_=x.type||_):J(x)&&(N=x||N):w.length===2&&(J(x)&&(N=x||N),J(k)&&(_=k||_));const V=d(b,!0)(g),P=_==="vnode"&&Pe(V)&&N?V[0]:V;return N?m(N)(P,_):P},message:d,type:y,interpolate:p,normalize:f,values:Ge(Se(),s,c)};return g}const ko=()=>"",xt=l=>De(l);function xo(l,...t){const{fallbackFormat:a,postTranslation:r,unresolving:n,messageCompiler:o,fallbackLocale:s,messages:i}=l,[c,u]=yr(...t),d=Ce(u.missingWarn)?u.missingWarn:l.missingWarn,m=Ce(u.fallbackWarn)?u.fallbackWarn:l.fallbackWarn,f=Ce(u.escapeParameter)?u.escapeParameter:l.escapeParameter,p=!!u.resolvedMessage,y=J(u.default)||Ce(u.default)?Ce(u.default)?o?c:()=>c:u.default:a?o?c:()=>c:null,h=a||y!=null&&(J(y)||De(y)),g=mr(l,u);f&&Sd(u);let[b,w,x]=p?[c,g,i[g]||Se()]:wo(l,c,g,s,m,d),k=b,_=c;if(!p&&!(J(k)||kt(k)||xt(k))&&h&&(k=y,_=k),!p&&(!(J(k)||kt(k)||xt(k))||!J(w)))return n?wa:c;if(process.env.NODE_ENV!=="production"&&J(k)&&l.messageCompiler==null)return Wt(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${c}'.`),c;let N=!1;const V=()=>{N=!0},P=xt(k)?k:_o(l,c,w,k,_,V);if(N)return k;const $=Td(l,w,x,u),M=Bd($),A=Dd(l,P,M),q=r?r(A,c):A;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const Q={timestamp:Date.now(),key:J(c)?c:xt(k)?k.key:"",locale:w||(xt(k)?k.locale:""),format:J(k)?k:xt(k)?k.source:"",message:q};Q.meta=Ge({},l.__meta,bd()||{}),Kc(Q)}return q}function Sd(l){Pe(l.list)?l.list=l.list.map(t=>J(t)?Mn(t):t):Ee(l.named)&&Object.keys(l.named).forEach(t=>{J(l.named[t])&&(l.named[t]=Mn(l.named[t]))})}function wo(l,t,a,r,n,o){const{messages:s,onWarn:i,messageResolver:c,localeFallbacker:u}=l,d=u(l,r,a);let m=Se(),f,p=null,y=a,h=null;const g="translate";for(let b=0;b<d.length;b++){if(f=h=d[b],process.env.NODE_ENV!=="production"&&a!==f&&!io(a,f)&&Ea(n,t)&&i(sl(it.FALLBACK_TO_TRANSLATE,{key:t,target:f})),process.env.NODE_ENV!=="production"&&a!==f){const _=l.__v_emitter;_&&_.emit("fallback",{type:g,key:t,from:y,to:h,groupId:`${g}:${t}`})}m=s[f]||Se();let w=null,x,k;if(process.env.NODE_ENV!=="production"&&Ct&&(w=window.performance.now(),x="intlify-message-resolve-start",k="intlify-message-resolve-end",pt&&pt(x)),(p=c(m,t))===null&&(p=m[t]),process.env.NODE_ENV!=="production"&&Ct){const _=window.performance.now(),N=l.__v_emitter;N&&w&&p&&N.emit("message-resolve",{type:"message-resolve",key:t,message:p,time:_-w,groupId:`${g}:${t}`}),x&&k&&pt&&nl&&(pt(k),nl("intlify message resolve",x,k))}if(J(p)||kt(p)||xt(p))break;if(!xd(f,d)){const _=hr(l,t,f,o,g);_!==t&&(p=_)}y=h}return[p,f,m]}function _o(l,t,a,r,n,o){const{messageCompiler:s,warnHtmlMessage:i}=l;if(xt(r)){const f=r;return f.locale=f.locale||a,f.key=f.key||t,f}if(s==null){const f=()=>r;return f.locale=a,f.key=t,f}let c=null,u,d;process.env.NODE_ENV!=="production"&&Ct&&(c=window.performance.now(),u="intlify-message-compilation-start",d="intlify-message-compilation-end",pt&&pt(u));const m=s(r,Ad(l,a,n,r,i,o));if(process.env.NODE_ENV!=="production"&&Ct){const f=window.performance.now(),p=l.__v_emitter;p&&c&&p.emit("message-compilation",{type:"message-compilation",message:r,time:f-c,groupId:`translate:${t}`}),u&&d&&pt&&nl&&(pt(d),nl("intlify message compilation",u,d))}return m.locale=a,m.key=t,m.source=r,m}function Dd(l,t,a){let r=null,n,o;process.env.NODE_ENV!=="production"&&Ct&&(r=window.performance.now(),n="intlify-message-evaluation-start",o="intlify-message-evaluation-end",pt&&pt(n));const s=t(a);if(process.env.NODE_ENV!=="production"&&Ct){const i=window.performance.now(),c=l.__v_emitter;c&&r&&c.emit("message-evaluation",{type:"message-evaluation",value:s,time:i-r,groupId:`translate:${t.key}`}),n&&o&&pt&&nl&&(pt(o),nl("intlify message evaluation",n,o))}return s}function yr(...l){const[t,a,r]=l,n=Se();if(!J(t)&&!ze(t)&&!xt(t)&&!kt(t))throw Ut(tt.INVALID_ARGUMENT);const o=ze(t)?String(t):(xt(t),t);return ze(a)?n.plural=a:J(a)?n.default=a:ke(a)&&!ga(a)?n.named=a:Pe(a)&&(n.list=a),ze(r)?n.plural=r:J(r)?n.default=r:ke(r)&&Ge(n,r),[o,n]}function Ad(l,t,a,r,n,o){return{locale:t,key:a,warnHtmlMessage:n,onError:s=>{if(o&&o(s),process.env.NODE_ENV!=="production"){const i=Md(r),c=`Message compilation error: ${s.message}`,u=s.location&&i&&ac(i,s.location.start.offset,s.location.end.offset),d=l.__v_emitter;d&&i&&d.emit("compile-error",{message:i,error:s.message,start:s.location&&s.location.start.offset,end:s.location&&s.location.end.offset,groupId:`translate:${a}`}),console.error(u?`${c}
222
- ${u}`:c)}else throw s},onCacheKey:s=>Xi(t,a,s)}}function Md(l){if(J(l))return l;if(l.loc&&l.loc.source)return l.loc.source}function Td(l,t,a,r){const{modifiers:n,pluralRules:o,messageResolver:s,fallbackLocale:i,fallbackWarn:c,missingWarn:u,fallbackContext:d}=l,f={locale:t,modifiers:n,pluralRules:o,messages:(p,y)=>{let h=s(a,p);if(h==null&&(d||y)){const[,,g]=wo(d||l,p,t,i,c,u);h=s(g,p)}if(J(h)||kt(h)){let g=!1;const w=_o(l,p,t,h,p,()=>{g=!0});return g?ko:w}else return xt(h)?h:ko}};return l.processor&&(f.processor=l.processor),r.list&&(f.list=r.list),r.named&&(f.named=r.named),ze(r.plural)&&(f.pluralIndex=r.plural),f}Tc();function Ld(){return Eo().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Eo(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const $d=typeof Proxy=="function",Fd="devtools-plugin:setup",Id="plugin:settings:set";let Nl,kr;function Od(){var l;return Nl!==void 0||(typeof window<"u"&&window.performance?(Nl=!0,kr=window.performance):typeof globalThis<"u"&&(!((l=globalThis.perf_hooks)===null||l===void 0)&&l.performance)?(Nl=!0,kr=globalThis.perf_hooks.performance):Nl=!1),Nl}function Pd(){return Od()?kr.now():Date.now()}class Rd{constructor(t,a){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=a;const r={};if(t.settings)for(const s in t.settings){const i=t.settings[s];r[s]=i.defaultValue}const n=`__vue-devtools-plugin-settings__${t.id}`;let o=Object.assign({},r);try{const s=localStorage.getItem(n),i=JSON.parse(s);Object.assign(o,i)}catch{}this.fallbacks={getSettings(){return o},setSettings(s){try{localStorage.setItem(n,JSON.stringify(s))}catch{}o=s},now(){return Pd()}},a&&a.on(Id,(s,i)=>{s===this.plugin.id&&this.fallbacks.setSettings(i)}),this.proxiedOn=new Proxy({},{get:(s,i)=>this.target?this.target.on[i]:(...c)=>{this.onQueue.push({method:i,args:c})}}),this.proxiedTarget=new Proxy({},{get:(s,i)=>this.target?this.target[i]:i==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(i)?(...c)=>(this.targetQueue.push({method:i,args:c,resolve:()=>{}}),this.fallbacks[i](...c)):(...c)=>new Promise(u=>{this.targetQueue.push({method:i,args:c,resolve:u})})})}async setRealTarget(t){this.target=t;for(const a of this.onQueue)this.target.on[a.method](...a.args);for(const a of this.targetQueue)a.resolve(await this.target[a.method](...a.args))}}function Ud(l,t){const a=l,r=Eo(),n=Ld(),o=$d&&a.enableEarlyProxy;if(n&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!o))n.emit(Fd,l,t);else{const s=o?new Rd(a,n):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:a,setupFn:t,proxy:s}),s&&t(s.proxiedTarget)}}/*!
221
+ */function $c(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(cl().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(cl().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function kt(l){return Ee(l)&&un(l)===0&&(Vt(l,"b")||Vt(l,"body"))}const Rr=["b","body"];function Fc(l){return Zt(l,Rr)}const jr=["c","cases"];function Ic(l){return Zt(l,jr,[])}const Ur=["s","static"];function Oc(l){return Zt(l,Ur)}const zr=["i","items"];function Pc(l){return Zt(l,zr,[])}const Hr=["t","type"];function un(l){return Zt(l,Hr)}const qr=["v","value"];function ka(l,t){const a=Zt(l,qr);if(a!=null)return a;throw Ol(t)}const Gr=["m","modifier"];function Rc(l){return Zt(l,Gr)}const Wr=["k","key"];function jc(l){const t=Zt(l,Wr);if(t)return t;throw Ol(6)}function Zt(l,t,a){for(let n=0;n<t.length;n++){const r=t[n];if(Vt(l,r)&&l[r]!=null)return l[r]}return a}const Kr=[...Rr,...jr,...Ur,...zr,...Wr,...Gr,...qr,...Hr];function Ol(l){return new Error(`unhandled node type: ${l}`)}function mn(l){return a=>Uc(a,l)}function Uc(l,t){const a=Fc(t);if(a==null)throw Ol(0);if(un(a)===1){const o=Ic(a);return l.plural(o.reduce((s,i)=>[...s,Yr(l,i)],[]))}else return Yr(l,a)}function Yr(l,t){const a=Oc(t);if(a!=null)return l.type==="text"?a:l.normalize([a]);{const n=Pc(t).reduce((r,o)=>[...r,pn(l,o)],[]);return l.normalize(n)}}function pn(l,t){const a=un(t);switch(a){case 3:return ka(t,a);case 9:return ka(t,a);case 4:{const n=t;if(Vt(n,"k")&&n.k)return l.interpolate(l.named(n.k));if(Vt(n,"key")&&n.key)return l.interpolate(l.named(n.key));throw Ol(a)}case 5:{const n=t;if(Vt(n,"i")&&ze(n.i))return l.interpolate(l.list(n.i));if(Vt(n,"index")&&ze(n.index))return l.interpolate(l.list(n.index));throw Ol(a)}case 6:{const n=t,r=Rc(n),o=jc(n);return l.linked(pn(l,o),r?pn(l,r):void 0,l.type)}case 7:return ka(t,a);case 8:return ka(t,a);default:throw new Error(`unhandled node on format message part: ${a}`)}}const zc="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function Hc(l,t){t&&uc(l)&&Yt(ha(zc,{source:l}))}const qc=l=>l;let xa=Se();function Gc(l,t={}){let a=!1;const n=t.onError||cc;return t.onError=r=>{a=!0,n(r)},{...Lc(l,t),detectError:a}}function Wc(l,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ee(l)){const a=Ce(t.warnHtmlMessage)?t.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&Hc(l,a);const r=(t.onCacheKey||qc)(l),o=xa[r];if(o)return o;const{ast:s,detectError:i}=Gc(l,{...t,location:process.env.NODE_ENV!=="production",jit:!0}),c=mn(s);return i?c:xa[r]=c}else{if(process.env.NODE_ENV!=="production"&&!kt(l))return Yt(`the message that is resolve with key '${t.key}' is not supported for jit compilation`),()=>l;const a=l.cacheKey;if(a){const n=xa[a];return n||(xa[a]=mn(l))}else return mn(l)}}let Pl=null;function Kc(l){Pl=l}function Yc(l,t,a){Pl&&Pl.emit("i18n:init",{timestamp:Date.now(),i18n:l,version:t,meta:a})}const Xc=Zc("function:translate");function Zc(l){return t=>Pl&&Pl.emit(l,t)}const tt={INVALID_ARGUMENT:sc,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Qc=24;function jt(l){return Cl(l,null,process.env.NODE_ENV!=="production"?{messages:Jc}:void 0)}const Jc={[tt.INVALID_ARGUMENT]:"Invalid arguments",[tt.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[tt.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[tt.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[tt.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[tt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[tt.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function fn(l,t){return t.locale!=null?Xr(t.locale):Xr(l.locale)}let hn;function Xr(l){if(ee(l))return l;if(De(l)){if(l.resolvedOnce&&hn!=null)return hn;if(l.constructor.name==="Function"){const t=l();if(ac(t))throw jt(tt.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return hn=t}else throw jt(tt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw jt(tt.NOT_SUPPORT_LOCALE_TYPE)}function ed(l,t,a){return[...new Set([a,...Pe(t)?t:Ee(t)?Object.keys(t):ee(t)?[t]:[a]])]}function Zr(l,t,a){const n=ee(a)?a:Rl,r=l;r.__localeChainCache||(r.__localeChainCache=new Map);let o=r.__localeChainCache.get(n);if(!o){o=[];let s=[a];for(;Pe(s);)s=Qr(o,s,t);const i=Pe(t)||!ke(t)?t:t.default?t.default:null;s=ee(i)?[i]:i,Pe(s)&&Qr(o,s,!1),r.__localeChainCache.set(n,o)}return o}function Qr(l,t,a){let n=!0;for(let r=0;r<t.length&&Ce(n);r++){const o=t[r];ee(o)&&(n=td(l,t[r],a))}return n}function td(l,t,a){let n;const r=t.split("-");do{const o=r.join("-");n=ld(l,o,a),r.splice(-1,1)}while(r.length&&n===!0);return n}function ld(l,t,a){let n=!1;if(!l.includes(t)&&(n=!0,t)){n=t[t.length-1]!=="!";const r=t.replace(/!/g,"");l.push(r),(Pe(a)||ke(a))&&a[r]&&(n=a[r])}return n}const Qt=[];Qt[0]={w:[0],i:[3,0],"[":[4],o:[7]},Qt[1]={w:[1],".":[2],"[":[4],o:[7]},Qt[2]={w:[2],i:[3,0],0:[3,0]},Qt[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Qt[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Qt[5]={"'":[4,0],o:8,l:[5,0]},Qt[6]={'"':[4,0],o:8,l:[6,0]};const ad=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function nd(l){return ad.test(l)}function rd(l){const t=l.charCodeAt(0),a=l.charCodeAt(l.length-1);return t===a&&(t===34||t===39)?l.slice(1,-1):l}function od(l){if(l==null)return"o";switch(l.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return l;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function sd(l){const t=l.trim();return l.charAt(0)==="0"&&isNaN(parseInt(l))?!1:nd(t)?rd(t):"*"+t}function id(l){const t=[];let a=-1,n=0,r=0,o,s,i,c,u,d,m;const h=[];h[0]=()=>{s===void 0?s=i:s+=i},h[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},h[2]=()=>{h[0](),r++},h[3]=()=>{if(r>0)r--,n=4,h[0]();else{if(r=0,s===void 0||(s=sd(s),s===!1))return!1;h[1]()}};function f(){const y=l[a+1];if(n===5&&y==="'"||n===6&&y==='"')return a++,i="\\"+y,h[0](),!0}for(;n!==null;)if(a++,o=l[a],!(o==="\\"&&f())){if(c=od(o),m=Qt[n],u=m[c]||m.l||8,u===8||(n=u[0],u[1]!==void 0&&(d=h[u[1]],d&&(i=o,d()===!1))))return;if(n===7)return t}}const Jr=new Map;function cd(l,t){return Ee(l)?l[t]:null}function dd(l,t){if(!Ee(l))return null;let a=Jr.get(t);if(a||(a=id(t),a&&Jr.set(t,a)),!a)return null;const n=a.length;let r=l,o=0;for(;o<n;){const s=a[o];if(Kr.includes(s)&&kt(r))return null;const i=r[s];if(i===void 0||De(r))return null;r=i,o++}return r}const it={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},ud=8,md={[it.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[it.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[it.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[it.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[it.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[it.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[it.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function dl(l,...t){return ha(md[l],...t)}const pd="11.1.5",wa=-1,Rl="en-US",_a="",eo=l=>`${l.charAt(0).toLocaleUpperCase()}${l.substr(1)}`;function fd(){return{upper:(l,t)=>t==="text"&&ee(l)?l.toUpperCase():t==="vnode"&&Ee(l)&&"__v_isVNode"in l?l.children.toUpperCase():l,lower:(l,t)=>t==="text"&&ee(l)?l.toLowerCase():t==="vnode"&&Ee(l)&&"__v_isVNode"in l?l.children.toLowerCase():l,capitalize:(l,t)=>t==="text"&&ee(l)?eo(l):t==="vnode"&&Ee(l)&&"__v_isVNode"in l?eo(l.children):l}}let to;function hd(l){to=l}let lo;function gd(l){lo=l}let ao;function yd(l){ao=l}let no=null;const bd=l=>{no=l},kd=()=>no;let ro=null;const oo=l=>{ro=l},xd=()=>ro;let so=0;function wd(l={}){const t=De(l.onWarn)?l.onWarn:Yt,a=ee(l.version)?l.version:pd,n=ee(l.locale)||De(l.locale)?l.locale:Rl,r=De(n)?Rl:n,o=Pe(l.fallbackLocale)||ke(l.fallbackLocale)||ee(l.fallbackLocale)||l.fallbackLocale===!1?l.fallbackLocale:r,s=ke(l.messages)?l.messages:gn(r),i=ke(l.datetimeFormats)?l.datetimeFormats:gn(r),c=ke(l.numberFormats)?l.numberFormats:gn(r),u=Ge(Se(),l.modifiers,fd()),d=l.pluralRules||Se(),m=De(l.missing)?l.missing:null,h=Ce(l.missingWarn)||El(l.missingWarn)?l.missingWarn:!0,f=Ce(l.fallbackWarn)||El(l.fallbackWarn)?l.fallbackWarn:!0,y=!!l.fallbackFormat,k=!!l.unresolving,g=De(l.postTranslation)?l.postTranslation:null,p=ke(l.processor)?l.processor:null,x=Ce(l.warnHtmlMessage)?l.warnHtmlMessage:!0,w=!!l.escapeParameter,b=De(l.messageCompiler)?l.messageCompiler:to;process.env.NODE_ENV!=="production"&&De(l.messageCompiler)&&on(dl(it.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const _=De(l.messageResolver)?l.messageResolver:lo||cd,V=De(l.localeFallbacker)?l.localeFallbacker:ao||ed,E=Ee(l.fallbackContext)?l.fallbackContext:void 0,M=l,D=Ee(M.__datetimeFormatters)?M.__datetimeFormatters:new Map,A=Ee(M.__numberFormatters)?M.__numberFormatters:new Map,$=Ee(M.__meta)?M.__meta:{};so++;const U={version:a,cid:so,locale:n,fallbackLocale:o,messages:s,modifiers:u,pluralRules:d,missing:m,missingWarn:h,fallbackWarn:f,fallbackFormat:y,unresolving:k,postTranslation:g,processor:p,warnHtmlMessage:x,escapeParameter:w,messageCompiler:b,messageResolver:_,localeFallbacker:V,fallbackContext:E,onWarn:t,__meta:$};return U.datetimeFormats=i,U.numberFormats=c,U.__datetimeFormatters=D,U.__numberFormatters=A,process.env.NODE_ENV!=="production"&&(U.__v_emitter=M.__v_emitter!=null?M.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&Yc(U,a,$),U}const gn=l=>({[l]:Se()});function Ea(l,t){return l instanceof RegExp?l.test(t):l}function io(l,t){return l instanceof RegExp?l.test(t):l}function yn(l,t,a,n,r){const{missing:o,onWarn:s}=l;if(process.env.NODE_ENV!=="production"){const i=l.__v_emitter;i&&i.emit("missing",{locale:a,key:t,type:r,groupId:`${r}:${t}`})}if(o!==null){const i=o(l,a,t,r);return ee(i)?i:t}else return process.env.NODE_ENV!=="production"&&io(n,t)&&s(dl(it.NOT_FOUND_KEY,{key:t,locale:a})),t}function jl(l,t,a){const n=l;n.__localeChainCache=new Map,l.localeFallbacker(l,a,t)}function co(l,t){return l===t?!1:l.split("-")[0]===t.split("-")[0]}function _d(l,t){const a=t.indexOf(l);if(a===-1)return!1;for(let n=a+1;n<t.length;n++)if(co(l,t[n]))return!0;return!1}const uo=typeof Intl<"u",mo={dateTimeFormat:uo&&typeof Intl.DateTimeFormat<"u",numberFormat:uo&&typeof Intl.NumberFormat<"u"};function po(l,...t){const{datetimeFormats:a,unresolving:n,fallbackLocale:r,onWarn:o,localeFallbacker:s}=l,{__datetimeFormatters:i}=l;if(process.env.NODE_ENV!=="production"&&!mo.dateTimeFormat)return o(dl(it.CANNOT_FORMAT_DATE)),_a;const[c,u,d,m]=bn(...t),h=Ce(d.missingWarn)?d.missingWarn:l.missingWarn,f=Ce(d.fallbackWarn)?d.fallbackWarn:l.fallbackWarn,y=!!d.part,k=fn(l,d),g=s(l,r,k);if(!ee(c)||c==="")return new Intl.DateTimeFormat(k,m).format(u);let p={},x,w=null,b=k,_=null;const V="datetime format";for(let D=0;D<g.length;D++){if(x=_=g[D],process.env.NODE_ENV!=="production"&&k!==x&&Ea(f,c)&&o(dl(it.FALLBACK_TO_DATE_FORMAT,{key:c,target:x})),process.env.NODE_ENV!=="production"&&k!==x){const A=l.__v_emitter;A&&A.emit("fallback",{type:V,key:c,from:b,to:_,groupId:`${V}:${c}`})}if(p=a[x]||{},w=p[c],ke(w))break;yn(l,c,x,h,V),b=_}if(!ke(w)||!ee(x))return n?wa:c;let E=`${x}__${c}`;ga(m)||(E=`${E}__${JSON.stringify(m)}`);let M=i.get(E);return M||(M=new Intl.DateTimeFormat(x,Ge({},w,m)),i.set(E,M)),y?M.formatToParts(u):M.format(u)}const fo=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function bn(...l){const[t,a,n,r]=l,o=Se();let s=Se(),i;if(ee(t)){const c=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!c)throw jt(tt.INVALID_ISO_DATE_ARGUMENT);const u=c[3]?c[3].trim().startsWith("T")?`${c[1].trim()}${c[3].trim()}`:`${c[1].trim()}T${c[3].trim()}`:c[1].trim();i=new Date(u);try{i.toISOString()}catch{throw jt(tt.INVALID_ISO_DATE_ARGUMENT)}}else if(ec(t)){if(isNaN(t.getTime()))throw jt(tt.INVALID_DATE_ARGUMENT);i=t}else if(ze(t))i=t;else throw jt(tt.INVALID_ARGUMENT);return ee(a)?o.key=a:ke(a)&&Object.keys(a).forEach(c=>{fo.includes(c)?s[c]=a[c]:o[c]=a[c]}),ee(n)?o.locale=n:ke(n)&&(s=n),ke(r)&&(s=r),[o.key||"",i,o,s]}function ho(l,t,a){const n=l;for(const r in a){const o=`${t}__${r}`;n.__datetimeFormatters.has(o)&&n.__datetimeFormatters.delete(o)}}function go(l,...t){const{numberFormats:a,unresolving:n,fallbackLocale:r,onWarn:o,localeFallbacker:s}=l,{__numberFormatters:i}=l;if(process.env.NODE_ENV!=="production"&&!mo.numberFormat)return o(dl(it.CANNOT_FORMAT_NUMBER)),_a;const[c,u,d,m]=kn(...t),h=Ce(d.missingWarn)?d.missingWarn:l.missingWarn,f=Ce(d.fallbackWarn)?d.fallbackWarn:l.fallbackWarn,y=!!d.part,k=fn(l,d),g=s(l,r,k);if(!ee(c)||c==="")return new Intl.NumberFormat(k,m).format(u);let p={},x,w=null,b=k,_=null;const V="number format";for(let D=0;D<g.length;D++){if(x=_=g[D],process.env.NODE_ENV!=="production"&&k!==x&&Ea(f,c)&&o(dl(it.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:x})),process.env.NODE_ENV!=="production"&&k!==x){const A=l.__v_emitter;A&&A.emit("fallback",{type:V,key:c,from:b,to:_,groupId:`${V}:${c}`})}if(p=a[x]||{},w=p[c],ke(w))break;yn(l,c,x,h,V),b=_}if(!ke(w)||!ee(x))return n?wa:c;let E=`${x}__${c}`;ga(m)||(E=`${E}__${JSON.stringify(m)}`);let M=i.get(E);return M||(M=new Intl.NumberFormat(x,Ge({},w,m)),i.set(E,M)),y?M.formatToParts(u):M.format(u)}const yo=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function kn(...l){const[t,a,n,r]=l,o=Se();let s=Se();if(!ze(t))throw jt(tt.INVALID_ARGUMENT);const i=t;return ee(a)?o.key=a:ke(a)&&Object.keys(a).forEach(c=>{yo.includes(c)?s[c]=a[c]:o[c]=a[c]}),ee(n)?o.locale=n:ke(n)&&(s=n),ke(r)&&(s=r),[o.key||"",i,o,s]}function bo(l,t,a){const n=l;for(const r in a){const o=`${t}__${r}`;n.__numberFormatters.has(o)&&n.__numberFormatters.delete(o)}}const Ed=l=>l,Cd=l=>"",Vd="text",Nd=l=>l.length===0?"":rn(l),vd=nc;function ko(l,t){return l=Math.abs(l),t===2?l?l>1?1:0:1:l?Math.min(l,2):0}function Bd(l){const t=ze(l.pluralIndex)?l.pluralIndex:-1;return l.named&&(ze(l.named.count)||ze(l.named.n))?ze(l.named.count)?l.named.count:ze(l.named.n)?l.named.n:t:t}function Sd(l,t){t.count||(t.count=l),t.n||(t.n=l)}function Dd(l={}){const t=l.locale,a=Bd(l),n=Ee(l.pluralRules)&&ee(t)&&De(l.pluralRules[t])?l.pluralRules[t]:ko,r=Ee(l.pluralRules)&&ee(t)&&De(l.pluralRules[t])?ko:void 0,o=p=>p[n(a,p.length,r)],s=l.list||[],i=p=>s[p],c=l.named||Se();ze(l.pluralIndex)&&Sd(a,c);const u=p=>c[p];function d(p,x){const w=De(l.messages)?l.messages(p,!!x):Ee(l.messages)?l.messages[p]:!1;return w||(l.parent?l.parent.message(p):Cd)}const m=p=>l.modifiers?l.modifiers[p]:Ed,h=ke(l.processor)&&De(l.processor.normalize)?l.processor.normalize:Nd,f=ke(l.processor)&&De(l.processor.interpolate)?l.processor.interpolate:vd,y=ke(l.processor)&&ee(l.processor.type)?l.processor.type:Vd,g={list:i,named:u,plural:o,linked:(p,...x)=>{const[w,b]=x;let _="text",V="";x.length===1?Ee(w)?(V=w.modifier||V,_=w.type||_):ee(w)&&(V=w||V):x.length===2&&(ee(w)&&(V=w||V),ee(b)&&(_=b||_));const E=d(p,!0)(g),M=_==="vnode"&&Pe(E)&&V?E[0]:E;return V?m(V)(M,_):M},message:d,type:y,interpolate:f,normalize:h,values:Ge(Se(),s,c)};return g}const xo=()=>"",xt=l=>De(l);function wo(l,...t){const{fallbackFormat:a,postTranslation:n,unresolving:r,messageCompiler:o,fallbackLocale:s,messages:i}=l,[c,u]=xn(...t),d=Ce(u.missingWarn)?u.missingWarn:l.missingWarn,m=Ce(u.fallbackWarn)?u.fallbackWarn:l.fallbackWarn,h=Ce(u.escapeParameter)?u.escapeParameter:l.escapeParameter,f=!!u.resolvedMessage,y=ee(u.default)||Ce(u.default)?Ce(u.default)?o?c:()=>c:u.default:a?o?c:()=>c:null,k=a||y!=null&&(ee(y)||De(y)),g=fn(l,u);h&&Ad(u);let[p,x,w]=f?[c,g,i[g]||Se()]:_o(l,c,g,s,m,d),b=p,_=c;if(!f&&!(ee(b)||kt(b)||xt(b))&&k&&(b=y,_=b),!f&&(!(ee(b)||kt(b)||xt(b))||!ee(x)))return r?wa:c;if(process.env.NODE_ENV!=="production"&&ee(b)&&l.messageCompiler==null)return Yt(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${c}'.`),c;let V=!1;const E=()=>{V=!0},M=xt(b)?b:Eo(l,c,x,b,_,E);if(V)return b;const D=$d(l,x,w,u),A=Dd(D),$=Md(l,M,A),U=n?n($,c):$;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const W={timestamp:Date.now(),key:ee(c)?c:xt(b)?b.key:"",locale:x||(xt(b)?b.locale:""),format:ee(b)?b:xt(b)?b.source:"",message:U};W.meta=Ge({},l.__meta,kd()||{}),Xc(W)}return U}function Ad(l){Pe(l.list)?l.list=l.list.map(t=>ee(t)?Tr(t):t):Ee(l.named)&&Object.keys(l.named).forEach(t=>{ee(l.named[t])&&(l.named[t]=Tr(l.named[t]))})}function _o(l,t,a,n,r,o){const{messages:s,onWarn:i,messageResolver:c,localeFallbacker:u}=l,d=u(l,n,a);let m=Se(),h,f=null,y=a,k=null;const g="translate";for(let p=0;p<d.length;p++){if(h=k=d[p],process.env.NODE_ENV!=="production"&&a!==h&&!co(a,h)&&Ea(r,t)&&i(dl(it.FALLBACK_TO_TRANSLATE,{key:t,target:h})),process.env.NODE_ENV!=="production"&&a!==h){const _=l.__v_emitter;_&&_.emit("fallback",{type:g,key:t,from:y,to:k,groupId:`${g}:${t}`})}m=s[h]||Se();let x=null,w,b;if(process.env.NODE_ENV!=="production"&&Ct&&(x=window.performance.now(),w="intlify-message-resolve-start",b="intlify-message-resolve-end",pt&&pt(w)),(f=c(m,t))===null&&(f=m[t]),process.env.NODE_ENV!=="production"&&Ct){const _=window.performance.now(),V=l.__v_emitter;V&&x&&f&&V.emit("message-resolve",{type:"message-resolve",key:t,message:f,time:_-x,groupId:`${g}:${t}`}),w&&b&&pt&&il&&(pt(b),il("intlify message resolve",w,b))}if(ee(f)||kt(f)||xt(f))break;if(!_d(h,d)){const _=yn(l,t,h,o,g);_!==t&&(f=_)}y=k}return[f,h,m]}function Eo(l,t,a,n,r,o){const{messageCompiler:s,warnHtmlMessage:i}=l;if(xt(n)){const h=n;return h.locale=h.locale||a,h.key=h.key||t,h}if(s==null){const h=()=>n;return h.locale=a,h.key=t,h}let c=null,u,d;process.env.NODE_ENV!=="production"&&Ct&&(c=window.performance.now(),u="intlify-message-compilation-start",d="intlify-message-compilation-end",pt&&pt(u));const m=s(n,Td(l,a,r,n,i,o));if(process.env.NODE_ENV!=="production"&&Ct){const h=window.performance.now(),f=l.__v_emitter;f&&c&&f.emit("message-compilation",{type:"message-compilation",message:n,time:h-c,groupId:`translate:${t}`}),u&&d&&pt&&il&&(pt(d),il("intlify message compilation",u,d))}return m.locale=a,m.key=t,m.source=n,m}function Md(l,t,a){let n=null,r,o;process.env.NODE_ENV!=="production"&&Ct&&(n=window.performance.now(),r="intlify-message-evaluation-start",o="intlify-message-evaluation-end",pt&&pt(r));const s=t(a);if(process.env.NODE_ENV!=="production"&&Ct){const i=window.performance.now(),c=l.__v_emitter;c&&n&&c.emit("message-evaluation",{type:"message-evaluation",value:s,time:i-n,groupId:`translate:${t.key}`}),r&&o&&pt&&il&&(pt(o),il("intlify message evaluation",r,o))}return s}function xn(...l){const[t,a,n]=l,r=Se();if(!ee(t)&&!ze(t)&&!xt(t)&&!kt(t))throw jt(tt.INVALID_ARGUMENT);const o=ze(t)?String(t):(xt(t),t);return ze(a)?r.plural=a:ee(a)?r.default=a:ke(a)&&!ga(a)?r.named=a:Pe(a)&&(r.list=a),ze(n)?r.plural=n:ee(n)?r.default=n:ke(n)&&Ge(r,n),[o,r]}function Td(l,t,a,n,r,o){return{locale:t,key:a,warnHtmlMessage:r,onError:s=>{if(o&&o(s),process.env.NODE_ENV!=="production"){const i=Ld(n),c=`Message compilation error: ${s.message}`,u=s.location&&i&&rc(i,s.location.start.offset,s.location.end.offset),d=l.__v_emitter;d&&i&&d.emit("compile-error",{message:i,error:s.message,start:s.location&&s.location.start.offset,end:s.location&&s.location.end.offset,groupId:`translate:${a}`}),console.error(u?`${c}
222
+ ${u}`:c)}else throw s},onCacheKey:s=>Qi(t,a,s)}}function Ld(l){if(ee(l))return l;if(l.loc&&l.loc.source)return l.loc.source}function $d(l,t,a,n){const{modifiers:r,pluralRules:o,messageResolver:s,fallbackLocale:i,fallbackWarn:c,missingWarn:u,fallbackContext:d}=l,h={locale:t,modifiers:r,pluralRules:o,messages:(f,y)=>{let k=s(a,f);if(k==null&&(d||y)){const[,,g]=_o(d||l,f,t,i,c,u);k=s(g,f)}if(ee(k)||kt(k)){let g=!1;const x=Eo(l,f,t,k,f,()=>{g=!0});return g?xo:x}else return xt(k)?k:xo}};return l.processor&&(h.processor=l.processor),n.list&&(h.list=n.list),n.named&&(h.named=n.named),ze(n.plural)&&(h.pluralIndex=n.plural),h}$c();function Fd(){return Co().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Co(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Id=typeof Proxy=="function",Od="devtools-plugin:setup",Pd="plugin:settings:set";let vl,wn;function Rd(){var l;return vl!==void 0||(typeof window<"u"&&window.performance?(vl=!0,wn=window.performance):typeof globalThis<"u"&&(!((l=globalThis.perf_hooks)===null||l===void 0)&&l.performance)?(vl=!0,wn=globalThis.perf_hooks.performance):vl=!1),vl}function jd(){return Rd()?wn.now():Date.now()}class Ud{constructor(t,a){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=a;const n={};if(t.settings)for(const s in t.settings){const i=t.settings[s];n[s]=i.defaultValue}const r=`__vue-devtools-plugin-settings__${t.id}`;let o=Object.assign({},n);try{const s=localStorage.getItem(r),i=JSON.parse(s);Object.assign(o,i)}catch{}this.fallbacks={getSettings(){return o},setSettings(s){try{localStorage.setItem(r,JSON.stringify(s))}catch{}o=s},now(){return jd()}},a&&a.on(Pd,(s,i)=>{s===this.plugin.id&&this.fallbacks.setSettings(i)}),this.proxiedOn=new Proxy({},{get:(s,i)=>this.target?this.target.on[i]:(...c)=>{this.onQueue.push({method:i,args:c})}}),this.proxiedTarget=new Proxy({},{get:(s,i)=>this.target?this.target[i]:i==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(i)?(...c)=>(this.targetQueue.push({method:i,args:c,resolve:()=>{}}),this.fallbacks[i](...c)):(...c)=>new Promise(u=>{this.targetQueue.push({method:i,args:c,resolve:u})})})}async setRealTarget(t){this.target=t;for(const a of this.onQueue)this.target.on[a.method](...a.args);for(const a of this.targetQueue)a.resolve(await this.target[a.method](...a.args))}}function zd(l,t){const a=l,n=Co(),r=Fd(),o=Id&&a.enableEarlyProxy;if(r&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!o))r.emit(Od,l,t);else{const s=o?new Ud(a,r):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:a,setupFn:t,proxy:s}),s&&t(s.proxiedTarget)}}/*!
223
223
  * vue-i18n v11.1.5
224
224
  * (c) 2025 kazuya kawaguchi
225
225
  * Released under the MIT License.
226
- */const jd="11.1.5";function zd(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(ol().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(ol().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ol().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ol().__INTLIFY_PROD_DEVTOOLS__=!1)}const Me={UNEXPECTED_RETURN_TYPE:Xc,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function ct(l,...t){return El(l,null,process.env.NODE_ENV!=="production"?{messages:Hd,args:t}:void 0)}const Hd={[Me.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Me.INVALID_ARGUMENT]:"Invalid argument",[Me.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Me.NOT_INSTALLED]:"Need to install with `app.use` function",[Me.UNEXPECTED_ERROR]:"Unexpected error",[Me.REQUIRED_VALUE]:"Required in value: {0}",[Me.INVALID_VALUE]:"Invalid value",[Me.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Me.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Me.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Me.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},xr=St("__translateVNode"),wr=St("__datetimeParts"),_r=St("__numberParts"),il=St("__enableEmitter"),jl=St("__disableEmitter"),Co=St("__setPluralRules"),Vo=St("__injectWithOption"),Er=St("__dispose"),At={FALLBACK_TO_ROOT:cd,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12},qd={[At.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[At.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[At.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[At.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
227
- About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[At.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead."};function zl(l,...t){return ha(qd[l],...t)}function Hl(l){if(!Ee(l)||kt(l))return l;for(const t in l)if(Vt(l,t))if(!t.includes("."))Ee(l[t])&&Hl(l[t]);else{const a=t.split("."),r=a.length-1;let n=l,o=!1;for(let s=0;s<r;s++){if(a[s]==="__proto__")throw new Error(`unsafe key: ${a[s]}`);if(a[s]in n||(n[a[s]]=Se()),!Ee(n[a[s]])){process.env.NODE_ENV!=="production"&&Wt(zl(At.IGNORE_OBJ_FLATTEN,{key:a[s]})),o=!0;break}n=n[a[s]]}if(o||(kt(n)?Wn.includes(a[r])||delete l[t]:(n[a[r]]=l[t],delete l[t])),!kt(n)){const s=n[a[r]];Ee(s)&&Hl(s)}}return l}function Cr(l,t){const{messages:a,__i18n:r,messageResolver:n,flatJson:o}=t,s=ke(a)?a:Pe(r)?Se():{[l]:Se()};if(Pe(r)&&r.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:c,resource:u}=i;c?(s[c]=s[c]||Se(),ya(u,s[c])):ya(u,s)}else J(i)&&ya(JSON.parse(i),s)}),n==null&&o)for(const i in s)Vt(s,i)&&Hl(s[i]);return s}function No(l){return l.type}function vo(l,t,a){let r=Ee(t.messages)?t.messages:Se();"__i18nGlobal"in a&&(r=Cr(l.locale.value,{messages:r,__i18n:a.__i18nGlobal}));const n=Object.keys(r);n.length&&n.forEach(o=>{l.mergeLocaleMessage(o,r[o])});{if(Ee(t.datetimeFormats)){const o=Object.keys(t.datetimeFormats);o.length&&o.forEach(s=>{l.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(Ee(t.numberFormats)){const o=Object.keys(t.numberFormats);o.length&&o.forEach(s=>{l.mergeNumberFormat(s,t.numberFormats[s])})}}}function Bo(l){return e.createVNode(e.Text,null,l,0)}const So="__INTLIFY_META__",Do=()=>[],Gd=()=>!1;let Ao=0;function Mo(l){return(t,a,r,n)=>l(a,r,e.getCurrentInstance()||void 0,n)}const Wd=()=>{const l=e.getCurrentInstance();let t=null;return l&&(t=No(l)[So])?{[So]:t}:null};function Vr(l={}){const{__root:t,__injectWithOption:a}=l,r=t===void 0,n=l.flatJson,o=Ct?e.ref:e.shallowRef;let s=Ce(l.inheritLocale)?l.inheritLocale:!0;const i=o(t&&s?t.locale.value:J(l.locale)?l.locale:Rl),c=o(t&&s?t.fallbackLocale.value:J(l.fallbackLocale)||Pe(l.fallbackLocale)||ke(l.fallbackLocale)||l.fallbackLocale===!1?l.fallbackLocale:i.value),u=o(Cr(i.value,l)),d=o(ke(l.datetimeFormats)?l.datetimeFormats:{[i.value]:{}}),m=o(ke(l.numberFormats)?l.numberFormats:{[i.value]:{}});let f=t?t.missingWarn:Ce(l.missingWarn)||_l(l.missingWarn)?l.missingWarn:!0,p=t?t.fallbackWarn:Ce(l.fallbackWarn)||_l(l.fallbackWarn)?l.fallbackWarn:!0,y=t?t.fallbackRoot:Ce(l.fallbackRoot)?l.fallbackRoot:!0,h=!!l.fallbackFormat,g=De(l.missing)?l.missing:null,b=De(l.missing)?Mo(l.missing):null,w=De(l.postTranslation)?l.postTranslation:null,x=t?t.warnHtmlMessage:Ce(l.warnHtmlMessage)?l.warnHtmlMessage:!0,k=!!l.escapeParameter;const _=t?t.modifiers:ke(l.modifiers)?l.modifiers:{};let N=l.pluralRules||t&&t.pluralRules,V;V=(()=>{r&&no(null);const O={version:jd,locale:i.value,fallbackLocale:c.value,messages:u.value,modifiers:_,pluralRules:N,missing:b===null?void 0:b,missingWarn:f,fallbackWarn:p,fallbackFormat:h,unresolving:!0,postTranslation:w===null?void 0:w,warnHtmlMessage:x,escapeParameter:k,messageResolver:l.messageResolver,messageCompiler:l.messageCompiler,__meta:{framework:"vue"}};O.datetimeFormats=d.value,O.numberFormats=m.value,O.__datetimeFormatters=ke(V)?V.__datetimeFormatters:void 0,O.__numberFormatters=ke(V)?V.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(O.__v_emitter=ke(V)?V.__v_emitter:void 0);const G=kd(O);return r&&no(G),G})(),Ul(V,i.value,c.value);function $(){return[i.value,c.value,u.value,d.value,m.value]}const M=e.computed({get:()=>i.value,set:O=>{V.locale=O,i.value=O}}),A=e.computed({get:()=>c.value,set:O=>{V.fallbackLocale=O,c.value=O,Ul(V,i.value,O)}}),q=e.computed(()=>u.value),Q=e.computed(()=>d.value),R=e.computed(()=>m.value);function I(){return De(w)?w:null}function F(O){w=O,V.postTranslation=O}function D(){return g}function z(O){O!==null&&(b=Mo(O)),g=O,V.missing=b}function ee(O,G){return O!=="translate"||!G.resolvedMessage}const me=(O,G,ye,Be,E,S)=>{$();let j;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(V.fallbackContext=t?yd():void 0),j=O(V)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(V.fallbackContext=void 0)}if(ye!=="translate exists"&&ze(j)&&j===wa||ye==="translate exists"&&!j){const[W,Z]=G();if(process.env.NODE_ENV!=="production"&&t&&J(W)&&ee(ye,Z)&&(y&&(Ea(p,W)||so(f,W))&&Wt(zl(At.FALLBACK_TO_ROOT,{key:W,type:ye})),process.env.NODE_ENV!=="production")){const{__v_emitter:B}=V;B&&y&&B.emit("fallback",{type:ye,key:W,to:"global",groupId:`${ye}:${W}`})}return t&&y?Be(t):E(W)}else{if(S(j))return j;throw ct(Me.UNEXPECTED_RETURN_TYPE)}};function Ne(...O){return me(G=>Reflect.apply(xo,null,[G,...O]),()=>yr(...O),"translate",G=>Reflect.apply(G.t,G,[...O]),G=>G,G=>J(G))}function Ke(...O){const[G,ye,Be]=O;if(Be&&!Ee(Be))throw ct(Me.INVALID_ARGUMENT);return Ne(G,ye,Ge({resolvedMessage:!0},Be||{}))}function qt(...O){return me(G=>Reflect.apply(mo,null,[G,...O]),()=>gr(...O),"datetime format",G=>Reflect.apply(G.d,G,[...O]),()=>_a,G=>J(G)||Pe(G))}function Re(...O){return me(G=>Reflect.apply(ho,null,[G,...O]),()=>br(...O),"number format",G=>Reflect.apply(G.n,G,[...O]),()=>_a,G=>J(G)||Pe(G))}function Ye(O){return O.map(G=>J(G)||ze(G)||Ce(G)?Bo(String(G)):G)}const yt={normalize:Ye,interpolate:O=>O,type:"vnode"};function Et(...O){return me(G=>{let ye;const Be=G;try{Be.processor=yt,ye=Reflect.apply(xo,null,[Be,...O])}finally{Be.processor=null}return ye},()=>yr(...O),"translate",G=>G[xr](...O),G=>[Bo(G)],G=>Pe(G))}function Pt(...O){return me(G=>Reflect.apply(ho,null,[G,...O]),()=>br(...O),"number format",G=>G[_r](...O),Do,G=>J(G)||Pe(G))}function at(...O){return me(G=>Reflect.apply(mo,null,[G,...O]),()=>gr(...O),"datetime format",G=>G[wr](...O),Do,G=>J(G)||Pe(G))}function st(O){N=O,V.pluralRules=N}function U(O,G){return me(()=>{if(!O)return!1;const ye=J(G)?G:i.value,Be=ae(ye),E=V.messageResolver(Be,O);return kt(E)||xt(E)||J(E)},()=>[O],"translate exists",ye=>Reflect.apply(ye.te,ye,[O,G]),Gd,ye=>Ce(ye))}function Y(O){let G=null;const ye=Xn(V,c.value,i.value);for(let Be=0;Be<ye.length;Be++){const E=u.value[ye[Be]]||{},S=V.messageResolver(E,O);if(S!=null){G=S;break}}return G}function le(O){const G=Y(O);return G??(t?t.tm(O)||{}:{})}function ae(O){return u.value[O]||{}}function de(O,G){if(n){const ye={[O]:G};for(const Be in ye)Vt(ye,Be)&&Hl(ye[Be]);G=ye[O]}u.value[O]=G,V.messages=u.value}function Ae(O,G){u.value[O]=u.value[O]||{};const ye={[O]:G};if(n)for(const Be in ye)Vt(ye,Be)&&Hl(ye[Be]);G=ye[O],ya(G,u.value[O]),V.messages=u.value}function C(O){return d.value[O]||{}}function v(O,G){d.value[O]=G,V.datetimeFormats=d.value,fo(V,O,G)}function H(O,G){d.value[O]=Ge(d.value[O]||{},G),V.datetimeFormats=d.value,fo(V,O,G)}function re(O){return m.value[O]||{}}function Te(O,G){m.value[O]=G,V.numberFormats=m.value,bo(V,O,G)}function Le(O,G){m.value[O]=Ge(m.value[O]||{},G),V.numberFormats=m.value,bo(V,O,G)}Ao++,t&&Ct&&(e.watch(t.locale,O=>{s&&(i.value=O,V.locale=O,Ul(V,i.value,c.value))}),e.watch(t.fallbackLocale,O=>{s&&(c.value=O,V.fallbackLocale=O,Ul(V,i.value,c.value))}));const be={id:Ao,locale:M,fallbackLocale:A,get inheritLocale(){return s},set inheritLocale(O){s=O,O&&t&&(i.value=t.locale.value,c.value=t.fallbackLocale.value,Ul(V,i.value,c.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:q,get modifiers(){return _},get pluralRules(){return N||{}},get isGlobal(){return r},get missingWarn(){return f},set missingWarn(O){f=O,V.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(O){p=O,V.fallbackWarn=p},get fallbackRoot(){return y},set fallbackRoot(O){y=O},get fallbackFormat(){return h},set fallbackFormat(O){h=O,V.fallbackFormat=h},get warnHtmlMessage(){return x},set warnHtmlMessage(O){x=O,V.warnHtmlMessage=O},get escapeParameter(){return k},set escapeParameter(O){k=O,V.escapeParameter=O},t:Ne,getLocaleMessage:ae,setLocaleMessage:de,mergeLocaleMessage:Ae,getPostTranslationHandler:I,setPostTranslationHandler:F,getMissingHandler:D,setMissingHandler:z,[Co]:st};return be.datetimeFormats=Q,be.numberFormats=R,be.rt=Ke,be.te=U,be.tm=le,be.d=qt,be.n=Re,be.getDateTimeFormat=C,be.setDateTimeFormat=v,be.mergeDateTimeFormat=H,be.getNumberFormat=re,be.setNumberFormat=Te,be.mergeNumberFormat=Le,be[Vo]=a,be[xr]=Et,be[wr]=at,be[_r]=Pt,process.env.NODE_ENV!=="production"&&(be[il]=O=>{V.__v_emitter=O},be[jl]=()=>{V.__v_emitter=void 0}),be}const To="vue-i18n: composer properties",Nr={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},Kd={"vue-i18n-resource-inspector":"Search for scopes ..."},Yd={"vue-i18n-timeline":16764185};let vr;async function Xd(l,t){return new Promise((a,r)=>{try{Ud({id:"vue-devtools-plugin-vue-i18n",label:Nr["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[To],app:l},n=>{vr=n,n.on.visitComponentTree(({componentInstance:s,treeNode:i})=>{Zd(s,i,t)}),n.on.inspectComponent(({componentInstance:s,instanceData:i})=>{s.vnode.el&&s.vnode.el.__VUE_I18N__&&i&&(t.mode==="legacy"?s.vnode.el.__VUE_I18N__!==t.global.__composer&&$o(i,s.vnode.el.__VUE_I18N__):$o(i,s.vnode.el.__VUE_I18N__))}),n.addInspector({id:"vue-i18n-resource-inspector",label:Nr["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Kd["vue-i18n-resource-inspector"]}),n.on.getInspectorTree(s=>{s.app===l&&s.inspectorId==="vue-i18n-resource-inspector"&&lu(s,t)});const o=new Map;n.on.getInspectorState(async s=>{if(s.app===l&&s.inspectorId==="vue-i18n-resource-inspector")if(n.unhighlightElement(),ru(s,t),s.nodeId==="global"){if(!o.has(s.app)){const[i]=await n.getComponentInstances(s.app);o.set(s.app,i)}n.highlightElement(o.get(s.app))}else{const i=au(s.nodeId,t);i&&n.highlightElement(i)}}),n.on.editInspectorState(s=>{s.app===l&&s.inspectorId==="vue-i18n-resource-inspector"&&ou(s,t)}),n.addTimelineLayer({id:"vue-i18n-timeline",label:Nr["vue-i18n-timeline"],color:Yd["vue-i18n-timeline"]}),a(!0)})}catch(n){console.error(n),r(!1)}})}function Lo(l){return l.type.name||l.type.displayName||l.type.__file||"Anonymous"}function Zd(l,t,a){const r=a.mode==="composition"?a.global:a.global.__composer;if(l&&l.vnode.el&&l.vnode.el.__VUE_I18N__&&l.vnode.el.__VUE_I18N__!==r){const n={label:`i18n (${Lo(l)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(n)}}function $o(l,t){const a=To;l.state.push({type:a,key:"locale",editable:!0,value:t.locale.value}),l.state.push({type:a,key:"availableLocales",editable:!1,value:t.availableLocales}),l.state.push({type:a,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),l.state.push({type:a,key:"inheritLocale",editable:!0,value:t.inheritLocale}),l.state.push({type:a,key:"messages",editable:!1,value:Br(t.messages.value)}),l.state.push({type:a,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),l.state.push({type:a,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function Br(l){const t={};return Object.keys(l).forEach(a=>{const r=l[a];De(r)&&"source"in r?t[a]=tu(r):kt(r)&&r.loc&&r.loc.source?t[a]=r.loc.source:Ee(r)?t[a]=Br(r):t[a]=r}),t}const Qd={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function Jd(l){return l.replace(/[<>"&]/g,eu)}function eu(l){return Qd[l]||l}function tu(l){return{_custom:{type:"function",display:`<span>ƒ</span> ${l.source?`("${Jd(l.source)}")`:"(?)"}`}}}function lu(l,t){l.rootNodes.push({id:"global",label:"Global Scope"});const a=t.mode==="composition"?t.global:t.global.__composer;for(const[r,n]of t.__instances){const o=t.mode==="composition"?n:n.__composer;a!==o&&l.rootNodes.push({id:o.id.toString(),label:`${Lo(r)} Scope`})}}function au(l,t){let a=null;if(l!=="global"){for(const[r,n]of t.__instances.entries())if(n.id.toString()===l){a=r;break}}return a}function Fo(l,t){if(l==="global")return t.mode==="composition"?t.global:t.global.__composer;{const a=Array.from(t.__instances.values()).find(r=>r.id.toString()===l);return a?t.mode==="composition"?a:a.__composer:null}}function ru(l,t){const a=Fo(l.nodeId,t);return a&&(l.state=nu(a)),null}function nu(l){const t={},a="Locale related info",r=[{type:a,key:"locale",editable:!0,value:l.locale.value},{type:a,key:"fallbackLocale",editable:!0,value:l.fallbackLocale.value},{type:a,key:"availableLocales",editable:!1,value:l.availableLocales},{type:a,key:"inheritLocale",editable:!0,value:l.inheritLocale}];t[a]=r;const n="Locale messages info",o=[{type:n,key:"messages",editable:!1,value:Br(l.messages.value)}];t[n]=o;{const s="Datetime formats info",i=[{type:s,key:"datetimeFormats",editable:!1,value:l.datetimeFormats.value}];t[s]=i;const c="Datetime formats info",u=[{type:c,key:"numberFormats",editable:!1,value:l.numberFormats.value}];t[c]=u}return t}function ql(l,t){if(vr){let a;t&&"groupId"in t&&(a=t.groupId,delete t.groupId),vr.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:l,groupId:a,time:Date.now(),meta:{},data:t||{},logType:l==="compile-error"?"error":l==="fallback"||l==="missing"?"warning":"default"}})}}function ou(l,t){const a=Fo(l.nodeId,t);if(a){const[r]=l.path;r==="locale"&&J(l.state.value)?a.locale.value=l.state.value:r==="fallbackLocale"&&(J(l.state.value)||Pe(l.state.value)||Ee(l.state.value))?a.fallbackLocale.value=l.state.value:r==="inheritLocale"&&Ce(l.state.value)&&(a.inheritLocale=l.state.value)}}function su(l){const t=J(l.locale)?l.locale:Rl,a=J(l.fallbackLocale)||Pe(l.fallbackLocale)||ke(l.fallbackLocale)||l.fallbackLocale===!1?l.fallbackLocale:t,r=De(l.missing)?l.missing:void 0,n=Ce(l.silentTranslationWarn)||_l(l.silentTranslationWarn)?!l.silentTranslationWarn:!0,o=Ce(l.silentFallbackWarn)||_l(l.silentFallbackWarn)?!l.silentFallbackWarn:!0,s=Ce(l.fallbackRoot)?l.fallbackRoot:!0,i=!!l.formatFallbackMessages,c=ke(l.modifiers)?l.modifiers:{},u=l.pluralizationRules,d=De(l.postTranslation)?l.postTranslation:void 0,m=J(l.warnHtmlInMessage)?l.warnHtmlInMessage!=="off":!0,f=!!l.escapeParameterHtml,p=Ce(l.sync)?l.sync:!0;let y=l.messages;if(ke(l.sharedMessages)){const _=l.sharedMessages;y=Object.keys(_).reduce((V,P)=>{const $=V[P]||(V[P]={});return Ge($,_[P]),V},y||{})}const{__i18n:h,__root:g,__injectWithOption:b}=l,w=l.datetimeFormats,x=l.numberFormats,k=l.flatJson;return{locale:t,fallbackLocale:a,messages:y,flatJson:k,datetimeFormats:w,numberFormats:x,missing:r,missingWarn:n,fallbackWarn:o,fallbackRoot:s,fallbackFormat:i,modifiers:c,pluralRules:u,postTranslation:d,warnHtmlMessage:m,escapeParameter:f,messageResolver:l.messageResolver,inheritLocale:p,__i18n:h,__root:g,__injectWithOption:b}}function Sr(l={}){const t=Vr(su(l)),{__extender:a}=l,r={id:t.id,get locale(){return t.locale.value},set locale(n){t.locale.value=n},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(n){t.fallbackLocale.value=n},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(n){t.setMissingHandler(n)},get silentTranslationWarn(){return Ce(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(n){t.missingWarn=Ce(n)?!n:n},get silentFallbackWarn(){return Ce(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(n){t.fallbackWarn=Ce(n)?!n:n},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(n){t.fallbackFormat=n},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(n){t.setPostTranslationHandler(n)},get sync(){return t.inheritLocale},set sync(n){t.inheritLocale=n},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(n){t.warnHtmlMessage=n!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(n){t.escapeParameter=n},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...n){return Reflect.apply(t.t,t,[...n])},rt(...n){return Reflect.apply(t.rt,t,[...n])},te(n,o){return t.te(n,o)},tm(n){return t.tm(n)},getLocaleMessage(n){return t.getLocaleMessage(n)},setLocaleMessage(n,o){t.setLocaleMessage(n,o)},mergeLocaleMessage(n,o){t.mergeLocaleMessage(n,o)},d(...n){return Reflect.apply(t.d,t,[...n])},getDateTimeFormat(n){return t.getDateTimeFormat(n)},setDateTimeFormat(n,o){t.setDateTimeFormat(n,o)},mergeDateTimeFormat(n,o){t.mergeDateTimeFormat(n,o)},n(...n){return Reflect.apply(t.n,t,[...n])},getNumberFormat(n){return t.getNumberFormat(n)},setNumberFormat(n,o){t.setNumberFormat(n,o)},mergeNumberFormat(n,o){t.mergeNumberFormat(n,o)}};return r.__extender=a,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=n=>{const o=t;o[il]&&o[il](n)},r.__disableEmitter=()=>{const n=t;n[jl]&&n[jl]()}),r}function iu(l,t,a){return{beforeCreate(){const r=e.getCurrentInstance();if(!r)throw ct(Me.UNEXPECTED_ERROR);const n=this.$options;if(n.i18n){const o=n.i18n;if(n.__i18n&&(o.__i18n=n.__i18n),o.__root=t,this===this.$root)this.$i18n=Io(l,o);else{o.__injectWithOption=!0,o.__extender=a.__vueI18nExtend,this.$i18n=Sr(o);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(n.__i18n)if(this===this.$root)this.$i18n=Io(l,n);else{this.$i18n=Sr({__i18n:n.__i18n,__injectWithOption:!0,__extender:a.__vueI18nExtend,__root:t});const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}else this.$i18n=l;n.__i18nGlobal&&vo(t,n,n),this.$t=(...o)=>this.$i18n.t(...o),this.$rt=(...o)=>this.$i18n.rt(...o),this.$te=(o,s)=>this.$i18n.te(o,s),this.$d=(...o)=>this.$i18n.d(...o),this.$n=(...o)=>this.$i18n.n(...o),this.$tm=o=>this.$i18n.tm(o),a.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const r=this.$i18n;this.$el.__VUE_I18N__=r.__composer;const n=this.__v_emitter=or();r.__enableEmitter&&r.__enableEmitter(n),n.on("*",ql)}},unmounted(){const r=e.getCurrentInstance();if(!r)throw ct(Me.UNEXPECTED_ERROR);const n=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",ql),delete this.__v_emitter),this.$i18n&&(n.__disableEmitter&&n.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,n.__disposer&&(n.__disposer(),delete n.__disposer,delete n.__extender),a.__deleteInstance(r),delete this.$i18n}}}function Io(l,t){l.locale=t.locale||l.locale,l.fallbackLocale=t.fallbackLocale||l.fallbackLocale,l.missing=t.missing||l.missing,l.silentTranslationWarn=t.silentTranslationWarn||l.silentFallbackWarn,l.silentFallbackWarn=t.silentFallbackWarn||l.silentFallbackWarn,l.formatFallbackMessages=t.formatFallbackMessages||l.formatFallbackMessages,l.postTranslation=t.postTranslation||l.postTranslation,l.warnHtmlInMessage=t.warnHtmlInMessage||l.warnHtmlInMessage,l.escapeParameterHtml=t.escapeParameterHtml||l.escapeParameterHtml,l.sync=t.sync||l.sync,l.__composer[Co](t.pluralizationRules||l.pluralizationRules);const a=Cr(l.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(a).forEach(r=>l.mergeLocaleMessage(r,a[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>l.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>l.mergeNumberFormat(r,t.numberFormats[r])),l}const Dr={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:l=>l==="parent"||l==="global",default:"parent"},i18n:{type:Object}};function cu({slots:l},t){return t.length===1&&t[0]==="default"?(l.default?l.default():[]).reduce((r,n)=>[...r,...n.type===e.Fragment?n.children:[n]],[]):t.reduce((a,r)=>{const n=l[r];return n&&(a[r]=n()),a},Se())}function Oo(){return e.Fragment}const Po=e.defineComponent({name:"i18n-t",props:Ge({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:l=>ze(l)||!isNaN(l)}},Dr),setup(l,t){const{slots:a,attrs:r}=t,n=l.i18n||Fe({useScope:l.scope,__useComponent:!0});return()=>{const o=Object.keys(a).filter(m=>m[0]!=="_"),s=Se();l.locale&&(s.locale=l.locale),l.plural!==void 0&&(s.plural=J(l.plural)?+l.plural:l.plural);const i=cu(t,o),c=n[xr](l.keypath,i,s),u=Ge(Se(),r),d=J(l.tag)||Ee(l.tag)?l.tag:Oo();return e.h(d,u,c)}}});function du(l){return Pe(l)&&!J(l[0])}function Ro(l,t,a,r){const{slots:n,attrs:o}=t;return()=>{const s={part:!0};let i=Se();l.locale&&(s.locale=l.locale),J(l.format)?s.key=l.format:Ee(l.format)&&(J(l.format.key)&&(s.key=l.format.key),i=Object.keys(l.format).reduce((f,p)=>a.includes(p)?Ge(Se(),f,{[p]:l.format[p]}):f,Se()));const c=r(l.value,s,i);let u=[s.key];Pe(c)?u=c.map((f,p)=>{const y=n[f.type],h=y?y({[f.type]:f.value,index:p,parts:c}):[f.value];return du(h)&&(h[0].key=`${f.type}-${p}`),h}):J(c)&&(u=[c]);const d=Ge(Se(),o),m=J(l.tag)||Ee(l.tag)?l.tag:Oo();return e.h(m,d,u)}}const Uo=e.defineComponent({name:"i18n-n",props:Ge({value:{type:Number,required:!0},format:{type:[String,Object]}},Dr),setup(l,t){const a=l.i18n||Fe({useScope:l.scope,__useComponent:!0});return Ro(l,t,go,(...r)=>a[_r](...r))}});function uu(l,t){const a=l;if(l.mode==="composition")return a.__getInstance(t)||l.global;{const r=a.__getInstance(t);return r!=null?r.__composer:l.global.__composer}}function mu(l){const t=s=>{process.env.NODE_ENV!=="production"&&nr(zl(At.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:i,value:c}=s;if(!i||!i.$)throw ct(Me.UNEXPECTED_ERROR);const u=uu(l,i.$),d=jo(c);return[Reflect.apply(u.t,u,[...zo(d)]),u]};return{created:(s,i)=>{const[c,u]=t(i);Ct&&l.global===u&&(s.__i18nWatcher=e.watch(u.locale,()=>{i.instance&&i.instance.$forceUpdate()})),s.__composer=u,s.textContent=c},unmounted:s=>{Ct&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:i})=>{if(s.__composer){const c=s.__composer,u=jo(i);s.textContent=Reflect.apply(c.t,c,[...zo(u)])}},getSSRProps:s=>{const[i]=t(s);return{textContent:i}}}}function jo(l){if(J(l))return{path:l};if(ke(l)){if(!("path"in l))throw ct(Me.REQUIRED_VALUE,"path");return l}else throw ct(Me.INVALID_VALUE)}function zo(l){const{path:t,locale:a,args:r,choice:n,plural:o}=l,s={},i=r||{};return J(a)&&(s.locale=a),ze(n)&&(s.plural=n),ze(o)&&(s.plural=o),[t,i,s]}function pu(l,t,...a){const r=ke(a[0])?a[0]:{};(Ce(r.globalInstall)?r.globalInstall:!0)&&([Po.name,"I18nT"].forEach(o=>l.component(o,Po)),[Uo.name,"I18nN"].forEach(o=>l.component(o,Uo)),[qo.name,"I18nD"].forEach(o=>l.component(o,qo))),l.directive("t",mu(t))}const fu=St("global-vue-i18n");function hu(l={}){const t=__VUE_I18N_LEGACY_API__&&Ce(l.legacy)?l.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&t&&nr(zl(At.DEPRECATE_LEGACY_MODE));const a=Ce(l.globalInjection)?l.globalInjection:!0,r=new Map,[n,o]=gu(l,t),s=St(process.env.NODE_ENV!=="production"?"vue-i18n":"");function i(m){return r.get(m)||null}function c(m,f){r.set(m,f)}function u(m){r.delete(m)}const d={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(m,...f){if(process.env.NODE_ENV!=="production"&&(m.__VUE_I18N__=d),m.__VUE_I18N_SYMBOL__=s,m.provide(m.__VUE_I18N_SYMBOL__,d),ke(f[0])){const h=f[0];d.__composerExtend=h.__composerExtend,d.__vueI18nExtend=h.__vueI18nExtend}let p=null;!t&&a&&(p=Cu(m,d.global)),__VUE_I18N_FULL_INSTALL__&&pu(m,d,...f),__VUE_I18N_LEGACY_API__&&t&&m.mixin(iu(o,o.__composer,d));const y=m.unmount;if(m.unmount=()=>{p&&p(),d.dispose(),y()},process.env.NODE_ENV!=="production"){if(!await Xd(m,d))throw ct(Me.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const g=or();if(t){const b=o;b.__enableEmitter&&b.__enableEmitter(g)}else{const b=o;b[il]&&b[il](g)}g.on("*",ql)}},get global(){return o},dispose(){n.stop()},__instances:r,__getInstance:i,__setInstance:c,__deleteInstance:u};return d}function Fe(l={}){const t=e.getCurrentInstance();if(t==null)throw ct(Me.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ct(Me.NOT_INSTALLED);const a=bu(t),r=ku(a),n=No(t),o=yu(l,n);if(o==="global")return vo(r,l,n),r;if(o==="parent"){let c=xu(a,t,l.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&Wt(zl(At.NOT_FOUND_PARENT_SCOPE)),c=r),c}const s=a;let i=s.__getInstance(t);if(i==null){const c=Ge({},l);"__i18n"in n&&(c.__i18n=n.__i18n),r&&(c.__root=r),i=Vr(c),s.__composerExtend&&(i[Er]=s.__composerExtend(i)),_u(s,t,i),s.__setInstance(t,i)}return i}function gu(l,t){const a=e.effectScope(),r=__VUE_I18N_LEGACY_API__&&t?a.run(()=>Sr(l)):a.run(()=>Vr(l));if(r==null)throw ct(Me.UNEXPECTED_ERROR);return[a,r]}function bu(l){const t=e.inject(l.isCE?fu:l.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ct(l.isCE?Me.NOT_INSTALLED_WITH_PROVIDE:Me.UNEXPECTED_ERROR);return t}function yu(l,t){return ga(l)?"__i18n"in t?"local":"global":l.useScope?l.useScope:"local"}function ku(l){return l.mode==="composition"?l.global:l.global.__composer}function xu(l,t,a=!1){let r=null;const n=t.root;let o=wu(t,a);for(;o!=null;){const s=l;if(l.mode==="composition")r=s.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const i=s.__getInstance(o);i!=null&&(r=i.__composer,a&&r&&!r[Vo]&&(r=null))}if(r!=null||n===o)break;o=o.parent}return r}function wu(l,t=!1){return l==null?null:t&&l.vnode.ctx||l.parent}function _u(l,t,a){let r=null;e.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&t.vnode.el){t.vnode.el.__VUE_I18N__=a,r=or();const n=a;n[il]&&n[il](r),r.on("*",ql)}},t),e.onUnmounted(()=>{const n=a;process.env.NODE_ENV!=="production"&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&(r&&r.off("*",ql),n[jl]&&n[jl](),delete t.vnode.el.__VUE_I18N__),l.__deleteInstance(t);const o=n[Er];o&&(o(),delete n[Er])},t)}const Eu=["locale","fallbackLocale","availableLocales"],Ho=["t","rt","d","n","tm","te"];function Cu(l,t){const a=Object.create(null);return Eu.forEach(n=>{const o=Object.getOwnPropertyDescriptor(t,n);if(!o)throw ct(Me.UNEXPECTED_ERROR);const s=e.isRef(o.value)?{get(){return o.value.value},set(i){o.value.value=i}}:{get(){return o.get&&o.get()}};Object.defineProperty(a,n,s)}),l.config.globalProperties.$i18n=a,Ho.forEach(n=>{const o=Object.getOwnPropertyDescriptor(t,n);if(!o||!o.value)throw ct(Me.UNEXPECTED_ERROR);Object.defineProperty(l.config.globalProperties,`$${n}`,o)}),()=>{delete l.config.globalProperties.$i18n,Ho.forEach(n=>{delete l.config.globalProperties[`$${n}`]})}}const qo=e.defineComponent({name:"i18n-d",props:Ge({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Dr),setup(l,t){const a=l.i18n||Fe({useScope:l.scope,__useComponent:!0});return Ro(l,t,po,(...r)=>a[wr](...r))}});if(zd(),pd(qc),fd(id),hd(Xn),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const l=ol();l.__INTLIFY__=!0,Gc(l.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Vu={class:"flex items-center justify-between"},Nu={class:"flex items-center gap-2"},vu={class:"text-4xl font-bold text-slate-800 dark:text-slate-100 mb-2"},Bu=["href","title"],Su={class:"text-lg text-slate-600 dark:text-slate-300"},Du=e.defineComponent({__name:"DashboardHeader",setup(l){const{locale:t}=Fe();return(a,r)=>{const n=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",Vu,[e.createElementVNode("div",null,[e.createElementVNode("div",Nu,[e.createElementVNode("h1",vu,e.toDisplayString(a.$t("cms.dashboard.title")),1),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(t)}/get-started/app-overview`,target:"_blank",title:a.$t("cms.guide.appOverview")},[e.createVNode(e.unref(kl),{class:"w-5 h-5"})],8,Bu)]),e.createElementVNode("div",Su,e.toDisplayString(a.$t("cms.dashboard.description")),1)]),e.createElementVNode("div",null,[e.createVNode(n,{to:"/settings/collections",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white"},{default:e.withCtx(()=>[e.createVNode(e.unref(rl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(a.$t("cms.dashboard.newCollection")),1)]),_:1})])])}}}),Au={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-300 transform hover:scale-105"},Mu={class:"p-6"},Tu={class:"flex items-start justify-between"},Lu={class:"flex-1"},$u={class:"flex items-center space-x-2 mb-2"},Fu={class:"text-sm font-medium text-slate-600 dark:text-slate-400"},Iu={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-1"},Ou={class:"text-xs text-slate-500 dark:text-slate-400 mb-3"},Pu=e.defineComponent({__name:"StatCard",props:{stat:{}},setup(l){const t=a=>({"file-text":Il,users:lr,image:ma,eye:Ja})[a]||Il;return(a,r)=>(e.openBlock(),e.createElementBlock("div",Au,[e.createElementVNode("div",Mu,[e.createElementVNode("div",Tu,[e.createElementVNode("div",Lu,[e.createElementVNode("div",$u,[e.createElementVNode("div",{class:e.normalizeClass(`p-2 rounded-lg bg-${a.stat.color}-50 dark:bg-${a.stat.color}-900/20`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t(a.stat.icon)),{class:e.normalizeClass(`w-5 h-5 text-${a.stat.color}-600`)},null,8,["class"]))],2),e.createElementVNode("p",Fu,e.toDisplayString(a.stat.title),1)]),e.createElementVNode("p",Iu,e.toDisplayString(a.stat.value),1),e.createElementVNode("p",Ou,e.toDisplayString(a.stat.description),1)])])])]))}}),Ru={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6"},Uu=e.defineComponent({__name:"StatsGrid",props:{stats:{}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",Ru,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.stats,r=>(e.openBlock(),e.createBlock(Pu,{key:r.id,stat:r},null,8,["stat"]))),128))]))}}),ju={class:"p-4 hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors"},zu={class:"flex items-center justify-between"},Hu={class:"flex-1"},qu={class:"flex items-center space-x-3 mb-2"},Gu={class:"inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 text-xs bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-600 dark:text-slate-300"},Wu={class:"font-semibold text-slate-800 dark:text-slate-100 mb-1"},Ku={class:"flex items-center space-x-4 text-sm text-slate-500 dark:text-slate-400"},Yu={class:"flex items-center"},Xu={class:"flex items-center"},Zu={class:"flex items-center"},Qu={class:"flex items-center space-x-2"},Ju=e.defineComponent({__name:"ContentItem",props:{item:{}},setup(l){const t=r=>{const n={published:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300",draft:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-300",review:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-300"};return n[r]||n.draft},a=r=>{if(!r)return"--.--.--";const n=new Date(r);return new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric"}).format(n)};return(r,n)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",ju,[e.createElementVNode("div",zu,[e.createElementVNode("div",Hu,[e.createElementVNode("div",qu,[e.createElementVNode("div",Gu,e.toDisplayString(r.item.type),1),e.createElementVNode("div",{class:e.normalizeClass(t(r.item.status))},e.toDisplayString(r.item.status||"--"),3)]),e.createElementVNode("h3",Wu,e.toDisplayString(r.item.title||"--"),1),e.createElementVNode("div",Ku,[e.createElementVNode("span",Yu,[e.createVNode(e.unref(lr),{class:"w-4 h-4 mr-1"}),e.createTextVNode(" "+e.toDisplayString(r.item.author||"--"),1)]),e.createElementVNode("span",Xu,[e.createVNode(e.unref(ua),{class:"w-4 h-4 mr-1"}),e.createTextVNode(" "+e.toDisplayString(a(r.item.updated_at)||"--.--.--"),1)]),e.createElementVNode("span",Zu,[e.createVNode(e.unref(Ja),{class:"w-4 h-4 mr-1"}),e.createTextVNode(" "+e.toDisplayString(r.item.views||"--")+" "+e.toDisplayString(r.$t("cms.dashboard.views")),1)])])]),e.createElementVNode("div",Qu,[e.createVNode(o,{to:`/collections/${r.item.object_id}/${r.item.content_id}`,class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 hover:text-accent-foreground hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600"},{default:e.withCtx(()=>[e.createVNode(e.unref(wl),{class:"w-4 h-4 dark:text-blue-50"})]),_:1},8,["to"])])])])}}}),em={class:"lg:col-span-2"},tm={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm"},lm={class:"flex flex-col space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},am={class:"flex items-center justify-between"},rm={class:"tracking-tight text-xl font-semibold text-slate-800 dark:text-slate-100 flex items-center"},nm={class:"p-0"},om={class:"divide-y divide-slate-100 dark:divide-slate-700"},sm=e.defineComponent({__name:"RecentContent",props:{content:{}},setup(l){const t=rt.useRouter(),a=r=>{t.push(r)};return(r,n)=>(e.openBlock(),e.createElementBlock("div",em,[e.createElementVNode("div",tm,[e.createElementVNode("div",lm,[e.createElementVNode("div",am,[e.createElementVNode("h3",rm,[e.createVNode(e.unref(Ii),{class:"w-5 h-5 mr-2"}),e.createTextVNode(" "+e.toDisplayString(r.$t("cms.dashboard.recentContent")),1)]),e.createElementVNode("button",{onClick:n[0]||(n[0]=o=>a("/settings/collections")),class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border shadow-sm hover:text-accent-foreground h-8 rounded-md px-3 text-xs bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600"},e.toDisplayString(r.$t("cms.dashboard.viewAll")),1)])]),e.createElementVNode("div",nm,[e.createElementVNode("div",om,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.content,o=>(e.openBlock(),e.createBlock(Ju,{key:o.id,item:o},null,8,["item"]))),128))])])])]))}}),im={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm"},cm={class:"flex flex-col space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},dm={class:"tracking-tight text-lg font-semibold text-slate-800 dark:text-slate-100 flex items-center"},um={class:"p-4"},mm={class:"grid grid-cols-2 gap-3"},pm=["onClick"],fm={class:"p-2 rounded-lg bg-blue-50 dark:bg-blue-900/20 mb-2 w-fit"},hm={class:"font-medium text-slate-800 dark:text-slate-100 text-sm mb-1 group-hover:text-slate-900 dark:group-hover:text-slate-50"},gm={class:"text-xs text-slate-500 dark:text-slate-400 group-hover:text-slate-600 dark:group-hover:text-slate-300"},bm=e.defineComponent({__name:"QuickActions",setup(l){const t=rt.useRouter(),{t:a}=Fe(),r=[{id:"create-article",title:a("cms.dashboard.createArticle"),description:a("cms.dashboard.createArticleDescription"),icon:Il,iconColor:"text-blue-500",link:"/collections/pages/create"},{id:"upload-media",title:a("cms.dashboard.uploadMedia"),description:a("cms.dashboard.uploadMediaDescription"),icon:ma,iconColor:"text-purple-500",link:"/media"},{id:"manage-users",title:a("cms.dashboard.manageUsers"),description:a("cms.dashboard.manageUsersDescription"),icon:lr,iconColor:"text-green-500",link:"/settings/users"}],n=o=>{o&&t.push(o)};return(o,s)=>(e.openBlock(),e.createElementBlock("div",im,[e.createElementVNode("div",cm,[e.createElementVNode("h3",dm,[e.createVNode(e.unref(Ki),{class:"w-5 h-5 mr-2"}),e.createTextVNode(" "+e.toDisplayString(o.$t("cms.dashboard.quickActions")),1)])]),e.createElementVNode("div",um,[e.createElementVNode("div",mm,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(r,i=>e.createElementVNode("button",{key:i.id,class:"p-3 rounded-lg border border-slate-200 transition-all duration-200 text-left group hover:bg-slate-50 hover:shadow-md dark:border-slate-600 bg-white dark:bg-slate-700 dark:hover:bg-slate-600",onClick:c=>n(i==null?void 0:i.link)},[e.createElementVNode("div",fm,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i==null?void 0:i.icon),{class:e.normalizeClass(`w-4 h-4 ${i==null?void 0:i.iconColor}`)},null,8,["class"]))]),e.createElementVNode("h3",hm,e.toDisplayString(i==null?void 0:i.title),1),e.createElementVNode("p",gm,e.toDisplayString(i==null?void 0:i.description),1)],8,pm)),64))])])]))}}),ym={class:"w-full max-w-7xl mx-auto space-y-8"},km={class:"grid grid-cols-1 lg:grid-cols-3 gap-6"},Ar=e.defineComponent({__name:"Dashboard",setup(l){const{t}=Fe(),a=e.ref([{id:"total-content",title:t("cms.dashboard.totalContent"),value:"2,847",description:t("cms.dashboard.articlesPostsPages"),change:{value:"+12.5%",isPositive:!0},icon:"file-text",color:"blue"},{id:"active-users",title:t("cms.dashboard.activeUsers"),value:"1,234",description:t("cms.dashboard.monthlyActiveUsers"),change:{value:"+8.2%",isPositive:!0},icon:"users",color:"emerald"},{id:"media-files",title:t("cms.dashboard.mediaFiles"),value:"5,692",description:t("cms.dashboard.imagesVideosDocs"),change:{value:"+23.1%",isPositive:!0},icon:"image",color:"purple"},{id:"new-media",title:t("cms.dashboard.newMediaFiles"),value:"89.2K",description:t("cms.dashboard.thisMonth"),change:{value:"-2.4%",isPositive:!1},icon:"eye",color:"orange"}]),r=e.ref([{id:1,type:"Article",status:"published",title:t("cms.dashboard.gettingStartedWithNextJs14"),author:t("cms.dashboard.sarahJohnson"),updated_at:"2024-01-15",views:1247},{id:2,type:"Post",status:"draft",title:t("cms.dashboard.advancedReactPatterns"),author:t("cms.dashboard.mikeChen"),updated_at:"2024-01-14",views:0},{id:3,type:"Article",status:"published",title:t("cms.dashboard.uiUxDesignPrinciples"),author:t("cms.dashboard.emmaWilson"),updated_at:"2024-01-13",views:892},{id:4,type:"Post",status:"review",title:t("cms.dashboard.databaseOptimizationTips"),author:t("cms.dashboard.alexRodriguez"),updated_at:"2024-01-12",views:0}]),n=s=>{a.value=a.value.map(i=>{var c,u,d,m;switch(i.id){case"total-content":return{...i,value:((c=s.totalContent)==null?void 0:c.toLocaleString())??i.value};case"active-users":return{...i,value:((u=s.totalUsers)==null?void 0:u.toLocaleString())??i.value};case"media-files":return{...i,value:((d=s.totalMediaFiles)==null?void 0:d.toLocaleString())??i.value};case"new-media":return{...i,value:((m=s.newMediaFiles)==null?void 0:m.toLocaleString())??i.value};default:return i}})},o=async()=>{const i=await(await fetch("api/cms-stat")).json();r.value=i.recentContent,n(i.stat)};return e.onMounted(()=>{o()}),(s,i)=>(e.openBlock(),e.createElementBlock("div",ym,[e.createVNode(Du),e.createVNode(Uu,{stats:a.value},null,8,["stats"]),e.createElementVNode("div",km,[e.createVNode(sm,{content:r.value,class:"lg:col-span-2"},null,8,["content"]),e.createElementVNode("div",null,[e.createVNode(bm)])])]))}}),xm={class:"rounded-xl text-card-foreground shadow-lg bg-white dark:bg-slate-800 backdrop-blur-sm border-2 border-dashed border-slate-300 dark:border-slate-600"},wm={class:"p-12 text-center"},_m={class:"text-lg font-medium text-slate-600 dark:text-slate-300 mb-2"},Em={class:"text-slate-500 dark:text-slate-400 mb-6"},Go={__name:"EmptyData",props:{title:{type:String,default:()=>"emptyData.title"},description:{type:String,default:()=>"emptyData.description"},buttonText:{type:String,default:()=>"emptyData.buttonText"},showButton:{type:Boolean,default:!0}},emits:["action"],setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",xm,[e.createElementVNode("div",wm,[a[2]||(a[2]=e.createElementVNode("svg",{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",class:"lucide lucide-layers w-12 h-12 mx-auto mb-4 text-slate-400 dark:text-slate-500"},[e.createElementVNode("path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"}),e.createElementVNode("path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"}),e.createElementVNode("path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"})],-1)),e.createElementVNode("h3",_m,e.toDisplayString(t.$t(l.title)),1),e.createElementVNode("p",Em,e.toDisplayString(t.$t(l.description)),1),l.showButton?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=r=>t.$emit("action")),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white"},[a[1]||(a[1]=e.createElementVNode("svg",{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",class:"lucide lucide-plus w-4 h-4 mr-2"},[e.createElementVNode("path",{d:"M5 12h14"}),e.createElementVNode("path",{d:"M12 5v14"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.$t(l.buttonText)),1)])):e.createCommentVNode("",!0)])]))}},Cm={class:"space-y-6 max-w-7xl mx-auto"},Vm={class:"flex items-center justify-between mb-8"},Nm={class:"flex gap-4"},vm={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},Bm={class:"text-slate-600 dark:text-slate-300"},Sm=["href","title"],Dm={class:"relative w-full max-w-sm"},Am={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Mm=["placeholder"],Tm={key:0},Lm={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6"},$m=["onClick"],Fm={class:"flex items-start justify-between"},Im={class:"flex items-start gap-3"},Om={class:"text-sm font-semibold text-gray-800 mb-1"},Pm={class:"text-xs text-gray-600"},Rm={class:"flex items-center gap-2"},Um={class:"text-xs text-gray-500 whitespace-nowrap"},jm={key:1,class:"flex items-center justify-center min-h-[400px]"},Mr=e.defineComponent({__name:"CollectionsPage",setup(l){const{t,locale:a}=Fe(),r=rt.useRouter();e.inject("fetchContentTypes");const n=e.ref([]),o=e.ref(""),s=e.computed(()=>{const u=n.value.filter(p=>p.type!=="single"),d=o.value.trim().toLowerCase();return[...d?u.filter(p=>[p==null?void 0:p.title,p==null?void 0:p.name,p==null?void 0:p.id,p==null?void 0:p.description].filter(Boolean).join(" ").toLowerCase().includes(d)):u].sort((p,y)=>p.id==="pages"?-1:y.id==="pages"?1:0)});async function i(){try{const u=await fetch("/api/cms-type?type=collection");if(!u.ok)throw new Error("Failed to fetch collections");const d=await u.json();n.value=d.rows||[]}catch(u){console.error("Error fetching collections:",u)}}const c=u=>{r.push(`/collections/${u.id}`)};return e.onMounted(()=>{i()}),(u,d)=>(e.openBlock(),e.createElementBlock("div",Cm,[e.createElementVNode("div",Vm,[e.createElementVNode("div",Nm,[e.createElementVNode("div",null,[e.createElementVNode("h1",vm,e.toDisplayString(u.$t("cms.navigation.collections")),1),e.createElementVNode("p",Bm,e.toDisplayString(u.$t("cms.collections.selectCollection")),1)]),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(a)}/guides/collections/`,target:"_blank",title:u.$t("cms.guide.collections"),class:"mt-2"},[e.createVNode(e.unref(kl),{class:"w-5 h-5"})],8,Sm)]),e.createElementVNode("div",Dm,[e.createElementVNode("div",Am,[e.createVNode(e.unref(tr),{class:"w-5 h-5 text-gray-400"})]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=m=>o.value=m),type:"text",class:"block w-full py-2 pl-10 pr-3 leading-5 text-gray-900 placeholder-gray-500 transition-colors bg-white border border-gray-300 rounded-md dark:border-gray-600 dark:bg-gray-700 dark:placeholder-gray-400 focus:outline-none focus:ring-sky-500 focus:border-sky-500 dark:text-white sm:text-sm",placeholder:u.$t("cms.collections.searchCollections")},null,8,Mm),[[e.vModelText,o.value]])])]),n.value.length>0?(e.openBlock(),e.createElementBlock("div",Tm,[e.createElementVNode("div",Lm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,m=>(e.openBlock(),e.createElementBlock("button",{key:m.id,onClick:f=>c(m),class:"w-full border border-gray-200 bg-white rounded-lg p-4 text-left hover:shadow-md transition-all hover:border-gray-300"},[e.createElementVNode("div",Fm,[e.createElementVNode("div",Im,[m.id==="pages"?(e.openBlock(),e.createBlock(e.unref(yl),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(e.openBlock(),e.createBlock(e.unref(xl),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),e.createElementVNode("div",null,[e.createElementVNode("h4",Om,e.toDisplayString(m.title),1),e.createElementVNode("p",Pm,e.toDisplayString(m.description||"Опис відсутній"),1)])]),e.createElementVNode("div",Rm,[e.createElementVNode("span",Um,e.toDisplayString(m.entries)+" записів",1),e.createVNode(e.unref(bl),{class:"w-4 h-4 text-gray-400"})])])],8,$m))),128))])])):(e.openBlock(),e.createElementBlock("div",jm,[e.createVNode(Go)]))]))}}),zm={class:"text-card-foreground border-0 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm"},Hm={class:"p-0"},qm={class:"table-scroll overflow-x-auto"},Gm={class:"relative w-full overflow-auto max-h-[calc(100vh-270px)]"},Wm={class:"w-full caption-bottom text-sm"},Km={class:"border-b border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors"},Ym={class:"flex items-center gap-2"},Xm={class:"h-10 text-center px-4 font-semibold text-slate-700 dark:text-slate-300 max-w-32"},Zm=["onClick"],Qm={key:1,class:"whitespace-nowrap"},Jm={key:2,class:"whitespace-nowrap"},ep={key:3,class:"flex items-center"},tp={key:4,class:"inline-flex whitespace-nowrap items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300"},lp={key:5,class:"flex items-center"},ap={key:6,class:"flex items-center gap-3"},rp={key:8,class:"flex items-center gap-3"},np={key:11,class:"flex items-center gap-3"},op={class:"line-clamp-2"},sp={class:"flex justify-end py-2 px-4 align-middle max-w-40"},ip={class:"flex items-center justify-center gap-1"},cp=["onClick"],dp=["onClick"],Wo=e.defineComponent({__name:"UniversalTable",props:{rows:{},query:{},filterFn:{type:Function},onEdit:{type:Function},onView:{type:Function},onDelete:{type:Function},columns:{},onMore:{type:Function},customRender:{}},emits:["edit","view","delete","more"],setup(l,{emit:t}){const{t:a}=Fe();e.ref(null);const r=l,n=t,o=e.computed(()=>!r.query||!r.filterFn?r.rows:r.rows.filter(m=>r.filterFn(m,r.query))),s=m=>{if(!m)return"";const f=new Date(m);return isNaN(f.getTime())?"":m.includes("T")||m.includes(" ")||m.includes(":")?f.toLocaleString("uk-UA",{dateStyle:"medium",timeStyle:"medium"}):f.toLocaleDateString("uk-UA",{dateStyle:"medium"})},i=m=>{switch(m){case"published":return{icon:wn,text:a("cms.common.status.published"),classes:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 border-green-200 dark:border-green-700"};case"draft":return{icon:wl,text:a("cms.common.status.draft"),classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"};case"archived":return{icon:Dn,text:a("cms.common.status.archived"),classes:"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300 border-gray-200 dark:border-gray-700"};default:return null}},c=(m,f)=>{switch(m){case"edit":n("edit",f),r.onEdit&&r.onEdit(f);break;case"view":n("view",f),r.onView&&r.onView(f);break;case"delete":n("delete",f);break;case"more":n("more",f),r.onMore&&r.onMore(f);break}},u=m=>{c("edit",m)},d=m=>{const f=new Date,p=new Date(m),y=f-p,h=Math.floor(y/1e3),g=Math.floor(h/60),b=Math.floor(g/60),w=Number(Math.floor(b/24)),x=Number(Math.floor(w/7));return x>=2?a("cms.table.time.weeksAgo",{count:x}):x===1?a("cms.table.time.weekAgo"):w>=2?a("cms.table.time.daysAgo",{count:w}):w===1?a("cms.table.time.dayAgo"):b>=2?a("cms.table.time.hoursAgo",{count:b}):b===1?a("cms.table.time.hourAgo"):g>=2?a("cms.table.time.minutesAgo",{count:g}):a(g===1?"cms.table.time.minuteAgo":"cms.table.time.justNow")};return(m,f)=>(e.openBlock(),e.createElementBlock("div",zm,[e.createElementVNode("div",Hm,[e.createElementVNode("div",qm,[e.createElementVNode("div",Gm,[e.createElementVNode("table",Wm,[e.createElementVNode("thead",null,[e.createElementVNode("tr",Km,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.columns,p=>(e.openBlock(),e.createElementBlock("th",{key:p.name,class:e.normalizeClass(["h-10 px-4 text-left align-middle font-semibold text-slate-700 dark:text-slate-300 max-w-80",{"min-w-[200px]":["title","name"].includes(p.name),"min-w-[150px]":p.name==="slug","min-w-[250px]":p.name==="description"}])},[e.createElementVNode("div",Ym,[p.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.icon),{key:0,class:"w-5 h-5"})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(p.label||p.title||p.ua||p.name),1)])],2))),128)),e.createElementVNode("th",Xm,e.toDisplayString(m.$t("cms.table.actions")),1)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,p=>(e.openBlock(),e.createElementBlock("tr",{key:p.id||p._id||p.name,class:"transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.columns,(y,h)=>{var g,b,w,x,k;return e.openBlock(),e.createElementBlock("td",{key:y.name,class:e.normalizeClass(["py-2 px-4 align-middle max-w-80",{"font-medium text-slate-800 dark:text-white cursor-pointer":h===0,"text-slate-600 dark:text-slate-400 font-mono text-sm":h!==0}]),onClick:_=>h===0?u(p):void 0},[m.customRender&&m.customRender[y.name]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m.customRender[y.name](p[y.name],p)),{key:0})):e.createCommentVNode("",!0),["published_at","publish_at","created_at","date"].includes(y.name)&&p[y.name]?(e.openBlock(),e.createElementBlock("span",Qm,e.toDisplayString(s(p[y.name])),1)):["updated_at","lastModified","last_edit"].includes(y.name)?(e.openBlock(),e.createElementBlock("span",Jm,e.toDisplayString(d(p[y.name])||"--"),1)):y.name==="views"?(e.openBlock(),e.createElementBlock("div",ep,[e.createVNode(e.unref(Ja),{class:"w-4 h-4 mr-1"}),e.createTextVNode(" "+e.toDisplayString(((b=(g=p[y.name])==null?void 0:g.toLocaleString)==null?void 0:b.call(g))??p[y.name]),1)])):["entries","fields"].includes(y.name)?(e.openBlock(),e.createElementBlock("div",tp,e.toDisplayString(p[y.name]||"-"),1)):y.name==="type"?(e.openBlock(),e.createElementBlock("div",lp,[e.createElementVNode("div",{class:e.normalizeClass(["whitespace-nowrap inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors border-transparent hover:bg-secondary/80",p[y.name]==="pages"?"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300":"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300"])},e.toDisplayString(p[y.name]||"-"),3)])):y.name==="name"?(e.openBlock(),e.createElementBlock("div",ap,[p.type==="single"?(e.openBlock(),e.createBlock(e.unref(yl),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(e.openBlock(),e.createBlock(e.unref(xl),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),e.createTextVNode(" "+e.toDisplayString(p[y.name]),1)])):y.name==="status"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[i(p[y.name])?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["whitespace-nowrap rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700",(w=i(p[y.name]))==null?void 0:w.classes])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((x=i(p[y.name]))==null?void 0:x.icon),{class:"w-3 h-3 mr-1"})),e.createTextVNode(" "+e.toDisplayString((k=i(p[y.name]))==null?void 0:k.text),1)],2)):e.createCommentVNode("",!0)],64)):y.name==="slug"?(e.openBlock(),e.createElementBlock("div",rp,e.toDisplayString(p[y.name]?"/"+p[y.name]:"-"),1)):y.name==="color"?(e.openBlock(),e.createElementBlock("span",{key:9,class:e.normalizeClass(["w-4 h-4 rounded-full block ml-2","bg-["+p[y.name]+"]"])},null,2)):y.name==="enabled"?(e.openBlock(),e.createElementBlock("span",{key:10,class:e.normalizeClass(["whitespace-nowrap rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit",p[y.name]?"bg-green-100 text-green-800 border-green-200":"bg-red-100 text-red-800 border-red-200"])},e.toDisplayString(p[y.name]?"Доступ":"Заборонено"),3)):(e.openBlock(),e.createElementBlock("div",np,[e.createElementVNode("p",op,e.toDisplayString(p[y.name]||"-"),1)]))],10,Zm)}),128)),e.createElementVNode("td",sp,[e.createElementVNode("div",ip,[e.createElementVNode("button",{onClick:e.withModifiers(y=>c("edit",p),["stop"]),class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:text-slate-200 hover:border-blue-300 hover:bg-blue-50 hover:text-blue-600",title:"Edit"},[e.createVNode(e.unref(Sn),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-green-600 dark:group-hover:text-blue-50"})],8,cp),e.createElementVNode("button",{onClick:e.withModifiers(y=>c("delete",p),["stop"]),class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:text-slate-200 hover:border-blue-300 hover:bg-blue-50 hover:text-blue-600",title:"Preview"},[e.createVNode(e.unref(Gt),{class:"w-4 h-4 text-slate-800 dark:text-slate-200 group-hover:text-red-600 dark:group-hover:text-blue-50"})],8,dp),e.renderSlot(m.$slots,"actions",{row:p})])])]))),128))])])])])])]))}}),up={class:"flex items-center justify-between px-6 py-4 border-t border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800"},mp={class:"flex justify-between flex-1 sm:hidden"},pp={class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},fp={class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},hp={class:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"},gp={class:"text-sm text-slate-600 dark:text-slate-400"},bp={class:"font-medium text-slate-800 dark:text-slate-100"},yp={class:"font-medium text-slate-800 dark:text-slate-100"},kp={class:"relative z-0 inline-flex space-x-2 rounded-md shadow-sm","aria-label":"Pagination"},xp=["disabled"],wp={class:"sr-only"},_p={class:"space-x-1"},Ep={key:0,class:"px-2 py-2 text-gray-400"},Cp=["onClick"],Vp=["disabled"],Np={class:"sr-only"},Ko=e.defineComponent({__name:"UniversalTablePagination",props:e.mergeModels({total:{},count:{},limit:{}},{page:{},pageModifiers:{}}),emits:["update:page"],setup(l){const t=e.useModel(l,"page"),a=e.computed(()=>Math.ceil(l.total/l.limit)),r=e.computed(()=>{const o=[];if(a.value<=4){for(let c=1;c<=a.value;c++)o.push(c);return o}const s=Math.max(2,t.value-2),i=Math.min(a.value-1,t.value+2);o.push(1),s>2&&o.push("ellipsis");for(let c=s;c<=i;c++)o.push(c);return i<a.value-1&&o.push("ellipsis"),o.push(a.value),o});return(n,o)=>(e.openBlock(),e.createElementBlock("div",up,[e.createElementVNode("div",mp,[e.createElementVNode("button",pp,e.toDisplayString(n.$t("cms.common.pagination.previous")),1),e.createElementVNode("button",fp,e.toDisplayString(n.$t("cms.common.pagination.next")),1)]),e.createElementVNode("div",hp,[e.createElementVNode("div",null,[e.createElementVNode("p",gp,[e.createTextVNode(e.toDisplayString(n.$t("cms.common.pagination.showing"))+" ",1),e.createElementVNode("span",bp,e.toDisplayString(n.count),1),e.createTextVNode(" "+e.toDisplayString(n.$t("cms.common.pagination.of"))+" ",1),e.createElementVNode("span",yp,e.toDisplayString(n.total),1),e.createTextVNode(" "+e.toDisplayString(n.$t("cms.common.pagination.results")),1)])]),e.createElementVNode("div",null,[e.createElementVNode("nav",kp,[e.createElementVNode("button",{onClick:o[0]||(o[0]=s=>t.value=t.value>1?t.value-1:1),disabled:t.value===1,class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 text-slate-600 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600"},[e.createElementVNode("span",wp,e.toDisplayString(n.$t("cms.common.pagination.previous")),1),e.createVNode(e.unref(Pi),{class:"w-5 h-5"})],8,xp),e.createElementVNode("div",_p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s+"-"+i},[s==="ellipsis"?(e.openBlock(),e.createElementBlock("span",Ep,"...")):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:c=>t.value=s,class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors h-8 w-8 p-0 text-sm rounded-md",{"border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-600 dark:text-slate-300 hover:border-blue-600 hover:bg-slate-50 dark:hover:bg-slate-600":s!==t.value,"shadow bg-blue-600 hover:bg-blue-700 text-white border-blue-600":s===t.value}])},e.toDisplayString(s),11,Cp))],64))),128))]),e.createElementVNode("button",{onClick:o[1]||(o[1]=s=>t.value=t.value<Math.ceil(n.total/n.limit)?t.value+1:Math.ceil(n.total/n.limit)),disabled:t.value===Math.ceil(n.total/n.limit),class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 text-slate-600 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600"},[e.createElementVNode("span",Np,e.toDisplayString(n.$t("cms.common.pagination.next")),1),e.createVNode(e.unref(bl),{class:"w-5 h-5"})],8,Vp)])])])]))}}),cl=(l,t)=>{const a=l.__vccOpts||l;for(const[r,n]of t)a[r]=n;return a},vp={key:0,class:"fixed inset-0 z-[2000] flex items-center justify-center bg-gray-600 bg-opacity-75"},Bp={key:0,class:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},Sp={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Dp={class:"mt-3 text-center sm:mt-5"},Ap={id:"dialog-title",class:"text-base font-semibold text-gray-900"},Mp={class:"mt-2"},Tp={class:"text-sm text-gray-500"},Lp={class:"bg-gray-50 px-4 py-3 sm:px-6 flex justify-center"},$p={key:1,class:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},Fp={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Ip={class:"sm:flex sm:items-start"},Op={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},Pp={id:"dialog-title",class:"text-base font-semibold text-gray-900"},Rp={class:"mt-2"},Up={class:"text-sm text-gray-500"},jp={key:0,class:"mt-2"},zp=["placeholder"],Hp=e.defineComponent({__name:"message-box",props:{type:{default:"error"},mode:{default:"confirm"},title:{default:""},message:{default:""},confirmButtonText:{default:"OK"},cancelButtonText:{default:"Cancel"},modelValue:{type:Boolean,default:!1},promptPlaceholder:{default:""},align:{type:Boolean,default:!0}},emits:["confirm","cancel","update:modelValue"],setup(l,{emit:t}){const a=e.ref(null);e.onMounted(()=>{var y;(y=a.value)==null||y.focus()});const r={success:()=>e.h("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","aria-hidden":"true",class:"size-6 text-green-600"},[e.h("path",{d:"m4.5 12.75 6 6 9-13.5","stroke-linecap":"round","stroke-linejoin":"round"})]),error:()=>e.h("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","aria-hidden":"true",class:"size-6 text-red-600"},[e.h("path",{d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z","stroke-linecap":"round","stroke-linejoin":"round"})]),info:()=>e.h("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"size-6 text-blue-600"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 16h-1v-4h-1m1-4h.01M12 20a8 8 0 100-16 8 8 0 000 16z"})]),warning:()=>e.h("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"size-6 text-yellow-600"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v2m0 4h.01M10.29 3.86L1.82 17a1 1 0 0 0 .87 1.5h18.62a1 1 0 0 0 .87-1.5L13.71 3.86a1 1 0 0 0-1.42 0z"})])},n=l,o=t,s=e.ref(n.modelValue),i=e.ref("");e.watch(()=>n.modelValue,y=>{s.value=y,y===!0&&n.mode==="prompt"&&(i.value="")});function c(y){s.value=!1,o("update:modelValue",!1),y==="confirm"&&n.mode==="prompt"?o("confirm",i.value):o(y)}function u(){c("confirm")}const d=e.computed(()=>{switch(n.type){case"success":return"bg-green-100";case"error":return"bg-red-100";case"info":return"bg-blue-100";case"warning":return"bg-yellow-100";default:return"bg-gray-100"}}),m=e.computed(()=>n.type==="warning"?"bg-orange-600 hover:bg-orange-500":n.type==="success"?"bg-green-600 hover:bg-green-500":n.type==="error"?"bg-red-600 hover:bg-red-500":"bg-blue-600 hover:bg-blue-500"),f=e.computed(()=>r[n.type||"error"]||r.error),p=e.computed(()=>n.title&&n.title.trim()!==""?n.title:n.type?n.type.charAt(0).toUpperCase()+n.type.slice(1):"Notification");return(y,h)=>{const g=e.resolveDirective("focus");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[s.value?(e.openBlock(),e.createElementBlock("div",vp,[y.mode==="alert"?(e.openBlock(),e.createElementBlock("div",Bp,[e.createElementVNode("div",Sp,[e.createElementVNode("div",null,[h[4]||(h[4]=e.createElementVNode("div",{class:"mx-auto flex size-12 shrink-0 items-center justify-center rounded-full bg-green-100"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","aria-hidden":"true",class:"size-6 text-green-600"},[e.createElementVNode("path",{d:"m4.5 12.75 6 6 9-13.5","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),e.createElementVNode("div",Dp,[e.createElementVNode("h3",Ap,e.toDisplayString(p.value),1),e.createElementVNode("div",Mp,[e.createElementVNode("p",Tp,e.toDisplayString(y.message),1)])])])]),e.createElementVNode("div",Lp,[e.createElementVNode("button",{type:"button",onClick:h[0]||(h[0]=b=>c("confirm")),class:"inline-flex min-w-[70px] w-full justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 sm:w-auto"},e.toDisplayString(y.confirmButtonText),1)])])):(e.openBlock(),e.createElementBlock("div",$p,[e.createElementVNode("div",Fp,[e.createElementVNode("div",Ip,[e.createElementVNode("div",{class:e.normalizeClass(["mx-auto flex size-12 shrink-0 items-center justify-center rounded-full sm:mx-0 sm:size-10",d.value])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.value)))],2),e.createElementVNode("div",Op,[e.createElementVNode("h3",Pp,e.toDisplayString(p.value),1),e.createElementVNode("div",Rp,[e.createElementVNode("p",Up,e.toDisplayString(y.message),1)]),y.mode==="prompt"?(e.openBlock(),e.createElementBlock("div",jp,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":h[1]||(h[1]=b=>i.value=b),placeholder:y.promptPlaceholder,class:"w-full rounded-md py-1.5 pl-2 text-gray-900 shadow-sm placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",onKeyup:e.withKeys(u,["enter"]),type:"text"},null,40,zp),[[e.vModelText,i.value],[g]])])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",{class:e.normalizeClass(["bg-gray-50 px-4 py-3",y.align?"sm:flex sm:flex-row-reverse sm:px-6 gap-x-2.5":"sm:flex sm:flex-row sm:px-6 gap-x-2.5"])},[e.createElementVNode("button",{type:"button",onClick:h[2]||(h[2]=b=>c("confirm")),class:e.normalizeClass(["inline-flex w-full justify-center rounded-md px-3 py-2 text-sm font-semibold text-white shadow-xs sm:w-auto",m.value])},e.toDisplayString(y.confirmButtonText),3),e.createElementVNode("button",{type:"button",onClick:h[3]||(h[3]=b=>c("cancel")),class:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto"},e.toDisplayString(y.cancelButtonText),1)],2)]))])):e.createCommentVNode("",!0)])}}}),qp=cl(Hp,[["__scopeId","data-v-047caa71"]]);e.defineComponent({props:{modelValue:{type:Boolean,default:()=>!1},title:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1}},data(){return{}},mounted(){this.modelValue||this.$emit("update:modelValue",!1)},computed:{modelState:{get(){return this.modelValue},set(l){this.$emit("update:modelValue",l)}},labelCursorClasses(){return[{"cursor-not-allowed":this.disabled},{"cursor-pointer":!this.disabled}]}},methods:{handleEnterDown(l){const{keyCode:t}=l;t===13&&(this.modelState=!this.modelState)},addKeyHandler(){window.addEventListener("keydown",this.handleEnterDown)},removeKeyHandler(){window.removeEventListener("keydown",this.handleEnterDown)}}});const Gp={key:0,class:"vsTailwind ui-dialog__wrapper text-gray-800"},Wp={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},Kp={class:"font-medium text-gray-800 dark:text-[#ffffff]"},Yp={class:"ui-dialog__content p-4"},Xp={key:0,class:"flex justify-end gap-x-2"},Zp={key:1,class:"flex justify-end items-center gap-x-2 py-3 px-4 border-t border-gray-200 dark:border-neutral-700"},Qp=e.defineComponent({__name:"vs-modal",props:{title:{default:""},template:{},visible:{type:Boolean,default:!1},size:{default:"small"},closeClickBack:{type:Boolean,default:!1},content:{},buttonText:{},contentProps:{},teleport:{default:"body"}},emits:["update:visible","close","done"],setup(l,{emit:t}){const a=l,r=t,n=e.computed(()=>a.size==="small"?"md:w-5/12 w-9/12":a.size==="medium"?"md:w-6/12 w-9/12":"lg:w-7/12 w-11/12"),o=e.useAttrs();function s(){r("done")}function i(){r("update:visible",!1),r("close")}function c(d){d.key==="Escape"&&i()}function u(d,m){m&&d.target.classList.contains("vs-dialog-overlay")&&i()}return e.onMounted(()=>{window.addEventListener("keydown",c)}),e.onUnmounted(()=>{window.removeEventListener("keydown",c)}),(d,m)=>(e.openBlock(),e.createBlock(e.Teleport,{to:d.teleport},[d.visible?(e.openBlock(),e.createElementBlock("div",Gp,[e.createElementVNode("div",{onMousedown:m[0]||(m[0]=f=>u(f,d.closeClickBack)),class:e.normalizeClass(["vs-dialog-overlay vs-dialog w-full h-full fixed top-0 start-0 bg-black bg-opacity-50",[e.unref(o).class]])},[e.createVNode(e.Transition,{name:"content",appear:""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["ui-dialog__modal opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl",n.value])},[e.createElementVNode("div",Wp,[e.createElementVNode("h3",Kp,e.toDisplayString(d.title),1),e.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:i},[...m[1]||(m[1]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",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"},[e.createElementVNode("path",{d:"M18 6 6 18"}),e.createElementVNode("path",{d:"m6 6 12 12"})],-1)])])]),e.createElementVNode("div",Yp,[e.renderSlot(d.$slots,"default",{},void 0,!0)]),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",Xp,[e.renderSlot(d.$slots,"footer",{handleClose:i},void 0,!0)])):e.createCommentVNode("",!0),d.buttonText?(e.openBlock(),e.createElementBlock("div",Zp,[e.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:i}," Close "),e.createElementVNode("button",{type:"button",onClick:s,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-hidden focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"},e.toDisplayString(d.buttonText),1)])):e.createCommentVNode("",!0)],2)]),_:3})],34)])):e.createCommentVNode("",!0)],8,["to"]))}}),Zt=cl(Qp,[["__scopeId","data-v-a6807cab"]]),Jp={key:0,class:"vsTailwind ui-drawer__wrapper"},ef={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},tf={class:"font-medium text-gray-800 dark:text-[#ffffff]"},lf={class:"flex gap-2"},af={class:"sr-only"},rf={key:0,class:"flex-shrink-0 w-4 h-4",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"},nf={key:1,class:"flex-shrink-0 w-4 h-4",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"},of={class:"ui-drawer__content p-4 flex-1 overflow-auto"},sf={key:0,class:"flex justify-end gap-x-2 p-4 border-0 border-t border-solid border-gray-200 dark:border-t-[#454545]"},cf=e.defineComponent({__name:"vs-drawer",props:{title:{default:""},visible:{type:Boolean,default:!1},position:{default:"right"},size:{default:"500px"},closeClickBack:{type:Boolean,default:!1}},emits:["update:visible","close"],setup(l,{emit:t}){const a=l,r=t,n=e.ref(!1),o=e.computed(()=>n.value?"fixed top-0 left-0 w-full h-full":a.position==="left"?"fixed top-0 left-0 h-full":a.position==="right"?"fixed top-0 right-0 h-full":a.position==="top"?"fixed top-0 left-0 w-full":"fixed bottom-0 left-0 w-full");function s(){r("update:visible",!1),r("close")}function i(){n.value=!n.value}function c(d){d.key==="Escape"&&s()}function u(d,m){m&&d.target.classList.contains("vs-drawer-overlay")&&s()}return e.onMounted(()=>{window.addEventListener("keydown",c)}),e.onUnmounted(()=>{window.removeEventListener("keydown",c)}),(d,m)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"#modal"},[d.visible?(e.openBlock(),e.createElementBlock("div",Jp,[e.createElementVNode("div",{onMousedown:m[0]||(m[0]=f=>u(f,d.closeClickBack)),class:"vs-drawer-overlay vs-drawer w-full h-full fixed top-0 start-0 bg-black bg-opacity-50"},[e.createVNode(e.Transition,{name:"drawer",appear:""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["ui-drawer__drawer opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)]",[o.value,n.value?"w-full":`w-[${a.size}]`,`drawer-${a.position}`]])},[e.createElementVNode("div",ef,[e.createElementVNode("h3",tf,e.toDisplayString(d.title),1),e.createElementVNode("div",lf,[e.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:i},[e.createElementVNode("span",af,e.toDisplayString(n.value?"Exit fullscreen":"Enter fullscreen"),1),n.value?(e.openBlock(),e.createElementBlock("svg",nf,[...m[2]||(m[2]=[e.createElementVNode("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",rf,[...m[1]||(m[1]=[e.createElementVNode("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},null,-1)])]))]),e.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:s},[...m[3]||(m[3]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",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"},[e.createElementVNode("path",{d:"M18 6 6 18"}),e.createElementVNode("path",{d:"m6 6 12 12"})],-1)])])])]),e.createElementVNode("div",of,[e.renderSlot(d.$slots,"default",{},void 0,!0)]),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",sf,[e.renderSlot(d.$slots,"footer",{handleClose:s},void 0,!0)])):e.createCommentVNode("",!0)],2)]),_:3})],32)])):e.createCommentVNode("",!0)]))}}),Yo=cl(cf,[["__scopeId","data-v-c808fe88"]]),df={},uf={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6 text-green-600"};function mf(l,t){return e.openBlock(),e.createElementBlock("svg",uf,[...t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])}const pf=cl(df,[["render",mf]]),ff={},hf={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"orange",class:"size-6 text-orange-600"};function gf(l,t){return e.openBlock(),e.createElementBlock("svg",hf,[...t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])}const bf=cl(ff,[["render",gf]]),yf={},kf={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6 text-blue-600"};function xf(l,t){return e.openBlock(),e.createElementBlock("svg",kf,[...t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"},null,-1)])])}const wf=cl(yf,[["render",xf]]),_f={},Ef={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"red",class:"size-6 text-red-600"};function Cf(l,t){return e.openBlock(),e.createElementBlock("svg",Ef,[...t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)])])}const Vf=cl(_f,[["render",Cf]]),Nf={class:"rounded-md border border-gray-300 bg-white p-4 shadow-sm"},vf={class:"flex items-start gap-4 opacity-100 scale-5 transition-all duration-300"},Bf={class:"flex-1"},Sf={class:"font-medium text-gray-900"},Df={class:"mt-0.5 text-sm text-gray-700"},Af=e.defineComponent({__name:"vs-notify",props:{type:{},title:{},message:{}},setup(l){const t={success:pf,warning:bf,error:Vf,info:wf};return(a,r)=>(e.openBlock(),e.createElementBlock("div",Nf,[e.createElementVNode("div",vf,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[a.type]))),e.createElementVNode("div",Bf,[e.createElementVNode("strong",Sf,e.toDisplayString(a.title),1),e.createElementVNode("p",Df,e.toDisplayString(a.message),1)]),r[0]||(r[0]=e.createElementVNode("button",{class:"m-3 rounded-full p-1.5 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700",type:"button","aria-label":"Dismiss notify"},[e.createElementVNode("span",{class:"sr-only"},"Dismiss popup"),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1))])]))}}),Ca=l=>{const{message:t,title:a,mode:r="confirm",type:n="info",confirmButtonText:o,cancelButtonText:s,onConfirm:i,onCancel:c,cascade:u,confirmButtonStyle:d,cancelButtonStyle:m}=l||{},f=document.querySelector("body");if(!f){console.error('Modal root element with id "#modal" not found!');return}const p=document.createElement("div");f.appendChild(p);const y=()=>{p.remove()};e.createApp({render(){return e.h(qp,{title:a,message:t,mode:r,type:n,cascade:u,confirmButtonText:o,cancelButtonText:s,cancelButtonStyle:m,confirmButtonStyle:d,modelValue:!0,onConfirm:()=>{i==null||i(),y()},onCancel:()=>{c==null||c(),y()}})}}).mount(p)};e.reactive({visible:!0});const Mf=l=>{const{template:t="",title:a="",content:r,contentProps:n={},size:o="medium"}=l,s=document.querySelector("body");if(!s)return console.error('Modal root element with id "#modal" not found!'),{close:()=>{}};const i=document.createElement("div");s.appendChild(i);const c={title:a,template:t,visible:!0,size:o,closeClickBack:!0,onClose:d},u=e.createApp({render(){return e.h(Zt,c,{default:()=>[r?e.h(r,n):e.h("p",t)]})}});function d(){u.unmount(),i.remove()}return u.mount(i),{close:d}},Va={top:"top-4 left-1/2 transform -translate-x-1/2","left-bottom":"bottom-4 left-4 transform","right-bottom":"bottom-4 right-4 transform",bottom:"bottom-4 left-1/2 transform -translate-x-1/2"},xe=l=>{var c;const{type:t="info",title:a,message:r,position:n="right-bottom"}=l||{};let o=document.querySelector("#notify-root");o||(o=document.createElement("div"),o.id="notify-root",o.className=`fixed z-[2000] flex flex-col gap-3 ${Va[n]} p-6 max-w-md mx-auto font-sans antialiased`,document.body.appendChild(o)),o.className.includes(Va[n])||(Object.values(Va).forEach(u=>{o.classList.remove(...u.split(" "))}),o.classList.add(...Va[n].split(" ")));const s=document.createElement("div");o.appendChild(s);const i=e.createApp({render(){return e.h(Af,{type:t,title:a,message:r,onClose:()=>{i.unmount(),s.remove()}})}});i.mount(s),(c=s.querySelector("button"))==null||c.addEventListener("click",()=>{s.classList.add("opacity-0","scale-95","transition-all","duration-300"),setTimeout(()=>{i.unmount(),s.remove()},350)}),setTimeout(()=>{s.classList.add("opacity-0","scale-95","transition-all","duration-300"),setTimeout(()=>{i.unmount(),s.remove()},350)},3500)},Tf={class:"w-full relative"},Lf={key:0,class:"text-[14px] font-medium text-gray-900 mb-2"},$f={class:"opacity-100"},Ff={key:0,class:"text-red-500 text-[14px]"},If={key:1,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},Of=e.defineComponent({__name:"vs-layout-default",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){const t=e.ref("uk"),a=r=>{r.detail.key==="locale"&&(t.value=r.detail.newValue)};return e.onMounted(()=>{t.value=localStorage.locale,window.addEventListener("storage",a)}),e.onUnmounted(()=>{window.removeEventListener("resize",a)}),(r,n)=>{var o,s;return e.openBlock(),e.createElementBlock("div",Tf,[r.ua||r.label?(e.openBlock(),e.createElementBlock("div",Lf,[e.createElementVNode("span",$f,e.toDisplayString(r.item[t.value]||r.ua||r.label),1),(s=(o=r.item)==null?void 0:o.rules)!=null&&s.includes("required")?(e.openBlock(),e.createElementBlock("span",Ff,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"default",e.mergeProps(r.$attrs,{class:{"opacity-60":r.item.disabled}})),r.error?(e.openBlock(),e.createElementBlock("span",If,e.toDisplayString(r.error),1)):e.createCommentVNode("",!0)])}}}),Pf={class:"w-full relative flex flex-row items-center gap-2"},Rf={key:0,class:"text-red-500 text-[14px]"},Uf={key:1,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},jf=e.defineComponent({__name:"vs-layout-horizontal",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{default:()=>({container:12,label:3})}},setup(l){const t=l,a=e.computed(()=>t.columns??{container:12,label:3}),r=e.computed(()=>{const{container:i,label:c}=a.value;return!i||i<=0?0:Math.min(Math.max(c??0,0),i)/i}),n=e.computed(()=>{var i;return((i=t.item)==null?void 0:i.type)==="html"||r.value<=0?!1:!!(t.ua||t.label)}),o=e.computed(()=>{if(!n.value)return{};const i=`${r.value*100}%`;return{flexBasis:i,maxWidth:i}}),s=e.computed(()=>{var m;const{container:i,label:c}=a.value;if(!i||i<=0)return{};if(((m=t.item)==null?void 0:m.type)==="html")return{flexBasis:"100%",maxWidth:"100%"};if(!n.value)return{flexBasis:"100%",maxWidth:"100%"};const u=Math.max(i-Math.max(c??0,0),0)/i;if(!u)return{};const d=`${u*100}%`;return{flexBasis:d,maxWidth:d}});return(i,c)=>{var u,d;return e.openBlock(),e.createElementBlock("div",Pf,[n.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-sm text-gray-900 font-medium flex shrink-0",style:e.normalizeStyle(o.value)},[e.createTextVNode(e.toDisplayString(i.ua||i.label)+" ",1),(d=(u=i.item)==null?void 0:u.rules)!=null&&d.includes("required")&&(i.ua||i.label)?(e.openBlock(),e.createElementBlock("span",Rf,"*")):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"flex-1 min-w-0",style:e.normalizeStyle(s.value)},[e.renderSlot(i.$slots,"default",e.normalizeProps(e.guardReactiveProps(i.$attrs)))],4),i.error?(e.openBlock(),e.createElementBlock("span",Uf,e.toDisplayString(i.error),1)):e.createCommentVNode("",!0)])}}}),zf={class:"w-full relative"},Hf={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},qf=e.defineComponent({__name:"vs-layout-inline",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",zf,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(t.$attrs))),t.error?(e.openBlock(),e.createElementBlock("span",Hf,e.toDisplayString(t.error),1)):e.createCommentVNode("",!0)]))}}),Gf={class:"flex-1 min-w-0"},Wf={key:0,class:"text-sm font-medium text-slate-700 dark:text-slate-200 flex items-center gap-1"},Kf={class:"truncate"},Yf={key:0,class:"text-red-500 text-[14px]"},Xf={key:1,class:"text-xs text-slate-500 dark:text-slate-400"},Zf={key:0,class:"mt-1 text-xs text-red-500"},Qf=e.defineComponent({__name:"vs-layout-settings",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){const t=l,a=e.ref("uk");e.computed(()=>{var i;return((i=t.item??{})==null?void 0:i[a.value])??t.ua??t.label??""});const r=e.computed(()=>{var i;return((i=t.item)==null?void 0:i.description)??""}),n=e.computed(()=>{var i;return Array.isArray((i=t.item)==null?void 0:i.rules)&&t.item.rules.includes("required")}),o=e.computed(()=>(typeof t.error=="string"?t.error:"")??""),s=i=>{i.key==="locale"&&(a.value=i.newValue??"uk")};return e.onMounted(()=>{try{typeof localStorage<"u"&&localStorage.locale&&(a.value=localStorage.locale)}catch{}window.addEventListener("storage",s)}),e.onUnmounted(()=>{window.removeEventListener("storage",s)}),(i,c)=>{var u;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full relative",{"opacity-60":(u=i.item)==null?void 0:u.disabled}])},[e.createElementVNode("div",{class:e.normalizeClass(["gap-2 md:flex-row md:items-center md:justify-between",[["switcher","native-select"].includes(i.item.type)?"flex flex-col":""]])},[e.createElementVNode("div",Gf,[i.ua||i.label?(e.openBlock(),e.createElementBlock("p",Wf,[e.createElementVNode("span",Kf,e.toDisplayString(i.item[a.value]||i.ua||i.label),1),n.value?(e.openBlock(),e.createElementBlock("span",Yf,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("p",Xf,e.toDisplayString(r.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["w-full",["select","native-select"].includes(i.item.type)?"md:w-[30%]":"md:w-auto"])},[e.renderSlot(i.$slots,"default",e.normalizeProps(e.guardReactiveProps(i.$attrs)))],2)],2),o.value?(e.openBlock(),e.createElementBlock("p",Zf,e.toDisplayString(o.value),1)):e.createCommentVNode("",!0)],2)}}}),Jf={default:Of,horizontal:jf,inline:qf,settings:Qf};function ft(l){return{inputClass:e.computed(()=>{const t=`disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${(l==null?void 0:l.primaryColor)||"blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;return(l==null?void 0:l.size)==="sm"?`${t}h-[32px]`:`${t}h-[38px]`})}}const eh=["placeholder","disabled"],th=e.defineComponent({__name:"vs-input-password",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),r=e.useModel(l,"modelValue"),n=e.computed(()=>!!t.disabled),o=e.computed(()=>t.placeholder??"");return(s,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"password","onUpdate:modelValue":i[0]||(i[0]=c=>r.value=c),placeholder:o.value,disabled:n.value,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":s.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,eh)),[[e.vModelText,r.value]])}}),lh=["placeholder","disabled"],Na=e.defineComponent({__name:"vs-input-text",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),r=e.useModel(l,"modelValue"),n=e.computed(()=>!!t.disabled),o=e.computed(()=>t.placeholder??"");return(s,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"text","onUpdate:modelValue":i[0]||(i[0]=c=>r.value=c),placeholder:o.value,disabled:n.value,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":s.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,lh)),[[e.vModelText,r.value]])}}),ah=["placeholder","disabled","min","max"],rh=e.defineComponent({__name:"vs-input-number",props:e.mergeModels({min:{},max:{},style:{default:()=>({})},customClass:{},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),r=e.useModel(l,"modelValue"),n=e.computed(()=>!!t.disabled);return(o,s)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"number",step:"any","onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),placeholder:o.placeholder,disabled:n.value,class:e.normalizeClass(["py-1.5 px-3 block w-full bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"},min:o.min,max:o.max},null,10,ah)),[[e.vModelText,r.value]])}}),_e=(l,t)=>{const a=l.__vccOpts||l;for(const[r,n]of t)a[r]=n;return a},nh={},oh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function sh(l,t){return e.openBlock(),e.createElementBlock("svg",oh,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const ih=_e(nh,[["render",sh]]),ch={class:"flex items-center gap-[4px]"},dh=["value","id","disabled"],uh=["for"],mh={class:"text-[14px] text-gray-700 flex items-center dark:text-neutral-400"},ph=e.defineComponent({__name:"vs-checkbox-default",props:{value:{default:""},label:{default:""},disabled:{type:Boolean,default:!1},id:{},modelValue:{default:""},info:{},error:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=t,r=l,n=e.computed({get:()=>r.modelValue,set:s=>a("update:modelValue",s)}),o=e.computed(()=>!!r.disabled);return(s,i)=>(e.openBlock(),e.createElementBlock("div",ch,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:s.value,"onUpdate:modelValue":i[0]||(i[0]=c=>n.value=c),class:e.normalizeClass(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer",{"!cursor-not-allowed":o.value}]),id:s.id,disabled:o.value},null,10,dh),[[e.vModelCheckbox,n.value]]),e.createElementVNode("label",{for:s.id,class:e.normalizeClass(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300",{"!cursor-not-allowed":o.value}])},[e.createElementVNode("div",{class:e.normalizeClass(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded",[n.value?"bg-blue-600 border-blue-600":"bg-white border-gray-600",s.error?"border-red-600":""]])},[e.createVNode(ih,{height:"12",width:"12"})],2),e.createElementVNode("span",mh,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(s.label),1)])])],10,uh)]))}}),fh=["name","value","disabled"],hh={class:"flex items-center gap-[6px] text-[14px]"},gh={key:0,class:"text-[16px]"},bh=["src"],yh=e.defineComponent({__name:"vs-checkbox-buttons",props:{value:{type:[String,Number,Boolean],default:""},label:{default:""},modelValue:{default:""},disabled:{type:Boolean},id:{},icon:{},imgUrl:{},style:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,r=t,n=e.computed({get:()=>a.modelValue,set:i=>{r("update:modelValue",i)}}),o=e.computed(()=>Array.isArray(n.value)?n.value.includes(a.value):n.value===!0||n.value===a.value),s=e.computed(()=>{var i,c;return((i=a.style)==null?void 0:i.size)==="xs"?"p-1.5 text-xs":((c=a.style)==null?void 0:c.size)==="lg"?"p-3.5 text-[20px]":"p-2.5 text-xs"});return(i,c)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg",[s.value,o.value?"ring-blue-500":"border border-gray-200 ring-transparent"]])},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"hidden",name:i.id,value:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>n.value=u),disabled:i.disabled},null,8,fh),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",hh,[i.icon||i.imgUrl?(e.openBlock(),e.createElementBlock("span",gh,[i.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(i.icon)},null,2)):e.createCommentVNode("",!0),i.imgUrl?(e.openBlock(),e.createElementBlock("img",{key:1,src:i.imgUrl,width:"16",height:"16",alt:"icon"},null,8,bh)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(i.label),1)])])],2))}}),kh={class:"flex items-center"},Tr=e.defineComponent({__name:"vs-input-checkbox-item",props:{value:{default:""},label:{default:""},disabled:{type:Boolean,default:!1},view:{default:"default"},modelValue:{type:[Boolean,Array],default:!1},icon:{},imgUrl:{},slots:{},option:{},style:{},error:{default:""}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,r=t,n=`radio-${Math.floor(Math.random()*1e4)}`,o=e.computed({get:()=>Array.isArray(a.modelValue)?Array.isArray(a.modelValue)&&a.modelValue.includes(a.value):a.modelValue,set:i=>{if(Array.isArray(a.modelValue)){let c=[...a.modelValue];i?c.includes(a.value)||c.push(a.value):c=c.filter(u=>u!==a.value),r("update:modelValue",c)}else r("update:modelValue",i)}}),s=e.ref(`vs-checkbox-${a.view||"default"}`);return(i,c)=>{var u;return e.openBlock(),e.createElementBlock("div",kh,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value==="vs-checkbox-buttons"?e.unref(yh):e.unref(ph)),{value:i.value,label:i.label,info:(u=i.option)==null?void 0:u.info,disabled:i.disabled,modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=d=>o.value=d),id:n,icon:i.icon,imgUrl:i.imgUrl,style:e.normalizeStyle(i.style),error:i.error},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.label),1)]),_:1},8,["value","label","info","disabled","modelValue","icon","imgUrl","style","error"]))])}}}),xh={},wh={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-chevron-down"};function _h(l,t){return e.openBlock(),e.createElementBlock("svg",wh,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Eh=_e(xh,[["render",_h]]),Ch={},Vh={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"};function Nh(l,t){return e.openBlock(),e.createElementBlock("svg",Vh,t[0]||(t[0]=[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)]))}const vh=_e(Ch,[["render",Nh]]),Bh={},Sh={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"};function Dh(l,t){return e.openBlock(),e.createElementBlock("svg",Sh,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M12 9h.01"},null,-1),e.createElementVNode("path",{d:"M11 12h1v4h1"},null,-1),e.createElementVNode("path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z"},null,-1)]))}const Ah=_e(Bh,[["render",Dh]]),Mh={key:0,class:"flex items-start gap-x-1"},Th={key:0,class:"text-red-500 text-[14px]"},Lh=["title"],$h=["disabled"],Xo=e.defineComponent({__name:"vs-input-switcher",props:e.mergeModels({rules:{default:()=>[]},view:{default:"checkbox"},label:{default:""},i:{default:""},text:{default:""},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue");return(r,n)=>{var o,s;return t.view==="checkbox"?(e.openBlock(),e.createElementBlock("div",Mh,[e.createVNode(Tr,{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=i=>a.value=i),label:r.text,error:r.error||""},null,8,["modelValue","label","error"]),(o=r.rules)!=null&&o.includes("required")?(e.openBlock(),e.createElementBlock("span",Th,"*")):e.createCommentVNode("",!0),r.i?(e.openBlock(),e.createElementBlock("button",{key:1,class:"cursor-pointer",title:r.i,onClick:n[1]||(n[1]=e.withModifiers(()=>{},["prevent"]))},[e.createVNode(e.unref(Ah),{class:"text-gray-500 w-[14px] h-[14px]"})],8,Lh)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:e.normalizeClass(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50",[a.value?`bg-${((s=r.style)==null?void 0:s.primaryColor)||"blue"}-500`:"bg-stone-200",r.customClass]]),disabled:r.disabled,onClick:n[2]||(n[2]=i=>a.value=!a.value)},[e.createElementVNode("span",{"data-state":"checked",class:e.normalizeClass(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform",[a.value?"translate-x-4":"translate-x-0"]])},null,2)],10,$h))}}}),Fh=["id","innerHTML"],Zo=e.defineComponent({__name:"vs-input-static",props:{text:{default:""},html:{default:""},style:{},customClass:{default:""},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",{id:t.name,class:e.normalizeClass(["text-gray-900",t.customClass]),innerHTML:t.html?t.html:t.text},null,10,Fh))}}),Ih=["placeholder","disabled","name"],Oh=e.defineComponent({__name:"vs-input-mask",props:e.mergeModels({name:{},mask:{default:""},unmask:{type:Boolean,default:!1},placeholder:{default:"_"},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),r=e.useModel(l,"modelValue"),n=e.ref(null);let o=null;return e.onMounted(async()=>{if(n.value){const{default:s}=await Promise.resolve().then(()=>l4);o=s(n.value,{mask:t.mask||"",definitions:{9:/[0-9]/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},lazy:!1}),o.on("accept",()=>{r.value=t.unmask?o.unmaskedValue:o.value}),o.on("complete",()=>{r.value=t.unmask?o.unmaskedValue:o.value}),o.value=r.value??""}}),e.onBeforeUnmount(()=>{o==null||o.destroy()}),e.watch(()=>t.mask,s=>{o&&o.updateOptions({mask:s,definitions:{9:/[0-9]/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/}})}),e.watch(r,s=>{o&&o.unmaskedValue!==s&&(o.value=s||"")}),(s,i)=>(e.openBlock(),e.createElementBlock("input",{type:"text",ref_key:"inputEl",ref:n,placeholder:s.placeholder,disabled:s.disabled,name:s.name,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"}},null,10,Ih))}}),Ph={class:"relative w-full bg-white rounded-lg"},Rh=["placeholder","disabled"],Uh=e.defineComponent({__name:"vs-input-email",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:null},name:{},placeholder:{default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),r=e.useModel(l,"modelValue");return(n,o)=>(e.openBlock(),e.createElementBlock("div",Ph,[o[1]||(o[1]=e.createStaticVNode('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>',1)),e.withDirectives(e.createElementVNode("input",{type:"email","onUpdate:modelValue":o[0]||(o[0]=s=>r.value=s),placeholder:n.placeholder,disabled:n.disabled,class:e.normalizeClass(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":n.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,Rh),[[e.vModelText,r.value]])]))}}),jh=["value","disabled"],zh={class:"text-[13px] text-gray-700"},Hh=e.defineComponent({__name:"vs-input-radio-default",props:e.mergeModels({style:{},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{},value:{},text:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),r=e.computed(()=>!!t.disabled);return(n,o)=>{var s,i;return e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["flex items-center gap-0",[t.customClass,r.value?"cursor-not-allowed opacity-60":""]])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=c=>a.value=c),type:"radio",value:t.value,disabled:r.value,class:"hidden"},null,8,jh),[[e.vModelRadio,a.value]]),e.createElementVNode("span",{class:e.normalizeClass(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]",[`border-${((s=t.style)==null?void 0:s.primaryColor)||"blue"}-500`,r.value?"opacity-50 cursor-not-allowed":""]])},[a.value==t.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["w-[12px] h-[12px] shrink-0 rounded-full",[`bg-${((i=t.style)==null?void 0:i.primaryColor)||"blue"}-500`]])},null,2)):e.createCommentVNode("",!0)],2),e.createElementVNode("span",zh,e.toDisplayString(t.text),1)],2)}}}),qh=["value","disabled"],Gh={class:"text-[13px] text-gray-700"},Wh=e.defineComponent({__name:"vs-input-radio-buttons",props:e.mergeModels({style:{},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{},value:{},text:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),r=e.computed(()=>!!t.disabled);return(n,o)=>{var s;return e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["flex items-center border rounded-lg px-2 py-1",[a.value==t.value?`ring-2 ring-ring ring-${((s=t.style)==null?void 0:s.primaryColor)||"blue"}-500`:"",t.customClass,r.value?"cursor-not-allowed opacity-60":""]])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>a.value=i),type:"radio",value:t.value,disabled:r.value,class:"hidden"},null,8,qh),[[e.vModelRadio,a.value]]),e.createElementVNode("span",Gh,e.toDisplayString(t.text),1)],2)}}}),Kh={"vs-input-radio-default":Hh,"vs-input-radio-buttons":Wh},Qo=e.defineComponent({__name:"vs-input-radio",props:e.mergeModels({options:{},position:{default:"vertical"},view:{default:"default"},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),r=e.computed(()=>Kh[`vs-input-radio-${t.view}`]);return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([n.position==="horizontal"?"flex items-center flex-wrap gap-2":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,s=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),e.mergeProps({key:s==null?void 0:s.id,text:s.text,value:s.id.toString(),checked:a.value===s.id,modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=i=>a.value=i)},{ref_for:!0},n.$attrs),null,16,["text","value","checked","modelValue"]))),128))],2))}}),Yh={key:1,class:"w-full flex flex-col gap-4"},Xh={key:0,class:"text-sm font-medium text-muted-foreground my-2"},Zh="Без категорії",Qh=e.defineComponent({__name:"vs-input-checkbox",props:{options:{default:()=>[]},position:{default:"vertical"},slots:{default:null},colSpan:{default:0},data:{},view:{},group:{default:void 0},values:{default:()=>[]},style:{},customClass:{},disabled:{type:Boolean},modelValue:{default:!1},error:{},name:{},placeholder:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,r=t,n=e.ref([]),o=e.reactive({}),s=p=>(p==null?void 0:p.value)||(p==null?void 0:p.id)||(p==null?void 0:p.text)||p,i=p=>p.text||String(p),c=p=>`lg:col-span-${p||12}`,u=e.computed(()=>[a.position==="vertical"?"flex flex-col":"",a.colSpan?"grid":"flex justify-start"]),d=p=>p==null||p===""?null:typeof p=="string"||typeof p=="number"?p:String(p),m=e.computed(()=>{var w;if(!a.group)return[];const p=new Map;n.value.forEach(x=>{var N;const k=x[a.group],_=d(k);p.has(_)||p.set(_,[]),(N=p.get(_))==null||N.push(x)});const y=[];(w=a.values)!=null&&w.length&&a.values.forEach(x=>{const k=d(x);y.push(k)});const h=new Set,g=x=>{const k=p.get(x)||[];if(!k.length)return null;const _=x===null?"group-null":`group-${String(x)}`,N=x===null?Zh:String(x);return h.add(x),{key:_,label:N,options:k}},b=[];return y.forEach(x=>{const k=g(x);k&&b.push(k)}),p.forEach((x,k)=>{if(h.has(k))return;const _=g(k);_&&b.push(_)}),b}),f=async()=>{try{const p=await fetch(`/api/suggest/${a.data}`).then(y=>y.json());n.value=(p==null?void 0:p.data)||p}catch(p){console.error(p)}};return e.watch(()=>a.modelValue,p=>{if(typeof p=="boolean"&&n.value.length===1){const y=s(n.value[0]);o[y]=p}else if(Array.isArray(p)){const y=new Set(p);n.value.forEach(h=>{if(!h.disabled){const g=s(h);o[g]=y.has(g)}})}},{immediate:!0}),e.watch(o,()=>{if(!n.value.length){r("update:modelValue",null);return}const p=Object.entries(o).filter(([,y])=>y).map(([y])=>y);r("update:modelValue",p.length===0?[]:p)},{deep:!0}),e.onMounted(()=>{if(a.data)f().then(()=>{if(typeof a.modelValue=="boolean"&&n.value.length===1){const p=s(n.value[0]);o[p]=a.modelValue}else if(Array.isArray(a.modelValue)){const p=new Set(a.modelValue);n.value.forEach(y=>{if(!y.disabled){const h=s(y);o[h]=p.has(h)}})}});else if(n.value=a.options,typeof a.modelValue=="boolean"&&n.value.length===1){const p=s(n.value[0]);o[p]=a.modelValue}else if(Array.isArray(a.modelValue)){const p=new Set(a.modelValue);n.value.forEach(y=>{if(!y.disabled){const h=s(y);o[h]=p.has(h)}})}}),(p,y)=>a.group?(e.openBlock(),e.createElementBlock("div",Yh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,h=>(e.openBlock(),e.createElementBlock("div",{key:h.key,class:"flex flex-col gap-2"},[h.label?(e.openBlock(),e.createElementBlock("span",Xh,e.toDisplayString(h.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["p-0 w-full gap-[12px]",u.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.options,g=>(e.openBlock(),e.createBlock(Tr,{modelValue:o[s(g)],"onUpdate:modelValue":b=>o[s(g)]=b,value:s(g),class:e.normalizeClass(c(p.colSpan)),disabled:a.disabled||g.disabled,label:i(g),key:`${h.key}-${s(g)}`,icon:g==null?void 0:g.icon,imgUrl:g==null?void 0:g.imgUrl,option:g,view:p.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","view"]))),128))],2)]))),128))])):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["p-0 w-full gap-[10px]",u.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,h=>(e.openBlock(),e.createBlock(Tr,{modelValue:o[s(h)],"onUpdate:modelValue":g=>o[s(h)]=g,value:s(h),class:e.normalizeClass(c(p.colSpan)),disabled:a.disabled||h.disabled,label:i(h),key:s(h),icon:h==null?void 0:h.icon,imgUrl:h==null?void 0:h.imgUrl,option:h,view:p.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","view"]))),128))],2))}}),Jo=_e(Qh,[["__scopeId","data-v-8e66207e"]]),Jh=["type","placeholder","disabled"],e0=e.defineComponent({__name:"vs-input-date1",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},mode:{default:"date"}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l;function r(d){return d?a.mode==="datetime"?(d.includes("T")?d:null)||d+(d.includes(" ")?"":"T00:00"):d==null?void 0:d.split(" ")[0]:null}const{inputClass:n}=ft(a.style),o=t,s=e.computed({get:()=>r(a.modelValue),set:d=>o("update:modelValue",d)}),i=e.computed(()=>a.mode==="datetime"?"datetime-local":a.mode),c=e.computed(()=>!!a.disabled),u=e.computed(()=>a.placeholder??"");return(d,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:i.value,"onUpdate:modelValue":m[0]||(m[0]=f=>s.value=f),placeholder:u.value,disabled:c.value,ref:"date",class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[d.modelValue?"":"text-opacity-50",e.unref(n)].join(" ")]),style:{border:"1px solid #CFD9E0"}},null,10,Jh)),[[e.vModelDynamic,s.value]])}}),es=async(l,t,a,r)=>{var n;try{const o=new FormData;return o.append("unique","true"),o.append("file",l),(n=await fetch(`/file/upload/uploads?id=${t||""}&form=${a||""}&table=${r||""}`,{method:"POST",body:o}).then(s=>s.json()))==null?void 0:n.result}catch(o){return xe({type:"error",title:"Помилка!",message:"Сталась помилка під час завантаження файлу",position:"right-bottom"}),console.error("Сталась помилка завантаження файлу",o),null}},t0=async l=>{try{return await fetch(`file/delete${l}`),!0}catch(t){return console.error(t),!1}},ts=async l=>{try{const t=await fetch(`file/download/files/uploads${l}`),a=await t.arrayBuffer(),r=t.headers["content-type"],n=new TextDecoder("utf-8").decode(a),o=new Blob([n],{type:r}),s=document.createElement("a");s.setAttribute("download",l),s.href=window.URL.createObjectURL(o),s.click()}catch(t){console.error(t.message)}},l0={},a0={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"};function r0(l,t){return e.openBlock(),e.createElementBlock("svg",a0,t[0]||(t[0]=[e.createElementVNode("path",{d:"M5 12h14"},null,-1),e.createElementVNode("path",{d:"M12 5v14"},null,-1)]))}const Gl=_e(l0,[["render",r0]]),n0={},o0={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-text",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function s0(l,t,a,r,n,o){return e.openBlock(),e.createElementBlock("svg",o0,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>',6)]))}const i0=_e(n0,[["render",s0]]),c0={},d0={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-table",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function u0(l,t,a,r,n,o){return e.openBlock(),e.createElementBlock("svg",d0,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"},null,-1),e.createElementVNode("line",{x1:"4",y1:"10",x2:"20",y2:"10"},null,-1),e.createElementVNode("line",{x1:"10",y1:"4",x2:"10",y2:"20"},null,-1)]))}const m0=_e(c0,[["render",u0]]),p0={},f0={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"};function h0(l,t){return e.openBlock(),e.createElementBlock("svg",f0,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M9 9l1 0"></path><path d="M9 13l6 0"></path><path d="M9 17l6 0"></path>',6)]))}const ls=_e(p0,[["render",h0]]),g0={},b0={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-zip",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function y0(l,t,a,r,n,o){return e.openBlock(),e.createElementBlock("svg",b0,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>',9)]))}const k0=_e(g0,[["render",y0]]),x0={},w0={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-code",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _0(l,t,a,r,n,o){return e.openBlock(),e.createElementBlock("svg",w0,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>',5)]))}const E0=_e(x0,[["render",_0]]),C0=l=>{if(!l)return"";const t=l==null?void 0:l.split(".");return t[t.length-1]},V0=l=>{const t=C0(l),a={imageFormat:["tiff","jpg","jpeg","png","svg","ico","webp"],sheetsFormat:["xls","csv","xlsx"],archivesFormat:["zip","rar"],textsFormat:["json","geojson","txt","yml","yaml","shp"],documentsFormat:["pdf"]};return a.imageFormat.includes(t)?"img":a.sheetsFormat.includes(t)?m0:a.textsFormat.includes(t)?E0:a.documentsFormat.includes(t)?i0:a.archivesFormat.includes(t)?k0:ls},N0={},v0={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-trash"};function B0(l,t){return e.openBlock(),e.createElementBlock("svg",v0,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>',6)]))}const va=_e(N0,[["render",B0]]),S0={},D0={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function A0(l,t){return e.openBlock(),e.createElementBlock("svg",D0,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const as=_e(S0,[["render",A0]]),M0=["title"],T0={class:"absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center"},L0=e.defineComponent({__name:"vs-input-file-list-item",props:e.mergeModels({format:{},multiple:{type:Boolean},max_size:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},{value:{},valueModifiers:{},item:{},itemModifiers:{}}),emits:["update:value","update:item"],setup(l){const t=e.useModel(l,"value"),a=e.useModel(l,"item"),r=l;return(n,o)=>(e.openBlock(),e.createElementBlock("div",{title:a.value,class:"h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(V0)(a.value)),{src:a.value,alt:"file",class:"w-full h-full object-cover cursor-pointer",onClick:o[0]||(o[0]=s=>e.unref(ts)(a.value))},null,8,["src"])),e.createElementVNode("div",T0,[e.createElementVNode("button",{type:"button",onClick:o[1]||(o[1]=s=>{var i;e.unref(t0)(a.value),t.value=r.multiple?(i=t.value)==null?void 0:i.filter(c=>c!==a.value):""}),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"},[e.createVNode(va,{class:"w-4 h-4"})]),e.createElementVNode("button",{type:"button",onClick:o[2]||(o[2]=s=>e.unref(ts)(a.value)),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"},[e.createVNode(as,{class:"w-4 h-4"})])])],8,M0))}}),rs=_e(L0,[["__scopeId","data-v-286cdbc0"]]),$0={class:"flex items-center gap-x-2"},F0=["multiple","disabled"],I0={key:1,class:"flex items-center flex-wrap gap-2"},O0={key:1,class:"loader"},P0={key:1,class:"loader"},R0=e.defineComponent({__name:"vs-input-file",props:e.mergeModels({format:{},multiple:{type:Boolean},max_size:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(l,{emit:t}){const a=l,r=e.useModel(l,"modelValue"),n=t,o=e.ref(null),s=e.ref(!1),i=d=>Array.isArray(r.value)&&r.value[d]||"",c=d=>{if(a.max_size&&d.size>a.max_size*1024*1024){const m=(d.size/1048576).toFixed(2);return xe({type:"error",title:"Помилка!",message:`Файл "${d.name}" занадто великий. Максимальний розмір: ${a.max_size} МБ, розмір файлу: ${m} МБ`,position:"right-bottom"}),!1}return!0},u=async d=>{const{files:m}=d.target;if(!m||m.length===0)return;const f=Array.from(m);if(a.max_size&&f.filter(p=>!c(p)).length>0){o.value&&(o.value.value="");return}s.value=!0;try{if(a.multiple){const p=Array.from(m).map(async h=>a.format&&!h.name.endsWith(a.format)?null:await es(h,"1","form","table")),y=(await Promise.all(p)).filter(h=>h!==null).map(h=>h==null?void 0:h.file_path).filter(Boolean);r.value=[...r.value||[],...y],n("change",r.value)}else{const p=m[0];if(a.format&&!p.name.endsWith(a.format))return;const y=await es(p,"1","form","table");r.value=y==null?void 0:y.file_path,n("change",r.value||"")}}finally{s.value=!1,o.value&&(o.value.value="")}};return(d,m)=>(e.openBlock(),e.createElementBlock("div",$0,[e.createElementVNode("input",{class:"hidden",ref_key:"fileInput",ref:o,type:"file",multiple:d.multiple,onChange:u,disabled:s.value||d.disabled},null,40,F0),!d.multiple&&r.value?(e.openBlock(),e.createBlock(rs,{key:0,item:r.value,"onUpdate:item":m[0]||(m[0]=f=>r.value=f),value:r.value,"onUpdate:value":m[1]||(m[1]=f=>r.value=f)},null,8,["item","value"])):d.multiple?(e.openBlock(),e.createElementBlock("div",I0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,p)=>(e.openBlock(),e.createBlock(rs,{multiple:d.multiple,key:p,value:r.value,"onUpdate:value":m[2]||(m[2]=y=>r.value=y),item:i(p)},null,8,["multiple","value","item"]))),128)),e.createElementVNode("div",{onClick:m[3]||(m[3]=f=>{var p;return!d.disabled&&!s.value&&((p=o.value)==null?void 0:p.click())}),class:e.normalizeClass(["relative h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",d.disabled||s.value?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500 hover:bg-blue-50"])},[s.value?(e.openBlock(),e.createElementBlock("div",O0)):(e.openBlock(),e.createBlock(Gl,{key:0,class:"w-6 h-6"}))],2)])):e.createCommentVNode("",!0),d.multiple?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:m[4]||(m[4]=f=>{var p;return(p=o.value)==null?void 0:p.click()}),class:e.normalizeClass([d.disabled||s.value?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500","relative h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])},[s.value?(e.openBlock(),e.createElementBlock("div",P0)):(e.openBlock(),e.createBlock(Gl,{key:0,class:"w-6 h-6"}))],2))]))}}),U0=_e(R0,[["__scopeId","data-v-e613a523"]]),j0={class:"max-w-[55vw]"},z0={class:"text-sm font-semibold text-gray-800 truncate dark:text-neutral-200"},H0={class:"flex items-center text-xs text-gray-500 truncate dark:text-neutral-500"},q0={class:"px-[5px]"},G0={class:""},Ba=e.defineComponent({__name:"vs-widget-file-info",props:{item:{default:null}},setup(l){const t=l,a=e.computed(()=>{try{return new Date(t.item.cdate).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}});function r(n){if(n<1024)return`${n} B`;const o=n/1024;return o<1024?`${o.toFixed(2)} KB`:`${(o/1024).toFixed(2)} MB`}return(n,o)=>{var s,i,c,u;return e.openBlock(),e.createElementBlock(e.Fragment,null,[o[1]||(o[1]=e.createStaticVNode('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" 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-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>',1)),e.createElementVNode("div",j0,[e.createElementVNode("p",z0,e.toDisplayString((s=n.item)==null?void 0:s.uploaded_name),1),e.createElementVNode("p",H0,[e.createElementVNode("span",null,e.toDisplayString((i=n.item)==null?void 0:i.username),1),e.withDirectives(e.createElementVNode("span",q0,"|",512),[[e.vShow,(c=n.item)==null?void 0:c.username]]),e.createElementVNode("span",null,e.toDisplayString(a.value),1),o[0]||(o[0]=e.createElementVNode("span",{class:"px-[5px]"},"|",-1)),e.createElementVNode("span",G0,e.toDisplayString(r((u=n.item)==null?void 0:u.size)),1)])])],64)}}}),W0={class:"p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full"},K0={key:0,class:"flex w-full gap-x-3 items-center"},Y0={key:1,class:"flex gap-x-3 w-full items-center"},X0={key:2,class:"flex gap-x-3 w-full items-center"},Z0=["href"],Q0={key:3,class:"flex gap-x-3 w-full items-center"},J0={class:"lg:absolute lg:top-3 lg:end-1 opacity-100"},eg={class:"p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700"},tg={class:"inline-block"},lg={class:"inline-block"},ag=e.defineComponent({__name:"vs-widget-file-item",props:{item:{default:null},index:{default:0},prefix:{default:"/api"}},emits:["update","openModal","openLightbox"],setup(l,{emit:t}){const a=l,r=t;function n(d){return["pdf","json"].includes(d.ext)}function o(d){return["ppt","pptx","doc","docx","xls","xlsx"].includes(d.ext)}function s(d){const m=document.createElement("a");m.setAttribute("download",d==null?void 0:d.uploaded_name),m.href=d==null?void 0:d.file_path,m.click()}async function i(){try{await fetch(`${a.prefix}/widget/file/${a.item.entity_id}/${a.item.file_id}`),r("update")}catch(d){console.error(d)}}function c(){r("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:i,updateListOnConfirm:!0})}function u(d){(a.item.ext==="jpg"||a.item.ext==="png")&&r("openLightbox",{item:a.item,index:d})}return(d,m)=>(e.openBlock(),e.createElementBlock("div",W0,[d.item.ext==="jpg"||d.item.ext==="png"?(e.openBlock(),e.createElementBlock("div",K0,[e.createElementVNode("div",{class:"max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",onClick:m[0]||(m[0]=f=>u(d.index))},[e.createVNode(Ba,{item:d.item},null,8,["item"])])])):n(d.item)?(e.openBlock(),e.createElementBlock("div",Y0,[e.createVNode(Ba,{item:d.item},null,8,["item"])])):o(d.item)?(e.openBlock(),e.createElementBlock("div",X0,[e.createElementVNode("a",{href:`/api/file-preview?id=${d.item.file_id}`,target:"_blank",class:"flex gap-x-3 w-full items-center"},[e.createVNode(Ba,{item:d.item},null,8,["item"])],8,Z0)])):(e.openBlock(),e.createElementBlock("div",Q0,[e.createVNode(Ba,{item:d.item},null,8,["item"])])),e.createElementVNode("div",J0,[e.createElementVNode("div",eg,[e.createElementVNode("div",tg,[e.createElementVNode("button",{class:"inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:m[1]||(m[1]=f=>s(d.item))},[e.createVNode(as,{height:"14",width:"14"})])]),m[3]||(m[3]=e.createElementVNode("div",{class:"w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700"},null,-1)),e.createElementVNode("div",lg,[e.createElementVNode("button",{type:"button",class:"size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",onClick:m[2]||(m[2]=f=>c())},[e.createVNode(va,{height:"14",width:"14"})])])])])]))}}),rg={},ng={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function og(l,t){return e.openBlock(),e.createElementBlock("svg",ng,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const sg=_e(rg,[["render",og]]),ig={class:"flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full"},cg={class:"flex w-full mb-[12px] items-center gap-x-2"},dg={class:"font-semibold text-gray-800 dark:text-neutral-200 text-[14px]"},ug={class1:"ml-auto"},mg={class:"py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},pg={key:0,class:"py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"},fg={class:"relative"},hg={key:1,class:"space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},gg={key:0},bg=e.defineComponent({__name:"vs-input-file-list",props:{id:{default:""},prefix:{default:"/api"},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},emits:["update"],setup(l,{emit:t}){const a=l,r=e.inject("form"),n=e.computed(()=>r.value.formId),o=e.ref(!1),s=e.ref(0),i=t,c=e.ref(!1),u=e.ref({}),d=e.ref([]),m=e.ref(""),f=e.computed(()=>Array.isArray(d.value)?d.value.filter(x=>x.ext==="jpg"||x.ext==="png").map(x=>x==null?void 0:x.file_path):[]),p=e.computed(()=>m.value===""?d.value:d.value.filter(x=>{var k;return(k=x==null?void 0:x.uploaded_name)==null?void 0:k.includes(m.value)})),y=x=>{const k=f.value.findIndex(_=>_===x.item.file_path);k!==-1&&(o.value=!0,s.value=k)},h=async()=>{try{const x=await fetch(`${a.prefix}/widget/file/${n.value}`).then(k=>k.json());d.value=x==null?void 0:x.rows}catch(x){console.error(x)}},g=async x=>{await Promise.all(Array.from(x.target.files).map(async k=>{const _=new FormData;_.append("file",k);try{const N=`${a.prefix}/widget/file/${n.value}`,V=await fetch(N,{method:"POST",body:_});return V.ok?(i("update","file-list"),k):(xe({type:V.status>=400&&V.status<500?"warning":"error",title:"Error",message:`Error code: ${V.status}`}),null)}catch(N){return xe({type:"error",title:"Error",message:N.message||"Unknown error"}),console.error(N),null}})),await h()},b=x=>{const k={...x};return x.cancel||(k.cancel=()=>{c.value=!1}),x.updateListOnConfirm&&(k.confirm=async()=>{await x.confirm(),c.value=!1,h()}),k},w=x=>{u.value=b(x),c.value=!0};return e.watch(n,x=>{x&&h()}),e.onMounted(()=>{n.value&&h()}),(x,k)=>{var V,P,$;const _=e.resolveComponent("Lightbox"),N=e.resolveComponent("MessageBox");return e.openBlock(),e.createElementBlock("div",ig,[e.createElementVNode("div",cg,[e.createElementVNode("h2",dg," Файлів: "+e.toDisplayString((V=d.value)==null?void 0:V.length),1),e.createElementVNode("div",ug,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:k[0]||(k[0]=M=>g(M))},null,32),e.createElementVNode("div",mg,[e.createVNode(sg,{height:"16",width:"16"})])])])]),((P=d.value)==null?void 0:P.length)>4?(e.openBlock(),e.createElementBlock("div",pg,[e.createElementVNode("div",null,[e.createElementVNode("div",fg,[k[8]||(k[8]=e.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5"},[e.createElementVNode("svg",{class:"flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",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"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),e.createElementVNode("path",{d:"m21 21-4.3-4.3"})])],-1)),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":k[1]||(k[1]=M=>m.value=M),class:"py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Введіть назву файлу"},null,512),[[e.vModelText,m.value,void 0,{trim:!0}]])])])])):e.createCommentVNode("",!0),($=d.value)!=null&&$.length?(e.openBlock(),e.createElementBlock("div",hg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(M,A)=>(e.openBlock(),e.createBlock(ag,{key:A,prefix:x.prefix,item:M,index:A,onUpdate:k[2]||(k[2]=q=>x.$emit("update","file-list")),onOpenModal:k[3]||(k[3]=q=>w(q)),onOpenLightbox:k[4]||(k[4]=q=>y(q))},null,8,["prefix","item","index"]))),128)),p.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",gg,k[9]||(k[9]=[e.createElementVNode("p",{class:"text-sm text-gray-600 font-sm"}," Файлів з такою назвою не існує, введіть інше пошукове слово ",-1)])))])):e.createCommentVNode("",!0),e.createVNode(_,{modelValue:o.value,"onUpdate:modelValue":k[5]||(k[5]=M=>o.value=M),startIndex:s.value,"onUpdate:index":k[6]||(k[6]=M=>s.value=M),images:f.value},null,8,["modelValue","startIndex","images"]),e.createVNode(N,e.mergeProps({modelValue:c.value,"onUpdate:modelValue":k[7]||(k[7]=M=>c.value=M),onConfirm:u.value.confirm},u.value),null,16,["modelValue","onConfirm"])])}}}),yg={class:"flex items-center justify-between"},kg={class:"text-[16px] text-gray-900 font-medium"},xg={class:"grid gap-3"},wg=e.defineComponent({__name:"vs-container-switcher",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(l){const t=l,a=e.ref(t.isOpen);return e.watch(()=>t.isOpen,r=>{a.value=r}),(r,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",yg,[e.createElementVNode("p",kg,e.toDisplayString(l.title),1),e.createVNode(Xo,{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=o=>a.value=o),style:e.normalizeStyle(l.style)},null,8,["modelValue","style"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",xg,[e.renderSlot(r.$slots,"default",{},void 0,!0)],512),[[e.vShow,a.value]])]),_:3})]))}}),_g=_e(wg,[["__scopeId","data-v-90320b87"]]),Eg={class:"text-[16px] text-gray-900 font-medium"},Cg={class:"grid gap-3"},Vg=e.defineComponent({__name:"vs-container-accordion",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(l){const t=l,a=e.ref(t.isOpen);return e.watch(()=>t.isOpen,r=>{a.value=r}),(r,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{type:"button",onClick:n[0]||(n[0]=o=>a.value=!a.value),class:"flex items-center gap-2"},[e.createVNode(e.unref(Eh),{class:e.normalizeClass(["h-4 w-4 duration-300",[a.value?"-rotate-180":""]])},null,8,["class"]),e.createElementVNode("span",Eg,e.toDisplayString(l.title),1)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Cg,[e.renderSlot(r.$slots,"default",{},void 0,!0)],512),[[e.vShow,a.value]])]),_:3})]))}}),Ng=_e(Vg,[["__scopeId","data-v-590eff11"]]),vg={class:"flex items-center justify-between"},Bg=e.defineComponent({__name:"vs-container-default",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",vg,[e.createElementVNode("p",null,e.toDisplayString(l.title),1)]),e.renderSlot(t.$slots,"default")]))}}),Sg={switcher:_g,accordion:Ng,default:Bg},wt={Equal:"==",Inequal:"!=",Higer:">",HigerOrEqual:">=",Lower:"<",LowerOrEqual:"<=",Between:"between",StartWith:"^",EndWith:"$",Contain:"*",In:"in",NotIn:"not_in"},Dg=(l,t)=>String(l)===String(t),Ag=(l,t)=>String(l)!==String(t),Mg=(l,t)=>l>t,Tg=(l,t)=>l>=t,Lg=(l,t)=>l<t,$g=(l,t)=>l<=t,Fg=(l,t)=>Array.isArray(t)&&t.length===2?l>=t[0]&&l<=t[1]:!1,Ig=(l,t)=>String(l).startsWith(String(t)),Og=(l,t)=>String(l).endsWith(String(t)),Pg=(l,t)=>String(l).includes(String(t)),Rg=(l,t)=>Array.isArray(t)?t.includes(l):!1,Ug=(l,t)=>Array.isArray(t)?!t.includes(l):!0,ns=(l,t)=>{if(!t)return!0;switch(t==null?void 0:t[1]){case wt.Equal:return Dg(l,t==null?void 0:t[2]);case wt.Inequal:return Ag(l,t==null?void 0:t[2]);case wt.Higer:return Mg(l,t==null?void 0:t[2]);case wt.HigerOrEqual:return Tg(l,t==null?void 0:t[2]);case wt.Lower:return Lg(l,t==null?void 0:t[2]);case wt.LowerOrEqual:return $g(l,t==null?void 0:t[2]);case wt.Between:return Fg(l,t==null?void 0:t[2]);case wt.StartWith:return Ig(l,t==null?void 0:t[2]);case wt.EndWith:return Og(l,t==null?void 0:t[2]);case wt.Contain:return Pg(l,t==null?void 0:t[2]);case wt.In:return Rg(l,t==null?void 0:t[2]);case wt.NotIn:return Ug(l,t==null?void 0:t[2]);default:return!0}},jg=e.defineComponent({__name:"vs-input-container",props:{style:{type:Object,default:()=>({})},title:{type:String,default:""},view:{type:String,default:"default"},name:{type:String,default:""},schema:{type:Array,default:()=>[]}},setup(l){const t=l,a=e.inject("values",e.ref({})),r=e.inject("form"),n=e.computed(()=>{var i;return(i=t.schema)==null?void 0:i.filter(c=>{var f,p,y,h;const u=c==null?void 0:c.conditions;if(!u)return!0;const d=Array.isArray(u)?u[0]:u,m=t.name?((p=(f=a.value)==null?void 0:f[t.name])==null?void 0:p[d])??((y=a.value)==null?void 0:y[d]):(h=a.value)==null?void 0:h[d];return ns(m,u)})}),o=e.computed(()=>Sg[t.view]),s=e.computed(()=>{if(a.value||(a.value={}),!t.name)return a.value;const i=a.value[t.name];if(i)return i;const c={};return a.value={...a.value,[t.name]:c},c});return(i,c)=>{var u;return(u=l.schema)!=null&&u.length?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value),{key:0,title:l.title,style:e.normalizeStyle(l.style)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,d=>{var m,f;return e.openBlock(),e.createBlock(ss,e.mergeProps({key:d.name},{ref_for:!0},d,{item:d,modelValue:s.value[d.name],"onUpdate:modelValue":p=>s.value[d.name]=p,style:l.style,error:(f=(m=e.unref(r))==null?void 0:m.errors)==null?void 0:f[d.name]}),null,16,["item","modelValue","onUpdate:modelValue","style","error"])}),128))]),_:1},8,["title","style"])):e.createCommentVNode("",!0)}}}),zg=["aria-expanded","data-focus"],Hg={key:0,class:"flex flex-wrap items-center gap-1 overflow-y-auto min-w-0 flex-1"},qg={class:"flex items-center min-w-0"},Gg=["title"],Wg=["innerHTML"],Kg=["onClick"],Yg={class:"flex-1 min-w-[2px]"},Xg=["placeholder"],Zg=["title"],Qg=["innerHTML"],Jg={key:2,class:"flex-1 min-w-[2px]"},eb=["placeholder"],tb={class:"flex items-center shrink-0"},lb=["disabled"],ab=["disabled","title"],rb=["aria-disabled","onClick"],nb=["innerHTML"],ob={key:1,class:"px-3 py-2 text-center text-gray-500"},sb=["disabled"],Lr=e.defineComponent({__name:"vs-input-select",props:{multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},mode:{},defaultValue:{},search:{type:Boolean,default:!0},placeholder:{default:"Оберіть значення"},prefix:{default:"api"},host:{default:""},data:{default:""},options:{default:()=>[]},api:{default:null},maxHeight:{default:400},parent:{},set:{},slot:{},add:{},teleport:{default:"body"},auto:{default:0},style:{default:()=>({})},customClass:{default:""},modelValue:{},error:{default:null},name:{}},emits:["change","update:modelValue"],setup(l,{emit:t}){const a=l,r=t,n=e.computed(()=>a.multiple),o=e.computed(()=>a.disabled);ft(a.style);const s=e.computed({get:()=>a.modelValue,set:B=>r("update:modelValue",B)});!s.value&&a.defaultValue&&(s.value=a.defaultValue);const i=e.ref(null),c=e.ref(null),u=e.ref(null),d=e.ref(null),m=e.ref(!1),f=e.ref(!1),p=e.ref(null),y=e.ref([]),h=e.ref(-1),g=e.ref([]),b=e.ref(""),w=e.ref(null),x=e.ref("bottom"),k=e.ref({}),_=e.ref([]),N=e.computed(()=>{if(!_.value.length)return[];const B=y.value,T=new Map(B.map(K=>{var te;return[(te=K.id)==null?void 0:te.toString(),K]}));return _.value.map(K=>T.get(K==null?void 0:K.toString())).filter(K=>!!K)}),V=e.computed(()=>a.placeholder||"Select..."),P=e.computed(()=>D(p.value));e.computed(()=>n.value?!_.value.length&&b.value==="":!P.value&&b.value==="");const $=e.computed(()=>o.value?!1:n.value?_.value.length>0:!!s.value),M=B=>{var T;return n.value?_.value.some(K=>(K==null?void 0:K.toString())===(B==null?void 0:B.toString())):((T=s.value)==null?void 0:T.toString())===(B==null?void 0:B.toString())},A=e.computed(()=>{let B=y.value??[];if(!a.data&&b.value.trim()!==""){const T=b.value.toLowerCase();B=B.filter(K=>{var we,Oe;const te=D(K).toLowerCase(),he=((Oe=(we=K.text)==null?void 0:we.toLowerCase)==null?void 0:Oe.call(we))||"";return te.includes(T)||he.includes(T)})}if(n.value&&_.value.length){const T=new Set(_.value.map(K=>K==null?void 0:K.toString()));B=B.filter(K=>{var te;return!T.has((te=K.id)==null?void 0:te.toString())})}return B}),q=e.inject("values"),Q=/\{\{\s*([^}]+?)\s*\}\}/g,R=B=>(B?String(B):"").replace(/<[^>]*>/g,"").trim(),I=e.computed(()=>a.slot??(a==null?void 0:a.optionTemplate)??""),F=B=>{if(!B)return"";const T=I.value;return T?T.replace(Q,(K,te)=>{const he=te.trim(),we=B[he];return we!=null?String(we):""}):B.text??""},D=B=>{if(!B)return"";if(!I.value)return B.text??"";const T=F(B);return R(T)||B.text||""},z=B=>{a.set&&(q!=null&&q.value)&&Object.entries(a.set).forEach(([T,K])=>{if(!T)return;const te=B?B[K]:null;q.value[T]=te??null})},ee=e.computed(()=>{var B,T;return a.parent?((T=(B=q==null?void 0:q.value)==null?void 0:B[a.parent])==null?void 0:T.toString())??null:null}),me=async B=>{var T;if(!a.data){let K=a.options??[];if(B!=null&&B.trim()){const te=B.toLowerCase();K=K.filter(he=>{var oe,mt;const we=D(he).toLowerCase(),Oe=((mt=(oe=he.text)==null?void 0:oe.toLowerCase)==null?void 0:mt.call(oe))||"";return we.includes(te)||Oe.includes(te)})}return K}try{const K=a.host??"",te=a.prefix??"api",he=a.api??`/${te}/suggest/${a.data}`,we=`${K}${he}`,Oe=new URLSearchParams;return Oe.set("json","1"),B&&Oe.set("key",B),ee.value!==void 0&&ee.value!==null&&ee.value!==""&&Oe.set("parent",ee.value),((T=await fetch(`${we}?${Oe.toString()}`).then(oe=>oe.json()))==null?void 0:T.data)??[]}catch{return[]}},Ne=async()=>{a.data?y.value=await me(b.value):y.value=a.options?[...a.options]:[]},Ke=async B=>{var K,te,he;if(B==null)return null;const T=(K=y.value)==null?void 0:K.find(we=>{var Oe;return((Oe=we==null?void 0:we.id)==null?void 0:Oe.toString())===String(B)});if(T)return T;if(a.data)try{const we=a.host??"",Oe=a.prefix??"api",oe=a.api??`/${Oe}/suggest/${a.data}`,mt=`${we}${oe}`,Bt=new URLSearchParams;return Bt.set("json","1"),Bt.set("val",String(B)),ee.value!==void 0&&ee.value!==null&&ee.value!==""&&Bt.set("parent",ee.value),((he=((te=await fetch(`${mt}?${Bt.toString()}`).then(gl=>gl.json()))==null?void 0:te.data)??[])==null?void 0:he[0])??null}catch{return null}return null},qt=async B=>{const T=new Set(y.value.map(te=>{var he;return(he=te.id)==null?void 0:he.toString()})),K=B.filter(te=>!T.has(te==null?void 0:te.toString()));K.length&&await K.reduce(async(te,he)=>{await te;const we=await Ke(he);we&&y.value.push(we)},Promise.resolve())},Re=async()=>{o.value||(m.value=!0,await Ne(),await e.nextTick(()=>{var B;le(),(B=w.value)==null||B.focus(),A.value.length?h.value=0:h.value=-1}))},Ye=()=>{m.value=!1,h.value=-1},vt=async B=>{o.value||(m.value?Ye():await Re())},yt=async()=>{var B;m.value?(B=w.value)==null||B.focus():await Re()},Et=()=>{n.value?(_.value=[],s.value=[],r("change",[])):(p.value=null,s.value=null,r("change",null)),z(null),b.value="",e.nextTick(()=>{var B;return(B=w.value)==null?void 0:B.focus()})},Pt=B=>{n.value&&(_.value=_.value.filter(T=>(T==null?void 0:T.toString())!==(B==null?void 0:B.toString())),s.value=[..._.value],r("change",s.value),e.nextTick(()=>{var T;return(T=w.value)==null?void 0:T.focus()}))},at=B=>{n.value?(M(B.id)||(_.value=[..._.value,B.id],s.value=[..._.value],r("change",s.value)),b.value="",e.nextTick(()=>{var T;(T=w.value)==null||T.focus(),h.value=Math.min(h.value,A.value.length-1)}),z(null)):(p.value=B,s.value=B.id,r("change",s.value),b.value="",Ye(),z(B))},st=B=>{M(B.id)||at(B)},U=(B,T)=>{if(!B||!T)return;const K=B.offsetTop,te=K+B.offsetHeight,he=T.scrollTop,we=he+T.clientHeight;let Oe=T.scrollTop;K<he?Oe=K-80:te>we&&(Oe=te-T.clientHeight+4);const oe=T;oe.scrollTop=Oe},Y=B=>{let T=B.parentElement;for(;T;){if(T.classList.contains("ui-dialog__content"))return T;const K=window.getComputedStyle(T),te=K.overflow+K.overflowY+K.overflowX;if(te.includes("auto")||te.includes("scroll")||T===document.body||T===document.documentElement)return T;T=T.parentElement}return document.body},le=()=>{if(!c.value)return;const B=c.value.getBoundingClientRect(),T=window.innerHeight||document.documentElement.clientHeight,K=window.innerWidth||document.documentElement.clientWidth,te=8,he=8,we=a.maxHeight||300,Oe=T-B.bottom-he-te,oe=B.top-he-te,mt=Oe>=oe,Bt=Math.max(K-te*2,0);let{width:gl}=B;Bt>0&&gl>Bt&&(gl=Bt);let{left:ca}=B;ca+gl+te>K&&(ca=K-gl-te),ca=Math.max(ca,te);const n4=Math.min(we,Math.max(mt?Oe:oe,50));x.value=mt?"bottom":"top",k.value={position:"fixed",left:`${ca}px`,width:`${gl}px`,minWidth:"300px",maxHeight:`${n4}px`,transform:mt?"none":"translateY(-100%)",top:mt?`${B.bottom+he}px`:`${B.top-he}px`}},ae=async B=>{o.value||!m.value&&(B.key==="ArrowDown"||B.key==="ArrowUp")&&(B.preventDefault(),await Re())},de=B=>{var K;if(!m.value)return;const{key:T}=B;if(T==="ArrowDown")B.preventDefault(),h.value+1<A.value.length&&(h.value+=1,U(g.value[h.value],u.value));else if(T==="ArrowUp")B.preventDefault(),h.value>0&&(h.value-=1,U(g.value[h.value],u.value));else if(T==="Enter"){B.preventDefault();const te=A.value[h.value];te&&at(te),(K=w.value)==null||K.blur()}else T==="Escape"?(B.preventDefault(),Ye()):T==="Backspace"?n.value&&b.value===""&&_.value.length&&(_.value=_.value.slice(0,-1),s.value=[..._.value],r("change",s.value)):T==="Home"?(h.value=0,U(g.value[0],u.value)):T==="End"?(h.value=A.value.length-1,U(g.value[h.value],u.value)):T==="Tab"&&Ye()},Ae=()=>{o.value||(f.value=!0)},C=()=>{f.value=!1,b.value=""},v=B=>{B.key==="Escape"&&m.value&&Ye()},H=B=>{var K,te;const T=B.target;(K=i.value)!=null&&K.contains(T)||(te=d.value)!=null&&te.contains(T)||Ye()},re=B=>{m.value&&u.value&&!u.value.contains(B.target)&&le()},Te=()=>{m.value&&le()},Le=()=>{m.value&&le()};e.watch(()=>a.options,B=>{B!=null&&B.length&&(y.value=[...B],be())},{immediate:!0});async function be(){if(n.value)Array.isArray(s.value)?_.value=[...s.value]:(_.value=s.value==null?[]:[s.value],s.value=[..._.value]),a.data&&_.value.length&&(await qt(_.value),await e.nextTick());else{if(Array.isArray(s.value)){const B=s.value[0]??null;s.value=B??null}s.value!=null&&(p.value=await Ke(s.value)),z(p.value??null)}}e.watch(s,()=>{be()}),e.onMounted(async()=>{var B;addEventListener("keydown",v),addEventListener("scroll",re,!0),addEventListener("resize",Te),document.addEventListener("click",H,!0),c.value&&Y(c.value).addEventListener("scroll",Le,!0),(B=a.options)!=null&&B.length&&!a.data?y.value=[...a.options]:a.data&&(y.value=await me("")),await be(),Z.value=!1}),e.onUnmounted(()=>{removeEventListener("keydown",v),removeEventListener("scroll",re,!0),removeEventListener("resize",Te),document.removeEventListener("click",H,!0),c.value&&Y(c.value).removeEventListener("scroll",Le,!0)});const O=e.ref(!1),G=e.ref({}),ye=e.ref([]),Be=e.ref(null);async function E(){var K,te;if(!((K=a.add)!=null&&K.token)||Be!=null&&Be.value.validate())return;const B=a.add.api??`/api/table/${a.add.token}`,{id:T}=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G.value)}).then(he=>he.json());if(!((te=a.options)!=null&&te.length)&&a.data){const{data:he}=await fetch(`${a.api??`/api/suggest/${a.data}`}?val=${T}`).then(we=>we.json());p.value=he[0],y.value.push(he[0]),s.value=T}O.value=!1,xe({title:"Success!",message:"Object created."})}async function S(){if(!a.add)return null;const B=await fetch(`/api/template/form/${a.add.form}`).then(T=>T.json());return ye.value=B.schema,O.value=!0,null}function j(B,T=200){let K;return(...te)=>{K&&clearTimeout(K),K=window.setTimeout(()=>B(...te),T)}}const W=j(async B=>{y.value=await me(B)},200);e.watch(b,B=>{a.data&&W(B.trim())}),e.watch(()=>a.options,B=>{!a.data&&(B!=null&&B.length)&&(y.value=[...B],be())},{immediate:!0}),e.watch(()=>a.parent??a.parentValue,()=>{a.data&&Ne()});const Z=e.ref(!0);return e.watch(ee,async()=>{if(a.data&&(Z.value||(n.value?(_.value=[],s.value=[],r("change",[])):(p.value=null,s.value=null,r("change",null))),await Ne(),a.auto===1&&ee.value&&y.value.length>0)){const B=y.value[0];B&&at(B)}}),(B,T)=>{var K,te,he,we,Oe;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(Zt),{visible:O.value,"onUpdate:visible":T[1]||(T[1]=oe=>O.value=oe),title:"Додати",buttonText:"Додати",onDone:E,teleport:B.teleport},{default:e.withCtx(()=>[e.createVNode(Xe,{schema:ye.value,modelValue:G.value,"onUpdate:modelValue":T[0]||(T[0]=oe=>G.value=oe),ref_key:"addForm",ref:Be},null,8,["schema","modelValue"])]),_:1},8,["visible","teleport"]),e.createElementVNode("div",{class:"flex gap-1 w-full",ref_key:"selectRoot",ref:i,onClick:T[5]||(T[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["relative w-full font-sans",a.customClass])},[T[10]||(T[10]=e.createElementVNode("span",{id:"react-select-live-region",class:"sr-only"},null,-1)),T[11]||(T[11]=e.createElementVNode("span",{"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text",role:"log",class:"sr-only"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white","border-gray-300 hover:border-gray-400",m.value||f.value?"border-blue-500 ring-1 ring-blue-500":"",o.value?"bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300":""]),role:"combobox","aria-expanded":m.value,"aria-haspopup":"listbox",onKeydown:ae,onClick:yt,"data-focus":m.value||f.value?"true":"false"},[e.createElementVNode("div",{class:"flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden h-full",ref_key:"triggerRef",ref:c},[n.value?(e.openBlock(),e.createElementBlock("div",Hg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,oe=>(e.openBlock(),e.createElementBlock("div",{class:"flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border max-w-full",key:oe.id},[e.createElementVNode("div",qg,[oe!=null&&oe.color?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",style:e.normalizeStyle({backgroundColor:oe==null?void 0:oe.color})},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"truncate text-gray-900 overflow-hidden max-w-[200px] px-0.5 py-[2px] pl-1.5",title:D(oe)},[I.value?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:F(oe)},null,8,Wg)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(oe.text),1)],64))],8,Gg)]),e.createElementVNode("div",{role:"button",class:"flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b] flex-shrink-0",onClick:e.withModifiers(mt=>Pt(oe.id),["stop"])},T[6]||(T[6]=[e.createElementVNode("svg",{height:"14",width:"14",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",class:"inline-block fill-current stroke-current leading-none stroke-0"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,Kg)]))),128)),e.createElementVNode("div",Yg,[!o.value&&B.search?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:w,class:"w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-autocomplete":"list",placeholder:_.value.length?" ":V.value,"onUpdate:modelValue":T[2]||(T[2]=oe=>b.value=oe),onFocus:Ae,onBlur:C,onKeydown:de},null,40,Xg)),[[e.vModelText,b.value]]):e.createCommentVNode("",!0)])])):!n.value&&!f.value&&P.value&&b.value===""?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["truncate text-gray-900"]),title:P.value},[(K=p.value)!=null&&K.color?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",style:e.normalizeStyle({backgroundColor:(te=p.value)==null?void 0:te.color})},null,4)):e.createCommentVNode("",!0),I.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass({"pl-5":(he=p.value)==null?void 0:he.color}),innerHTML:F(p.value)},null,10,Qg)):(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass({"pl-5":(we=p.value)==null?void 0:we.color})},e.toDisplayString((Oe=p.value)==null?void 0:Oe.text),3))],8,Zg)):e.createCommentVNode("",!0),n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Jg,[!o.value&&B.search?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:w,class:"w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-autocomplete":"list",placeholder:P.value?" ":V.value,"onUpdate:modelValue":T[3]||(T[3]=oe=>b.value=oe),onFocus:Ae,onBlur:C,onKeydown:de},null,40,eb)),[[e.vModelText,b.value]]):e.createCommentVNode("",!0)]))],512),e.createElementVNode("div",tb,[$.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-hidden":"true",disabled:o.value,onClick:e.withModifiers(Et,["stop"])},T[7]||(T[7]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,lb)):e.createCommentVNode("",!0),T[9]||(T[9]=e.createElementVNode("div",{class:"self-stretch w-px bg-[#ccc] my-[1px]"},null,-1)),e.createElementVNode("button",{type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-hidden":"true",disabled:o.value,onClick:T[4]||(T[4]=e.withModifiers(oe=>vt(),["stop"])),title:m.value?"Закрити список":"Відкрити список"},T[8]||(T[8]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})],-1)]),8,ab)])],42,zg),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:d,class:e.normalizeClass(["fixed z-[3000] rounded bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.1),0_4px_11px_rgba(0,0,0,0.1)]"]),style:e.normalizeStyle(k.value),role:"listbox"},[e.createElementVNode("div",{class:"overflow-y-auto py-1",style:e.normalizeStyle({maxHeight:k.value.maxHeight||"300px"}),ref_key:"listRef",ref:u},[A.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(A.value,(oe,mt)=>(e.openBlock(),e.createElementBlock("div",{key:oe.id,ref_for:!0,ref:Bt=>g.value[mt]=Bt,class:e.normalizeClass(["flex px-3 py-2 cursor-default select-none text-gray-900 ",M(oe.id)?"bg-blue-500 text-white":"bg-white hover:bg-blue-100",h.value===mt&&!M(oe.id)?"bg-blue-100":""]),"aria-disabled":M(oe.id)?"true":"false",role:"option",tabindex:"-1",onClick:Bt=>st(oe)},[oe!=null&&oe.color?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",style:e.normalizeStyle({backgroundColor:oe==null?void 0:oe.color})},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["leading-[19px]",h.value===oe.id?"text-white":"",(h.value,"")])},[I.value?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:F(oe)},null,8,nb)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(oe.text),1)],64))],2)],10,rb))),128)):(e.openBlock(),e.createElementBlock("div",ob," No options "))],4)],4)):e.createCommentVNode("",!0)]))],2),a.add?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:S,class:"bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",disabled:o.value,type:"button"},[e.createVNode(Gl,{width:"16",height:"16"}),T[12]||(T[12]=e.createElementVNode("span",null,"Додати",-1))],8,sb)):e.createCommentVNode("",!0)],512)],64)}}}),ib=["placeholder","disabled"],cb=e.defineComponent({__name:"vs-input-textarea",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),r=e.useModel(l,"modelValue"),n=e.computed(()=>!!t.disabled),o=e.computed(()=>t.placeholder??"");return(s,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{"onUpdate:modelValue":i[0]||(i[0]=c=>r.value=c),placeholder:o.value,disabled:n.value,row:"2",class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"}},null,10,ib)),[[e.vModelText,r.value]])}}),db={},ub={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-search stroke-gray-500 transition-all"};function mb(l,t){return e.openBlock(),e.createElementBlock("svg",ub,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null,-1),e.createElementVNode("path",{d:"M21 21l-6 -6"},null,-1)]))}const pb=_e(db,[["render",mb]]),fb={},hb={class:"flex-shrink-0 mt-0.5 size-3.5",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"};function gb(l,t){return e.openBlock(),e.createElementBlock("svg",hb,t[0]||(t[0]=[e.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),e.createElementVNode("path",{d:"M7 20V4"},null,-1),e.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),e.createElementVNode("path",{d:"M17 4v16"},null,-1)]))}const bb=_e(fb,[["render",gb]]),yb={},kb={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function xb(l,t){return e.openBlock(),e.createElementBlock("svg",kb,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 9l5 -5l5 5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const wb=_e(yb,[["render",xb]]),_b={},Eb={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"};function Cb(l,t){return e.openBlock(),e.createElementBlock("svg",Eb,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const Vb=_e(_b,[["render",Cb]]),Nb={},vb={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"};function Bb(l,t){return e.openBlock(),e.createElementBlock("svg",vb,t[0]||(t[0]=[e.createStaticVNode('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>',6)]))}const os=_e(Nb,[["render",Bb]]),Sb={},Db={viewBox:"0 0 178 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ab(l,t){return e.openBlock(),e.createElementBlock("svg",Db,t[0]||(t[0]=[e.createStaticVNode('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>',12)]))}const Mb=_e(Sb,[["render",Ab]]),Tb={},Lb={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"};function $b(l,t){return e.openBlock(),e.createElementBlock("svg",Lb,t[0]||(t[0]=[e.createElementVNode("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"},null,-1)]))}const Fb=_e(Tb,[["render",$b]]),Ib={class:"vs-datatable border rounded-xl w-full flex-grow"},Ob={class:"flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]"},Pb={class:"relative w-full"},Rb={class:"table-wrapper flex gap-2"},Ub={class:"vs-popover inline-block text-slate-700"},jb={class:"text-center"},zb={class:""},Hb={class:"py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full"},qb={class:"flex flex-col p-[1px] gap-[2px] w-[140px]"},Gb={class:"text-sm items-center text-gray-800 flex gap-1"},Wb={class:"w-full overflow-x-auto"},Kb={class:"w-full table-auto caption-bottom text-sm"},Yb={class:"[&_tr]:border-b"},Xb={class:"border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors"},Zb={class:"h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center"},Qb={key:0,colspan:"100%",class:"text-center"},Jb={class:"w-full"},ey={class:"p-5 min-h-[200px] flex flex-col justify-center items-center text-center"},ty=["onDragstart","onDragover","onDrop"],ly={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center"},ay={class:"flex items-center justify-center"},ry={key:0,class:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"},ny={key:0},oy=["src"],sy={key:1,class:"rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"},iy=["innerHTML"],cy={key:2,class:"line-clamp-2 rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"},dy={key:3,class:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"},uy={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"},my={class:"flex items-center justify-center gap-2"},py=["onClick"],fy=["onClick"],hy={class:"vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white"},gy=e.defineComponent({__name:"vs-input-datatable",props:e.mergeModels({colModel:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),r=e.ref({}),n=e.ref(""),o=e.computed(()=>{if(!n.value)return a.value??[];const I=n.value.toLowerCase();return a.value.filter(F=>{var D;return(D=t.colModel)==null?void 0:D.some(z=>{const ee=F[z.key];return ee?Array.isArray(ee)?ee.join(", ").toLowerCase().includes(I):String(ee).toLowerCase().includes(I):!1})})}),s=e.ref(null),i=e.ref(null),c=e.ref(!1),u=e.ref(null),d=e.ref({top:0,left:0}),m=I=>{s.value=I},f=I=>{i.value=I},p=I=>{if(s.value===null||s.value===I){s.value=null,i.value=null;return}const F=[...a.value],[D]=F.splice(s.value,1);F.splice(I,0,D),a.value=F,s.value=null,i.value=null},y=I=>{const F=I.currentTarget.getBoundingClientRect();d.value={top:F.bottom+window.scrollY,left:F.left+window.scrollX},c.value=!c.value},h=()=>{u.value&&u.value.click()},g=I=>{const F=[".jpg",".jpeg",".png",".gif",".bmp",".webp",".svg",".ico",".tiff",".tif"],D=I.toLowerCase();return F.some(z=>D.endsWith(z))},b=I=>{var z;const F=(z=I.target.files)==null?void 0:z[0];if(!F)return;const D=new FileReader;D.onload=ee=>{var me;try{const Ne=(me=ee.target)==null?void 0:me.result;if(typeof Ne=="string"){const Ke=JSON.parse(Ne);Array.isArray(Ke)&&a.value.push(...Ke)}}catch(Ne){console.error("Error parsing file:",Ne)}},D.readAsText(F)},w=()=>{const I=JSON.stringify(a.value,null,2),F=new Blob([I],{type:"application/json"}),D=URL.createObjectURL(F),z=document.createElement("a");z.href=D,z.download="data.json",z.click(),URL.revokeObjectURL(D)};e.onMounted(async()=>{var F;const I=(F=t.colModel)==null?void 0:F.filter(D=>D.data);I!=null&&I.length&&Promise.all(I.map(async D=>{const z=await(await fetch(`/api/suggest/${D.data}`)).json();r.value[D.key]=z.data}))});const x=e.ref(""),k=e.ref(!1);let _="edit",N=0;const V=e.ref({}),P=e.ref({});async function $(){x.value="Додати",k.value=!0,_="add",V.value={}}function M(I,F){var z;const D=F.key||F.name;return r.value[D]&&I[D]?((z=r.value[D].find(ee=>ee.id.toString()===I[D].toString()))==null?void 0:z.text)??I[D]:I[D]||"-"}async function A(I,F){x.value="Редагувати",k.value=!0,_="edit",N=F,V.value={...I}}function q(){const I=P.value.validate();if(I){xe({type:"warning",title:"Помилка валідації",message:Object.entries(I).map(([F,D])=>`${F}: ${D}`).join(`
228
- `)});return}_==="add"?Array.isArray(a.value)?a.value=[...a.value,V.value]:a.value=[V.value]:a.value=a.value.map((F,D)=>D===N?V.value:F),k.value=!1}function Q(I){a.value=a.value.filter((F,D)=>D!==I)}function R(){k.value=!1}return(I,F)=>(e.openBlock(),e.createElementBlock("div",Ib,[e.createElementVNode("div",Ob,[e.createElementVNode("div",Pb,[e.createVNode(pb,{width:"14",height:"14",class:"absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"}),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":F[0]||(F[0]=D=>n.value=D),placeholder:"Пошук",class:"py-2 px-3 pl-10 w-full bg-gray-100 h-[36px] rounded-[8px] text-[15px] leading-[18px] focus:border-1 text-stone-800 placeholder:text-[#6B7280] focus:outline-blue-500 focus:outline-2"},null,512),[[e.vModelText,n.value]])]),e.createElementVNode("div",Rb,[e.createElementVNode("input",{ref_key:"fileInput",ref:u,onChange:b,class:"hidden",accept:".json",type:"file"},null,544),e.createElementVNode("div",Ub,[e.createElementVNode("div",jb,[e.createElementVNode("div",zb,[e.createElementVNode("button",{onClick:y,class:"bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"},[e.createVNode(bb,{height:"16",width:"16"})])])])])]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"text-slate-700 vsTailwind vs-popover__content bottom",style:e.normalizeStyle([{width:"fit-content","z-index":"10002",position:"fixed"},{position:"absolute",top:d.value.top+"px",left:d.value.left+"px"}])},[e.createElementVNode("div",Hb,[e.createElementVNode("div",qb,[e.createElementVNode("button",{onClick:h,class:"text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"},[e.createVNode(wb,{class:"text-black",width:"14",height:"14"}),F[4]||(F[4]=e.createTextVNode(" Імпортувати ",-1))]),e.createElementVNode("button",{onClick:w,class:"text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"},[e.createElementVNode("span",Gb,[e.createVNode(Vb,{class:"text-black",width:"14",height:"14"}),F[5]||(F[5]=e.createTextVNode(" Експортувати ",-1))])])])])],4)):e.createCommentVNode("",!0)])),e.createElementVNode("button",{onClick:$,class:"text-slate-700 bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"},[e.createVNode(Gl),F[6]||(F[6]=e.createTextVNode(" Додати ",-1))])]),e.createElementVNode("div",Wb,[e.createElementVNode("table",Kb,[e.createElementVNode("thead",Yb,[e.createElementVNode("tr",Xb,[e.createElementVNode("th",Zb,[e.createVNode(os,{width:"24",height:"24",class:"w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.colModel,D=>(e.openBlock(),e.createElementBlock("th",{key:D.key,class:"h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"},e.toDisplayString(D.ua||D.label),1))),128)),F[7]||(F[7]=e.createElementVNode("th",{class:"h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center"}," Дії ",-1))])]),e.createElementVNode("tbody",{class:e.normalizeClass({"[&_tr:last-child]:border-0":!i.value})},[o.value.length===0?(e.openBlock(),e.createElementBlock("td",Qb,[e.createElementVNode("div",Jb,[e.createElementVNode("div",ey,[e.createVNode(Mb,{class:"w-48 mx-auto"}),F[8]||(F[8]=e.createElementVNode("div",{class:"max-w-sm mx-auto mt-6"},[e.createElementVNode("p",{class:"font-medium text-gray-800 dark:text-neutral-200"},"Нічого не знайдено"),e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"})],-1))])])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(D,z)=>(e.openBlock(),e.createElementBlock("tr",{key:D.id,class:e.normalizeClass(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move",{"opacity-50":s.value===z,"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20":i.value===z}]),draggable:"true",onDragstart:ee=>m(z),onDragover:e.withModifiers(ee=>f(z),["prevent"]),onDrop:ee=>p(z)},[e.createElementVNode("td",ly,[e.createElementVNode("div",ay,[e.createVNode(os,{width:"24",height:"24",class:"w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"})])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.colModel,ee=>(e.openBlock(),e.createElementBlock("td",{key:ee.key,class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"},[ee.type==="file"?(e.openBlock(),e.createElementBlock("div",ry,[g(M(D,ee))?(e.openBlock(),e.createElementBlock("div",ny,[e.createElementVNode("img",{src:M(D,ee),alt:"alt",width:"45",class:"rounded-md max-w-[45px] h-[45px] object-cover"},null,8,oy)])):(e.openBlock(),e.createElementBlock("div",sy,[e.createVNode(ls,{class:"w-[25px] min-w-[25px] h-[25px]"})]))])):ee.type==="tiptap-editor"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors line-clamp-3",innerHTML:M(D,ee)},null,8,iy)):ee.type==="reference"?(e.openBlock(),e.createElementBlock("div",cy,e.toDisplayString(M(D,ee)),1)):(e.openBlock(),e.createElementBlock("div",dy,e.toDisplayString(M(D,ee)),1))]))),128)),e.createElementVNode("td",uy,[e.createElementVNode("div",my,[e.createElementVNode("button",{onClick:ee=>A(D,z),class:"text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"},[e.createVNode(Fb,{width:"24",height:"24",class:"w-3 h-3"})],8,py),e.createElementVNode("button",{onClick:ee=>Q(z),class:"text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"},[e.createVNode(va,{width:"24",height:"24",class:"w-3 h-3"})],8,fy)])])],42,ty))),128))],2)])]),e.createVNode(e.unref(Zt),{teleport:"#modal",visible:k.value,title:x.value,size:"lg",onClose:R},{default:e.withCtx(()=>[e.createVNode(Xe,{schema:t.colModel,values:V.value,"onUpdate:values":F[1]||(F[1]=D=>V.value=D),form:P.value,"onUpdate:form":F[2]||(F[2]=D=>P.value=D)},null,8,["schema","values","form"]),e.createElementVNode("div",hy,[e.createElementVNode("button",{type:"button",onClick:F[3]||(F[3]=D=>k.value=!1),class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"}," Скасувати "),e.createElementVNode("button",{onClick:q,type:"button",class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"}," Зберегти ")])]),_:1},8,["visible","title"])]))}}),by={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 Wl(l){return l?l.type==="Polygon"?{type:"MultiPolygon",coordinates:[l.coordinates]}:l.type==="Feature"?{...l,geometry:Wl(l.geometry)}:l.type==="FeatureCollection"?{...l,features:(l.features||[]).map(t=>Wl(t)).filter(Boolean)}:l:null}function yy(l){return l?l.type==="FeatureCollection"||l.type==="Feature"?Wl(l):l.geom?{type:"Feature",geometry:Wl({type:l.geom.type,coordinates:l.geom.coordinates}),properties:{}}:l.type&&l.coordinates?{type:"Feature",geometry:Wl(l),properties:{}}:null:null}const ky={},xy={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",fill:"none","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-map-pin"};function wy(l,t){return e.openBlock(),e.createElementBlock("svg",xy,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"},null,-1),e.createElementVNode("path",{d:"M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z"},null,-1)]))}const _y=_e(ky,[["render",wy]]),Ey={},Cy={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-line"};function Vy(l,t){return e.openBlock(),e.createElementBlock("svg",Cy,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null,-1),e.createElementVNode("path",{d:"M18 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null,-1),e.createElementVNode("path",{d:"M7.5 16.5l9 -9"},null,-1)]))}const Ny=_e(Ey,[["render",Vy]]),vy={},By={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-polygon"};function Sy(l,t){return e.openBlock(),e.createElementBlock("svg",By,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>',9)]))}const Dy=_e(vy,[["render",Sy]]),Ay={},My={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-topology-ring-3"};function Ty(l,t){return e.openBlock(),e.createElementBlock("svg",My,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>',9)]))}const Ly=_e(Ay,[["render",Ty]]),$y={},Fy={version:"1.1",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg","xmlns:sketch":"http://www.bohemiancoding.com/sketch/ns","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"fullscreen-icon"};function Iy(l,t){return e.openBlock(),e.createElementBlock("svg",Fy,t[0]||(t[0]=[e.createElementVNode("title",null,null,-1),e.createElementVNode("desc",null,null,-1),e.createElementVNode("defs",null,null,-1),e.createElementVNode("g",{fill:"none","fill-rule":"evenodd",id:"Page-1",stroke:"none","stroke-width":"1"},[e.createElementVNode("g",{fill:"#000000",id:"Core",transform:"translate(-215.000000, -257.000000)"},[e.createElementVNode("g",{id:"fullscreen",transform:"translate(215.000000, 257.000000)"},[e.createElementVNode("path",{d:"M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z",id:"Shape"})])])],-1)]))}const Oy=_e($y,[["render",Iy]]),Py={class:"map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]"},Ry={key:0,class:"vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"},Uy=["onClick"],jy={class:"relative flex-1 min-w-[140px]"},zy=["placeholder"],Hy="https://data.softpro.ua/api-user/gis-url-proxy",qy="https://geo.rv.ua/api-user/dzk.api",Gy=e.defineComponent({__name:"map-search",props:{config:{}},emits:["goToCoordinates"],setup(l,{emit:t}){const a=l,r=t,n=["here","xy","parcel"],o=e.computed(()=>{var _,N;const k=(N=(_=a.config)==null?void 0:_.tools)==null?void 0:N.filter(V=>n.includes(V));return k&&k.length?k:n}),s=e.computed(()=>{var k,_;return((_=(k=a.config)==null?void 0:k.placeholder)==null?void 0:_.trim())||"Пошук…"}),i=e.ref(o.value[0]??n[0]);e.watch(o,k=>{k.includes(i.value)||(i.value=k[0])});const c=e.ref(""),u=e.ref(!1),d=e.ref(null);e.watch(i,()=>{c.value="",u.value=!1});function m(k){i.value=k}function f(k){if(!u.value)return;const _=d.value;_&&!_.contains(k.target)&&(u.value=!1)}e.onMounted(()=>{window.addEventListener("click",f,!0)}),e.onBeforeUnmount(()=>{window.removeEventListener("click",f,!0)});function p(k){return k==="xy"?"Координати":k==="parcel"?"Кадастр":"Адреси"}function y(k){const _=k.replace(/[,]+/g," ").trim();if(!_)return null;const N=_.split(/\s+/).filter(Boolean);if(N.length<2)return null;const V=N.slice(0,2).map(Number);if(!V.every(R=>Number.isFinite(R)))return null;let[P,$]=V,M=P,A=$;const q=R=>Math.abs(R)<=90,Q=R=>Math.abs(R)<=180;if(!q(M)||!Q(A))if(q(A)&&Q(M))M=$,A=P;else return null;return{lat:M,lng:A}}function h(k){return((k==null?void 0:k.items)||[]).map((_,N)=>{var V,P,$;return{id:String((_==null?void 0:_.id)??N),title:(_==null?void 0:_.title)||((V=_==null?void 0:_.address)==null?void 0:V.label)||"Знайдений обʼєкт",lat:Number((P=_==null?void 0:_.position)==null?void 0:P.lat),lng:Number(($=_==null?void 0:_.position)==null?void 0:$.lng)}}).filter(_=>Number.isFinite(_.lat)&&Number.isFinite(_.lng))}function g(k){const _=(k==null?void 0:k.result)||(k==null?void 0:k.data)||k;if(!_)return[];const N=_.geom_centroid;if(!N||!Array.isArray(N.coordinates))return[];const[V,P]=N.coordinates;return!Number.isFinite(P)||!Number.isFinite(V)?[]:[{id:"parcel",title:_.cadnum||_.cad_num||"Земельна ділянка",lat:P,lng:V}]}function b(k){const _=k.replace(/\s+/g,"").split(":");if(_.length!==4)return!1;const N=[10,2,3,4];return _.every((V,P)=>V.length===N[P]&&/^\d+$/.test(V))}function w(k){r("goToCoordinates",[k.lat,k.lng])}async function x(){const k=c.value.trim();if(k){if(i.value==="xy"){const _=y(k);if(!_){xe({type:"warning",title:"Пошук координат",message:"Не знайдено або невірний формат координат"});return}w(_),c.value="";return}try{const _=new URL(i.value==="here"?Hy:qy);if(i.value==="here")_.searchParams.set("searchtext",k);else{if(!b(k)){xe({type:"warning",title:"Пошук кадастру",message:"Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ"});return}_.searchParams.set("cad_num",k)}const N=await fetch(_.toString());if(!N.ok)throw new Error(`HTTP ${N.status}`);const V=await N.json(),P=i.value==="here"?h(V):g(V);if(!P.length)xe({type:"warning",title:"Пошук",message:"Не знайдено результатів"});else{const $=P[0];w($),c.value=""}}catch(_){const N=(_==null?void 0:_.message)||"Помилка пошуку";xe({type:"error",title:"Пошук",message:N})}}}return(k,_)=>(e.openBlock(),e.createElementBlock("div",Py,[e.createElementVNode("form",{class:"flex gap-2",onSubmit:e.withModifiers(x,["prevent"])},[o.value.length>1?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:d,class:"relative search-type w-[140px]"},[e.createElementVNode("button",{type:"button",class:"vstSelect-input transition-all text-left bg-white border border-gray-200 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-100 block w-full py-1.5 px-3 text-sm cursor-pointer flex items-center justify-between gap-2",onClick:_[0]||(_[0]=N=>u.value=!u.value)},[e.createElementVNode("span",null,e.toDisplayString(p(i.value)),1),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["w-4 h-4 text-gray-500 transition-transform",{"rotate-180":u.value}]),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_[2]||(_[2]=[e.createElementVNode("path",{d:"M6 9l6 6 6-6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2))]),u.value?(e.openBlock(),e.createElementBlock("div",Ry,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,N=>(e.openBlock(),e.createElementBlock("li",{key:N,class:"px-3 py-2 cursor-pointer hover:bg-gray-100",onClick:V=>m(N)},e.toDisplayString(p(N)),9,Uy))),128))])])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0),e.createElementVNode("div",jy,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":_[1]||(_[1]=N=>c.value=N),placeholder:s.value,type:"text",class:"vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid !pr-8 py-1.5 pl-3 text-sm"},null,8,zy),[[e.vModelText,c.value,void 0,{trim:!0}]]),_[3]||(_[3]=e.createElementVNode("button",{type:"submit",class:"absolute inset-y-0 right-2 flex items-center text-gray-400 hover:text-gray-600","aria-label":"Пошук"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 21-4.35-4.35m0 0A7.5 7.5 0 1 0 5 5a7.5 7.5 0 0 0 11.65 11.65Z"})])],-1))])],32)]))}}),Wy=_e(Gy,[["__scopeId","data-v-3048520a"]]),Ky={class:"bg-white/30 p-1 rounded-md shadow"},Yy={class:"flex gap-2"},Xy=["onClick","title"],Zy=["src"],Qy=e.defineComponent({__name:"map-layers",props:{basemaps:{}},emits:["onLayerChange"],setup(l,{emit:t}){const a=e.ref(Object.keys(l.basemaps)[0]),r=t;function n(o){r("onLayerChange",o),a.value=o}return(o,s)=>(e.openBlock(),e.createElementBlock("div",Ky,[e.createElementVNode("div",Yy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.basemaps,(i,c)=>(e.openBlock(),e.createElementBlock("div",{key:c,class:e.normalizeClass(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm",{"ring-2 ring-blue-500 border-blue-300":a.value===c}]),onClick:u=>n(c),title:i.name||c,role:"button",tabindex:"0"},[e.createElementVNode("img",{src:i.preview,alt:"",class:"w-10 h-10 object-cover"},null,8,Zy)],10,Xy))),128))])]))}}),Jy={key:0,class:"absolute inset-0 z-[2000] flex items-center justify-center pointer-events-none bg-black/20"},e1={class:"bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm"},t1={class:"text-sm font-medium"},l1={key:0,class:"absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]"},a1={key:1,class:"form-geom__panel flex gap-1 items-start mt-2"},r1={class:"flex items-center gap-1"},n1=["disabled"],o1=["disabled"],s1=["disabled"],i1={class:"absolute top-4 right-4 z-[1000]"},c1={class:"flex flex-col gap-[2px]"},d1=["disabled"],u1=["disabled"],m1=["disabled"],p1=["disabled"],f1={class:"flex flex-col gap-2"},h1={key:0,class:"bg-white/95 border border-gray-200 rounded-md shadow-sm px-3 py-2 text-xs text-gray-700 min-w-[200px]"},g1={class:"flex flex-col gap-1"},b1=["checked","disabled","onChange"],y1={class:"text-gray-700 text-xs font-medium"},k1={class:"absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1"},x1={key:0,class:"form-geom__feature flex items-center text-xs transition-all gap-2 w-full"},w1={class:"shrink-0"},_1={class:"font-bold"},E1={class:"flex items-center"},C1={class:"text-xs mr-2"},V1={key:0,class:"text-xs"},N1={key:1,class:"text-xs"},v1=["disabled"],B1=["disabled"],S1=e.defineComponent({__name:"vs-input-map",props:{tools:{},handleZoom:{type:Boolean,default:!0},geomType:{default:()=>[]},prefix:{default:""},layers:{default:()=>[]},api:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},emits:["update:modelValue"],setup(l,{emit:t}){var Be;const a=e.getCurrentInstance(),r=l,n=t,o=e.computed(()=>{const E={search:!1,import:!1,export:!1,point:!1,line:!1,polygon:!1,rectangle:!1};if(!r.tools||!r.tools.length)return E;const S=new Set(r.tools.map(j=>j.toLowerCase()));return{search:S.has("search"),import:S.has("import"),export:S.has("export"),point:S.has("point"),line:S.has("line"),polygon:S.has("polygon"),rectangle:S.has("rectangle")}}),s=e.computed(()=>!!r.disabled),i=e.ref(!1),c=e.ref(null),u=e.ref(null),d=e.ref(!1),m=e.ref(""),f=e.reactive({}),p=e.ref([]),y=e.computed(()=>p.value.map(E=>f[E]).filter(E=>!!E)),h=e.computed(()=>Array.isArray(r.layers)&&r.layers.some(E=>`${(E==null?void 0:E.service)??""}`.toLowerCase()==="vtile"));let g,b,w;function x(){return navigator.platform.toUpperCase().indexOf("MAC")>=0,/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?"Використовуйте два пальці для зуму карти.":"Використовуйте Ctrl + прокрутка для зуму карти."}const k=e.ref(null),_=e.ref(null);let N=null;const V=e.ref(null),P=E=>{E.ctrlKey&&E.preventDefault()};function $(E,S){return E!=null&&E.id?String(E.id):E!=null&&E.url?`${E.url}-${S}`:`layer-${S}`}function M(E){if(!E)return"";if(/^https?:\/\//i.test(E))return E.replace(/\/+$/,"");const S=E.replace(/^\/+/,"").replace(/\/+$/,"");return S?`/${S}`:""}function A(E){var te;const S=(E==null?void 0:E.url)??"";if(!S||/^https?:\/\//i.test(S))return S;const j=typeof window<"u"&&((te=window.location)!=null&&te.origin)?window.location.origin:"";if(S.startsWith("/"))return j?`${j}${S}`:S;const W=M(E==null?void 0:E.prefix),Z=M(r.prefix),B=W||Z,T=S.replace(/^\/+/,""),K=B?`${B.replace(/\/$/,"")}/${T}`:`/${T}`;return j?`${j}${K}`:K}function q(E){const S=(E==null?void 0:E.style)??{};return j=>{const W=S.colorAttr,Z=S.colorSet??{},B=typeof W=="string"?(Z==null?void 0:Z[j==null?void 0:j[W]])??S.color??"#3388ff":S.color??"#3388ff",T=S.stroke??B;return{weight:S.width??1,color:T,opacity:S.opacity??1,fill:S.type?S.type!=="polyline":!0,fillColor:B,fillOpacity:S.opacity??.5}}}function Q(E){const S=(E==null?void 0:E.colorSet)||(E==null?void 0:E.colors);if(E!=null&&E.colorAttr&&S){const j=Object.entries(S).flat();return["match",["get",E.colorAttr],...j,E.color??"#94a3b8"]}return(E==null?void 0:E.color)??"#3388ff"}function R(E,S,j){if(!E)return[];const W=[],Z=Q(E);return E.icon&&W.push({id:`${S}-icon`,type:"symbol",source:S,"source-layer":j,minzoom:E.iconZoom||0,layout:{"icon-image":E.icon,"icon-size":1,"icon-allow-overlap":!0,"icon-ignore-placement":!0}}),E.pointZoom&&W.push({id:`${S}-point`,type:"circle",source:S,"source-layer":j,maxzoom:E.pointZoom,paint:{"circle-stroke-color":E.stroke||"#fff","circle-opacity":E.opacity??1,"circle-color":Z,"circle-stroke-width":E.width??1,"circle-radius":E.radius??5}}),E.type==="polygon"?W.push({id:`${S}-fill`,type:"fill",source:S,"source-layer":j,minzoom:E.pointZoom||0,paint:{"fill-color":Z,"fill-opacity":E.opacity??.5,"fill-outline-color":E.stroke||Z}}):E.type==="line"?W.push({id:`${S}-line`,type:"line",source:S,"source-layer":j,paint:{"line-color":Z,"line-opacity":E.opacity??1,"line-width":E.width??1.5}}):E.icon||W.push({id:`${S}-circle`,type:"circle",source:S,"source-layer":j,paint:{"circle-stroke-color":E.stroke||"#fff","circle-opacity":E.opacity??1,"circle-color":Z,"circle-stroke-width":E.width??1,"circle-radius":E.radius??5}}),W}function I(E,S){var B;const j=E.id||`source-${Math.random().toString(36).slice(2,8)}`,W=E.sourceLayer||E.layer||E.service_layer||E.service_key||E.map_key||((B=E.dataset)==null?void 0:B.layer)||E.id||E.table_name||j,Z=R(E.style||{},j,W||j);return Z.length?{version:8,glyphs:"https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf",sources:{[j]:{type:"vector",tiles:[S],minzoom:E.minzoom??0,maxzoom:E.maxzoom??19}},layers:Z}:null}function F(E){var Z,B,T,K;const S=((E==null?void 0:E.service)??"").toLowerCase(),j=A(E),W=E.sourceLayer||E.layer||E.service_layer||E.service_key||E.map_key||((Z=E.dataset)==null?void 0:Z.layer)||E.id||E.table_name;if(console.info("[vs-input-map] create overlay layer",{id:E.id,service:S,url:j,sourceLayer:W,hasSourceLayer:!!W}),S==="vtile"){if((B=L==null?void 0:L.vectorGrid)!=null&&B.protobuf&&!(L!=null&&L.maplibreGL))return console.info("[vs-input-map] using Leaflet.vectorGrid"),L.vectorGrid.protobuf(j,{interactive:!0,vectorTileLayerStyles:{default:q(E)}});if(L!=null&&L.maplibreGL&&(window!=null&&window.maplibregl)){console.info("[vs-input-map] using maplibre-gl-leaflet");const te=I(E,j);return te?L.maplibreGL({style:te,interactive:!1,pane:"overlayPane"}):(console.warn("[vs-input-map] maplibre spec is empty",E.id),null)}return null}return S==="tile"||/^https?:\/\//i.test(j)||j.includes("{z}")?L.tileLayer(j,{opacity:((T=E==null?void 0:E.style)==null?void 0:T.opacity)??1}):L.tileLayer(j,{opacity:((K=E==null?void 0:E.style)==null?void 0:K.opacity)??1})}function D(){g&&p.value.forEach(E=>{const S=f[E];S&&(S.visible?(S.layer||(S.layer=F(S.config)),S.layer&&!g.hasLayer(S.layer)?(console.info("[vs-input-map] add overlay layer to map",S.id),S.layer.addTo(g)):S.layer||console.warn("[vs-input-map] overlay layer is null",S.id)):S.layer&&g.hasLayer(S.layer)&&(console.info("[vs-input-map] remove overlay layer from map",S.id),g.removeLayer(S.layer)))})}function z(E){if(s.value)return;const S=f[E];S&&(S.visible=!S.visible,g&&(console.info("[vs-input-map] toggle overlay",{id:E,nextVisible:S.visible,hasLayerInstance:!!S.layer}),S.visible?(S.layer||(S.layer=F(S.config)),S.layer&&!g.hasLayer(S.layer)&&(console.info("[vs-input-map] add overlay layer to map",S.id),S.layer.addTo(g))):S.layer&&g.hasLayer(S.layer)&&g.removeLayer(S.layer)))}function ee(){if(!r.handleZoom)return null;let E;const S=W=>{const Z=W.ctrlKey||W.metaKey,B=W.shiftKey;if(!Z&&!B){d.value=!0,m.value=x(),clearTimeout(E),E=window.setTimeout(()=>{d.value=!1},1e3);return}d.value=!1,g.scrollWheelZoom.enable(),setTimeout(()=>{g.scrollWheelZoom.disable()},100)},j=W=>{if(W.touches.length===1){d.value=!0,m.value=x(),clearTimeout(E),E=window.setTimeout(()=>{d.value=!1},3e3);return}d.value=!1};return _.value&&(_.value.addEventListener("wheel",S,{passive:!1}),_.value.addEventListener("touchstart",j,{passive:!0})),g&&g.on("wheel",W=>{const Z=W.originalEvent.ctrlKey||W.originalEvent.metaKey,B=W.originalEvent.shiftKey;!Z&&!B&&(W.originalEvent.preventDefault(),W.originalEvent.stopPropagation())}),()=>{_.value&&(_.value.removeEventListener("wheel",S),_.value.removeEventListener("touchstart",j)),g&&g.off("wheel"),clearTimeout(E)}}const me=e.ref(null),Ne=e.ref(6),Ke=e.ref(0),qt=e.ref(((Be=a==null?void 0:a.appContext.config.globalProperties.$settings)==null?void 0:Be.center)||[50,30]),Re=e.ref(null),Ye=G();let vt;const yt=e.ref("topo100");function Et(E){return E?E.type==="Polygon"?{type:"MultiPolygon",coordinates:[E.coordinates]}:(E.type,E):null}function Pt(){return new Promise((E,S)=>{window.L&&window.L.Draw&&E(0);const j=B=>{if(Array.from(document.styleSheets).some(K=>{var te;return(te=K==null?void 0:K.href)==null?void 0:te.includes(B)}))return;const T=document.createElement("link");T.rel="stylesheet",T.href=B,document.head.appendChild(T)},W=B=>new Promise((T,K)=>{const te=Array.from(document.scripts).find(we=>we.src===B);if(te){te.addEventListener("load",()=>T()),te.addEventListener("error",we=>K(we));return}const he=document.createElement("script");he.src=B,he.async=!0,he.onload=()=>T(),he.onerror=we=>K(we),document.body.appendChild(he)});j("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),j("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"),h.value&&j("https://unpkg.com/maplibre-gl@4.5.0/dist/maplibre-gl.css");let Z=W("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(()=>W("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js"));h.value?Z=Z.then(()=>W("https://unpkg.com/maplibre-gl@4.5.0/dist/maplibre-gl.js")).then(()=>(window.maplibregl&&!window.mapboxgl&&(window.mapboxgl=window.maplibregl),W("https://unpkg.com/@maplibre/maplibre-gl-leaflet@0.0.20/leaflet-maplibre-gl.js"))):Z=Z.then(()=>W("https://unpkg.com/leaflet.vectorgrid@1.3.0/dist/Leaflet.VectorGrid.bundled.js").catch(()=>Promise.resolve())),Z.then(()=>E(0)).catch(S)})}function at(){const E=b.toGeoJSON(),S=[];let j=null;const W=B=>{if(B)switch(B.type){case"Point":j=B;break;case"Polygon":S.push(B.coordinates);break;case"MultiPolygon":S.push(...B.coordinates);break;case"GeometryCollection":(B.geometries||[]).forEach(W);break}};((E==null?void 0:E.features)||[]).forEach(B=>W(B.geometry));const Z=j||(S.length?{type:"MultiPolygon",coordinates:S}:null);n("update:modelValue",Z?Et(Z):null),Ke.value=b.getLayers().length}function st(E=30){const S=b.getLayers();if(!S.length)return;const j=L.featureGroup(S).getBounds();j&&j.isValid()&&g.fitBounds(j,{padding:[E,E]})}function U(){var E;s.value||((E=V.value)==null||E.click())}const Y=e.ref("");e.watch(o,E=>{Y.value&&!Object.entries(E).filter(([S,j])=>j).map(([S])=>S).includes(Y.value)&&(w!=null&&w.disable&&w.disable(),Y.value="")}),e.watch(()=>r.layers,E=>{const S=Array.isArray(E)?E:[],j=[],W=new Set;S.forEach((Z,B)=>{if(!Z)return;const T=$(Z,B);j.push(T),W.add(T),console.info("[vs-input-map] overlay register",{id:T,service:Z==null?void 0:Z.service,url:Z==null?void 0:Z.url});const K=f[T];K?f[T]={...K,config:{...Z,id:T}}:f[T]={id:T,config:{...Z,id:T},visible:(Z==null?void 0:Z.overlay)!==!1,layer:null}}),Object.keys(f).forEach(Z=>{if(W.has(Z))return;const B=f[Z];B!=null&&B.layer&&(g!=null&&g.hasLayer)&&g.hasLayer(B.layer)&&g.removeLayer(B.layer),delete f[Z]}),p.value=j,D()},{immediate:!0,deep:!0}),e.watch(s,E=>{E&&w&&(w.disable(),Y.value=""),b&&b.eachLayer(S=>{var j,W,Z,B,T;E?(W=(j=S.dragging)==null?void 0:j.disable)==null||W.call(j):(Z=S.dragging)!=null&&Z.enable&&(S.dragging.enable(),(T=(B=S.dragging).enabled)==null||T.call(B))})});function le(E){return E instanceof L.Circle?"Circle":E instanceof L.Rectangle?"Rectangle":E instanceof L.Polygon&&!(E instanceof L.Rectangle)?"Polygon":E instanceof L.Polyline&&!(E instanceof L.Polygon)?"Polyline":E instanceof L.Marker?"Point":"Feature"}function ae(E){var S;if(E instanceof L.Circle){const j=E.getRadius();return Math.PI*(j*j)/1e6}if(E instanceof L.Polygon||E instanceof L.Rectangle)try{const j=E.getLatLngs(),W=Array.isArray(j[0])?j[0]:j,Z=(S=L.GeometryUtil)!=null&&S.geodesicArea?L.GeometryUtil.geodesicArea(W):0;return Z?Z/1e6:0}catch{return null}return null}function de(E){return E instanceof L.Circle?E.getLatLng():E.getBounds?E.getBounds().getCenter():E.getLatLng?E.getLatLng():g.getCenter()}async function Ae(E,S){var Z;if(k.value="",!((Z=r.api)!=null&&Z.length))return;const[j,W]=r.api;try{const B=new URL(j);B.searchParams.set("lat",String(E)),B.searchParams.set("lon",String(S));const T=await fetch(B.toString());if(!T.ok)throw new Error("Request failed");const K=await T.json();W&&K[W]!==void 0?k.value=String(K[W]):k.value=JSON.stringify(K)}catch(B){console.error("[vs-input-map] reverse geocode failed:",B),k.value=null}}function C(){const E=b.getLayers();if(!E.length){Re.value=null,Ke.value=0;return}const S=E[E.length-1],j=le(S),W=de(S),Z=ae(S);Re.value={type:j,center:W,areaKm2:Z,layer:S},Ke.value=E.length,Ae(W.lat,W.lng)}function v(){var S;if(s.value)return;const E=(S=Re.value)==null?void 0:S.layer;E&&(E instanceof L.Circle&&E.getBounds?g.fitBounds(E.getBounds(),{padding:[30,30]}):E.getBounds?g.fitBounds(E.getBounds(),{padding:[30,30]}):E.getLatLng&&g.setView(E.getLatLng(),Math.max(Ne.value,14)))}function H(){var S;if(s.value)return;const E=(S=Re.value)==null?void 0:S.layer;E&&(b.removeLayer(E),at(),C())}e.onMounted(async()=>{document.addEventListener("wheel",P,{passive:!1}),await Pt(),L.drawLocal=by;const E=r.handleZoom;g=L.map(_.value,{zoomControl:!1,scrollWheelZoom:!E}).setView(qt.value,10),setTimeout(()=>{N=ee()},100),L.control.zoom({position:"bottomright"}).addTo(g),yt.value=Object.keys(Ye)[0],vt=L.tileLayer(Ye[yt.value].url,{maxZoom:19,minZoom:6}).addTo(g),b=new L.FeatureGroup().addTo(g),g.on(L.Draw.Event.CREATED,W=>{if(s.value)return;const{layer:Z}=W;b.clearLayers(),b.addLayer(Z),at(),st(),Y.value=""}),g.on(L.Draw.Event.EDITED,()=>{s.value||(at(),C(),st())}),g.on(L.Draw.Event.DELETED,()=>{s.value||(at(),C(),st())});let S=!1;g.on("mousemove",W=>{S||(g.invalidateSize(),S=!0),me.value=W.latlng}),g.on("zoomend",()=>{Ne.value=g.getZoom()});const j=yy(r.modelValue);if(j){const W=[];L.geoJSON(j).eachLayer(Z=>W.push(Z)),W.length&&b.addLayer(W[0]),at(),C(),st()}D()}),e.onUnmounted(()=>{document.removeEventListener("wheel",P),N&&N(),Object.values(f).forEach(E=>{var S;E!=null&&E.layer&&((S=g==null?void 0:g.hasLayer)!=null&&S.call(g,E.layer)&&g.removeLayer(E.layer),typeof E.layer.remove=="function"&&E.layer.remove())})});function re(E){if(!s.value&&g){switch(w&&w.disable(),E){case"marker":w=new L.Draw.Marker(g);break;case"polyline":w=new L.Draw.Polyline(g);break;case"polygon":w=new L.Draw.Polygon(g);break;case"rectangle":w=new L.Draw.Rectangle(g);break;default:w=new L.Draw.Rectangle(g);break}w&&(w.enable(),Y.value=E)}}function Te(){if(s.value)return;const E=b.toGeoJSON(),S=new Blob([JSON.stringify(E,null,2)],{type:"application/json"}),j=URL.createObjectURL(S),W=document.createElement("a");W.href=j,W.download="data.geojson",W.click(),URL.revokeObjectURL(j)}function Le(E){var Z;if(s.value)return;const S=E.target,j=(Z=S.files)==null?void 0:Z[0];if(!j)return;const W=new FileReader;W.onload=()=>{if(typeof W.result=="string")try{const B=JSON.parse(W.result);b.clearLayers(),B&&L.geoJSON({type:"Feature",geometry:B}).eachLayer(T=>{b.addLayer(T)}),at(),C(),st()}finally{S.value=""}},W.readAsText(j)}function be(E){g&&(vt&&g.removeLayer(vt),vt=L.tileLayer(Ye[E].url,{maxZoom:19,minZoom:6}).addTo(g),yt.value=E)}function O(E){const S=L.latLng(E[0],E[1]);g.setView(S,13)}e.watch(()=>r.modelValue,E=>{const S=Et(E);if(E&&S!==E){n("update:modelValue",S);return}b.clearLayers(),S&&L.geoJSON({type:"Feature",geometry:S}).eachLayer(j=>{var W,Z,B,T,K,te;if(b.addLayer(j),s.value){(Z=(W=j.dragging)==null?void 0:W.disable)==null||Z.call(W);return}(T=(B=j.dragging)==null?void 0:B.enable)==null||T.call(B),(te=(K=j.dragging)==null?void 0:K.enabled)==null||te.call(K),j.on("dragend",he=>{const we=he.target.getLatLng();n("update:modelValue",{type:"Point",coordinates:[we.lng,we.lat]})})}),Ke.value=b.getLayers().length,C(),st()});function G(){var E,S;return(E=a==null?void 0:a.appContext.config.globalProperties.$settings)!=null&&E.basemaps?(S=a==null?void 0:a.appContext.config.globalProperties.$settings)==null?void 0:S.basemaps.map((j,W)=>Object.assign(j,{key:`b${W}`,preview:j.preview||j.url.replace("{z}/{x}/{y}.png","13/4790/2762.png")})).reduce((j,W)=>({...j,[W.key]:W}),{}):{topo100:{url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"},orto10:{url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4790/2762.png"},osmb:{url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png",preview:"https://tile.openstreetmap.org.ua/styles/osm-bright/13/4790/2762.png"}}}const ye=e.ref(!1);return e.watch(ye,()=>{setTimeout(()=>{g.invalidateSize()},50)}),e.watch(i,async E=>{if(!E||!u.value){c.value=null;return}await e.nextTick();const S=u.value.getBoundingClientRect();c.value={top:S.bottom+6,left:S.left}}),e.onUnmounted(()=>{i.value=!1,c.value=null}),(E,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["leaflet-map-wrapper relative w-full h-[400px]",{fullscreen:ye.value}])},[e.createElementVNode("div",{ref_key:"mapContainer",ref:_,class:"w-full h-full"},null,512),e.createVNode(e.Transition,{name:"zoom-instructions","enter-active-class":"transition-all duration-200 ease-out","leave-active-class":"transition-all duration-500 ease-in","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[d.value&&r.handleZoom?(e.openBlock(),e.createElementBlock("div",Jy,[e.createElementVNode("div",e1,[e.createElementVNode("p",t1,e.toDisplayString(m.value),1)])])):e.createCommentVNode("",!0)]),_:1}),o.value.search||o.value.import||o.value.export?(e.openBlock(),e.createElementBlock("div",l1,[o.value.search?(e.openBlock(),e.createBlock(Wy,{key:0,onGoToCoordinates:O})):e.createCommentVNode("",!0),o.value.import||o.value.export?(e.openBlock(),e.createElementBlock("div",a1,[e.createElementVNode("div",r1,[o.value.import?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white transition",onClick:U,disabled:s.value}," Import ",8,n1)):e.createCommentVNode("",!0),o.value.export?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white transition",onClick:Te,disabled:s.value||Ke.value===0}," Export ",8,o1)):e.createCommentVNode("",!0)]),e.createElementVNode("input",{ref_key:"importRef",ref:V,type:"file",onChange:Le,accept:".json,.geojson",class:"hidden",disabled:s.value},null,40,s1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",i1,[e.createElementVNode("div",c1,[o.value.point?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["vs-btn",{"vs-active":Y.value==="marker"}]),title:"Point",onClick:S[0]||(S[0]=j=>re("marker")),disabled:s.value},[e.createVNode(_y)],10,d1)):e.createCommentVNode("",!0),o.value.line?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(["vs-btn",{"vs-active":Y.value==="polyline"}]),title:"Line",onClick:S[1]||(S[1]=j=>re("polyline")),disabled:s.value},[e.createVNode(Ny)],10,u1)):e.createCommentVNode("",!0),o.value.polygon?(e.openBlock(),e.createElementBlock("button",{key:2,class:e.normalizeClass(["vs-btn",{"vs-active":Y.value==="polygon"}]),title:"Polygon",onClick:S[2]||(S[2]=j=>re("polygon")),disabled:s.value},[e.createVNode(Dy)],10,m1)):e.createCommentVNode("",!0),o.value.rectangle?(e.openBlock(),e.createElementBlock("button",{key:3,class:e.normalizeClass(["vs-btn",{"vs-active":Y.value==="rectangle"}]),title:"Rectangle",onClick:S[3]||(S[3]=j=>re("rectangle")),disabled:s.value},[e.createVNode(Ly)],10,p1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"vs-btn mt-5",onClick:S[4]||(S[4]=j=>ye.value=!ye.value),title:"Full Screen"},[e.createVNode(Oy,{style:{width:"12px",height:"12px"}})])])]),e.createElementVNode("div",{class:e.normalizeClass(["absolute left-4 z-[1000]",Re.value?"bottom-8":"bottom-4"])},[e.createElementVNode("div",f1,[e.createVNode(Qy,{basemaps:e.unref(Ye),onOnLayerChange:be},null,8,["basemaps"]),y.value.length?(e.openBlock(),e.createElementBlock("div",h1,[S[9]||(S[9]=e.createElementVNode("p",{class:"font-semibold text-[11px] uppercase tracking-wide text-gray-500 mb-2"},"Layers",-1)),e.createElementVNode("div",g1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,j=>(e.openBlock(),e.createElementBlock("label",{key:j.id,class:"flex items-center gap-2 cursor-pointer select-none"},[e.createElementVNode("input",{type:"checkbox",class:"rounded border-gray-300 text-blue-600 focus:ring-blue-500",checked:j.visible,disabled:s.value,onChange:W=>z(j.id)},null,40,b1),e.createElementVNode("span",y1,e.toDisplayString(j.config.title||j.config.name||j.id),1)]))),128))])])):e.createCommentVNode("",!0)])],2),e.createElementVNode("div",k1,[Re.value?(e.openBlock(),e.createElementBlock("div",x1,[e.createElementVNode("div",{class:"mr-auto flex items-center gap-2 min-w-0 relative",onMouseenter:S[5]||(S[5]=j=>i.value=!0),onMouseleave:S[6]||(S[6]=j=>i.value=!1)},[e.createElementVNode("div",w1,[S[10]||(S[10]=e.createTextVNode(" Type: ",-1)),e.createElementVNode("span",_1,e.toDisplayString(Re.value.type),1)]),k.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"addressEl",ref:u,class:"text-gray-500 text-xs truncate cursor-help",style:{"max-width":"260px"}}," Address: "+e.toDisplayString(k.value),513)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[i.value&&k.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed z-[99999] pointer-events-none bg-gray-800 text-white text-xs px-2 py-1 rounded shadow whitespace-nowrap",style:e.normalizeStyle({top:c.value.top+"px",left:c.value.left+"px"})},e.toDisplayString(k.value),5)):e.createCommentVNode("",!0)]))],32),e.createElementVNode("div",E1,[e.createElementVNode("div",C1,[S[11]||(S[11]=e.createTextVNode(" Center: ",-1)),e.createElementVNode("b",null,e.toDisplayString(Re.value.center.lat.toFixed(5))+", "+e.toDisplayString(Re.value.center.lng.toFixed(5)),1)]),Re.value.areaKm2!==null?(e.openBlock(),e.createElementBlock("div",V1,[S[12]||(S[12]=e.createTextVNode(" Area: ",-1)),e.createElementVNode("b",null,e.toDisplayString(Re.value.areaKm2.toFixed(1))+" km²",1)])):(e.openBlock(),e.createElementBlock("div",N1,S[13]||(S[13]=[e.createTextVNode("Area: ",-1),e.createElementVNode("b",null,"—",-1)]))),e.createElementVNode("button",{class:"tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",title:"Zoom to feature",onClick:S[7]||(S[7]=j=>v()),disabled:s.value},S[14]||(S[14]=[e.createStaticVNode('<svg 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="w-3 h-3" data-v-150e767b><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-150e767b></path><path d="M7 10l6 0" data-v-150e767b></path><path d="M10 7l0 6" data-v-150e767b></path><path d="M21 21l-6 -6" data-v-150e767b></path></svg>',1)]),8,v1),e.createElementVNode("button",{class:"tool bg-gray-100 py-1.5 px-2 rounded-lg text-md cursor-pointer hover:bg-blue-500 hover:text-white transition-all",title:"Delete feature",onClick:S[8]||(S[8]=j=>H()),disabled:s.value},[e.createVNode(va,{class:"w-3 h-3"})],8,B1)])])):e.createCommentVNode("",!0)])],2))}}),D1=_e(S1,[["__scopeId","data-v-150e767b"]]),A1=["data-focus"],M1={class:"flex items-center"},T1={class:"overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border"},L1=["onClick","aria-label"],$1={key:0,class:"absolute text-gray-500 truncate pl-2"},F1={class:"flex-1 min-w-[2px]"},I1=["placeholder"],O1={class:"flex items-center shrink-0"},P1=["disabled"],R1=e.defineComponent({__name:"vs-input-tag",props:e.mergeModels({unique:{type:Boolean,default:!0},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:"Введіть тег"}},{modelValue:{default:[]},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue"],["update:modelValue"]),setup(l,{emit:t}){const a=l,r=t;ft(a.style);const n=e.ref(null),o=e.ref(null),s=e.ref(null),i=e.ref(!1),c=e.ref(""),u=e.useModel(l,"modelValue"),d=e.computed(()=>a.placeholder||"Add tag…"),m=e.computed(()=>{var N;return((N=u.value)==null?void 0:N.length)===0&&c.value===""}),f=e.computed(()=>{var N;return!a.disabled&&((N=u.value)==null?void 0:N.length)>0}),p=e.computed(()=>a.disabled),y=async()=>{p.value||await e.nextTick(()=>{var N;return(N=s.value)==null?void 0:N.focus()})},h=N=>{const V=N.trim();V!==""&&(!u.value||!Array.isArray(u.value)?u.value=[V]:a.unique?u.value.includes(V)||(u.value=[...u.value,V]):u.value=[...u.value,V],c.value="")},g=()=>{const N=c.value;N.trim()!==""&&h(N),c.value=""},b=N=>{const V=u.value.slice();V.splice(N,1),r("update:modelValue",V)},w=()=>{r("update:modelValue",[])},x=()=>{p.value||(i.value=!0)},k=()=>{i.value=!1,!p.value&&g()},_=N=>{const{key:V}=N;V==="Enter"?(N.preventDefault(),g()):V==="Backspace"&&c.value===""&&u.value.length>0&&b(u.value.length-1)};return(N,V)=>(e.openBlock(),e.createElementBlock("div",{class:"flex gap-1 w-full",ref_key:"root",ref:n,onClick:V[1]||(V[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["relative w-full font-sans",a.customClass]),role:"group","aria-label":"Tag input"},[e.createElementVNode("div",{class:e.normalizeClass(["flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white","border-gray-300 hover:border-gray-400",i.value?"border-blue-500 ring-1 ring-blue-500":"",p.value?"bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300":""]),"data-focus":i.value?"true":"false",onClick:y},[e.createElementVNode("div",{class:"flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",ref_key:"chipsRef",ref:o},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(P,$)=>(e.openBlock(),e.createElementBlock("div",{key:$,class:"flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"},[e.createElementVNode("div",M1,[e.createElementVNode("div",T1,e.toDisplayString(P),1)]),e.createElementVNode("div",{role:"button",class:"flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",onClick:e.withModifiers(M=>b($),["stop"]),"aria-label":`Remove ${P}`},V[2]||(V[2]=[e.createElementVNode("svg",{height:"14",width:"14",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",class:"inline-block fill-current stroke-current leading-none stroke-0"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,L1)]))),128)),m.value?(e.openBlock(),e.createElementBlock("div",$1,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",F1,[p.value?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:s,class:"pl-2 w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-label":"Add tag","onUpdate:modelValue":V[0]||(V[0]=P=>c.value=P),onFocus:x,onBlur:k,onKeydown:_,placeholder:u.value&&u.value.length?"":void 0},null,40,I1)),[[e.vModelText,c.value]])])],512),e.createElementVNode("div",O1,[f.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-label":"Clear all tags",disabled:p.value,onClick:e.withModifiers(w,["stop"])},V[3]||(V[3]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,P1)):e.createCommentVNode("",!0)])],10,A1)],2)],512))}}),U1={class:"relative flex gap-1 bg-white w-full"},j1=["disabled","placeholder"],z1=e.defineComponent({__name:"vs-input-slug",props:e.mergeModels({disabled:{type:Boolean},placeholder:{},parent:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=e.inject("values"),a=l,r=e.useModel(l,"modelValue");function n(s){const i={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ы:"y",э:"e",ю:"yu",я:"ya",ь:"",ъ:"",є:"ye",і:"i",ї:"yi",ґ:"g"};return s.toLowerCase().split("").map(c=>i[c]||c).join("").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const o=()=>{var c,u;const s=(u=(c=t==null?void 0:t.value)==null?void 0:c[a.parent||""])==null?void 0:u.toString(),i=n(s);r.value=i.toString()};return(s,i)=>(e.openBlock(),e.createElementBlock("div",U1,[e.withDirectives(e.createElementVNode("input",{ref:"vsText",disabled:s.disabled,placeholder:s.placeholder,"onUpdate:modelValue":i[0]||(i[0]=c=>r.value=c),class:"block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,8,j1),[[e.vModelText,r.value]]),e.createElementVNode("button",{class:"px-2 bg-gray-100 border rounded-lg hover:bg-gray-200",onClick:o}," Gen ")]))}}),H1=_e(z1,[["__scopeId","data-v-b0eba370"]]),q1={class:"relative flex gap-1 bg-white w-full"},G1=["disabled","placeholder"],W1=["disabled"],K1={key:0},Y1={key:1},X1=e.defineComponent({__name:"vs-input-codegen",props:e.mergeModels({table:{},code:{},init:{type:Boolean},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),r=e.ref(!1),n=e.computed(()=>t.init!==!1),o=e.computed(()=>!!t.table&&!!t.code),s=()=>{if(!o.value)return"";const u=encodeURIComponent(String(t.table)),d=encodeURIComponent(String(t.code));return`/api/code-gen/${u}/${d}`},i=async()=>{if(!o.value||r.value)return;const u=s();if(u){r.value=!0;try{const d=await(await fetch(u)).text();a.value=d}finally{r.value=!1}}},c=()=>{n.value&&(a.value||i())};return e.onMounted(()=>{c()}),e.watch(()=>[t.table,t.code,t.init],()=>{c()}),(u,d)=>(e.openBlock(),e.createElementBlock("div",q1,[e.withDirectives(e.createElementVNode("input",{disabled:u.disabled,placeholder:u.placeholder,"onUpdate:modelValue":d[0]||(d[0]=m=>a.value=m),class:"block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,8,G1),[[e.vModelText,a.value]]),e.createElementVNode("button",{class:"px-2 bg-gray-100 border rounded-lg hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed",disabled:r.value||u.disabled||!o.value,onClick:i},[r.value?(e.openBlock(),e.createElementBlock("span",Y1,"...")):(e.openBlock(),e.createElementBlock("span",K1,"Gen"))],8,W1)]))}}),Z1=_e(X1,[["__scopeId","data-v-6ee5237d"]]),Q1={class:"w-full"},J1={ref:"sortableContainer",class:"flex flex-col gap-1"},ek=["onDragstart","onDrop"],tk={class:"w-1/3"},lk={class:"w-2/3"},ak=["onClick"],rk={key:0,class:"text-[14px] text-gray-700"},nk={class:"mt-2 w-full flex items-center"},ok=["disabled"],sk=e.defineComponent({__name:"vs-input-key-value",props:{parent:{},ignore:{},addButtonText:{},modelValue:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=h=>`${h}-${Math.random().toString(36).substring(2,15)}`,r=e.inject("values"),n=l,o=t,s=n.addButtonText??"Додати",i=n.ignore??[],c=e.ref([]),u=e.ref(null);(()=>{var g;const h=n.parent&&((g=r==null?void 0:r.value)==null?void 0:g[n.parent])||n.modelValue||{};c.value=Object.entries(h).filter(([b])=>!i.includes(b)).map(([b,w])=>({id:a("key-value-"),key:b,value:w}))})();function d(h){u.value=h}function m(h){if(u.value===null||u.value===h)return;const g=c.value.splice(u.value,1)[0];c.value.splice(h,0,g),u.value=null}const f=e.computed(()=>c.value.some(h=>h.key&&!h.value||!h.key&&h.value)),p=()=>{c.value.push({id:a("key-value-"),key:"",value:""})},y=h=>{c.value=c.value.filter(g=>g.id!==h)};return e.watch(c,h=>{const g={};h.forEach(w=>{w.key&&w.value!==void 0&&(g[w.key]=w.value)});const b={};i.length&&i.forEach(w=>{var x,k;b[w]=n.parent?(k=(x=r==null?void 0:r.value)==null?void 0:x[n.parent])==null?void 0:k[w]:void 0}),r!=null&&r.value&&n.parent&&(r.value[n.parent]={...b,...g}),o("update:modelValue",g)},{deep:!0}),(h,g)=>(e.openBlock(),e.createElementBlock("div",Q1,[e.createElementVNode("div",J1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(b,w)=>(e.openBlock(),e.createElementBlock("div",{key:b.id,class:e.normalizeClass(["flex items-center gap-2 w-full",{"opacity-50":u.value===w}]),draggable:"true",onDragstart:x=>d(w),onDragover:g[0]||(g[0]=e.withModifiers(()=>{},["prevent"])),onDrop:x=>m(w)},[g[1]||(g[1]=e.createStaticVNode('<button class="cursor-move" data-v-a0f7fbfc><svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-a0f7fbfc><circle cx="15" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="18" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="18" r="1.5" data-v-a0f7fbfc></circle></svg></button>',1)),e.createElementVNode("div",tk,[e.createVNode(Na,{modelValue:b.key,"onUpdate:modelValue":x=>b.key=x,placeholder:"Ключ"},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("div",lk,[e.createVNode(Na,{modelValue:b.value,"onUpdate:modelValue":x=>b.value=x,placeholder:"Значення"},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("button",{onClick:x=>y(b.id),class:"shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"},[e.createVNode(e.unref(vh),{height:"16",width:"16"})],8,ak)],42,ek))),128))],512),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",rk," Дані для відображення відсутні ")),e.createElementVNode("div",nk,[e.createElementVNode("button",{type:"button",onClick:p,disabled:f.value,class:"py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"},[e.createVNode(Gl,{height:"14",width:"14"}),e.createTextVNode(" "+e.toDisplayString(e.unref(s)),1)],8,ok)])]))}}),ik=_e(sk,[["__scopeId","data-v-a0f7fbfc"]]),ck={class:"flex items-center gap-2 w-full"},dk=["disabled"],uk=["disabled"],mk=e.defineComponent({__name:"vs-input-color",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,{inputClass:r}=ft(a.style),n=t,o=e.computed({get:()=>a.modelValue||"#000000",set:i=>n("update:modelValue",i)}),s=e.computed(()=>!!a.disabled);return(i,c)=>(e.openBlock(),e.createElementBlock("div",ck,[e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),disabled:s.value,ref:"color",class:e.normalizeClass(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]",[i.modelValue?"":"text-opacity-50",e.unref(r)].join(" ")]),style:{border:"1px solid #CFD9E0"}},null,10,dk),[[e.vModelText,o.value]]),e.withDirectives(e.createElementVNode("input",{class:"text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2","onUpdate:modelValue":c[1]||(c[1]=u=>o.value=u),disabled:s.value},null,8,uk),[[e.vModelText,o.value]])]))}}),pk={class:"flex items-center gap-2 w-full"},fk=["min","max","step","disabled"],hk=["disabled"],gk=e.defineComponent({__name:"vs-input-range",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},min:{default:0},max:{default:100},step:{default:1}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,{inputClass:r}=ft(a.style),n=t,o=e.computed({get:()=>Number(a.modelValue??a.min),set:i=>n("update:modelValue",Number(i))}),s=e.computed(()=>!!a.disabled);return(i,c)=>(e.openBlock(),e.createElementBlock("div",pk,[e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),min:i.min,max:i.max,step:i.step,disabled:s.value,ref:"range",class:e.normalizeClass(["w-full cursor-pointer accent-blue-500",[i.modelValue?"":"text-opacity-50",e.unref(r)].join(" ")])},null,10,fk),[[e.vModelText,o.value]]),e.withDirectives(e.createElementVNode("input",{class:"text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",type:"number","onUpdate:modelValue":c[1]||(c[1]=u=>o.value=u),disabled:s.value},null,8,hk),[[e.vModelText,o.value]])]))}}),bk=["type","value","onInput","placeholder","disabled"],yk=e.defineComponent({__name:"vs-input-array",props:e.mergeModels({count:{default:1},limit:{default:l=>l.count??1},inputType:{default:"text"},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),r=e.useModel(l,"modelValue"),n=e.computed(()=>!!t.disabled),o=e.computed(()=>t.placeholder??"");e.watchEffect(()=>{var c;const i=((c=r.value)==null?void 0:c.length)??0;i<t.count&&(r.value=[...r.value??[],...Array(t.count-i)])});function s(i,c){if(n.value)return;const u=i.target.value,d=[...r.value];d[c]=t.inputType==="text"?u:Number(u),r.value=d}return(i,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid gap-2",`grid-cols-${i.limit}`])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.count,u=>{var d;return e.openBlock(),e.createElementBlock("input",{type:i.inputType,value:((d=r.value)==null?void 0:d[u-1])??"",onInput:m=>s(m,u-1),placeholder:o.value,disabled:n.value,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":i.error}]]),style:{border:"1px solid #CFD9E0"}},null,42,bk)}),256))],2))}}),kk={class:"flex items-center gap-2 w-full"},xk={class:"relative flex-1"},wk=["placeholder","disabled","onKeydown"],_k=["disabled"],Ek={key:0,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Ck={key:1,class:"animate-spin h-5 w-5 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},Vk={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50"},Nk={class:"bg-white text-gray-900 rounded-lg shadow-lg w-[480px] max-h-[80vh] overflow-y-auto"},vk={class:"p-3 border-b font-semibold text-gray-900 flex justify-between items-center"},Bk=["onClick"],Sk={key:0,class:"p-4 text-sm text-gray-500"},Dk=e.defineComponent({__name:"vs-input-address",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{},api:{default:""},geom:{default:""},includes:{default:()=>[]}},{modelValue:{default:""},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue","update:geom"],["update:modelValue"]),setup(l,{emit:t}){const a=l,r=t,{inputClass:n}=ft(a.style),o=e.useModel(l,"modelValue"),s=e.computed({get:()=>o.value,set:b=>{o.value=b}}),i=e.ref(!1),c=e.ref([]),u=e.ref(!1),d=e.computed(()=>a.placeholder??""),m=e.computed(()=>!!a.disabled),f=e.inject("values");function p(){!m.value&&s.value.trim()&&y()}async function y(){var k;const b=(s.value||"").trim();if(!b)return;let w=b;if((k=a.includes)!=null&&k.length&&(f!=null&&f.value)){const _=a.includes.map(N=>{var V;return(V=f.value)==null?void 0:V[N]}).filter(Boolean);_.length&&(w=`${_.join(", ")}, ${b}`)}const x=a.api.replace("{{value}}",encodeURIComponent(w));i.value=!0;try{const _=await(await fetch(x)).json();c.value=Array.isArray(_)?_:[],u.value=!0}catch(_){console.error("Address search error:",_)}finally{i.value=!1}}function h(){u.value=!u.value}function g(b){if(!b)return;u.value=!1;const w=parseFloat(b.lat),x={type:"Point",coordinates:[parseFloat(b.lon),w]};a.geom&&(f!=null&&f.value)&&(f.value[a.geom]=x),r("update:geom",x)}return(b,w)=>{var x;return e.openBlock(),e.createElementBlock("div",kk,[e.createElementVNode("div",xk,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":w[0]||(w[0]=k=>s.value=k),placeholder:d.value,disabled:m.value,class:e.normalizeClass(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500",[e.unref(n),{"!border-red-600":a.error}]]),style:{border:"1px solid #CFD9E0"},onKeydown:e.withKeys(e.withModifiers(p,["prevent"]),["enter"])},null,42,wk),[[e.vModelText,s.value]]),c.value.length?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-blue-600",onClick:h,title:"Show search results"},w[2]||(w[2]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),e.createElementVNode("path",{d:"M12 16v-4"}),e.createElementVNode("path",{d:"M12 8h.01"})],-1)]))):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",onClick:y,class:"flex items-center justify-center px-2 py-2 border rounded-md bg-white hover:bg-gray-50 text-gray-600 hover:text-blue-600 disabled:opacity-50 h-[38px]",disabled:i.value||!((x=s.value)!=null&&x.trim())},[i.value?(e.openBlock(),e.createElementBlock("svg",Ck,w[4]||(w[4]=[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",Ek,w[3]||(w[3]=[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),e.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},null,-1)])))],8,_k),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[u.value?(e.openBlock(),e.createElementBlock("div",Vk,[e.createElementVNode("div",Nk,[e.createElementVNode("div",vk,[w[6]||(w[6]=e.createElementVNode("span",null,"Search results",-1)),e.createElementVNode("button",{class:"text-gray-500 hover:text-blue-600",onClick:w[1]||(w[1]=k=>u.value=!1),title:"Close"},w[5]||(w[5]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)]))]),e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(k,_)=>(e.openBlock(),e.createElementBlock("li",{key:_,onClick:N=>g(k),class:"px-3 py-2 cursor-pointer hover:bg-gray-100 border-b text-sm"},e.toDisplayString(k.display_name),9,Bk))),128))]),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Sk," No results found "))])])):e.createCommentVNode("",!0)]))])}}}),$e={VsInputText:Na,VsInputRadio:Qo,"vs-input-text":Na,"vs-input-password":th,"vs-input-textarea":cb,"vs-input-mask":Oh,"vs-input-number":rh,"vs-input-radio":Qo,"vs-input-select":Lr,"vs-input-switcher":Xo,"vs-input-static":Zo,"vs-input-container":jg,"vs-input-date":e0,"vs-input-checkbox":Jo,"vs-input-file":U0,"vs-input-html":Zo,"vs-input-email":Uh,"vs-input-datatable":gy,"vs-input-map":D1,"vs-input-file-list":bg,"vs-input-tags":R1,"vs-input-slug":H1,"vs-input-codegen":Z1,"vs-input-key-value":ik,"vs-input-range":gk,"vs-input-color":mk,"vs-input-native-select":Lr,"vs-input-array":yk,"vs-input-address":Dk},Ak=e.defineComponent({__name:"behavior",props:{api:{},set:{},button:{},error:{},value:{}},setup(l){const t=l,a=e.inject("values");async function r(){try{if(!t.api)return;const n=t.api.replace("{{value}}",t.value),o=await fetch(n);if(!o.ok){xe({type:"warning",title:"Validation",message:"При спробі завантажити дані виникла помилка."});return}const s=await o.json();if(!t.set||!a)return;for(const[i,c]of Object.entries(t.set))a.value[i]=s.result[c]}catch(n){console.error(t.error,n)}}return(n,o)=>(e.openBlock(),e.createElementBlock("button",{onClick:r,class:"vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"},e.toDisplayString(n.button),1))}}),Mk={class:"flex flex-col gap-1 w-full"},Tk={key:0,class:"text-sm text-gray-500"},ss=e.defineComponent({__name:"vs-compact-form-layout",props:e.mergeModels({item:{default:{}},layout:{default:"default"},style:{default:{}},type:{default:""},error:{type:[String,Boolean]},columns:{default:()=>({container:12,label:3})}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),r=e.computed(()=>Jf[`${t.layout}`]),n=e.computed(()=>$e==null?void 0:$e[`vs-input-${t.item.type}`]),o=e.computed(()=>{var d;const i=e.unref(n);if(!i)return new Set;const c=i.props??((d=i.__vccOpts)==null?void 0:d.props);if(!c)return new Set;const u=Array.isArray(c)?c:Object.keys(c);return new Set(u)}),s=e.computed(()=>{const i=t.item??{},c=o.value;return c.size?Object.fromEntries(Object.entries(i).filter(([u])=>c.has(u))):{}});return(i,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{ua:t.item.ua,error:t.error||"",item:i.item,columns:t.columns,label:t.item.label},{default:e.withCtx(()=>{var u,d;return[e.createElementVNode("div",{class:e.normalizeClass(["flex w-full",`${t.item.type}-component`])},[e.createElementVNode("div",Mk,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),e.mergeProps(s.value,{modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=m=>a.value=m)}),null,16,["modelValue"])),i.item.description&&t.layout!=="settings"?(e.openBlock(),e.createElementBlock("p",Tk,e.toDisplayString(i.item.description),1)):e.createCommentVNode("",!0)]),(u=i.item.behavior)!=null&&u.api&&((d=i.item.behavior)!=null&&d.button)?(e.openBlock(),e.createBlock(Ak,e.mergeProps({key:0},i.item.behavior,{value:a.value}),null,16,["value"])):e.createCommentVNode("",!0)],2)]}),_:1},8,["ua","error","item","columns","label"]))}}),Lk={class:"text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300"},$k={class:"vs-compact-form-navigation__rail mt-[6px]"},Fk=["onClick"],Ik=e.defineComponent({__name:"vs-compact-form-navigation",props:{target:{},scrollContainer:{},title:{default:"Навігація"},enabled:{type:Boolean,default:!0},width:{default:400}},setup(l,{expose:t}){const a=l,r=e.ref([]),n=e.ref(""),o=e.ref(""),s=e.computed(()=>!!a.enabled),i=e.computed(()=>["vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]","sticky top-0 self-start shrink-0","max-h-full min-h-0 overflow-y-auto"]),c=e.computed(()=>{const A=a.width;if(A==null)return{};const q=typeof A=="number"?`${A}px`:`${A}`;return{width:q,minWidth:q}});let u=null,d=0,m=0,f=null,p=null,y=null;const h=()=>$(),g=()=>w();e.watch(()=>a.target,async A=>{if(N(),!A){f=null,r.value=[],n.value="";return}f=A,s.value&&(await e.nextTick(),_(A),w())},{immediate:!0}),e.watch(()=>a.scrollContainer,A=>{if(!s.value){p=A??null;return}b(A??null),e.nextTick(()=>w())},{immediate:!0}),e.onMounted(()=>{a.scrollContainer||b(null),w()}),e.onBeforeUnmount(()=>{N(),b(null,!0),f=null,typeof window<"u"&&(d&&window.cancelAnimationFrame(d),m&&window.cancelAnimationFrame(m))});function b(A,q=!1){if(y&&(y(),y=null),q){p=null;return}if(p=A??null,typeof window>"u")return;const Q=A??window,R=window;Q.addEventListener("scroll",h,{passive:!0}),R.addEventListener("resize",g),y=()=>{Q.removeEventListener("scroll",h),R.removeEventListener("resize",g)}}function w(){if(!s.value||!f)return;d&&typeof window<"u"&&window.cancelAnimationFrame(d);const A=()=>{x(),d=0};typeof window>"u"?A():d=window.requestAnimationFrame(A)}function x(){if(!s.value||!f)return;const A=Array.from(f.querySelectorAll("h1, h2")),q=new Set,Q=[];A.forEach((R,I)=>{var me;const F=((me=R.textContent)==null?void 0:me.trim())??"";if(!F)return;let D=(R.getAttribute("id")??"").trim();D||(D=k(F)||`heading-${I+1}`);let z=D,ee=1;for(;q.has(z);)z=`${D}-${ee+=1}`;R.id!==z&&Object.assign(R,{id:z}),q.add(z),Q.push({id:z,text:F,level:R.tagName.toLowerCase()==="h1"?1:2})}),r.value=Q,Q.length||(n.value=""),P()}function k(A){return A.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function _(A){!A||!s.value||typeof MutationObserver>"u"||(N(),u=new MutationObserver(()=>w()),u.observe(A,{childList:!0,subtree:!0}))}function N(){u&&(u.disconnect(),u=null)}function V(A){const q=p;if(!q)return typeof window>"u"?A.offsetTop:A.getBoundingClientRect().top+window.scrollY;const Q=A.getBoundingClientRect(),R=q.getBoundingClientRect();return Q.top-R.top+q.scrollTop}function P(){if(!s.value||!r.value.length)return;const A=p,q=(A?A.scrollTop:null)||(typeof window<"u"?window.scrollY:0),Q=(A?A.clientHeight:null)||(typeof window<"u"?window.innerHeight:0),R=q+Q;let I=null;for(let D=0;D<r.value.length;D+=1){const z=r.value[D],ee=document.getElementById(z.id);if(ee){const me=V(ee);me+ee.offsetHeight>q&&me<R&&(I=z.id)}}!I&&o.value&&(I=o.value),I&&(o.value=I);const F=A?A.scrollHeight-A.clientHeight:document.documentElement.scrollHeight-window.innerHeight;q+5>=F&&(I=r.value[r.value.length-1].id),I&&(n.value=I)}function $(){s.value&&(m&&window.cancelAnimationFrame(m),m=window.requestAnimationFrame(()=>{P(),m=0}))}function M(A){if(!s.value)return;const q=document.getElementById(A);if(!q)return;const Q=p,R=Math.max(0,V(q));Q?Q.scrollTo({top:R,behavior:"smooth"}):typeof window<"u"&&window.scrollTo({top:R,behavior:"smooth"})}return t({refresh:w}),(A,q)=>s.value&&r.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(i.value),style:e.normalizeStyle(c.value)},[e.createElementVNode("h2",Lk,e.toDisplayString(A.title),1),e.createElementVNode("div",$k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,Q=>(e.openBlock(),e.createElementBlock("div",{key:Q.id,class:e.normalizeClass(["vs-compact-form-navigation__item relative",Q.level===2?"vs-compact-form-navigation__item--nested":"",Q.id===n.value?"vs-compact-form-navigation__item--active":""])},[e.createElementVNode("button",{type:"button",onClick:R=>M(Q.id),class:e.normalizeClass(["vs-compact-form-navigation__button flex gap-x-3 py-[6px] pr-3 text-sm duration-200 hover:text-gray-800",Q.level===2?"pl-[15px]":"pl-[18px]",Q.id===n.value?"text-gray-800":"text-gray-500"])},[e.createElementVNode("span",null,e.toDisplayString(Q.text),1)],10,Fk)],2))),128))])],6)):e.createCommentVNode("",!0)}}),Ok=_e(Ik,[["__scopeId","data-v-1584a562"]]),is={required:"Це поле є обов’язковим",email:"Неправильний email"},Pk=l=>l?!1:is.required,Rk=l=>l?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)?!1:is.email:!1,Uk=(l,t)=>{const a=t.pattern??t.regexp;return!(typeof a=="string"?new RegExp(a):a).test(l)&&l?t.message:!1},jk=(l,t)=>!1,zk=(l,t)=>{switch(typeof t=="string"?t:t.type){case"required":return Pk(l);case"email":return Rk(l);case"regexp":return Uk(l,t);case"custom":return jk();default:return!1}},Hk={autocomplete:"select",combobox:"select",datepicker:"date",markedtext:"mask",html:"static",geom:"map",filelist:"file-list",datalist:"datatable",file:"file",dropzone:"file"};function cs(l){const t=l.toLowerCase();return Hk[t]||t}function $r(l,t=!1){if(Array.isArray(l)){const r=[];return l.forEach(n=>{const o={...n};o.name=(n.name||n.id||n.key||"").toString(),o.type=cs(n.type),o.label=n.label||n.ua,o.rules=n.rules||n.validators,o.type==="email"&&!o.rules&&(o.rules=["email"]),n.data&&(o.api=`/api/suggest/${n.data}`),o.disabled=t||o.disabled,Array.isArray(o.schema)&&(o.schema=$r(o.schema,o.disabled)),r.push(o)}),r}const a=[];return Object.entries(l).forEach(r=>{const n={name:r[0],...r[1],type:cs(r[1].type),label:r[1].label||r[1].ua,rules:r[1].rules||r[1].validators,disabled:t};n.type==="email"&&!n.rules&&(n.rules=["email"]),r[1].type.includes("list")&&(n.multiple=!0),!n.api&&r[1].data&&(n.api=`/api/suggest/${r[1].data}`),Array.isArray(n.schema)&&(n.schema=$r(n.schema,n.disabled)),a.push(n)}),a}function qk(l,t,a=!1){const r=e.computed(()=>$r(t,typeof a=="boolean"?a:a.value)),n=e.ref({});function o(c){var f;const u=c==null?void 0:c.conditions;if(!u)return!0;const d=Array.isArray(u)?u[0]:u,m=(f=l==null?void 0:l.value)==null?void 0:f[d];return ns(m,u)}const s=(c=r.value,u=!0)=>(c.forEach(d=>{if(d.rules){if(!o(d)){delete n.value[d.name];return}let m=!1,f=null;d.rules.forEach(p=>{const y=zk(l.value[d.name],p);y&&(m=!0,!f&&typeof y=="string"&&(f=y))}),m&&f?n.value[d.name]=f:delete n.value[d.name]}d.schema&&s(d.schema,!1)}),u&&Object.values(n.value).some(Boolean)?n.value:null),i=e.computed(()=>{var c;return(c=r.value)==null?void 0:c.filter(u=>u.hidden!==!0&&o(u))});return{errors:n,validate:s,reset:()=>{l.value={},n.value={}},visibleSchema:i}}const Gk={class:"flex w-full h-full min-h-0 gap-6"},Wk={key:0,"data-orientation":"horizontal",role:"none",class:"mt-1 shrink-0 h-[1px] w-full bg-slate-100 dark:bg-slate-600"},Xe=e.defineComponent({__name:"vs-compact-form",props:e.mergeModels({schema:{default:()=>[]},style:{default:()=>({})},modelValue:{},layout:{default:()=>"default"},formId:{default:()=>""},disabled:{type:Boolean,default:!1},navigation:{type:Boolean,default:!1},navWidth:{default:400},columns:{}},{form:{default:()=>({})},formModifiers:{},values:{default:()=>({})},valuesModifiers:{}}),emits:e.mergeModels(["handle-submit","update:modelValue"],["update:form","update:values"]),setup(l,{expose:t,emit:a}){const r=a,n=l,o=e.useModel(l,"form"),s=e.useModel(l,"values"),{errors:i,validate:c,reset:u,visibleSchema:d}=qk(s,n.schema,e.toRef(n,"disabled")),m=e.ref(null),f=e.ref(null),p=e.computed(()=>n.navigation),y=e.computed(()=>n.navWidth),h=e.computed(()=>{var P;return(P=n.style)==null?void 0:P.columns}),g=Object.freeze({container:12,label:3}),b=e.computed(()=>n.columns??h.value??g),w=e.computed(()=>n.columns!=null||h.value!=null),x=e.computed(()=>w.value?"horizontal":n.layout),k=P=>P!=null&&P.columns?"horizontal":x.value,_=P=>(P==null?void 0:P.columns)??b.value,N=()=>{r("update:modelValue",s.value),c(),r("handle-submit",s.value)};t({validate:c,reset:u,errors:i}),e.onMounted(()=>{n.modelValue&&(s.value=n.modelValue),o.value={value:s.value,errors:i.value,reset:u,validate:c,formId:n.formId}});function V(P,$){if(P===$)return!0;if(typeof P!="object"||typeof $!="object"||!P||!$)return!1;const M=Object.keys(P),A=Object.keys($);return M.length!==A.length?!1:M.every(q=>P[q]===$[q])}return e.provide("form",o),e.provide("values",s),(P,$)=>(e.openBlock(),e.createElementBlock("div",Gk,[e.createElementVNode("div",{class:"flex-1 min-h-0 overflow-y-auto overflow-x-visible",ref_key:"formScrollContainer",ref:f},[e.createElementVNode("form",{ref_key:"formRef",ref:m,onSubmit:e.withModifiers(N,["prevent"]),class:e.normalizeClass(["grid grid-cols-12 p-1",x.value==="default"?"gap-6":"gap-4"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(M,A)=>(e.openBlock(),e.createElementBlock("div",{key:M.name,class:e.normalizeClass(k(M)==="horizontal"?"col-span-12":`col-span-${M.col||12}`)},[e.createVNode(ss,{style:e.normalizeStyle(P.style),item:M,layout:k(M),columns:_(M),"model-value":s.value[M.name],"onUpdate:modelValue":q=>{const Q=s.value[M.name];V(Q,q)||(s.value[M.name]=q)},error:e.unref(i)[M.name]},null,8,["style","item","layout","columns","model-value","onUpdate:modelValue","error"]),k(M)==="settings"&&A+1!==e.unref(d).length?(e.openBlock(),e.createElementBlock("div",Wk)):e.createCommentVNode("",!0)],2))),128))],34)],512),e.createVNode(Ok,{target:m.value,"scroll-container":f.value,enabled:p.value,width:y.value},null,8,["target","scroll-container","enabled","width"])]))}}),Kk={class:"relative"},Yk={class:"w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50"},Xk={class:"m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12"},Zk={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},Qk={class:"font-medium text-gray-800 dark:text-[#ffffff]"},Jk={class:"p-4 mim-h-0 h-full overflow-auto"},ex=e.defineComponent({__name:"modal-edit",props:{schema:{},defaultValue:{},mode:{},token:{},form:{}},emits:["close","save","edit"],setup(l,{emit:t}){const a=l,r=t,n=e.ref(a.schema),o=e.ref(a.defaultValue?JSON.parse(JSON.stringify(a.defaultValue)):{}),s=e.ref({}),i=e.ref(),c=e.ref(a.mode);async function u(){const m=s.value.validate();if(m){xe({type:"warning",title:"Помилка валідації",message:Object.entries(m).map(([f,p])=>`${f}: ${p}`).join(`
229
- `)});return}if(i.value)try{const f=await fetch(`/api/table/${i.value}`,{method:c.value==="add"?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o.value)});if(f.ok)await f.json(),xe({type:"success",title:"Успішно",message:`Дані успішно ${c.value==="add"?"збережено":"оновлено"}`}),r("save",o.value);else if(f.status===400){const p=await f.json().catch(()=>({}));xe({type:"warning",title:"Помилка валідації",message:p.message||"Некоректні дані (400)"})}else f.status===500?xe({type:"error",title:"Серверна помилка",message:"Виникла помилка на сервері (500)"}):xe({type:"error",title:"Помилка",message:`Статус: ${f.status}`})}catch(f){xe({type:"error",title:"Помилка з’єднання",message:f.message||"Не вдалося виконати запит"})}}function d(){r("close")}return e.onMounted(async()=>{try{if(a.form){const m=await fetch(`/api/template/form/${a.form}`);if(!m.ok){xe({type:m.status>=400&&m.status<500?"warning":"error",title:"Error",message:`Error code: ${m.status}`});return}const f=await m.json();n.value=f.schema,i.value=f.token}else if(a.token){i.value=a.token;const m=await fetch(`/api/form/${i.value}`);if(!m.ok){xe({type:m.status>=400&&m.status<500?"warning":"error",title:"Error",message:`Error code: ${m.status}`});return}const f=await m.json();n.value=f.schema,f.data?o.value=f.data:c.value="add"}}catch(m){xe({type:"error",title:"Error",message:m.message||"Unexpected error"}),console.error(m)}}),(m,f)=>(e.openBlock(),e.createElementBlock("div",Kk,[e.createElementVNode("div",Yk,[e.createElementVNode("div",Xk,[e.createElementVNode("div",Zk,[e.createElementVNode("h3",Qk,e.toDisplayString(c.value==="add"?"Додати":"Змінити"),1),e.createElementVNode("button",{onClick:d,type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"},f[2]||(f[2]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",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"},[e.createElementVNode("path",{d:"M18 6 6 18"}),e.createElementVNode("path",{d:"m6 6 12 12"})],-1)]))]),e.createElementVNode("div",Jk,[n.value?(e.openBlock(),e.createBlock(Xe,{key:0,schema:n.value,values:o.value,"onUpdate:values":f[0]||(f[0]=p=>o.value=p),form:s.value,"onUpdate:form":f[1]||(f[1]=p=>s.value=p)},null,8,["schema","values","form"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white"},[e.createElementVNode("button",{type:"button",onClick:d,class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"}," Скасувати "),e.createElementVNode("button",{onClick:u,type:"button",class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"}," Зберегти ")])])])]))}}),ds=(l={mode:"edit",schema:null})=>new Promise(t=>{const{close:a}=Mf({title:l.mode==="add"?"Додати":"Редагувати",template:"",visible:!0,size:"medium",closeClickBack:!0,content:ex,contentProps:{...l,onClose:()=>{t(null),a()},onSave:r=>{t(r),a()}}})});Xe.install=function(l){l.component("VForm",Xe),Object.assign(l.config.globalProperties,{$form:ds}),l.provide("form",ds),window.v3plugin||(window.v3plugin={})};const Mt=(l,t)=>{const a=l.__vccOpts||l;for(const[r,n]of t)a[r]=n;return a},tx={},lx={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"24",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-reload absolute inline mr-1 text-gray-800 transition-all cursor-pointer active:rotate-90 right-1 top-1 hover:text-blue-500"};function ax(l,t){return e.openBlock(),e.createElementBlock("svg",lx,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747"},null,-1),e.createElementVNode("path",{d:"M20 4v5h-5"},null,-1)])])}const rx=Mt(tx,[["render",ax]]),nx={class:"flex items-center justify-between w-full text-sm"},ox={class:"flex items-center cursor-pointer w-full"},sx={key:0,width:"16",height:"auto",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="},ix=["value"],cx={class:"w-[calc(100%-18px)] flex flex-row items-center justify-between pl-[10px]"},dx={class:"flex flex-row items-center font-normal text-gray-800 gap-x-1"},ux={key:0,class:"text-xs text-gray-500 dark:text-neutral-500 pr-1"},Fr=e.defineComponent({__name:"list-item",props:{layout:{},count:{},type:{},label:{},value:{},isSelected:{type:Boolean},color:{},highlighted:{type:Boolean}},emits:["itemClick"],setup(l,{expose:t,emit:a}){const r=l,n=a;function o(){n("itemClick",r.value)}const s=e.ref(null);return t({el:s}),(i,c)=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center w-full rounded-lg group hover:bg-gray-100",ref_key:"el",ref:s},[e.createElementVNode("div",nx,[e.createElementVNode("div",ox,[e.createElementVNode("label",{for:"radio-9740",class:e.normalizeClass([["inline","popover"].includes(l.layout)?"text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center":"flex flex-row items-center w-full px-2 py-2 text-sm text-gray-500 cursor-pointer",{"bg-blue-100":l.highlighted}]),onClick:e.withModifiers(o,["stop","prevent"])},[e.createElementVNode("div",{class:e.normalizeClass(["w-[18px] h-[18px] border flex items-center justify-center",[l.type=="checkbox"?"rounded-[4px]":"rounded-full",l.color?`bg-[${l.color}] border-[#ffffff]`:l.isSelected?"bg-[#2563eb] border-[#ffffff]":"bg-[#ffffff] border-[#d9d9d9]"]])},[l.isSelected?(e.openBlock(),e.createElementBlock("img",sx)):e.createCommentVNode("",!0)],2),e.createElementVNode("input",{type:"checkbox",class:"hidden",id:"radio-9740",value:l.value},null,8,ix),e.createElementVNode("div",cx,[e.createElementVNode("span",dx,e.toDisplayString(l.label??"Відсутні данні"),1),l.count?(e.openBlock(),e.createElementBlock("div",ux," ("+e.toDisplayString(l.count)+") ",1)):e.createCommentVNode("",!0)])],2)])])],512))}});function us(l,t){const{options:a=[],limit:r=20}=l;function n(x){return Array.isArray(x)?x[0]:x}const o=e.ref(n(l.modelValue)),s=e.ref(""),i=e.ref(!1),c=e.ref([]),u=e.ref("id"),d=e.ref("text"),m=e.ref(!1),f=e.ref(l.layout!=="popover"&&a.length>r);function p(x){const k=x.find(Boolean)??{},_=["id","value","code","key"].find(V=>V in k)??"id",N=["text","label","name","title"].find(V=>V in k)??"text";return{autoValueKey:_,autoLabelKey:N}}if(a.length>0){const x=p(a);u.value=x.autoValueKey,d.value=x.autoLabelKey}const y=e.computed(()=>{const x=c.value;return l.layout==="popover"||m.value?x:x.slice(0,r)});e.watch(()=>l.modelValue,x=>{o.value=n(x)},{immediate:!0}),c.value=[...a].sort((x,k)=>l.sort==="count"?k.count&&x.count?k.count-x.count:0:l.sort==="name"?String(x[d.value]??"").localeCompare(String(k[d.value]??"")):0);function h(x){return o.value===x[u.value]}function g(x){o.value=x[u.value],t("update:modelValue",o.value),t("change",{name:l.name,value:o.value})}function b(){o.value=void 0,t("update:modelValue",o.value),t("clear",l.name)}function w(){m.value=!m.value}return{innerValue:o,searchTerm:s,filteredOptions:y,isSelected:h,selectItem:g,clear:b,toggleShowAll:w,isReqProc:i,showAll:m,isEnableShowAll:f,labelKey:d,valueKey:u,allOptions:c}}const mx={},px={class:"w-48 mx-auto",viewBox:"0 0 178 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fx(l,t){return e.openBlock(),e.createElementBlock("svg",px,[...t[0]||(t[0]=[e.createStaticVNode('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>',12)])])}const Ir=Mt(mx,[["render",fx]]),hx={},gx={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate"};function bx(l,t){return e.openBlock(),e.createElementBlock("svg",gx,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)])])}const Sa=Mt(hx,[["render",bx]]),yx={},kx={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate-[180deg]"};function xx(l,t){return e.openBlock(),e.createElementBlock("svg",kx,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)])])}const Or=Mt(yx,[["render",xx]]),wx={key:0,class:"w-full"},_x={class:"flex flex-col items-center justify-center p-5 text-center"},Ex={key:0,class:"flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"},Cx={key:1,class:"flex justify-between items-center text-xs text-gray-500 p-1 border-t"},Vx=e.defineComponent({__name:"radio",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{default:()=>[]},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const r=l,n=e.ref(null),o=a,{innerValue:s,filteredOptions:i,isSelected:c,selectItem:u,clear:d,toggleShowAll:m,isReqProc:f,showAll:p,isEnableShowAll:y,labelKey:h,valueKey:g,allOptions:b}=us({...r,modelValue:r.modelValue??r.default??""},o);return t({clear:d,inputTextRef:n}),e.watch(()=>r.modelValue,w=>{w===void 0&&(s.value=void 0)}),(w,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([l.layout==="popover"?"flex flex-col h-full":"flex flex-col vs-filter-checkbox"])},[e.createElementVNode("div",{class:e.normalizeClass([l.layout==="popover"?"flex-1 overflow-y-auto max-h-64 p-2":"",l.layout==="inline"?"flex-1 overflow-y-auto max-h-80":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),k=>(e.openBlock(),e.createBlock(Fr,{layout:l.layout,key:k[e.unref(g)],count:k.count,label:k[e.unref(h)],color:k.color,type:"radio",value:k[e.unref(g)],"is-selected":e.unref(c)(k),onItemClick:_=>e.unref(u)(k)},null,8,["layout","count","label","color","value","is-selected","onItemClick"]))),128))],2),l.type==="select"&&e.unref(i).length===0&&!e.unref(f)?(e.openBlock(),e.createElementBlock("div",wx,[e.createElementVNode("div",_x,[e.createVNode(Ir),x[4]||(x[4]=e.createElementVNode("div",{class:"max-w-sm mx-auto mt-6"},[e.createElementVNode("p",{class:"font-medium text-gray-800 dark:text-neutral-200"},"За вашим запитом нічого не знайдено"),e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"})],-1))])])):e.createCommentVNode("",!0),l.layout!=="popover"&&l.type!=="select"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!e.unref(p)&&e.unref(y)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:x[0]||(x[0]=(...k)=>e.unref(m)&&e.unref(m)(...k)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[x[5]||(x[5]=e.createTextVNode(" Показати більше ",-1)),e.createVNode(Sa)])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:x[1]||(x[1]=(...k)=>e.unref(m)&&e.unref(m)(...k)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[x[6]||(x[6]=e.createTextVNode(" Показати менше ",-1)),e.createVNode(Or)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),l.cleanable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.layout==="inline"?(e.openBlock(),e.createElementBlock("div",Ex,[e.createTextVNode(e.toDisplayString(e.unref(s)||e.unref(s)===null?1:0)+" з "+e.toDisplayString(e.unref(b).length)+" обрано ",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:x[2]||(x[2]=(...k)=>e.unref(d)&&e.unref(d)(...k))}," Очистити ",512),[[e.vShow,e.unref(s)!==""&&e.unref(s)!==void 0]])])):e.createCommentVNode("",!0),l.layout==="popover"?(e.openBlock(),e.createElementBlock("div",Cx,[e.createElementVNode("span",null,e.toDisplayString(e.unref(s)||e.unref(s)===null?1:0)+" з "+e.toDisplayString(e.unref(b).length)+" обрано",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:x[3]||(x[3]=(...k)=>e.unref(d)&&e.unref(d)(...k))}," Очистити ",512),[[e.vShow,e.unref(s)!==""&&e.unref(s)!==void 0]])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],2))}});function ms(l,t){const{options:a=[],limit:r=20}=l;function n(x){return Array.isArray(x)?x:x?[x]:[]}const o=e.ref(n(l.modelValue)),s=e.ref(""),i=e.ref(!1),c=e.ref([]),u=e.ref("id"),d=e.ref("text"),m=e.ref(!1),f=e.ref(l.layout!=="popover"&&a.length>r);function p(x){const k=x.find(Boolean)??{},_=["id","value","code","key"].find(V=>V in k)??"id",N=["text","label","name","title"].find(V=>V in k)??"text";return{autoValueKey:_,autoLabelKey:N}}if(a.length>0){const x=p(a);u.value=x.autoValueKey,d.value=x.autoLabelKey}const y=e.computed(()=>{const x=c.value;return l.layout==="popover"||m.value?x:x.slice(0,r)});e.watch(()=>l.modelValue,x=>{o.value=n(x)},{immediate:!0}),c.value=[...a].sort((x,k)=>l.sort==="count"?k.count&&x.count?k.count-x.count:0:l.sort==="name"?String(x[d.value]).localeCompare(String(k[d.value])):0);function h(x){return o.value&&o.value.includes(x[u.value])}function g(x){const k=o.value.includes(x[u.value]);o.value=k?o.value.filter(_=>_!==x[u.value]):[...o.value,x[u.value]],t("update:modelValue",o.value),t("change",{name:l.name,value:o.value})}function b(){o.value=[],t("update:modelValue",o.value),t("clear",l.name)}function w(){m.value=!m.value}return{innerValue:o,searchTerm:s,filteredOptions:y,isSelected:h,selectItem:g,clear:b,toggleShowAll:w,isReqProc:i,showAll:m,isEnableShowAll:f,labelKey:d,valueKey:u,allOptions:c}}const ps={en:{search:"Search",more:"Show more",less:"Show less",selected:"selected",clear:"Clear",notfound:"Nothing found",period:"Period",today:"Today",week:"Week",month:"Month",quarter:"Quarter",year:"Year",alltime:"All Time",prev:"Prev",next:"Next"},uk:{search:"Пошук",more:"Показати більше",less:"Показати меньше",selected:"обрано",clear:"Очистити",notfound:"Нічого не знайдено",period:"Період",today:"Сьогодні",week:"Тиждень",month:"Місяць",quarter:"Квартал",year:"Рік",alltime:"Весь час",prev:"Попередній період",next:"Настпуний період"}};function Nx(l){const t=l.split(".")[1];return(ps[localStorage.locale||navigator.language]||ps.uk)[t]}function vl(){const l=e.getCurrentInstance();return l.appContext.config.globalProperties.$i18n?l.appContext.config.globalProperties.$t:Nx}const vx={key:0,class:"w-full"},Bx={class:"flex flex-col items-center justify-center p-5 text-center"},Sx={class:"max-w-sm mx-auto mt-6"},Dx={class:"font-medium text-gray-800 dark:text-neutral-200"},Ax={key:0,class:"flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"},Mx={key:1,class:"flex justify-between items-center text-xs text-gray-500 p-1 border-t"},fs=e.defineComponent({__name:"checkbox",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{default:()=>[]},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const r=vl(),n=l,o=a,{innerValue:s,filteredOptions:i,isSelected:c,selectItem:u,clear:d,toggleShowAll:m,isReqProc:f,showAll:p,isEnableShowAll:y,labelKey:h,valueKey:g,allOptions:b}=ms({...n,modelValue:n.modelValue},o);return e.watch(()=>n.modelValue,w=>{w===void 0&&(s.value=[])}),t({clear:d}),(w,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([l.layout==="popover"?"flex flex-col h-full":"flex flex-col vs-filter-checkbox space-y-0.5"])},[e.createElementVNode("div",{class:e.normalizeClass([l.layout==="popover"?"flex-1 overflow-y-auto max-h-64 p-2":"",l.layout==="inline"?"flex-1 overflow-y-auto max-h-80":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),k=>(e.openBlock(),e.createBlock(Fr,{layout:l.layout,count:k.count,label:k[e.unref(h)],color:k.color,type:"checkbox",value:k[e.unref(g)],"is-selected":e.unref(c)(k),onItemClick:_=>e.unref(u)(k)},null,8,["layout","count","label","color","value","is-selected","onItemClick"]))),256))],2),l.type==="select"&&e.unref(i).length===0&&!e.unref(f)?(e.openBlock(),e.createElementBlock("div",vx,[e.createElementVNode("div",Bx,[e.createVNode(Ir),e.createElementVNode("div",Sx,[e.createElementVNode("p",Dx,e.toDisplayString(e.unref(r)("filter.notfound")),1),x[4]||(x[4]=e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"},null,-1))])])])):e.createCommentVNode("",!0),l.layout!=="popover"&&l.type!=="select"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!e.unref(p)&&e.unref(y)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:x[0]||(x[0]=(...k)=>e.unref(m)&&e.unref(m)(...k)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.more"))+" ",1),e.createVNode(Sa)])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:x[1]||(x[1]=(...k)=>e.unref(m)&&e.unref(m)(...k)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.less"))+" ",1),e.createVNode(Or)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),l.cleanable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.layout==="inline"?(e.openBlock(),e.createElementBlock("div",Ax,[e.createTextVNode(e.toDisplayString(e.unref(s).length)+" / "+e.toDisplayString(e.unref(b).length)+" "+e.toDisplayString(e.unref(r)("filter.selected"))+" ",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:x[2]||(x[2]=(...k)=>e.unref(d)&&e.unref(d)(...k))},e.toDisplayString(e.unref(r)("filter.clear")),513),[[e.vShow,e.unref(s).length!==0]])])):e.createCommentVNode("",!0),l.layout==="popover"?(e.openBlock(),e.createElementBlock("div",Mx,[e.createElementVNode("span",null,e.toDisplayString(e.unref(s).length)+" / "+e.toDisplayString(e.unref(b).length)+" "+e.toDisplayString(e.unref(r)("filter.selected")),1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:x[3]||(x[3]=(...k)=>e.unref(d)&&e.unref(d)(...k))},e.toDisplayString(e.unref(r)("filter.clear")),513),[[e.vShow,e.unref(s).length!==0]])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],2))}}),Tx={},Lx={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"15px",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-search stroke-gray-500 transition-all"};function $x(l,t){return e.openBlock(),e.createElementBlock("svg",Lx,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null,-1),e.createElementVNode("path",{d:"M21 21l-6 -6"},null,-1)])])}const hs=Mt(Tx,[["render",$x]]),Fx={},Ix={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 stroke-gray-500 hover:stroke-red-500 transition-all",width:"15px",height:"15px"};function Ox(l,t){return e.openBlock(),e.createElementBlock("svg",Ix,[...t[0]||(t[0]=[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)])])}const gs=Mt(Fx,[["render",Ox]]);class Pr{static getWidthClass(t){return typeof t=="number"?`max-w-[${t}px]`:typeof t=="string"?t.endsWith("%")||t.endsWith("px")?`max-w-[${t}]`:`max-w-${t}`:"w-full"}}const Px={class:"absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"},Rx=["placeholder"],Ux=e.defineComponent({__name:"text-input",props:{id:{},name:{},title:{},type:{},label:{},width:{default:220},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{emit:t}){var u;const a=l,r=e.ref((a.placeholder||a.label||a.title||a.name||"search").toString()),n=t,o=e.ref(((u=a.modelValue)==null?void 0:u.toString())??"");e.watch(()=>a.modelValue,d=>{d!==o.value&&(o.value=(d==null?void 0:d.toString())??"")});let s=null;function i(){if(o.value=o.value.trimStart(),o.value.length===0){c();return}s&&clearTimeout(s),s=setTimeout(()=>{n("update:modelValue",o.value),n("change",{name:a.name,value:o.value})},300)}function c(){o.value="",n("update:modelValue",""),n("clear",a.name)}return(d,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vs-form-text relative bg-white rounded-lg [&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",l.layout==="inline"?e.unref(Pr).getWidthClass(l.width):"mb-2"+(l.layout==="popover"?" m-2":"")])},[e.createElementVNode("div",Px,[e.createVNode(hs)]),o.value!==""?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:c,class:"absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"},[e.createVNode(gs)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":m[0]||(m[0]=f=>o.value=f),onInput:i,placeholder:r.value,class:"!pr-7 !pl-8 bg-white h-[38px] min-w-[100px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,40,Rx),[[e.vModelText,o.value]])],2))}});function bs(l={color:"blue"}){return e.computed(()=>{const t=`w-full px-3 py-2 border-solid border border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${l.color}-500 focus:border-transparent`;return(l==null?void 0:l.size)==="sm"?`${t}h-[32px]`:`${t}h-[38px]`})}function jx(){return"rounded-md font-medium border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 px-4 py-2 w-full bg-transparent border text-black text-sm h-[38px]"}function zx(){return"font-medium border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 border h-7 rounded-md text-xs px-2 py-1 hover:bg-gray-100"}function ys(l){return l==="ghost"?"inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent text-gray-600 hover:bg-blue-100 hover:text-gray-800 focus:outline-hidden focus:bg-gray-100 focus:text-gray-800 disabled:opacity-50 disabled:pointer-events-none dark:text-gray-500 dark:hover:bg-blue-800/30 dark:hover:text-blue-400 dark:focus:bg-blue-800/30 dark:focus:text-blue-400":l==="soft"?"inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 hover:bg-gray-200 focus:outline-hidden focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:text-blue-400 dark:hover:bg-blue-900 dark:focus:bg-blue-900":"relative border-solid border-gray-200 focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-input hover:bg-gray-100 border px-4 py-2 gap-2 bg-transparent h-[38px]"}const Hx={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},qx=["placeholder","disabled"],Gx={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},Wx={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},Kx=["placeholder","disabled"],Yx=["disabled"],Xx=e.defineComponent({__name:"range-input",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const r=bs(),n=jx(),o=vl(),s=l,i=e.ref(s.modelValue??s.default??[]),c=a,u=e.computed({get:()=>s.modelValue??i.value,set:f=>{s.modelValue!==void 0?c("update:modelValue",f):i.value=f}});function d(){c("change",{name:s.name,value:u.value||i.value})}function m(){i.value=[],u.value=i.value,c("clear",s.name)}return e.watch(()=>s.modelValue,f=>{f!==void 0&&s.layout!=="popover"?(i.value=f,c("update:modelValue",f)):i.value=[]}),t({clear:m,currentValue:u}),(f,p)=>{var y,h;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(l.layout==="vertical"?"inline-flex items-center gap-2":"space-y-3 p-2")},[e.createElementVNode("div",null,[l.layout!=="vertical"?(e.openBlock(),e.createElementBlock("label",Hx,e.toDisplayString(e.unref(o)("filter.from")),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"number",class:e.normalizeClass(e.unref(r)),placeholder:((y=l.placeholder)==null?void 0:y[0])??"min",step:"1",style:{outline:"none"},"onUpdate:modelValue":p[0]||(p[0]=g=>u.value[0]=g),disabled:l.disabled},null,10,qx),[[e.vModelText,u.value[0]]])]),l.layout==="vertical"?(e.openBlock(),e.createElementBlock("label",Gx," - ")):e.createCommentVNode("",!0),e.createElementVNode("div",null,[l.layout!=="vertical"?(e.openBlock(),e.createElementBlock("label",Wx,e.toDisplayString(e.unref(o)("filter.to")),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"number",class:e.normalizeClass(e.unref(r)),placeholder:((h=l.placeholder)==null?void 0:h[1])??"max",min:"0",max:"1000000000000000",step:"1",style:{outline:"none"},"onUpdate:modelValue":p[1]||(p[1]=g=>u.value[1]=g),disabled:l.disabled},null,10,Kx),[[e.vModelText,u.value[1]]])]),["popover","inline","vertical"].includes(l.layout)?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:e.normalizeClass(e.unref(n)+(l.layout==="vertical"?" w-[50px]":" bg-blue-100 hover:bg-blue-200"))},e.toDisplayString(l.layout==="vertical"?"Ok":e.unref(o)("filter.apply")),3)):e.createCommentVNode("",!0),["popover","inline"].includes(l.layout)?(e.openBlock(),e.createElementBlock("button",{key:2,disabled:!(u.value[0]||u.value[1]),onClick:m,class:e.normalizeClass(e.unref(n)+" hover:bg-gray-100")},e.toDisplayString(e.unref(o)("filter.clear")),11,Yx)):e.createCommentVNode("",!0)],2)]),(l.cleanable&&i.value.length,e.createCommentVNode("",!0))],64)}}});function Zx(l){return String(l).charAt(0).toUpperCase()+String(l).slice(1)}let Ze=class{static format(t){const a=t.getFullYear(),r=(t.getMonth()+1).toString().padStart(2,"0"),n=t.getDate().toString().padStart(2,"0");return`${a}-${r}-${n}`}static getShiftedDay(t,a=0){const r=t?new Date(t):new Date;return r.setDate(r.getDate()+a),this.format(r)}static getLastWeekRange(t,a,r=0){if(t&&a){const u=new Date(t),d=new Date(a);return u.setDate(u.getDate()+r*7),d.setDate(d.getDate()+r*7),[this.format(u),this.format(d)]}const n=new Date,o=n.getDay(),s=o===0?13:o-1+7,i=new Date(n);i.setDate(n.getDate()-s+r*7);const c=new Date(i);return c.setDate(i.getDate()+6),[this.format(i),this.format(c)]}static getMonthRange(t,a,r=0){let n;t?n=new Date(t):n=new Date,n=new Date(n.getFullYear(),n.getMonth()+r,1);const o=n,s=new Date(n.getFullYear(),n.getMonth()+1,0);return[this.format(o),this.format(s)]}static getQuarterRange(t,a,r=0){const n=t||a,o=n?new Date(n):new Date;let s=Math.floor(o.getMonth()/3);s+=r;const i=(s%4+4)%4*3,c=o.getFullYear()+Math.floor(s/4),u=new Date(c,i,1),d=new Date(c,i+3,0);return[this.format(u),this.format(d)]}static getYear(t,a=0){let r;return t&&/^\d{4}$/.test(t)?r=parseInt(t,10):t?r=new Date(t).getFullYear():r=new Date().getFullYear(),String(r+a)}static getYearRange(t,a=0){let r;return t&&/^\d{4}$/.test(t)?r=parseInt(t,10):t?r=new Date(t).getFullYear():r=new Date().getFullYear(),[this.format(new Date(r+a,0,1)),this.format(new Date(r+a+1,0,0))]}static getRangeFromDaysBefore(t){const a=new Date,r=new Date(a.getTime());return r.setDate(a.getDate()-t),[this.format(r),this.format(a)]}};function ks(l,t){const{popoverRef:a}=l,r=vl(),n=e.ref(""),o=e.ref(l.modelValue??l.default??[]),s=e.ref(0);function i(){const b=Ze.getRangeFromDaysBefore(s.value);return o.value=[...b],t("change",{name:l.name,value:o.value}),t("update:modelValue",o.value),b}function c(b){var x;n.value=b,(x=a.value)==null||x.close();const w=[];switch(n.value){case"today":w.push(Ze.getShiftedDay()),w.push(Ze.getShiftedDay());break;case"week":w.push(...Ze.getLastWeekRange());break;case"month":w.push(...Ze.getMonthRange());break;case"quarter":w.push(...Ze.getQuarterRange());break;case"year":w.push(...Ze.getYearRange());break;case"last_7_days":s.value=7,i();break;case"range":s.value=7,w.push(...i());break}o.value=[...w],t("change",{name:l.name,value:o.value}),t("update:modelValue",o.value)}function u(){const b=[];switch(n.value){case"today":b.push(Ze.getShiftedDay(o.value[0],1));break;case"week":b.push(...Ze.getLastWeekRange(o.value[0],o.value[1],1));break;case"month":b.push(...Ze.getMonthRange(o.value[0],o.value[1],1));break;case"quarter":b.push(...Ze.getQuarterRange(o.value[0],o.value[1],1));break;case"year":b.push(...Ze.getYearRange(o.value[0],1));break}o.value=[...b],t("change",{name:l.name,value:o.value}),t("update:modelValue",o.value)}function d(){const b=[];switch(n.value){case"today":b.push(Ze.getShiftedDay(o.value[0],-1));break;case"week":b.push(...Ze.getLastWeekRange(o.value[0],o.value[1],-1));break;case"month":b.push(...Ze.getMonthRange(o.value[0],o.value[1],-1));break;case"quarter":b.push(...Ze.getQuarterRange(o.value[0],o.value[1],-1));break;case"year":b.push(...Ze.getYearRange(o.value[0],-1));break}o.value=[...b],t("change",{name:l.name,value:o.value}),t("update:modelValue",o.value)}const m=["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"];function f(b){const[w,x,k]=b.split("-");return`${k}.${x}.${w}`}function p(b,w="long"){const x=new Date(Date.UTC(2e3,b-1,1));return new Intl.DateTimeFormat(localStorage.locale,{month:w,timeZone:"UTC"}).format(x)}function y(b){const{value:w}=o;switch(b){case"today":return f(w[0]);case"range":return"Період";case"week":return w[0]&&w[1]?`${f(w[0])} – ${f(w[1])}`:"";case"quarter":if(w[0]){const x=new Date(w[0]),k=x.getFullYear(),_=x.getMonth();return`${Math.floor(_/3)+1} ${r("filter.quarter")} ${k}`}return"";case"month":if(w[0]){const[x,k]=w[0].split("-");return`${p(parseInt(k,10))} ${x}`}return"";case"year":return w[0]||"";case"last_7_days":return"За останні дні";default:return l.label??""}}const h=e.computed(()=>n.value?y(n.value):l.label??"");function g(){n.value="",o.value=[],t("update:modelValue",[]),t("clear",l.name)}return{activeMode:n,innerValue:o,daysBefore:s,onDaysBeforeChange:i,onSelectChange:c,nextClick:u,prevClick:d,ukMonths:m,formatDisplayDate:f,getModeLabel:y,currentLabel:h,clear:g}}const Qx={key:0,class:"relative flex w-full h-auto gap-2 filter-date m-2 flex-wrap"},Jx={key:0,class:"flex gap-1 !w-[75%] rounded-lg"},ew=["max","disabled"],tw=["min","disabled"],lw={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},aw=["max","disabled"],rw={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},nw={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},ow=["min","disabled"],sw={class:"flex gap-1 pt-2"},iw=["onClick"],cw=e.defineComponent({__name:"date-input",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const r=l,n=bs(),o=zx(),s=a,i=e.ref(null),{activeMode:c,innerValue:u,onSelectChange:d,nextClick:m,prevClick:f,clear:p}=ks({...r,popoverRef:i},s);return e.watch(()=>r.modelValue,y=>{y!==void 0?(u.value=y,s("update:modelValue",y)):(c.value="",u.value=[])}),t({clear:p,popoverRef:i}),(y,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.layout==="inline"?(e.openBlock(),e.createElementBlock("div",Qx,[e.unref(c)!==""&&e.unref(c)==="range"?(e.openBlock(),e.createElementBlock("div",Jx,[e.withDirectives(e.createElementVNode("input",{type:"date",max:e.unref(u)[1],locale:"uk-UA","onUpdate:modelValue":h[0]||(h[0]=g=>e.unref(u)[0]=g),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",disabled:l.disabled},null,8,ew),[[e.vModelText,e.unref(u)[0]]]),e.withDirectives(e.createElementVNode("input",{type:"date",min:e.unref(u)[0],locale:"uk-UA","onUpdate:modelValue":h[1]||(h[1]=g=>e.unref(u)[1]=g),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",disabled:l.disabled},null,8,tw),[[e.vModelText,e.unref(u)[1]]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(l.layout==="popover"?"space-y-3 p-2":"flex items-center gap-2")},[e.createElementVNode("div",{class:e.normalizeClass(l.layout!=="popover"?"w-[48%]":"")},[l.layout==="popover"?(e.openBlock(),e.createElementBlock("label",lw,"Від")):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"date",max:e.unref(u)[1],locale:"uk-UA","onUpdate:modelValue":h[2]||(h[2]=g=>e.unref(u)[0]=g),class:e.normalizeClass(e.unref(n)),disabled:l.disabled},null,10,aw),[[e.vModelText,e.unref(u)[0]]])],2),l.layout!=="popover"?(e.openBlock(),e.createElementBlock("label",rw," - ")):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(l.layout!=="popover"?"w-[48%]":"")},[l.layout==="popover"?(e.openBlock(),e.createElementBlock("label",nw,"До")):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"date",min:e.unref(u)[0],locale:"uk-UA","onUpdate:modelValue":h[3]||(h[3]=g=>e.unref(u)[1]=g),class:e.normalizeClass(e.unref(n)),disabled:l.disabled},null,10,ow),[[e.vModelText,e.unref(u)[1]]])],2)],2),e.createElementVNode("div",sw,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(["today","week","month","quarter","year"],g=>e.createElementVNode("button",{key:g,class:e.normalizeClass(e.unref(o)+(e.unref(c)===g?" bg-blue-100":"")),onClick:b=>e.unref(d)(g)},e.toDisplayString(e.unref(Zx)(g)),11,iw)),64)),e.createElementVNode("button",{class:e.normalizeClass(e.unref(o)),onClick:h[4]||(h[4]=(...g)=>e.unref(f)&&e.unref(f)(...g))}," <",2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(o)),onClick:h[5]||(h[5]=(...g)=>e.unref(m)&&e.unref(m)(...g))}," >",2)]),(l.cleanable,e.createCommentVNode("",!0))],64))}});function dw(l,t){const{api:a,options:r=[],limit:n=20,dataKey:o="data"}=l,s=l.multi;function i(R){return s?Array.isArray(R)?R:R?[R]:[]:Array.isArray(R)?R[0]:R}const c=e.ref(i(l.modelValue)),u=e.ref(""),d=e.ref(!1),m=e.ref(r),f=e.ref("id"),p=e.ref("text"),y=e.ref(!1),h=e.ref(l.layout!=="popover"&&r.length>n),g=e.ref([]),b=e.ref(0);function w(R){const I=R.find(Boolean)??{},F=["id","value","code","key"].find(z=>z in I)??"id",D=["text","label","name","title"].find(z=>z in I)??"text";return{autoValueKey:F,autoLabelKey:D}}if(r.length>0){const R=w(r);f.value=R.autoValueKey,p.value=R.autoLabelKey}const x=e.computed(()=>{if(a)return m.value;const R=m.value;if(l.layout==="popover")return R;if(!u.value)return y.value?R:R.slice(0,n);const I=u.value.toLowerCase();return R.filter(F=>F[p.value].toLowerCase().includes(I))});let k=null;async function _(R){if(a){d.value=!0;try{const I=new URL(a,window.location.origin);I.searchParams.set("json","1"),I.searchParams.set("key",R),I.searchParams.set("limit",n.toString());const F=await fetch(I.toString());if(!F.ok){xe({type:"error",title:"Error",message:"Failed to fetch remote options"}),m.value=[];return}const D=await F.json();if(!D[o]){xe({type:"error",title:"Error",message:D}),m.value=[];return}if(m.value=D[o],m.value.length>0){const z=w(m.value);f.value=z.autoValueKey,p.value=z.autoLabelKey}b.value=D.total}catch(I){console.error("Failed to fetch remote options:",I)}finally{d.value=!1}}}e.watch(u,R=>{a&&(k&&clearTimeout(k),k=setTimeout(()=>{_(R)},200))}),e.watch(()=>l.modelValue,R=>{c.value=i(R)},{immediate:!0});function N(R){return s&&Array.isArray(c.value)?c.value.includes(R[f.value]):c.value&&c.value===R[f.value]}function V(R){if(s&&!Array.isArray(c.value)&&(c.value=[]),s&&Array.isArray(c.value)){const I=c.value.includes(R[f.value]);c.value=I?c.value.filter(F=>F!==R[f.value]):[...c.value,R[f.value]],g.value=I?g.value.filter(F=>F!==R[p.value]):[...g.value,R[p.value]]}else c.value=R[f.value],g.value=R[p.value];t("update:modelValue",c.value),t("change",{name:l.name,value:c.value})}function P(){s?(c.value=[],g.value=[]):(c.value=void 0,g.value=[]),t("update:modelValue",c.value),t("clear",l.name)}function $(){k&&clearTimeout(k),u.value="",y.value=!1}function M(){y.value=!y.value}e.onBeforeUnmount(()=>{k&&clearTimeout(k)});const A=e.ref(-1);e.watch(x,()=>{A.value=x.value.length>0?0:-1});function q(R){const I=x.value.length;if(R.key==="ArrowDown")R.preventDefault(),A.value=(A.value+1)%I;else if(R.key==="ArrowUp")R.preventDefault(),A.value=(A.value-1+I)%I;else if(R.key==="Enter"&&(R.preventDefault(),A.value>=0&&A.value<x.value.length)){const F=x.value[A.value];V(F)}}function Q(){a&&m.value.length===0&&u.value.length===0&&_(u.value)}return{innerValue:c,searchTerm:u,filteredOptions:x,isSelected:N,selectItem:V,clear:P,resetSearch:$,toggleShowAll:M,isReqProc:d,showAll:y,isEnableShowAll:h,labelKey:p,valueKey:f,allOptions:m,highlightedIndex:A,onKeyDown:q,selectedLabels:g,totalCount:b,loadData:Q}}const uw={class:"h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center"},mw=["placeholder"],pw={key:0,class:"w-full"},fw={class:"flex flex-col items-center justify-center p-5 text-center"},hw={class:"max-w-sm mx-auto mt-6"},gw={class:"font-medium text-gray-800 dark:text-neutral-200"},bw={key:0,class:"flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"},yw={key:1,class:"flex justify-between items-center text-xs text-gray-500 p-1 border-t"},kw=e.defineComponent({__name:"select",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{default:()=>[]},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const r=vl(),n=l,o=a,s=e.ref(null),{innerValue:i,filteredOptions:c,isSelected:u,selectItem:d,clear:m,resetSearch:f,toggleShowAll:p,isReqProc:y,showAll:h,isEnableShowAll:g,searchTerm:b,labelKey:w,valueKey:x,highlightedIndex:k,onKeyDown:_,selectedLabels:N,totalCount:V,loadData:P}=dw({...n,modelValue:n.modelValue},o);e.onMounted(()=>{f(),n.layout!=="inline"&&(P(),s.value&&n.layout==="popover"&&s.value.focus())}),e.watch(()=>n.modelValue,M=>{M===void 0&&(n.multi?i.value=[]:i.value=void 0)});const $=e.ref([]);return e.watch(k,M=>{var A;M>=0&&$.value[M]&&((A=$.value[M])==null||A.scrollIntoView({block:"nearest",behavior:"smooth"}))}),e.watch(c,()=>{$.value=[]}),t({clear:m,inputTextRef:s,selectedLabels:N,loadData:P}),(M,A)=>{var q,Q;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([l.layout==="popover"?"flex flex-col h-full":"flex flex-col vs-filter-checkbox space-y-0.5"])},[e.createElementVNode("div",uw,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":A[0]||(A[0]=R=>e.isRef(b)?b.value=R:null),onKeydown:A[1]||(A[1]=(...R)=>e.unref(_)&&e.unref(_)(...R)),class:"w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500 text-gray-700",placeholder:e.unref(r)("filter.search"),type:"text",ref_key:"inputTextRef",ref:s},null,40,mw),[[e.vModelText,e.unref(b)]]),e.createVNode(hs,{class:"absolute text-gray-400 -translate-y-1/2 left-4 top-1/2"}),e.unref(b)!=""?(e.openBlock(),e.createBlock(gs,{key:0,onClick:A[2]||(A[2]=R=>b.value=""),class:"absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass([l.layout==="popover"?"flex-1 overflow-y-auto max-h-64 p-2":"",l.layout==="inline"?"flex-1 overflow-y-auto max-h-80":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(R,I)=>(e.openBlock(),e.createBlock(Fr,{layout:l.layout,count:R.count,label:R[e.unref(w)],color:R.color,type:l.multi?"checkbox":"radio",value:R[e.unref(x)],"is-selected":e.unref(u)(R),highlighted:I===e.unref(k),onItemClick:F=>e.unref(d)(R),ref_for:!0,ref:F=>$.value[I]=F==null?void 0:F.el},null,8,["layout","count","label","color","type","value","is-selected","highlighted","onItemClick"]))),256))],2),l.type==="select"&&e.unref(c).length===0&&!e.unref(y)?(e.openBlock(),e.createElementBlock("div",pw,[e.createElementVNode("div",fw,[e.createVNode(Ir),e.createElementVNode("div",hw,[e.createElementVNode("p",gw,e.toDisplayString(e.unref(r)("filter.notfound")),1),A[7]||(A[7]=e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"},null,-1))])])])):e.createCommentVNode("",!0),l.layout!=="popover"&&l.type!=="select"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!e.unref(h)&&e.unref(g)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:A[3]||(A[3]=(...R)=>e.unref(p)&&e.unref(p)(...R)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.more"))+" ",1),e.createVNode(Sa)])):e.createCommentVNode("",!0),e.unref(h)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:A[4]||(A[4]=(...R)=>e.unref(p)&&e.unref(p)(...R)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.less"))+" ",1),e.createVNode(Or)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),l.cleanable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.layout==="inline"?(e.openBlock(),e.createElementBlock("div",bw,[e.createTextVNode(e.toDisplayString(l.multi&&Array.isArray(e.unref(i))?(q=e.unref(i))==null?void 0:q.length:e.unref(i)!==void 0&&(e.unref(i)||e.unref(i)===null)?1:0)+" / "+e.toDisplayString(e.unref(V))+" "+e.toDisplayString(e.unref(r)("filter.selected"))+" ",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:A[5]||(A[5]=(...R)=>e.unref(m)&&e.unref(m)(...R))},e.toDisplayString(e.unref(r)("filter.clear")),513),[[e.vShow,e.unref(i)!==""&&e.unref(i)!==void 0||e.unref(i)]])])):e.createCommentVNode("",!0),l.layout==="popover"?(e.openBlock(),e.createElementBlock("div",yw,[e.createElementVNode("span",null,e.toDisplayString(l.multi&&Array.isArray(e.unref(i))?(Q=e.unref(i))==null?void 0:Q.length:e.unref(i)!==void 0&&(e.unref(i)||e.unref(i)===null)?1:0)+" / "+e.toDisplayString(e.unref(V))+" "+e.toDisplayString(e.unref(r)("filter.selected")),1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:A[6]||(A[6]=(...R)=>e.unref(m)&&e.unref(m)(...R))},e.toDisplayString(e.unref(r)("filter.clear")),513),[[e.vShow,e.unref(i)!==""&&e.unref(i)!==void 0||e.unref(i)]])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],2)}}}),xw=["for","onClick"],ww=["id","name","value"],_w={class:"block"},Ew={key:0,class:"flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"},Cw={key:1,class:"flex justify-between items-center text-xs text-gray-500 p-1 border-t"},Vw=e.defineComponent({__name:"tag-field",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{default:()=>[]},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const r=l,n=a,{innerValue:o,isSelected:s,selectItem:i,clear:c,labelKey:u,valueKey:d,allOptions:m}=r.multi?ms({...r,modelValue:r.modelValue??r.default??[]},n):us({...r,modelValue:r.modelValue!==void 0?r.modelValue:r.default??""},n);return t({clear:c}),e.watch(()=>r.modelValue,f=>{f===void 0&&(r.multi?o.value=[]:o.value=void 0)}),(f,p)=>{var y,h;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["grid grid-cols-3 gap-2 mx-[1px]",l.layout==="popover"?"m-1":"mb-1"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),g=>(e.openBlock(),e.createElementBlock("label",{key:`item-${g[e.unref(d)]}`,for:`item-${g[e.unref(d)]}`,onClick:e.withModifiers(b=>e.unref(i)(g),["stop","prevent"]),class:e.normalizeClass([e.unref(s)(g)?"ring-2 ring-indigo-600":"","p-2.5 group relative flex justify-center items-center gap-x-12 text-center text-xs bg-white text-gray-800 border border-gray-200 cursor-pointer rounded-lg dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200 peer-checked:text-indigo-600 dark:has-checked:text-indigo-500 peer-checked:border-indigo-600 dark:has-checked:border-indigo-500 peer-checked:ring peer-checked:shadow focus:ring dark:has-checked:ring-indigo-500 has-disabled:pointer-events-none has-disabled:text-gray-200 dark:has-disabled:text-neutral-700 has-disabled:after:absolute has-disabled:after:inset-0 has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-gray-200)_calc(50%-1px),var(--color-gray-200)_50%,transparent_50%)] dark:has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-neutral-700)_calc(50%-1px),var(--color-neutral-700)_50%,transparent_50%)]"])},[e.createElementVNode("input",{type:"checkbox",id:`item-${g[e.unref(d)]}`,class:"hidden w4poy border-gray-200 g41z1 g22e3 axcnw dark:text-indigo-500 dark:border-neutral-700 dark:focus:ring-neutral-900",name:`item-${g[e.unref(d)]}`,value:g[e.unref(d)]},null,8,ww),e.createElementVNode("span",_w,e.toDisplayString(g[e.unref(u)]),1)],10,xw))),128))],2),l.cleanable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.layout==="inline"?(e.openBlock(),e.createElementBlock("div",Ew,[e.createTextVNode(e.toDisplayString(l.multi&&Array.isArray(e.unref(o))?(y=e.unref(o))==null?void 0:y.length:e.unref(o)!==void 0&&(e.unref(o)||e.unref(o)===null)?1:0)+" з "+e.toDisplayString(e.unref(m).length)+" обрано ",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:p[0]||(p[0]=(...g)=>e.unref(c)&&e.unref(c)(...g))}," Очистити ",512),[[e.vShow,e.unref(o)!==""&&e.unref(o)!==void 0||e.unref(o)]])])):e.createCommentVNode("",!0),l.layout==="popover"?(e.openBlock(),e.createElementBlock("div",Cw,[e.createElementVNode("span",null,e.toDisplayString(l.multi&&Array.isArray(e.unref(o))?(h=e.unref(o))==null?void 0:h.length:e.unref(o)!==void 0&&(e.unref(o)||e.unref(o)===null)?1:0)+" з "+e.toDisplayString(e.unref(m).length)+" обрано",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:p[1]||(p[1]=(...g)=>e.unref(c)&&e.unref(c)(...g))}," Очистити ",512),[[e.vShow,e.unref(o)!==void 0&&e.unref(o)!==""||e.unref(o)]])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64)}}}),Nw=["disabled","title"],vw={key:0,class:"absolute top-0 end-0 inline-flex min-h-[10px] min-w-[10px] z-10 items-center py-0.5 rounded-full text-xs font-medium transform -translate-y-1/2 translate-x-1/2 bg-blue-600 text-white px-1"},Bw={class:"w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full"},Sw={class:"w-[360px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 before:w-full p-2"},Rr=e.defineComponent({__name:"popover-field",props:{disabled:{type:Boolean,default:!1},label:{},en:{},ua:{},uk:{},fr:{},de:{},es:{},currentValue:{},fieldRef:{},width:{},mode:{},layout:{}},setup(l,{expose:t}){const a=l,r=e.computed(()=>ys(a.mode)),n=e.ref(!1),o=e.ref({top:0,left:0}),s=e.ref(null),i=e.ref(null),c=e.ref(null);function u(){const w=i.value,x=c.value;if(!w||!x)return;const k=w.getBoundingClientRect(),_=x.offsetWidth,N=window.innerWidth,V=k.bottom+8;let{left:P}=k;P+_>N&&(P=Math.max(N-_-10,10)),o.value={top:V,left:P}}function d(){console.log("~~~~~~~~~~"),console.log(n.value),n.value=!n.value,console.log(n.value),n.value&&e.nextTick(()=>{var w,x,k,_,N,V,P;u(),(w=a.fieldRef)!=null&&w.inputTextRef&&((_=(k=(x=a.fieldRef)==null?void 0:x.inputTextRef)==null?void 0:k.focus)==null||_.call(k)),(N=a.fieldRef)!=null&&N.loadData&&((P=(V=a.fieldRef)==null?void 0:V.loadData)==null||P.call(V))})}function m(w){var x,k,_;!((x=s.value)!=null&&x.contains(w.target))&&!((k=c.value)!=null&&k.contains(w.target))&&!((_=i.value)!=null&&_.contains(w.target))&&(n.value=!1)}function f(w){w.key==="Escape"&&(n.value=!1)}const p=e.ref(!1),y=e.ref("ua"),h=w=>{w.detail.key==="locale"&&(y.value=w.detail.newValue)};e.onMounted(()=>{p.value=!0,y.value=localStorage.locale,window.addEventListener("storage",h),document.addEventListener("click",m,!0),document.addEventListener("keydown",f),window.addEventListener("scroll",u,!0)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",h),document.removeEventListener("click",m,!0),document.removeEventListener("keydown",f),window.removeEventListener("scroll",u,!0)});function g(){n.value=!1}t({close:g});const b=e.computed(()=>{var x;const w=(x=a.fieldRef)==null?void 0:x.selectedLabels;return!w||["inline"].includes(a.layout||"")?a[y.value]||(a.label??""):Array.isArray(w)?w.length>0?w.join(", "):a.label??"":String(w)});return(w,x)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{onClick:d,disabled:l.disabled,ref_key:"triggerRef",ref:i,title:l.label,class:e.normalizeClass(r.value+" "+(l.width?e.unref(Pr).getWidthClass(l.width):"w-full"))},[e.createElementVNode("span",{class:e.normalizeClass(["truncate text-ellipsis block",l.width?e.unref(Pr).getWidthClass(l.width-50):"w-full"])},e.toDisplayString(b.value),3),e.createVNode(Sa,{class:"h-4 w-4"}),(Array.isArray(l.currentValue)?l.currentValue===null||l.currentValue.length>0:l.currentValue===null||l.currentValue)&&l.layout==="inline"?(e.openBlock(),e.createElementBlock("span",vw)):e.createCommentVNode("",!0)],10,Nw),p.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.withDirectives(e.createElementVNode("div",{ref_key:"popperRef",ref:c,class:"vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",style:e.normalizeStyle({top:`${o.value.top}px`,left:`${o.value.left}px`}),"data-inside-popover":""},[e.createElementVNode("div",Bw,[e.createElementVNode("div",Sw,[e.renderSlot(w.$slots,"default")])])],4),[[e.vShow,n.value]])])):e.createCommentVNode("",!0)]))}}),Dw={},Aw={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",class:"text-blue-600 w-[16px] h-[16px]"};function Mw(l,t){return e.openBlock(),e.createElementBlock("svg",Aw,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])])}const dl=Mt(Dw,[["render",Mw]]),Tw={},Lw={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"24",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-chevron-down text-gray-800 rotate-[90deg]"};function $w(l,t){return e.openBlock(),e.createElementBlock("svg",Lw,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)])])}const Fw=Mt(Tw,[["render",$w]]),Iw={},Ow={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"24",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-chevron-down text-gray-800 rotate-[270deg]"};function Pw(l,t){return e.openBlock(),e.createElementBlock("svg",Ow,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)])])}const Rw=Mt(Iw,[["render",Pw]]),Uw={class:"flex"},jw={class:"mb-1"},zw={class:"mb-1"},Hw={class:"inline-flex rounded-lg shrink-0 pl-1"},qw=["title"],Gw={class:"inline-flex rounded-lg shrink-0 pl-1"},Ww=["title"],Kw={key:1,class:"flex gap-1 !w-[75%] rounded-lg"},Yw=["max","disabled"],Xw=["min","disabled"],Zw=e.defineComponent({__name:"date-input-inline",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const r=vl(),n=l,o=a,s=e.ref(null),{activeMode:i,innerValue:c,onSelectChange:u,nextClick:d,prevClick:m,currentLabel:f,clear:p}=ks({...n,popoverRef:s},o);return e.watch(()=>n.modelValue,y=>{y!==void 0?(c.value=y,o("update:modelValue",y)):(i.value="",c.value=[])}),t({clear:p,popoverRef:s}),(y,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Uw,[e.createVNode(Rr,{ref_key:"popoverRef",ref:s,label:e.unref(f),"current-value":e.unref(c),mode:l.mode,onClear:e.unref(p),layout:l.layout},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:h[0]||(h[0]=g=>e.unref(u)("range")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.period"))+" ",1),e.unref(i)==="range"?(e.openBlock(),e.createBlock(dl,{key:0})):e.createCommentVNode("",!0)])]),h[12]||(h[12]=e.createElementVNode("div",null,[e.createElementVNode("div",{class:"pt-1 mt-1 border-t"})],-1)),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:h[1]||(h[1]=g=>e.unref(u)("today")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.today"))+" ",1),e.unref(i)==="today"?(e.openBlock(),e.createBlock(dl,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:h[2]||(h[2]=g=>e.unref(u)("week")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.week"))+" ",1),e.unref(i)==="week"?(e.openBlock(),e.createBlock(dl,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:h[3]||(h[3]=g=>e.unref(u)("month")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.month"))+" ",1),e.unref(i)==="month"?(e.openBlock(),e.createBlock(dl,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:h[4]||(h[4]=g=>e.unref(u)("quarter")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.quarter"))+" ",1),e.unref(i)==="quarter"?(e.openBlock(),e.createBlock(dl,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",jw,[e.createElementVNode("button",{type:"button",onClick:h[5]||(h[5]=g=>e.unref(u)("year")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.year"))+" ",1),e.unref(i)==="year"?(e.openBlock(),e.createBlock(dl,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",zw,[e.createElementVNode("button",{type:"button",onClick:h[6]||(h[6]=g=>e.unref(p)()),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.alltime"))+" ",1),e.unref(c)[0]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(dl,{key:0}))])])]),_:1},8,["label","current-value","mode","onClear","layout"]),e.unref(i)!==""&&e.unref(i)!=="range"&&e.unref(i)!=="last_7_days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Hw,[e.createElementVNode("button",{type:"button",title:e.unref(r)("filter.prev"),class:"inline-flex h-[38px] items-center px-2 text-sm text-gray-800 bg-gray-100 gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",onClick:h[7]||(h[7]=(...g)=>e.unref(m)&&e.unref(m)(...g))},[e.createVNode(Fw)],8,qw)]),e.createElementVNode("div",Gw,[e.createElementVNode("button",{type:"button",title:e.unref(r)("filter.next"),class:"inline-flex h-[38px] items-center px-2 text-sm text-gray-800 gap-x-2 bg-gray-100 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",onClick:h[8]||(h[8]=(...g)=>e.unref(d)&&e.unref(d)(...g))},[e.createVNode(Rw)],8,Ww)])],64)):e.createCommentVNode("",!0),e.unref(i)!==""&&e.unref(i)==="range"?(e.openBlock(),e.createElementBlock("div",Kw,[e.withDirectives(e.createElementVNode("input",{type:"date",max:e.unref(c)[1],locale:"uk-UA","onUpdate:modelValue":h[9]||(h[9]=g=>e.unref(c)[0]=g),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",disabled:l.disabled},null,8,Yw),[[e.vModelText,e.unref(c)[0]]]),e.withDirectives(e.createElementVNode("input",{type:"date",min:e.unref(c)[0],locale:"uk-UA","onUpdate:modelValue":h[10]||(h[10]=g=>e.unref(c)[1]=g),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",disabled:l.disabled},null,8,Xw),[[e.vModelText,e.unref(c)[1]]])])):e.createCommentVNode("",!0)]),(l.cleanable,e.createCommentVNode("",!0))],64))}}),xs={radio:Vx,checkbox:fs,check:fs,text:Ux,range:Xx,date:cw,select:kw,tag:Vw,"date:inline":Zw};function Ur(l,t){let a;switch(l.toLowerCase()){case"autocomplete":a="select";break;case"check":a="checkbox";break;default:a=l==null?void 0:l.toString().toLowerCase()}return a==="date"&&t&&t==="inline"&&(a="date:inline"),{component:xs[a]||xs.text,type:a}}const Qw={style:{display:"inline-flex",margin:"0px",width:"100%"}},Jw={class:"relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm"},e2={class:"block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200"},t2={class:"flex items-center"},l2={class:"text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1"},a2={class:"filter-layout__body"},r2=e.defineComponent({__name:"vertical-layout",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const r=l,n=a,o=e.ref(),s=Ur(r.type,r.layout),i=e.computed({get:()=>r.modelValue,set:m=>n("update:modelValue",m)});function c(m){n("clear",m)}function u(m,f){n("change",{name:m,value:f}),r.modelValue!==void 0&&n("update:modelValue",f)}function d(){o.value&&o.value.clear(),n("clear",r.name)}return e.watch(()=>r.default,m=>{i.value=m}),e.watch(()=>r.modelValue,m=>{i.value=m}),t({filterRef:o}),(m,f)=>{var p,y,h;return e.openBlock(),e.createElementBlock("div",Qw,[e.createElementVNode("div",Jw,[e.createElementVNode("div",e2,[e.createElementVNode("div",t2,[e.createElementVNode("span",l2,e.toDisplayString(l.label),1)]),typeof i.value=="string"&&i.value.trim()!==""||Array.isArray(i.value)&&i.value.length>0&&i.value.some(g=>g!==void 0)||i.value===null?(e.openBlock(),e.createBlock(rx,{key:0,onClick:d})):e.createCommentVNode("",!0)]),e.createElementVNode("div",a2,[((p=e.unref(s))==null?void 0:p.type)!=="select"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent((y=e.unref(s))==null?void 0:y.component),e.mergeProps({key:0},r,{type:(h=e.unref(s))==null?void 0:h.type,onChange:f[0]||(f[0]=g=>u(g.name,g.value)),onClear:f[1]||(f[1]=g=>c(g)),ref_key:"filterRef",ref:o}),null,16,["type"])):(e.openBlock(),e.createBlock(Rr,{key:1,"current-value":i.value,label:l.label,mode:l.mode,onClear:d,fieldRef:o.value,width:void 0,disabled:l.disabled,layout:"vertical"},{default:e.withCtx(()=>{var g,b;return[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((g=e.unref(s))==null?void 0:g.component),e.mergeProps({ref_key:"filterRef",ref:o},r,{type:(b=e.unref(s))==null?void 0:b.type,onChange:f[2]||(f[2]=w=>u(w.name,w.value)),onClear:f[3]||(f[3]=w=>c(w))}),null,16,["type"]))]}),_:1},8,["current-value","label","mode","fieldRef","disabled"]))])])])}}}),ws=e.defineComponent({__name:"inline-layout",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const r=l,n=a,o=e.ref(),s=Ur(r.type,r.layout),i=e.computed({get:()=>r.modelValue,set:d=>n("update:modelValue",d)});function c(d=r.name){n("clear",d)}function u(d,m){n("change",{name:d,value:m}),r.modelValue!==void 0&&n("update:modelValue",m)}return e.watch(()=>r.default,d=>{i.value=d}),e.watch(()=>r.modelValue,d=>{i.value=d}),t({filterRef:o}),(d,m)=>{var f,p;return["text","date"].includes(l.type.toLocaleLowerCase())?(e.openBlock(),e.createBlock(e.resolveDynamicComponent((f=e.unref(s))==null?void 0:f.component),e.mergeProps({key:0},r,{type:(p=e.unref(s))==null?void 0:p.type,onChange:m[0]||(m[0]=y=>u(y.name,y.value)),onClear:m[1]||(m[1]=y=>c(y)),disabled:l.disabled,modelValue:i.value,"onUpdate:modelValue":m[2]||(m[2]=y=>i.value=y)}),null,16,["type","disabled","modelValue"])):(e.openBlock(),e.createBlock(Rr,{key:1,"current-value":i.value,label:l.label,mode:l.mode,onClear:c,fieldRef:o.value,width:r.width,disabled:l.disabled,layout:"inline"},{default:e.withCtx(()=>{var y,h;return[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((y=e.unref(s))==null?void 0:y.component),e.mergeProps({ref_key:"filterRef",ref:o},r,{modelValue:i.value,"onUpdate:modelValue":m[3]||(m[3]=g=>i.value=g),type:(h=e.unref(s))==null?void 0:h.type,onChange:m[4]||(m[4]=g=>u(g.name,g.value)),onClear:m[5]||(m[5]=g=>c(g))}),null,16,["modelValue","type"]))]}),_:1},8,["current-value","label","mode","fieldRef","width","disabled"]))}}}),n2=e.defineComponent({__name:"popover-layout",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const r=l,n=a,o=e.ref(),s=e.ref(Ur(r.type,r.layout)),i=e.computed({get:()=>r.modelValue,set:d=>n("update:modelValue",d)});function c(d){n("clear",d)}function u(d,m){n("change",{name:d,value:m}),r.modelValue!==void 0&&n("update:modelValue",m)}return e.watch(()=>r.default,d=>{i.value=d}),e.watch(()=>r.modelValue,d=>{i.value=d}),e.watch(()=>r,d=>{i.value=d}),t({filterRef:o}),(d,m)=>{var f,p;return e.openBlock(),e.createBlock(e.resolveDynamicComponent((f=s.value)==null?void 0:f.component),e.mergeProps(r,{type:(p=s.value)==null?void 0:p.type,modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=y=>i.value=y),onChange:m[1]||(m[1]=y=>u(y.name,y.value)),onClear:m[2]||(m[2]=y=>c(y)),ref_key:"filterRef",ref:o}),null,16,["type","modelValue"])}}}),ul=e.defineComponent({__name:"filter-field",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{default:()=>[]},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean,default:!0},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{default:"name"},ua:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const r=l,n=a,o=e.ref(),s=e.computed({get:()=>r.modelValue,set:d=>n("update:modelValue",d)});function i(d){n("clear",d)}function c(d,m){n("change",{name:d,value:m}),r.modelValue!==void 0&&n("update:modelValue",m)}e.watch(()=>r.default,d=>{s.value=d}),e.watch(()=>r.modelValue,d=>{s.value=d}),t({filterRef:o});function u(){switch(r.layout){case"inline":return ws;case"vertical":return r2;case"popover":return n2;default:return ws}}return(d,m)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u()),e.mergeProps(r,{onChange:m[0]||(m[0]=f=>c(f.name,f.value)),onClear:m[1]||(m[1]=f=>i(f)),modelValue:s.value,"onUpdate:modelValue":m[2]||(m[2]=f=>s.value=f)}),null,16,["modelValue"]))}});function jr(l,t){const{slots:a}=l,r=e.ref(l.value??{}),n=e.computed(()=>{var g;return(e.toRaw((g=a==null?void 0:a.default)==null?void 0:g.call(a))??[]).flatMap(b=>Array.isArray(b.children)?b.children:[b])});function o(g){delete r.value[g],t("clear",{data:e.toRaw(r.value),name:g})}function s(g,b){b===void 0?o(g):r.value={...r.value,[g]:b},t("change",{data:e.toRaw(r.value),name:g,value:b})}const i=e.computed(()=>n.value.map(g=>{var w;const b=(w=g.props)==null?void 0:w.name;return e.cloneVNode(g,{...g.props,layout:l.view,showClean:!0,modelValue:r.value[b],"onUpdate:modelValue":x=>{s(b,x)},onClear:()=>o(b)})})),c=e.computed(()=>new Map(i.value.map(g=>{var w;const b=(w=g.props)==null?void 0:w.name;return b?[b,g]:null}).filter(g=>g!==null)));function u(g=!1){r.value={},g||t("clearAll",{data:e.toRaw(r.value),name:"ALL"})}const d=e.ref(""),m=e.computed(()=>{var g;return(g=l.schema)!=null&&g.value?Object.entries(r.value).filter(([b,w])=>l.schema&&!(b in l.schema.value)?!1:Array.isArray(w)?w.some(x=>x!==""&&x!==void 0):w!==""&&w!==void 0).length:0}),f=e.ref();e.watch(d,async()=>{var g,b;await e.nextTick(),(b=(g=f==null?void 0:f.value)==null?void 0:g.filterRef)!=null&&b.inputTextRef&&f.value.filterRef.inputTextRef.focus()});const p=e.computed(()=>{var g,b;return(g=l.schema)!=null&&g.value?Object.fromEntries(Object.entries((b=l.schema)==null?void 0:b.value).slice(0,l.limit)):{}}),y=e.computed(()=>{var b;if(i.value.length===0)return[];let g=0;if((b=l.schema)!=null&&b.value){const w=Object.entries(l.schema.value).length;l.limit&&w<l.limit?g=l.limit-w:g=0}return i.value.slice(0,g)}),h=e.computed(()=>i.value.length===0?[]:l.view!=="inline"?i.value:i.value.slice(y.value.length));return{activeFilter:r,activeFilterCount:m,onFilterChange:s,clearFilter:o,clearAllFilters:u,limitedSchema:p,filtersSlot:i,limitedFiltersSlot:y,popoverFiltersSlot:h,vnodeMap:c,selectedFilter:d,filterRef:f}}const o2=e.defineComponent({__name:"popover",emits:["open","close"],setup(l,{emit:t}){const a=e.ref(!1),r=e.ref(null),n=e.ref(null),o=e.ref(null),s=e.ref({top:"0px",left:"0px",position:"absolute"});function i(){a.value=!a.value}function c(){const p=o.value,y=r.value;if(!p||!y)return;const h=p.getBoundingClientRect(),g=y.offsetWidth,b=window.innerWidth-h.left;let w=h.left+window.scrollX;g>b&&(w=window.innerWidth-g-8,w<8&&(w=8)),s.value={position:"absolute",top:`${h.bottom+window.scrollY+8}px`,left:`${w}px`}}const u=e.computed(()=>Object.entries(s.value).map(p=>p.join(":")).join(";"));function d(p){var h,g;const y=p.target;!((h=o.value)!=null&&h.contains(p.target))&&!((g=r.value)!=null&&g.contains(p.target))&&!y.closest("[data-inside-popover]")&&(a.value=!1)}const m=e.ref(!1);e.onMounted(()=>{m.value=!0}),e.onMounted(()=>{var p,y;o.value=((p=n.value)==null?void 0:p.querySelector("[data-popover-trigger]"))||null,(y=o.value)==null||y.addEventListener("click",i),document.addEventListener("click",d),window.addEventListener("resize",c),window.addEventListener("scroll",c,!0)}),e.onBeforeUnmount(()=>{var p;(p=o.value)==null||p.removeEventListener("click",i),document.removeEventListener("click",d),window.removeEventListener("resize",c),window.removeEventListener("scroll",c,!0)});const f=t;return e.watch(a,async p=>{p?(f("open"),await e.nextTick(),c()):f("close")}),(p,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:n},[e.renderSlot(p.$slots,"trigger"),m.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.withDirectives(e.createElementVNode("div",{ref_key:"popoverRef",ref:r,class:"absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",style:e.normalizeStyle(u.value)},[e.renderSlot(p.$slots,"default")],4),[[e.vShow,a.value]])])):e.createCommentVNode("",!0)],512))}}),s2={},i2={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",class:"lucide lucide-filter h-4 w-4"};function c2(l,t){return e.openBlock(),e.createElementBlock("svg",i2,[...t[0]||(t[0]=[e.createElementVNode("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"},null,-1)])])}const d2=Mt(s2,[["render",c2]]),u2={key:0,class:"inline-flex rounded-sm items-center border font-semibold border-transparent hover:bg-secondary/80 bg-blue-500 text-white text-xs px-1.5"},m2={class:"flex"},p2={class:"w-64 border-r border-gray-200"},f2={class:"p-2"},h2=["onClick"],g2={class:"flex items-center gap-2"},b2={class:"text-sm font-medium"},y2={key:0,class:"inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 text-blue-700 text-xs p-2"},k2=["onClick"],x2={class:"flex items-center gap-2"},w2={class:"text-sm font-medium"},_2={key:0,class:"inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 text-blue-700 text-xs p-2"},E2={key:0,class:"p-2 border-t"},C2={class:"flex-1 min-h-[300px] overflow-y-auto"},V2={key:0,class:"flex items-center justify-center h-full text-gray-500"},_s=e.defineComponent({__name:"popover-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},mode:{},limit:{default:3}},emits:["change","clear","clearAll"],setup(l,{expose:t,emit:a}){const r=l,n=ys(r.mode),o=e.useSlots(),s=a,i=e.ref({}),c=e.computed(()=>i!=null&&i.value?r.view!=="inline"?i==null?void 0:i.value:Object.fromEntries(Object.entries(i==null?void 0:i.value).slice(r.limit)):{}),{activeFilter:u,activeFilterCount:d,onFilterChange:m,clearFilter:f,clearAllFilters:p,popoverFiltersSlot:y,selectedFilter:h,filterRef:g}=jr({...r,schema:i.value,slots:o},s);function b(){if(c.value){const[w]=Object.keys(c.value);h.value=w}else y.value.length>0?h.value=y.value[0].props.name:h.value=""}return e.watch(()=>r.schema,w=>{i.value=w},{deep:!0,immediate:!0}),t({clearFilter:f,clearAllFilters:p}),(w,x)=>(e.openBlock(),e.createBlock(o2,{onOpen:b,onClose:x[5]||(x[5]=k=>h.value="")},{trigger:e.withCtx(()=>[e.createElementVNode("button",{"data-popover-trigger":"","aria-haspopup":"dialog","aria-expanded":"false",class:e.normalizeClass(e.unref(n)+(e.unref(d)>0?"bg-blue-50 border-blue-200 text-blue-700 hover:bg-blue-100":"text-gray-800 hover:bg-gray-200 focus:bg-gray-200")),type:"button"},[e.createVNode(d2),x[6]||(x[6]=e.createTextVNode(" Фільтр ",-1)),e.unref(d)>0?(e.openBlock(),e.createElementBlock("div",u2,e.toDisplayString(e.unref(d)),1)):e.createCommentVNode("",!0)],2)]),default:e.withCtx(()=>[e.createElementVNode("div",m2,[e.createElementVNode("div",p2,[x[7]||(x[7]=e.createElementVNode("div",{class:"p-4 border-b"},[e.createElementVNode("p",{class:"text-sm text-gray-600"},"Select a field to start creating a filter.")],-1)),e.createElementVNode("div",f2,[l.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(c.value),([k,_])=>{var N;return e.openBlock(),e.createElementBlock("button",{key:k,onClick:()=>{h.value=k},class:e.normalizeClass(["w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",e.unref(h)===k?"bg-blue-50 text-blue-700 border-l-2 border-blue-500":"text-gray-700"])},[e.createElementVNode("div",g2,[e.createElementVNode("span",b2,e.toDisplayString(_.label),1)]),(Array.isArray(e.unref(u)[k])?((N=e.unref(u)[k])==null?void 0:N.length)>0:e.unref(u)[k]||e.unref(u)[k]===null)?(e.openBlock(),e.createElementBlock("div",y2)):e.createCommentVNode("",!0)],10,h2)}),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(k,_)=>{var N;return e.openBlock(),e.createElementBlock("button",{key:"slot-"+_,onClick:V=>h.value=k.props.name,class:e.normalizeClass(["w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",e.unref(h)===k.props.name?"bg-blue-50 text-blue-700 border-l-2 border-blue-500":""])},[e.createElementVNode("div",x2,[e.createElementVNode("span",w2,e.toDisplayString(k.props.label),1)]),((N=e.unref(u)[k.props.name])==null?void 0:N.length)>0?(e.openBlock(),e.createElementBlock("div",_2)):e.createCommentVNode("",!0)],10,k2)}),128))]),e.unref(d)>0?(e.openBlock(),e.createElementBlock("div",E2,[e.createElementVNode("button",{class:"w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors",onClick:x[0]||(x[0]=k=>e.unref(p)()),"data-inside-popover":""}," Очистити всі ")])):e.createCommentVNode("",!0)]),e.createElementVNode("div",C2,[e.unref(h)===""?(e.openBlock(),e.createElementBlock("div",V2,[...x[8]||(x[8]=[e.createElementVNode("p",{class:"text-sm"},"Select a field to start creating a filter.",-1)])])):e.createCommentVNode("",!0),e.unref(h)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(c.value),([k,_])=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(h)===k?(e.openBlock(),e.createBlock(ul,e.mergeProps({key:k,layout:"popover",ref_for:!0,ref_key:"filterRef",ref:g},{ref_for:!0},_,{onChange:x[1]||(x[1]=N=>e.unref(m)(N.name,N.value)),onClear:x[2]||(x[2]=N=>{e.unref(f)(N),e.unref(m)(N,void 0)}),modelValue:e.unref(u)[k],"onUpdate:modelValue":N=>e.unref(u)[k]=N,cleanable:!0}),null,16,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(k,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"slot-"+_},[e.unref(h)===k.props.name?(e.openBlock(),e.createBlock(ul,e.mergeProps({key:0,layout:"popover"},{ref_for:!0},k.props,{ref_for:!0,ref_key:"filterRef",ref:g,onChange:x[3]||(x[3]=N=>e.unref(m)(N.name,N.value)),onClear:x[4]||(x[4]=N=>{e.unref(f)(N),e.unref(m)(N,void 0)}),modelValue:e.unref(u)[k.props.name],"onUpdate:modelValue":N=>e.unref(u)[k.props.name]=N,cleanable:!0}),null,16,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)],64))),128))],64)):e.createCommentVNode("",!0)])])]),_:1}))}}),N2={class:"flex gap-1 items-center flex-wrap"},Es=e.defineComponent({__name:"inline-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},mode:{},limit:{default:3}},emits:["change","clear","clearAll"],setup(l,{expose:t,emit:a}){const r=vl(),n=l,o=a,s=e.useSlots(),i=e.ref({}),c=e.computed(()=>Object.keys(n.schema).length>n.limit),{activeFilter:u,activeFilterCount:d,onFilterChange:m,clearFilter:f,clearAllFilters:p,limitedSchema:y,filtersSlot:h,limitedFiltersSlot:g}=jr({...n,schema:i,slots:s},o),b=e.ref();function w(){b.value&&b.value.clearAllFilters(!0),p()}return e.watch(()=>n.schema,x=>{i.value=x},{deep:!0,immediate:!0}),t({clearFilter:f,clearAllFilters:p}),(x,k)=>(e.openBlock(),e.createElementBlock("div",N2,[l.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(e.unref(y)),([_,N])=>(e.openBlock(),e.createBlock(ul,e.mergeProps({key:_,mode:l.mode},{ref_for:!0},N,{onChange:k[0]||(k[0]=V=>e.unref(m)(V.name,V.value)),onClear:e.unref(f),layout:"inline",cleanable:!0,modelValue:e.unref(u)[_],"onUpdate:modelValue":V=>e.unref(u)[_]=V}),null,16,["mode","onClear","modelValue","onUpdate:modelValue"]))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(_,N)=>(e.openBlock(),e.createBlock(ul,e.mergeProps({key:"slot-"+N,layout:"inline"},{ref_for:!0},_.props,{onChange:k[1]||(k[1]=V=>e.unref(m)(V.name,V.value)),onClear:k[2]||(k[2]=V=>{e.unref(f)(V),e.unref(m)(V,void 0)}),cleanable:!0,modelValue:e.unref(u)[_.props.name],"onUpdate:modelValue":V=>e.unref(u)[_.props.name]=V}),null,16,["modelValue","onUpdate:modelValue"]))),128)),c.value?(e.openBlock(),e.createBlock(_s,e.mergeProps({key:1},n,{schema:l.schema,limit:l.limit,onChange:k[3]||(k[3]=_=>e.unref(m)(_.name,_.value)),onClearAll:k[4]||(k[4]=_=>e.unref(p)()),onClear:k[5]||(k[5]=_=>e.unref(f)(_.name)),mode:l.mode,ref_key:"popoverRef",ref:b,cleanable:!0}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(h),(_,N)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_),e.mergeProps({key:"slot-"+N,layout:"popover"},{ref_for:!0},_.props,{cleanable:!0}),null,16))),128))]),_:1},16,["schema","limit","mode"])):e.createCommentVNode("",!0),e.unref(d)>0?(e.openBlock(),e.createElementBlock("button",{key:2,onClick:w,class:"relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 border border-transparent text-gray-800 hover:bg-gray-200 focus:bg-gray-200"},e.toDisplayString(e.unref(r)("filter.clear")),1)):e.createCommentVNode("",!0)]))}}),v2={key:0,class:"p-2 overflow-y-auto overflow-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-800 max-h-[calc(100%-142px)] h-full bg-gray-100"},B2={class:"flex items-center vst-filters vsTailwind flex-col w-full"},S2=e.defineComponent({__name:"vertical-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},mode:{},limit:{default:3}},emits:["change","clear","clearAll"],setup(l,{expose:t,emit:a}){const r=l,n=a,o=e.useSlots(),{activeFilter:s,activeFilterCount:i,onFilterChange:c,clearFilter:u,clearAllFilters:d,filtersSlot:m}=jr({...r,slots:o},n);return t({clearFilter:u,clearAllFilters:d}),(f,p)=>l.view==="vertical"?(e.openBlock(),e.createElementBlock("div",v2,[e.createElementVNode("div",B2,[e.unref(i)>0?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:p[0]||(p[0]=y=>e.unref(d)()),"data-popover-trigger":"","aria-haspopup":"dialog","aria-expanded":"false",class:"w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200",type:"button"}," Очистити ")):e.createCommentVNode("",!0),l.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Object.entries(l.schema),([y,h])=>(e.openBlock(),e.createBlock(ul,e.mergeProps({layout:"vertical"},{ref_for:!0},h,{onChange:p[1]||(p[1]=g=>e.unref(c)(g.name,g.value)),onClear:p[2]||(p[2]=g=>{e.unref(u)(g),e.unref(c)(g,void 0)}),modelValue:e.unref(s)[y],"onUpdate:modelValue":g=>e.unref(s)[y]=g,showClean:!0}),null,16,["modelValue","onUpdate:modelValue"]))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),(y,h)=>(e.openBlock(),e.createBlock(ul,e.mergeProps({key:"slot-"+h,layout:"vertical"},{ref_for:!0},y.props,{onChange:p[3]||(p[3]=g=>e.unref(c)(g.name,g.value)),onClear:p[4]||(p[4]=g=>{e.unref(u)(g),e.unref(c)(g,void 0)}),modelValue:e.unref(s)[y.props.name],"onUpdate:modelValue":g=>e.unref(s)[y.props.name]=g,showClean:!0}),null,16,["modelValue","onUpdate:modelValue"]))),128))])])):e.createCommentVNode("",!0)}}),zr=e.defineComponent({__name:"filter",props:{schema:{},view:{default:"inline"},value:{},history:{type:Boolean},mode:{},limit:{default:3}},emits:["change","clear","clearAll"],setup(l,{expose:t,emit:a}){const r=l,n=e.ref(r.value??{}),o=a,s=e.ref();function i(h){if(Array.isArray(h))return h.map(g=>i(g));if(h!==null&&typeof h=="object"){const g=e.toRaw(h),b={};for(const w in g)b[w]=i(g[w]);return b}return h}function c(h,g){g!==void 0?n.value={...n.value,[h]:g}:delete n.value[h],o("change",{data:i(n.value),name:h,value:i(g)})}function u(h){delete n.value[h],o("clear",{data:i(n.value),name:h}),o("change",{data:i(n.value),name:h,value:null})}function d(){n.value={},o("clear",{data:i(n.value),name:"ALL"}),o("change",{data:i(n.value),name:"ALL",value:null})}const m=e.ref({});function f(){switch(r.view){case"inline":return Es;case"vertical":return S2;case"popover":return _s;default:return Es}}e.watch(()=>r.schema,h=>{if(!h){m.value={};return}if(Array.isArray(h)&&!h.length){m.value={};return}Array.isArray(h)?m.value=h.filter(g=>g.type).reduce((g,b)=>(Object.assign(b,{name:b.id||b.name,type:{datepicker:"date"}[b.type.toLowerCase()]||b.type.toLowerCase(),label:b.label||b.ua}),g[b.name]=b,b.data&&!b.api&&!b.options&&Object.assign(b,{api:`/api/suggest/${b.data}`}),g),{}):(Object.entries(h).forEach(([g,b])=>{Object.assign(b,{name:g||b.name||b.id,type:b.type.toLowerCase()})}),m.value={...h})},{immediate:!0,deep:!0});function p(h){s.value.clearFilter(h),u(h)}function y(){s.value.clearAllFilters(),d()}return e.watch(()=>n.value,h=>{if(r.history){const g=new URL(window.location.href),b=new URLSearchParams(window.location.search);Object.keys(h).length>0?b.set("filter",Object.entries(h).filter(([,w])=>w).map(([w,x])=>`${w}=${x}`).join("|")):b.delete("filter"),g.search=decodeURI(b.toString()),window.history.pushState({},"",g)}}),t({clearAllFilters:y,clearFilter:p}),(h,g)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f()),e.mergeProps(r,{schema:m.value,onChange:g[0]||(g[0]=b=>c(b.name,b.value)),onClear:g[1]||(g[1]=b=>u(b.name)),onClearAll:d,ref_key:"filterRef",ref:s}),{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),_:3},16,["schema"]))}});zr.install=function(l){l.component("Filter",zr),l.component("FilterField",ul)};const D2={class:"flex items-center space-x-1 mb-4"},A2=["onClick"],M2={key:1,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium text-slate-700 dark:text-slate-300"},Cs=e.defineComponent({__name:"CollectionsBreadcrumb",props:{items:{}},emits:["navigate"],setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",D2,[e.createElementVNode("button",{class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20 hover:bg-blue-100 dark:hover:bg-blue-900/30",onClick:a[0]||(a[0]=r=>t.$emit("navigate","collections"))},[e.createVNode(e.unref(xl),{class:"w-3 h-3"}),e.createTextVNode(" "+e.toDisplayString(t.$t("cms.navigation.collections")),1)]),t.items.length>0?(e.openBlock(),e.createBlock(e.unref(bl),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[n<t.items.length-1?(e.openBlock(),e.createElementBlock("button",{key:0,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20 hover:bg-blue-100 dark:hover:bg-blue-900/30",onClick:o=>t.$emit("navigate",r.route)},e.toDisplayString(r.label),9,A2)):(e.openBlock(),e.createElementBlock("span",M2,e.toDisplayString(r.label),1)),n<t.items.length-1?(e.openBlock(),e.createBlock(e.unref(bl),{key:2,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0)],64))),128))]))}}),T2={class:"space-y-6 max-w-7xl mx-auto"},L2={class:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},$2={class:"flex items-center gap-2"},F2={class:"text-3xl font-bold text-slate-800 dark:text-white mb-2"},I2=["href","title"],O2={key:0,class:"text-card-foreground shadow-lg border-0 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm"},P2={key:0,class:"p-2 border-b border-gray-200 sm:px-4 sm:py-2 dark:border-gray-700"},R2={class:"flex flex-col gap-4 sm:flex-row"},U2={class:"relative flex items-center gap-2 ml-auto"},j2={key:1,class:"absolute top-full right-1/2 translate-x-1/2 min-w-full p-4 z-10 bg-white border border-gray-300 rounded-md mt-2 dark:bg-slate-800 dark:border-slate-700"},z2={class:"max-h-60 overflow-y-auto overflow-x-hidden"},H2={key:1},Vs=e.defineComponent({__name:"ArticlesPage",setup(l){const t=rt.useRoute(),a=rt.useRouter(),r=e.ref(null),n=e.ref(""),{t:o,locale:s}=Fe(),i=e.ref([]),c=e.inject("cms.menu")||[],u=e.ref(""),d=e.ref(1),m=e.ref(!1),f=e.ref(["title","slug","author","publish_at","published_at","status"]),p=e.ref([]),y=e.ref([]),h=e.ref([]),g=e.ref({}),b=e.ref(0),w=e.ref(!1),x=()=>{var F;let I=(F=r.value)==null?void 0:F.columns.filter(D=>{var z;return(z=f==null?void 0:f.value)==null?void 0:z.includes(D.name)});p.value=I.map(D=>{switch(D.name){case"title":return{...D,title:D.name?D.name.charAt(0).toUpperCase()+D.name.slice(1):"--",icon:Il};case"slug":return{...D,title:D.name?D.name.charAt(0).toUpperCase()+D.name.slice(1):"-",icon:ji};case"author":return{...D,title:D.name?D.name.charAt(0).toUpperCase()+D.name.slice(1):"-",icon:Wi};case"publish_at":return{...D,title:D.name?D.name.charAt(0).toUpperCase()+D.name.slice(1):"-",icon:ua};case"published_at":return{...D,title:D.name?D.name.charAt(0).toUpperCase()+D.name.slice(1):"-",icon:ua};default:return{...D,title:D.name?D.name.charAt(0).toUpperCase()+D.name.slice(1):"-"}}}),m.value=!1},k=e.computed(()=>{var I,F;return(F=(I=c.value)==null?void 0:I.find(D=>D.id===t.params.id))==null?void 0:F.title}),_=e.computed(()=>[{label:k.value||t.params.id,route:`collections/${t.params.id}`}]),N=I=>{I==="collections"?a.push("/collections"):a.push(`/${I}`)},V=()=>{a.push(`/collections/${t.params.id}/create`)},P=async I=>{console.log("handleRemoveArticle"),Ca({title:o("cms.builder.deleteTitle"),message:o("cms.builder.deleteObject"),type:"error",onConfirm:async()=>{await fetch(`/api/cms/${t.params.id}/${I.id}`,{method:"DELETE"}),M()}})},$=I=>{a.push(`/collections/${t.params.id}/${I.id}`)},M=async()=>{if(!w.value){w.value=!0;try{const F=await(await fetch(`/api/cms/${t.params.id}?page=${d.value}&filter=${u.value}`)).json();i.value=F.rows||[],r.value=F;const D=(F.filters||[]).map(z=>{const{extra:ee,title:me,...Ne}=z;return Ne});h.value=D,t.params.id==="pages"&&f.value.push("type"),A(),x()}finally{w.value=!1}}},A=()=>{var F;if(!((F=r.value)!=null&&F.columns))return;const I=r.value.columns.map((D,z)=>({text:D.label,id:D.name}));y.value=[...f.value.map(D=>I.find(z=>z.id===D)).filter(Boolean),...I.filter(D=>!f.value.includes(D.id))]},q=(I,F)=>{if(!F)return!0;const D=F.toLowerCase();return p.value.some(z=>{const ee=I[z.name];return ee&&ee.toString().toLowerCase().includes(D)})},Q=I=>{const F=Object.entries(I==null?void 0:I.data).filter(([,z])=>z!=null).map(([z,ee])=>`${z}=${ee}`).join("|");u.value=F;const D={...t.query};F?D.filter=F:delete D.filter,a.replace({query:D})},R=()=>{if(t.query.filter){u.value=t.query.filter;const I=t.query.filter.split("cms.|"),F={};I.forEach(D=>{const[z,ee]=D.split("cms.=");z&&ee&&(F[z]=ee)}),g.value=F}else u.value="",g.value={},b.value++};return e.onMounted(()=>{R(),M()}),e.watch(()=>t.params.id,()=>{g.value={},u.value="",h.value=[];const I={...t.query};delete I.filter,a.replace({query:I}),b.value++,R(),M()}),e.watch(()=>t.query,async()=>{R(),await e.nextTick(),M()},{deep:!0}),e.watch(d,async()=>{t.query.filter||(u.value="",g.value={},b.value++),await e.nextTick(),M()}),(I,F)=>{var D,z,ee;return e.openBlock(),e.createElementBlock("div",T2,[e.createVNode(Cs,{items:_.value,onNavigate:N},null,8,["items"]),e.createElementVNode("div",L2,[e.createElementVNode("div",$2,[e.createElementVNode("h1",F2,e.toDisplayString(k.value),1),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(s)}/guides/content/`,target:"_blank",title:I.$t("cms.guide.content")},[e.createVNode(e.unref(kl),{class:"w-5 h-5"})],8,I2)]),i.value.length?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:V,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(rl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(I.$t("cms.articles.createArticle")),1)])):e.createCommentVNode("",!0)]),i.value.length||u.value.length?(e.openBlock(),e.createElementBlock("div",O2,[(e.openBlock(),e.createElementBlock("div",P2,[e.createElementVNode("div",R2,[(e.openBlock(),e.createBlock(e.unref(zr),{key:b.value,schema:h.value,history:!0,value:g.value,view:"inline",onChange:Q},null,8,["schema","value"])),e.createElementVNode("div",U2,[y.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex items-center gap-2 cursor-pointer text-sm border border-gray-300 rounded-md p-2 dark:text-white",onClick:F[0]||(F[0]=me=>m.value=!m.value)},[e.createElementVNode("p",null,e.toDisplayString(I.$t("cms.articles.showColumns")),1),e.createVNode(e.unref(En),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),y.value.length>0&&m.value?(e.openBlock(),e.createElementBlock("div",j2,[e.createElementVNode("div",z2,[y.value.length>0&&m.value?(e.openBlock(),e.createBlock(e.unref(Jo),{key:0,options:y.value,modelValue:f.value,"onUpdate:modelValue":F[1]||(F[1]=me=>f.value=me)},null,8,["options","modelValue"])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{class:"text-sm bg-blue-600 text-white rounded-md p-2 mt-4 w-full",onClick:x},e.toDisplayString(I.$t("cms.articles.update")),1)])):e.createCommentVNode("",!0)])])])),p.value.length>0?(e.openBlock(),e.createBlock(Wo,{key:1,class:"max-h-[calc(100vh-270px)] overflow-y-auto",rows:i.value,columns:p.value,query:n.value,filterFn:q,onDelete:P,onEdit:$},null,8,["rows","columns","query"])):e.createCommentVNode("",!0),((D=r.value)==null?void 0:D.total)>20?(e.openBlock(),e.createBlock(Ko,{key:2,total:(z=r.value)==null?void 0:z.filtered,count:(ee=r.value)==null?void 0:ee.count,page:d.value,"onUpdate:page":F[2]||(F[2]=me=>d.value=me),limit:20},null,8,["total","count","page"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",H2,[e.createVNode(Go,{onAction:V})]))])}}}),q2={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},G2={__name:"CreateForm",setup(l){const t=e.inject("cms.fetchContentTypes"),{t:a}=Fe(),r=rt.useRouter(),n=e.ref({}),o=e.ref(!1),s=e.ref({type:"collection"}),i={name:{type:"text",label:a("cms.builder.scheme.name.label"),required:!0,placeholder:a("cms.builder.scheme.name.placeholder"),validators:["required"]},title:{type:"text",label:a("cms.builder.scheme.title.label"),required:!0,placeholder:a("cms.builder.scheme.title.placeholder"),validators:["required"]},type:{type:"combobox",mode:"combo",label:a("cms.builder.scheme.type.label"),required:!0,placeholder:a("cms.builder.scheme.type.placeholder"),validators:["required"],options:[{text:a("cms.builder.scheme.type.options.collection"),id:"collection"},{text:a("cms.builder.scheme.type.options.single"),id:"single"}]},customTable:{type:"switcher",label:a("cms.builder.scheme.customTable.label")}},c=async()=>{if(await n.value.validate()){xe({type:"warning",title:a("cms.common.actions.warning"),message:a("cms.collections.collectionCreationFailed")});return}try{const m=await(await fetch("/api/cms-type",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s.value)})).json();r.push(`/settings/collections/edit/${m.id}`),t(),xe({type:"success",title:a("cms.common.actions.success"),message:a("cms.collections.collectionCreated")})}catch(d){xe({type:"error",title:a("cms.common.actions.error"),message:a("cms.collections.collectionCreationFailed")}),console.error(d)}};return(u,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{onClick:d[0]||(d[0]=m=>o.value=!0),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-105"},[e.createVNode(e.unref(rl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(u.$t("cms.collections.createCollection")),1)]),e.createVNode(e.unref(Zt),{teleport:"#modal",visible:o.value,title:u.$t("cms.collections.createCollection"),onClose:d[4]||(d[4]=m=>o.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",q2,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:d[3]||(d[3]=m=>o.value=!1)},e.toDisplayString(u.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Xe),{form:n.value,"onUpdate:form":d[1]||(d[1]=m=>n.value=m),modelValue:s.value,"onUpdate:modelValue":d[2]||(d[2]=m=>s.value=m),schema:i},null,8,["form","modelValue"])]),_:1},8,["visible","title"])]))}};let W2;function K2(){return W2}e.version[0];function Y2(l){return typeof l=="function"?l():e.unref(l)}function Hr(l){if(l instanceof Promise||l instanceof Date||l instanceof RegExp)return l;const t=Y2(l);if(!l||!t)return t;if(Array.isArray(t))return t.map(a=>Hr(a));if(typeof t=="object"){const a={};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(r==="titleTemplate"||r[0]==="o"&&r[1]==="n"){a[r]=e.unref(t[r]);continue}a[r]=Hr(t[r])}return a}return t}const X2="usehead",Ns=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vs="__unhead_injection_handler__";function Z2(){if(vs in Ns)return Ns[vs]();const l=e.inject(X2);return!l&&process.env.NODE_ENV!=="production"&&console.warn("Unhead is missing Vue context, falling back to shared context. This may have unexpected results."),l||K2()}function Q2(l,t={}){const a=t.head||Z2();if(a)return a.ssr?a.push(l,t):J2(a,l,t)}function J2(l,t,a={}){const r=e.ref(!1),n=e.ref({});e.watchEffect(()=>{n.value=r.value?{}:Hr(t)});const o=l.push(n.value,a);return e.watch(n,i=>{o.patch(i)}),e.getCurrentInstance()&&(e.onBeforeUnmount(()=>{o.dispose()}),e.onDeactivated(()=>{r.value=!0}),e.onActivated(()=>{r.value=!1})),o}function e_(l,t=300){const a=e.ref(l.value);let r;return e.watch(l,n=>{clearTimeout(r),r=setTimeout(()=>{a.value=n},t)},{immediate:!0}),a}const Qt=(l,t)=>{const a=l.__vccOpts||l;for(const[r,n]of t)a[r]=n;return a},t_={},l_={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"};function a_(l,t){return e.openBlock(),e.createElementBlock("svg",l_,[...t[0]||(t[0]=[e.createStaticVNode('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>',6)])])}const r_=Qt(t_,[["render",a_]]),n_={},o_={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"};function s_(l,t){return e.openBlock(),e.createElementBlock("svg",o_,[...t[0]||(t[0]=[e.createStaticVNode('<rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M3 9h18"></path><path d="M3 15h18"></path><path d="M9 3v18"></path><path d="M15 3v18"></path>',5)])])}const i_=Qt(n_,[["render",s_]]),c_={class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6 pb-6"},d_={class:"flex items-center gap-2 space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},u_={class:"line-clamp-1 tracking-tight text-lg font-semibold text-slate-800 dark:text-slate-100 vertical-center"},m_={class:"w-full flex flex-col gap-2 p-6"},p_=["title"],f_={class:"flex items-center justify-between gap-2"},h_={class:"text-sm text-slate-600 dark:text-slate-400"},g_={class:"font-semibold text-slate-800 dark:text-slate-100"},b_={class:"flex items-center justify-between gap-2"},y_={class:"text-sm text-slate-500 dark:text-slate-400"},k_={class:"font-semibold text-slate-800 dark:text-slate-100"},x_={class:"flex items-center justify-between gap-2"},w_={class:"text-sm text-slate-500 dark:text-slate-400"},__={class:"text-sm text-slate-600 dark:text-slate-300"},E_={class:"flex items-center justify-between gap-2 mt-6"},C_=["onClick"],V_={class:"text-slate-800 dark:text-slate-200 group-hover:text-green-600 dark:group-hover:text-blue-50"},N_=["onClick"],v_=["onClick"],B_=e.defineComponent({__name:"CollectionsGrid",props:{collections:{},onEdit:{type:Function},onView:{type:Function},onDelete:{type:Function}},emits:["edit","view","delete"],setup(l,{emit:t}){e.ref(!1),e.ref(null);const a=l,r=t,n=(i,c)=>{switch(i){case"edit":r("edit",c),a.onEdit&&a.onEdit(c);break;case"view":r("view",c),a.onView&&a.onView(c);break;case"delete":r("delete",c),a.onDelete&&a.onDelete(c);break}},o=i=>{const c=new Date,u=new Date(i),d=c.getTime()-u.getTime(),m=Math.floor(d/1e3),f=Math.floor(m/60),p=Math.floor(f/60),y=Math.floor(p/24),h=Math.floor(y/7);return h>=2?`${h} weeks ago`:h===1?"1 week ago":y>=2?`${y} days ago`:y===1?"1 day ago":p>=2?`${p} hours ago`:p===1?"1 hour ago":f>=2?`${f} minutes ago`:f===1?"1 minute ago":"just now"},s=i=>{switch(i){case"published":return{icon:wn,text:"Published",classes:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 border-green-200 dark:border-green-700"};case"draft":return{icon:wl,text:"Draft",classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"};case"archived":return{icon:Dn,text:"Archived",classes:"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300 border-gray-200 dark:border-gray-700"};default:return{icon:kl,text:"--",classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"}}};return(i,c)=>(e.openBlock(),e.createElementBlock("div",c_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.collections,u=>{var d,m,f;return e.openBlock(),e.createElementBlock("div",{key:u.id,class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:bg-slate-50"},[e.createElementVNode("div",d_,[u.type==="single"?(e.openBlock(),e.createBlock(e.unref(yl),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(e.openBlock(),e.createBlock(e.unref(xl),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),e.createElementVNode("p",u_,e.toDisplayString(u.title),1),s(u.status)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["whitespace-nowrap rounded-md border ml-auto px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700",(d=s(u.status))==null?void 0:d.classes])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((m=s(u.status))==null?void 0:m.icon),{class:"w-3 h-3 mr-1"})),e.createTextVNode(" "+e.toDisplayString((f=s(u.status))==null?void 0:f.text),1)],2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",m_,[e.createElementVNode("p",{class:"text-slate-600 dark:text-slate-300 mb-4 line-clamp-2",title:u.description},e.toDisplayString(u.description!==null?u.description:"No description"),9,p_),e.createElementVNode("div",f_,[e.createElementVNode("p",h_,e.toDisplayString(i.$t("cms.collections.entries"))+":",1),e.createElementVNode("p",g_,e.toDisplayString(u.entries),1)]),e.createElementVNode("div",b_,[e.createElementVNode("p",y_,e.toDisplayString(i.$t("cms.collections.fields"))+":",1),e.createElementVNode("p",k_,e.toDisplayString(u.fields),1)]),e.createElementVNode("div",x_,[e.createElementVNode("p",w_,e.toDisplayString(i.$t("cms.collections.lastModified"))+":",1),e.createElementVNode("p",__,e.toDisplayString(o(u.last_edit)),1)]),e.createElementVNode("div",E_,[e.renderSlot(i.$slots,"actions",{collection:u,handleAction:n},()=>[e.createElementVNode("button",{class:"inline-flex gap-1 items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-4/5 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-green-50 hover:border-green-300",onClick:e.withModifiers(p=>n("edit",u),["stop"])},[e.createVNode(e.unref(wl),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-green-600 dark:group-hover:text-blue-50"}),e.createElementVNode("span",V_,e.toDisplayString(i.$t("cms.common.actions.edit")),1)],8,C_),e.createElementVNode("button",{class:e.normalizeClass([u.id==="pages"?"disabled":"","inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-red-50 hover:border-red-300"]),onClick:e.withModifiers(p=>u.id==="pages"?null:n("delete",u),["stop"])},[e.createVNode(e.unref(Gt),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-red-600 dark:group-hover:text-blue-50"})],10,N_),e.createElementVNode("button",{class:e.normalizeClass([u.type==="single"?"disabled cursor-not-allowed":"","inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-blue-50 hover:border-blue-300"]),onClick:e.withModifiers(p=>u.type==="single"?null:n("view",u),["stop"])},[e.createVNode(e.unref(pa),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-blue-600 dark:group-hover:text-blue-50"})],10,v_)])])])])}),128))]))}}),qr=localStorage.getItem("collectionView"),Da=e.ref(qr==="list"||qr==="grid"?qr:"list");e.watch(Da,l=>{localStorage.setItem("collectionView",l)});function S_(){Da.value=Da.value==="grid"?"list":"grid"}function D_(){return{collectionView:Da,toggleCollectionView:S_}}const A_={class:"space-y-6 max-w-7xl mx-auto"},M_={class:"flex items-center justify-between mb-8"},T_={class:"flex gap-4"},L_={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},$_={class:"text-slate-600 dark:text-slate-300"},F_=["href","title"],I_={class:"flex items-center gap-3"},O_={class:"relative"},P_={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},R_=["placeholder"],U_={class:"flex items-center bg-white dark:bg-slate-700 border border-slate-200 dark:border-slate-600 rounded-lg p-1 max-w-[fit-content]"},j_=["onClick"],z_=e.defineComponent({__name:"BuilderPage",setup(l){const{t,locale:a}=Fe(),r=rt.useRouter(),n=[{name:"name",title:t("cms.builder.collectionName"),type:"text",icon:xl},{name:"title",title:t("cms.builder.title"),type:"text",icon:xl},{name:"description",title:t("cms.common.description"),type:"text"},{name:"entries",title:t("cms.builder.entries"),type:"number"},{name:"fields",title:t("cms.builder.fields"),type:"number"},{name:"status",title:t("cms.builder.status"),type:"text"},{name:"last_edit",title:t("cms.builder.lastModified"),type:"date"}],o=e.ref(""),s=e_(o,300);Q2({title:()=>t("cms.collections.title")+" | CMS"});const i=e.ref([]),c=e.inject("fetchContentTypes"),u=e.ref(1),d=e.ref(16),m=e.ref(null),{collectionView:f,toggleCollectionView:p}=D_();async function y(){try{const x=s.value?`&search=${encodeURIComponent(String(s.value))}`:"",k=`/api/cms-type?page=${u.value}&limit=${d.value}${x}`;console.log("Fetching collections with URL:",k);const _=await fetch(k);if(!_.ok)throw new Error("Failed to fetch collections");const N=await _.json();console.log("Collections fetched:",N),i.value=N.rows,m.value=N}catch(x){console.error("Error fetching collections:",x)}}e.onMounted(()=>{y()});const h=e.computed(()=>[...i.value].sort((k,_)=>k.id==="pages"?-1:_.id==="pages"?1:0)),g=async x=>{try{await fetch(`/api/cms-type/${x.id}`,{method:"DELETE"}),y(),c()}catch(k){console.error("Error deleting collection:",k)}},b=x=>{r.push(`/settings/collections/edit/${x.id||x.name}`)},w=x=>{x.type==="single"?r.push(`/collections/single/${x.name}`):r.push(`/collections/${x.name}`)};return e.watch(u,()=>{y()}),e.watch(s,x=>{console.log("Search query changed:",x),u.value=1,y()}),(x,k)=>{var _,N,V,P;return e.openBlock(),e.createElementBlock("div",A_,[e.createElementVNode("div",M_,[e.createElementVNode("div",T_,[e.createElementVNode("div",null,[e.createElementVNode("h1",L_,e.toDisplayString(x.$t("cms.builder.collections")),1),e.createElementVNode("p",$_,e.toDisplayString(x.$t("cms.builder.manageContentCollections")),1)]),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(a)}/guides/collections/`,target:"_blank",title:x.$t("cms.guide.collections"),class:"mt-2"},[e.createVNode(e.unref(kl),{class:"w-5 h-5"})],8,F_)]),e.createElementVNode("div",I_,[e.createElementVNode("div",O_,[e.createElementVNode("div",P_,[e.createVNode(e.unref(tr),{class:"w-5 h-5 text-gray-400"})]),e.withDirectives(e.createElementVNode("input",{type:"text",class:"block w-full py-2 pl-10 pr-3 leading-5 text-gray-900 placeholder-gray-500 transition-colors bg-white border border-gray-300 rounded-md dark:border-gray-600 dark:bg-gray-700 dark:placeholder-gray-400 focus:outline-none focus:ring-sky-500 focus:border-sky-500 dark:text-white sm:text-sm",placeholder:x.$t("cms.builder.searchCollections"),"onUpdate:modelValue":k[0]||(k[0]=$=>o.value=$)},null,8,R_),[[e.vModelText,o.value]])]),e.createElementVNode("div",U_,[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors rounded-md text-xs h-8 w-8 p-0 hover:bg-blue-700 hover:text-white cursor-pointer",{"bg-blue-600 text-white":e.unref(f)==="list"}]),onClick:k[1]||(k[1]=$=>f.value="list")},[e.createVNode(r_,{class:"dark:text-blue-50 w-4 h-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors rounded-md text-xs h-8 w-8 p-0 hover:bg-blue-700 hover:text-white cursor-pointer",{"bg-blue-600 text-white":e.unref(f)==="grid"}]),onClick:k[2]||(k[2]=$=>f.value="grid")},[e.createVNode(i_,{class:"dark:text-blue-50 w-4 h-4"})],2)]),e.createVNode(G2)])]),e.createElementVNode("div",null,[e.unref(f)==="list"?(e.openBlock(),e.createBlock(Wo,{key:0,class:"max-h-[calc(100vh-270px)] overflow-y-auto overflow-x-hidden",columns:n,rows:h.value,onDelete:g,onEdit:b,onView:w},{actions:e.withCtx(({row:$})=>[e.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-blue-50 hover:border-blue-300 hover:text-blue-600",onClick:M=>w($)},[e.createVNode(e.unref(pa),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-blue-600 dark:group-hover:text-blue-50"})],8,j_)]),_:1},8,["rows"])):e.createCommentVNode("",!0),e.unref(f)==="grid"?(e.openBlock(),e.createBlock(B_,{key:1,collections:h.value,onEdit:b,onView:w,onDelete:g,class:"max-h-[calc(100vh-270px)] overflow-y-auto overflow-x-hidden"},null,8,["collections"])):e.createCommentVNode("",!0),((_=m.value)==null?void 0:_.total)>16?(e.openBlock(),e.createBlock(Ko,{key:2,total:(N=m.value)==null?void 0:N.filtered,count:((V=m.value)==null?void 0:V.count)||((P=m.value)==null?void 0:P.total),page:u.value,"onUpdate:page":k[3]||(k[3]=$=>u.value=$),limit:d.value},null,8,["total","count","page","limit"])):e.createCommentVNode("",!0)])])}}});async function H_(){if(window.monaco)return window.monaco;const l="https://cdn.jsdelivr.net/npm/monaco-editor@0.45.0/min";return window.require||(window.require={paths:{vs:`${l}/vs`}},await new Promise((t,a)=>{const r=document.createElement("script");r.src=`${l}/vs/loader.min.js`,r.onload=()=>t(),r.onerror=a,document.head.appendChild(r)})),new Promise(t=>{window.require(["vs/editor/editor.main"],()=>t(window.monaco))})}const q_=e.defineComponent({__name:"MonacoEditor",props:e.mergeModels({language:{default:"javascript"},theme:{default:"vs-dark"},width:{default:"100%"},height:{default:"100%"},options:{default:()=>({minimap:{enabled:!1}})}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),r=e.ref(null);let n=null,o=null;return e.onMounted(async()=>{var s;if(r.value)try{o=await H_();const i=((s=a.value)==null?void 0:s.replace(/\\n/g,`
230
- `))||"";n=o.editor.create(r.value,{value:i,language:t.language,theme:t.theme,automaticLayout:!0,...t.options}),n.onDidChangeModelContent(()=>{const c=(n==null?void 0:n.getValue())||"";a.value=c})}catch(i){console.error("Failed to load Monaco Editor:",i)}}),e.watch(()=>a.value,s=>{if(n){const i=(s==null?void 0:s.replace(/\\n/g,`
231
- `))||"";i!==n.getValue()&&n.setValue(i)}},{immediate:!0}),e.watch(()=>t.language,s=>{n&&s&&o&&o.editor.setModelLanguage(n.getModel(),s)}),e.watch(()=>t.theme,s=>{n&&s&&o&&o.editor.setTheme(s)}),e.onBeforeUnmount(()=>{n&&(n.dispose(),n=null)}),(s,i)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"editorContainer",ref:r,style:e.normalizeStyle({width:s.width,height:s.height})},null,4))}}),G_={__name:"vs-builder-monaco",props:{yaml:{type:String,default:""},yamlModifiers:{}},emits:["update:yaml"],setup(l){const t=e.ref("");e.useModel(l,"yaml");const a=e.ref(null);return e.onMounted(()=>{a.value=Math.random().toString(36).substring(2,15)}),(r,n)=>a.value?(e.openBlock(),e.createElementBlock("div",{key:a.value},[e.createVNode(q_,{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=o=>t.value=o),language:"yaml",theme:"vs-light",height:"calc(100vh - 200px)",width:"100%",options:{minimap:{enabled:!1}}},null,8,["modelValue"])])):e.createCommentVNode("",!0)}},ml=(l=0,t)=>({name:{type:"text",label:t("cms.builder.fieldLabels.name"),required:!0,placeholder:t("cms.builder.fieldPlaceholders.name"),validators:["required"]},label:{type:"text",label:t("cms.builder.fieldLabels.label"),required:!0,placeholder:t("cms.builder.fieldPlaceholders.label"),validators:["required"]},placeholder:{type:"text",label:t("cms.builder.fieldLabels.placeholder"),required:!0,placeholder:t("cms.builder.fieldPlaceholders.placeholder")},help:{type:"text",label:t("cms.builder.fieldLabels.help"),placeholder:t("cms.builder.fieldPlaceholders.help")},type:{type:"combobox",mode:"combo",label:t("cms.builder.fieldLabels.type"),required:!0,maxHeight:"300",slots:{option:'<div class="flex items-center gap-2 p-2 py-1 rounded hover:bg-gray-100" :class="{ \'bg-gray-100\': selectedNavIndex === ind, \'bg-gray-100\': modelValue == ind }" ><div :class="`flex items-center gap-2 p-1 bg-${color }-100 rounded`"><component :is="`icon-${id}`" class="block" height="24" width="30" /></div><span class="text-sm text-gray-700">{{ text }}</span></div>'},options:[{text:t("cms.builder.fieldOptions.text"),id:"text",color:"blue"},{text:t("cms.builder.fieldOptions.number"),id:"number",color:"green"},{text:t("cms.builder.fieldOptions.date"),id:"date",color:"red"},{text:t("cms.builder.fieldOptions.datetime"),id:"datetime",color:"purple"},{text:t("cms.builder.fieldOptions.file"),id:"file",color:"yellow"},{text:t("cms.builder.fieldOptions.select"),id:"select",color:"yellow"},{text:t("cms.builder.fieldOptions.multiselect"),id:"multiselect",color:"blue"},{text:t("cms.builder.fieldOptions.mediaselect"),id:"mediaselect",color:"orange"},{text:t("cms.builder.fieldOptions.radio"),id:"radio",color:"blue"},{text:t("cms.builder.fieldOptions.boolean"),id:"boolean",color:"red"},{text:t("cms.builder.fieldOptions.datalist"),id:"datalist",color:"orange"},{text:t("cms.builder.fieldOptions.image"),id:"image",color:"blue"},{text:t("cms.builder.fieldOptions.slug"),id:"slug",color:"green"},{text:t("cms.builder.fieldOptions.richtext"),id:"richtext",color:"red"},{text:t("cms.builder.fieldOptions.reference"),id:"reference",color:"yellow"},{text:t("cms.builder.fieldOptions.relation"),id:"relation",color:"pink"},{text:t("cms.builder.fieldOptions.fileList"),id:"FileList",color:"orange"},{text:t("cms.builder.fieldOptions.tags"),id:"tags",color:"blue"}].filter(a=>l>1?a.id!=="datalist":!0),validators:["required"]},subtype:{type:"combobox",mode:"combo",label:t("cms.builder.fieldLabels.subtype"),placeholder:t("cms.builder.fieldPlaceholders.subtype"),options:[{text:t("cms.builder.fieldOptions.text"),id:"text"},{text:t("cms.builder.fieldOptions.number"),id:"number"},{text:t("cms.builder.fieldOptions.date"),id:"date"},{text:t("cms.builder.fieldOptions.datetime"),id:"datetime"}],conditions:["type","==","array"]},parent:{type:"text",label:t("cms.builder.fieldLabels.parent"),placeholder:t("cms.builder.fieldPlaceholders.parent"),conditions:["type","in",["slug","select","multiselect"]]},data:{type:"text",label:t("cms.builder.fieldLabels.data"),placeholder:t("cms.builder.fieldPlaceholders.data"),conditions:["type","in",["select","multiselect"]]},options:{type:"datalist",label:t("cms.builder.fieldLabels.options"),conditions:["type","in",["select","multiselect","radio"]],colModel:[{key:"id",ua:"ID",type:"text",validators:["required"],col:6},{key:"text",ua:"Text",type:"text",validators:["required"],col:6}]},colModel:l<=1?{type:"datalist",label:t("cms.builder.fieldLabels.colModel"),conditions:["type","==","datalist"],colModel:Object.entries(ml(l+1,t)).map(([a,r])=>({key:a,...r,ua:(r==null?void 0:r.label)||(r==null?void 0:r.ua)}))}:{type:"switcher",label:t("cms.builder.fieldLabels.required"),hidden:!0,required:!0},multiple:{type:"switcher",label:t("cms.builder.fieldLabels.multiple"),conditions:["type","==","file"]},relation:{type:"combobox",data:"collection",label:t("cms.builder.fieldLabels.relation"),conditions:["type","==","relation"]},required:{type:"switcher",label:t("cms.builder.fieldLabels.required"),required:!0},localization:{type:"switcher",label:t("cms.builder.fieldLabels.localization"),conditions:["type","in",["richtext","text","reference","multiselect","datalist"]],required:!0}}),W_={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},K_={__name:"vs-builder-datatable-form",props:{modelValue:{type:Array,default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(l){const{t}=Fe();$e["vs-input-datalist"]=$e.VsInputDatatable;const a=e.useModel(l,"modelValue"),r=e.ref(!1),n=e.ref({}),o=e.ref({}),s=e.computed(()=>(o.value,ml(0,t))),i=async()=>{if(await n.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.createFieldFailed")});return}try{a.value=[...a.value,o.value],o.value={},r.value=!1}catch(u){console.log(u)}};return(c,u)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{onClick:u[0]||(u[0]=d=>r.value=!0),class:"inline-flex items-center justify-center h-10 gap-2 px-4 py-2 text-sm font-medium transition-colors border rounded-md hover hover:bg-gray-200 whitespace-nowrap ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring 0"},[e.createVNode(e.unref(rl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(c.$t("cms.common.actions.addField")),1)]),e.createVNode(e.unref(Zt),{teleport:"#modal",title:c.$t("cms.builder.createField"),size:"small",visible:r.value,"onUpdate:visible":u[4]||(u[4]=d=>r.value=d),onClose:u[5]||(u[5]=d=>r.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",W_,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:u[3]||(u[3]=d=>r.value=!1)},e.toDisplayString(c.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:i,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(c.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Xe),{modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=d=>o.value=d),schema:s.value,form:n.value,"onUpdate:form":u[2]||(u[2]=d=>n.value=d)},null,8,["modelValue","schema","form"])]),_:1},8,["title","visible"])]))}},Y_={class:"flex items-center justify-end col-span-3 gap-2"},X_={key:2,class:"w-8 h-4"},Z_={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Q_={__name:"vs-builder-datatable-controls",props:e.mergeModels({index:{type:Number,required:!0},data:{type:Object,required:!0}},{columns:{type:Array,default:()=>[]},columnsModifiers:{}}),emits:["update:columns"],setup(l){const{t}=Fe(),a=l,r=e.useModel(l,"columns"),n=e.ref(!1),o=e.ref({}),s=e.ref({...a.data||{}}),i=e.ref({});e.onMounted(()=>{a.data.required?i.value={...ml(0,t),name:{...ml(0,t).name,disabled:!0},label:{...ml(0,t).label,disabled:!0},type:{...ml(0,t).type,disabled:!0}}:i.value=ml(0,t)});const c=()=>{Ca({title:t("cms.builder.deleteTitle"),message:t("cms.builder.deleteField"),type:"error",onConfirm:()=>{u()}})},u=()=>{r.value=r.value.filter((m,f)=>f!==a.index)},d=async()=>{if(await o.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}try{r.value[a.index]=s.value,n.value=!1}catch(f){console.log(f)}};return(m,f)=>(e.openBlock(),e.createElementBlock("div",Y_,[["status"].includes(l.data.name)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,onClick:f[0]||(f[0]=p=>n.value=!0),class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground h-8 w-8 rounded-full hover:bg-gray-100"},[e.createVNode(e.unref(wl),{class:"w-4 h-4"})])),l.data.required?(e.openBlock(),e.createElementBlock("button",X_)):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:c,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 h-8 w-8 rounded-full hover:bg-red-100 text-red-600 hover:text-red-700"},[e.createVNode(e.unref(Gi),{class:"w-4 h-4"})])),e.createVNode(e.unref(Zt),{teleport:"#modal",visible:n.value,title:m.$t("cms.builder.editField"),onClose:f[4]||(f[4]=p=>n.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",Z_,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:f[3]||(f[3]=p=>n.value=!1)},e.toDisplayString(m.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:d},e.toDisplayString(m.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Xe),{modelValue:s.value,"onUpdate:modelValue":f[1]||(f[1]=p=>s.value=p),schema:i.value,form:o.value,"onUpdate:form":f[2]||(f[2]=p=>o.value=p)},null,8,["modelValue","schema","form"])]),_:1},8,["visible","title"])]))}};/**!
226
+ */const Hd="11.1.5";function qd(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(cl().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(cl().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(cl().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(cl().__INTLIFY_PROD_DEVTOOLS__=!1)}const Me={UNEXPECTED_RETURN_TYPE:Qc,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function ct(l,...t){return Cl(l,null,process.env.NODE_ENV!=="production"?{messages:Gd,args:t}:void 0)}const Gd={[Me.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Me.INVALID_ARGUMENT]:"Invalid argument",[Me.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Me.NOT_INSTALLED]:"Need to install with `app.use` function",[Me.UNEXPECTED_ERROR]:"Unexpected error",[Me.REQUIRED_VALUE]:"Required in value: {0}",[Me.INVALID_VALUE]:"Invalid value",[Me.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Me.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Me.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Me.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},_n=St("__translateVNode"),En=St("__datetimeParts"),Cn=St("__numberParts"),ul=St("__enableEmitter"),Ul=St("__disableEmitter"),Vo=St("__setPluralRules"),No=St("__injectWithOption"),Vn=St("__dispose"),At={FALLBACK_TO_ROOT:ud,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12},Wd={[At.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[At.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[At.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[At.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
227
+ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[At.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead."};function zl(l,...t){return ha(Wd[l],...t)}function Hl(l){if(!Ee(l)||kt(l))return l;for(const t in l)if(Vt(l,t))if(!t.includes("."))Ee(l[t])&&Hl(l[t]);else{const a=t.split("."),n=a.length-1;let r=l,o=!1;for(let s=0;s<n;s++){if(a[s]==="__proto__")throw new Error(`unsafe key: ${a[s]}`);if(a[s]in r||(r[a[s]]=Se()),!Ee(r[a[s]])){process.env.NODE_ENV!=="production"&&Yt(zl(At.IGNORE_OBJ_FLATTEN,{key:a[s]})),o=!0;break}r=r[a[s]]}if(o||(kt(r)?Kr.includes(a[n])||delete l[t]:(r[a[n]]=l[t],delete l[t])),!kt(r)){const s=r[a[n]];Ee(s)&&Hl(s)}}return l}function Nn(l,t){const{messages:a,__i18n:n,messageResolver:r,flatJson:o}=t,s=ke(a)?a:Pe(n)?Se():{[l]:Se()};if(Pe(n)&&n.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:c,resource:u}=i;c?(s[c]=s[c]||Se(),ba(u,s[c])):ba(u,s)}else ee(i)&&ba(JSON.parse(i),s)}),r==null&&o)for(const i in s)Vt(s,i)&&Hl(s[i]);return s}function vo(l){return l.type}function Bo(l,t,a){let n=Ee(t.messages)?t.messages:Se();"__i18nGlobal"in a&&(n=Nn(l.locale.value,{messages:n,__i18n:a.__i18nGlobal}));const r=Object.keys(n);r.length&&r.forEach(o=>{l.mergeLocaleMessage(o,n[o])});{if(Ee(t.datetimeFormats)){const o=Object.keys(t.datetimeFormats);o.length&&o.forEach(s=>{l.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(Ee(t.numberFormats)){const o=Object.keys(t.numberFormats);o.length&&o.forEach(s=>{l.mergeNumberFormat(s,t.numberFormats[s])})}}}function So(l){return e.createVNode(e.Text,null,l,0)}const Do="__INTLIFY_META__",Ao=()=>[],Kd=()=>!1;let Mo=0;function To(l){return(t,a,n,r)=>l(a,n,e.getCurrentInstance()||void 0,r)}const Yd=()=>{const l=e.getCurrentInstance();let t=null;return l&&(t=vo(l)[Do])?{[Do]:t}:null};function vn(l={}){const{__root:t,__injectWithOption:a}=l,n=t===void 0,r=l.flatJson,o=Ct?e.ref:e.shallowRef;let s=Ce(l.inheritLocale)?l.inheritLocale:!0;const i=o(t&&s?t.locale.value:ee(l.locale)?l.locale:Rl),c=o(t&&s?t.fallbackLocale.value:ee(l.fallbackLocale)||Pe(l.fallbackLocale)||ke(l.fallbackLocale)||l.fallbackLocale===!1?l.fallbackLocale:i.value),u=o(Nn(i.value,l)),d=o(ke(l.datetimeFormats)?l.datetimeFormats:{[i.value]:{}}),m=o(ke(l.numberFormats)?l.numberFormats:{[i.value]:{}});let h=t?t.missingWarn:Ce(l.missingWarn)||El(l.missingWarn)?l.missingWarn:!0,f=t?t.fallbackWarn:Ce(l.fallbackWarn)||El(l.fallbackWarn)?l.fallbackWarn:!0,y=t?t.fallbackRoot:Ce(l.fallbackRoot)?l.fallbackRoot:!0,k=!!l.fallbackFormat,g=De(l.missing)?l.missing:null,p=De(l.missing)?To(l.missing):null,x=De(l.postTranslation)?l.postTranslation:null,w=t?t.warnHtmlMessage:Ce(l.warnHtmlMessage)?l.warnHtmlMessage:!0,b=!!l.escapeParameter;const _=t?t.modifiers:ke(l.modifiers)?l.modifiers:{};let V=l.pluralRules||t&&t.pluralRules,E;E=(()=>{n&&oo(null);const R={version:Hd,locale:i.value,fallbackLocale:c.value,messages:u.value,modifiers:_,pluralRules:V,missing:p===null?void 0:p,missingWarn:h,fallbackWarn:f,fallbackFormat:k,unresolving:!0,postTranslation:x===null?void 0:x,warnHtmlMessage:w,escapeParameter:b,messageResolver:l.messageResolver,messageCompiler:l.messageCompiler,__meta:{framework:"vue"}};R.datetimeFormats=d.value,R.numberFormats=m.value,R.__datetimeFormatters=ke(E)?E.__datetimeFormatters:void 0,R.__numberFormatters=ke(E)?E.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(R.__v_emitter=ke(E)?E.__v_emitter:void 0);const G=wd(R);return n&&oo(G),G})(),jl(E,i.value,c.value);function D(){return[i.value,c.value,u.value,d.value,m.value]}const A=e.computed({get:()=>i.value,set:R=>{E.locale=R,i.value=R}}),$=e.computed({get:()=>c.value,set:R=>{E.fallbackLocale=R,c.value=R,jl(E,i.value,R)}}),U=e.computed(()=>u.value),W=e.computed(()=>d.value),O=e.computed(()=>m.value);function I(){return De(x)?x:null}function F(R){x=R,E.postTranslation=R}function T(){return g}function z(R){R!==null&&(p=To(R)),g=R,E.missing=p}function Q(R,G){return R!=="translate"||!G.resolvedMessage}const me=(R,G,be,Be,C,S)=>{D();let H;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(E.fallbackContext=t?xd():void 0),H=R(E)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(E.fallbackContext=void 0)}if(be!=="translate exists"&&ze(H)&&H===wa||be==="translate exists"&&!H){const[K,J]=G();if(process.env.NODE_ENV!=="production"&&t&&ee(K)&&Q(be,J)&&(y&&(Ea(f,K)||io(h,K))&&Yt(zl(At.FALLBACK_TO_ROOT,{key:K,type:be})),process.env.NODE_ENV!=="production")){const{__v_emitter:B}=E;B&&y&&B.emit("fallback",{type:be,key:K,to:"global",groupId:`${be}:${K}`})}return t&&y?Be(t):C(K)}else{if(S(H))return H;throw ct(Me.UNEXPECTED_RETURN_TYPE)}};function Ne(...R){return me(G=>Reflect.apply(wo,null,[G,...R]),()=>xn(...R),"translate",G=>Reflect.apply(G.t,G,[...R]),G=>G,G=>ee(G))}function Ke(...R){const[G,be,Be]=R;if(Be&&!Ee(Be))throw ct(Me.INVALID_ARGUMENT);return Ne(G,be,Ge({resolvedMessage:!0},Be||{}))}function Wt(...R){return me(G=>Reflect.apply(po,null,[G,...R]),()=>bn(...R),"datetime format",G=>Reflect.apply(G.d,G,[...R]),()=>_a,G=>ee(G)||Pe(G))}function Re(...R){return me(G=>Reflect.apply(go,null,[G,...R]),()=>kn(...R),"number format",G=>Reflect.apply(G.n,G,[...R]),()=>_a,G=>ee(G)||Pe(G))}function Ye(R){return R.map(G=>ee(G)||ze(G)||Ce(G)?So(String(G)):G)}const bt={normalize:Ye,interpolate:R=>R,type:"vnode"};function Et(...R){return me(G=>{let be;const Be=G;try{Be.processor=bt,be=Reflect.apply(wo,null,[Be,...R])}finally{Be.processor=null}return be},()=>xn(...R),"translate",G=>G[_n](...R),G=>[So(G)],G=>Pe(G))}function Pt(...R){return me(G=>Reflect.apply(go,null,[G,...R]),()=>kn(...R),"number format",G=>G[Cn](...R),Ao,G=>ee(G)||Pe(G))}function at(...R){return me(G=>Reflect.apply(po,null,[G,...R]),()=>bn(...R),"datetime format",G=>G[En](...R),Ao,G=>ee(G)||Pe(G))}function st(R){V=R,E.pluralRules=V}function j(R,G){return me(()=>{if(!R)return!1;const be=ee(G)?G:i.value,Be=ae(be),C=E.messageResolver(Be,R);return kt(C)||xt(C)||ee(C)},()=>[R],"translate exists",be=>Reflect.apply(be.te,be,[R,G]),Kd,be=>Ce(be))}function X(R){let G=null;const be=Zr(E,c.value,i.value);for(let Be=0;Be<be.length;Be++){const C=u.value[be[Be]]||{},S=E.messageResolver(C,R);if(S!=null){G=S;break}}return G}function le(R){const G=X(R);return G??(t?t.tm(R)||{}:{})}function ae(R){return u.value[R]||{}}function de(R,G){if(r){const be={[R]:G};for(const Be in be)Vt(be,Be)&&Hl(be[Be]);G=be[R]}u.value[R]=G,E.messages=u.value}function Ae(R,G){u.value[R]=u.value[R]||{};const be={[R]:G};if(r)for(const Be in be)Vt(be,Be)&&Hl(be[Be]);G=be[R],ba(G,u.value[R]),E.messages=u.value}function N(R){return d.value[R]||{}}function v(R,G){d.value[R]=G,E.datetimeFormats=d.value,ho(E,R,G)}function q(R,G){d.value[R]=Ge(d.value[R]||{},G),E.datetimeFormats=d.value,ho(E,R,G)}function ne(R){return m.value[R]||{}}function Te(R,G){m.value[R]=G,E.numberFormats=m.value,bo(E,R,G)}function Le(R,G){m.value[R]=Ge(m.value[R]||{},G),E.numberFormats=m.value,bo(E,R,G)}Mo++,t&&Ct&&(e.watch(t.locale,R=>{s&&(i.value=R,E.locale=R,jl(E,i.value,c.value))}),e.watch(t.fallbackLocale,R=>{s&&(c.value=R,E.fallbackLocale=R,jl(E,i.value,c.value))}));const ye={id:Mo,locale:A,fallbackLocale:$,get inheritLocale(){return s},set inheritLocale(R){s=R,R&&t&&(i.value=t.locale.value,c.value=t.fallbackLocale.value,jl(E,i.value,c.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:U,get modifiers(){return _},get pluralRules(){return V||{}},get isGlobal(){return n},get missingWarn(){return h},set missingWarn(R){h=R,E.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(R){f=R,E.fallbackWarn=f},get fallbackRoot(){return y},set fallbackRoot(R){y=R},get fallbackFormat(){return k},set fallbackFormat(R){k=R,E.fallbackFormat=k},get warnHtmlMessage(){return w},set warnHtmlMessage(R){w=R,E.warnHtmlMessage=R},get escapeParameter(){return b},set escapeParameter(R){b=R,E.escapeParameter=R},t:Ne,getLocaleMessage:ae,setLocaleMessage:de,mergeLocaleMessage:Ae,getPostTranslationHandler:I,setPostTranslationHandler:F,getMissingHandler:T,setMissingHandler:z,[Vo]:st};return ye.datetimeFormats=W,ye.numberFormats=O,ye.rt=Ke,ye.te=j,ye.tm=le,ye.d=Wt,ye.n=Re,ye.getDateTimeFormat=N,ye.setDateTimeFormat=v,ye.mergeDateTimeFormat=q,ye.getNumberFormat=ne,ye.setNumberFormat=Te,ye.mergeNumberFormat=Le,ye[No]=a,ye[_n]=Et,ye[En]=at,ye[Cn]=Pt,process.env.NODE_ENV!=="production"&&(ye[ul]=R=>{E.__v_emitter=R},ye[Ul]=()=>{E.__v_emitter=void 0}),ye}const Lo="vue-i18n: composer properties",Bn={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},Xd={"vue-i18n-resource-inspector":"Search for scopes ..."},Zd={"vue-i18n-timeline":16764185};let Sn;async function Qd(l,t){return new Promise((a,n)=>{try{zd({id:"vue-devtools-plugin-vue-i18n",label:Bn["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[Lo],app:l},r=>{Sn=r,r.on.visitComponentTree(({componentInstance:s,treeNode:i})=>{Jd(s,i,t)}),r.on.inspectComponent(({componentInstance:s,instanceData:i})=>{s.vnode.el&&s.vnode.el.__VUE_I18N__&&i&&(t.mode==="legacy"?s.vnode.el.__VUE_I18N__!==t.global.__composer&&Fo(i,s.vnode.el.__VUE_I18N__):Fo(i,s.vnode.el.__VUE_I18N__))}),r.addInspector({id:"vue-i18n-resource-inspector",label:Bn["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Xd["vue-i18n-resource-inspector"]}),r.on.getInspectorTree(s=>{s.app===l&&s.inspectorId==="vue-i18n-resource-inspector"&&nu(s,t)});const o=new Map;r.on.getInspectorState(async s=>{if(s.app===l&&s.inspectorId==="vue-i18n-resource-inspector")if(r.unhighlightElement(),ou(s,t),s.nodeId==="global"){if(!o.has(s.app)){const[i]=await r.getComponentInstances(s.app);o.set(s.app,i)}r.highlightElement(o.get(s.app))}else{const i=ru(s.nodeId,t);i&&r.highlightElement(i)}}),r.on.editInspectorState(s=>{s.app===l&&s.inspectorId==="vue-i18n-resource-inspector"&&iu(s,t)}),r.addTimelineLayer({id:"vue-i18n-timeline",label:Bn["vue-i18n-timeline"],color:Zd["vue-i18n-timeline"]}),a(!0)})}catch(r){console.error(r),n(!1)}})}function $o(l){return l.type.name||l.type.displayName||l.type.__file||"Anonymous"}function Jd(l,t,a){const n=a.mode==="composition"?a.global:a.global.__composer;if(l&&l.vnode.el&&l.vnode.el.__VUE_I18N__&&l.vnode.el.__VUE_I18N__!==n){const r={label:`i18n (${$o(l)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(r)}}function Fo(l,t){const a=Lo;l.state.push({type:a,key:"locale",editable:!0,value:t.locale.value}),l.state.push({type:a,key:"availableLocales",editable:!1,value:t.availableLocales}),l.state.push({type:a,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),l.state.push({type:a,key:"inheritLocale",editable:!0,value:t.inheritLocale}),l.state.push({type:a,key:"messages",editable:!1,value:Dn(t.messages.value)}),l.state.push({type:a,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),l.state.push({type:a,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function Dn(l){const t={};return Object.keys(l).forEach(a=>{const n=l[a];De(n)&&"source"in n?t[a]=au(n):kt(n)&&n.loc&&n.loc.source?t[a]=n.loc.source:Ee(n)?t[a]=Dn(n):t[a]=n}),t}const eu={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function tu(l){return l.replace(/[<>"&]/g,lu)}function lu(l){return eu[l]||l}function au(l){return{_custom:{type:"function",display:`<span>ƒ</span> ${l.source?`("${tu(l.source)}")`:"(?)"}`}}}function nu(l,t){l.rootNodes.push({id:"global",label:"Global Scope"});const a=t.mode==="composition"?t.global:t.global.__composer;for(const[n,r]of t.__instances){const o=t.mode==="composition"?r:r.__composer;a!==o&&l.rootNodes.push({id:o.id.toString(),label:`${$o(n)} Scope`})}}function ru(l,t){let a=null;if(l!=="global"){for(const[n,r]of t.__instances.entries())if(r.id.toString()===l){a=n;break}}return a}function Io(l,t){if(l==="global")return t.mode==="composition"?t.global:t.global.__composer;{const a=Array.from(t.__instances.values()).find(n=>n.id.toString()===l);return a?t.mode==="composition"?a:a.__composer:null}}function ou(l,t){const a=Io(l.nodeId,t);return a&&(l.state=su(a)),null}function su(l){const t={},a="Locale related info",n=[{type:a,key:"locale",editable:!0,value:l.locale.value},{type:a,key:"fallbackLocale",editable:!0,value:l.fallbackLocale.value},{type:a,key:"availableLocales",editable:!1,value:l.availableLocales},{type:a,key:"inheritLocale",editable:!0,value:l.inheritLocale}];t[a]=n;const r="Locale messages info",o=[{type:r,key:"messages",editable:!1,value:Dn(l.messages.value)}];t[r]=o;{const s="Datetime formats info",i=[{type:s,key:"datetimeFormats",editable:!1,value:l.datetimeFormats.value}];t[s]=i;const c="Datetime formats info",u=[{type:c,key:"numberFormats",editable:!1,value:l.numberFormats.value}];t[c]=u}return t}function ql(l,t){if(Sn){let a;t&&"groupId"in t&&(a=t.groupId,delete t.groupId),Sn.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:l,groupId:a,time:Date.now(),meta:{},data:t||{},logType:l==="compile-error"?"error":l==="fallback"||l==="missing"?"warning":"default"}})}}function iu(l,t){const a=Io(l.nodeId,t);if(a){const[n]=l.path;n==="locale"&&ee(l.state.value)?a.locale.value=l.state.value:n==="fallbackLocale"&&(ee(l.state.value)||Pe(l.state.value)||Ee(l.state.value))?a.fallbackLocale.value=l.state.value:n==="inheritLocale"&&Ce(l.state.value)&&(a.inheritLocale=l.state.value)}}function cu(l){const t=ee(l.locale)?l.locale:Rl,a=ee(l.fallbackLocale)||Pe(l.fallbackLocale)||ke(l.fallbackLocale)||l.fallbackLocale===!1?l.fallbackLocale:t,n=De(l.missing)?l.missing:void 0,r=Ce(l.silentTranslationWarn)||El(l.silentTranslationWarn)?!l.silentTranslationWarn:!0,o=Ce(l.silentFallbackWarn)||El(l.silentFallbackWarn)?!l.silentFallbackWarn:!0,s=Ce(l.fallbackRoot)?l.fallbackRoot:!0,i=!!l.formatFallbackMessages,c=ke(l.modifiers)?l.modifiers:{},u=l.pluralizationRules,d=De(l.postTranslation)?l.postTranslation:void 0,m=ee(l.warnHtmlInMessage)?l.warnHtmlInMessage!=="off":!0,h=!!l.escapeParameterHtml,f=Ce(l.sync)?l.sync:!0;let y=l.messages;if(ke(l.sharedMessages)){const _=l.sharedMessages;y=Object.keys(_).reduce((E,M)=>{const D=E[M]||(E[M]={});return Ge(D,_[M]),E},y||{})}const{__i18n:k,__root:g,__injectWithOption:p}=l,x=l.datetimeFormats,w=l.numberFormats,b=l.flatJson;return{locale:t,fallbackLocale:a,messages:y,flatJson:b,datetimeFormats:x,numberFormats:w,missing:n,missingWarn:r,fallbackWarn:o,fallbackRoot:s,fallbackFormat:i,modifiers:c,pluralRules:u,postTranslation:d,warnHtmlMessage:m,escapeParameter:h,messageResolver:l.messageResolver,inheritLocale:f,__i18n:k,__root:g,__injectWithOption:p}}function An(l={}){const t=vn(cu(l)),{__extender:a}=l,n={id:t.id,get locale(){return t.locale.value},set locale(r){t.locale.value=r},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(r){t.fallbackLocale.value=r},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(r){t.setMissingHandler(r)},get silentTranslationWarn(){return Ce(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(r){t.missingWarn=Ce(r)?!r:r},get silentFallbackWarn(){return Ce(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(r){t.fallbackWarn=Ce(r)?!r:r},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(r){t.fallbackFormat=r},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(r){t.setPostTranslationHandler(r)},get sync(){return t.inheritLocale},set sync(r){t.inheritLocale=r},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){t.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(r){t.escapeParameter=r},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...r){return Reflect.apply(t.t,t,[...r])},rt(...r){return Reflect.apply(t.rt,t,[...r])},te(r,o){return t.te(r,o)},tm(r){return t.tm(r)},getLocaleMessage(r){return t.getLocaleMessage(r)},setLocaleMessage(r,o){t.setLocaleMessage(r,o)},mergeLocaleMessage(r,o){t.mergeLocaleMessage(r,o)},d(...r){return Reflect.apply(t.d,t,[...r])},getDateTimeFormat(r){return t.getDateTimeFormat(r)},setDateTimeFormat(r,o){t.setDateTimeFormat(r,o)},mergeDateTimeFormat(r,o){t.mergeDateTimeFormat(r,o)},n(...r){return Reflect.apply(t.n,t,[...r])},getNumberFormat(r){return t.getNumberFormat(r)},setNumberFormat(r,o){t.setNumberFormat(r,o)},mergeNumberFormat(r,o){t.mergeNumberFormat(r,o)}};return n.__extender=a,process.env.NODE_ENV!=="production"&&(n.__enableEmitter=r=>{const o=t;o[ul]&&o[ul](r)},n.__disableEmitter=()=>{const r=t;r[Ul]&&r[Ul]()}),n}function du(l,t,a){return{beforeCreate(){const n=e.getCurrentInstance();if(!n)throw ct(Me.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const o=r.i18n;if(r.__i18n&&(o.__i18n=r.__i18n),o.__root=t,this===this.$root)this.$i18n=Oo(l,o);else{o.__injectWithOption=!0,o.__extender=a.__vueI18nExtend,this.$i18n=An(o);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=Oo(l,r);else{this.$i18n=An({__i18n:r.__i18n,__injectWithOption:!0,__extender:a.__vueI18nExtend,__root:t});const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}else this.$i18n=l;r.__i18nGlobal&&Bo(t,r,r),this.$t=(...o)=>this.$i18n.t(...o),this.$rt=(...o)=>this.$i18n.rt(...o),this.$te=(o,s)=>this.$i18n.te(o,s),this.$d=(...o)=>this.$i18n.d(...o),this.$n=(...o)=>this.$i18n.n(...o),this.$tm=o=>this.$i18n.tm(o),a.__setInstance(n,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const n=this.$i18n;this.$el.__VUE_I18N__=n.__composer;const r=this.__v_emitter=sn();n.__enableEmitter&&n.__enableEmitter(r),r.on("*",ql)}},unmounted(){const n=e.getCurrentInstance();if(!n)throw ct(Me.UNEXPECTED_ERROR);const r=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",ql),delete this.__v_emitter),this.$i18n&&(r.__disableEmitter&&r.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),a.__deleteInstance(n),delete this.$i18n}}}function Oo(l,t){l.locale=t.locale||l.locale,l.fallbackLocale=t.fallbackLocale||l.fallbackLocale,l.missing=t.missing||l.missing,l.silentTranslationWarn=t.silentTranslationWarn||l.silentFallbackWarn,l.silentFallbackWarn=t.silentFallbackWarn||l.silentFallbackWarn,l.formatFallbackMessages=t.formatFallbackMessages||l.formatFallbackMessages,l.postTranslation=t.postTranslation||l.postTranslation,l.warnHtmlInMessage=t.warnHtmlInMessage||l.warnHtmlInMessage,l.escapeParameterHtml=t.escapeParameterHtml||l.escapeParameterHtml,l.sync=t.sync||l.sync,l.__composer[Vo](t.pluralizationRules||l.pluralizationRules);const a=Nn(l.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(a).forEach(n=>l.mergeLocaleMessage(n,a[n])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>l.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>l.mergeNumberFormat(n,t.numberFormats[n])),l}const Mn={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:l=>l==="parent"||l==="global",default:"parent"},i18n:{type:Object}};function uu({slots:l},t){return t.length===1&&t[0]==="default"?(l.default?l.default():[]).reduce((n,r)=>[...n,...r.type===e.Fragment?r.children:[r]],[]):t.reduce((a,n)=>{const r=l[n];return r&&(a[n]=r()),a},Se())}function Po(){return e.Fragment}const Ro=e.defineComponent({name:"i18n-t",props:Ge({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:l=>ze(l)||!isNaN(l)}},Mn),setup(l,t){const{slots:a,attrs:n}=t,r=l.i18n||Fe({useScope:l.scope,__useComponent:!0});return()=>{const o=Object.keys(a).filter(m=>m[0]!=="_"),s=Se();l.locale&&(s.locale=l.locale),l.plural!==void 0&&(s.plural=ee(l.plural)?+l.plural:l.plural);const i=uu(t,o),c=r[_n](l.keypath,i,s),u=Ge(Se(),n),d=ee(l.tag)||Ee(l.tag)?l.tag:Po();return e.h(d,u,c)}}});function mu(l){return Pe(l)&&!ee(l[0])}function jo(l,t,a,n){const{slots:r,attrs:o}=t;return()=>{const s={part:!0};let i=Se();l.locale&&(s.locale=l.locale),ee(l.format)?s.key=l.format:Ee(l.format)&&(ee(l.format.key)&&(s.key=l.format.key),i=Object.keys(l.format).reduce((h,f)=>a.includes(f)?Ge(Se(),h,{[f]:l.format[f]}):h,Se()));const c=n(l.value,s,i);let u=[s.key];Pe(c)?u=c.map((h,f)=>{const y=r[h.type],k=y?y({[h.type]:h.value,index:f,parts:c}):[h.value];return mu(k)&&(k[0].key=`${h.type}-${f}`),k}):ee(c)&&(u=[c]);const d=Ge(Se(),o),m=ee(l.tag)||Ee(l.tag)?l.tag:Po();return e.h(m,d,u)}}const Uo=e.defineComponent({name:"i18n-n",props:Ge({value:{type:Number,required:!0},format:{type:[String,Object]}},Mn),setup(l,t){const a=l.i18n||Fe({useScope:l.scope,__useComponent:!0});return jo(l,t,yo,(...n)=>a[Cn](...n))}});function pu(l,t){const a=l;if(l.mode==="composition")return a.__getInstance(t)||l.global;{const n=a.__getInstance(t);return n!=null?n.__composer:l.global.__composer}}function fu(l){const t=s=>{process.env.NODE_ENV!=="production"&&on(zl(At.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:i,value:c}=s;if(!i||!i.$)throw ct(Me.UNEXPECTED_ERROR);const u=pu(l,i.$),d=zo(c);return[Reflect.apply(u.t,u,[...Ho(d)]),u]};return{created:(s,i)=>{const[c,u]=t(i);Ct&&l.global===u&&(s.__i18nWatcher=e.watch(u.locale,()=>{i.instance&&i.instance.$forceUpdate()})),s.__composer=u,s.textContent=c},unmounted:s=>{Ct&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:i})=>{if(s.__composer){const c=s.__composer,u=zo(i);s.textContent=Reflect.apply(c.t,c,[...Ho(u)])}},getSSRProps:s=>{const[i]=t(s);return{textContent:i}}}}function zo(l){if(ee(l))return{path:l};if(ke(l)){if(!("path"in l))throw ct(Me.REQUIRED_VALUE,"path");return l}else throw ct(Me.INVALID_VALUE)}function Ho(l){const{path:t,locale:a,args:n,choice:r,plural:o}=l,s={},i=n||{};return ee(a)&&(s.locale=a),ze(r)&&(s.plural=r),ze(o)&&(s.plural=o),[t,i,s]}function hu(l,t,...a){const n=ke(a[0])?a[0]:{};(Ce(n.globalInstall)?n.globalInstall:!0)&&([Ro.name,"I18nT"].forEach(o=>l.component(o,Ro)),[Uo.name,"I18nN"].forEach(o=>l.component(o,Uo)),[Go.name,"I18nD"].forEach(o=>l.component(o,Go))),l.directive("t",fu(t))}const gu=St("global-vue-i18n");function yu(l={}){const t=__VUE_I18N_LEGACY_API__&&Ce(l.legacy)?l.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&t&&on(zl(At.DEPRECATE_LEGACY_MODE));const a=Ce(l.globalInjection)?l.globalInjection:!0,n=new Map,[r,o]=bu(l,t),s=St(process.env.NODE_ENV!=="production"?"vue-i18n":"");function i(m){return n.get(m)||null}function c(m,h){n.set(m,h)}function u(m){n.delete(m)}const d={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(m,...h){if(process.env.NODE_ENV!=="production"&&(m.__VUE_I18N__=d),m.__VUE_I18N_SYMBOL__=s,m.provide(m.__VUE_I18N_SYMBOL__,d),ke(h[0])){const k=h[0];d.__composerExtend=k.__composerExtend,d.__vueI18nExtend=k.__vueI18nExtend}let f=null;!t&&a&&(f=Nu(m,d.global)),__VUE_I18N_FULL_INSTALL__&&hu(m,d,...h),__VUE_I18N_LEGACY_API__&&t&&m.mixin(du(o,o.__composer,d));const y=m.unmount;if(m.unmount=()=>{f&&f(),d.dispose(),y()},process.env.NODE_ENV!=="production"){if(!await Qd(m,d))throw ct(Me.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const g=sn();if(t){const p=o;p.__enableEmitter&&p.__enableEmitter(g)}else{const p=o;p[ul]&&p[ul](g)}g.on("*",ql)}},get global(){return o},dispose(){r.stop()},__instances:n,__getInstance:i,__setInstance:c,__deleteInstance:u};return d}function Fe(l={}){const t=e.getCurrentInstance();if(t==null)throw ct(Me.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ct(Me.NOT_INSTALLED);const a=ku(t),n=wu(a),r=vo(t),o=xu(l,r);if(o==="global")return Bo(n,l,r),n;if(o==="parent"){let c=_u(a,t,l.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&Yt(zl(At.NOT_FOUND_PARENT_SCOPE)),c=n),c}const s=a;let i=s.__getInstance(t);if(i==null){const c=Ge({},l);"__i18n"in r&&(c.__i18n=r.__i18n),n&&(c.__root=n),i=vn(c),s.__composerExtend&&(i[Vn]=s.__composerExtend(i)),Cu(s,t,i),s.__setInstance(t,i)}return i}function bu(l,t){const a=e.effectScope(),n=__VUE_I18N_LEGACY_API__&&t?a.run(()=>An(l)):a.run(()=>vn(l));if(n==null)throw ct(Me.UNEXPECTED_ERROR);return[a,n]}function ku(l){const t=e.inject(l.isCE?gu:l.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ct(l.isCE?Me.NOT_INSTALLED_WITH_PROVIDE:Me.UNEXPECTED_ERROR);return t}function xu(l,t){return ga(l)?"__i18n"in t?"local":"global":l.useScope?l.useScope:"local"}function wu(l){return l.mode==="composition"?l.global:l.global.__composer}function _u(l,t,a=!1){let n=null;const r=t.root;let o=Eu(t,a);for(;o!=null;){const s=l;if(l.mode==="composition")n=s.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const i=s.__getInstance(o);i!=null&&(n=i.__composer,a&&n&&!n[No]&&(n=null))}if(n!=null||r===o)break;o=o.parent}return n}function Eu(l,t=!1){return l==null?null:t&&l.vnode.ctx||l.parent}function Cu(l,t,a){let n=null;e.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&t.vnode.el){t.vnode.el.__VUE_I18N__=a,n=sn();const r=a;r[ul]&&r[ul](n),n.on("*",ql)}},t),e.onUnmounted(()=>{const r=a;process.env.NODE_ENV!=="production"&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&(n&&n.off("*",ql),r[Ul]&&r[Ul](),delete t.vnode.el.__VUE_I18N__),l.__deleteInstance(t);const o=r[Vn];o&&(o(),delete r[Vn])},t)}const Vu=["locale","fallbackLocale","availableLocales"],qo=["t","rt","d","n","tm","te"];function Nu(l,t){const a=Object.create(null);return Vu.forEach(r=>{const o=Object.getOwnPropertyDescriptor(t,r);if(!o)throw ct(Me.UNEXPECTED_ERROR);const s=e.isRef(o.value)?{get(){return o.value.value},set(i){o.value.value=i}}:{get(){return o.get&&o.get()}};Object.defineProperty(a,r,s)}),l.config.globalProperties.$i18n=a,qo.forEach(r=>{const o=Object.getOwnPropertyDescriptor(t,r);if(!o||!o.value)throw ct(Me.UNEXPECTED_ERROR);Object.defineProperty(l.config.globalProperties,`$${r}`,o)}),()=>{delete l.config.globalProperties.$i18n,qo.forEach(r=>{delete l.config.globalProperties[`$${r}`]})}}const Go=e.defineComponent({name:"i18n-d",props:Ge({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Mn),setup(l,t){const a=l.i18n||Fe({useScope:l.scope,__useComponent:!0});return jo(l,t,fo,(...n)=>a[En](...n))}});if(qd(),hd(Wc),gd(dd),yd(Zr),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const l=cl();l.__INTLIFY__=!0,Kc(l.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const vu={class:"flex items-center justify-between"},Bu={class:"flex items-center gap-2"},Su={class:"text-4xl font-bold text-slate-800 dark:text-slate-100 mb-2"},Du=["href","title"],Au={class:"text-lg text-slate-600 dark:text-slate-300"},Mu=e.defineComponent({__name:"DashboardHeader",setup(l){const{locale:t}=Fe();return(a,n)=>{const r=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",vu,[e.createElementVNode("div",null,[e.createElementVNode("div",Bu,[e.createElementVNode("h1",Su,e.toDisplayString(a.$t("cms.dashboard.title")),1),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(t)}/get-started/app-overview`,target:"_blank",title:a.$t("cms.guide.appOverview")},[e.createVNode(e.unref(xl),{class:"w-5 h-5"})],8,Du)]),e.createElementVNode("div",Au,e.toDisplayString(a.$t("cms.dashboard.description")),1)]),e.createElementVNode("div",null,[e.createVNode(r,{to:"/settings/collections",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white"},{default:e.withCtx(()=>[e.createVNode(e.unref(sl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(a.$t("cms.dashboard.newCollection")),1)]),_:1})])])}}}),Tu={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-300 transform hover:scale-105"},Lu={class:"p-6"},$u={class:"flex items-start justify-between"},Fu={class:"flex-1"},Iu={class:"flex items-center space-x-2 mb-2"},Ou={class:"text-sm font-medium text-slate-600 dark:text-slate-400"},Pu={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-1"},Ru={class:"text-xs text-slate-500 dark:text-slate-400 mb-3"},ju=e.defineComponent({__name:"StatCard",props:{stat:{}},setup(l){const t=a=>({"file-text":Il,users:an,image:ma,eye:en})[a]||Il;return(a,n)=>(e.openBlock(),e.createElementBlock("div",Tu,[e.createElementVNode("div",Lu,[e.createElementVNode("div",$u,[e.createElementVNode("div",Fu,[e.createElementVNode("div",Iu,[e.createElementVNode("div",{class:e.normalizeClass(`p-2 rounded-lg bg-${l.stat.color}-50 dark:bg-${l.stat.color}-900/20`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t(l.stat.icon)),{class:e.normalizeClass(`w-5 h-5 text-${l.stat.color}-600`)},null,8,["class"]))],2),e.createElementVNode("p",Ou,e.toDisplayString(l.stat.title),1)]),e.createElementVNode("p",Pu,e.toDisplayString(l.stat.value),1),e.createElementVNode("p",Ru,e.toDisplayString(l.stat.description),1)])])])]))}}),Uu={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6"},zu=e.defineComponent({__name:"StatsGrid",props:{stats:{}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",Uu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.stats,n=>(e.openBlock(),e.createBlock(ju,{key:n.id,stat:n},null,8,["stat"]))),128))]))}}),Hu={class:"p-4 hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors"},qu={class:"flex items-center justify-between"},Gu={class:"flex-1"},Wu={class:"flex items-center space-x-3 mb-2"},Ku={class:"inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 text-xs bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-600 dark:text-slate-300"},Yu={class:"font-semibold text-slate-800 dark:text-slate-100 mb-1"},Xu={class:"flex items-center space-x-4 text-sm text-slate-500 dark:text-slate-400"},Zu={class:"flex items-center"},Qu={class:"flex items-center"},Ju={class:"flex items-center"},em={class:"flex items-center space-x-2"},tm=e.defineComponent({__name:"ContentItem",props:{item:{}},setup(l){const t=n=>{const r={published:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300",draft:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-300",review:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-300"};return r[n]||r.draft},a=n=>{if(!n)return"--.--.--";const r=new Date(n);return new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric"}).format(r)};return(n,r)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",Hu,[e.createElementVNode("div",qu,[e.createElementVNode("div",Gu,[e.createElementVNode("div",Wu,[e.createElementVNode("div",Ku,e.toDisplayString(l.item.type),1),e.createElementVNode("div",{class:e.normalizeClass(t(l.item.status))},e.toDisplayString(l.item.status||"--"),3)]),e.createElementVNode("h3",Yu,e.toDisplayString(l.item.title||"--"),1),e.createElementVNode("div",Xu,[e.createElementVNode("span",Zu,[e.createVNode(e.unref(an),{class:"w-4 h-4 mr-1"}),e.createTextVNode(" "+e.toDisplayString(l.item.author||"--"),1)]),e.createElementVNode("span",Qu,[e.createVNode(e.unref(ua),{class:"w-4 h-4 mr-1"}),e.createTextVNode(" "+e.toDisplayString(a(l.item.updated_at)||"--.--.--"),1)]),e.createElementVNode("span",Ju,[e.createVNode(e.unref(en),{class:"w-4 h-4 mr-1"}),e.createTextVNode(" "+e.toDisplayString(l.item.views||"--")+" "+e.toDisplayString(n.$t("cms.dashboard.views")),1)])])]),e.createElementVNode("div",em,[e.createVNode(o,{to:`/collections/${l.item.object_id}/${l.item.content_id}`,class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 hover:text-accent-foreground hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600"},{default:e.withCtx(()=>[e.createVNode(e.unref(_l),{class:"w-4 h-4 dark:text-blue-50"})]),_:1},8,["to"])])])])}}}),lm={class:"lg:col-span-2"},am={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm"},nm={class:"flex flex-col space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},rm={class:"flex items-center justify-between"},om={class:"tracking-tight text-xl font-semibold text-slate-800 dark:text-slate-100 flex items-center"},sm={class:"p-0"},im={class:"divide-y divide-slate-100 dark:divide-slate-700"},cm=e.defineComponent({__name:"RecentContent",props:{content:{}},setup(l){const t=nt.useRouter(),a=n=>{t.push(n)};return(n,r)=>(e.openBlock(),e.createElementBlock("div",lm,[e.createElementVNode("div",am,[e.createElementVNode("div",nm,[e.createElementVNode("div",rm,[e.createElementVNode("h3",om,[e.createVNode(e.unref(Pi),{class:"w-5 h-5 mr-2"}),e.createTextVNode(" "+e.toDisplayString(n.$t("cms.dashboard.recentContent")),1)]),e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>a("/settings/collections")),class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border shadow-sm hover:text-accent-foreground h-8 rounded-md px-3 text-xs bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600"},e.toDisplayString(n.$t("cms.dashboard.viewAll")),1)])]),e.createElementVNode("div",sm,[e.createElementVNode("div",im,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.content,o=>(e.openBlock(),e.createBlock(tm,{key:o.id,item:o},null,8,["item"]))),128))])])])]))}}),dm={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm"},um={class:"flex flex-col space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},mm={class:"tracking-tight text-lg font-semibold text-slate-800 dark:text-slate-100 flex items-center"},pm={class:"p-4"},fm={class:"grid grid-cols-2 gap-3"},hm=["onClick"],gm={class:"p-2 rounded-lg bg-blue-50 dark:bg-blue-900/20 mb-2 w-fit"},ym={class:"font-medium text-slate-800 dark:text-slate-100 text-sm mb-1 group-hover:text-slate-900 dark:group-hover:text-slate-50"},bm={class:"text-xs text-slate-500 dark:text-slate-400 group-hover:text-slate-600 dark:group-hover:text-slate-300"},km=e.defineComponent({__name:"QuickActions",setup(l){const t=nt.useRouter(),{t:a}=Fe(),n=[{id:"create-article",title:a("cms.dashboard.createArticle"),description:a("cms.dashboard.createArticleDescription"),icon:Il,iconColor:"text-blue-500",link:"/collections/pages/create"},{id:"upload-media",title:a("cms.dashboard.uploadMedia"),description:a("cms.dashboard.uploadMediaDescription"),icon:ma,iconColor:"text-purple-500",link:"/media"},{id:"manage-users",title:a("cms.dashboard.manageUsers"),description:a("cms.dashboard.manageUsersDescription"),icon:an,iconColor:"text-green-500",link:"/settings/users"}],r=o=>{o&&t.push(o)};return(o,s)=>(e.openBlock(),e.createElementBlock("div",dm,[e.createElementVNode("div",um,[e.createElementVNode("h3",mm,[e.createVNode(e.unref(Xi),{class:"w-5 h-5 mr-2"}),e.createTextVNode(" "+e.toDisplayString(o.$t("cms.dashboard.quickActions")),1)])]),e.createElementVNode("div",pm,[e.createElementVNode("div",fm,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(n,i=>e.createElementVNode("button",{key:i.id,class:"p-3 rounded-lg border border-slate-200 transition-all duration-200 text-left group hover:bg-slate-50 hover:shadow-md dark:border-slate-600 bg-white dark:bg-slate-700 dark:hover:bg-slate-600",onClick:c=>r(i==null?void 0:i.link)},[e.createElementVNode("div",gm,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i==null?void 0:i.icon),{class:e.normalizeClass(`w-4 h-4 ${i==null?void 0:i.iconColor}`)},null,8,["class"]))]),e.createElementVNode("h3",ym,e.toDisplayString(i==null?void 0:i.title),1),e.createElementVNode("p",bm,e.toDisplayString(i==null?void 0:i.description),1)],8,hm)),64))])])]))}}),xm={class:"w-full max-w-7xl mx-auto space-y-8"},wm={class:"grid grid-cols-1 lg:grid-cols-3 gap-6"},Tn=e.defineComponent({__name:"Dashboard",setup(l){const{t}=Fe(),a=e.ref([{id:"total-content",title:t("cms.dashboard.totalContent"),value:"2,847",description:t("cms.dashboard.articlesPostsPages"),change:{value:"+12.5%",isPositive:!0},icon:"file-text",color:"blue"},{id:"active-users",title:t("cms.dashboard.activeUsers"),value:"1,234",description:t("cms.dashboard.monthlyActiveUsers"),change:{value:"+8.2%",isPositive:!0},icon:"users",color:"emerald"},{id:"media-files",title:t("cms.dashboard.mediaFiles"),value:"5,692",description:t("cms.dashboard.imagesVideosDocs"),change:{value:"+23.1%",isPositive:!0},icon:"image",color:"purple"},{id:"new-media",title:t("cms.dashboard.newMediaFiles"),value:"89.2K",description:t("cms.dashboard.thisMonth"),change:{value:"-2.4%",isPositive:!1},icon:"eye",color:"orange"}]),n=e.ref([{id:1,type:"Article",status:"published",title:t("cms.dashboard.gettingStartedWithNextJs14"),author:t("cms.dashboard.sarahJohnson"),updated_at:"2024-01-15",views:1247},{id:2,type:"Post",status:"draft",title:t("cms.dashboard.advancedReactPatterns"),author:t("cms.dashboard.mikeChen"),updated_at:"2024-01-14",views:0},{id:3,type:"Article",status:"published",title:t("cms.dashboard.uiUxDesignPrinciples"),author:t("cms.dashboard.emmaWilson"),updated_at:"2024-01-13",views:892},{id:4,type:"Post",status:"review",title:t("cms.dashboard.databaseOptimizationTips"),author:t("cms.dashboard.alexRodriguez"),updated_at:"2024-01-12",views:0}]),r=s=>{a.value=a.value.map(i=>{var c,u,d,m;switch(i.id){case"total-content":return{...i,value:((c=s.totalContent)==null?void 0:c.toLocaleString())??i.value};case"active-users":return{...i,value:((u=s.totalUsers)==null?void 0:u.toLocaleString())??i.value};case"media-files":return{...i,value:((d=s.totalMediaFiles)==null?void 0:d.toLocaleString())??i.value};case"new-media":return{...i,value:((m=s.newMediaFiles)==null?void 0:m.toLocaleString())??i.value};default:return i}})},o=async()=>{const i=await(await fetch("api/cms-stat")).json();n.value=i.recentContent,r(i.stat)};return e.onMounted(()=>{o()}),(s,i)=>(e.openBlock(),e.createElementBlock("div",xm,[e.createVNode(Mu),e.createVNode(zu,{stats:a.value},null,8,["stats"]),e.createElementVNode("div",wm,[e.createVNode(cm,{content:n.value,class:"lg:col-span-2"},null,8,["content"]),e.createElementVNode("div",null,[e.createVNode(km)])])]))}}),_m={class:"rounded-xl text-card-foreground shadow-lg bg-white dark:bg-slate-800 backdrop-blur-sm border-2 border-dashed border-slate-300 dark:border-slate-600"},Em={class:"p-12 text-center"},Cm={class:"text-lg font-medium text-slate-600 dark:text-slate-300 mb-2"},Vm={class:"text-slate-500 dark:text-slate-400 mb-6"},Wo={__name:"EmptyData",props:{title:{type:String,default:()=>"emptyData.title"},description:{type:String,default:()=>"emptyData.description"},buttonText:{type:String,default:()=>"emptyData.buttonText"},showButton:{type:Boolean,default:!0}},emits:["action"],setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",_m,[e.createElementVNode("div",Em,[a[2]||(a[2]=e.createElementVNode("svg",{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",class:"lucide lucide-layers w-12 h-12 mx-auto mb-4 text-slate-400 dark:text-slate-500"},[e.createElementVNode("path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"}),e.createElementVNode("path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"}),e.createElementVNode("path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"})],-1)),e.createElementVNode("h3",Cm,e.toDisplayString(t.$t(l.title)),1),e.createElementVNode("p",Vm,e.toDisplayString(t.$t(l.description)),1),l.showButton?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=n=>t.$emit("action")),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white"},[a[1]||(a[1]=e.createElementVNode("svg",{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",class:"lucide lucide-plus w-4 h-4 mr-2"},[e.createElementVNode("path",{d:"M5 12h14"}),e.createElementVNode("path",{d:"M12 5v14"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.$t(l.buttonText)),1)])):e.createCommentVNode("",!0)])]))}},Nm={class:"space-y-6 max-w-7xl mx-auto"},vm={class:"flex items-center justify-between mb-8"},Bm={class:"flex gap-4"},Sm={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},Dm={class:"text-slate-600 dark:text-slate-300"},Am=["href","title"],Mm={class:"relative w-full max-w-sm"},Tm={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Lm=["placeholder"],$m={key:0},Fm={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6"},Im=["onClick"],Om={class:"flex items-start justify-between"},Pm={class:"flex items-start gap-3"},Rm={class:"text-sm font-semibold text-gray-800 mb-1"},jm={class:"text-xs text-gray-600"},Um={class:"flex items-center gap-2"},zm={class:"text-xs text-gray-500 whitespace-nowrap"},Hm={key:1,class:"flex items-center justify-center min-h-[400px]"},Ln=e.defineComponent({__name:"CollectionsPage",setup(l){const{t,locale:a}=Fe(),n=nt.useRouter();e.inject("fetchContentTypes");const r=e.ref([]),o=e.ref(""),s=e.computed(()=>{const u=r.value.filter(f=>f.type!=="single"),d=o.value.trim().toLowerCase();return[...d?u.filter(f=>[f==null?void 0:f.title,f==null?void 0:f.name,f==null?void 0:f.id,f==null?void 0:f.description].filter(Boolean).join(" ").toLowerCase().includes(d)):u].sort((f,y)=>f.id==="pages"?-1:y.id==="pages"?1:0)});async function i(){try{const u=await fetch("/api/cms-type?type=collection");if(!u.ok)throw new Error("Failed to fetch collections");const d=await u.json();r.value=d.rows||[]}catch(u){console.error("Error fetching collections:",u)}}const c=u=>{n.push(`/collections/${u.id}`)};return e.onMounted(()=>{i()}),(u,d)=>(e.openBlock(),e.createElementBlock("div",Nm,[e.createElementVNode("div",vm,[e.createElementVNode("div",Bm,[e.createElementVNode("div",null,[e.createElementVNode("h1",Sm,e.toDisplayString(u.$t("cms.navigation.collections")),1),e.createElementVNode("p",Dm,e.toDisplayString(u.$t("cms.collections.selectCollection")),1)]),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(a)}/guides/collections/`,target:"_blank",title:u.$t("cms.guide.collections"),class:"mt-2"},[e.createVNode(e.unref(xl),{class:"w-5 h-5"})],8,Am)]),e.createElementVNode("div",Mm,[e.createElementVNode("div",Tm,[e.createVNode(e.unref(ln),{class:"w-5 h-5 text-gray-400"})]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=m=>o.value=m),type:"text",class:"block w-full py-2 pl-10 pr-3 leading-5 text-gray-900 placeholder-gray-500 transition-colors bg-white border border-gray-300 rounded-md dark:border-gray-600 dark:bg-gray-700 dark:placeholder-gray-400 focus:outline-none focus:ring-sky-500 focus:border-sky-500 dark:text-white sm:text-sm",placeholder:u.$t("cms.collections.searchCollections")},null,8,Lm),[[e.vModelText,o.value]])])]),r.value.length>0?(e.openBlock(),e.createElementBlock("div",$m,[e.createElementVNode("div",Fm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,m=>(e.openBlock(),e.createElementBlock("button",{key:m.id,onClick:h=>c(m),class:"w-full border border-gray-200 bg-white rounded-lg p-4 text-left hover:shadow-md transition-all hover:border-gray-300"},[e.createElementVNode("div",Om,[e.createElementVNode("div",Pm,[m.id==="pages"?(e.openBlock(),e.createBlock(e.unref(kl),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(e.openBlock(),e.createBlock(e.unref(wl),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),e.createElementVNode("div",null,[e.createElementVNode("h4",Rm,e.toDisplayString(m.title),1),e.createElementVNode("p",jm,e.toDisplayString(m.description||"Опис відсутній"),1)])]),e.createElementVNode("div",Um,[e.createElementVNode("span",zm,e.toDisplayString(m.entries)+" записів",1),e.createVNode(e.unref(bl),{class:"w-4 h-4 text-gray-400"})])])],8,Im))),128))])])):(e.openBlock(),e.createElementBlock("div",Hm,[e.createVNode(Wo)]))]))}}),qm={class:"text-card-foreground border-0 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm"},Gm={class:"p-0"},Wm={class:"table-scroll overflow-x-auto"},Km={class:"relative w-full overflow-auto max-h-[calc(100vh-270px)]"},Ym={class:"w-full caption-bottom text-sm"},Xm={class:"border-b border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors"},Zm={class:"flex items-center gap-2"},Qm={class:"h-10 text-center px-4 font-semibold text-slate-700 dark:text-slate-300 max-w-32"},Jm=["onClick"],ep={key:1,class:"whitespace-nowrap"},tp={key:2,class:"whitespace-nowrap"},lp={key:3,class:"flex items-center"},ap={key:4,class:"inline-flex whitespace-nowrap items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300"},np={key:5,class:"flex items-center"},rp={key:6,class:"flex items-center gap-3"},op={key:8,class:"flex items-center gap-3"},sp={key:11,class:"flex items-center gap-3"},ip={class:"line-clamp-2"},cp={class:"flex justify-end py-2 px-4 align-middle max-w-40"},dp={class:"flex items-center justify-center gap-1"},up=["onClick"],mp=["onClick"],Ko=e.defineComponent({__name:"UniversalTable",props:{rows:{},query:{},filterFn:{type:Function},onEdit:{type:Function},onView:{type:Function},onDelete:{type:Function},columns:{},onMore:{type:Function},customRender:{}},emits:["edit","view","delete","more"],setup(l,{emit:t}){const{t:a}=Fe();e.ref(null);const n=l,r=t,o=e.computed(()=>!n.query||!n.filterFn?n.rows:n.rows.filter(m=>n.filterFn(m,n.query))),s=m=>{if(!m)return"";const h=new Date(m);return isNaN(h.getTime())?"":m.includes("T")||m.includes(" ")||m.includes(":")?h.toLocaleString("uk-UA",{dateStyle:"medium",timeStyle:"medium"}):h.toLocaleDateString("uk-UA",{dateStyle:"medium"})},i=m=>{switch(m){case"published":return{icon:_r,text:a("cms.common.status.published"),classes:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 border-green-200 dark:border-green-700"};case"draft":return{icon:_l,text:a("cms.common.status.draft"),classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"};case"archived":return{icon:Ar,text:a("cms.common.status.archived"),classes:"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300 border-gray-200 dark:border-gray-700"};default:return null}},c=(m,h)=>{switch(m){case"edit":r("edit",h),n.onEdit&&n.onEdit(h);break;case"view":r("view",h),n.onView&&n.onView(h);break;case"delete":r("delete",h);break;case"more":r("more",h),n.onMore&&n.onMore(h);break}},u=m=>{c("edit",m)},d=m=>{const h=new Date,f=new Date(m),y=h-f,k=Math.floor(y/1e3),g=Math.floor(k/60),p=Math.floor(g/60),x=Number(Math.floor(p/24)),w=Number(Math.floor(x/7));return w>=2?a("cms.table.time.weeksAgo",{count:w}):w===1?a("cms.table.time.weekAgo"):x>=2?a("cms.table.time.daysAgo",{count:x}):x===1?a("cms.table.time.dayAgo"):p>=2?a("cms.table.time.hoursAgo",{count:p}):p===1?a("cms.table.time.hourAgo"):g>=2?a("cms.table.time.minutesAgo",{count:g}):a(g===1?"cms.table.time.minuteAgo":"cms.table.time.justNow")};return(m,h)=>(e.openBlock(),e.createElementBlock("div",qm,[e.createElementVNode("div",Gm,[e.createElementVNode("div",Wm,[e.createElementVNode("div",Km,[e.createElementVNode("table",Ym,[e.createElementVNode("thead",null,[e.createElementVNode("tr",Xm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.columns,f=>(e.openBlock(),e.createElementBlock("th",{key:f.name,class:e.normalizeClass(["h-10 px-4 text-left align-middle font-semibold text-slate-700 dark:text-slate-300 max-w-80",{"min-w-[200px]":["title","name"].includes(f.name),"min-w-[150px]":f.name==="slug","min-w-[250px]":f.name==="description"}])},[e.createElementVNode("div",Zm,[f.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.icon),{key:0,class:"w-5 h-5"})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(f.label||f.title||f.ua||f.name),1)])],2))),128)),e.createElementVNode("th",Qm,e.toDisplayString(m.$t("cms.table.actions")),1)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,f=>(e.openBlock(),e.createElementBlock("tr",{key:f.id||f._id||f.name,class:"transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.columns,(y,k)=>{var g,p,x,w,b;return e.openBlock(),e.createElementBlock("td",{key:y.name,class:e.normalizeClass(["py-2 px-4 align-middle max-w-80",{"font-medium text-slate-800 dark:text-white cursor-pointer":k===0,"text-slate-600 dark:text-slate-400 font-mono text-sm":k!==0}]),onClick:_=>k===0?u(f):void 0},[l.customRender&&l.customRender[y.name]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.customRender[y.name](f[y.name],f)),{key:0})):e.createCommentVNode("",!0),["published_at","publish_at","created_at","date"].includes(y.name)&&f[y.name]?(e.openBlock(),e.createElementBlock("span",ep,e.toDisplayString(s(f[y.name])),1)):["updated_at","lastModified","last_edit"].includes(y.name)?(e.openBlock(),e.createElementBlock("span",tp,e.toDisplayString(d(f[y.name])||"--"),1)):y.name==="views"?(e.openBlock(),e.createElementBlock("div",lp,[e.createVNode(e.unref(en),{class:"w-4 h-4 mr-1"}),e.createTextVNode(" "+e.toDisplayString(((p=(g=f[y.name])==null?void 0:g.toLocaleString)==null?void 0:p.call(g))??f[y.name]),1)])):["entries","fields"].includes(y.name)?(e.openBlock(),e.createElementBlock("div",ap,e.toDisplayString(f[y.name]||"-"),1)):y.name==="type"?(e.openBlock(),e.createElementBlock("div",np,[e.createElementVNode("div",{class:e.normalizeClass(["whitespace-nowrap inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors border-transparent hover:bg-secondary/80",f[y.name]==="pages"?"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300":"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300"])},e.toDisplayString(f[y.name]||"-"),3)])):y.name==="name"?(e.openBlock(),e.createElementBlock("div",rp,[f.type==="single"?(e.openBlock(),e.createBlock(e.unref(kl),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(e.openBlock(),e.createBlock(e.unref(wl),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),e.createTextVNode(" "+e.toDisplayString(f[y.name]),1)])):y.name==="status"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[i(f[y.name])?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["whitespace-nowrap rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700",(x=i(f[y.name]))==null?void 0:x.classes])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((w=i(f[y.name]))==null?void 0:w.icon),{class:"w-3 h-3 mr-1"})),e.createTextVNode(" "+e.toDisplayString((b=i(f[y.name]))==null?void 0:b.text),1)],2)):e.createCommentVNode("",!0)],64)):y.name==="slug"?(e.openBlock(),e.createElementBlock("div",op,e.toDisplayString(f[y.name]?"/"+f[y.name]:"-"),1)):y.name==="color"?(e.openBlock(),e.createElementBlock("span",{key:9,class:e.normalizeClass(["w-4 h-4 rounded-full block ml-2","bg-["+f[y.name]+"]"])},null,2)):y.name==="enabled"?(e.openBlock(),e.createElementBlock("span",{key:10,class:e.normalizeClass(["whitespace-nowrap rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit",f[y.name]?"bg-green-100 text-green-800 border-green-200":"bg-red-100 text-red-800 border-red-200"])},e.toDisplayString(f[y.name]?"Доступ":"Заборонено"),3)):(e.openBlock(),e.createElementBlock("div",sp,[e.createElementVNode("p",ip,e.toDisplayString(f[y.name]||"-"),1)]))],10,Jm)}),128)),e.createElementVNode("td",cp,[e.createElementVNode("div",dp,[e.createElementVNode("button",{onClick:e.withModifiers(y=>c("edit",f),["stop"]),class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:text-slate-200 hover:border-blue-300 hover:bg-blue-50 hover:text-blue-600",title:"Edit"},[e.createVNode(e.unref(Dr),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-green-600 dark:group-hover:text-blue-50"})],8,up),e.createElementVNode("button",{onClick:e.withModifiers(y=>c("delete",f),["stop"]),class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:text-slate-200 hover:border-blue-300 hover:bg-blue-50 hover:text-blue-600",title:"Preview"},[e.createVNode(e.unref(Kt),{class:"w-4 h-4 text-slate-800 dark:text-slate-200 group-hover:text-red-600 dark:group-hover:text-blue-50"})],8,mp),e.renderSlot(m.$slots,"actions",{row:f})])])]))),128))])])])])])]))}}),pp={class:"flex items-center justify-between px-6 py-4 border-t border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800"},fp={class:"flex justify-between flex-1 sm:hidden"},hp={class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},gp={class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},yp={class:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"},bp={class:"text-sm text-slate-600 dark:text-slate-400"},kp={class:"font-medium text-slate-800 dark:text-slate-100"},xp={class:"font-medium text-slate-800 dark:text-slate-100"},wp={class:"relative z-0 inline-flex space-x-2 rounded-md shadow-sm","aria-label":"Pagination"},_p=["disabled"],Ep={class:"sr-only"},Cp={class:"space-x-1"},Vp={key:0,class:"px-2 py-2 text-gray-400"},Np=["onClick"],vp=["disabled"],Bp={class:"sr-only"},Yo=e.defineComponent({__name:"UniversalTablePagination",props:e.mergeModels({total:{},count:{},limit:{}},{page:{},pageModifiers:{}}),emits:["update:page"],setup(l){const t=e.useModel(l,"page"),a=e.computed(()=>Math.ceil(l.total/l.limit)),n=e.computed(()=>{const o=[];if(a.value<=4){for(let c=1;c<=a.value;c++)o.push(c);return o}const s=Math.max(2,t.value-2),i=Math.min(a.value-1,t.value+2);o.push(1),s>2&&o.push("ellipsis");for(let c=s;c<=i;c++)o.push(c);return i<a.value-1&&o.push("ellipsis"),o.push(a.value),o});return(r,o)=>(e.openBlock(),e.createElementBlock("div",pp,[e.createElementVNode("div",fp,[e.createElementVNode("button",hp,e.toDisplayString(r.$t("cms.common.pagination.previous")),1),e.createElementVNode("button",gp,e.toDisplayString(r.$t("cms.common.pagination.next")),1)]),e.createElementVNode("div",yp,[e.createElementVNode("div",null,[e.createElementVNode("p",bp,[e.createTextVNode(e.toDisplayString(r.$t("cms.common.pagination.showing"))+" ",1),e.createElementVNode("span",kp,e.toDisplayString(l.count),1),e.createTextVNode(" "+e.toDisplayString(r.$t("cms.common.pagination.of"))+" ",1),e.createElementVNode("span",xp,e.toDisplayString(l.total),1),e.createTextVNode(" "+e.toDisplayString(r.$t("cms.common.pagination.results")),1)])]),e.createElementVNode("div",null,[e.createElementVNode("nav",wp,[e.createElementVNode("button",{onClick:o[0]||(o[0]=s=>t.value=t.value>1?t.value-1:1),disabled:t.value===1,class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 text-slate-600 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600"},[e.createElementVNode("span",Ep,e.toDisplayString(r.$t("cms.common.pagination.previous")),1),e.createVNode(e.unref(ji),{class:"w-5 h-5"})],8,_p),e.createElementVNode("div",Cp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s+"-"+i},[s==="ellipsis"?(e.openBlock(),e.createElementBlock("span",Vp,"...")):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:c=>t.value=s,class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors h-8 w-8 p-0 text-sm rounded-md",{"border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-600 dark:text-slate-300 hover:border-blue-600 hover:bg-slate-50 dark:hover:bg-slate-600":s!==t.value,"shadow bg-blue-600 hover:bg-blue-700 text-white border-blue-600":s===t.value}])},e.toDisplayString(s),11,Np))],64))),128))]),e.createElementVNode("button",{onClick:o[1]||(o[1]=s=>t.value=t.value<Math.ceil(l.total/l.limit)?t.value+1:Math.ceil(l.total/l.limit)),disabled:t.value===Math.ceil(l.total/l.limit),class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 text-slate-600 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600"},[e.createElementVNode("span",Bp,e.toDisplayString(r.$t("cms.common.pagination.next")),1),e.createVNode(e.unref(bl),{class:"w-5 h-5"})],8,vp)])])])]))}}),ml=(l,t)=>{const a=l.__vccOpts||l;for(const[n,r]of t)a[n]=r;return a},Sp={key:0,class:"fixed inset-0 z-[2000] flex items-center justify-center bg-gray-600 bg-opacity-75"},Dp={key:0,class:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},Ap={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Mp={class:"mt-3 text-center sm:mt-5"},Tp={id:"dialog-title",class:"text-base font-semibold text-gray-900"},Lp={class:"mt-2"},$p={class:"text-sm text-gray-500"},Fp={class:"bg-gray-50 px-4 py-3 sm:px-6 flex justify-center"},Ip={key:1,class:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},Op={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Pp={class:"sm:flex sm:items-start"},Rp={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},jp={id:"dialog-title",class:"text-base font-semibold text-gray-900"},Up={class:"mt-2"},zp={class:"text-sm text-gray-500"},Hp={key:0,class:"mt-2"},qp=["placeholder"],Gp=e.defineComponent({__name:"message-box",props:{type:{default:"error"},mode:{default:"confirm"},title:{default:""},message:{default:""},confirmButtonText:{default:"OK"},cancelButtonText:{default:"Cancel"},modelValue:{type:Boolean,default:!1},promptPlaceholder:{default:""},align:{type:Boolean,default:!0}},emits:["confirm","cancel","update:modelValue"],setup(l,{emit:t}){const a=e.ref(null);e.onMounted(()=>{var y;(y=a.value)==null||y.focus()});const n={success:()=>e.h("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","aria-hidden":"true",class:"size-6 text-green-600"},[e.h("path",{d:"m4.5 12.75 6 6 9-13.5","stroke-linecap":"round","stroke-linejoin":"round"})]),error:()=>e.h("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","aria-hidden":"true",class:"size-6 text-red-600"},[e.h("path",{d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z","stroke-linecap":"round","stroke-linejoin":"round"})]),info:()=>e.h("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"size-6 text-blue-600"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 16h-1v-4h-1m1-4h.01M12 20a8 8 0 100-16 8 8 0 000 16z"})]),warning:()=>e.h("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"size-6 text-yellow-600"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v2m0 4h.01M10.29 3.86L1.82 17a1 1 0 0 0 .87 1.5h18.62a1 1 0 0 0 .87-1.5L13.71 3.86a1 1 0 0 0-1.42 0z"})])},r=l,o=t,s=e.ref(r.modelValue),i=e.ref("");e.watch(()=>r.modelValue,y=>{s.value=y,y===!0&&r.mode==="prompt"&&(i.value="")});function c(y){s.value=!1,o("update:modelValue",!1),y==="confirm"&&r.mode==="prompt"?o("confirm",i.value):o(y)}function u(){c("confirm")}const d=e.computed(()=>{switch(r.type){case"success":return"bg-green-100";case"error":return"bg-red-100";case"info":return"bg-blue-100";case"warning":return"bg-yellow-100";default:return"bg-gray-100"}}),m=e.computed(()=>r.type==="warning"?"bg-orange-600 hover:bg-orange-500":r.type==="success"?"bg-green-600 hover:bg-green-500":r.type==="error"?"bg-red-600 hover:bg-red-500":"bg-blue-600 hover:bg-blue-500"),h=e.computed(()=>n[r.type||"error"]||n.error),f=e.computed(()=>r.title&&r.title.trim()!==""?r.title:r.type?r.type.charAt(0).toUpperCase()+r.type.slice(1):"Notification");return(y,k)=>{const g=e.resolveDirective("focus");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[s.value?(e.openBlock(),e.createElementBlock("div",Sp,[y.mode==="alert"?(e.openBlock(),e.createElementBlock("div",Dp,[e.createElementVNode("div",Ap,[e.createElementVNode("div",null,[k[4]||(k[4]=e.createElementVNode("div",{class:"mx-auto flex size-12 shrink-0 items-center justify-center rounded-full bg-green-100"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","aria-hidden":"true",class:"size-6 text-green-600"},[e.createElementVNode("path",{d:"m4.5 12.75 6 6 9-13.5","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),e.createElementVNode("div",Mp,[e.createElementVNode("h3",Tp,e.toDisplayString(f.value),1),e.createElementVNode("div",Lp,[e.createElementVNode("p",$p,e.toDisplayString(y.message),1)])])])]),e.createElementVNode("div",Fp,[e.createElementVNode("button",{type:"button",onClick:k[0]||(k[0]=p=>c("confirm")),class:"inline-flex min-w-[70px] w-full justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 sm:w-auto"},e.toDisplayString(y.confirmButtonText),1)])])):(e.openBlock(),e.createElementBlock("div",Ip,[e.createElementVNode("div",Op,[e.createElementVNode("div",Pp,[e.createElementVNode("div",{class:e.normalizeClass(["mx-auto flex size-12 shrink-0 items-center justify-center rounded-full sm:mx-0 sm:size-10",d.value])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.value)))],2),e.createElementVNode("div",Rp,[e.createElementVNode("h3",jp,e.toDisplayString(f.value),1),e.createElementVNode("div",Up,[e.createElementVNode("p",zp,e.toDisplayString(y.message),1)]),y.mode==="prompt"?(e.openBlock(),e.createElementBlock("div",Hp,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":k[1]||(k[1]=p=>i.value=p),placeholder:y.promptPlaceholder,class:"w-full rounded-md py-1.5 pl-2 text-gray-900 shadow-sm placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",onKeyup:e.withKeys(u,["enter"]),type:"text"},null,40,qp),[[e.vModelText,i.value],[g]])])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",{class:e.normalizeClass(["bg-gray-50 px-4 py-3",y.align?"sm:flex sm:flex-row-reverse sm:px-6 gap-x-2.5":"sm:flex sm:flex-row sm:px-6 gap-x-2.5"])},[e.createElementVNode("button",{type:"button",onClick:k[2]||(k[2]=p=>c("confirm")),class:e.normalizeClass(["inline-flex w-full justify-center rounded-md px-3 py-2 text-sm font-semibold text-white shadow-xs sm:w-auto",m.value])},e.toDisplayString(y.confirmButtonText),3),e.createElementVNode("button",{type:"button",onClick:k[3]||(k[3]=p=>c("cancel")),class:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto"},e.toDisplayString(y.cancelButtonText),1)],2)]))])):e.createCommentVNode("",!0)])}}}),Wp=ml(Gp,[["__scopeId","data-v-047caa71"]]);e.defineComponent({props:{modelValue:{type:Boolean,default:()=>!1},title:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1}},data(){return{}},mounted(){this.modelValue||this.$emit("update:modelValue",!1)},computed:{modelState:{get(){return this.modelValue},set(l){this.$emit("update:modelValue",l)}},labelCursorClasses(){return[{"cursor-not-allowed":this.disabled},{"cursor-pointer":!this.disabled}]}},methods:{handleEnterDown(l){const{keyCode:t}=l;t===13&&(this.modelState=!this.modelState)},addKeyHandler(){window.addEventListener("keydown",this.handleEnterDown)},removeKeyHandler(){window.removeEventListener("keydown",this.handleEnterDown)}}});const Kp={key:0,class:"vsTailwind ui-dialog__wrapper text-gray-800"},Yp={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},Xp={class:"font-medium text-gray-800 dark:text-[#ffffff]"},Zp={class:"ui-dialog__content p-4"},Qp={key:0,class:"flex justify-end gap-x-2"},Jp={key:1,class:"flex justify-end items-center gap-x-2 py-3 px-4 border-t border-gray-200 dark:border-neutral-700"},ef=e.defineComponent({__name:"vs-modal",props:{title:{default:""},template:{},visible:{type:Boolean,default:!1},size:{default:"small"},closeClickBack:{type:Boolean,default:!1},content:{},buttonText:{},contentProps:{},teleport:{default:"body"}},emits:["update:visible","close","done"],setup(l,{emit:t}){const a=l,n=t,r=e.computed(()=>a.size==="small"?"md:w-5/12 w-9/12":a.size==="medium"?"md:w-6/12 w-9/12":"lg:w-7/12 w-11/12"),o=e.useAttrs();function s(){n("done")}function i(){n("update:visible",!1),n("close")}function c(d){d.key==="Escape"&&i()}function u(d,m){m&&d.target.classList.contains("vs-dialog-overlay")&&i()}return e.onMounted(()=>{window.addEventListener("keydown",c)}),e.onUnmounted(()=>{window.removeEventListener("keydown",c)}),(d,m)=>(e.openBlock(),e.createBlock(e.Teleport,{to:d.teleport},[d.visible?(e.openBlock(),e.createElementBlock("div",Kp,[e.createElementVNode("div",{onMousedown:m[0]||(m[0]=h=>u(h,d.closeClickBack)),class:e.normalizeClass(["vs-dialog-overlay vs-dialog w-full h-full fixed top-0 start-0 bg-black bg-opacity-50",[e.unref(o).class]])},[e.createVNode(e.Transition,{name:"content",appear:""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["ui-dialog__modal opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl",r.value])},[e.createElementVNode("div",Yp,[e.createElementVNode("h3",Xp,e.toDisplayString(d.title),1),e.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:i},[...m[1]||(m[1]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",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"},[e.createElementVNode("path",{d:"M18 6 6 18"}),e.createElementVNode("path",{d:"m6 6 12 12"})],-1)])])]),e.createElementVNode("div",Zp,[e.renderSlot(d.$slots,"default",{},void 0,!0)]),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",Qp,[e.renderSlot(d.$slots,"footer",{handleClose:i},void 0,!0)])):e.createCommentVNode("",!0),d.buttonText?(e.openBlock(),e.createElementBlock("div",Jp,[e.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:i}," Close "),e.createElementVNode("button",{type:"button",onClick:s,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-hidden focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"},e.toDisplayString(d.buttonText),1)])):e.createCommentVNode("",!0)],2)]),_:3})],34)])):e.createCommentVNode("",!0)],8,["to"]))}}),Jt=ml(ef,[["__scopeId","data-v-a6807cab"]]),tf={key:0,class:"vsTailwind ui-drawer__wrapper"},lf={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},af={class:"font-medium text-gray-800 dark:text-[#ffffff]"},nf={class:"flex gap-2"},rf={class:"sr-only"},of={key:0,class:"flex-shrink-0 w-4 h-4",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"},sf={key:1,class:"flex-shrink-0 w-4 h-4",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"},cf={class:"ui-drawer__content p-4 flex-1 overflow-auto"},df={key:0,class:"flex justify-end gap-x-2 p-4 border-0 border-t border-solid border-gray-200 dark:border-t-[#454545]"},uf=e.defineComponent({__name:"vs-drawer",props:{title:{default:""},visible:{type:Boolean,default:!1},position:{default:"right"},size:{default:"500px"},closeClickBack:{type:Boolean,default:!1}},emits:["update:visible","close"],setup(l,{emit:t}){const a=l,n=t,r=e.ref(!1),o=e.computed(()=>r.value?"fixed top-0 left-0 w-full h-full":a.position==="left"?"fixed top-0 left-0 h-full":a.position==="right"?"fixed top-0 right-0 h-full":a.position==="top"?"fixed top-0 left-0 w-full":"fixed bottom-0 left-0 w-full");function s(){n("update:visible",!1),n("close")}function i(){r.value=!r.value}function c(d){d.key==="Escape"&&s()}function u(d,m){m&&d.target.classList.contains("vs-drawer-overlay")&&s()}return e.onMounted(()=>{window.addEventListener("keydown",c)}),e.onUnmounted(()=>{window.removeEventListener("keydown",c)}),(d,m)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"#modal"},[d.visible?(e.openBlock(),e.createElementBlock("div",tf,[e.createElementVNode("div",{onMousedown:m[0]||(m[0]=h=>u(h,d.closeClickBack)),class:"vs-drawer-overlay vs-drawer w-full h-full fixed top-0 start-0 bg-black bg-opacity-50"},[e.createVNode(e.Transition,{name:"drawer",appear:""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["ui-drawer__drawer opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)]",[o.value,r.value?"w-full":`w-[${a.size}]`,`drawer-${a.position}`]])},[e.createElementVNode("div",lf,[e.createElementVNode("h3",af,e.toDisplayString(d.title),1),e.createElementVNode("div",nf,[e.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:i},[e.createElementVNode("span",rf,e.toDisplayString(r.value?"Exit fullscreen":"Enter fullscreen"),1),r.value?(e.openBlock(),e.createElementBlock("svg",sf,[...m[2]||(m[2]=[e.createElementVNode("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",of,[...m[1]||(m[1]=[e.createElementVNode("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},null,-1)])]))]),e.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:s},[...m[3]||(m[3]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",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"},[e.createElementVNode("path",{d:"M18 6 6 18"}),e.createElementVNode("path",{d:"m6 6 12 12"})],-1)])])])]),e.createElementVNode("div",cf,[e.renderSlot(d.$slots,"default",{},void 0,!0)]),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",df,[e.renderSlot(d.$slots,"footer",{handleClose:s},void 0,!0)])):e.createCommentVNode("",!0)],2)]),_:3})],32)])):e.createCommentVNode("",!0)]))}}),Xo=ml(uf,[["__scopeId","data-v-c808fe88"]]),mf={},pf={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6 text-green-600"};function ff(l,t){return e.openBlock(),e.createElementBlock("svg",pf,[...t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])}const hf=ml(mf,[["render",ff]]),gf={},yf={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"orange",class:"size-6 text-orange-600"};function bf(l,t){return e.openBlock(),e.createElementBlock("svg",yf,[...t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])}const kf=ml(gf,[["render",bf]]),xf={},wf={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6 text-blue-600"};function _f(l,t){return e.openBlock(),e.createElementBlock("svg",wf,[...t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"},null,-1)])])}const Ef=ml(xf,[["render",_f]]),Cf={},Vf={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"red",class:"size-6 text-red-600"};function Nf(l,t){return e.openBlock(),e.createElementBlock("svg",Vf,[...t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)])])}const vf=ml(Cf,[["render",Nf]]),Bf={class:"rounded-md border border-gray-300 bg-white p-4 shadow-sm"},Sf={class:"flex items-start gap-4 opacity-100 scale-5 transition-all duration-300"},Df={class:"flex-1"},Af={class:"font-medium text-gray-900"},Mf={class:"mt-0.5 text-sm text-gray-700"},Tf=e.defineComponent({__name:"vs-notify",props:{type:{},title:{},message:{}},setup(l){const t={success:hf,warning:kf,error:vf,info:Ef};return(a,n)=>(e.openBlock(),e.createElementBlock("div",Bf,[e.createElementVNode("div",Sf,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[a.type]))),e.createElementVNode("div",Df,[e.createElementVNode("strong",Af,e.toDisplayString(a.title),1),e.createElementVNode("p",Mf,e.toDisplayString(a.message),1)]),n[0]||(n[0]=e.createElementVNode("button",{class:"m-3 rounded-full p-1.5 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700",type:"button","aria-label":"Dismiss notify"},[e.createElementVNode("span",{class:"sr-only"},"Dismiss popup"),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1))])]))}}),Ca=l=>{const{message:t,title:a,mode:n="confirm",type:r="info",confirmButtonText:o,cancelButtonText:s,onConfirm:i,onCancel:c,cascade:u,confirmButtonStyle:d,cancelButtonStyle:m}=l||{},h=document.querySelector("body");if(!h){console.error('Modal root element with id "#modal" not found!');return}const f=document.createElement("div");h.appendChild(f);const y=()=>{f.remove()};e.createApp({render(){return e.h(Wp,{title:a,message:t,mode:n,type:r,cascade:u,confirmButtonText:o,cancelButtonText:s,cancelButtonStyle:m,confirmButtonStyle:d,modelValue:!0,onConfirm:()=>{i==null||i(),y()},onCancel:()=>{c==null||c(),y()}})}}).mount(f)};e.reactive({visible:!0});const Lf=l=>{const{template:t="",title:a="",content:n,contentProps:r={},size:o="medium"}=l,s=document.querySelector("body");if(!s)return console.error('Modal root element with id "#modal" not found!'),{close:()=>{}};const i=document.createElement("div");s.appendChild(i);const c={title:a,template:t,visible:!0,size:o,closeClickBack:!0,onClose:d},u=e.createApp({render(){return e.h(Jt,c,{default:()=>[n?e.h(n,r):e.h("p",t)]})}});function d(){u.unmount(),i.remove()}return u.mount(i),{close:d}},Va={top:"top-4 left-1/2 transform -translate-x-1/2","left-bottom":"bottom-4 left-4 transform","right-bottom":"bottom-4 right-4 transform",bottom:"bottom-4 left-1/2 transform -translate-x-1/2"},xe=l=>{var c;const{type:t="info",title:a,message:n,position:r="right-bottom"}=l||{};let o=document.querySelector("#notify-root");o||(o=document.createElement("div"),o.id="notify-root",o.className=`fixed z-[2000] flex flex-col gap-3 ${Va[r]} p-6 max-w-md mx-auto font-sans antialiased`,document.body.appendChild(o)),o.className.includes(Va[r])||(Object.values(Va).forEach(u=>{o.classList.remove(...u.split(" "))}),o.classList.add(...Va[r].split(" ")));const s=document.createElement("div");o.appendChild(s);const i=e.createApp({render(){return e.h(Tf,{type:t,title:a,message:n,onClose:()=>{i.unmount(),s.remove()}})}});i.mount(s),(c=s.querySelector("button"))==null||c.addEventListener("click",()=>{s.classList.add("opacity-0","scale-95","transition-all","duration-300"),setTimeout(()=>{i.unmount(),s.remove()},350)}),setTimeout(()=>{s.classList.add("opacity-0","scale-95","transition-all","duration-300"),setTimeout(()=>{i.unmount(),s.remove()},350)},3500)},$f={class:"w-full relative"},Ff={key:0,class:"text-[14px] font-medium text-gray-900 mb-2"},If={class:"opacity-100"},Of={key:0,class:"text-red-500 text-[14px]"},Pf={key:1,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},Rf=e.defineComponent({__name:"vs-layout-default",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){const t=e.ref("uk"),a=n=>{n.detail.key==="locale"&&(t.value=n.detail.newValue)};return e.onMounted(()=>{t.value=localStorage.locale,window.addEventListener("storage",a)}),e.onUnmounted(()=>{window.removeEventListener("resize",a)}),(n,r)=>{var o,s;return e.openBlock(),e.createElementBlock("div",$f,[n.ua||n.label?(e.openBlock(),e.createElementBlock("div",Ff,[e.createElementVNode("span",If,e.toDisplayString(n.item[t.value]||n.ua||n.label),1),(s=(o=n.item)==null?void 0:o.rules)!=null&&s.includes("required")?(e.openBlock(),e.createElementBlock("span",Of,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default",e.mergeProps(n.$attrs,{class:{"opacity-60":n.item.disabled}})),n.error?(e.openBlock(),e.createElementBlock("span",Pf,e.toDisplayString(n.error),1)):e.createCommentVNode("",!0)])}}}),jf={class:"w-full relative flex flex-row items-center gap-2"},Uf={key:0,class:"text-red-500 text-[14px]"},zf={key:1,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},Hf=e.defineComponent({__name:"vs-layout-horizontal",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{default:()=>({container:12,label:3})}},setup(l){const t=l,a=e.computed(()=>t.columns??{container:12,label:3}),n=e.computed(()=>{const{container:i,label:c}=a.value;return!i||i<=0?0:Math.min(Math.max(c??0,0),i)/i}),r=e.computed(()=>{var i;return((i=t.item)==null?void 0:i.type)==="html"||n.value<=0?!1:!!(t.ua||t.label)}),o=e.computed(()=>{if(!r.value)return{};const i=`${n.value*100}%`;return{flexBasis:i,maxWidth:i}}),s=e.computed(()=>{var m;const{container:i,label:c}=a.value;if(!i||i<=0)return{};if(((m=t.item)==null?void 0:m.type)==="html")return{flexBasis:"100%",maxWidth:"100%"};if(!r.value)return{flexBasis:"100%",maxWidth:"100%"};const u=Math.max(i-Math.max(c??0,0),0)/i;if(!u)return{};const d=`${u*100}%`;return{flexBasis:d,maxWidth:d}});return(i,c)=>{var u,d;return e.openBlock(),e.createElementBlock("div",jf,[r.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-sm text-gray-900 font-medium flex shrink-0",style:e.normalizeStyle(o.value)},[e.createTextVNode(e.toDisplayString(i.ua||i.label)+" ",1),(d=(u=i.item)==null?void 0:u.rules)!=null&&d.includes("required")&&(i.ua||i.label)?(e.openBlock(),e.createElementBlock("span",Uf,"*")):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"flex-1 min-w-0",style:e.normalizeStyle(s.value)},[e.renderSlot(i.$slots,"default",e.normalizeProps(e.guardReactiveProps(i.$attrs)))],4),i.error?(e.openBlock(),e.createElementBlock("span",zf,e.toDisplayString(i.error),1)):e.createCommentVNode("",!0)])}}}),qf={class:"w-full relative"},Gf={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},Wf=e.defineComponent({__name:"vs-layout-inline",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",qf,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(t.$attrs))),t.error?(e.openBlock(),e.createElementBlock("span",Gf,e.toDisplayString(t.error),1)):e.createCommentVNode("",!0)]))}}),Kf={class:"flex-1 min-w-0"},Yf={key:0,class:"text-sm font-medium text-slate-700 dark:text-slate-200 flex items-center gap-1"},Xf={class:"truncate"},Zf={key:0,class:"text-red-500 text-[14px]"},Qf={key:1,class:"text-xs text-slate-500 dark:text-slate-400"},Jf={key:0,class:"mt-1 text-xs text-red-500"},eh=e.defineComponent({__name:"vs-layout-settings",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){const t=l,a=e.ref("uk");e.computed(()=>{var i;return((i=t.item??{})==null?void 0:i[a.value])??t.ua??t.label??""});const n=e.computed(()=>{var i;return((i=t.item)==null?void 0:i.description)??""}),r=e.computed(()=>{var i;return Array.isArray((i=t.item)==null?void 0:i.rules)&&t.item.rules.includes("required")}),o=e.computed(()=>(typeof t.error=="string"?t.error:"")??""),s=i=>{i.key==="locale"&&(a.value=i.newValue??"uk")};return e.onMounted(()=>{try{typeof localStorage<"u"&&localStorage.locale&&(a.value=localStorage.locale)}catch{}window.addEventListener("storage",s)}),e.onUnmounted(()=>{window.removeEventListener("storage",s)}),(i,c)=>{var u;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full relative",{"opacity-60":(u=i.item)==null?void 0:u.disabled}])},[e.createElementVNode("div",{class:e.normalizeClass(["gap-2 md:flex-row md:items-center md:justify-between",[["switcher","native-select"].includes(i.item.type)?"flex flex-col":""]])},[e.createElementVNode("div",Kf,[i.ua||i.label?(e.openBlock(),e.createElementBlock("p",Yf,[e.createElementVNode("span",Xf,e.toDisplayString(i.item[a.value]||i.ua||i.label),1),r.value?(e.openBlock(),e.createElementBlock("span",Zf,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("p",Qf,e.toDisplayString(n.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["w-full",["select","native-select"].includes(i.item.type)?"md:w-[30%]":"md:w-auto"])},[e.renderSlot(i.$slots,"default",e.normalizeProps(e.guardReactiveProps(i.$attrs)))],2)],2),o.value?(e.openBlock(),e.createElementBlock("p",Jf,e.toDisplayString(o.value),1)):e.createCommentVNode("",!0)],2)}}}),th={default:Rf,horizontal:Hf,inline:Wf,settings:eh};function ft(l){return{inputClass:e.computed(()=>{const t=`disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${(l==null?void 0:l.primaryColor)||"blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;return(l==null?void 0:l.size)==="sm"?`${t}h-[32px]`:`${t}h-[38px]`})}}const lh=["placeholder","disabled"],ah=e.defineComponent({__name:"vs-input-password",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),n=e.useModel(l,"modelValue"),r=e.computed(()=>!!t.disabled),o=e.computed(()=>t.placeholder??"");return(s,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"password","onUpdate:modelValue":i[0]||(i[0]=c=>n.value=c),placeholder:o.value,disabled:r.value,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":s.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,lh)),[[e.vModelText,n.value]])}}),nh=["placeholder","disabled"],Na=e.defineComponent({__name:"vs-input-text",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),n=e.useModel(l,"modelValue"),r=e.computed(()=>!!t.disabled),o=e.computed(()=>t.placeholder??"");return(s,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"text","onUpdate:modelValue":i[0]||(i[0]=c=>n.value=c),placeholder:o.value,disabled:r.value,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":s.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,nh)),[[e.vModelText,n.value]])}}),rh=["placeholder","disabled","min","max"],oh=e.defineComponent({__name:"vs-input-number",props:e.mergeModels({min:{},max:{},style:{default:()=>({})},customClass:{},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),n=e.useModel(l,"modelValue"),r=e.computed(()=>!!t.disabled);return(o,s)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"number",step:"any","onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i),placeholder:o.placeholder,disabled:r.value,class:e.normalizeClass(["py-1.5 px-3 block w-full bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"},min:o.min,max:o.max},null,10,rh)),[[e.vModelText,n.value]])}}),_e=(l,t)=>{const a=l.__vccOpts||l;for(const[n,r]of t)a[n]=r;return a},sh={},ih={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function ch(l,t){return e.openBlock(),e.createElementBlock("svg",ih,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const dh=_e(sh,[["render",ch]]),uh={class:"flex items-center gap-[4px]"},mh=["value","id","disabled"],ph=["for"],fh={class:"text-[14px] text-gray-700 flex items-center dark:text-neutral-400"},hh=e.defineComponent({__name:"vs-checkbox-default",props:{value:{default:""},label:{default:""},disabled:{type:Boolean,default:!1},id:{},modelValue:{default:""},info:{},error:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=t,n=l,r=e.computed({get:()=>n.modelValue,set:s=>a("update:modelValue",s)}),o=e.computed(()=>!!n.disabled);return(s,i)=>(e.openBlock(),e.createElementBlock("div",uh,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:s.value,"onUpdate:modelValue":i[0]||(i[0]=c=>r.value=c),class:e.normalizeClass(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer",{"!cursor-not-allowed":o.value}]),id:s.id,disabled:o.value},null,10,mh),[[e.vModelCheckbox,r.value]]),e.createElementVNode("label",{for:s.id,class:e.normalizeClass(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300",{"!cursor-not-allowed":o.value}])},[e.createElementVNode("div",{class:e.normalizeClass(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded",[r.value?"bg-blue-600 border-blue-600":"bg-white border-gray-600",s.error?"border-red-600":""]])},[e.createVNode(dh,{height:"12",width:"12"})],2),e.createElementVNode("span",fh,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(s.label),1)])])],10,ph)]))}}),gh=["name","value","disabled"],yh={class:"flex items-center gap-[6px] text-[14px]"},bh={key:0,class:"text-[16px]"},kh=["src"],xh=e.defineComponent({__name:"vs-checkbox-buttons",props:{value:{type:[String,Number,Boolean],default:""},label:{default:""},modelValue:{default:""},disabled:{type:Boolean},id:{},icon:{},imgUrl:{},style:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,n=t,r=e.computed({get:()=>a.modelValue,set:i=>{n("update:modelValue",i)}}),o=e.computed(()=>Array.isArray(r.value)?r.value.includes(a.value):r.value===!0||r.value===a.value),s=e.computed(()=>{var i,c;return((i=a.style)==null?void 0:i.size)==="xs"?"p-1.5 text-xs":((c=a.style)==null?void 0:c.size)==="lg"?"p-3.5 text-[20px]":"p-2.5 text-xs"});return(i,c)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg",[s.value,o.value?"ring-blue-500":"border border-gray-200 ring-transparent"]])},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"hidden",name:i.id,value:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>r.value=u),disabled:i.disabled},null,8,gh),[[e.vModelCheckbox,r.value]]),e.createElementVNode("span",yh,[i.icon||i.imgUrl?(e.openBlock(),e.createElementBlock("span",bh,[i.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(i.icon)},null,2)):e.createCommentVNode("",!0),i.imgUrl?(e.openBlock(),e.createElementBlock("img",{key:1,src:i.imgUrl,width:"16",height:"16",alt:"icon"},null,8,kh)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(i.label),1)])])],2))}}),wh={class:"flex items-center"},$n=e.defineComponent({__name:"vs-input-checkbox-item",props:{value:{default:""},label:{default:""},disabled:{type:Boolean,default:!1},view:{default:"default"},modelValue:{type:[Boolean,Array],default:!1},icon:{},imgUrl:{},slots:{},option:{},style:{},error:{default:""}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,n=t,r=`radio-${Math.floor(Math.random()*1e4)}`,o=e.computed({get:()=>Array.isArray(a.modelValue)?Array.isArray(a.modelValue)&&a.modelValue.includes(a.value):a.modelValue,set:i=>{if(Array.isArray(a.modelValue)){let c=[...a.modelValue];i?c.includes(a.value)||c.push(a.value):c=c.filter(u=>u!==a.value),n("update:modelValue",c)}else n("update:modelValue",i)}}),s=e.ref(`vs-checkbox-${a.view||"default"}`);return(i,c)=>{var u;return e.openBlock(),e.createElementBlock("div",wh,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value==="vs-checkbox-buttons"?e.unref(xh):e.unref(hh)),{value:i.value,label:i.label,info:(u=i.option)==null?void 0:u.info,disabled:i.disabled,modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=d=>o.value=d),id:r,icon:i.icon,imgUrl:i.imgUrl,style:e.normalizeStyle(i.style),error:i.error},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.label),1)]),_:1},8,["value","label","info","disabled","modelValue","icon","imgUrl","style","error"]))])}}}),_h={},Eh={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-chevron-down"};function Ch(l,t){return e.openBlock(),e.createElementBlock("svg",Eh,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Vh=_e(_h,[["render",Ch]]),Nh={},vh={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"};function Bh(l,t){return e.openBlock(),e.createElementBlock("svg",vh,t[0]||(t[0]=[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)]))}const Sh=_e(Nh,[["render",Bh]]),Dh={},Ah={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"};function Mh(l,t){return e.openBlock(),e.createElementBlock("svg",Ah,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M12 9h.01"},null,-1),e.createElementVNode("path",{d:"M11 12h1v4h1"},null,-1),e.createElementVNode("path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z"},null,-1)]))}const Th=_e(Dh,[["render",Mh]]),Lh={key:0,class:"flex items-start gap-x-1"},$h={key:0,class:"text-red-500 text-[14px]"},Fh=["title"],Ih=["disabled"],Zo=e.defineComponent({__name:"vs-input-switcher",props:e.mergeModels({rules:{default:()=>[]},view:{default:"checkbox"},label:{default:""},i:{default:""},text:{default:""},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue");return(n,r)=>{var o,s;return t.view==="checkbox"?(e.openBlock(),e.createElementBlock("div",Lh,[e.createVNode($n,{modelValue:a.value,"onUpdate:modelValue":r[0]||(r[0]=i=>a.value=i),label:n.text,error:n.error||""},null,8,["modelValue","label","error"]),(o=n.rules)!=null&&o.includes("required")?(e.openBlock(),e.createElementBlock("span",$h,"*")):e.createCommentVNode("",!0),n.i?(e.openBlock(),e.createElementBlock("button",{key:1,class:"cursor-pointer",title:n.i,onClick:r[1]||(r[1]=e.withModifiers(()=>{},["prevent"]))},[e.createVNode(e.unref(Th),{class:"text-gray-500 w-[14px] h-[14px]"})],8,Fh)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:e.normalizeClass(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50",[a.value?`bg-${((s=n.style)==null?void 0:s.primaryColor)||"blue"}-500`:"bg-stone-200",n.customClass]]),disabled:n.disabled,onClick:r[2]||(r[2]=i=>a.value=!a.value)},[e.createElementVNode("span",{"data-state":"checked",class:e.normalizeClass(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform",[a.value?"translate-x-4":"translate-x-0"]])},null,2)],10,Ih))}}}),Oh=["id","innerHTML"],Qo=e.defineComponent({__name:"vs-input-static",props:{text:{default:""},html:{default:""},style:{},customClass:{default:""},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",{id:t.name,class:e.normalizeClass(["text-gray-900",t.customClass]),innerHTML:t.html?t.html:t.text},null,10,Oh))}}),Ph=["placeholder","disabled","name"],Rh=e.defineComponent({__name:"vs-input-mask",props:e.mergeModels({name:{},mask:{default:""},unmask:{type:Boolean,default:!1},placeholder:{default:"_"},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),n=e.useModel(l,"modelValue"),r=e.ref(null);let o=null;return e.onMounted(async()=>{if(r.value){const{default:s}=await Promise.resolve().then(()=>w4);o=s(r.value,{mask:t.mask||"",definitions:{9:/[0-9]/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},lazy:!1}),o.on("accept",()=>{n.value=t.unmask?o.unmaskedValue:o.value}),o.on("complete",()=>{n.value=t.unmask?o.unmaskedValue:o.value}),o.value=n.value??""}}),e.onBeforeUnmount(()=>{o==null||o.destroy()}),e.watch(()=>t.mask,s=>{o&&o.updateOptions({mask:s,definitions:{9:/[0-9]/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/}})}),e.watch(n,s=>{o&&o.unmaskedValue!==s&&(o.value=s||"")}),(s,i)=>(e.openBlock(),e.createElementBlock("input",{type:"text",ref_key:"inputEl",ref:r,placeholder:s.placeholder,disabled:s.disabled,name:s.name,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"}},null,10,Ph))}}),jh={class:"relative w-full bg-white rounded-lg"},Uh=["placeholder","disabled"],zh=e.defineComponent({__name:"vs-input-email",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:null},name:{},placeholder:{default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),n=e.useModel(l,"modelValue");return(r,o)=>(e.openBlock(),e.createElementBlock("div",jh,[o[1]||(o[1]=e.createStaticVNode('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>',1)),e.withDirectives(e.createElementVNode("input",{type:"email","onUpdate:modelValue":o[0]||(o[0]=s=>n.value=s),placeholder:r.placeholder,disabled:r.disabled,class:e.normalizeClass(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":r.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,Uh),[[e.vModelText,n.value]])]))}}),Hh=["value","disabled"],qh={class:"text-[13px] text-gray-700"},Gh=e.defineComponent({__name:"vs-input-radio-default",props:e.mergeModels({style:{},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{},value:{},text:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>!!t.disabled);return(r,o)=>{var s,i;return e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["flex items-center gap-0",[t.customClass,n.value?"cursor-not-allowed opacity-60":""]])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=c=>a.value=c),type:"radio",value:t.value,disabled:n.value,class:"hidden"},null,8,Hh),[[e.vModelRadio,a.value]]),e.createElementVNode("span",{class:e.normalizeClass(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]",[`border-${((s=t.style)==null?void 0:s.primaryColor)||"blue"}-500`,n.value?"opacity-50 cursor-not-allowed":""]])},[a.value==t.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["w-[12px] h-[12px] shrink-0 rounded-full",[`bg-${((i=t.style)==null?void 0:i.primaryColor)||"blue"}-500`]])},null,2)):e.createCommentVNode("",!0)],2),e.createElementVNode("span",qh,e.toDisplayString(t.text),1)],2)}}}),Wh=["value","disabled"],Kh={class:"text-[13px] text-gray-700"},Yh=e.defineComponent({__name:"vs-input-radio-buttons",props:e.mergeModels({style:{},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{},value:{},text:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>!!t.disabled);return(r,o)=>{var s;return e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["flex items-center border rounded-lg px-2 py-1",[a.value==t.value?`ring-2 ring-ring ring-${((s=t.style)==null?void 0:s.primaryColor)||"blue"}-500`:"",t.customClass,n.value?"cursor-not-allowed opacity-60":""]])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>a.value=i),type:"radio",value:t.value,disabled:n.value,class:"hidden"},null,8,Wh),[[e.vModelRadio,a.value]]),e.createElementVNode("span",Kh,e.toDisplayString(t.text),1)],2)}}}),Xh={"vs-input-radio-default":Gh,"vs-input-radio-buttons":Yh},Jo=e.defineComponent({__name:"vs-input-radio",props:e.mergeModels({options:{},position:{default:"vertical"},view:{default:"default"},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>Xh[`vs-input-radio-${t.view}`]);return(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([r.position==="horizontal"?"flex items-center flex-wrap gap-2":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,s=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),e.mergeProps({key:s==null?void 0:s.id,text:s.text,value:s.id.toString(),checked:a.value===s.id,modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=i=>a.value=i)},{ref_for:!0},r.$attrs),null,16,["text","value","checked","modelValue"]))),128))],2))}}),Zh={key:1,class:"w-full flex flex-col gap-4"},Qh={key:0,class:"text-sm font-medium text-muted-foreground my-2"},Jh="Без категорії",e0=e.defineComponent({__name:"vs-input-checkbox",props:{options:{default:()=>[]},position:{default:"vertical"},slots:{default:null},colSpan:{default:0},data:{},view:{},group:{default:void 0},values:{default:()=>[]},style:{},customClass:{},disabled:{type:Boolean},modelValue:{default:!1},error:{},name:{},placeholder:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,n=t,r=e.ref([]),o=e.reactive({}),s=f=>(f==null?void 0:f.value)||(f==null?void 0:f.id)||(f==null?void 0:f.text)||f,i=f=>f.text||String(f),c=f=>`lg:col-span-${f||12}`,u=e.computed(()=>[a.position==="vertical"?"flex flex-col":"",a.colSpan?"grid":"flex justify-start"]),d=f=>f==null||f===""?null:typeof f=="string"||typeof f=="number"?f:String(f),m=e.computed(()=>{var x;if(!a.group)return[];const f=new Map;r.value.forEach(w=>{var V;const b=w[a.group],_=d(b);f.has(_)||f.set(_,[]),(V=f.get(_))==null||V.push(w)});const y=[];(x=a.values)!=null&&x.length&&a.values.forEach(w=>{const b=d(w);y.push(b)});const k=new Set,g=w=>{const b=f.get(w)||[];if(!b.length)return null;const _=w===null?"group-null":`group-${String(w)}`,V=w===null?Jh:String(w);return k.add(w),{key:_,label:V,options:b}},p=[];return y.forEach(w=>{const b=g(w);b&&p.push(b)}),f.forEach((w,b)=>{if(k.has(b))return;const _=g(b);_&&p.push(_)}),p}),h=async()=>{try{const f=await fetch(`/api/suggest/${a.data}`).then(y=>y.json());r.value=(f==null?void 0:f.data)||f}catch(f){console.error(f)}};return e.watch(()=>a.modelValue,f=>{if(typeof f=="boolean"&&r.value.length===1){const y=s(r.value[0]);o[y]=f}else if(Array.isArray(f)){const y=new Set(f);r.value.forEach(k=>{if(!k.disabled){const g=s(k);o[g]=y.has(g)}})}},{immediate:!0}),e.watch(o,()=>{if(!r.value.length){n("update:modelValue",null);return}const f=Object.entries(o).filter(([,y])=>y).map(([y])=>y);n("update:modelValue",f.length===0?[]:f)},{deep:!0}),e.onMounted(()=>{if(a.data)h().then(()=>{if(typeof a.modelValue=="boolean"&&r.value.length===1){const f=s(r.value[0]);o[f]=a.modelValue}else if(Array.isArray(a.modelValue)){const f=new Set(a.modelValue);r.value.forEach(y=>{if(!y.disabled){const k=s(y);o[k]=f.has(k)}})}});else if(r.value=a.options,typeof a.modelValue=="boolean"&&r.value.length===1){const f=s(r.value[0]);o[f]=a.modelValue}else if(Array.isArray(a.modelValue)){const f=new Set(a.modelValue);r.value.forEach(y=>{if(!y.disabled){const k=s(y);o[k]=f.has(k)}})}}),(f,y)=>a.group?(e.openBlock(),e.createElementBlock("div",Zh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,k=>(e.openBlock(),e.createElementBlock("div",{key:k.key,class:"flex flex-col gap-2"},[k.label?(e.openBlock(),e.createElementBlock("span",Qh,e.toDisplayString(k.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["p-0 w-full gap-[12px]",u.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.options,g=>(e.openBlock(),e.createBlock($n,{modelValue:o[s(g)],"onUpdate:modelValue":p=>o[s(g)]=p,value:s(g),class:e.normalizeClass(c(f.colSpan)),disabled:a.disabled||g.disabled,label:i(g),key:`${k.key}-${s(g)}`,icon:g==null?void 0:g.icon,imgUrl:g==null?void 0:g.imgUrl,option:g,view:f.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","view"]))),128))],2)]))),128))])):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["p-0 w-full gap-[10px]",u.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,k=>(e.openBlock(),e.createBlock($n,{modelValue:o[s(k)],"onUpdate:modelValue":g=>o[s(k)]=g,value:s(k),class:e.normalizeClass(c(f.colSpan)),disabled:a.disabled||k.disabled,label:i(k),key:s(k),icon:k==null?void 0:k.icon,imgUrl:k==null?void 0:k.imgUrl,option:k,view:f.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","view"]))),128))],2))}}),es=_e(e0,[["__scopeId","data-v-8e66207e"]]),t0=["type","placeholder","disabled"],l0=e.defineComponent({__name:"vs-input-date1",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},mode:{default:"date"}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l;function n(d){return d?a.mode==="datetime"?(d.includes("T")?d:null)||d+(d.includes(" ")?"":"T00:00"):d==null?void 0:d.split(" ")[0]:null}const{inputClass:r}=ft(a.style),o=t,s=e.computed({get:()=>n(a.modelValue),set:d=>o("update:modelValue",d)}),i=e.computed(()=>a.mode==="datetime"?"datetime-local":a.mode),c=e.computed(()=>!!a.disabled),u=e.computed(()=>a.placeholder??"");return(d,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:i.value,"onUpdate:modelValue":m[0]||(m[0]=h=>s.value=h),placeholder:u.value,disabled:c.value,ref:"date",class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[d.modelValue?"":"text-opacity-50",e.unref(r)].join(" ")]),style:{border:"1px solid #CFD9E0"}},null,10,t0)),[[e.vModelDynamic,s.value]])}}),ts=async(l,t,a,n)=>{var r;try{const o=new FormData;return o.append("unique","true"),o.append("file",l),(r=await fetch(`/file/upload/uploads?id=${t||""}&form=${a||""}&table=${n||""}`,{method:"POST",body:o}).then(s=>s.json()))==null?void 0:r.result}catch(o){return xe({type:"error",title:"Помилка!",message:"Сталась помилка під час завантаження файлу",position:"right-bottom"}),console.error("Сталась помилка завантаження файлу",o),null}},a0=async l=>{try{return await fetch(`file/delete${l}`),!0}catch(t){return console.error(t),!1}},ls=async l=>{try{const t=await fetch(`file/download/files/uploads${l}`),a=await t.arrayBuffer(),n=t.headers["content-type"],r=new TextDecoder("utf-8").decode(a),o=new Blob([r],{type:n}),s=document.createElement("a");s.setAttribute("download",l),s.href=window.URL.createObjectURL(o),s.click()}catch(t){console.error(t.message)}},n0={},r0={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"};function o0(l,t){return e.openBlock(),e.createElementBlock("svg",r0,t[0]||(t[0]=[e.createElementVNode("path",{d:"M5 12h14"},null,-1),e.createElementVNode("path",{d:"M12 5v14"},null,-1)]))}const Gl=_e(n0,[["render",o0]]),s0={},i0={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-text",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function c0(l,t,a,n,r,o){return e.openBlock(),e.createElementBlock("svg",i0,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>',6)]))}const d0=_e(s0,[["render",c0]]),u0={},m0={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-table",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function p0(l,t,a,n,r,o){return e.openBlock(),e.createElementBlock("svg",m0,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"},null,-1),e.createElementVNode("line",{x1:"4",y1:"10",x2:"20",y2:"10"},null,-1),e.createElementVNode("line",{x1:"10",y1:"4",x2:"10",y2:"20"},null,-1)]))}const f0=_e(u0,[["render",p0]]),h0={},g0={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"};function y0(l,t){return e.openBlock(),e.createElementBlock("svg",g0,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M9 9l1 0"></path><path d="M9 13l6 0"></path><path d="M9 17l6 0"></path>',6)]))}const as=_e(h0,[["render",y0]]),b0={},k0={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-zip",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function x0(l,t,a,n,r,o){return e.openBlock(),e.createElementBlock("svg",k0,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>',9)]))}const w0=_e(b0,[["render",x0]]),_0={},E0={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-code",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function C0(l,t,a,n,r,o){return e.openBlock(),e.createElementBlock("svg",E0,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>',5)]))}const V0=_e(_0,[["render",C0]]),N0=l=>{if(!l)return"";const t=l==null?void 0:l.split(".");return t[t.length-1]},v0=l=>{const t=N0(l),a={imageFormat:["tiff","jpg","jpeg","png","svg","ico","webp"],sheetsFormat:["xls","csv","xlsx"],archivesFormat:["zip","rar"],textsFormat:["json","geojson","txt","yml","yaml","shp"],documentsFormat:["pdf"]};return a.imageFormat.includes(t)?"img":a.sheetsFormat.includes(t)?f0:a.textsFormat.includes(t)?V0:a.documentsFormat.includes(t)?d0:a.archivesFormat.includes(t)?w0:as},B0={},S0={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-trash"};function D0(l,t){return e.openBlock(),e.createElementBlock("svg",S0,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>',6)]))}const va=_e(B0,[["render",D0]]),A0={},M0={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function T0(l,t){return e.openBlock(),e.createElementBlock("svg",M0,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const ns=_e(A0,[["render",T0]]),L0=["title"],$0={class:"absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center"},F0=e.defineComponent({__name:"vs-input-file-list-item",props:e.mergeModels({format:{},multiple:{type:Boolean},max_size:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},{value:{},valueModifiers:{},item:{},itemModifiers:{}}),emits:["update:value","update:item"],setup(l){const t=e.useModel(l,"value"),a=e.useModel(l,"item"),n=l;return(r,o)=>(e.openBlock(),e.createElementBlock("div",{title:a.value,class:"h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(v0)(a.value)),{src:a.value,alt:"file",class:"w-full h-full object-cover cursor-pointer",onClick:o[0]||(o[0]=s=>e.unref(ls)(a.value))},null,8,["src"])),e.createElementVNode("div",$0,[e.createElementVNode("button",{type:"button",onClick:o[1]||(o[1]=s=>{var i;e.unref(a0)(a.value),t.value=n.multiple?(i=t.value)==null?void 0:i.filter(c=>c!==a.value):""}),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"},[e.createVNode(va,{class:"w-4 h-4"})]),e.createElementVNode("button",{type:"button",onClick:o[2]||(o[2]=s=>e.unref(ls)(a.value)),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"},[e.createVNode(ns,{class:"w-4 h-4"})])])],8,L0))}}),rs=_e(F0,[["__scopeId","data-v-286cdbc0"]]),I0={class:"flex items-center gap-x-2"},O0=["multiple","disabled"],P0={key:1,class:"flex items-center flex-wrap gap-2"},R0={key:1,class:"loader"},j0={key:1,class:"loader"},U0=e.defineComponent({__name:"vs-input-file",props:e.mergeModels({format:{},multiple:{type:Boolean},max_size:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(l,{emit:t}){const a=l,n=e.useModel(l,"modelValue"),r=t,o=e.ref(null),s=e.ref(!1),i=d=>Array.isArray(n.value)&&n.value[d]||"",c=d=>{if(a.max_size&&d.size>a.max_size*1024*1024){const m=(d.size/1048576).toFixed(2);return xe({type:"error",title:"Помилка!",message:`Файл "${d.name}" занадто великий. Максимальний розмір: ${a.max_size} МБ, розмір файлу: ${m} МБ`,position:"right-bottom"}),!1}return!0},u=async d=>{const{files:m}=d.target;if(!m||m.length===0)return;const h=Array.from(m);if(a.max_size&&h.filter(f=>!c(f)).length>0){o.value&&(o.value.value="");return}s.value=!0;try{if(a.multiple){const f=Array.from(m).map(async k=>a.format&&!k.name.endsWith(a.format)?null:await ts(k,"1","form","table")),y=(await Promise.all(f)).filter(k=>k!==null).map(k=>k==null?void 0:k.file_path).filter(Boolean);n.value=[...n.value||[],...y],r("change",n.value)}else{const f=m[0];if(a.format&&!f.name.endsWith(a.format))return;const y=await ts(f,"1","form","table");n.value=y==null?void 0:y.file_path,r("change",n.value||"")}}finally{s.value=!1,o.value&&(o.value.value="")}};return(d,m)=>(e.openBlock(),e.createElementBlock("div",I0,[e.createElementVNode("input",{class:"hidden",ref_key:"fileInput",ref:o,type:"file",multiple:d.multiple,onChange:u,disabled:s.value||d.disabled},null,40,O0),!d.multiple&&n.value?(e.openBlock(),e.createBlock(rs,{key:0,item:n.value,"onUpdate:item":m[0]||(m[0]=h=>n.value=h),value:n.value,"onUpdate:value":m[1]||(m[1]=h=>n.value=h)},null,8,["item","value"])):d.multiple?(e.openBlock(),e.createElementBlock("div",P0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(h,f)=>(e.openBlock(),e.createBlock(rs,{multiple:d.multiple,key:f,value:n.value,"onUpdate:value":m[2]||(m[2]=y=>n.value=y),item:i(f)},null,8,["multiple","value","item"]))),128)),e.createElementVNode("div",{onClick:m[3]||(m[3]=h=>{var f;return!d.disabled&&!s.value&&((f=o.value)==null?void 0:f.click())}),class:e.normalizeClass(["relative h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",d.disabled||s.value?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500 hover:bg-blue-50"])},[s.value?(e.openBlock(),e.createElementBlock("div",R0)):(e.openBlock(),e.createBlock(Gl,{key:0,class:"w-6 h-6"}))],2)])):e.createCommentVNode("",!0),d.multiple?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:m[4]||(m[4]=h=>{var f;return(f=o.value)==null?void 0:f.click()}),class:e.normalizeClass([d.disabled||s.value?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500","relative h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])},[s.value?(e.openBlock(),e.createElementBlock("div",j0)):(e.openBlock(),e.createBlock(Gl,{key:0,class:"w-6 h-6"}))],2))]))}}),z0=_e(U0,[["__scopeId","data-v-e613a523"]]),H0={class:"max-w-[55vw]"},q0={class:"text-sm font-semibold text-gray-800 truncate dark:text-neutral-200"},G0={class:"flex items-center text-xs text-gray-500 truncate dark:text-neutral-500"},W0={class:"px-[5px]"},K0={class:""},Ba=e.defineComponent({__name:"vs-widget-file-info",props:{item:{default:null}},setup(l){const t=l,a=e.computed(()=>{try{return new Date(t.item.cdate).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}});function n(r){if(r<1024)return`${r} B`;const o=r/1024;return o<1024?`${o.toFixed(2)} KB`:`${(o/1024).toFixed(2)} MB`}return(r,o)=>{var s,i,c,u;return e.openBlock(),e.createElementBlock(e.Fragment,null,[o[1]||(o[1]=e.createStaticVNode('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" 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-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>',1)),e.createElementVNode("div",H0,[e.createElementVNode("p",q0,e.toDisplayString((s=r.item)==null?void 0:s.uploaded_name),1),e.createElementVNode("p",G0,[e.createElementVNode("span",null,e.toDisplayString((i=r.item)==null?void 0:i.username),1),e.withDirectives(e.createElementVNode("span",W0,"|",512),[[e.vShow,(c=r.item)==null?void 0:c.username]]),e.createElementVNode("span",null,e.toDisplayString(a.value),1),o[0]||(o[0]=e.createElementVNode("span",{class:"px-[5px]"},"|",-1)),e.createElementVNode("span",K0,e.toDisplayString(n((u=r.item)==null?void 0:u.size)),1)])])],64)}}}),Y0={class:"p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full"},X0={key:0,class:"flex w-full gap-x-3 items-center"},Z0={key:1,class:"flex gap-x-3 w-full items-center"},Q0={key:2,class:"flex gap-x-3 w-full items-center"},J0=["href"],eg={key:3,class:"flex gap-x-3 w-full items-center"},tg={class:"lg:absolute lg:top-3 lg:end-1 opacity-100"},lg={class:"p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700"},ag={class:"inline-block"},ng={class:"inline-block"},rg=e.defineComponent({__name:"vs-widget-file-item",props:{item:{default:null},index:{default:0},prefix:{default:"/api"}},emits:["update","openModal","openLightbox"],setup(l,{emit:t}){const a=l,n=t;function r(d){return["pdf","json"].includes(d.ext)}function o(d){return["ppt","pptx","doc","docx","xls","xlsx"].includes(d.ext)}function s(d){const m=document.createElement("a");m.setAttribute("download",d==null?void 0:d.uploaded_name),m.href=d==null?void 0:d.file_path,m.click()}async function i(){try{await fetch(`${a.prefix}/widget/file/${a.item.entity_id}/${a.item.file_id}`),n("update")}catch(d){console.error(d)}}function c(){n("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:i,updateListOnConfirm:!0})}function u(d){(a.item.ext==="jpg"||a.item.ext==="png")&&n("openLightbox",{item:a.item,index:d})}return(d,m)=>(e.openBlock(),e.createElementBlock("div",Y0,[d.item.ext==="jpg"||d.item.ext==="png"?(e.openBlock(),e.createElementBlock("div",X0,[e.createElementVNode("div",{class:"max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",onClick:m[0]||(m[0]=h=>u(d.index))},[e.createVNode(Ba,{item:d.item},null,8,["item"])])])):r(d.item)?(e.openBlock(),e.createElementBlock("div",Z0,[e.createVNode(Ba,{item:d.item},null,8,["item"])])):o(d.item)?(e.openBlock(),e.createElementBlock("div",Q0,[e.createElementVNode("a",{href:`/api/file-preview?id=${d.item.file_id}`,target:"_blank",class:"flex gap-x-3 w-full items-center"},[e.createVNode(Ba,{item:d.item},null,8,["item"])],8,J0)])):(e.openBlock(),e.createElementBlock("div",eg,[e.createVNode(Ba,{item:d.item},null,8,["item"])])),e.createElementVNode("div",tg,[e.createElementVNode("div",lg,[e.createElementVNode("div",ag,[e.createElementVNode("button",{class:"inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:m[1]||(m[1]=h=>s(d.item))},[e.createVNode(ns,{height:"14",width:"14"})])]),m[3]||(m[3]=e.createElementVNode("div",{class:"w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700"},null,-1)),e.createElementVNode("div",ng,[e.createElementVNode("button",{type:"button",class:"size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",onClick:m[2]||(m[2]=h=>c())},[e.createVNode(va,{height:"14",width:"14"})])])])])]))}}),og={},sg={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function ig(l,t){return e.openBlock(),e.createElementBlock("svg",sg,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const cg=_e(og,[["render",ig]]),dg={class:"flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full"},ug={class:"flex w-full mb-[12px] items-center gap-x-2"},mg={class:"font-semibold text-gray-800 dark:text-neutral-200 text-[14px]"},pg={class1:"ml-auto"},fg={class:"py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},hg={key:0,class:"py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"},gg={class:"relative"},yg={key:1,class:"space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},bg={key:0},kg=e.defineComponent({__name:"vs-input-file-list",props:{id:{default:""},prefix:{default:"/api"},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},emits:["update"],setup(l,{emit:t}){const a=l,n=e.inject("form"),r=e.computed(()=>n.value.formId),o=e.ref(!1),s=e.ref(0),i=t,c=e.ref(!1),u=e.ref({}),d=e.ref([]),m=e.ref(""),h=e.computed(()=>Array.isArray(d.value)?d.value.filter(w=>w.ext==="jpg"||w.ext==="png").map(w=>w==null?void 0:w.file_path):[]),f=e.computed(()=>m.value===""?d.value:d.value.filter(w=>{var b;return(b=w==null?void 0:w.uploaded_name)==null?void 0:b.includes(m.value)})),y=w=>{const b=h.value.findIndex(_=>_===w.item.file_path);b!==-1&&(o.value=!0,s.value=b)},k=async()=>{try{const w=await fetch(`${a.prefix}/widget/file/${r.value}`).then(b=>b.json());d.value=w==null?void 0:w.rows}catch(w){console.error(w)}},g=async w=>{await Promise.all(Array.from(w.target.files).map(async b=>{const _=new FormData;_.append("file",b);try{const V=`${a.prefix}/widget/file/${r.value}`,E=await fetch(V,{method:"POST",body:_});return E.ok?(i("update","file-list"),b):(xe({type:E.status>=400&&E.status<500?"warning":"error",title:"Error",message:`Error code: ${E.status}`}),null)}catch(V){return xe({type:"error",title:"Error",message:V.message||"Unknown error"}),console.error(V),null}})),await k()},p=w=>{const b={...w};return w.cancel||(b.cancel=()=>{c.value=!1}),w.updateListOnConfirm&&(b.confirm=async()=>{await w.confirm(),c.value=!1,k()}),b},x=w=>{u.value=p(w),c.value=!0};return e.watch(r,w=>{w&&k()}),e.onMounted(()=>{r.value&&k()}),(w,b)=>{var E,M,D;const _=e.resolveComponent("Lightbox"),V=e.resolveComponent("MessageBox");return e.openBlock(),e.createElementBlock("div",dg,[e.createElementVNode("div",ug,[e.createElementVNode("h2",mg," Файлів: "+e.toDisplayString((E=d.value)==null?void 0:E.length),1),e.createElementVNode("div",pg,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:b[0]||(b[0]=A=>g(A))},null,32),e.createElementVNode("div",fg,[e.createVNode(cg,{height:"16",width:"16"})])])])]),((M=d.value)==null?void 0:M.length)>4?(e.openBlock(),e.createElementBlock("div",hg,[e.createElementVNode("div",null,[e.createElementVNode("div",gg,[b[8]||(b[8]=e.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5"},[e.createElementVNode("svg",{class:"flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",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"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),e.createElementVNode("path",{d:"m21 21-4.3-4.3"})])],-1)),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":b[1]||(b[1]=A=>m.value=A),class:"py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Введіть назву файлу"},null,512),[[e.vModelText,m.value,void 0,{trim:!0}]])])])])):e.createCommentVNode("",!0),(D=d.value)!=null&&D.length?(e.openBlock(),e.createElementBlock("div",yg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(A,$)=>(e.openBlock(),e.createBlock(rg,{key:$,prefix:w.prefix,item:A,index:$,onUpdate:b[2]||(b[2]=U=>w.$emit("update","file-list")),onOpenModal:b[3]||(b[3]=U=>x(U)),onOpenLightbox:b[4]||(b[4]=U=>y(U))},null,8,["prefix","item","index"]))),128)),f.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",bg,b[9]||(b[9]=[e.createElementVNode("p",{class:"text-sm text-gray-600 font-sm"}," Файлів з такою назвою не існує, введіть інше пошукове слово ",-1)])))])):e.createCommentVNode("",!0),e.createVNode(_,{modelValue:o.value,"onUpdate:modelValue":b[5]||(b[5]=A=>o.value=A),startIndex:s.value,"onUpdate:index":b[6]||(b[6]=A=>s.value=A),images:h.value},null,8,["modelValue","startIndex","images"]),e.createVNode(V,e.mergeProps({modelValue:c.value,"onUpdate:modelValue":b[7]||(b[7]=A=>c.value=A),onConfirm:u.value.confirm},u.value),null,16,["modelValue","onConfirm"])])}}}),xg={class:"flex items-center justify-between"},wg={class:"text-[16px] text-gray-900 font-medium"},_g={class:"grid gap-3"},Eg=e.defineComponent({__name:"vs-container-switcher",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(l){const t=l,a=e.ref(t.isOpen);return e.watch(()=>t.isOpen,n=>{a.value=n}),(n,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",xg,[e.createElementVNode("p",wg,e.toDisplayString(l.title),1),e.createVNode(Zo,{modelValue:a.value,"onUpdate:modelValue":r[0]||(r[0]=o=>a.value=o),style:e.normalizeStyle(l.style)},null,8,["modelValue","style"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",_g,[e.renderSlot(n.$slots,"default",{},void 0,!0)],512),[[e.vShow,a.value]])]),_:3})]))}}),Cg=_e(Eg,[["__scopeId","data-v-90320b87"]]),Vg={class:"text-[16px] text-gray-900 font-medium"},Ng={class:"grid gap-3"},vg=e.defineComponent({__name:"vs-container-accordion",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(l){const t=l,a=e.ref(t.isOpen);return e.watch(()=>t.isOpen,n=>{a.value=n}),(n,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{type:"button",onClick:r[0]||(r[0]=o=>a.value=!a.value),class:"flex items-center gap-2"},[e.createVNode(e.unref(Vh),{class:e.normalizeClass(["h-4 w-4 duration-300",[a.value?"-rotate-180":""]])},null,8,["class"]),e.createElementVNode("span",Vg,e.toDisplayString(l.title),1)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Ng,[e.renderSlot(n.$slots,"default",{},void 0,!0)],512),[[e.vShow,a.value]])]),_:3})]))}}),Bg=_e(vg,[["__scopeId","data-v-590eff11"]]),Sg={class:"flex items-center justify-between"},Dg=e.defineComponent({__name:"vs-container-default",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Sg,[e.createElementVNode("p",null,e.toDisplayString(l.title),1)]),e.renderSlot(t.$slots,"default")]))}}),Ag={switcher:Cg,accordion:Bg,default:Dg},wt={Equal:"==",Inequal:"!=",Higer:">",HigerOrEqual:">=",Lower:"<",LowerOrEqual:"<=",Between:"between",StartWith:"^",EndWith:"$",Contain:"*",In:"in",NotIn:"not_in"},Mg=(l,t)=>String(l)===String(t),Tg=(l,t)=>String(l)!==String(t),Lg=(l,t)=>l>t,$g=(l,t)=>l>=t,Fg=(l,t)=>l<t,Ig=(l,t)=>l<=t,Og=(l,t)=>Array.isArray(t)&&t.length===2?l>=t[0]&&l<=t[1]:!1,Pg=(l,t)=>String(l).startsWith(String(t)),Rg=(l,t)=>String(l).endsWith(String(t)),jg=(l,t)=>String(l).includes(String(t)),Ug=(l,t)=>Array.isArray(t)?t.includes(l):!1,zg=(l,t)=>Array.isArray(t)?!t.includes(l):!0,os=(l,t)=>{if(!t)return!0;switch(t==null?void 0:t[1]){case wt.Equal:return Mg(l,t==null?void 0:t[2]);case wt.Inequal:return Tg(l,t==null?void 0:t[2]);case wt.Higer:return Lg(l,t==null?void 0:t[2]);case wt.HigerOrEqual:return $g(l,t==null?void 0:t[2]);case wt.Lower:return Fg(l,t==null?void 0:t[2]);case wt.LowerOrEqual:return Ig(l,t==null?void 0:t[2]);case wt.Between:return Og(l,t==null?void 0:t[2]);case wt.StartWith:return Pg(l,t==null?void 0:t[2]);case wt.EndWith:return Rg(l,t==null?void 0:t[2]);case wt.Contain:return jg(l,t==null?void 0:t[2]);case wt.In:return Ug(l,t==null?void 0:t[2]);case wt.NotIn:return zg(l,t==null?void 0:t[2]);default:return!0}},Hg=e.defineComponent({__name:"vs-input-container",props:{style:{type:Object,default:()=>({})},title:{type:String,default:""},view:{type:String,default:"default"},name:{type:String,default:""},schema:{type:Array,default:()=>[]}},setup(l){const t=l,a=e.inject("values",e.ref({})),n=e.inject("form"),r=e.computed(()=>{var i;return(i=t.schema)==null?void 0:i.filter(c=>{var h,f,y,k;const u=c==null?void 0:c.conditions;if(!u)return!0;const d=Array.isArray(u)?u[0]:u,m=t.name?((f=(h=a.value)==null?void 0:h[t.name])==null?void 0:f[d])??((y=a.value)==null?void 0:y[d]):(k=a.value)==null?void 0:k[d];return os(m,u)})}),o=e.computed(()=>Ag[t.view]),s=e.computed(()=>{if(a.value||(a.value={}),!t.name)return a.value;const i=a.value[t.name];if(i)return i;const c={};return a.value={...a.value,[t.name]:c},c});return(i,c)=>{var u;return(u=l.schema)!=null&&u.length?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value),{key:0,title:l.title,style:e.normalizeStyle(l.style)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,d=>{var m,h;return e.openBlock(),e.createBlock(is,e.mergeProps({key:d.name},{ref_for:!0},d,{item:d,modelValue:s.value[d.name],"onUpdate:modelValue":f=>s.value[d.name]=f,style:l.style,error:(h=(m=e.unref(n))==null?void 0:m.errors)==null?void 0:h[d.name]}),null,16,["item","modelValue","onUpdate:modelValue","style","error"])}),128))]),_:1},8,["title","style"])):e.createCommentVNode("",!0)}}}),qg=["aria-expanded","data-focus"],Gg={key:0,class:"flex flex-wrap items-center gap-1 overflow-y-auto min-w-0 flex-1"},Wg={class:"flex items-center min-w-0"},Kg=["title"],Yg=["innerHTML"],Xg=["onClick"],Zg={class:"flex-1 min-w-[2px]"},Qg=["placeholder"],Jg=["title"],ey=["innerHTML"],ty={key:2,class:"flex-1 min-w-[2px]"},ly=["placeholder"],ay={class:"flex items-center shrink-0"},ny=["disabled"],ry=["disabled","title"],oy=["aria-disabled","onClick"],sy=["innerHTML"],iy={key:1,class:"px-3 py-2 text-center text-gray-500"},cy=["disabled"],Fn=e.defineComponent({__name:"vs-input-select",props:{multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},mode:{},defaultValue:{},search:{type:Boolean,default:!0},placeholder:{default:"Оберіть значення"},prefix:{default:"api"},host:{default:""},data:{default:""},options:{default:()=>[]},api:{default:null},maxHeight:{default:400},parent:{},set:{},slot:{},add:{},teleport:{default:"body"},auto:{default:0},style:{default:()=>({})},customClass:{default:""},modelValue:{},error:{default:null},name:{}},emits:["change","update:modelValue"],setup(l,{emit:t}){const a=l,n=t,r=e.computed(()=>a.multiple),o=e.computed(()=>a.disabled);ft(a.style);const s=e.computed({get:()=>a.modelValue,set:B=>n("update:modelValue",B)});!s.value&&a.defaultValue&&(s.value=a.defaultValue);const i=e.ref(null),c=e.ref(null),u=e.ref(null),d=e.ref(null),m=e.ref(!1),h=e.ref(!1),f=e.ref(null),y=e.ref([]),k=e.ref(-1),g=e.ref([]),p=e.ref(""),x=e.ref(null),w=e.ref("bottom"),b=e.ref({}),_=e.ref([]),V=e.computed(()=>{if(!_.value.length)return[];const B=y.value,P=new Map(B.map(Y=>{var te;return[(te=Y.id)==null?void 0:te.toString(),Y]}));return _.value.map(Y=>P.get(Y==null?void 0:Y.toString())).filter(Y=>!!Y)}),E=e.computed(()=>a.placeholder||"Select..."),M=e.computed(()=>T(f.value));e.computed(()=>r.value?!_.value.length&&p.value==="":!M.value&&p.value==="");const D=e.computed(()=>o.value?!1:r.value?_.value.length>0:!!s.value),A=B=>{var P;return r.value?_.value.some(Y=>(Y==null?void 0:Y.toString())===(B==null?void 0:B.toString())):((P=s.value)==null?void 0:P.toString())===(B==null?void 0:B.toString())},$=e.computed(()=>{let B=y.value??[];if(!a.data&&p.value.trim()!==""){const P=p.value.toLowerCase();B=B.filter(Y=>{var we,Oe;const te=T(Y).toLowerCase(),he=((Oe=(we=Y.text)==null?void 0:we.toLowerCase)==null?void 0:Oe.call(we))||"";return te.includes(P)||he.includes(P)})}if(r.value&&_.value.length){const P=new Set(_.value.map(Y=>Y==null?void 0:Y.toString()));B=B.filter(Y=>{var te;return!P.has((te=Y.id)==null?void 0:te.toString())})}return B}),U=e.inject("values"),W=/\{\{\s*([^}]+?)\s*\}\}/g,O=B=>(B?String(B):"").replace(/<[^>]*>/g,"").trim(),I=e.computed(()=>a.slot??(a==null?void 0:a.optionTemplate)??""),F=B=>{if(!B)return"";const P=I.value;return P?P.replace(W,(Y,te)=>{const he=te.trim(),we=B[he];return we!=null?String(we):""}):B.text??""},T=B=>{if(!B)return"";if(!I.value)return B.text??"";const P=F(B);return O(P)||B.text||""},z=B=>{a.set&&(U!=null&&U.value)&&Object.entries(a.set).forEach(([P,Y])=>{if(!P)return;const te=B?B[Y]:null;U.value[P]=te??null})},Q=e.computed(()=>{var B,P;return a.parent?((P=(B=U==null?void 0:U.value)==null?void 0:B[a.parent])==null?void 0:P.toString())??null:null}),me=async B=>{var P;if(!a.data){let Y=a.options??[];if(B!=null&&B.trim()){const te=B.toLowerCase();Y=Y.filter(he=>{var oe,mt;const we=T(he).toLowerCase(),Oe=((mt=(oe=he.text)==null?void 0:oe.toLowerCase)==null?void 0:mt.call(oe))||"";return we.includes(te)||Oe.includes(te)})}return Y}try{const Y=a.host??"",te=a.prefix??"api",he=a.api??`/${te}/suggest/${a.data}`,we=`${Y}${he}`,Oe=new URLSearchParams;return Oe.set("json","1"),B&&Oe.set("key",B),Q.value!==void 0&&Q.value!==null&&Q.value!==""&&Oe.set("parent",Q.value),((P=await fetch(`${we}?${Oe.toString()}`).then(oe=>oe.json()))==null?void 0:P.data)??[]}catch{return[]}},Ne=async()=>{a.data?y.value=await me(p.value):y.value=a.options?[...a.options]:[]},Ke=async B=>{var Y,te,he;if(B==null)return null;const P=(Y=y.value)==null?void 0:Y.find(we=>{var Oe;return((Oe=we==null?void 0:we.id)==null?void 0:Oe.toString())===String(B)});if(P)return P;if(a.data)try{const we=a.host??"",Oe=a.prefix??"api",oe=a.api??`/${Oe}/suggest/${a.data}`,mt=`${we}${oe}`,Bt=new URLSearchParams;return Bt.set("json","1"),Bt.set("val",String(B)),Q.value!==void 0&&Q.value!==null&&Q.value!==""&&Bt.set("parent",Q.value),((he=((te=await fetch(`${mt}?${Bt.toString()}`).then(yl=>yl.json()))==null?void 0:te.data)??[])==null?void 0:he[0])??null}catch{return null}return null},Wt=async B=>{const P=new Set(y.value.map(te=>{var he;return(he=te.id)==null?void 0:he.toString()})),Y=B.filter(te=>!P.has(te==null?void 0:te.toString()));Y.length&&await Y.reduce(async(te,he)=>{await te;const we=await Ke(he);we&&y.value.push(we)},Promise.resolve())},Re=async()=>{o.value||(m.value=!0,await Ne(),await e.nextTick(()=>{var B;le(),(B=x.value)==null||B.focus(),$.value.length?k.value=0:k.value=-1}))},Ye=()=>{m.value=!1,k.value=-1},vt=async B=>{o.value||(m.value?Ye():await Re())},bt=async()=>{var B;m.value?(B=x.value)==null||B.focus():await Re()},Et=()=>{r.value?(_.value=[],s.value=[],n("change",[])):(f.value=null,s.value=null,n("change",null)),z(null),p.value="",e.nextTick(()=>{var B;return(B=x.value)==null?void 0:B.focus()})},Pt=B=>{r.value&&(_.value=_.value.filter(P=>(P==null?void 0:P.toString())!==(B==null?void 0:B.toString())),s.value=[..._.value],n("change",s.value),e.nextTick(()=>{var P;return(P=x.value)==null?void 0:P.focus()}))},at=B=>{r.value?(A(B.id)||(_.value=[..._.value,B.id],s.value=[..._.value],n("change",s.value)),p.value="",e.nextTick(()=>{var P;(P=x.value)==null||P.focus(),k.value=Math.min(k.value,$.value.length-1)}),z(null)):(f.value=B,s.value=B.id,n("change",s.value),p.value="",Ye(),z(B))},st=B=>{A(B.id)||at(B)},j=(B,P)=>{if(!B||!P)return;const Y=B.offsetTop,te=Y+B.offsetHeight,he=P.scrollTop,we=he+P.clientHeight;let Oe=P.scrollTop;Y<he?Oe=Y-80:te>we&&(Oe=te-P.clientHeight+4);const oe=P;oe.scrollTop=Oe},X=B=>{let P=B.parentElement;for(;P;){if(P.classList.contains("ui-dialog__content"))return P;const Y=window.getComputedStyle(P),te=Y.overflow+Y.overflowY+Y.overflowX;if(te.includes("auto")||te.includes("scroll")||P===document.body||P===document.documentElement)return P;P=P.parentElement}return document.body},le=()=>{if(!c.value)return;const B=c.value.getBoundingClientRect(),P=window.innerHeight||document.documentElement.clientHeight,Y=window.innerWidth||document.documentElement.clientWidth,te=8,he=8,we=a.maxHeight||300,Oe=P-B.bottom-he-te,oe=B.top-he-te,mt=Oe>=oe,Bt=Math.max(Y-te*2,0);let{width:yl}=B;Bt>0&&yl>Bt&&(yl=Bt);let{left:ca}=B;ca+yl+te>Y&&(ca=Y-yl-te),ca=Math.max(ca,te);const C4=Math.min(we,Math.max(mt?Oe:oe,50));w.value=mt?"bottom":"top",b.value={position:"fixed",left:`${ca}px`,width:`${yl}px`,minWidth:"300px",maxHeight:`${C4}px`,transform:mt?"none":"translateY(-100%)",top:mt?`${B.bottom+he}px`:`${B.top-he}px`}},ae=async B=>{o.value||!m.value&&(B.key==="ArrowDown"||B.key==="ArrowUp")&&(B.preventDefault(),await Re())},de=B=>{var Y;if(!m.value)return;const{key:P}=B;if(P==="ArrowDown")B.preventDefault(),k.value+1<$.value.length&&(k.value+=1,j(g.value[k.value],u.value));else if(P==="ArrowUp")B.preventDefault(),k.value>0&&(k.value-=1,j(g.value[k.value],u.value));else if(P==="Enter"){B.preventDefault();const te=$.value[k.value];te&&at(te),(Y=x.value)==null||Y.blur()}else P==="Escape"?(B.preventDefault(),Ye()):P==="Backspace"?r.value&&p.value===""&&_.value.length&&(_.value=_.value.slice(0,-1),s.value=[..._.value],n("change",s.value)):P==="Home"?(k.value=0,j(g.value[0],u.value)):P==="End"?(k.value=$.value.length-1,j(g.value[k.value],u.value)):P==="Tab"&&Ye()},Ae=()=>{o.value||(h.value=!0)},N=()=>{h.value=!1,p.value=""},v=B=>{B.key==="Escape"&&m.value&&Ye()},q=B=>{var Y,te;const P=B.target;(Y=i.value)!=null&&Y.contains(P)||(te=d.value)!=null&&te.contains(P)||Ye()},ne=B=>{m.value&&u.value&&!u.value.contains(B.target)&&le()},Te=()=>{m.value&&le()},Le=()=>{m.value&&le()};e.watch(()=>a.options,B=>{B!=null&&B.length&&(y.value=[...B],ye())},{immediate:!0});async function ye(){if(r.value)Array.isArray(s.value)?_.value=[...s.value]:(_.value=s.value==null?[]:[s.value],s.value=[..._.value]),a.data&&_.value.length&&(await Wt(_.value),await e.nextTick());else{if(Array.isArray(s.value)){const B=s.value[0]??null;s.value=B??null}s.value!=null&&(f.value=await Ke(s.value)),z(f.value??null)}}e.watch(s,()=>{ye()}),e.onMounted(async()=>{var B;addEventListener("keydown",v),addEventListener("scroll",ne,!0),addEventListener("resize",Te),document.addEventListener("click",q,!0),c.value&&X(c.value).addEventListener("scroll",Le,!0),(B=a.options)!=null&&B.length&&!a.data?y.value=[...a.options]:a.data&&(y.value=await me("")),await ye(),J.value=!1}),e.onUnmounted(()=>{removeEventListener("keydown",v),removeEventListener("scroll",ne,!0),removeEventListener("resize",Te),document.removeEventListener("click",q,!0),c.value&&X(c.value).removeEventListener("scroll",Le,!0)});const R=e.ref(!1),G=e.ref({}),be=e.ref([]),Be=e.ref(null);async function C(){var Y,te;if(!((Y=a.add)!=null&&Y.token)||Be!=null&&Be.value.validate())return;const B=a.add.api??`/api/table/${a.add.token}`,{id:P}=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G.value)}).then(he=>he.json());if(!((te=a.options)!=null&&te.length)&&a.data){const{data:he}=await fetch(`${a.api??`/api/suggest/${a.data}`}?val=${P}`).then(we=>we.json());f.value=he[0],y.value.push(he[0]),s.value=P}R.value=!1,xe({title:"Success!",message:"Object created."})}async function S(){if(!a.add)return null;const B=await fetch(`/api/template/form/${a.add.form}`).then(P=>P.json());return be.value=B.schema,R.value=!0,null}function H(B,P=200){let Y;return(...te)=>{Y&&clearTimeout(Y),Y=window.setTimeout(()=>B(...te),P)}}const K=H(async B=>{y.value=await me(B)},200);e.watch(p,B=>{a.data&&K(B.trim())}),e.watch(()=>a.options,B=>{!a.data&&(B!=null&&B.length)&&(y.value=[...B],ye())},{immediate:!0}),e.watch(()=>a.parent??a.parentValue,()=>{a.data&&Ne()});const J=e.ref(!0);return e.watch(Q,async()=>{if(a.data&&(J.value||(r.value?(_.value=[],s.value=[],n("change",[])):(f.value=null,s.value=null,n("change",null))),await Ne(),a.auto===1&&Q.value&&y.value.length>0)){const B=y.value[0];B&&at(B)}}),(B,P)=>{var Y,te,he,we,Oe;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(Jt),{visible:R.value,"onUpdate:visible":P[1]||(P[1]=oe=>R.value=oe),title:"Додати",buttonText:"Додати",onDone:C,teleport:B.teleport},{default:e.withCtx(()=>[e.createVNode(Xe,{schema:be.value,modelValue:G.value,"onUpdate:modelValue":P[0]||(P[0]=oe=>G.value=oe),ref_key:"addForm",ref:Be},null,8,["schema","modelValue"])]),_:1},8,["visible","teleport"]),e.createElementVNode("div",{class:"flex gap-1 w-full",ref_key:"selectRoot",ref:i,onClick:P[5]||(P[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["relative w-full font-sans",a.customClass])},[P[10]||(P[10]=e.createElementVNode("span",{id:"react-select-live-region",class:"sr-only"},null,-1)),P[11]||(P[11]=e.createElementVNode("span",{"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text",role:"log",class:"sr-only"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white","border-gray-300 hover:border-gray-400",m.value||h.value?"border-blue-500 ring-1 ring-blue-500":"",o.value?"bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300":""]),role:"combobox","aria-expanded":m.value,"aria-haspopup":"listbox",onKeydown:ae,onClick:bt,"data-focus":m.value||h.value?"true":"false"},[e.createElementVNode("div",{class:"flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden h-full",ref_key:"triggerRef",ref:c},[r.value?(e.openBlock(),e.createElementBlock("div",Gg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,oe=>(e.openBlock(),e.createElementBlock("div",{class:"flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border max-w-full",key:oe.id},[e.createElementVNode("div",Wg,[oe!=null&&oe.color?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",style:e.normalizeStyle({backgroundColor:oe==null?void 0:oe.color})},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"truncate text-gray-900 overflow-hidden max-w-[200px] px-0.5 py-[2px] pl-1.5",title:T(oe)},[I.value?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:F(oe)},null,8,Yg)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(oe.text),1)],64))],8,Kg)]),e.createElementVNode("div",{role:"button",class:"flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b] flex-shrink-0",onClick:e.withModifiers(mt=>Pt(oe.id),["stop"])},P[6]||(P[6]=[e.createElementVNode("svg",{height:"14",width:"14",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",class:"inline-block fill-current stroke-current leading-none stroke-0"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,Xg)]))),128)),e.createElementVNode("div",Zg,[!o.value&&B.search?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:x,class:"w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-autocomplete":"list",placeholder:_.value.length?" ":E.value,"onUpdate:modelValue":P[2]||(P[2]=oe=>p.value=oe),onFocus:Ae,onBlur:N,onKeydown:de},null,40,Qg)),[[e.vModelText,p.value]]):e.createCommentVNode("",!0)])])):!r.value&&!h.value&&M.value&&p.value===""?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["truncate text-gray-900"]),title:M.value},[(Y=f.value)!=null&&Y.color?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",style:e.normalizeStyle({backgroundColor:(te=f.value)==null?void 0:te.color})},null,4)):e.createCommentVNode("",!0),I.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass({"pl-5":(he=f.value)==null?void 0:he.color}),innerHTML:F(f.value)},null,10,ey)):(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass({"pl-5":(we=f.value)==null?void 0:we.color})},e.toDisplayString((Oe=f.value)==null?void 0:Oe.text),3))],8,Jg)):e.createCommentVNode("",!0),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ty,[!o.value&&B.search?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:x,class:"w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-autocomplete":"list",placeholder:M.value?" ":E.value,"onUpdate:modelValue":P[3]||(P[3]=oe=>p.value=oe),onFocus:Ae,onBlur:N,onKeydown:de},null,40,ly)),[[e.vModelText,p.value]]):e.createCommentVNode("",!0)]))],512),e.createElementVNode("div",ay,[D.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-hidden":"true",disabled:o.value,onClick:e.withModifiers(Et,["stop"])},P[7]||(P[7]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,ny)):e.createCommentVNode("",!0),P[9]||(P[9]=e.createElementVNode("div",{class:"self-stretch w-px bg-[#ccc] my-[1px]"},null,-1)),e.createElementVNode("button",{type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-hidden":"true",disabled:o.value,onClick:P[4]||(P[4]=e.withModifiers(oe=>vt(),["stop"])),title:m.value?"Закрити список":"Відкрити список"},P[8]||(P[8]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})],-1)]),8,ry)])],42,qg),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:d,class:e.normalizeClass(["fixed z-[3000] rounded bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.1),0_4px_11px_rgba(0,0,0,0.1)]"]),style:e.normalizeStyle(b.value),role:"listbox"},[e.createElementVNode("div",{class:"overflow-y-auto py-1",style:e.normalizeStyle({maxHeight:b.value.maxHeight||"300px"}),ref_key:"listRef",ref:u},[$.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList($.value,(oe,mt)=>(e.openBlock(),e.createElementBlock("div",{key:oe.id,ref_for:!0,ref:Bt=>g.value[mt]=Bt,class:e.normalizeClass(["flex px-3 py-2 cursor-default select-none text-gray-900 ",A(oe.id)?"bg-blue-500 text-white":"bg-white hover:bg-blue-100",k.value===mt&&!A(oe.id)?"bg-blue-100":""]),"aria-disabled":A(oe.id)?"true":"false",role:"option",tabindex:"-1",onClick:Bt=>st(oe)},[oe!=null&&oe.color?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",style:e.normalizeStyle({backgroundColor:oe==null?void 0:oe.color})},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["leading-[19px]",k.value===oe.id?"text-white":"",(k.value,"")])},[I.value?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:F(oe)},null,8,sy)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(oe.text),1)],64))],2)],10,oy))),128)):(e.openBlock(),e.createElementBlock("div",iy," No options "))],4)],4)):e.createCommentVNode("",!0)]))],2),a.add?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:S,class:"bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",disabled:o.value,type:"button"},[e.createVNode(Gl,{width:"16",height:"16"}),P[12]||(P[12]=e.createElementVNode("span",null,"Додати",-1))],8,cy)):e.createCommentVNode("",!0)],512)],64)}}}),dy=["placeholder","disabled"],uy=e.defineComponent({__name:"vs-input-textarea",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),n=e.useModel(l,"modelValue"),r=e.computed(()=>!!t.disabled),o=e.computed(()=>t.placeholder??"");return(s,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{"onUpdate:modelValue":i[0]||(i[0]=c=>n.value=c),placeholder:o.value,disabled:r.value,row:"2",class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"}},null,10,dy)),[[e.vModelText,n.value]])}}),my={},py={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-search stroke-gray-500 transition-all"};function fy(l,t){return e.openBlock(),e.createElementBlock("svg",py,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null,-1),e.createElementVNode("path",{d:"M21 21l-6 -6"},null,-1)]))}const hy=_e(my,[["render",fy]]),gy={},yy={class:"flex-shrink-0 mt-0.5 size-3.5",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"};function by(l,t){return e.openBlock(),e.createElementBlock("svg",yy,t[0]||(t[0]=[e.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),e.createElementVNode("path",{d:"M7 20V4"},null,-1),e.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),e.createElementVNode("path",{d:"M17 4v16"},null,-1)]))}const ky=_e(gy,[["render",by]]),xy={},wy={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function _y(l,t){return e.openBlock(),e.createElementBlock("svg",wy,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 9l5 -5l5 5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const Ey=_e(xy,[["render",_y]]),Cy={},Vy={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"};function Ny(l,t){return e.openBlock(),e.createElementBlock("svg",Vy,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const vy=_e(Cy,[["render",Ny]]),By={},Sy={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"};function Dy(l,t){return e.openBlock(),e.createElementBlock("svg",Sy,t[0]||(t[0]=[e.createStaticVNode('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>',6)]))}const ss=_e(By,[["render",Dy]]),Ay={},My={viewBox:"0 0 178 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ty(l,t){return e.openBlock(),e.createElementBlock("svg",My,t[0]||(t[0]=[e.createStaticVNode('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>',12)]))}const Ly=_e(Ay,[["render",Ty]]),$y={},Fy={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"};function Iy(l,t){return e.openBlock(),e.createElementBlock("svg",Fy,t[0]||(t[0]=[e.createElementVNode("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"},null,-1)]))}const Oy=_e($y,[["render",Iy]]),Py={class:"vs-datatable border rounded-xl w-full flex-grow"},Ry={class:"flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]"},jy={class:"relative w-full"},Uy={class:"table-wrapper flex gap-2"},zy={class:"vs-popover inline-block text-slate-700"},Hy={class:"text-center"},qy={class:""},Gy={class:"py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full"},Wy={class:"flex flex-col p-[1px] gap-[2px] w-[140px]"},Ky={class:"text-sm items-center text-gray-800 flex gap-1"},Yy={class:"w-full overflow-x-auto"},Xy={class:"w-full table-auto caption-bottom text-sm"},Zy={class:"[&_tr]:border-b"},Qy={class:"border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors"},Jy={class:"h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center"},eb={key:0,colspan:"100%",class:"text-center"},tb={class:"w-full"},lb={class:"p-5 min-h-[200px] flex flex-col justify-center items-center text-center"},ab=["onDragstart","onDragover","onDrop"],nb={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center"},rb={class:"flex items-center justify-center"},ob={key:0,class:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"},sb={key:0},ib=["src"],cb={key:1,class:"rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"},db=["innerHTML"],ub={key:2,class:"line-clamp-2 rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"},mb={key:3,class:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"},pb={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"},fb={class:"flex items-center justify-center gap-2"},hb=["onClick"],gb=["onClick"],yb={class:"vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white"},bb=e.defineComponent({__name:"vs-input-datatable",props:e.mergeModels({colModel:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref({}),r=e.ref(""),o=e.computed(()=>{if(!r.value)return a.value??[];const I=r.value.toLowerCase();return a.value.filter(F=>{var T;return(T=t.colModel)==null?void 0:T.some(z=>{const Q=F[z.key];return Q?Array.isArray(Q)?Q.join(", ").toLowerCase().includes(I):String(Q).toLowerCase().includes(I):!1})})}),s=e.ref(null),i=e.ref(null),c=e.ref(!1),u=e.ref(null),d=e.ref({top:0,left:0}),m=I=>{s.value=I},h=I=>{i.value=I},f=I=>{if(s.value===null||s.value===I){s.value=null,i.value=null;return}const F=[...a.value],[T]=F.splice(s.value,1);F.splice(I,0,T),a.value=F,s.value=null,i.value=null},y=I=>{const F=I.currentTarget.getBoundingClientRect();d.value={top:F.bottom+window.scrollY,left:F.left+window.scrollX},c.value=!c.value},k=()=>{u.value&&u.value.click()},g=I=>{const F=[".jpg",".jpeg",".png",".gif",".bmp",".webp",".svg",".ico",".tiff",".tif"],T=I.toLowerCase();return F.some(z=>T.endsWith(z))},p=I=>{var z;const F=(z=I.target.files)==null?void 0:z[0];if(!F)return;const T=new FileReader;T.onload=Q=>{var me;try{const Ne=(me=Q.target)==null?void 0:me.result;if(typeof Ne=="string"){const Ke=JSON.parse(Ne);Array.isArray(Ke)&&a.value.push(...Ke)}}catch(Ne){console.error("Error parsing file:",Ne)}},T.readAsText(F)},x=()=>{const I=JSON.stringify(a.value,null,2),F=new Blob([I],{type:"application/json"}),T=URL.createObjectURL(F),z=document.createElement("a");z.href=T,z.download="data.json",z.click(),URL.revokeObjectURL(T)};e.onMounted(async()=>{var F;const I=(F=t.colModel)==null?void 0:F.filter(T=>T.data);I!=null&&I.length&&Promise.all(I.map(async T=>{const z=await(await fetch(`/api/suggest/${T.data}`)).json();n.value[T.key]=z.data}))});const w=e.ref(""),b=e.ref(!1);let _="edit",V=0;const E=e.ref({}),M=e.ref({});async function D(){w.value="Додати",b.value=!0,_="add",E.value={}}function A(I,F){var z;const T=F.key||F.name;return n.value[T]&&I[T]?((z=n.value[T].find(Q=>Q.id.toString()===I[T].toString()))==null?void 0:z.text)??I[T]:I[T]||"-"}async function $(I,F){w.value="Редагувати",b.value=!0,_="edit",V=F,E.value={...I}}function U(){const I=M.value.validate();if(I){xe({type:"warning",title:"Помилка валідації",message:Object.entries(I).map(([F,T])=>`${F}: ${T}`).join(`
228
+ `)});return}_==="add"?Array.isArray(a.value)?a.value=[...a.value,E.value]:a.value=[E.value]:a.value=a.value.map((F,T)=>T===V?E.value:F),b.value=!1}function W(I){a.value=a.value.filter((F,T)=>T!==I)}function O(){b.value=!1}return(I,F)=>(e.openBlock(),e.createElementBlock("div",Py,[e.createElementVNode("div",Ry,[e.createElementVNode("div",jy,[e.createVNode(hy,{width:"14",height:"14",class:"absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"}),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":F[0]||(F[0]=T=>r.value=T),placeholder:"Пошук",class:"py-2 px-3 pl-10 w-full bg-gray-100 h-[36px] rounded-[8px] text-[15px] leading-[18px] focus:border-1 text-stone-800 placeholder:text-[#6B7280] focus:outline-blue-500 focus:outline-2"},null,512),[[e.vModelText,r.value]])]),e.createElementVNode("div",Uy,[e.createElementVNode("input",{ref_key:"fileInput",ref:u,onChange:p,class:"hidden",accept:".json",type:"file"},null,544),e.createElementVNode("div",zy,[e.createElementVNode("div",Hy,[e.createElementVNode("div",qy,[e.createElementVNode("button",{onClick:y,class:"bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"},[e.createVNode(ky,{height:"16",width:"16"})])])])])]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"text-slate-700 vsTailwind vs-popover__content bottom",style:e.normalizeStyle([{width:"fit-content","z-index":"10002",position:"fixed"},{position:"absolute",top:d.value.top+"px",left:d.value.left+"px"}])},[e.createElementVNode("div",Gy,[e.createElementVNode("div",Wy,[e.createElementVNode("button",{onClick:k,class:"text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"},[e.createVNode(Ey,{class:"text-black",width:"14",height:"14"}),F[4]||(F[4]=e.createTextVNode(" Імпортувати ",-1))]),e.createElementVNode("button",{onClick:x,class:"text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"},[e.createElementVNode("span",Ky,[e.createVNode(vy,{class:"text-black",width:"14",height:"14"}),F[5]||(F[5]=e.createTextVNode(" Експортувати ",-1))])])])])],4)):e.createCommentVNode("",!0)])),e.createElementVNode("button",{onClick:D,class:"text-slate-700 bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"},[e.createVNode(Gl),F[6]||(F[6]=e.createTextVNode(" Додати ",-1))])]),e.createElementVNode("div",Yy,[e.createElementVNode("table",Xy,[e.createElementVNode("thead",Zy,[e.createElementVNode("tr",Qy,[e.createElementVNode("th",Jy,[e.createVNode(ss,{width:"24",height:"24",class:"w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.colModel,T=>(e.openBlock(),e.createElementBlock("th",{key:T.key,class:"h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"},e.toDisplayString(T.ua||T.label),1))),128)),F[7]||(F[7]=e.createElementVNode("th",{class:"h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center"}," Дії ",-1))])]),e.createElementVNode("tbody",{class:e.normalizeClass({"[&_tr:last-child]:border-0":!i.value})},[o.value.length===0?(e.openBlock(),e.createElementBlock("td",eb,[e.createElementVNode("div",tb,[e.createElementVNode("div",lb,[e.createVNode(Ly,{class:"w-48 mx-auto"}),F[8]||(F[8]=e.createElementVNode("div",{class:"max-w-sm mx-auto mt-6"},[e.createElementVNode("p",{class:"font-medium text-gray-800 dark:text-neutral-200"},"Нічого не знайдено"),e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"})],-1))])])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(T,z)=>(e.openBlock(),e.createElementBlock("tr",{key:T.id,class:e.normalizeClass(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move",{"opacity-50":s.value===z,"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20":i.value===z}]),draggable:"true",onDragstart:Q=>m(z),onDragover:e.withModifiers(Q=>h(z),["prevent"]),onDrop:Q=>f(z)},[e.createElementVNode("td",nb,[e.createElementVNode("div",rb,[e.createVNode(ss,{width:"24",height:"24",class:"w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"})])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.colModel,Q=>(e.openBlock(),e.createElementBlock("td",{key:Q.key,class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"},[Q.type==="file"?(e.openBlock(),e.createElementBlock("div",ob,[g(A(T,Q))?(e.openBlock(),e.createElementBlock("div",sb,[e.createElementVNode("img",{src:A(T,Q),alt:"alt",width:"45",class:"rounded-md max-w-[45px] h-[45px] object-cover"},null,8,ib)])):(e.openBlock(),e.createElementBlock("div",cb,[e.createVNode(as,{class:"w-[25px] min-w-[25px] h-[25px]"})]))])):Q.type==="tiptap-editor"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors line-clamp-3",innerHTML:A(T,Q)},null,8,db)):Q.type==="reference"?(e.openBlock(),e.createElementBlock("div",ub,e.toDisplayString(A(T,Q)),1)):(e.openBlock(),e.createElementBlock("div",mb,e.toDisplayString(A(T,Q)),1))]))),128)),e.createElementVNode("td",pb,[e.createElementVNode("div",fb,[e.createElementVNode("button",{onClick:Q=>$(T,z),class:"text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"},[e.createVNode(Oy,{width:"24",height:"24",class:"w-3 h-3"})],8,hb),e.createElementVNode("button",{onClick:Q=>W(z),class:"text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"},[e.createVNode(va,{width:"24",height:"24",class:"w-3 h-3"})],8,gb)])])],42,ab))),128))],2)])]),e.createVNode(e.unref(Jt),{teleport:"#modal",visible:b.value,title:w.value,size:"lg",onClose:O},{default:e.withCtx(()=>[e.createVNode(Xe,{schema:t.colModel,values:E.value,"onUpdate:values":F[1]||(F[1]=T=>E.value=T),form:M.value,"onUpdate:form":F[2]||(F[2]=T=>M.value=T)},null,8,["schema","values","form"]),e.createElementVNode("div",yb,[e.createElementVNode("button",{type:"button",onClick:F[3]||(F[3]=T=>b.value=!1),class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"}," Скасувати "),e.createElementVNode("button",{onClick:U,type:"button",class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"}," Зберегти ")])]),_:1},8,["visible","title"])]))}}),kb={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 Wl(l){return l?l.type==="Polygon"?{type:"MultiPolygon",coordinates:[l.coordinates]}:l.type==="Feature"?{...l,geometry:Wl(l.geometry)}:l.type==="FeatureCollection"?{...l,features:(l.features||[]).map(t=>Wl(t)).filter(Boolean)}:l:null}function xb(l){return l?l.type==="FeatureCollection"||l.type==="Feature"?Wl(l):l.geom?{type:"Feature",geometry:Wl({type:l.geom.type,coordinates:l.geom.coordinates}),properties:{}}:l.type&&l.coordinates?{type:"Feature",geometry:Wl(l),properties:{}}:null:null}const wb={},_b={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",fill:"none","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-map-pin"};function Eb(l,t){return e.openBlock(),e.createElementBlock("svg",_b,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"},null,-1),e.createElementVNode("path",{d:"M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z"},null,-1)]))}const Cb=_e(wb,[["render",Eb]]),Vb={},Nb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-line"};function vb(l,t){return e.openBlock(),e.createElementBlock("svg",Nb,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null,-1),e.createElementVNode("path",{d:"M18 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null,-1),e.createElementVNode("path",{d:"M7.5 16.5l9 -9"},null,-1)]))}const Bb=_e(Vb,[["render",vb]]),Sb={},Db={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-polygon"};function Ab(l,t){return e.openBlock(),e.createElementBlock("svg",Db,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>',9)]))}const Mb=_e(Sb,[["render",Ab]]),Tb={},Lb={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-topology-ring-3"};function $b(l,t){return e.openBlock(),e.createElementBlock("svg",Lb,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>',9)]))}const Fb=_e(Tb,[["render",$b]]),Ib={},Ob={version:"1.1",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg","xmlns:sketch":"http://www.bohemiancoding.com/sketch/ns","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"fullscreen-icon"};function Pb(l,t){return e.openBlock(),e.createElementBlock("svg",Ob,t[0]||(t[0]=[e.createElementVNode("title",null,null,-1),e.createElementVNode("desc",null,null,-1),e.createElementVNode("defs",null,null,-1),e.createElementVNode("g",{fill:"none","fill-rule":"evenodd",id:"Page-1",stroke:"none","stroke-width":"1"},[e.createElementVNode("g",{fill:"#000000",id:"Core",transform:"translate(-215.000000, -257.000000)"},[e.createElementVNode("g",{id:"fullscreen",transform:"translate(215.000000, 257.000000)"},[e.createElementVNode("path",{d:"M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z",id:"Shape"})])])],-1)]))}const Rb=_e(Ib,[["render",Pb]]),jb={class:"map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]"},Ub={key:0,class:"vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"},zb=["onClick"],Hb={class:"relative flex-1 min-w-[140px]"},qb=["placeholder"],Gb="https://data.softpro.ua/api-user/gis-url-proxy",Wb="https://geo.rv.ua/api-user/dzk.api",Kb=e.defineComponent({__name:"map-search",props:{config:{}},emits:["goToCoordinates"],setup(l,{emit:t}){const a=l,n=t,r=["here","xy","parcel"],o=e.computed(()=>{var _,V;const b=(V=(_=a.config)==null?void 0:_.tools)==null?void 0:V.filter(E=>r.includes(E));return b&&b.length?b:r}),s=e.computed(()=>{var b,_;return((_=(b=a.config)==null?void 0:b.placeholder)==null?void 0:_.trim())||"Пошук…"}),i=e.ref(o.value[0]??r[0]);e.watch(o,b=>{b.includes(i.value)||(i.value=b[0])});const c=e.ref(""),u=e.ref(!1),d=e.ref(null);e.watch(i,()=>{c.value="",u.value=!1});function m(b){i.value=b}function h(b){if(!u.value)return;const _=d.value;_&&!_.contains(b.target)&&(u.value=!1)}e.onMounted(()=>{window.addEventListener("click",h,!0)}),e.onBeforeUnmount(()=>{window.removeEventListener("click",h,!0)});function f(b){return b==="xy"?"Координати":b==="parcel"?"Кадастр":"Адреси"}function y(b){const _=b.replace(/[,]+/g," ").trim();if(!_)return null;const V=_.split(/\s+/).filter(Boolean);if(V.length<2)return null;const E=V.slice(0,2).map(Number);if(!E.every(O=>Number.isFinite(O)))return null;let[M,D]=E,A=M,$=D;const U=O=>Math.abs(O)<=90,W=O=>Math.abs(O)<=180;if(!U(A)||!W($))if(U($)&&W(A))A=D,$=M;else return null;return{lat:A,lng:$}}function k(b){return((b==null?void 0:b.items)||[]).map((_,V)=>{var E,M,D;return{id:String((_==null?void 0:_.id)??V),title:(_==null?void 0:_.title)||((E=_==null?void 0:_.address)==null?void 0:E.label)||"Знайдений обʼєкт",lat:Number((M=_==null?void 0:_.position)==null?void 0:M.lat),lng:Number((D=_==null?void 0:_.position)==null?void 0:D.lng)}}).filter(_=>Number.isFinite(_.lat)&&Number.isFinite(_.lng))}function g(b){const _=(b==null?void 0:b.result)||(b==null?void 0:b.data)||b;if(!_)return[];const V=_.geom_centroid;if(!V||!Array.isArray(V.coordinates))return[];const[E,M]=V.coordinates;return!Number.isFinite(M)||!Number.isFinite(E)?[]:[{id:"parcel",title:_.cadnum||_.cad_num||"Земельна ділянка",lat:M,lng:E}]}function p(b){const _=b.replace(/\s+/g,"").split(":");if(_.length!==4)return!1;const V=[10,2,3,4];return _.every((E,M)=>E.length===V[M]&&/^\d+$/.test(E))}function x(b){n("goToCoordinates",[b.lat,b.lng])}async function w(){const b=c.value.trim();if(b){if(i.value==="xy"){const _=y(b);if(!_){xe({type:"warning",title:"Пошук координат",message:"Не знайдено або невірний формат координат"});return}x(_),c.value="";return}try{const _=new URL(i.value==="here"?Gb:Wb);if(i.value==="here")_.searchParams.set("searchtext",b);else{if(!p(b)){xe({type:"warning",title:"Пошук кадастру",message:"Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ"});return}_.searchParams.set("cad_num",b)}const V=await fetch(_.toString());if(!V.ok)throw new Error(`HTTP ${V.status}`);const E=await V.json(),M=i.value==="here"?k(E):g(E);if(!M.length)xe({type:"warning",title:"Пошук",message:"Не знайдено результатів"});else{const D=M[0];x(D),c.value=""}}catch(_){const V=(_==null?void 0:_.message)||"Помилка пошуку";xe({type:"error",title:"Пошук",message:V})}}}return(b,_)=>(e.openBlock(),e.createElementBlock("div",jb,[e.createElementVNode("form",{class:"flex gap-2",onSubmit:e.withModifiers(w,["prevent"])},[o.value.length>1?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:d,class:"relative search-type w-[140px]"},[e.createElementVNode("button",{type:"button",class:"vstSelect-input transition-all text-left bg-white border border-gray-200 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-100 block w-full py-1.5 px-3 text-sm cursor-pointer flex items-center justify-between gap-2",onClick:_[0]||(_[0]=V=>u.value=!u.value)},[e.createElementVNode("span",null,e.toDisplayString(f(i.value)),1),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["w-4 h-4 text-gray-500 transition-transform",{"rotate-180":u.value}]),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_[2]||(_[2]=[e.createElementVNode("path",{d:"M6 9l6 6 6-6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2))]),u.value?(e.openBlock(),e.createElementBlock("div",Ub,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,V=>(e.openBlock(),e.createElementBlock("li",{key:V,class:"px-3 py-2 cursor-pointer hover:bg-gray-100",onClick:E=>m(V)},e.toDisplayString(f(V)),9,zb))),128))])])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0),e.createElementVNode("div",Hb,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":_[1]||(_[1]=V=>c.value=V),placeholder:s.value,type:"text",class:"vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid !pr-8 py-1.5 pl-3 text-sm"},null,8,qb),[[e.vModelText,c.value,void 0,{trim:!0}]]),_[3]||(_[3]=e.createElementVNode("button",{type:"submit",class:"absolute inset-y-0 right-2 flex items-center text-gray-400 hover:text-gray-600","aria-label":"Пошук"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 21-4.35-4.35m0 0A7.5 7.5 0 1 0 5 5a7.5 7.5 0 0 0 11.65 11.65Z"})])],-1))])],32)]))}}),Yb=_e(Kb,[["__scopeId","data-v-3048520a"]]),Xb={class:"bg-white/30 p-1 rounded-md shadow"},Zb={class:"flex gap-2"},Qb=["onClick","title"],Jb=["src"],e1=e.defineComponent({__name:"map-layers",props:{basemaps:{}},emits:["onLayerChange"],setup(l,{emit:t}){const a=e.ref(Object.keys(l.basemaps)[0]),n=t;function r(o){n("onLayerChange",o),a.value=o}return(o,s)=>(e.openBlock(),e.createElementBlock("div",Xb,[e.createElementVNode("div",Zb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.basemaps,(i,c)=>(e.openBlock(),e.createElementBlock("div",{key:c,class:e.normalizeClass(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm",{"ring-2 ring-blue-500 border-blue-300":a.value===c}]),onClick:u=>r(c),title:i.name||c,role:"button",tabindex:"0"},[e.createElementVNode("img",{src:i.preview,alt:"",class:"w-10 h-10 object-cover"},null,8,Jb)],10,Qb))),128))])]))}}),t1={key:0,class:"absolute inset-0 z-[2000] flex items-center justify-center pointer-events-none bg-black/20"},l1={class:"bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm"},a1={class:"text-sm font-medium"},n1={key:0,class:"absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]"},r1={key:1,class:"form-geom__panel flex gap-1 items-start mt-2"},o1={class:"flex items-center gap-1"},s1=["disabled"],i1=["disabled"],c1=["disabled"],d1={class:"absolute top-4 right-4 z-[1000]"},u1={class:"flex flex-col gap-[2px]"},m1=["disabled"],p1=["disabled"],f1=["disabled"],h1=["disabled"],g1={class:"flex flex-col gap-2"},y1={key:0,class:"bg-white/95 border border-gray-200 rounded-md shadow-sm px-3 py-2 text-xs text-gray-700 min-w-[200px]"},b1={class:"flex flex-col gap-1"},k1=["checked","disabled","onChange"],x1={class:"text-gray-700 text-xs font-medium"},w1={class:"absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1"},_1={key:0,class:"form-geom__feature flex items-center text-xs transition-all gap-2 w-full"},E1={class:"shrink-0"},C1={class:"font-bold"},V1={class:"flex items-center"},N1={class:"text-xs mr-2"},v1={key:0,class:"text-xs"},B1={key:1,class:"text-xs"},S1=["disabled"],D1=["disabled"],A1=e.defineComponent({__name:"vs-input-map",props:{tools:{},handleZoom:{type:Boolean,default:!0},geomType:{default:()=>[]},prefix:{default:""},layers:{default:()=>[]},api:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},emits:["update:modelValue"],setup(l,{emit:t}){var Be;const a=e.getCurrentInstance(),n=l,r=t,o=e.computed(()=>{const C={search:!1,import:!1,export:!1,point:!1,line:!1,polygon:!1,rectangle:!1};if(!n.tools||!n.tools.length)return C;const S=new Set(n.tools.map(H=>H.toLowerCase()));return{search:S.has("search"),import:S.has("import"),export:S.has("export"),point:S.has("point"),line:S.has("line"),polygon:S.has("polygon"),rectangle:S.has("rectangle")}}),s=e.computed(()=>!!n.disabled),i=e.ref(!1),c=e.ref(null),u=e.ref(null),d=e.ref(!1),m=e.ref(""),h=e.reactive({}),f=e.ref([]),y=e.computed(()=>f.value.map(C=>h[C]).filter(C=>!!C)),k=e.computed(()=>Array.isArray(n.layers)&&n.layers.some(C=>`${(C==null?void 0:C.service)??""}`.toLowerCase()==="vtile"));let g,p,x;function w(){return navigator.platform.toUpperCase().indexOf("MAC")>=0,/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?"Використовуйте два пальці для зуму карти.":"Використовуйте Ctrl + прокрутка для зуму карти."}const b=e.ref(null),_=e.ref(null);let V=null;const E=e.ref(null),M=C=>{C.ctrlKey&&C.preventDefault()};function D(C,S){return C!=null&&C.id?String(C.id):C!=null&&C.url?`${C.url}-${S}`:`layer-${S}`}function A(C){if(!C)return"";if(/^https?:\/\//i.test(C))return C.replace(/\/+$/,"");const S=C.replace(/^\/+/,"").replace(/\/+$/,"");return S?`/${S}`:""}function $(C){var te;const S=(C==null?void 0:C.url)??"";if(!S||/^https?:\/\//i.test(S))return S;const H=typeof window<"u"&&((te=window.location)!=null&&te.origin)?window.location.origin:"";if(S.startsWith("/"))return H?`${H}${S}`:S;const K=A(C==null?void 0:C.prefix),J=A(n.prefix),B=K||J,P=S.replace(/^\/+/,""),Y=B?`${B.replace(/\/$/,"")}/${P}`:`/${P}`;return H?`${H}${Y}`:Y}function U(C){const S=(C==null?void 0:C.style)??{};return H=>{const K=S.colorAttr,J=S.colorSet??{},B=typeof K=="string"?(J==null?void 0:J[H==null?void 0:H[K]])??S.color??"#3388ff":S.color??"#3388ff",P=S.stroke??B;return{weight:S.width??1,color:P,opacity:S.opacity??1,fill:S.type?S.type!=="polyline":!0,fillColor:B,fillOpacity:S.opacity??.5}}}function W(C){const S=(C==null?void 0:C.colorSet)||(C==null?void 0:C.colors);if(C!=null&&C.colorAttr&&S){const H=Object.entries(S).flat();return["match",["get",C.colorAttr],...H,C.color??"#94a3b8"]}return(C==null?void 0:C.color)??"#3388ff"}function O(C,S,H){if(!C)return[];const K=[],J=W(C);return C.icon&&K.push({id:`${S}-icon`,type:"symbol",source:S,"source-layer":H,minzoom:C.iconZoom||0,layout:{"icon-image":C.icon,"icon-size":1,"icon-allow-overlap":!0,"icon-ignore-placement":!0}}),C.pointZoom&&K.push({id:`${S}-point`,type:"circle",source:S,"source-layer":H,maxzoom:C.pointZoom,paint:{"circle-stroke-color":C.stroke||"#fff","circle-opacity":C.opacity??1,"circle-color":J,"circle-stroke-width":C.width??1,"circle-radius":C.radius??5}}),C.type==="polygon"?K.push({id:`${S}-fill`,type:"fill",source:S,"source-layer":H,minzoom:C.pointZoom||0,paint:{"fill-color":J,"fill-opacity":C.opacity??.5,"fill-outline-color":C.stroke||J}}):C.type==="line"?K.push({id:`${S}-line`,type:"line",source:S,"source-layer":H,paint:{"line-color":J,"line-opacity":C.opacity??1,"line-width":C.width??1.5}}):C.icon||K.push({id:`${S}-circle`,type:"circle",source:S,"source-layer":H,paint:{"circle-stroke-color":C.stroke||"#fff","circle-opacity":C.opacity??1,"circle-color":J,"circle-stroke-width":C.width??1,"circle-radius":C.radius??5}}),K}function I(C,S){var B;const H=C.id||`source-${Math.random().toString(36).slice(2,8)}`,K=C.sourceLayer||C.layer||C.service_layer||C.service_key||C.map_key||((B=C.dataset)==null?void 0:B.layer)||C.id||C.table_name||H,J=O(C.style||{},H,K||H);return J.length?{version:8,glyphs:"https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf",sources:{[H]:{type:"vector",tiles:[S],minzoom:C.minzoom??0,maxzoom:C.maxzoom??19}},layers:J}:null}function F(C){var J,B,P,Y;const S=((C==null?void 0:C.service)??"").toLowerCase(),H=$(C),K=C.sourceLayer||C.layer||C.service_layer||C.service_key||C.map_key||((J=C.dataset)==null?void 0:J.layer)||C.id||C.table_name;if(console.info("[vs-input-map] create overlay layer",{id:C.id,service:S,url:H,sourceLayer:K,hasSourceLayer:!!K}),S==="vtile"){if((B=L==null?void 0:L.vectorGrid)!=null&&B.protobuf&&!(L!=null&&L.maplibreGL))return console.info("[vs-input-map] using Leaflet.vectorGrid"),L.vectorGrid.protobuf(H,{interactive:!0,vectorTileLayerStyles:{default:U(C)}});if(L!=null&&L.maplibreGL&&(window!=null&&window.maplibregl)){console.info("[vs-input-map] using maplibre-gl-leaflet");const te=I(C,H);return te?L.maplibreGL({style:te,interactive:!1,pane:"overlayPane"}):(console.warn("[vs-input-map] maplibre spec is empty",C.id),null)}return null}return S==="tile"||/^https?:\/\//i.test(H)||H.includes("{z}")?L.tileLayer(H,{opacity:((P=C==null?void 0:C.style)==null?void 0:P.opacity)??1}):L.tileLayer(H,{opacity:((Y=C==null?void 0:C.style)==null?void 0:Y.opacity)??1})}function T(){g&&f.value.forEach(C=>{const S=h[C];S&&(S.visible?(S.layer||(S.layer=F(S.config)),S.layer&&!g.hasLayer(S.layer)?(console.info("[vs-input-map] add overlay layer to map",S.id),S.layer.addTo(g)):S.layer||console.warn("[vs-input-map] overlay layer is null",S.id)):S.layer&&g.hasLayer(S.layer)&&(console.info("[vs-input-map] remove overlay layer from map",S.id),g.removeLayer(S.layer)))})}function z(C){if(s.value)return;const S=h[C];S&&(S.visible=!S.visible,g&&(console.info("[vs-input-map] toggle overlay",{id:C,nextVisible:S.visible,hasLayerInstance:!!S.layer}),S.visible?(S.layer||(S.layer=F(S.config)),S.layer&&!g.hasLayer(S.layer)&&(console.info("[vs-input-map] add overlay layer to map",S.id),S.layer.addTo(g))):S.layer&&g.hasLayer(S.layer)&&g.removeLayer(S.layer)))}function Q(){if(!n.handleZoom)return null;let C;const S=K=>{const J=K.ctrlKey||K.metaKey,B=K.shiftKey;if(!J&&!B){d.value=!0,m.value=w(),clearTimeout(C),C=window.setTimeout(()=>{d.value=!1},1e3);return}d.value=!1,g.scrollWheelZoom.enable(),setTimeout(()=>{g.scrollWheelZoom.disable()},100)},H=K=>{if(K.touches.length===1){d.value=!0,m.value=w(),clearTimeout(C),C=window.setTimeout(()=>{d.value=!1},3e3);return}d.value=!1};return _.value&&(_.value.addEventListener("wheel",S,{passive:!1}),_.value.addEventListener("touchstart",H,{passive:!0})),g&&g.on("wheel",K=>{const J=K.originalEvent.ctrlKey||K.originalEvent.metaKey,B=K.originalEvent.shiftKey;!J&&!B&&(K.originalEvent.preventDefault(),K.originalEvent.stopPropagation())}),()=>{_.value&&(_.value.removeEventListener("wheel",S),_.value.removeEventListener("touchstart",H)),g&&g.off("wheel"),clearTimeout(C)}}const me=e.ref(null),Ne=e.ref(6),Ke=e.ref(0),Wt=e.ref(((Be=a==null?void 0:a.appContext.config.globalProperties.$settings)==null?void 0:Be.center)||[50,30]),Re=e.ref(null),Ye=G();let vt;const bt=e.ref("topo100");function Et(C){return C?C.type==="Polygon"?{type:"MultiPolygon",coordinates:[C.coordinates]}:(C.type,C):null}function Pt(){return new Promise((C,S)=>{window.L&&window.L.Draw&&C(0);const H=B=>{if(Array.from(document.styleSheets).some(Y=>{var te;return(te=Y==null?void 0:Y.href)==null?void 0:te.includes(B)}))return;const P=document.createElement("link");P.rel="stylesheet",P.href=B,document.head.appendChild(P)},K=B=>new Promise((P,Y)=>{const te=Array.from(document.scripts).find(we=>we.src===B);if(te){te.addEventListener("load",()=>P()),te.addEventListener("error",we=>Y(we));return}const he=document.createElement("script");he.src=B,he.async=!0,he.onload=()=>P(),he.onerror=we=>Y(we),document.body.appendChild(he)});H("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),H("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"),k.value&&H("https://unpkg.com/maplibre-gl@4.5.0/dist/maplibre-gl.css");let J=K("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(()=>K("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js"));k.value?J=J.then(()=>K("https://unpkg.com/maplibre-gl@4.5.0/dist/maplibre-gl.js")).then(()=>(window.maplibregl&&!window.mapboxgl&&(window.mapboxgl=window.maplibregl),K("https://unpkg.com/@maplibre/maplibre-gl-leaflet@0.0.20/leaflet-maplibre-gl.js"))):J=J.then(()=>K("https://unpkg.com/leaflet.vectorgrid@1.3.0/dist/Leaflet.VectorGrid.bundled.js").catch(()=>Promise.resolve())),J.then(()=>C(0)).catch(S)})}function at(){const C=p.toGeoJSON(),S=[];let H=null;const K=B=>{if(B)switch(B.type){case"Point":H=B;break;case"Polygon":S.push(B.coordinates);break;case"MultiPolygon":S.push(...B.coordinates);break;case"GeometryCollection":(B.geometries||[]).forEach(K);break}};((C==null?void 0:C.features)||[]).forEach(B=>K(B.geometry));const J=H||(S.length?{type:"MultiPolygon",coordinates:S}:null);r("update:modelValue",J?Et(J):null),Ke.value=p.getLayers().length}function st(C=30){const S=p.getLayers();if(!S.length)return;const H=L.featureGroup(S).getBounds();H&&H.isValid()&&g.fitBounds(H,{padding:[C,C]})}function j(){var C;s.value||((C=E.value)==null||C.click())}const X=e.ref("");e.watch(o,C=>{X.value&&!Object.entries(C).filter(([S,H])=>H).map(([S])=>S).includes(X.value)&&(x!=null&&x.disable&&x.disable(),X.value="")}),e.watch(()=>n.layers,C=>{const S=Array.isArray(C)?C:[],H=[],K=new Set;S.forEach((J,B)=>{if(!J)return;const P=D(J,B);H.push(P),K.add(P),console.info("[vs-input-map] overlay register",{id:P,service:J==null?void 0:J.service,url:J==null?void 0:J.url});const Y=h[P];Y?h[P]={...Y,config:{...J,id:P}}:h[P]={id:P,config:{...J,id:P},visible:(J==null?void 0:J.overlay)!==!1,layer:null}}),Object.keys(h).forEach(J=>{if(K.has(J))return;const B=h[J];B!=null&&B.layer&&(g!=null&&g.hasLayer)&&g.hasLayer(B.layer)&&g.removeLayer(B.layer),delete h[J]}),f.value=H,T()},{immediate:!0,deep:!0}),e.watch(s,C=>{C&&x&&(x.disable(),X.value=""),p&&p.eachLayer(S=>{var H,K,J,B,P;C?(K=(H=S.dragging)==null?void 0:H.disable)==null||K.call(H):(J=S.dragging)!=null&&J.enable&&(S.dragging.enable(),(P=(B=S.dragging).enabled)==null||P.call(B))})});function le(C){return C instanceof L.Circle?"Circle":C instanceof L.Rectangle?"Rectangle":C instanceof L.Polygon&&!(C instanceof L.Rectangle)?"Polygon":C instanceof L.Polyline&&!(C instanceof L.Polygon)?"Polyline":C instanceof L.Marker?"Point":"Feature"}function ae(C){var S;if(C instanceof L.Circle){const H=C.getRadius();return Math.PI*(H*H)/1e6}if(C instanceof L.Polygon||C instanceof L.Rectangle)try{const H=C.getLatLngs(),K=Array.isArray(H[0])?H[0]:H,J=(S=L.GeometryUtil)!=null&&S.geodesicArea?L.GeometryUtil.geodesicArea(K):0;return J?J/1e6:0}catch{return null}return null}function de(C){return C instanceof L.Circle?C.getLatLng():C.getBounds?C.getBounds().getCenter():C.getLatLng?C.getLatLng():g.getCenter()}async function Ae(C,S){var J;if(b.value="",!((J=n.api)!=null&&J.length))return;const[H,K]=n.api;try{const B=new URL(H);B.searchParams.set("lat",String(C)),B.searchParams.set("lon",String(S));const P=await fetch(B.toString());if(!P.ok)throw new Error("Request failed");const Y=await P.json();K&&Y[K]!==void 0?b.value=String(Y[K]):b.value=JSON.stringify(Y)}catch(B){console.error("[vs-input-map] reverse geocode failed:",B),b.value=null}}function N(){const C=p.getLayers();if(!C.length){Re.value=null,Ke.value=0;return}const S=C[C.length-1],H=le(S),K=de(S),J=ae(S);Re.value={type:H,center:K,areaKm2:J,layer:S},Ke.value=C.length,Ae(K.lat,K.lng)}function v(){var S;if(s.value)return;const C=(S=Re.value)==null?void 0:S.layer;C&&(C instanceof L.Circle&&C.getBounds?g.fitBounds(C.getBounds(),{padding:[30,30]}):C.getBounds?g.fitBounds(C.getBounds(),{padding:[30,30]}):C.getLatLng&&g.setView(C.getLatLng(),Math.max(Ne.value,14)))}function q(){var S;if(s.value)return;const C=(S=Re.value)==null?void 0:S.layer;C&&(p.removeLayer(C),at(),N())}e.onMounted(async()=>{document.addEventListener("wheel",M,{passive:!1}),await Pt(),L.drawLocal=kb;const C=n.handleZoom;g=L.map(_.value,{zoomControl:!1,scrollWheelZoom:!C}).setView(Wt.value,10),setTimeout(()=>{V=Q()},100),L.control.zoom({position:"bottomright"}).addTo(g),bt.value=Object.keys(Ye)[0],vt=L.tileLayer(Ye[bt.value].url,{maxZoom:19,minZoom:6}).addTo(g),p=new L.FeatureGroup().addTo(g),g.on(L.Draw.Event.CREATED,K=>{if(s.value)return;const{layer:J}=K;p.clearLayers(),p.addLayer(J),at(),st(),X.value=""}),g.on(L.Draw.Event.EDITED,()=>{s.value||(at(),N(),st())}),g.on(L.Draw.Event.DELETED,()=>{s.value||(at(),N(),st())});let S=!1;g.on("mousemove",K=>{S||(g.invalidateSize(),S=!0),me.value=K.latlng}),g.on("zoomend",()=>{Ne.value=g.getZoom()});const H=xb(n.modelValue);if(H){const K=[];L.geoJSON(H).eachLayer(J=>K.push(J)),K.length&&p.addLayer(K[0]),at(),N(),st()}T()}),e.onUnmounted(()=>{document.removeEventListener("wheel",M),V&&V(),Object.values(h).forEach(C=>{var S;C!=null&&C.layer&&((S=g==null?void 0:g.hasLayer)!=null&&S.call(g,C.layer)&&g.removeLayer(C.layer),typeof C.layer.remove=="function"&&C.layer.remove())})});function ne(C){if(!s.value&&g){switch(x&&x.disable(),C){case"marker":x=new L.Draw.Marker(g);break;case"polyline":x=new L.Draw.Polyline(g);break;case"polygon":x=new L.Draw.Polygon(g);break;case"rectangle":x=new L.Draw.Rectangle(g);break;default:x=new L.Draw.Rectangle(g);break}x&&(x.enable(),X.value=C)}}function Te(){if(s.value)return;const C=p.toGeoJSON(),S=new Blob([JSON.stringify(C,null,2)],{type:"application/json"}),H=URL.createObjectURL(S),K=document.createElement("a");K.href=H,K.download="data.geojson",K.click(),URL.revokeObjectURL(H)}function Le(C){var J;if(s.value)return;const S=C.target,H=(J=S.files)==null?void 0:J[0];if(!H)return;const K=new FileReader;K.onload=()=>{if(typeof K.result=="string")try{const B=JSON.parse(K.result);p.clearLayers(),B&&L.geoJSON({type:"Feature",geometry:B}).eachLayer(P=>{p.addLayer(P)}),at(),N(),st()}finally{S.value=""}},K.readAsText(H)}function ye(C){g&&(vt&&g.removeLayer(vt),vt=L.tileLayer(Ye[C].url,{maxZoom:19,minZoom:6}).addTo(g),bt.value=C)}function R(C){const S=L.latLng(C[0],C[1]);g.setView(S,13)}e.watch(()=>n.modelValue,C=>{const S=Et(C);if(C&&S!==C){r("update:modelValue",S);return}p.clearLayers(),S&&L.geoJSON({type:"Feature",geometry:S}).eachLayer(H=>{var K,J,B,P,Y,te;if(p.addLayer(H),s.value){(J=(K=H.dragging)==null?void 0:K.disable)==null||J.call(K);return}(P=(B=H.dragging)==null?void 0:B.enable)==null||P.call(B),(te=(Y=H.dragging)==null?void 0:Y.enabled)==null||te.call(Y),H.on("dragend",he=>{const we=he.target.getLatLng();r("update:modelValue",{type:"Point",coordinates:[we.lng,we.lat]})})}),Ke.value=p.getLayers().length,N(),st()});function G(){var C,S;return(C=a==null?void 0:a.appContext.config.globalProperties.$settings)!=null&&C.basemaps?(S=a==null?void 0:a.appContext.config.globalProperties.$settings)==null?void 0:S.basemaps.map((H,K)=>Object.assign(H,{key:`b${K}`,preview:H.preview||H.url.replace("{z}/{x}/{y}.png","13/4790/2762.png")})).reduce((H,K)=>({...H,[K.key]:K}),{}):{topo100:{url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"},orto10:{url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4790/2762.png"},osmb:{url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png",preview:"https://tile.openstreetmap.org.ua/styles/osm-bright/13/4790/2762.png"}}}const be=e.ref(!1);return e.watch(be,()=>{setTimeout(()=>{g.invalidateSize()},50)}),e.watch(i,async C=>{if(!C||!u.value){c.value=null;return}await e.nextTick();const S=u.value.getBoundingClientRect();c.value={top:S.bottom+6,left:S.left}}),e.onUnmounted(()=>{i.value=!1,c.value=null}),(C,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["leaflet-map-wrapper relative w-full h-[400px]",{fullscreen:be.value}])},[e.createElementVNode("div",{ref_key:"mapContainer",ref:_,class:"w-full h-full"},null,512),e.createVNode(e.Transition,{name:"zoom-instructions","enter-active-class":"transition-all duration-200 ease-out","leave-active-class":"transition-all duration-500 ease-in","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[d.value&&n.handleZoom?(e.openBlock(),e.createElementBlock("div",t1,[e.createElementVNode("div",l1,[e.createElementVNode("p",a1,e.toDisplayString(m.value),1)])])):e.createCommentVNode("",!0)]),_:1}),o.value.search||o.value.import||o.value.export?(e.openBlock(),e.createElementBlock("div",n1,[o.value.search?(e.openBlock(),e.createBlock(Yb,{key:0,onGoToCoordinates:R})):e.createCommentVNode("",!0),o.value.import||o.value.export?(e.openBlock(),e.createElementBlock("div",r1,[e.createElementVNode("div",o1,[o.value.import?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white transition",onClick:j,disabled:s.value}," Import ",8,s1)):e.createCommentVNode("",!0),o.value.export?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white transition",onClick:Te,disabled:s.value||Ke.value===0}," Export ",8,i1)):e.createCommentVNode("",!0)]),e.createElementVNode("input",{ref_key:"importRef",ref:E,type:"file",onChange:Le,accept:".json,.geojson",class:"hidden",disabled:s.value},null,40,c1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",d1,[e.createElementVNode("div",u1,[o.value.point?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["vs-btn",{"vs-active":X.value==="marker"}]),title:"Point",onClick:S[0]||(S[0]=H=>ne("marker")),disabled:s.value},[e.createVNode(Cb)],10,m1)):e.createCommentVNode("",!0),o.value.line?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(["vs-btn",{"vs-active":X.value==="polyline"}]),title:"Line",onClick:S[1]||(S[1]=H=>ne("polyline")),disabled:s.value},[e.createVNode(Bb)],10,p1)):e.createCommentVNode("",!0),o.value.polygon?(e.openBlock(),e.createElementBlock("button",{key:2,class:e.normalizeClass(["vs-btn",{"vs-active":X.value==="polygon"}]),title:"Polygon",onClick:S[2]||(S[2]=H=>ne("polygon")),disabled:s.value},[e.createVNode(Mb)],10,f1)):e.createCommentVNode("",!0),o.value.rectangle?(e.openBlock(),e.createElementBlock("button",{key:3,class:e.normalizeClass(["vs-btn",{"vs-active":X.value==="rectangle"}]),title:"Rectangle",onClick:S[3]||(S[3]=H=>ne("rectangle")),disabled:s.value},[e.createVNode(Fb)],10,h1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"vs-btn mt-5",onClick:S[4]||(S[4]=H=>be.value=!be.value),title:"Full Screen"},[e.createVNode(Rb,{style:{width:"12px",height:"12px"}})])])]),e.createElementVNode("div",{class:e.normalizeClass(["absolute left-4 z-[1000]",Re.value?"bottom-8":"bottom-4"])},[e.createElementVNode("div",g1,[e.createVNode(e1,{basemaps:e.unref(Ye),onOnLayerChange:ye},null,8,["basemaps"]),y.value.length?(e.openBlock(),e.createElementBlock("div",y1,[S[9]||(S[9]=e.createElementVNode("p",{class:"font-semibold text-[11px] uppercase tracking-wide text-gray-500 mb-2"},"Layers",-1)),e.createElementVNode("div",b1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,H=>(e.openBlock(),e.createElementBlock("label",{key:H.id,class:"flex items-center gap-2 cursor-pointer select-none"},[e.createElementVNode("input",{type:"checkbox",class:"rounded border-gray-300 text-blue-600 focus:ring-blue-500",checked:H.visible,disabled:s.value,onChange:K=>z(H.id)},null,40,k1),e.createElementVNode("span",x1,e.toDisplayString(H.config.title||H.config.name||H.id),1)]))),128))])])):e.createCommentVNode("",!0)])],2),e.createElementVNode("div",w1,[Re.value?(e.openBlock(),e.createElementBlock("div",_1,[e.createElementVNode("div",{class:"mr-auto flex items-center gap-2 min-w-0 relative",onMouseenter:S[5]||(S[5]=H=>i.value=!0),onMouseleave:S[6]||(S[6]=H=>i.value=!1)},[e.createElementVNode("div",E1,[S[10]||(S[10]=e.createTextVNode(" Type: ",-1)),e.createElementVNode("span",C1,e.toDisplayString(Re.value.type),1)]),b.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"addressEl",ref:u,class:"text-gray-500 text-xs truncate cursor-help",style:{"max-width":"260px"}}," Address: "+e.toDisplayString(b.value),513)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[i.value&&b.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed z-[99999] pointer-events-none bg-gray-800 text-white text-xs px-2 py-1 rounded shadow whitespace-nowrap",style:e.normalizeStyle({top:c.value.top+"px",left:c.value.left+"px"})},e.toDisplayString(b.value),5)):e.createCommentVNode("",!0)]))],32),e.createElementVNode("div",V1,[e.createElementVNode("div",N1,[S[11]||(S[11]=e.createTextVNode(" Center: ",-1)),e.createElementVNode("b",null,e.toDisplayString(Re.value.center.lat.toFixed(5))+", "+e.toDisplayString(Re.value.center.lng.toFixed(5)),1)]),Re.value.areaKm2!==null?(e.openBlock(),e.createElementBlock("div",v1,[S[12]||(S[12]=e.createTextVNode(" Area: ",-1)),e.createElementVNode("b",null,e.toDisplayString(Re.value.areaKm2.toFixed(1))+" km²",1)])):(e.openBlock(),e.createElementBlock("div",B1,S[13]||(S[13]=[e.createTextVNode("Area: ",-1),e.createElementVNode("b",null,"—",-1)]))),e.createElementVNode("button",{class:"tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",title:"Zoom to feature",onClick:S[7]||(S[7]=H=>v()),disabled:s.value},S[14]||(S[14]=[e.createStaticVNode('<svg 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="w-3 h-3" data-v-150e767b><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-150e767b></path><path d="M7 10l6 0" data-v-150e767b></path><path d="M10 7l0 6" data-v-150e767b></path><path d="M21 21l-6 -6" data-v-150e767b></path></svg>',1)]),8,S1),e.createElementVNode("button",{class:"tool bg-gray-100 py-1.5 px-2 rounded-lg text-md cursor-pointer hover:bg-blue-500 hover:text-white transition-all",title:"Delete feature",onClick:S[8]||(S[8]=H=>q()),disabled:s.value},[e.createVNode(va,{class:"w-3 h-3"})],8,D1)])])):e.createCommentVNode("",!0)])],2))}}),M1=_e(A1,[["__scopeId","data-v-150e767b"]]),T1=["data-focus"],L1={class:"flex items-center"},$1={class:"overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border"},F1=["onClick","aria-label"],I1={key:0,class:"absolute text-gray-500 truncate pl-2"},O1={class:"flex-1 min-w-[2px]"},P1=["placeholder"],R1={class:"flex items-center shrink-0"},j1=["disabled"],U1=e.defineComponent({__name:"vs-input-tag",props:e.mergeModels({unique:{type:Boolean,default:!0},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:"Введіть тег"}},{modelValue:{default:[]},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue"],["update:modelValue"]),setup(l,{emit:t}){const a=l,n=t;ft(a.style);const r=e.ref(null),o=e.ref(null),s=e.ref(null),i=e.ref(!1),c=e.ref(""),u=e.useModel(l,"modelValue"),d=e.computed(()=>a.placeholder||"Add tag…"),m=e.computed(()=>{var V;return((V=u.value)==null?void 0:V.length)===0&&c.value===""}),h=e.computed(()=>{var V;return!a.disabled&&((V=u.value)==null?void 0:V.length)>0}),f=e.computed(()=>a.disabled),y=async()=>{f.value||await e.nextTick(()=>{var V;return(V=s.value)==null?void 0:V.focus()})},k=V=>{const E=V.trim();E!==""&&(!u.value||!Array.isArray(u.value)?u.value=[E]:a.unique?u.value.includes(E)||(u.value=[...u.value,E]):u.value=[...u.value,E],c.value="")},g=()=>{const V=c.value;V.trim()!==""&&k(V),c.value=""},p=V=>{const E=u.value.slice();E.splice(V,1),n("update:modelValue",E)},x=()=>{n("update:modelValue",[])},w=()=>{f.value||(i.value=!0)},b=()=>{i.value=!1,!f.value&&g()},_=V=>{const{key:E}=V;E==="Enter"?(V.preventDefault(),g()):E==="Backspace"&&c.value===""&&u.value.length>0&&p(u.value.length-1)};return(V,E)=>(e.openBlock(),e.createElementBlock("div",{class:"flex gap-1 w-full",ref_key:"root",ref:r,onClick:E[1]||(E[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["relative w-full font-sans",a.customClass]),role:"group","aria-label":"Tag input"},[e.createElementVNode("div",{class:e.normalizeClass(["flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white","border-gray-300 hover:border-gray-400",i.value?"border-blue-500 ring-1 ring-blue-500":"",f.value?"bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300":""]),"data-focus":i.value?"true":"false",onClick:y},[e.createElementVNode("div",{class:"flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",ref_key:"chipsRef",ref:o},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(M,D)=>(e.openBlock(),e.createElementBlock("div",{key:D,class:"flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"},[e.createElementVNode("div",L1,[e.createElementVNode("div",$1,e.toDisplayString(M),1)]),e.createElementVNode("div",{role:"button",class:"flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",onClick:e.withModifiers(A=>p(D),["stop"]),"aria-label":`Remove ${M}`},E[2]||(E[2]=[e.createElementVNode("svg",{height:"14",width:"14",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",class:"inline-block fill-current stroke-current leading-none stroke-0"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,F1)]))),128)),m.value?(e.openBlock(),e.createElementBlock("div",I1,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",O1,[f.value?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:s,class:"pl-2 w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-label":"Add tag","onUpdate:modelValue":E[0]||(E[0]=M=>c.value=M),onFocus:w,onBlur:b,onKeydown:_,placeholder:u.value&&u.value.length?"":void 0},null,40,P1)),[[e.vModelText,c.value]])])],512),e.createElementVNode("div",R1,[h.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-label":"Clear all tags",disabled:f.value,onClick:e.withModifiers(x,["stop"])},E[3]||(E[3]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,j1)):e.createCommentVNode("",!0)])],10,T1)],2)],512))}}),z1={class:"relative flex gap-1 bg-white w-full"},H1=["disabled","placeholder"],q1=e.defineComponent({__name:"vs-input-slug",props:e.mergeModels({disabled:{type:Boolean},placeholder:{},parent:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=e.inject("values"),a=l,n=e.useModel(l,"modelValue");function r(s){const i={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ы:"y",э:"e",ю:"yu",я:"ya",ь:"",ъ:"",є:"ye",і:"i",ї:"yi",ґ:"g"};return s.toLowerCase().split("").map(c=>i[c]||c).join("").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const o=()=>{var c,u;const s=(u=(c=t==null?void 0:t.value)==null?void 0:c[a.parent||""])==null?void 0:u.toString(),i=r(s);n.value=i.toString()};return(s,i)=>(e.openBlock(),e.createElementBlock("div",z1,[e.withDirectives(e.createElementVNode("input",{ref:"vsText",disabled:s.disabled,placeholder:s.placeholder,"onUpdate:modelValue":i[0]||(i[0]=c=>n.value=c),class:"block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,8,H1),[[e.vModelText,n.value]]),e.createElementVNode("button",{class:"px-2 bg-gray-100 border rounded-lg hover:bg-gray-200",onClick:o}," Gen ")]))}}),G1=_e(q1,[["__scopeId","data-v-b0eba370"]]),W1={class:"relative flex gap-1 bg-white w-full"},K1=["disabled","placeholder"],Y1=["disabled"],X1={key:0},Z1={key:1},Q1=e.defineComponent({__name:"vs-input-codegen",props:e.mergeModels({table:{},code:{},init:{type:Boolean},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref(!1),r=e.computed(()=>t.init!==!1),o=e.computed(()=>!!t.table&&!!t.code),s=()=>{if(!o.value)return"";const u=encodeURIComponent(String(t.table)),d=encodeURIComponent(String(t.code));return`/api/code-gen/${u}/${d}`},i=async()=>{if(!o.value||n.value)return;const u=s();if(u){n.value=!0;try{const d=await(await fetch(u)).text();a.value=d}finally{n.value=!1}}},c=()=>{r.value&&(a.value||i())};return e.onMounted(()=>{c()}),e.watch(()=>[t.table,t.code,t.init],()=>{c()}),(u,d)=>(e.openBlock(),e.createElementBlock("div",W1,[e.withDirectives(e.createElementVNode("input",{disabled:u.disabled,placeholder:u.placeholder,"onUpdate:modelValue":d[0]||(d[0]=m=>a.value=m),class:"block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,8,K1),[[e.vModelText,a.value]]),e.createElementVNode("button",{class:"px-2 bg-gray-100 border rounded-lg hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed",disabled:n.value||u.disabled||!o.value,onClick:i},[n.value?(e.openBlock(),e.createElementBlock("span",Z1,"...")):(e.openBlock(),e.createElementBlock("span",X1,"Gen"))],8,Y1)]))}}),J1=_e(Q1,[["__scopeId","data-v-6ee5237d"]]),ek={class:"w-full"},tk={ref:"sortableContainer",class:"flex flex-col gap-1"},lk=["onDragstart","onDrop"],ak={class:"w-1/3"},nk={class:"w-2/3"},rk=["onClick"],ok={key:0,class:"text-[14px] text-gray-700"},sk={class:"mt-2 w-full flex items-center"},ik=["disabled"],ck=e.defineComponent({__name:"vs-input-key-value",props:{parent:{},ignore:{},addButtonText:{},modelValue:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=k=>`${k}-${Math.random().toString(36).substring(2,15)}`,n=e.inject("values"),r=l,o=t,s=r.addButtonText??"Додати",i=r.ignore??[],c=e.ref([]),u=e.ref(null);(()=>{var g;const k=r.parent&&((g=n==null?void 0:n.value)==null?void 0:g[r.parent])||r.modelValue||{};c.value=Object.entries(k).filter(([p])=>!i.includes(p)).map(([p,x])=>({id:a("key-value-"),key:p,value:x}))})();function d(k){u.value=k}function m(k){if(u.value===null||u.value===k)return;const g=c.value.splice(u.value,1)[0];c.value.splice(k,0,g),u.value=null}const h=e.computed(()=>c.value.some(k=>k.key&&!k.value||!k.key&&k.value)),f=()=>{c.value.push({id:a("key-value-"),key:"",value:""})},y=k=>{c.value=c.value.filter(g=>g.id!==k)};return e.watch(c,k=>{const g={};k.forEach(x=>{x.key&&x.value!==void 0&&(g[x.key]=x.value)});const p={};i.length&&i.forEach(x=>{var w,b;p[x]=r.parent?(b=(w=n==null?void 0:n.value)==null?void 0:w[r.parent])==null?void 0:b[x]:void 0}),n!=null&&n.value&&r.parent&&(n.value[r.parent]={...p,...g}),o("update:modelValue",g)},{deep:!0}),(k,g)=>(e.openBlock(),e.createElementBlock("div",ek,[e.createElementVNode("div",tk,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(p,x)=>(e.openBlock(),e.createElementBlock("div",{key:p.id,class:e.normalizeClass(["flex items-center gap-2 w-full",{"opacity-50":u.value===x}]),draggable:"true",onDragstart:w=>d(x),onDragover:g[0]||(g[0]=e.withModifiers(()=>{},["prevent"])),onDrop:w=>m(x)},[g[1]||(g[1]=e.createStaticVNode('<button class="cursor-move" data-v-a0f7fbfc><svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-a0f7fbfc><circle cx="15" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="18" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="18" r="1.5" data-v-a0f7fbfc></circle></svg></button>',1)),e.createElementVNode("div",ak,[e.createVNode(Na,{modelValue:p.key,"onUpdate:modelValue":w=>p.key=w,placeholder:"Ключ"},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("div",nk,[e.createVNode(Na,{modelValue:p.value,"onUpdate:modelValue":w=>p.value=w,placeholder:"Значення"},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("button",{onClick:w=>y(p.id),class:"shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"},[e.createVNode(e.unref(Sh),{height:"16",width:"16"})],8,rk)],42,lk))),128))],512),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",ok," Дані для відображення відсутні ")),e.createElementVNode("div",sk,[e.createElementVNode("button",{type:"button",onClick:f,disabled:h.value,class:"py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"},[e.createVNode(Gl,{height:"14",width:"14"}),e.createTextVNode(" "+e.toDisplayString(e.unref(s)),1)],8,ik)])]))}}),dk=_e(ck,[["__scopeId","data-v-a0f7fbfc"]]),uk={class:"flex items-center gap-2 w-full"},mk=["disabled"],pk=["disabled"],fk=e.defineComponent({__name:"vs-input-color",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,{inputClass:n}=ft(a.style),r=t,o=e.computed({get:()=>a.modelValue||"#000000",set:i=>r("update:modelValue",i)}),s=e.computed(()=>!!a.disabled);return(i,c)=>(e.openBlock(),e.createElementBlock("div",uk,[e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),disabled:s.value,ref:"color",class:e.normalizeClass(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]",[i.modelValue?"":"text-opacity-50",e.unref(n)].join(" ")]),style:{border:"1px solid #CFD9E0"}},null,10,mk),[[e.vModelText,o.value]]),e.withDirectives(e.createElementVNode("input",{class:"text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2","onUpdate:modelValue":c[1]||(c[1]=u=>o.value=u),disabled:s.value},null,8,pk),[[e.vModelText,o.value]])]))}}),hk={class:"flex items-center gap-2 w-full"},gk=["min","max","step","disabled"],yk=["disabled"],bk=e.defineComponent({__name:"vs-input-range",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},min:{default:0},max:{default:100},step:{default:1}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,{inputClass:n}=ft(a.style),r=t,o=e.computed({get:()=>Number(a.modelValue??a.min),set:i=>r("update:modelValue",Number(i))}),s=e.computed(()=>!!a.disabled);return(i,c)=>(e.openBlock(),e.createElementBlock("div",hk,[e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),min:i.min,max:i.max,step:i.step,disabled:s.value,ref:"range",class:e.normalizeClass(["w-full cursor-pointer accent-blue-500",[i.modelValue?"":"text-opacity-50",e.unref(n)].join(" ")])},null,10,gk),[[e.vModelText,o.value]]),e.withDirectives(e.createElementVNode("input",{class:"text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",type:"number","onUpdate:modelValue":c[1]||(c[1]=u=>o.value=u),disabled:s.value},null,8,yk),[[e.vModelText,o.value]])]))}}),kk=["type","value","onInput","placeholder","disabled"],xk=e.defineComponent({__name:"vs-input-array",props:e.mergeModels({count:{default:1},limit:{default:l=>l.count??1},inputType:{default:"text"},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=ft(t.style),n=e.useModel(l,"modelValue"),r=e.computed(()=>!!t.disabled),o=e.computed(()=>t.placeholder??"");e.watchEffect(()=>{var c;const i=((c=n.value)==null?void 0:c.length)??0;i<t.count&&(n.value=[...n.value??[],...Array(t.count-i)])});function s(i,c){if(r.value)return;const u=i.target.value,d=[...n.value];d[c]=t.inputType==="text"?u:Number(u),n.value=d}return(i,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid gap-2",`grid-cols-${i.limit}`])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.count,u=>{var d;return e.openBlock(),e.createElementBlock("input",{type:i.inputType,value:((d=n.value)==null?void 0:d[u-1])??"",onInput:m=>s(m,u-1),placeholder:o.value,disabled:r.value,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":i.error}]]),style:{border:"1px solid #CFD9E0"}},null,42,kk)}),256))],2))}}),wk={class:"flex items-center gap-2 w-full"},_k={class:"relative flex-1"},Ek=["placeholder","disabled","onKeydown"],Ck=["disabled"],Vk={key:0,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Nk={key:1,class:"animate-spin h-5 w-5 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},vk={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50"},Bk={class:"bg-white text-gray-900 rounded-lg shadow-lg w-[480px] max-h-[80vh] overflow-y-auto"},Sk={class:"p-3 border-b font-semibold text-gray-900 flex justify-between items-center"},Dk=["onClick"],Ak={key:0,class:"p-4 text-sm text-gray-500"},Mk=e.defineComponent({__name:"vs-input-address",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{},api:{default:""},geom:{default:""},includes:{default:()=>[]}},{modelValue:{default:""},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue","update:geom"],["update:modelValue"]),setup(l,{emit:t}){const a=l,n=t,{inputClass:r}=ft(a.style),o=e.useModel(l,"modelValue"),s=e.computed({get:()=>o.value,set:p=>{o.value=p}}),i=e.ref(!1),c=e.ref([]),u=e.ref(!1),d=e.computed(()=>a.placeholder??""),m=e.computed(()=>!!a.disabled),h=e.inject("values");function f(){!m.value&&s.value.trim()&&y()}async function y(){var b;const p=(s.value||"").trim();if(!p)return;let x=p;if((b=a.includes)!=null&&b.length&&(h!=null&&h.value)){const _=a.includes.map(V=>{var E;return(E=h.value)==null?void 0:E[V]}).filter(Boolean);_.length&&(x=`${_.join(", ")}, ${p}`)}const w=a.api.replace("{{value}}",encodeURIComponent(x));i.value=!0;try{const _=await(await fetch(w)).json();c.value=Array.isArray(_)?_:[],u.value=!0}catch(_){console.error("Address search error:",_)}finally{i.value=!1}}function k(){u.value=!u.value}function g(p){if(!p)return;u.value=!1;const x=parseFloat(p.lat),w={type:"Point",coordinates:[parseFloat(p.lon),x]};a.geom&&(h!=null&&h.value)&&(h.value[a.geom]=w),n("update:geom",w)}return(p,x)=>{var w;return e.openBlock(),e.createElementBlock("div",wk,[e.createElementVNode("div",_k,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":x[0]||(x[0]=b=>s.value=b),placeholder:d.value,disabled:m.value,class:e.normalizeClass(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500",[e.unref(r),{"!border-red-600":a.error}]]),style:{border:"1px solid #CFD9E0"},onKeydown:e.withKeys(e.withModifiers(f,["prevent"]),["enter"])},null,42,Ek),[[e.vModelText,s.value]]),c.value.length?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-blue-600",onClick:k,title:"Show search results"},x[2]||(x[2]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),e.createElementVNode("path",{d:"M12 16v-4"}),e.createElementVNode("path",{d:"M12 8h.01"})],-1)]))):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",onClick:y,class:"flex items-center justify-center px-2 py-2 border rounded-md bg-white hover:bg-gray-50 text-gray-600 hover:text-blue-600 disabled:opacity-50 h-[38px]",disabled:i.value||!((w=s.value)!=null&&w.trim())},[i.value?(e.openBlock(),e.createElementBlock("svg",Nk,x[4]||(x[4]=[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",Vk,x[3]||(x[3]=[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),e.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},null,-1)])))],8,Ck),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[u.value?(e.openBlock(),e.createElementBlock("div",vk,[e.createElementVNode("div",Bk,[e.createElementVNode("div",Sk,[x[6]||(x[6]=e.createElementVNode("span",null,"Search results",-1)),e.createElementVNode("button",{class:"text-gray-500 hover:text-blue-600",onClick:x[1]||(x[1]=b=>u.value=!1),title:"Close"},x[5]||(x[5]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)]))]),e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(b,_)=>(e.openBlock(),e.createElementBlock("li",{key:_,onClick:V=>g(b),class:"px-3 py-2 cursor-pointer hover:bg-gray-100 border-b text-sm"},e.toDisplayString(b.display_name),9,Dk))),128))]),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ak," No results found "))])])):e.createCommentVNode("",!0)]))])}}}),$e={VsInputText:Na,VsInputRadio:Jo,"vs-input-text":Na,"vs-input-password":ah,"vs-input-textarea":uy,"vs-input-mask":Rh,"vs-input-number":oh,"vs-input-radio":Jo,"vs-input-select":Fn,"vs-input-switcher":Zo,"vs-input-static":Qo,"vs-input-container":Hg,"vs-input-date":l0,"vs-input-checkbox":es,"vs-input-file":z0,"vs-input-html":Qo,"vs-input-email":zh,"vs-input-datatable":bb,"vs-input-map":M1,"vs-input-file-list":kg,"vs-input-tags":U1,"vs-input-slug":G1,"vs-input-codegen":J1,"vs-input-key-value":dk,"vs-input-range":bk,"vs-input-color":fk,"vs-input-native-select":Fn,"vs-input-array":xk,"vs-input-address":Mk},Tk=e.defineComponent({__name:"behavior",props:{api:{},set:{},button:{},error:{},value:{}},setup(l){const t=l,a=e.inject("values");async function n(){try{if(!t.api)return;const r=t.api.replace("{{value}}",t.value),o=await fetch(r);if(!o.ok){xe({type:"warning",title:"Validation",message:"При спробі завантажити дані виникла помилка."});return}const s=await o.json();if(!t.set||!a)return;for(const[i,c]of Object.entries(t.set))a.value[i]=s.result[c]}catch(r){console.error(t.error,r)}}return(r,o)=>(e.openBlock(),e.createElementBlock("button",{onClick:n,class:"vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"},e.toDisplayString(r.button),1))}}),Lk={class:"flex flex-col gap-1 w-full"},$k={key:0,class:"text-sm text-gray-500"},is=e.defineComponent({__name:"vs-compact-form-layout",props:e.mergeModels({item:{default:{}},layout:{default:"default"},style:{default:{}},type:{default:""},error:{type:[String,Boolean]},columns:{default:()=>({container:12,label:3})}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>th[`${t.layout}`]),r=e.computed(()=>$e==null?void 0:$e[`vs-input-${t.item.type}`]),o=e.computed(()=>{var d;const i=e.unref(r);if(!i)return new Set;const c=i.props??((d=i.__vccOpts)==null?void 0:d.props);if(!c)return new Set;const u=Array.isArray(c)?c:Object.keys(c);return new Set(u)}),s=e.computed(()=>{const i=t.item??{},c=o.value;return c.size?Object.fromEntries(Object.entries(i).filter(([u])=>c.has(u))):{}});return(i,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),{ua:t.item.ua,error:t.error||"",item:i.item,columns:t.columns,label:t.item.label},{default:e.withCtx(()=>{var u,d;return[e.createElementVNode("div",{class:e.normalizeClass(["flex w-full",`${t.item.type}-component`])},[e.createElementVNode("div",Lk,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),e.mergeProps(s.value,{modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=m=>a.value=m)}),null,16,["modelValue"])),i.item.description&&t.layout!=="settings"?(e.openBlock(),e.createElementBlock("p",$k,e.toDisplayString(i.item.description),1)):e.createCommentVNode("",!0)]),(u=i.item.behavior)!=null&&u.api&&((d=i.item.behavior)!=null&&d.button)?(e.openBlock(),e.createBlock(Tk,e.mergeProps({key:0},i.item.behavior,{value:a.value}),null,16,["value"])):e.createCommentVNode("",!0)],2)]}),_:1},8,["ua","error","item","columns","label"]))}}),Fk={class:"text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300"},Ik={class:"vs-compact-form-navigation__rail mt-[6px]"},Ok=["onClick"],Pk=e.defineComponent({__name:"vs-compact-form-navigation",props:{target:{},scrollContainer:{},title:{default:"Навігація"},enabled:{type:Boolean,default:!0},width:{default:400}},setup(l,{expose:t}){const a=l,n=e.ref([]),r=e.ref(""),o=e.ref(""),s=e.computed(()=>!!a.enabled),i=e.computed(()=>["vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]","sticky top-0 self-start shrink-0","max-h-full min-h-0 overflow-y-auto"]),c=e.computed(()=>{const $=a.width;if($==null)return{};const U=typeof $=="number"?`${$}px`:`${$}`;return{width:U,minWidth:U}});let u=null,d=0,m=0,h=null,f=null,y=null;const k=()=>D(),g=()=>x();e.watch(()=>a.target,async $=>{if(V(),!$){h=null,n.value=[],r.value="";return}h=$,s.value&&(await e.nextTick(),_($),x())},{immediate:!0}),e.watch(()=>a.scrollContainer,$=>{if(!s.value){f=$??null;return}p($??null),e.nextTick(()=>x())},{immediate:!0}),e.onMounted(()=>{a.scrollContainer||p(null),x()}),e.onBeforeUnmount(()=>{V(),p(null,!0),h=null,typeof window<"u"&&(d&&window.cancelAnimationFrame(d),m&&window.cancelAnimationFrame(m))});function p($,U=!1){if(y&&(y(),y=null),U){f=null;return}if(f=$??null,typeof window>"u")return;const W=$??window,O=window;W.addEventListener("scroll",k,{passive:!0}),O.addEventListener("resize",g),y=()=>{W.removeEventListener("scroll",k),O.removeEventListener("resize",g)}}function x(){if(!s.value||!h)return;d&&typeof window<"u"&&window.cancelAnimationFrame(d);const $=()=>{w(),d=0};typeof window>"u"?$():d=window.requestAnimationFrame($)}function w(){if(!s.value||!h)return;const $=Array.from(h.querySelectorAll("h1, h2")),U=new Set,W=[];$.forEach((O,I)=>{var me;const F=((me=O.textContent)==null?void 0:me.trim())??"";if(!F)return;let T=(O.getAttribute("id")??"").trim();T||(T=b(F)||`heading-${I+1}`);let z=T,Q=1;for(;U.has(z);)z=`${T}-${Q+=1}`;O.id!==z&&Object.assign(O,{id:z}),U.add(z),W.push({id:z,text:F,level:O.tagName.toLowerCase()==="h1"?1:2})}),n.value=W,W.length||(r.value=""),M()}function b($){return $.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function _($){!$||!s.value||typeof MutationObserver>"u"||(V(),u=new MutationObserver(()=>x()),u.observe($,{childList:!0,subtree:!0}))}function V(){u&&(u.disconnect(),u=null)}function E($){const U=f;if(!U)return typeof window>"u"?$.offsetTop:$.getBoundingClientRect().top+window.scrollY;const W=$.getBoundingClientRect(),O=U.getBoundingClientRect();return W.top-O.top+U.scrollTop}function M(){if(!s.value||!n.value.length)return;const $=f,U=($?$.scrollTop:null)||(typeof window<"u"?window.scrollY:0),W=($?$.clientHeight:null)||(typeof window<"u"?window.innerHeight:0),O=U+W;let I=null;for(let T=0;T<n.value.length;T+=1){const z=n.value[T],Q=document.getElementById(z.id);if(Q){const me=E(Q);me+Q.offsetHeight>U&&me<O&&(I=z.id)}}!I&&o.value&&(I=o.value),I&&(o.value=I);const F=$?$.scrollHeight-$.clientHeight:document.documentElement.scrollHeight-window.innerHeight;U+5>=F&&(I=n.value[n.value.length-1].id),I&&(r.value=I)}function D(){s.value&&(m&&window.cancelAnimationFrame(m),m=window.requestAnimationFrame(()=>{M(),m=0}))}function A($){if(!s.value)return;const U=document.getElementById($);if(!U)return;const W=f,O=Math.max(0,E(U));W?W.scrollTo({top:O,behavior:"smooth"}):typeof window<"u"&&window.scrollTo({top:O,behavior:"smooth"})}return t({refresh:x}),($,U)=>s.value&&n.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(i.value),style:e.normalizeStyle(c.value)},[e.createElementVNode("h2",Fk,e.toDisplayString($.title),1),e.createElementVNode("div",Ik,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,W=>(e.openBlock(),e.createElementBlock("div",{key:W.id,class:e.normalizeClass(["vs-compact-form-navigation__item relative",W.level===2?"vs-compact-form-navigation__item--nested":"",W.id===r.value?"vs-compact-form-navigation__item--active":""])},[e.createElementVNode("button",{type:"button",onClick:O=>A(W.id),class:e.normalizeClass(["vs-compact-form-navigation__button flex gap-x-3 py-[6px] pr-3 text-sm duration-200 hover:text-gray-800",W.level===2?"pl-[15px]":"pl-[18px]",W.id===r.value?"text-gray-800":"text-gray-500"])},[e.createElementVNode("span",null,e.toDisplayString(W.text),1)],10,Ok)],2))),128))])],6)):e.createCommentVNode("",!0)}}),Rk=_e(Pk,[["__scopeId","data-v-1584a562"]]),cs={required:"Це поле є обов’язковим",email:"Неправильний email"},jk=l=>l?!1:cs.required,Uk=l=>l?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)?!1:cs.email:!1,zk=(l,t)=>{const a=t.pattern??t.regexp;return!(typeof a=="string"?new RegExp(a):a).test(l)&&l?t.message:!1},Hk=(l,t)=>!1,qk=(l,t)=>{switch(typeof t=="string"?t:t.type){case"required":return jk(l);case"email":return Uk(l);case"regexp":return zk(l,t);case"custom":return Hk();default:return!1}},Gk={autocomplete:"select",combobox:"select",datepicker:"date",markedtext:"mask",html:"static",geom:"map",filelist:"file-list",datalist:"datatable",file:"file",dropzone:"file"};function ds(l){const t=l.toLowerCase();return Gk[t]||t}function In(l,t=!1){if(Array.isArray(l)){const n=[];return l.forEach(r=>{const o={...r};o.name=(r.name||r.id||r.key||"").toString(),o.type=ds(r.type),o.label=r.label||r.ua,o.rules=r.rules||r.validators,o.type==="email"&&!o.rules&&(o.rules=["email"]),r.data&&(o.api=`/api/suggest/${r.data}`),o.disabled=t||o.disabled,Array.isArray(o.schema)&&(o.schema=In(o.schema,o.disabled)),n.push(o)}),n}const a=[];return Object.entries(l).forEach(n=>{const r={name:n[0],...n[1],type:ds(n[1].type),label:n[1].label||n[1].ua,rules:n[1].rules||n[1].validators,disabled:t};r.type==="email"&&!r.rules&&(r.rules=["email"]),n[1].type.includes("list")&&(r.multiple=!0),!r.api&&n[1].data&&(r.api=`/api/suggest/${n[1].data}`),Array.isArray(r.schema)&&(r.schema=In(r.schema,r.disabled)),a.push(r)}),a}function Wk(l,t,a=!1){const n=e.computed(()=>In(t,typeof a=="boolean"?a:a.value)),r=e.ref({});function o(c){var h;const u=c==null?void 0:c.conditions;if(!u)return!0;const d=Array.isArray(u)?u[0]:u,m=(h=l==null?void 0:l.value)==null?void 0:h[d];return os(m,u)}const s=(c=n.value,u=!0)=>(c.forEach(d=>{if(d.rules){if(!o(d)){delete r.value[d.name];return}let m=!1,h=null;d.rules.forEach(f=>{const y=qk(l.value[d.name],f);y&&(m=!0,!h&&typeof y=="string"&&(h=y))}),m&&h?r.value[d.name]=h:delete r.value[d.name]}d.schema&&s(d.schema,!1)}),u&&Object.values(r.value).some(Boolean)?r.value:null),i=e.computed(()=>{var c;return(c=n.value)==null?void 0:c.filter(u=>u.hidden!==!0&&o(u))});return{errors:r,validate:s,reset:()=>{l.value={},r.value={}},visibleSchema:i}}const Kk={class:"flex w-full h-full min-h-0 gap-6"},Yk={key:0,"data-orientation":"horizontal",role:"none",class:"mt-1 shrink-0 h-[1px] w-full bg-slate-100 dark:bg-slate-600"},Xe=e.defineComponent({__name:"vs-compact-form",props:e.mergeModels({schema:{default:()=>[]},style:{default:()=>({})},modelValue:{},layout:{default:()=>"default"},formId:{default:()=>""},disabled:{type:Boolean,default:!1},navigation:{type:Boolean,default:!1},navWidth:{default:400},columns:{}},{form:{default:()=>({})},formModifiers:{},values:{default:()=>({})},valuesModifiers:{}}),emits:e.mergeModels(["handle-submit","update:modelValue"],["update:form","update:values"]),setup(l,{expose:t,emit:a}){const n=a,r=l,o=e.useModel(l,"form"),s=e.useModel(l,"values"),{errors:i,validate:c,reset:u,visibleSchema:d}=Wk(s,r.schema,e.toRef(r,"disabled")),m=e.ref(null),h=e.ref(null),f=e.computed(()=>r.navigation),y=e.computed(()=>r.navWidth),k=e.computed(()=>{var M;return(M=r.style)==null?void 0:M.columns}),g=Object.freeze({container:12,label:3}),p=e.computed(()=>r.columns??k.value??g),x=e.computed(()=>r.columns!=null||k.value!=null),w=e.computed(()=>x.value?"horizontal":r.layout),b=M=>M!=null&&M.columns?"horizontal":w.value,_=M=>(M==null?void 0:M.columns)??p.value,V=()=>{n("update:modelValue",s.value),c(),n("handle-submit",s.value)};t({validate:c,reset:u,errors:i}),e.onMounted(()=>{r.modelValue&&(s.value=r.modelValue),o.value={value:s.value,errors:i.value,reset:u,validate:c,formId:r.formId}});function E(M,D){if(M===D)return!0;if(typeof M!="object"||typeof D!="object"||!M||!D)return!1;const A=Object.keys(M),$=Object.keys(D);return A.length!==$.length?!1:A.every(U=>M[U]===D[U])}return e.provide("form",o),e.provide("values",s),(M,D)=>(e.openBlock(),e.createElementBlock("div",Kk,[e.createElementVNode("div",{class:"flex-1 min-h-0 overflow-y-auto overflow-x-visible",ref_key:"formScrollContainer",ref:h},[e.createElementVNode("form",{ref_key:"formRef",ref:m,onSubmit:e.withModifiers(V,["prevent"]),class:e.normalizeClass(["grid grid-cols-12 p-1",w.value==="default"?"gap-6":"gap-4"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(A,$)=>(e.openBlock(),e.createElementBlock("div",{key:A.name,class:e.normalizeClass(b(A)==="horizontal"?"col-span-12":`col-span-${A.col||12}`)},[e.createVNode(is,{style:e.normalizeStyle(M.style),item:A,layout:b(A),columns:_(A),"model-value":s.value[A.name],"onUpdate:modelValue":U=>{const W=s.value[A.name];E(W,U)||(s.value[A.name]=U)},error:e.unref(i)[A.name]},null,8,["style","item","layout","columns","model-value","onUpdate:modelValue","error"]),b(A)==="settings"&&$+1!==e.unref(d).length?(e.openBlock(),e.createElementBlock("div",Yk)):e.createCommentVNode("",!0)],2))),128))],34)],512),e.createVNode(Rk,{target:m.value,"scroll-container":h.value,enabled:f.value,width:y.value},null,8,["target","scroll-container","enabled","width"])]))}}),Xk={class:"relative"},Zk={class:"w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50"},Qk={class:"m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12"},Jk={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},ex={class:"font-medium text-gray-800 dark:text-[#ffffff]"},tx={class:"p-4 mim-h-0 h-full overflow-auto"},lx=e.defineComponent({__name:"modal-edit",props:{schema:{},defaultValue:{},mode:{},token:{},form:{}},emits:["close","save","edit"],setup(l,{emit:t}){const a=l,n=t,r=e.ref(a.schema),o=e.ref(a.defaultValue?JSON.parse(JSON.stringify(a.defaultValue)):{}),s=e.ref({}),i=e.ref(),c=e.ref(a.mode);async function u(){const m=s.value.validate();if(m){xe({type:"warning",title:"Помилка валідації",message:Object.entries(m).map(([h,f])=>`${h}: ${f}`).join(`
229
+ `)});return}if(i.value)try{const h=await fetch(`/api/table/${i.value}`,{method:c.value==="add"?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o.value)});if(h.ok)await h.json(),xe({type:"success",title:"Успішно",message:`Дані успішно ${c.value==="add"?"збережено":"оновлено"}`}),n("save",o.value);else if(h.status===400){const f=await h.json().catch(()=>({}));xe({type:"warning",title:"Помилка валідації",message:f.message||"Некоректні дані (400)"})}else h.status===500?xe({type:"error",title:"Серверна помилка",message:"Виникла помилка на сервері (500)"}):xe({type:"error",title:"Помилка",message:`Статус: ${h.status}`})}catch(h){xe({type:"error",title:"Помилка з’єднання",message:h.message||"Не вдалося виконати запит"})}}function d(){n("close")}return e.onMounted(async()=>{try{if(a.form){const m=await fetch(`/api/template/form/${a.form}`);if(!m.ok){xe({type:m.status>=400&&m.status<500?"warning":"error",title:"Error",message:`Error code: ${m.status}`});return}const h=await m.json();r.value=h.schema,i.value=h.token}else if(a.token){i.value=a.token;const m=await fetch(`/api/form/${i.value}`);if(!m.ok){xe({type:m.status>=400&&m.status<500?"warning":"error",title:"Error",message:`Error code: ${m.status}`});return}const h=await m.json();r.value=h.schema,h.data?o.value=h.data:c.value="add"}}catch(m){xe({type:"error",title:"Error",message:m.message||"Unexpected error"}),console.error(m)}}),(m,h)=>(e.openBlock(),e.createElementBlock("div",Xk,[e.createElementVNode("div",Zk,[e.createElementVNode("div",Qk,[e.createElementVNode("div",Jk,[e.createElementVNode("h3",ex,e.toDisplayString(c.value==="add"?"Додати":"Змінити"),1),e.createElementVNode("button",{onClick:d,type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"},h[2]||(h[2]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",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"},[e.createElementVNode("path",{d:"M18 6 6 18"}),e.createElementVNode("path",{d:"m6 6 12 12"})],-1)]))]),e.createElementVNode("div",tx,[r.value?(e.openBlock(),e.createBlock(Xe,{key:0,schema:r.value,values:o.value,"onUpdate:values":h[0]||(h[0]=f=>o.value=f),form:s.value,"onUpdate:form":h[1]||(h[1]=f=>s.value=f)},null,8,["schema","values","form"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white"},[e.createElementVNode("button",{type:"button",onClick:d,class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"}," Скасувати "),e.createElementVNode("button",{onClick:u,type:"button",class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"}," Зберегти ")])])])]))}}),us=(l={mode:"edit",schema:null})=>new Promise(t=>{const{close:a}=Lf({title:l.mode==="add"?"Додати":"Редагувати",template:"",visible:!0,size:"medium",closeClickBack:!0,content:lx,contentProps:{...l,onClose:()=>{t(null),a()},onSave:n=>{t(n),a()}}})});Xe.install=function(l){l.component("VForm",Xe),Object.assign(l.config.globalProperties,{$form:us}),l.provide("form",us),window.v3plugin||(window.v3plugin={})};const Mt=(l,t)=>{const a=l.__vccOpts||l;for(const[n,r]of t)a[n]=r;return a},ax={},nx={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"24",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-reload absolute inline mr-1 text-gray-800 transition-all cursor-pointer active:rotate-90 right-1 top-1 hover:text-blue-500"};function rx(l,t){return e.openBlock(),e.createElementBlock("svg",nx,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747"},null,-1),e.createElementVNode("path",{d:"M20 4v5h-5"},null,-1)])])}const ox=Mt(ax,[["render",rx]]),sx={},ix={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",class:"text-blue-600 w-[16px] h-[16px]"};function cx(l,t){return e.openBlock(),e.createElementBlock("svg",ix,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])])}const el=Mt(sx,[["render",cx]]),dx={class:"flex items-center justify-between w-full text-sm"},ux={class:"flex items-center cursor-pointer w-full"},mx={key:0,width:"16",height:"auto",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="},px=["value"],fx={class:"flex flex-row items-center font-normal text-gray-800 gap-x-1"},hx={key:0,class:"text-xs text-gray-500 dark:text-neutral-500 pr-1"},gx={key:1,class:"absolute right-2 flex size-3.5 items-center justify-center"},On=e.defineComponent({__name:"list-item",props:{layout:{},count:{},type:{},label:{},value:{},isSelected:{type:Boolean},color:{},highlighted:{type:Boolean}},emits:["itemClick"],setup(l,{expose:t,emit:a}){const n=l,r=a;function o(){r("itemClick",n.value)}const s=e.ref(null),i=e.computed(()=>n.layout==="inline"&&n.type==="radio");return t({el:s}),(c,u)=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center w-full rounded-sm group hover:bg-gray-100",ref_key:"el",ref:s},[e.createElementVNode("div",dx,[e.createElementVNode("div",ux,[e.createElementVNode("label",{for:"radio-9740",class:e.normalizeClass([["inline","popover"].includes(l.layout)?"text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center":"flex flex-row items-center w-full px-2 py-2 text-sm text-gray-500 cursor-pointer",{"bg-blue-100":l.highlighted,relative:i.value}]),onClick:e.withModifiers(o,["stop","prevent"])},[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["w-[18px] h-[18px] border flex items-center justify-center",[l.type==="checkbox"?"rounded-[4px]":"rounded-full",l.color?`bg-[${l.color}] border-[#ffffff]`:l.isSelected?"bg-[#2563eb] border-[#ffffff]":"bg-[#ffffff] border-[#d9d9d9]"]])},[l.isSelected?(e.openBlock(),e.createElementBlock("img",mx)):e.createCommentVNode("",!0)],2)),e.createElementVNode("input",{type:"checkbox",class:"hidden",id:"radio-9740",value:l.value},null,8,px),e.createElementVNode("div",{class:e.normalizeClass(["flex flex-1 flex-row items-center justify-between",i.value?"pl-1 pr-6":"w-[calc(100%-18px)] pl-[10px]"])},[e.createElementVNode("span",fx,e.toDisplayString(l.label??"Відсутні дані"),1),l.count?(e.openBlock(),e.createElementBlock("div",hx," ("+e.toDisplayString(l.count)+") ",1)):e.createCommentVNode("",!0)],2),i.value&&l.isSelected?(e.openBlock(),e.createElementBlock("span",gx,[e.createVNode(el)])):e.createCommentVNode("",!0)],2)])])],512))}});function Pn(l,t){const{options:a=[],limit:n=20}=l;function r(w){return Array.isArray(w)?w[0]:w}const o=e.ref(r(l.modelValue)),s=e.ref(""),i=e.ref(!1),c=e.ref([]),u=e.ref("id"),d=e.ref("text"),m=e.ref(!1),h=e.ref(l.layout!=="popover"&&a.length>n);function f(w){const b=w.find(Boolean)??{},_=["id","value","code","key"].find(E=>E in b)??"id",V=["text","label","name","title"].find(E=>E in b)??"text";return{autoValueKey:_,autoLabelKey:V}}if(a.length>0){const w=f(a);u.value=w.autoValueKey,d.value=w.autoLabelKey}const y=e.computed(()=>{const w=c.value;return l.layout==="popover"||m.value?w:w.slice(0,n)});e.watch(()=>l.modelValue,w=>{o.value=r(w)},{immediate:!0}),c.value=[...a].sort((w,b)=>l.sort==="count"?b.count&&w.count?b.count-w.count:0:l.sort==="name"?String(w[d.value]??"").localeCompare(String(b[d.value]??"")):0);function k(w){return o.value===w[u.value]}function g(w){o.value=w[u.value],t("update:modelValue",o.value),t("change",{name:l.name,value:o.value})}function p(){o.value=void 0,t("update:modelValue",o.value),t("clear",l.name)}function x(){m.value=!m.value}return{innerValue:o,searchTerm:s,filteredOptions:y,isSelected:k,selectItem:g,clear:p,toggleShowAll:x,isReqProc:i,showAll:m,isEnableShowAll:h,labelKey:d,valueKey:u,allOptions:c}}const yx={},bx={class:"w-48 mx-auto",viewBox:"0 0 178 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kx(l,t){return e.openBlock(),e.createElementBlock("svg",bx,[...t[0]||(t[0]=[e.createStaticVNode('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>',12)])])}const Rn=Mt(yx,[["render",kx]]),xx={},wx={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate"};function _x(l,t){return e.openBlock(),e.createElementBlock("svg",wx,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)])])}const Sa=Mt(xx,[["render",_x]]),Ex={},Cx={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",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate-[180deg]"};function Vx(l,t){return e.openBlock(),e.createElementBlock("svg",Cx,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)])])}const jn=Mt(Ex,[["render",Vx]]),Nx={key:0,class:"w-full"},vx={class:"flex flex-col items-center justify-center p-5 text-center"},Bx={key:0,class:"flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"},Sx={key:1,class:"flex justify-between items-center text-xs text-gray-500 p-1 border-t"},Dx=e.defineComponent({__name:"radio",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{default:()=>[]},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=l,r=e.ref(null),o=a,{innerValue:s,filteredOptions:i,isSelected:c,selectItem:u,clear:d,toggleShowAll:m,isReqProc:h,showAll:f,isEnableShowAll:y,labelKey:k,valueKey:g,allOptions:p}=Pn({...n,modelValue:n.modelValue??n.default??""},o);return t({clear:d,inputTextRef:r}),e.watch(()=>n.modelValue,x=>{x===void 0&&(s.value=void 0)}),(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([l.layout==="popover"?"flex flex-col h-full":"flex flex-col vs-filter-checkbox"])},[e.createElementVNode("div",{class:e.normalizeClass([l.layout==="popover"?"flex-1 overflow-y-auto p-2":"",l.layout==="inline"?"flex-1 overflow-y-auto max-h-80":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),b=>(e.openBlock(),e.createBlock(On,{layout:l.layout,key:b[e.unref(g)],count:b.count,label:b[e.unref(k)],color:b.color,type:"radio",value:b[e.unref(g)],"is-selected":e.unref(c)(b),onItemClick:_=>e.unref(u)(b)},null,8,["layout","count","label","color","value","is-selected","onItemClick"]))),128))],2),l.type==="select"&&e.unref(i).length===0&&!e.unref(h)?(e.openBlock(),e.createElementBlock("div",Nx,[e.createElementVNode("div",vx,[e.createVNode(Rn),w[4]||(w[4]=e.createElementVNode("div",{class:"max-w-sm mx-auto mt-6"},[e.createElementVNode("p",{class:"font-medium text-gray-800 dark:text-neutral-200"},"За вашим запитом нічого не знайдено"),e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"})],-1))])])):e.createCommentVNode("",!0),l.layout!=="popover"&&l.type!=="select"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!e.unref(f)&&e.unref(y)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:w[0]||(w[0]=(...b)=>e.unref(m)&&e.unref(m)(...b)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[w[5]||(w[5]=e.createTextVNode(" Показати більше ",-1)),e.createVNode(Sa)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:w[1]||(w[1]=(...b)=>e.unref(m)&&e.unref(m)(...b)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[w[6]||(w[6]=e.createTextVNode(" Показати менше ",-1)),e.createVNode(jn)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),l.cleanable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.layout==="inline"?(e.openBlock(),e.createElementBlock("div",Bx,[e.createTextVNode(e.toDisplayString(e.unref(s)||e.unref(s)===null?1:0)+" з "+e.toDisplayString(e.unref(p).length)+" обрано ",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:w[2]||(w[2]=(...b)=>e.unref(d)&&e.unref(d)(...b))}," Очистити ",512),[[e.vShow,e.unref(s)!==""&&e.unref(s)!==void 0]])])):e.createCommentVNode("",!0),l.layout==="popover"?(e.openBlock(),e.createElementBlock("div",Sx,[e.createElementVNode("span",null,e.toDisplayString(e.unref(s)||e.unref(s)===null?1:0)+" з "+e.toDisplayString(e.unref(p).length)+" обрано",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:w[3]||(w[3]=(...b)=>e.unref(d)&&e.unref(d)(...b))}," Очистити ",512),[[e.vShow,e.unref(s)!==""&&e.unref(s)!==void 0]])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],2))}});function ms(l,t){const{options:a=[],limit:n=20}=l;function r(w){return Array.isArray(w)?w:w?[w]:[]}const o=e.ref(r(l.modelValue)),s=e.ref(""),i=e.ref(!1),c=e.ref([]),u=e.ref("id"),d=e.ref("text"),m=e.ref(!1),h=e.ref(l.layout!=="popover"&&a.length>n);function f(w){const b=w.find(Boolean)??{},_=["id","value","code","key"].find(E=>E in b)??"id",V=["text","label","name","title"].find(E=>E in b)??"text";return{autoValueKey:_,autoLabelKey:V}}if(a.length>0){const w=f(a);u.value=w.autoValueKey,d.value=w.autoLabelKey}const y=e.computed(()=>{const w=c.value;return l.layout==="popover"||m.value?w:w.slice(0,n)});e.watch(()=>l.modelValue,w=>{o.value=r(w)},{immediate:!0}),c.value=[...a].sort((w,b)=>l.sort==="count"?b.count&&w.count?b.count-w.count:0:l.sort==="name"?String(w[d.value]).localeCompare(String(b[d.value])):0);function k(w){return o.value&&o.value.includes(w[u.value])}function g(w){const b=o.value.includes(w[u.value]);o.value=b?o.value.filter(_=>_!==w[u.value]):[...o.value,w[u.value]],t("update:modelValue",o.value),t("change",{name:l.name,value:o.value})}function p(){o.value=[],t("update:modelValue",o.value),t("clear",l.name)}function x(){m.value=!m.value}return{innerValue:o,searchTerm:s,filteredOptions:y,isSelected:k,selectItem:g,clear:p,toggleShowAll:x,isReqProc:i,showAll:m,isEnableShowAll:h,labelKey:d,valueKey:u,allOptions:c}}const ps={en:{apply:"Apply",search:"Search",more:"Show more",less:"Show less",selected:"selected",clear:"Clear",notfound:"Nothing found",period:"Period",today:"Today",week:"Week",max:"max",min:"min",month:"Month",quarter:"Quarter",year:"Year",alltime:"All Time",prev:"Prev",next:"Next",selectFieldHelp:"Select a field to start creating a filter."},uk:{apply:"Застосувати",search:"Пошук",more:"Показати більше",less:"Показати меньше",selected:"обрано",clear:"Очистити",notfound:"Нічого не знайдено",period:"Період",today:"Сьогодні",week:"Тиждень",max:"макс",min:"мін",month:"Місяць",quarter:"Квартал",year:"Рік",alltime:"Весь час",prev:"Попередній період",next:"Настпуний період",selectFieldHelp:"Оберіть поле, щоб розпочати створення фільтра."}};function fs(l){const t=l.split(".")[1],a=typeof window<"u"&&window.localStorage?localStorage.locale:null;return(ps[a||navigator.language]||ps.uk)[t]}function Ut(){const l=e.getCurrentInstance();if(!l.appContext.config.globalProperties.$i18n)return fs;const t=l.appContext.config.globalProperties.$t;return a=>{const n=t(a);return n===a?fs(a):n}}const Ax={key:0,class:"w-full"},Mx={class:"flex flex-col items-center justify-center p-5 text-center"},Tx={class:"max-w-sm mx-auto mt-6"},Lx={class:"font-medium text-gray-800 dark:text-neutral-200"},$x={key:0,class:"flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"},Fx={key:1,class:"flex justify-between items-center text-xs text-gray-500 p-1 border-t"},hs=e.defineComponent({__name:"checkbox",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{default:()=>[]},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=Ut(),r=l,o=a,{innerValue:s,filteredOptions:i,isSelected:c,selectItem:u,clear:d,toggleShowAll:m,isReqProc:h,showAll:f,isEnableShowAll:y,labelKey:k,valueKey:g,allOptions:p}=ms({...r,modelValue:r.modelValue},o);return e.watch(()=>r.modelValue,x=>{x===void 0&&(s.value=[])}),t({clear:d}),(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([l.layout==="popover"?"flex flex-col h-full":"flex flex-col vs-filter-checkbox space-y-0.5"])},[e.createElementVNode("div",{class:e.normalizeClass([l.layout==="popover"?"flex-1 overflow-y-auto p-2":"",l.layout==="inline"?"flex-1 overflow-y-auto max-h-80":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),b=>(e.openBlock(),e.createBlock(On,{layout:l.layout,count:b.count,label:b[e.unref(k)],color:b.color,type:"checkbox",value:b[e.unref(g)],"is-selected":e.unref(c)(b),onItemClick:_=>e.unref(u)(b)},null,8,["layout","count","label","color","value","is-selected","onItemClick"]))),256))],2),l.type==="select"&&e.unref(i).length===0&&!e.unref(h)?(e.openBlock(),e.createElementBlock("div",Ax,[e.createElementVNode("div",Mx,[e.createVNode(Rn),e.createElementVNode("div",Tx,[e.createElementVNode("p",Lx,e.toDisplayString(e.unref(n)("filter.notfound")),1),w[4]||(w[4]=e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"},null,-1))])])])):e.createCommentVNode("",!0),l.layout!=="popover"&&l.type!=="select"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!e.unref(f)&&e.unref(y)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:w[0]||(w[0]=(...b)=>e.unref(m)&&e.unref(m)(...b)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[e.createTextVNode(e.toDisplayString(e.unref(n)("filter.more"))+" ",1),e.createVNode(Sa)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:w[1]||(w[1]=(...b)=>e.unref(m)&&e.unref(m)(...b)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[e.createTextVNode(e.toDisplayString(e.unref(n)("filter.less"))+" ",1),e.createVNode(jn)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),l.cleanable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.layout==="inline"?(e.openBlock(),e.createElementBlock("div",$x,[e.createTextVNode(e.toDisplayString(e.unref(s).length)+" / "+e.toDisplayString(e.unref(p).length)+" "+e.toDisplayString(e.unref(n)("filter.selected"))+" ",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:w[2]||(w[2]=(...b)=>e.unref(d)&&e.unref(d)(...b))},e.toDisplayString(e.unref(n)("filter.clear")),513),[[e.vShow,e.unref(s).length!==0]])])):e.createCommentVNode("",!0),l.layout==="popover"?(e.openBlock(),e.createElementBlock("div",Fx,[e.createElementVNode("span",null,e.toDisplayString(e.unref(s).length)+" / "+e.toDisplayString(e.unref(p).length)+" "+e.toDisplayString(e.unref(n)("filter.selected")),1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:w[3]||(w[3]=(...b)=>e.unref(d)&&e.unref(d)(...b))},e.toDisplayString(e.unref(n)("filter.clear")),513),[[e.vShow,e.unref(s).length!==0]])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],2))}}),Ix={},Ox={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"15px",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-search stroke-gray-500 transition-all"};function Px(l,t){return e.openBlock(),e.createElementBlock("svg",Ox,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null,-1),e.createElementVNode("path",{d:"M21 21l-6 -6"},null,-1)])])}const gs=Mt(Ix,[["render",Px]]),Rx={},jx={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 stroke-gray-500 hover:stroke-red-500 transition-all",width:"15px",height:"15px"};function Ux(l,t){return e.openBlock(),e.createElementBlock("svg",jx,[...t[0]||(t[0]=[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)])])}const Un=Mt(Rx,[["render",Ux]]);class ys{static getWidthClass(t){return typeof t=="number"?`max-w-[${t}px] min-w-[${t}px]`:typeof t=="string"?t.endsWith("%")||t.endsWith("px")?`max-w-[${t}]`:`max-w-${t}`:"w-full"}}const zx={class:"absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"},Hx=["placeholder"],qx=e.defineComponent({__name:"text-input",props:{id:{},name:{},title:{},type:{},label:{},width:{default:220},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{emit:t}){var u;const a=l,n=e.ref((a.placeholder||a.label||a.title||a.name||"search").toString()),r=t,o=e.ref(((u=a.modelValue)==null?void 0:u.toString())??"");e.watch(()=>a.modelValue,d=>{d!==o.value&&(o.value=(d==null?void 0:d.toString())??"")});let s=null;function i(){if(o.value=o.value.trimStart(),o.value.length===0){c();return}s&&clearTimeout(s),s=setTimeout(()=>{r("update:modelValue",o.value),r("change",{name:a.name,value:o.value})},300)}function c(){o.value="",r("update:modelValue",""),r("clear",a.name)}return(d,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vs-form-text relative bg-white rounded-sm [&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-sm [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",l.layout==="inline"?e.unref(ys).getWidthClass(l.width):"mb-2"+(l.layout==="popover"?" m-2":"")])},[e.createElementVNode("div",zx,[e.createVNode(gs)]),o.value!==""?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:c,class:"absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"},[e.createVNode(Un)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":m[0]||(m[0]=h=>o.value=h),onInput:i,placeholder:n.value,class:"!pr-7 !pl-8 bg-white h-[38px] min-w-[100px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-sm text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,40,Hx),[[e.vModelText,o.value]])],2))}});function bs(l={color:"blue"}){return e.computed(()=>{const t=`w-full px-3 py-2 border-solid border text-black border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${l.color}-500 focus:border-transparent
230
+ text-gray-800 bg-white dark:text-neutral-300 dark:bg-neutral-800 dark:border-neutral-600`;return(l==null?void 0:l.size)==="sm"?`${t}h-[32px]`:`${t}h-[38px]`})}function Gx(){return"rounded-md font-medium border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 px-4 py-2 w-full bg-transparent border text-black text-sm h-[38px]"}function Wx(){return"font-medium border border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 h-7 rounded-md text-xs px-2 py-1 text-gray-800 bg-white hover:bg-gray-100 dark:text-neutral-300 dark:bg-neutral-800 dark:hover:bg-neutral-700 dark:border-neutral-600"}function ks(l){return l==="ghost"?"inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-sm border text-gray-600 hover:bg-blue-100 hover:text-gray-800 focus:outline-hidden focus:bg-gray-100 focus:text-gray-800 disabled:opacity-50 disabled:pointer-events-none dark:text-gray-500 dark:hover:bg-blue-800/30 dark:hover:text-blue-400 dark:focus:bg-blue-800/30 dark:focus:text-blue-400":l==="soft"?"inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-sm border bg-white-100 text-gray-800 hover:bg-gray-200 hover:bg-gray-200 focus:outline-hidden focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:text-blue-400 dark:hover:bg-blue-900 dark:focus:bg-blue-900":"relative border-solid border-gray-200 focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-input hover:bg-gray-100 border px-4 py-2 gap-1 bg-transparent h-[38px]"}const Kx={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},Yx=["placeholder","disabled"],Xx={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},Zx={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},Qx=["placeholder","disabled"],Jx=["disabled"],ew=e.defineComponent({__name:"range-input",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=bs(),r=Gx(),o=Ut(),s=l,i=e.ref(s.modelValue??s.default??[]),c=a,u=e.computed({get:()=>s.modelValue??i.value,set:h=>{s.modelValue!==void 0?c("update:modelValue",h):i.value=h}});function d(){c("change",{name:s.name,value:u.value||i.value})}function m(){i.value=[],u.value=i.value,c("clear",s.name)}return e.watch(()=>s.modelValue,h=>{h!==void 0&&s.layout!=="popover"?(i.value=h,c("update:modelValue",h)):i.value=[]}),t({clear:m,currentValue:u}),(h,f)=>{var y,k;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(l.layout==="vertical"?"inline-flex items-center gap-2":"space-y-3 p-2")},[e.createElementVNode("div",null,[l.layout!=="vertical"?(e.openBlock(),e.createElementBlock("label",Kx,e.toDisplayString(e.unref(o)("filter.from")),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"number",class:e.normalizeClass(e.unref(n)),placeholder:((y=l.placeholder)==null?void 0:y[0])??e.unref(o)("filter.min"),step:"1",style:{outline:"none"},"onUpdate:modelValue":f[0]||(f[0]=g=>u.value[0]=g),disabled:l.disabled},null,10,Yx),[[e.vModelText,u.value[0]]])]),l.layout==="vertical"?(e.openBlock(),e.createElementBlock("label",Xx," - ")):e.createCommentVNode("",!0),e.createElementVNode("div",null,[l.layout!=="vertical"?(e.openBlock(),e.createElementBlock("label",Zx,e.toDisplayString(e.unref(o)("filter.to")),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"number",class:e.normalizeClass(e.unref(n)),placeholder:((k=l.placeholder)==null?void 0:k[1])??e.unref(o)("filter.max"),min:"0",max:"1000000000000000",step:"1",style:{outline:"none"},"onUpdate:modelValue":f[1]||(f[1]=g=>u.value[1]=g),disabled:l.disabled},null,10,Qx),[[e.vModelText,u.value[1]]])]),["popover","inline","vertical"].includes(l.layout)?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:e.normalizeClass(e.unref(r)+(l.layout==="vertical"?" w-[50px]":" bg-blue-100 hover:bg-blue-200"))},e.toDisplayString(l.layout==="vertical"?"Ok":e.unref(o)("filter.apply")),3)):e.createCommentVNode("",!0),["popover","inline"].includes(l.layout)?(e.openBlock(),e.createElementBlock("button",{key:2,disabled:!(u.value[0]||u.value[1]),onClick:m,class:e.normalizeClass(e.unref(r)+" hover:bg-gray-100")},e.toDisplayString(e.unref(o)("filter.clear")),11,Jx)):e.createCommentVNode("",!0)],2)]),(l.cleanable&&i.value.length,e.createCommentVNode("",!0))],64)}}});let Ze=class{static format(t){const a=t.getFullYear(),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0");return`${a}-${n}-${r}`}static getShiftedDay(t,a=0){const n=t?new Date(t):new Date;return n.setDate(n.getDate()+a),this.format(n)}static getLastWeekRange(t,a,n=0){if(t&&a){const u=new Date(t),d=new Date(a);return u.setDate(u.getDate()+n*7),d.setDate(d.getDate()+n*7),[this.format(u),this.format(d)]}const r=new Date,o=r.getDay(),s=o===0?13:o-1+7,i=new Date(r);i.setDate(r.getDate()-s+n*7);const c=new Date(i);return c.setDate(i.getDate()+6),[this.format(i),this.format(c)]}static getMonthRange(t,a,n=0){let r;t?r=new Date(t):r=new Date,r=new Date(r.getFullYear(),r.getMonth()+n,1);const o=r,s=new Date(r.getFullYear(),r.getMonth()+1,0);return[this.format(o),this.format(s)]}static getQuarterRange(t,a,n=0){const r=t||a,o=r?new Date(r):new Date;let s=Math.floor(o.getMonth()/3);s+=n;const i=(s%4+4)%4*3,c=o.getFullYear()+Math.floor(s/4),u=new Date(c,i,1),d=new Date(c,i+3,0);return[this.format(u),this.format(d)]}static getYear(t,a=0){let n;return t&&/^\d{4}$/.test(t)?n=parseInt(t,10):t?n=new Date(t).getFullYear():n=new Date().getFullYear(),String(n+a)}static getYearRange(t,a=0){let n;return t&&/^\d{4}$/.test(t)?n=parseInt(t,10):t?n=new Date(t).getFullYear():n=new Date().getFullYear(),[this.format(new Date(n+a,0,1)),this.format(new Date(n+a+1,0,0))]}static getRangeFromDaysBefore(t){const a=new Date,n=new Date(a.getTime());return n.setDate(a.getDate()-t),[this.format(n),this.format(a)]}};function xs(l,t){const{popoverRef:a}=l,n=Ut(),r=e.ref(""),o=e.ref(l.modelValue??l.default??[]),s=e.ref(0);function i(){const p=Ze.getRangeFromDaysBefore(s.value);return o.value=[...p],t("change",{name:l.name,value:o.value}),t("update:modelValue",o.value),p}function c(p){var w;r.value=p,(w=a.value)==null||w.close();const x=[];switch(r.value){case"today":x.push(Ze.getShiftedDay()),x.push(Ze.getShiftedDay());break;case"week":x.push(...Ze.getLastWeekRange());break;case"month":x.push(...Ze.getMonthRange());break;case"quarter":x.push(...Ze.getQuarterRange());break;case"year":x.push(...Ze.getYearRange());break;case"last_7_days":s.value=7,i();break;case"range":s.value=7,x.push(...i());break}o.value=[...x],t("change",{name:l.name,value:o.value}),t("update:modelValue",o.value)}function u(){const p=[];switch(r.value){case"today":p.push(Ze.getShiftedDay(o.value[0],1));break;case"week":p.push(...Ze.getLastWeekRange(o.value[0],o.value[1],1));break;case"month":p.push(...Ze.getMonthRange(o.value[0],o.value[1],1));break;case"quarter":p.push(...Ze.getQuarterRange(o.value[0],o.value[1],1));break;case"year":p.push(...Ze.getYearRange(o.value[0],1));break}o.value=[...p],t("change",{name:l.name,value:o.value}),t("update:modelValue",o.value)}function d(){const p=[];switch(r.value){case"today":p.push(Ze.getShiftedDay(o.value[0],-1));break;case"week":p.push(...Ze.getLastWeekRange(o.value[0],o.value[1],-1));break;case"month":p.push(...Ze.getMonthRange(o.value[0],o.value[1],-1));break;case"quarter":p.push(...Ze.getQuarterRange(o.value[0],o.value[1],-1));break;case"year":p.push(...Ze.getYearRange(o.value[0],-1));break}o.value=[...p],t("change",{name:l.name,value:o.value}),t("update:modelValue",o.value)}const m=["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"];function h(p){const[x,w,b]=p.split("-");return`${b}.${w}.${x}`}function f(p,x="long"){const w=new Date(Date.UTC(2e3,p-1,1));return new Intl.DateTimeFormat(localStorage.locale,{month:x,timeZone:"UTC"}).format(w)}function y(p){const{value:x}=o;switch(p){case"today":return h(x[0]);case"range":return"Період";case"week":return x[0]&&x[1]?`${h(x[0])} – ${h(x[1])}`:"";case"quarter":if(x[0]){const w=new Date(x[0]),b=w.getFullYear(),_=w.getMonth();return`${Math.floor(_/3)+1} ${n("filter.quarter")} ${b}`}return"";case"month":if(x[0]){const[w,b]=x[0].split("-");return`${f(parseInt(b,10))} ${w}`}return"";case"year":return x[0]||"";case"last_7_days":return"За останні дні";default:return l.label??""}}const k=e.computed(()=>r.value?y(r.value):l.label??"");function g(){r.value="",o.value=[],t("update:modelValue",[]),t("clear",l.name)}return{activeMode:r,innerValue:o,daysBefore:s,onDaysBeforeChange:i,onSelectChange:c,nextClick:u,prevClick:d,ukMonths:m,formatDisplayDate:h,getModeLabel:y,currentLabel:k,clear:g}}const tw={key:0,class:"relative flex w-full h-auto gap-2 filter-date m-2 flex-wrap"},lw={key:0,class:"flex gap-1 !w-[75%] rounded-sm"},aw=["max","disabled"],nw=["min","disabled"],rw={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},ow=["max","disabled"],sw={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},iw={key:0,class:"block text-xs font-medium text-gray-600 mb-1"},cw=["min","disabled"],dw={class:"flex gap-1 pt-2"},uw=["onClick"],mw=e.defineComponent({__name:"date-input",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=l,r=bs(),o=Wx(),s=Ut(),i=a,c=e.ref(null),{activeMode:u,innerValue:d,onSelectChange:m,nextClick:h,prevClick:f,clear:y}=xs({...n,popoverRef:c},i);return e.watch(()=>n.modelValue,k=>{k!==void 0?(d.value=k,i("update:modelValue",k)):(u.value="",d.value=[])}),e.watch(d,k=>{i("update:modelValue",k),i("change",{name:n.name,value:k})},{deep:!0}),t({clear:y,popoverRef:c}),(k,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.layout==="inline"?(e.openBlock(),e.createElementBlock("div",tw,[e.unref(u)!==""&&e.unref(u)==="range"?(e.openBlock(),e.createElementBlock("div",lw,[g[7]||(g[7]=e.createTextVNode(" 1111 ",-1)),e.withDirectives(e.createElementVNode("input",{type:"date",max:e.unref(d)[1],locale:"uk-UA","onUpdate:modelValue":g[0]||(g[0]=p=>e.unref(d)[0]=p),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600",disabled:l.disabled},null,8,aw),[[e.vModelText,e.unref(d)[0]]]),e.withDirectives(e.createElementVNode("input",{type:"date",min:e.unref(d)[0],locale:"uk-UA","onUpdate:modelValue":g[1]||(g[1]=p=>e.unref(d)[1]=p),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600 appearance-auto",disabled:l.disabled},null,8,nw),[[e.vModelText,e.unref(d)[1]]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(l.layout==="popover"?"space-y-3 p-2":"flex items-center gap-2")},[e.createElementVNode("div",{class:e.normalizeClass(l.layout!=="popover"?"w-[48%]":"")},[l.layout==="popover"?(e.openBlock(),e.createElementBlock("label",rw,e.toDisplayString(e.unref(s)("filter.from")),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"date",max:e.unref(d)[1],locale:"uk-UA","onUpdate:modelValue":g[2]||(g[2]=p=>e.unref(d)[0]=p),class:e.normalizeClass(e.unref(r)),disabled:l.disabled},null,10,ow),[[e.vModelText,e.unref(d)[0]]])],2),l.layout!=="popover"?(e.openBlock(),e.createElementBlock("label",sw," - ")):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(l.layout!=="popover"?"w-[48%]":"")},[l.layout==="popover"?(e.openBlock(),e.createElementBlock("label",iw,e.toDisplayString(e.unref(s)("filter.to")),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"date",min:e.unref(d)[0],locale:"uk-UA","onUpdate:modelValue":g[3]||(g[3]=p=>e.unref(d)[1]=p),class:e.normalizeClass(e.unref(r)),disabled:l.disabled},null,10,cw),[[e.vModelText,e.unref(d)[1]]])],2)],2),e.createElementVNode("div",dw,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(["today","week","month","quarter","year"],p=>e.createElementVNode("button",{key:p,class:e.normalizeClass(e.unref(o)+(e.unref(u)===p?" bg-blue-100":"")),onClick:x=>e.unref(m)(p)},e.toDisplayString(e.unref(s)("filter."+p)),11,uw)),64)),e.createElementVNode("button",{class:e.normalizeClass(e.unref(o)),onClick:g[4]||(g[4]=(...p)=>e.unref(f)&&e.unref(f)(...p))},"<",2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(o)),onClick:g[5]||(g[5]=(...p)=>e.unref(h)&&e.unref(h)(...p))},">",2)]),(l.cleanable,e.createCommentVNode("",!0))],64))}});function pw(l,t){const{api:a,options:n=[],limit:r=20,dataKey:o="data"}=l,s=l.multi;function i(O){return s?Array.isArray(O)?O:O?[O]:[]:Array.isArray(O)?O[0]:O}const c=e.ref(i(l.modelValue)),u=e.ref(""),d=e.ref(!1),m=e.ref(n),h=e.ref("id"),f=e.ref("text"),y=e.ref(!1),k=e.ref(l.layout!=="popover"&&n.length>r),g=e.ref([]),p=e.ref(0);function x(O){const I=O.find(Boolean)??{},F=["id","value","code","key"].find(z=>z in I)??"id",T=["text","label","name","title"].find(z=>z in I)??"text";return{autoValueKey:F,autoLabelKey:T}}if(n.length>0){const O=x(n);h.value=O.autoValueKey,f.value=O.autoLabelKey}const w=e.computed(()=>{if(a)return m.value;const O=m.value;if(l.layout==="popover")return O;if(!u.value)return y.value?O:O.slice(0,r);const I=u.value.toLowerCase();return O.filter(F=>F[f.value].toLowerCase().includes(I))});let b=null;async function _(O){if(a){d.value=!0;try{const I=new URL(a,window.location.origin);I.searchParams.set("json","1"),I.searchParams.set("key",O),I.searchParams.set("limit",r.toString());const F=await fetch(I.toString());if(!F.ok){xe({type:"error",title:"Error",message:"Failed to fetch remote options"}),m.value=[];return}const T=await F.json();if(!T[o]){xe({type:"error",title:"Error",message:T}),m.value=[];return}if(m.value=T[o],m.value.length>0){const z=x(m.value);h.value=z.autoValueKey,f.value=z.autoLabelKey}p.value=T.total}catch(I){console.error("Failed to fetch remote options:",I)}finally{d.value=!1}}}e.watch(u,O=>{a&&(b&&clearTimeout(b),b=setTimeout(()=>{_(O)},200))}),e.watch(()=>l.modelValue,O=>{c.value=i(O)},{immediate:!0});function V(O){return s&&Array.isArray(c.value)?c.value.includes(O[h.value]):c.value&&c.value===O[h.value]}function E(O){if(s&&!Array.isArray(c.value)&&(c.value=[]),s&&Array.isArray(c.value)){const I=c.value.includes(O[h.value]);c.value=I?c.value.filter(F=>F!==O[h.value]):[...c.value,O[h.value]],g.value=I?g.value.filter(F=>F!==O[f.value]):[...g.value,O[f.value]]}else c.value=O[h.value],g.value=O[f.value];t("update:modelValue",c.value),t("change",{name:l.name,value:c.value})}function M(){s?(c.value=[],g.value=[]):(c.value=void 0,g.value=[]),t("update:modelValue",c.value),t("clear",l.name)}function D(){b&&clearTimeout(b),u.value="",y.value=!1}function A(){y.value=!y.value}e.onBeforeUnmount(()=>{b&&clearTimeout(b)});const $=e.ref(-1);e.watch(w,()=>{$.value=w.value.length>0?0:-1});function U(O){const I=w.value.length;if(O.key==="ArrowDown")O.preventDefault(),$.value=($.value+1)%I;else if(O.key==="ArrowUp")O.preventDefault(),$.value=($.value-1+I)%I;else if(O.key==="Enter"&&(O.preventDefault(),$.value>=0&&$.value<w.value.length)){const F=w.value[$.value];E(F)}}function W(){a&&m.value.length===0&&u.value.length===0&&_(u.value)}return{innerValue:c,searchTerm:u,filteredOptions:w,isSelected:V,selectItem:E,clear:M,resetSearch:D,toggleShowAll:A,isReqProc:d,showAll:y,isEnableShowAll:k,labelKey:f,valueKey:h,allOptions:m,highlightedIndex:$,onKeyDown:U,selectedLabels:g,totalCount:p,loadData:W}}const fw={class:"h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center"},hw=["placeholder"],gw={key:0,class:"w-full"},yw={class:"flex flex-col items-center justify-center p-5 text-center"},bw={class:"max-w-sm mx-auto mt-6"},kw={class:"font-medium text-gray-800 dark:text-neutral-200"},xw={key:0,class:"flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"},ww={key:1,class:"flex justify-between items-center text-xs text-gray-500 p-1 border-t"},_w=e.defineComponent({__name:"select",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{default:()=>[]},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=Ut(),r=l,o=a,s=e.ref(null),{innerValue:i,filteredOptions:c,isSelected:u,selectItem:d,clear:m,resetSearch:h,toggleShowAll:f,isReqProc:y,showAll:k,isEnableShowAll:g,searchTerm:p,labelKey:x,valueKey:w,highlightedIndex:b,onKeyDown:_,selectedLabels:V,totalCount:E,loadData:M}=pw({...r,modelValue:r.modelValue},o);e.onMounted(()=>{h(),r.layout!=="inline"&&(M(),s.value&&r.layout==="popover"&&s.value.focus())}),e.watch(()=>r.modelValue,A=>{A===void 0&&(r.multi?i.value=[]:i.value=void 0)});const D=e.ref([]);return e.watch(b,A=>{var $;A>=0&&D.value[A]&&(($=D.value[A])==null||$.scrollIntoView({block:"nearest",behavior:"smooth"}))}),e.watch(c,()=>{D.value=[]}),t({clear:m,inputTextRef:s,selectedLabels:V,loadData:M}),(A,$)=>{var U,W;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([l.layout==="popover"?"flex flex-col h-full":"flex flex-col vs-filter-checkbox space-y-0.5"])},[e.createElementVNode("div",fw,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":$[0]||($[0]=O=>e.isRef(p)?p.value=O:null),onKeydown:$[1]||($[1]=(...O)=>e.unref(_)&&e.unref(_)(...O)),class:"w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500 text-gray-700",placeholder:e.unref(n)("filter.search"),type:"text",ref_key:"inputTextRef",ref:s},null,40,hw),[[e.vModelText,e.unref(p)]]),e.createVNode(gs,{class:"absolute text-gray-400 -translate-y-1/2 left-4 top-1/2"}),e.unref(p)!=""?(e.openBlock(),e.createBlock(Un,{key:0,onClick:$[2]||($[2]=O=>p.value=""),class:"absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass([l.layout==="popover"?"flex-1 overflow-y-auto p-2":"",l.layout==="inline"?"flex-1 overflow-y-auto max-h-80":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(O,I)=>(e.openBlock(),e.createBlock(On,{layout:l.layout,count:O.count,label:O[e.unref(x)],color:O.color,type:l.multi?"checkbox":"radio",value:O[e.unref(w)],"is-selected":e.unref(u)(O),highlighted:I===e.unref(b),onItemClick:F=>e.unref(d)(O),ref_for:!0,ref:F=>D.value[I]=F==null?void 0:F.el},null,8,["layout","count","label","color","type","value","is-selected","highlighted","onItemClick"]))),256))],2),l.type==="select"&&e.unref(c).length===0&&!e.unref(y)?(e.openBlock(),e.createElementBlock("div",gw,[e.createElementVNode("div",yw,[e.createVNode(Rn),e.createElementVNode("div",bw,[e.createElementVNode("p",kw,e.toDisplayString(e.unref(n)("filter.notfound")),1),$[7]||($[7]=e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"},null,-1))])])])):e.createCommentVNode("",!0),l.layout!=="popover"&&l.type!=="select"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!e.unref(k)&&e.unref(g)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:$[3]||($[3]=(...O)=>e.unref(f)&&e.unref(f)(...O)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[e.createTextVNode(e.toDisplayString(e.unref(n)("filter.more"))+" ",1),e.createVNode(Sa)])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:$[4]||($[4]=(...O)=>e.unref(f)&&e.unref(f)(...O)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[e.createTextVNode(e.toDisplayString(e.unref(n)("filter.less"))+" ",1),e.createVNode(jn)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),l.cleanable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.layout==="inline"?(e.openBlock(),e.createElementBlock("div",xw,[e.createTextVNode(e.toDisplayString(l.multi&&Array.isArray(e.unref(i))?(U=e.unref(i))==null?void 0:U.length:e.unref(i)!==void 0&&(e.unref(i)||e.unref(i)===null)?1:0)+" / "+e.toDisplayString(e.unref(E))+" "+e.toDisplayString(e.unref(n)("filter.selected"))+" ",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:$[5]||($[5]=(...O)=>e.unref(m)&&e.unref(m)(...O))},e.toDisplayString(e.unref(n)("filter.clear")),513),[[e.vShow,e.unref(i)!==""&&e.unref(i)!==void 0||e.unref(i)]])])):e.createCommentVNode("",!0),l.layout==="popover"?(e.openBlock(),e.createElementBlock("div",ww,[e.createElementVNode("span",null,e.toDisplayString(l.multi&&Array.isArray(e.unref(i))?(W=e.unref(i))==null?void 0:W.length:e.unref(i)!==void 0&&(e.unref(i)||e.unref(i)===null)?1:0)+" / "+e.toDisplayString(e.unref(E))+" "+e.toDisplayString(e.unref(n)("filter.selected")),1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:$[6]||($[6]=(...O)=>e.unref(m)&&e.unref(m)(...O))},e.toDisplayString(e.unref(n)("filter.clear")),513),[[e.vShow,e.unref(i)!==""&&e.unref(i)!==void 0||e.unref(i)]])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],2)}}}),Ew=["for","onClick"],Cw=["id","name","value"],Vw={class:"block"},Nw={key:0,class:"flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"},vw={key:1,class:"flex justify-between items-center text-xs text-gray-500 p-1 border-t"},Bw=e.defineComponent({__name:"tag-field",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{default:()=>[]},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=l,r=a,{innerValue:o,isSelected:s,selectItem:i,clear:c,labelKey:u,valueKey:d,allOptions:m}=n.multi?ms({...n,modelValue:n.modelValue??n.default??[]},r):Pn({...n,modelValue:n.modelValue!==void 0?n.modelValue:n.default??""},r);return t({clear:c}),e.watch(()=>n.modelValue,h=>{h===void 0&&(n.multi?o.value=[]:o.value=void 0)}),(h,f)=>{var y,k;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["grid grid-cols-3 gap-2 mx-[1px]",l.layout==="popover"?"m-1":"mb-1"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),g=>(e.openBlock(),e.createElementBlock("label",{key:`item-${g[e.unref(d)]}`,for:`item-${g[e.unref(d)]}`,onClick:e.withModifiers(p=>e.unref(i)(g),["stop","prevent"]),class:e.normalizeClass([e.unref(s)(g)?"ring-2 ring-indigo-600":"","p-2.5 group relative flex justify-center items-center gap-x-12 text-center text-xs bg-white text-gray-800 border border-gray-200 cursor-pointer rounded-sm dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200 peer-checked:text-indigo-600 dark:has-checked:text-indigo-500 peer-checked:border-indigo-600 dark:has-checked:border-indigo-500 peer-checked:ring peer-checked:shadow focus:ring dark:has-checked:ring-indigo-500 has-disabled:pointer-events-none has-disabled:text-gray-200 dark:has-disabled:text-neutral-700 has-disabled:after:absolute has-disabled:after:inset-0 has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-gray-200)_calc(50%-1px),var(--color-gray-200)_50%,transparent_50%)] dark:has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-neutral-700)_calc(50%-1px),var(--color-neutral-700)_50%,transparent_50%)]"])},[e.createElementVNode("input",{type:"checkbox",id:`item-${g[e.unref(d)]}`,class:"hidden w4poy border-gray-200 g41z1 g22e3 axcnw dark:text-indigo-500 dark:border-neutral-700 dark:focus:ring-neutral-900",name:`item-${g[e.unref(d)]}`,value:g[e.unref(d)]},null,8,Cw),e.createElementVNode("span",Vw,e.toDisplayString(g[e.unref(u)]),1)],10,Ew))),128))],2),l.cleanable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.layout==="inline"?(e.openBlock(),e.createElementBlock("div",Nw,[e.createTextVNode(e.toDisplayString(l.multi&&Array.isArray(e.unref(o))?(y=e.unref(o))==null?void 0:y.length:e.unref(o)!==void 0&&(e.unref(o)||e.unref(o)===null)?1:0)+" з "+e.toDisplayString(e.unref(m).length)+" обрано ",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:f[0]||(f[0]=(...g)=>e.unref(c)&&e.unref(c)(...g))}," Очистити ",512),[[e.vShow,e.unref(o)!==""&&e.unref(o)!==void 0||e.unref(o)]])])):e.createCommentVNode("",!0),l.layout==="popover"?(e.openBlock(),e.createElementBlock("div",vw,[e.createElementVNode("span",null,e.toDisplayString(l.multi&&Array.isArray(e.unref(o))?(k=e.unref(o))==null?void 0:k.length:e.unref(o)!==void 0&&(e.unref(o)||e.unref(o)===null)?1:0)+" з "+e.toDisplayString(e.unref(m).length)+" обрано",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:f[1]||(f[1]=(...g)=>e.unref(c)&&e.unref(c)(...g))}," Очистити ",512),[[e.vShow,e.unref(o)!==void 0&&e.unref(o)!==""||e.unref(o)]])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64)}}}),Sw=["disabled","title"],Dw={class:"flex w-full items-center justify-between gap-1 overflow-hidden text-left"},Aw={class:"truncate text-ellipsis text-sm"},Mw={key:0,class:"inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-sm bg-blue-100 px-2 text-[11px] font-semibold text-blue-600"},Tw={class:"w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-sm focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full"},Lw={class:"w-[360px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 before:w-full p-2"},zn=e.defineComponent({__name:"popover-field",props:{disabled:{type:Boolean,default:!1},label:{},en:{},ua:{},uk:{},fr:{},de:{},es:{},currentValue:{},fieldRef:{},width:{},mode:{},layout:{}},setup(l,{expose:t}){const a=l,n=e.computed(()=>ks(a.mode)),r=e.ref(!1),o=e.ref({top:0,left:0}),s=e.ref(null),i=e.ref(null),c=e.ref(null);function u(){const b=i.value,_=c.value;if(!b||!_)return;const V=b.getBoundingClientRect(),E=_.offsetWidth,M=window.innerWidth,D=V.bottom+8;let{left:A}=V;A+E>M&&(A=Math.max(M-E-10,10)),o.value={top:D,left:A}}function d(){r.value=!r.value,r.value&&e.nextTick(()=>{var b,_,V,E,M,D,A;u(),(b=a.fieldRef)!=null&&b.inputTextRef&&((E=(V=(_=a.fieldRef)==null?void 0:_.inputTextRef)==null?void 0:V.focus)==null||E.call(V)),(M=a.fieldRef)!=null&&M.loadData&&((A=(D=a.fieldRef)==null?void 0:D.loadData)==null||A.call(D))})}function m(b){var _,V,E;!((_=s.value)!=null&&_.contains(b.target))&&!((V=c.value)!=null&&V.contains(b.target))&&!((E=i.value)!=null&&E.contains(b.target))&&(r.value=!1)}function h(b){b.key==="Escape"&&(r.value=!1)}const f=e.ref(!1),y=e.ref("ua"),k=b=>{b.detail.key==="locale"&&(y.value=b.detail.newValue)};e.onMounted(()=>{f.value=!0,y.value=localStorage.locale,window.addEventListener("storage",k),document.addEventListener("click",m,!0),document.addEventListener("keydown",h),window.addEventListener("scroll",u,!0)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",k),document.removeEventListener("click",m,!0),document.removeEventListener("keydown",h),window.removeEventListener("scroll",u,!0)});function g(){r.value=!1}t({close:g});function p(b){return Array.isArray(b)?b.filter(_=>_!=null&&_!=="").length:b&&typeof b=="object"?Object.values(b).filter(_=>_!=null&&_!=="").length:typeof b=="string"?b.trim()===""?0:1:typeof b=="number"?Number.isNaN(b)?0:1:b===null||b!==void 0?1:0}const x=e.computed(()=>{var V;const b=(V=a.fieldRef)==null?void 0:V.selectedLabels,_=p(b);return _>0?_:p(a.currentValue)}),w=e.computed(()=>{var _;const b=(_=a.fieldRef)==null?void 0:_.selectedLabels;return!b||["inline"].includes(a.layout||"")?a[y.value]||(a.label??""):Array.isArray(b)?b.length>0?b.join(", "):a.label??"":String(b)});return(b,_)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{onClick:d,disabled:l.disabled,ref_key:"triggerRef",ref:i,title:l.label,class:e.normalizeClass([n.value,l.width?e.unref(ys).getWidthClass(l.width):"w-full",l.layout==="inline"&&x.value>0?"border border-blue-400 bg-blue-50 text-blue-600":""]),type:"button"},[e.createElementVNode("span",Dw,[e.createElementVNode("span",Aw,e.toDisplayString(w.value),1),l.layout==="inline"&&x.value>0?(e.openBlock(),e.createElementBlock("span",Mw,e.toDisplayString(x.value),1)):e.createCommentVNode("",!0)]),e.createVNode(Sa,{class:"h-4 w-4 text-neutral-500"})],10,Sw),f.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.withDirectives(e.createElementVNode("div",{ref_key:"popperRef",ref:c,class:"vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",style:e.normalizeStyle({top:`${o.value.top}px`,left:`${o.value.left}px`}),"data-inside-popover":""},[e.createElementVNode("div",Tw,[e.createElementVNode("div",Lw,[e.renderSlot(b.$slots,"default")])])],4),[[e.vShow,r.value]])])):e.createCommentVNode("",!0)]))}}),$w={},Fw={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"24",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-chevron-down text-gray-800 rotate-[90deg]"};function Iw(l,t){return e.openBlock(),e.createElementBlock("svg",Fw,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)])])}const Ow=Mt($w,[["render",Iw]]),Pw={},Rw={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"24",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-chevron-down text-gray-800 rotate-[270deg]"};function jw(l,t){return e.openBlock(),e.createElementBlock("svg",Rw,[...t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)])])}const Uw=Mt(Pw,[["render",jw]]),zw={class:"flex gap-1"},Hw={class:"mb-1"},qw={class:"mb-1"},Gw={class:"inline-flex rounded-sm shrink-0 pl-1"},Ww=["title"],Kw={class:"inline-flex rounded-sm shrink-0 pl-1"},Yw=["title"],Xw={key:1,class:"flex gap-1 !w-[75%] rounded-sm"},Zw=["max","value","disabled"],Qw=["min","value","disabled"],Jw=e.defineComponent({__name:"date-input-inline",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=Ut(),r=l,o=a,s=e.ref(null),{activeMode:i,innerValue:c,onSelectChange:u,nextClick:d,prevClick:m,currentLabel:h,clear:f}=xs({...r,popoverRef:s},o);e.watch(()=>r.modelValue,g=>{g!==void 0?(c.value=g,o("update:modelValue",g)):(i.value="",c.value=[])}),e.watch(c,g=>{o("update:modelValue",g),o("change",{name:r.name,value:g})},{deep:!0});function y(g){const p=Array.isArray(c.value)?[...c.value]:[];c.value=[g,p[1]||""]}function k(g){const p=Array.isArray(c.value)?[...c.value]:[];c.value=[p[0]||"",g]}return t({clear:f,popoverRef:s}),(g,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",zw,[e.createVNode(zn,{ref_key:"popoverRef",ref:s,label:e.unref(h),"current-value":e.unref(c),mode:l.mode,width:typeof l.width=="number"&&e.unref(c).length?l.width-70:l.width,onClear:e.unref(f),layout:l.layout,class:e.normalizeClass(l.itemClass)},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:p[0]||(p[0]=x=>e.unref(u)("range")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(n)("filter.period"))+" ",1),e.unref(i)==="range"?(e.openBlock(),e.createBlock(el,{key:0})):e.createCommentVNode("",!0)])]),p[12]||(p[12]=e.createElementVNode("div",null,[e.createElementVNode("div",{class:"pt-1 mt-1 border-t"})],-1)),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:p[1]||(p[1]=x=>e.unref(u)("today")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(n)("filter.today"))+" ",1),e.unref(i)==="today"?(e.openBlock(),e.createBlock(el,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:p[2]||(p[2]=x=>e.unref(u)("week")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(n)("filter.week"))+" ",1),e.unref(i)==="week"?(e.openBlock(),e.createBlock(el,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:p[3]||(p[3]=x=>e.unref(u)("month")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(n)("filter.month"))+" ",1),e.unref(i)==="month"?(e.openBlock(),e.createBlock(el,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("button",{type:"button",onClick:p[4]||(p[4]=x=>e.unref(u)("quarter")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(n)("filter.quarter"))+" ",1),e.unref(i)==="quarter"?(e.openBlock(),e.createBlock(el,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Hw,[e.createElementVNode("button",{type:"button",onClick:p[5]||(p[5]=x=>e.unref(u)("year")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(n)("filter.year"))+" ",1),e.unref(i)==="year"?(e.openBlock(),e.createBlock(el,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",qw,[e.createElementVNode("button",{type:"button",onClick:p[6]||(p[6]=x=>e.unref(f)()),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[e.createTextVNode(e.toDisplayString(e.unref(n)("filter.alltime"))+" ",1),e.unref(c)[0]?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(el,{key:0}))])])]),_:1},8,["label","current-value","mode","width","onClear","layout","class"]),e.unref(i)!==""&&e.unref(i)!=="range"&&e.unref(i)!=="last_7_days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Gw,[e.createElementVNode("button",{type:"button",title:e.unref(n)("filter.prev"),class:"inline-flex h-[38px] items-center px-2 text-sm text-gray-800 bg-gray-100 gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",onClick:p[7]||(p[7]=(...x)=>e.unref(m)&&e.unref(m)(...x))},[e.createVNode(Ow)],8,Ww)]),e.createElementVNode("div",Kw,[e.createElementVNode("button",{type:"button",title:e.unref(n)("filter.next"),class:"inline-flex h-[38px] items-center px-2 text-sm text-gray-800 gap-x-2 bg-gray-100 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",onClick:p[8]||(p[8]=(...x)=>e.unref(d)&&e.unref(d)(...x))},[e.createVNode(Uw)],8,Yw)])],64)):e.createCommentVNode("",!0),e.unref(i)!==""&&e.unref(i)==="range"?(e.openBlock(),e.createElementBlock("div",Xw,[e.createElementVNode("input",{type:"date",max:e.unref(c)[1],locale:"uk-UA",value:e.unref(c)[0],onInput:p[9]||(p[9]=x=>y(x.target.value)),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600",disabled:l.disabled},null,40,Zw),e.createElementVNode("input",{type:"date",min:e.unref(c)[0],locale:"uk-UA",value:e.unref(c)[1],onInput:p[10]||(p[10]=x=>k(x.target.value)),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600 appearance-auto",disabled:l.disabled},null,40,Qw)])):e.createCommentVNode("",!0)]),(l.cleanable,e.createCommentVNode("",!0))],64))}}),e2={class:"flex flex-wrap items-center gap-2"},t2=["disabled","onClick"],l2={key:0,class:"flex justify-between items-center text-xs text-gray-500 p-1 border-t"},a2=e.defineComponent({__name:"button-field",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{default:()=>[]},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=l,r=a,{innerValue:o,isSelected:s,selectItem:i,clear:c,labelKey:u,valueKey:d,allOptions:m}=Pn({...n,modelValue:n.modelValue??n.default??""},r),h=e.computed(()=>o.value!==void 0&&!(typeof o.value=="string"&&o.value==="")),f=e.computed(()=>h.value?1:0);function y(g){return s(g)?["bg-blue-600 text-white"].filter(p=>typeof p=="string"&&p.trim().length>0).join(" "):["text-gray-700 hover:bg-gray-200 bg-gray-50 "].filter(p=>typeof p=="string"&&p.trim().length>0).join(" ")}function k(g){n.disabled||i(g)}return t({clear:c}),e.watch(()=>n.modelValue,g=>{g===void 0&&(o.value=void 0)}),(g,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),x=>(e.openBlock(),e.createElementBlock("button",{key:x[e.unref(d)],type:"button",class:e.normalizeClass(["px-3 py-2 text-sm font-medium rounded-md transition-colors",y(x)]),disabled:l.disabled,onClick:w=>k(x)},e.toDisplayString(x[e.unref(u)]),11,t2))),128))]),l.cleanable&&l.layout==="popover"?(e.openBlock(),e.createElementBlock("div",l2,[e.createElementVNode("span",null,e.toDisplayString(f.value)+" з "+e.toDisplayString(e.unref(m).length)+" обрано",1),e.withDirectives(e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",onClick:p[0]||(p[0]=(...x)=>e.unref(c)&&e.unref(c)(...x))}," Очистити ",512),[[e.vShow,h.value]])])):e.createCommentVNode("",!0)],64))}}),ws={radio:Dx,checkbox:hs,check:hs,text:qx,range:ew,date:mw,select:_w,tag:Bw,button:a2,"date:inline":Jw};function Hn(l,t){let a;switch(l.toLowerCase()){case"autocomplete":a="select";break;case"check":a="checkbox";break;default:a=l==null?void 0:l.toString().toLowerCase()}return a==="date"&&t&&t==="inline"&&(a="date:inline"),{component:ws[a]||ws.text,type:a}}const n2={style:{display:"inline-flex",margin:"0px",width:"100%"}},r2={class:"relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm"},o2={class:"block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200"},s2={class:"flex items-center"},i2={class:"text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1"},c2={class:"filter-layout__body"},d2=e.defineComponent({__name:"vertical-layout",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=l,r=a,o=e.ref(),s=Hn(n.type,n.layout),i=e.computed({get:()=>n.modelValue,set:m=>r("update:modelValue",m)});function c(m){r("clear",m)}function u(m,h){r("change",{name:m,value:h}),n.modelValue!==void 0&&r("update:modelValue",h)}function d(){r("clear",n.name)}return e.watch(()=>n.default,m=>{i.value=m}),e.watch(()=>n.modelValue,m=>{i.value=m}),t({filterRef:o}),(m,h)=>{var f,y,k;return e.openBlock(),e.createElementBlock("div",n2,[e.createElementVNode("div",r2,[e.createElementVNode("div",o2,[e.createElementVNode("div",s2,[e.createElementVNode("span",i2,e.toDisplayString(l.label),1)]),typeof i.value=="string"&&i.value.trim()!==""||Array.isArray(i.value)&&i.value.length>0&&i.value.some(g=>g!==void 0)||i.value===null?(e.openBlock(),e.createBlock(ox,{key:0,onClick:d})):e.createCommentVNode("",!0)]),e.createElementVNode("div",c2,[((f=e.unref(s))==null?void 0:f.type)!=="select"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent((y=e.unref(s))==null?void 0:y.component),e.mergeProps({key:0},n,{type:(k=e.unref(s))==null?void 0:k.type,class:n.itemClass,onChange:h[0]||(h[0]=g=>u(g.name,g.value)),onClear:h[1]||(h[1]=g=>c(g)),ref_key:"filterRef",ref:o}),null,16,["type","class"])):(e.openBlock(),e.createBlock(zn,{key:1,"current-value":i.value,label:l.label,mode:l.mode,onClear:d,fieldRef:o.value,width:void 0,disabled:l.disabled,layout:"vertical"},{default:e.withCtx(()=>{var g,p;return[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((g=e.unref(s))==null?void 0:g.component),e.mergeProps({ref_key:"filterRef",ref:o},n,{type:(p=e.unref(s))==null?void 0:p.type,class:n.itemClass,onChange:h[2]||(h[2]=x=>u(x.name,x.value)),onClear:h[3]||(h[3]=x=>c(x))}),null,16,["type","class"]))]}),_:1},8,["current-value","label","mode","fieldRef","disabled"]))])])])}}}),_s=e.defineComponent({__name:"inline-layout",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=l,r=a,o=e.ref(),s=Hn(n.type,n.layout),i=e.computed({get:()=>n.modelValue,set:d=>r("update:modelValue",d)});function c(d=n.name){r("clear",d)}function u(d,m){r("change",{name:d,value:m}),n.modelValue!==void 0&&r("update:modelValue",m)}return e.watch(()=>n.default,d=>{i.value=d}),e.watch(()=>n.modelValue,d=>{i.value=d}),t({filterRef:o}),(d,m)=>{var h,f;return["text","date","button"].includes(l.type.toLocaleLowerCase())?(e.openBlock(),e.createBlock(e.resolveDynamicComponent((h=e.unref(s))==null?void 0:h.component),e.mergeProps({key:0},n,{type:(f=e.unref(s))==null?void 0:f.type,class:l.itemClass,onChange:m[0]||(m[0]=y=>u(y.name,y.value)),onClear:m[1]||(m[1]=y=>c(y)),disabled:l.disabled,modelValue:i.value,"onUpdate:modelValue":m[2]||(m[2]=y=>i.value=y)}),null,16,["type","class","disabled","modelValue"])):(e.openBlock(),e.createBlock(zn,{key:1,"current-value":i.value,label:l.label,mode:l.mode,onClear:c,fieldRef:o.value,width:n.width,disabled:l.disabled,layout:"inline"},{default:e.withCtx(()=>{var y,k;return[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((y=e.unref(s))==null?void 0:y.component),e.mergeProps({ref_key:"filterRef",ref:o},n,{modelValue:i.value,"onUpdate:modelValue":m[3]||(m[3]=g=>i.value=g),type:(k=e.unref(s))==null?void 0:k.type,class:n.itemClass,onChange:m[4]||(m[4]=g=>u(g.name,g.value)),onClear:m[5]||(m[5]=g=>c(g))}),null,16,["modelValue","type","class"]))]}),_:1},8,["current-value","label","mode","fieldRef","width","disabled"]))}}}),u2=e.defineComponent({__name:"popover-layout",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=l,r=a,o=e.ref(),s=e.ref(Hn(n.type,n.layout)),i=e.computed({get:()=>n.modelValue,set:d=>r("update:modelValue",d)});function c(d){r("clear",d)}function u(d,m){r("change",{name:d,value:m}),n.modelValue!==void 0&&r("update:modelValue",m)}return e.watch(()=>n.default,d=>{i.value=d}),e.watch(()=>n.modelValue,d=>{i.value=d}),e.watch(()=>n,d=>{i.value=d}),t({filterRef:o}),(d,m)=>{var h,f;return e.openBlock(),e.createBlock(e.resolveDynamicComponent((h=s.value)==null?void 0:h.component),e.mergeProps(n,{type:(f=s.value)==null?void 0:f.type,class:n.itemClass,modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=y=>i.value=y),onChange:m[1]||(m[1]=y=>u(y.name,y.value)),onClear:m[2]||(m[2]=y=>c(y)),ref_key:"filterRef",ref:o}),null,16,["type","class","modelValue"])}}}),zt=e.defineComponent({__name:"filter-field",props:{id:{},name:{},title:{},type:{},label:{},width:{},options:{default:()=>[]},placeholder:{},api:{},data:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean,default:!0},dataKey:{},valueKey:{},mode:{},labelKey:{},sort:{default:"name"},ua:{},itemClass:{}},emits:["update:modelValue","change","clear"],setup(l,{expose:t,emit:a}){const n=l,r=a,o=e.ref(),s=e.computed({get:()=>n.modelValue,set:d=>r("update:modelValue",d)});function i(d){r("clear",d)}function c(d,m){r("change",{name:d,value:m}),n.modelValue!==void 0&&r("update:modelValue",m)}e.watch(()=>n.default,d=>{s.value=d}),e.watch(()=>n.modelValue,d=>{s.value=d}),t({filterRef:o});function u(){switch(n.layout){case"inline":return _s;case"vertical":return d2;case"popover":return u2;default:return _s}}return(d,m)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u()),e.mergeProps(n,{onChange:m[0]||(m[0]=h=>c(h.name,h.value)),onClear:m[1]||(m[1]=h=>i(h)),modelValue:s.value,"onUpdate:modelValue":m[2]||(m[2]=h=>s.value=h)}),null,16,["modelValue"]))}});function Da(l,t){const{slots:a}=l,n=p=>p?JSON.parse(JSON.stringify(e.toRaw(p))):{},r=e.ref(n(l.value));e.watch(()=>l.value,p=>{r.value=n(p)},{deep:!0,immediate:!0});const o=e.computed(()=>{var p;return(e.toRaw((p=a==null?void 0:a.default)==null?void 0:p.call(a))??[]).flatMap(x=>Array.isArray(x.children)?x.children:[x])});function s(p){delete r.value[p],t("clear",{data:e.toRaw(r.value),name:p})}function i(p,x){x===void 0?s(p):r.value={...r.value,[p]:x},t("change",{data:e.toRaw(r.value),name:p,value:x})}const c=e.computed(()=>o.value.map(p=>{var w,b,_;const x=(w=p.props)==null?void 0:w.name;return e.cloneVNode(p,{...p.props,layout:l.view,showClean:!0,modelValue:r.value[x],"onUpdate:modelValue":V=>{i(x,V)},onClear:()=>s(x),class:[l.itemClass,(b=p.props)==null?void 0:b.class],itemClass:[l.itemClass,(_=p.props)==null?void 0:_.itemClass].filter(V=>typeof V=="string"&&V.trim().length>0).join(" ")||void 0})})),u=e.computed(()=>new Map(c.value.map(p=>{var w;const x=(w=p.props)==null?void 0:w.name;return x?[x,p]:null}).filter(p=>p!==null)));function d(p=!1){r.value={},p||t("clearAll",{data:e.toRaw(r.value),name:"ALL"})}const m=e.ref(""),h=e.computed(()=>{var p;return(p=l.schema)!=null&&p.value?Object.entries(r.value).filter(([x,w])=>l.schema&&!(x in l.schema.value)?!1:Array.isArray(w)?w.some(b=>b!==""&&b!==void 0):w!==""&&w!==void 0).length:0}),f=e.ref();e.watch(m,async()=>{var p,x;await e.nextTick(),(x=(p=f==null?void 0:f.value)==null?void 0:p.filterRef)!=null&&x.inputTextRef&&f.value.filterRef.inputTextRef.focus()});const y=e.computed(()=>{var p,x;return(p=l.schema)!=null&&p.value?Object.fromEntries(Object.entries((x=l.schema)==null?void 0:x.value).slice(0,l.limit)):{}}),k=e.computed(()=>{var x;if(c.value.length===0)return[];let p=0;if((x=l.schema)!=null&&x.value){const w=Object.entries(l.schema.value).length;l.limit&&w<l.limit?p=l.limit-w:p=0}return c.value.slice(0,p)}),g=e.computed(()=>c.value.length===0?[]:l.view!=="inline"?c.value:c.value.slice(k.value.length));return{activeFilter:r,activeFilterCount:h,onFilterChange:i,clearFilter:s,clearAllFilters:d,limitedSchema:y,filtersSlot:c,limitedFiltersSlot:k,popoverFiltersSlot:g,vnodeMap:u,selectedFilter:m,filterRef:f}}const m2=e.defineComponent({__name:"popover",emits:["open","close"],setup(l,{emit:t}){const a=e.ref(!1),n=e.ref(null),r=e.ref(null),o=e.ref(null),s=e.ref({top:"0px",left:"0px",position:"absolute"});function i(){a.value=!a.value}function c(){const f=o.value,y=n.value;if(!f||!y)return;const k=f.getBoundingClientRect(),g=y.offsetWidth,p=window.innerWidth-k.left;let x=k.left+window.scrollX;g>p&&(x=window.innerWidth-g-8,x<8&&(x=8)),s.value={position:"absolute",top:`${k.bottom+window.scrollY+8}px`,left:`${x}px`}}const u=e.computed(()=>Object.entries(s.value).map(f=>f.join(":")).join(";"));function d(f){var k,g;const y=f.target;!((k=o.value)!=null&&k.contains(f.target))&&!((g=n.value)!=null&&g.contains(f.target))&&!y.closest("[data-inside-popover]")&&(a.value=!1)}const m=e.ref(!1);e.onMounted(()=>{m.value=!0}),e.onMounted(()=>{var f,y;o.value=((f=r.value)==null?void 0:f.querySelector("[data-popover-trigger]"))||null,(y=o.value)==null||y.addEventListener("click",i),document.addEventListener("click",d),window.addEventListener("resize",c),window.addEventListener("scroll",c,!0)}),e.onBeforeUnmount(()=>{var f;(f=o.value)==null||f.removeEventListener("click",i),document.removeEventListener("click",d),window.removeEventListener("resize",c),window.removeEventListener("scroll",c,!0)});const h=t;return e.watch(a,async f=>{f?(h("open"),await e.nextTick(),c()):h("close")}),(f,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:r},[e.renderSlot(f.$slots,"trigger"),m.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.withDirectives(e.createElementVNode("div",{ref_key:"popoverRef",ref:n,class:"absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",style:e.normalizeStyle(u.value)},[e.renderSlot(f.$slots,"default")],4),[[e.vShow,a.value]])])):e.createCommentVNode("",!0)],512))}}),p2={},f2={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",class:"lucide lucide-filter h-4 w-4"};function h2(l,t){return e.openBlock(),e.createElementBlock("svg",f2,[...t[0]||(t[0]=[e.createElementVNode("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"},null,-1)])])}const Es=Mt(p2,[["render",h2]]),g2={class:"flex items-center gap-2 overflow-hidden"},y2={key:0,class:"inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-[4px] bg-blue-500 px-1 text-[11px] font-semibold text-white"},b2={class:"flex max-h-[400px]"},k2={class:"w-64 border-r border-gray-200 overflow-y-auto"},x2={class:"p-4 border-b"},w2={class:"text-sm text-gray-600"},_2={class:"p-2"},E2=["onClick"],C2={class:"flex items-center gap-2"},V2={class:"text-sm font-medium"},N2={key:0,class:"inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-[4px] bg-blue-100 px-1 text-[11px] font-semibold text-blue-600"},v2=["onClick"],B2={class:"flex items-center gap-2"},S2={class:"text-sm font-medium"},D2={key:0,class:"inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-[4px] bg-blue-100 px-1 text-[11px] font-semibold text-blue-600"},A2={key:0,class:"p-2 border-t"},M2={class:"flex-1 min-h-[300px] overflow-y-auto"},T2={key:0,class:"flex items-center justify-center h-full text-gray-500"},L2={class:"text-sm"},Cs=e.defineComponent({__name:"popover-filter-layout",props:{badgeCount:{},schema:{},view:{},value:{},history:{type:Boolean},mode:{},limit:{default:3},width:{},title:{},disabled:{type:Boolean},defaultPanelWidth:{},itemClass:{}},emits:["change","clear","clearAll"],setup(l,{expose:t,emit:a}){const n=Ut(),r=l,o=ks(r.mode),s=e.useSlots(),i=a,c=e.ref({}),u=e.computed(()=>c!=null&&c.value?r.view!=="inline"?c==null?void 0:c.value:Object.fromEntries(Object.entries(c==null?void 0:c.value).slice(r.limit)):{}),{activeFilter:d,activeFilterCount:m,onFilterChange:h,clearFilter:f,clearAllFilters:y,popoverFiltersSlot:k,selectedFilter:g,filterRef:p}=Da({...r,schema:c,slots:s},i),x=e.computed(()=>r.badgeCount??m.value);function w(V){return Array.isArray(V)?V.filter(E=>E!=null&&E!=="").length:V&&typeof V=="object"?Object.values(V).filter(E=>E!=null&&E!=="").length:V===null||V!==void 0&&V!==""?1:0}function b(V){return d.value?w(d.value[V]):0}function _(){if(u.value){const[V]=Object.keys(u.value);g.value=V}else k.value.length>0?g.value=k.value[0].props.name:g.value=""}return e.watch(()=>r.schema,V=>{c.value=V??{}},{deep:!0,immediate:!0}),t({clearFilter:f,clearAllFilters:y}),(V,E)=>(e.openBlock(),e.createBlock(m2,{onOpen:_,onClose:E[5]||(E[5]=M=>g.value="")},{trigger:e.withCtx(()=>[e.createElementVNode("button",{"data-popover-trigger":"","aria-haspopup":"dialog","aria-expanded":"false",class:e.normalizeClass([l.itemClass,e.unref(o),"flex items-center justify-between gap-2",x.value>0?"border border-blue-400 bg-blue-50 text-blue-600 hover:border-blue-500":"text-neutral-700 hover:border-neutral-400"]),type:"button"},[e.createElementVNode("span",g2,[e.createVNode(Es,{class:"h-4 w-4"}),E[6]||(E[6]=e.createElementVNode("span",{class:"text-sm font-medium"},"Фільтр",-1))]),x.value>0?(e.openBlock(),e.createElementBlock("span",y2,e.toDisplayString(x.value),1)):e.createCommentVNode("",!0)],2)]),default:e.withCtx(()=>[e.createElementVNode("div",b2,[e.createElementVNode("div",k2,[e.createElementVNode("div",x2,[e.createElementVNode("p",w2,e.toDisplayString(e.unref(n)("filter.selectFieldHelp")),1)]),e.createElementVNode("div",_2,[l.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(u.value),([M,D])=>(e.openBlock(),e.createElementBlock("button",{key:M,onClick:()=>{g.value=M},class:e.normalizeClass(["flex w-full items-center justify-between px-3 py-2 text-left transition-colors hover:bg-gray-50",e.unref(g)===M?"bg-blue-50 text-blue-700 border-l-2 border-blue-500":"text-neutral-700"])},[e.createElementVNode("div",C2,[e.createElementVNode("span",V2,e.toDisplayString(D.label),1)]),b(M)>0?(e.openBlock(),e.createElementBlock("div",N2,e.toDisplayString(b(M)),1)):e.createCommentVNode("",!0)],10,E2))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(M,D)=>(e.openBlock(),e.createElementBlock("button",{key:"slot-"+D,onClick:A=>g.value=M.props.name,class:e.normalizeClass(["flex items-center justify-between px-3 py-2 text-left transition-colors hover:bg-gray-50",e.unref(g)===M.props.name?"bg-blue-50 text-blue-700 border-l-2 border-blue-500":"text-neutral-700"])},[e.createElementVNode("div",B2,[e.createElementVNode("span",S2,e.toDisplayString(M.props.label),1)]),b(M.props.name)>0?(e.openBlock(),e.createElementBlock("div",D2,e.toDisplayString(b(M.props.name)),1)):e.createCommentVNode("",!0)],10,v2))),128))]),e.unref(m)>0?(e.openBlock(),e.createElementBlock("div",A2,[e.createElementVNode("button",{class:e.normalizeClass([l.itemClass,"w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors"]),onClick:E[0]||(E[0]=M=>e.unref(y)()),"data-inside-popover":""}," Очистити всі ",2)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",M2,[e.unref(g)===""?(e.openBlock(),e.createElementBlock("div",T2,[e.createElementVNode("p",L2,e.toDisplayString(e.unref(n)("filter.selectFieldHelp")),1)])):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(u.value),([M,D])=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(g)===M?(e.openBlock(),e.createBlock(zt,e.mergeProps({key:M,layout:"popover",ref_for:!0,ref_key:"filterRef",ref:p},{ref_for:!0},D,{class:[l.itemClass,D==null?void 0:D.class],"item-class":[l.itemClass,D==null?void 0:D.itemClass].filter(Boolean).join(" ")||void 0,onChange:E[1]||(E[1]=A=>e.unref(h)(A.name,A.value)),onClear:E[2]||(E[2]=A=>{e.unref(f)(A),e.unref(h)(A,void 0)}),modelValue:e.unref(d)[M],"onUpdate:modelValue":A=>e.unref(d)[M]=A,cleanable:!0}),null,16,["class","item-class","modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(M,D)=>{var A,$;return e.openBlock(),e.createElementBlock(e.Fragment,{key:"slot-"+D},[e.unref(g)===M.props.name?(e.openBlock(),e.createBlock(zt,e.mergeProps({key:0,layout:"popover"},{ref_for:!0},M.props,{ref_for:!0,ref_key:"filterRef",ref:p,class:[l.itemClass,(A=M.props)==null?void 0:A.class],"item-class":[l.itemClass,($=M.props)==null?void 0:$.itemClass].filter(Boolean).join(" ")||void 0,onChange:E[3]||(E[3]=U=>e.unref(h)(U.name,U.value)),onClear:E[4]||(E[4]=U=>{e.unref(f)(U),e.unref(h)(U,void 0)}),modelValue:e.unref(d)[M.props.name],"onUpdate:modelValue":U=>e.unref(d)[M.props.name]=U,cleanable:!0}),null,16,["class","item-class","modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)],64)}),128))],64)):e.createCommentVNode("",!0)])])]),_:1}))}}),$2={class:"flex gap-1 items-center flex-wrap"},Vs=e.defineComponent({__name:"inline-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},mode:{},limit:{default:3},width:{},title:{},disabled:{type:Boolean},defaultPanelWidth:{},itemClass:{}},emits:["change","clear","clearAll"],setup(l,{expose:t,emit:a}){const n=Ut(),r=l,o=a,s=e.useSlots(),i=e.ref({}),c=e.computed(()=>Object.keys(r.schema).length>r.limit),{activeFilter:u,activeFilterCount:d,onFilterChange:m,clearFilter:h,clearAllFilters:f,limitedSchema:y,filtersSlot:k,limitedFiltersSlot:g}=Da({...r,schema:i,slots:s},o);function p(E){return Array.isArray(E)?E.some(M=>M!==""&&M!==void 0&&M!==null):E===null?!0:E&&typeof E=="object"?Object.values(E).some(M=>M!==""&&M!==void 0&&M!==null):E!==""&&E!==void 0}const x=e.computed(()=>{const E=Object.keys(y.value??{}),M=g.value.map(D=>{var A;return(A=D.props)==null?void 0:A.name}).filter(D=>typeof D=="string");return new Set([...E,...M])}),w=e.computed(()=>Object.entries(u.value??{}).filter(([E,M])=>x.value.has(E)&&p(M)).length),b=e.computed(()=>{const E=d.value??0,M=w.value??0;return Math.max(E-M,0)}),_=e.ref();function V(){_.value&&_.value.clearAllFilters(!0),f()}return e.watch(()=>r.schema,E=>{i.value=E},{deep:!0,immediate:!0}),t({clearFilter:h,clearAllFilters:f}),(E,M)=>(e.openBlock(),e.createElementBlock("div",$2,[l.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(e.unref(y)),([D,A])=>(e.openBlock(),e.createBlock(zt,e.mergeProps({key:D,mode:l.mode,width:l.width?l.width:A==null?void 0:A.width},{ref_for:!0},A,{class:[l.itemClass,A==null?void 0:A.class],"item-class":[l.itemClass,A==null?void 0:A.itemClass].filter(Boolean).join(" ")||void 0,onChange:M[0]||(M[0]=$=>e.unref(m)($.name,$.value)),onClear:e.unref(h),layout:"inline",cleanable:!0,modelValue:e.unref(u)[D],"onUpdate:modelValue":$=>e.unref(u)[D]=$}),null,16,["mode","width","class","item-class","onClear","modelValue","onUpdate:modelValue"]))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(D,A)=>{var $,U;return e.openBlock(),e.createBlock(zt,e.mergeProps({key:"slot-"+A,layout:"inline"},{ref_for:!0},D.props,{class:[l.itemClass,($=D.props)==null?void 0:$.class],"item-class":[l.itemClass,(U=D.props)==null?void 0:U.itemClass].filter(Boolean).join(" ")||void 0,onChange:M[1]||(M[1]=W=>e.unref(m)(W.name,W.value)),onClear:M[2]||(M[2]=W=>{e.unref(h)(W),e.unref(m)(W,void 0)}),cleanable:!0,modelValue:e.unref(u)[D.props.name],"onUpdate:modelValue":W=>e.unref(u)[D.props.name]=W}),null,16,["class","item-class","modelValue","onUpdate:modelValue"])}),128)),c.value?(e.openBlock(),e.createBlock(Cs,e.mergeProps({key:1},r,{schema:l.schema,limit:l.limit,onChange:M[3]||(M[3]=D=>e.unref(m)(D.name,D.value)),onClearAll:M[4]||(M[4]=D=>e.unref(f)()),onClear:M[5]||(M[5]=D=>e.unref(h)(D.name)),mode:l.mode,ref_key:"popoverRef",ref:_,cleanable:!0,"badge-count":b.value}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(D,A)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D),e.mergeProps({key:"slot-"+A,layout:"popover"},{ref_for:!0},D.props,{cleanable:!0}),null,16))),128))]),_:1},16,["schema","limit","mode","badge-count"])):e.createCommentVNode("",!0),e.unref(d)>0?(e.openBlock(),e.createElementBlock("button",{key:2,onClick:V,class:e.normalizeClass([l.itemClass,"relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-md bg-gray-50 border text-gray-800 hover:bg-gray-200 focus:bg-gray-200"])},e.toDisplayString(e.unref(n)("filter.clear")),3)):e.createCommentVNode("",!0)]))}}),F2={key:0,class:"p-2 overflow-y-auto overflow-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-800 max-h-[calc(100%-142px)] h-full bg-gray-100"},I2={class:"flex items-center vst-filters vsTailwind flex-col w-full"},O2=e.defineComponent({__name:"vertical-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},mode:{},limit:{default:3},width:{},title:{},disabled:{type:Boolean},defaultPanelWidth:{},itemClass:{}},emits:["change","clear","clearAll"],setup(l,{expose:t,emit:a}){const n=l,r=a,o=e.useSlots(),{activeFilter:s,activeFilterCount:i,onFilterChange:c,clearFilter:u,clearAllFilters:d,filtersSlot:m}=Da({...n,slots:o},r);return t({clearFilter:u,clearAllFilters:d}),(h,f)=>l.view==="vertical"?(e.openBlock(),e.createElementBlock("div",F2,[e.createElementVNode("div",I2,[e.unref(i)>0?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:f[0]||(f[0]=y=>e.unref(d)()),"data-popover-trigger":"","aria-haspopup":"dialog","aria-expanded":"false",class:e.normalizeClass([l.itemClass,"w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200"]),type:"button"}," Очистити ",2)):e.createCommentVNode("",!0),l.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Object.entries(l.schema),([y,k])=>(e.openBlock(),e.createBlock(zt,e.mergeProps({layout:"vertical"},{ref_for:!0},k,{class:[l.itemClass,k==null?void 0:k.class],"item-class":[l.itemClass,k==null?void 0:k.itemClass].filter(Boolean).join(" ")||void 0,onChange:f[1]||(f[1]=g=>e.unref(c)(g.name,g.value)),onClear:f[2]||(f[2]=g=>{e.unref(u)(g),e.unref(c)(g,void 0)}),modelValue:e.unref(s)[y],"onUpdate:modelValue":g=>e.unref(s)[y]=g,showClean:!0}),null,16,["class","item-class","modelValue","onUpdate:modelValue"]))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),(y,k)=>{var g,p;return e.openBlock(),e.createBlock(zt,e.mergeProps({key:"slot-"+k,layout:"vertical"},{ref_for:!0},y.props,{class:[l.itemClass,(g=y.props)==null?void 0:g.class],"item-class":[l.itemClass,(p=y.props)==null?void 0:p.itemClass].filter(Boolean).join(" ")||void 0,onChange:f[3]||(f[3]=x=>e.unref(c)(x.name,x.value)),onClear:f[4]||(f[4]=x=>{e.unref(u)(x),e.unref(c)(x,void 0)}),modelValue:e.unref(s)[y.props.name],"onUpdate:modelValue":x=>e.unref(s)[y.props.name]=x,showClean:!0}),null,16,["class","item-class","modelValue","onUpdate:modelValue"])}),128))])])):e.createCommentVNode("",!0)}}),P2=["onKeydown"],R2=["disabled"],j2={key:0,class:"ml-2 inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-full bg-blue-500 px-1.5 text-[11px] font-semibold text-white"},U2={class:"rounded-2xl border border-slate-300/35 bg-white/95 p-4 shadow-2xl backdrop-blur-sm"},z2={class:"mb-3 flex items-center justify-between"},H2={class:"text-[15px] font-semibold text-slate-800"},q2={"aria-hidden":"true"},G2={class:"flex max-h-80 flex-col gap-1 overflow-y-auto"},W2={key:0,class:"mt-3 flex justify-end"},K2=e.defineComponent({__name:"popover-inline-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},mode:{},limit:{default:10},width:{default:220},title:{},disabled:{type:Boolean},defaultPanelWidth:{},itemClass:{}},emits:["change","clear","clearAll"],setup(l,{emit:t}){const a=Ut(),n=l,r=t,o=e.ref({}),s=e.useSlots(),{activeFilter:i,activeFilterCount:c,onFilterChange:u,clearFilter:d,clearAllFilters:m,filtersSlot:h}=Da({...n,schema:o.value,slots:s},r),f=e.ref(null),y=e.ref(null),k=e.reactive({open:!1,top:0,left:0}),g=e.computed(()=>k.open),p=e.computed(()=>!!n.disabled),x=e.computed(()=>o.value||{}),w=e.computed(()=>n.title??"Фільтр"),b=e.computed(()=>!!s.trigger),_=e.computed(()=>["inline-flex h-9 items-center justify-center gap-2 rounded-lg border border-transparent bg-slate-200/70 px-3 text-sm font-medium text-slate-700 transition-colors hover:bg-blue-100 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-200 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-slate-200/70 disabled:hover:text-slate-700",p.value?"cursor-not-allowed opacity-60":"cursor-pointer"]),V=e.computed(()=>k.open?{position:"absolute",top:`${k.top}px`,left:`${k.left}px`,transform:"translateX(-50%)",zIndex:1e3}:{display:"none"});function E(){k.open=!1}function M(){if(!f.value)return;const W=f.value.getBoundingClientRect();k.top=W.bottom+window.scrollY+8,k.left=W.left+W.width/2+window.scrollX}function D(){k.open=!k.open,k.open&&e.nextTick(M)}function A(){p.value||D()}function $(){k.open&&M()}function U(){m()}return e.onMounted(()=>{window.addEventListener("resize",$),window.addEventListener("scroll",$,!0)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",$),window.removeEventListener("scroll",$,!0)}),e.watch(()=>n.schema,W=>{if(!W){o.value={};return}if(Array.isArray(W)){const O=W.filter(I=>I&&(I.name||I.id)).map(I=>{const F=I.name||I.id;return[F,{...I,name:F}]});o.value=Object.fromEntries(O);return}o.value=W},{deep:!0,immediate:!0}),e.watch(()=>n.disabled,W=>{W&&E()}),(W,O)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-flex",ref_key:"anchor",ref:f},[b.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["inline-flex",p.value?"cursor-not-allowed opacity-60 pointer-events-none":"cursor-pointer"]),role:"button",tabindex:"0","data-popover-trigger":"",onClick:e.withModifiers(A,["prevent","stop"]),onKeydown:[e.withKeys(e.withModifiers(A,["prevent","stop"]),["enter"]),e.withKeys(e.withModifiers(A,["prevent","stop"]),["space"])]},[e.renderSlot(W.$slots,"trigger",{toggle:A,open:g.value,disabled:p.value,activeCount:e.unref(c)})],42,P2)):(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(_.value),type:"button",disabled:p.value,onClick:e.withModifiers(A,["prevent","stop"]),"data-popover-trigger":""},[e.createVNode(Es,{class:"h-4 w-4"}),e.unref(c)>0?(e.openBlock(),e.createElementBlock("div",j2,e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],10,R2)),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[g.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute",typeof l.width=="number"?`min-w-[${l.width+32+(Object.keys(x.value).length>7?20:0)}px]`:"min-w-[268px] "]),style:e.normalizeStyle(V.value),ref_key:"panel",ref:y,onClick:O[4]||(O[4]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",U2,[e.createElementVNode("div",z2,[e.createElementVNode("h3",H2,e.toDisplayString(w.value),1),e.createElementVNode("button",{type:"button",class:"inline-flex h-6 w-6 items-center justify-center rounded-full border-0 bg-slate-300/40 text-slate-600 transition-colors hover:bg-blue-200/60 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-200",onClick:E},[e.createElementVNode("span",q2,[e.createVNode(Un,{class:"h-4 w-4"})]),O[5]||(O[5]=e.createElementVNode("span",{class:"sr-only"},"Закрити",-1))])]),e.createElementVNode("div",G2,[Object.keys(x.value).length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(x.value),([I,F])=>(e.openBlock(),e.createBlock(zt,e.mergeProps({key:I},{ref_for:!0},{...F,layout:"inline"},{width:l.width?l.width:F==null?void 0:F.width,class:[l.itemClass,F==null?void 0:F.class],"item-class":[l.itemClass,F==null?void 0:F.itemClass].filter(Boolean).join(" ")||void 0,cleanable:!0,modelValue:e.unref(i)[I],"onUpdate:modelValue":T=>e.unref(i)[I]=T,onChange:O[0]||(O[0]=T=>e.unref(u)(T.name,T.value)),onClear:O[1]||(O[1]=T=>{e.unref(d)(T),e.unref(u)(T,void 0)})}),null,16,["width","class","item-class","modelValue","onUpdate:modelValue"]))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(h),(I,F)=>{var T,z;return e.openBlock(),e.createBlock(zt,e.mergeProps({key:"slot-"+F,ref_for:!0},{...I.props,layout:"inline"},{class:[l.itemClass,(T=I.props)==null?void 0:T.class],"item-class":[l.itemClass,(z=I.props)==null?void 0:z.itemClass].filter(Boolean).join(" ")||void 0,cleanable:!0,modelValue:e.unref(i)[I.props.name],"onUpdate:modelValue":Q=>e.unref(i)[I.props.name]=Q,onChange:O[2]||(O[2]=Q=>e.unref(u)(Q.name,Q.value)),onClear:O[3]||(O[3]=Q=>{e.unref(d)(Q),e.unref(u)(Q,void 0)})}),null,16,["class","item-class","modelValue","onUpdate:modelValue"])}),128))]),e.unref(c)>0?(e.openBlock(),e.createElementBlock("div",W2,[e.createElementVNode("button",{type:"button",class:e.normalizeClass([l.itemClass,"text-sm font-semibold text-blue-600 transition-colors hover:text-blue-700 focus:outline-none"]),onClick:U},e.toDisplayString(e.unref(a)("filter.clear")),3)])):e.createCommentVNode("",!0)])],6)):e.createCommentVNode("",!0)]))],512))}}),qn=e.defineComponent({__name:"filter",props:{schema:{},view:{default:"inline"},value:{},history:{type:Boolean},mode:{},limit:{default:3},width:{},title:{},disabled:{type:Boolean},defaultPanelWidth:{},itemClass:{}},emits:["change","clear","clearAll"],setup(l,{expose:t,emit:a}){const n=l,r=e.ref(c(n.value??{}));e.watch(()=>n.value,async g=>{var p,x;r.value=c(g??{}),(!g||Object.keys(g).length===0)&&(await e.nextTick(),(x=(p=s.value)==null?void 0:p.clearAllFilters)==null||x.call(p,!0))},{deep:!0,immediate:!0});const o=a,s=e.ref(),i=e.useSlots();function c(g){if(Array.isArray(g))return g.map(p=>c(p));if(g!==null&&typeof g=="object"){const p=e.toRaw(g),x={};for(const w in p)x[w]=c(p[w]);return x}return g}function u(g,p){p!==void 0?r.value={...r.value,[g]:p}:delete r.value[g],o("change",{data:c(r.value),name:g,value:c(p)})}function d(g){delete r.value[g],o("clear",{data:c(r.value),name:g}),o("change",{data:c(r.value),name:g,value:null})}function m(){r.value={},o("clear",{data:c(r.value),name:"ALL"}),o("change",{data:c(r.value),name:"ALL",value:null})}const h=e.ref({});function f(){switch(n.view){case"inline":return Vs;case"vertical":return O2;case"popover":return Cs;case"popover-inline":return K2;default:return Vs}}e.watch(()=>n.schema,g=>{if(!g){h.value={};return}if(Array.isArray(g)&&!g.length){h.value={};return}Array.isArray(g)?h.value=g.filter(p=>p.type).reduce((p,x)=>(Object.assign(x,{name:x.id||x.name,type:{datepicker:"date"}[x.type.toLowerCase()]||x.type.toLowerCase(),label:x.label||x.ua}),p[x.name]=x,x.data&&!x.api&&!x.options&&Object.assign(x,{api:`/api/suggest/${x.data}`}),p),{}):(Object.entries(g).forEach(([p,x])=>{Object.assign(x,{name:p||x.name||x.id,type:x.type.toLowerCase()})}),h.value={...g})},{immediate:!0,deep:!0});function y(g){s.value.clearFilter(g),d(g)}function k(){s.value.clearAllFilters(),m()}return e.watch(()=>r.value,g=>{if(n.history){const p=new URL(window.location.href),x=new URLSearchParams(window.location.search);Object.keys(g).length>0?x.set("filter",Object.entries(g).filter(([,w])=>w).map(([w,b])=>`${w}=${b}`).join("|")):x.delete("filter"),p.search=decodeURI(x.toString()),window.history.pushState({},"",p)}}),t({clearAllFilters:k,clearFilter:y}),(g,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f()),e.mergeProps(n,{schema:h.value,onChange:p[0]||(p[0]=x=>u(x.name,x.value)),onClear:p[1]||(p[1]=x=>d(x.name)),onClearAll:m,ref_key:"filterRef",ref:s}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:2},[e.unref(i).trigger?{name:"trigger",fn:e.withCtx(x=>[e.renderSlot(g.$slots,"trigger",e.normalizeProps(e.guardReactiveProps(x)))]),key:"0"}:void 0]),1040,["schema"]))}});qn.install=function(l){l.component("Filter",qn),l.component("FilterField",zt)};const Y2={class:"flex items-center space-x-1 mb-4"},X2=["onClick"],Z2={key:1,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium text-slate-700 dark:text-slate-300"},Ns=e.defineComponent({__name:"CollectionsBreadcrumb",props:{items:{}},emits:["navigate"],setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",Y2,[e.createElementVNode("button",{class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20 hover:bg-blue-100 dark:hover:bg-blue-900/30",onClick:a[0]||(a[0]=n=>t.$emit("navigate","collections"))},[e.createVNode(e.unref(wl),{class:"w-3 h-3"}),e.createTextVNode(" "+e.toDisplayString(t.$t("cms.navigation.collections")),1)]),l.items.length>0?(e.openBlock(),e.createBlock(e.unref(bl),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,(n,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[r<l.items.length-1?(e.openBlock(),e.createElementBlock("button",{key:0,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20 hover:bg-blue-100 dark:hover:bg-blue-900/30",onClick:o=>t.$emit("navigate",n.route)},e.toDisplayString(n.label),9,X2)):(e.openBlock(),e.createElementBlock("span",Z2,e.toDisplayString(n.label),1)),r<l.items.length-1?(e.openBlock(),e.createBlock(e.unref(bl),{key:2,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0)],64))),128))]))}}),Q2={class:"space-y-6 max-w-7xl mx-auto"},J2={class:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},e_={class:"flex items-center gap-2"},t_={class:"text-3xl font-bold text-slate-800 dark:text-white mb-2"},l_=["href","title"],a_={key:0,class:"text-card-foreground shadow-lg border-0 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm"},n_={key:0,class:"p-2 border-b border-gray-200 sm:px-4 sm:py-2 dark:border-gray-700"},r_={class:"flex flex-col gap-4 sm:flex-row"},o_={class:"relative flex items-center gap-2 ml-auto"},s_={key:1,class:"absolute top-full right-1/2 translate-x-1/2 min-w-full p-4 z-10 bg-white border border-gray-300 rounded-md mt-2 dark:bg-slate-800 dark:border-slate-700"},i_={class:"max-h-60 overflow-y-auto overflow-x-hidden"},c_={key:1},vs=e.defineComponent({__name:"ArticlesPage",setup(l){const t=nt.useRoute(),a=nt.useRouter(),n=e.ref(null),r=e.ref(""),{t:o,locale:s}=Fe(),i=e.ref([]),c=e.inject("cms.menu")||[],u=e.ref(""),d=e.ref(1),m=e.ref(!1),h=e.ref(["title","slug","author","publish_at","published_at","status"]),f=e.ref([]),y=e.ref([]),k=e.ref([]),g=e.ref({}),p=e.ref(0),x=e.ref(!1),w=()=>{var F;let I=(F=n.value)==null?void 0:F.columns.filter(T=>{var z;return(z=h==null?void 0:h.value)==null?void 0:z.includes(T.name)});f.value=I.map(T=>{switch(T.name){case"title":return{...T,title:T.name?T.name.charAt(0).toUpperCase()+T.name.slice(1):"--",icon:Il};case"slug":return{...T,title:T.name?T.name.charAt(0).toUpperCase()+T.name.slice(1):"-",icon:Hi};case"author":return{...T,title:T.name?T.name.charAt(0).toUpperCase()+T.name.slice(1):"-",icon:Yi};case"publish_at":return{...T,title:T.name?T.name.charAt(0).toUpperCase()+T.name.slice(1):"-",icon:ua};case"published_at":return{...T,title:T.name?T.name.charAt(0).toUpperCase()+T.name.slice(1):"-",icon:ua};default:return{...T,title:T.name?T.name.charAt(0).toUpperCase()+T.name.slice(1):"-"}}}),m.value=!1},b=e.computed(()=>{var I,F;return(F=(I=c.value)==null?void 0:I.find(T=>T.id===t.params.id))==null?void 0:F.title}),_=e.computed(()=>[{label:b.value||t.params.id,route:`collections/${t.params.id}`}]),V=I=>{I==="collections"?a.push("/collections"):a.push(`/${I}`)},E=()=>{a.push(`/collections/${t.params.id}/create`)},M=async I=>{console.log("handleRemoveArticle"),Ca({title:o("cms.builder.deleteTitle"),message:o("cms.builder.deleteObject"),type:"error",onConfirm:async()=>{await fetch(`/api/cms/${t.params.id}/${I.id}`,{method:"DELETE"}),A()}})},D=I=>{a.push(`/collections/${t.params.id}/${I.id}`)},A=async()=>{if(!x.value){x.value=!0;try{const F=await(await fetch(`/api/cms/${t.params.id}?page=${d.value}&filter=${u.value}`)).json();i.value=F.rows||[],n.value=F;const T=(F.filters||[]).map(z=>{const{extra:Q,title:me,...Ne}=z;return Ne});k.value=T,t.params.id==="pages"&&h.value.push("type"),$(),w()}finally{x.value=!1}}},$=()=>{var F;if(!((F=n.value)!=null&&F.columns))return;const I=n.value.columns.map((T,z)=>({text:T.label,id:T.name}));y.value=[...h.value.map(T=>I.find(z=>z.id===T)).filter(Boolean),...I.filter(T=>!h.value.includes(T.id))]},U=(I,F)=>{if(!F)return!0;const T=F.toLowerCase();return f.value.some(z=>{const Q=I[z.name];return Q&&Q.toString().toLowerCase().includes(T)})},W=I=>{const F=Object.entries(I==null?void 0:I.data).filter(([,z])=>z!=null).map(([z,Q])=>`${z}=${Q}`).join("|");u.value=F;const T={...t.query};F?T.filter=F:delete T.filter,a.replace({query:T})},O=()=>{if(t.query.filter){u.value=t.query.filter;const I=t.query.filter.split("cms.|"),F={};I.forEach(T=>{const[z,Q]=T.split("cms.=");z&&Q&&(F[z]=Q)}),g.value=F}else u.value="",g.value={},p.value++};return e.onMounted(()=>{O(),A()}),e.watch(()=>t.params.id,()=>{g.value={},u.value="",k.value=[];const I={...t.query};delete I.filter,a.replace({query:I}),p.value++,O(),A()}),e.watch(()=>t.query,async()=>{O(),await e.nextTick(),A()},{deep:!0}),e.watch(d,async()=>{t.query.filter||(u.value="",g.value={},p.value++),await e.nextTick(),A()}),(I,F)=>{var T,z,Q;return e.openBlock(),e.createElementBlock("div",Q2,[e.createVNode(Ns,{items:_.value,onNavigate:V},null,8,["items"]),e.createElementVNode("div",J2,[e.createElementVNode("div",e_,[e.createElementVNode("h1",t_,e.toDisplayString(b.value),1),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(s)}/guides/content/`,target:"_blank",title:I.$t("cms.guide.content")},[e.createVNode(e.unref(xl),{class:"w-5 h-5"})],8,l_)]),i.value.length?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:E,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(sl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(I.$t("cms.articles.createArticle")),1)])):e.createCommentVNode("",!0)]),i.value.length||u.value.length?(e.openBlock(),e.createElementBlock("div",a_,[(e.openBlock(),e.createElementBlock("div",n_,[e.createElementVNode("div",r_,[(e.openBlock(),e.createBlock(e.unref(qn),{key:p.value,schema:k.value,history:!0,value:g.value,view:"inline",onChange:W},null,8,["schema","value"])),e.createElementVNode("div",o_,[y.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex items-center gap-2 cursor-pointer text-sm border border-gray-300 rounded-md p-2 dark:text-white",onClick:F[0]||(F[0]=me=>m.value=!m.value)},[e.createElementVNode("p",null,e.toDisplayString(I.$t("cms.articles.showColumns")),1),e.createVNode(e.unref(Cr),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),y.value.length>0&&m.value?(e.openBlock(),e.createElementBlock("div",s_,[e.createElementVNode("div",i_,[y.value.length>0&&m.value?(e.openBlock(),e.createBlock(e.unref(es),{key:0,options:y.value,modelValue:h.value,"onUpdate:modelValue":F[1]||(F[1]=me=>h.value=me)},null,8,["options","modelValue"])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{class:"text-sm bg-blue-600 text-white rounded-md p-2 mt-4 w-full",onClick:w},e.toDisplayString(I.$t("cms.articles.update")),1)])):e.createCommentVNode("",!0)])])])),f.value.length>0?(e.openBlock(),e.createBlock(Ko,{key:1,class:"max-h-[calc(100vh-270px)] overflow-y-auto",rows:i.value,columns:f.value,query:r.value,filterFn:U,onDelete:M,onEdit:D},null,8,["rows","columns","query"])):e.createCommentVNode("",!0),((T=n.value)==null?void 0:T.total)>20?(e.openBlock(),e.createBlock(Yo,{key:2,total:(z=n.value)==null?void 0:z.filtered,count:(Q=n.value)==null?void 0:Q.count,page:d.value,"onUpdate:page":F[2]||(F[2]=me=>d.value=me),limit:20},null,8,["total","count","page"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",c_,[e.createVNode(Wo,{onAction:E})]))])}}}),d_={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},u_={__name:"CreateForm",setup(l){const t=e.inject("cms.fetchContentTypes"),{t:a}=Fe(),n=nt.useRouter(),r=e.ref({}),o=e.ref(!1),s=e.ref({type:"collection"}),i={name:{type:"text",label:a("cms.builder.scheme.name.label"),required:!0,placeholder:a("cms.builder.scheme.name.placeholder"),validators:["required"]},title:{type:"text",label:a("cms.builder.scheme.title.label"),required:!0,placeholder:a("cms.builder.scheme.title.placeholder"),validators:["required"]},type:{type:"combobox",mode:"combo",label:a("cms.builder.scheme.type.label"),required:!0,placeholder:a("cms.builder.scheme.type.placeholder"),validators:["required"],options:[{text:a("cms.builder.scheme.type.options.collection"),id:"collection"},{text:a("cms.builder.scheme.type.options.single"),id:"single"}]},customTable:{type:"switcher",label:a("cms.builder.scheme.customTable.label")}},c=async()=>{if(await r.value.validate()){xe({type:"warning",title:a("cms.common.actions.warning"),message:a("cms.collections.collectionCreationFailed")});return}try{const m=await(await fetch("/api/cms-type",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s.value)})).json();n.push(`/settings/collections/edit/${m.id}`),t(),xe({type:"success",title:a("cms.common.actions.success"),message:a("cms.collections.collectionCreated")})}catch(d){xe({type:"error",title:a("cms.common.actions.error"),message:a("cms.collections.collectionCreationFailed")}),console.error(d)}};return(u,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{onClick:d[0]||(d[0]=m=>o.value=!0),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-105"},[e.createVNode(e.unref(sl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(u.$t("cms.collections.createCollection")),1)]),e.createVNode(e.unref(Jt),{teleport:"#modal",visible:o.value,title:u.$t("cms.collections.createCollection"),onClose:d[4]||(d[4]=m=>o.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",d_,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:d[3]||(d[3]=m=>o.value=!1)},e.toDisplayString(u.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Xe),{form:r.value,"onUpdate:form":d[1]||(d[1]=m=>r.value=m),modelValue:s.value,"onUpdate:modelValue":d[2]||(d[2]=m=>s.value=m),schema:i},null,8,["form","modelValue"])]),_:1},8,["visible","title"])]))}};let m_;function p_(){return m_}e.version[0];function f_(l){return typeof l=="function"?l():e.unref(l)}function Gn(l){if(l instanceof Promise||l instanceof Date||l instanceof RegExp)return l;const t=f_(l);if(!l||!t)return t;if(Array.isArray(t))return t.map(a=>Gn(a));if(typeof t=="object"){const a={};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(n==="titleTemplate"||n[0]==="o"&&n[1]==="n"){a[n]=e.unref(t[n]);continue}a[n]=Gn(t[n])}return a}return t}const h_="usehead",Bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ss="__unhead_injection_handler__";function g_(){if(Ss in Bs)return Bs[Ss]();const l=e.inject(h_);return!l&&process.env.NODE_ENV!=="production"&&console.warn("Unhead is missing Vue context, falling back to shared context. This may have unexpected results."),l||p_()}function y_(l,t={}){const a=t.head||g_();if(a)return a.ssr?a.push(l,t):b_(a,l,t)}function b_(l,t,a={}){const n=e.ref(!1),r=e.ref({});e.watchEffect(()=>{r.value=n.value?{}:Gn(t)});const o=l.push(r.value,a);return e.watch(r,i=>{o.patch(i)}),e.getCurrentInstance()&&(e.onBeforeUnmount(()=>{o.dispose()}),e.onDeactivated(()=>{n.value=!0}),e.onActivated(()=>{n.value=!1})),o}function k_(l,t=300){const a=e.ref(l.value);let n;return e.watch(l,r=>{clearTimeout(n),n=setTimeout(()=>{a.value=r},t)},{immediate:!0}),a}const tl=(l,t)=>{const a=l.__vccOpts||l;for(const[n,r]of t)a[n]=r;return a},x_={},w_={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"};function __(l,t){return e.openBlock(),e.createElementBlock("svg",w_,[...t[0]||(t[0]=[e.createStaticVNode('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>',6)])])}const E_=tl(x_,[["render",__]]),C_={},V_={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"};function N_(l,t){return e.openBlock(),e.createElementBlock("svg",V_,[...t[0]||(t[0]=[e.createStaticVNode('<rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M3 9h18"></path><path d="M3 15h18"></path><path d="M9 3v18"></path><path d="M15 3v18"></path>',5)])])}const v_=tl(C_,[["render",N_]]),B_={class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6 pb-6"},S_={class:"flex items-center gap-2 space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},D_={class:"line-clamp-1 tracking-tight text-lg font-semibold text-slate-800 dark:text-slate-100 vertical-center"},A_={class:"w-full flex flex-col gap-2 p-6"},M_=["title"],T_={class:"flex items-center justify-between gap-2"},L_={class:"text-sm text-slate-600 dark:text-slate-400"},$_={class:"font-semibold text-slate-800 dark:text-slate-100"},F_={class:"flex items-center justify-between gap-2"},I_={class:"text-sm text-slate-500 dark:text-slate-400"},O_={class:"font-semibold text-slate-800 dark:text-slate-100"},P_={class:"flex items-center justify-between gap-2"},R_={class:"text-sm text-slate-500 dark:text-slate-400"},j_={class:"text-sm text-slate-600 dark:text-slate-300"},U_={class:"flex items-center justify-between gap-2 mt-6"},z_=["onClick"],H_={class:"text-slate-800 dark:text-slate-200 group-hover:text-green-600 dark:group-hover:text-blue-50"},q_=["onClick"],G_=["onClick"],W_=e.defineComponent({__name:"CollectionsGrid",props:{collections:{},onEdit:{type:Function},onView:{type:Function},onDelete:{type:Function}},emits:["edit","view","delete"],setup(l,{emit:t}){e.ref(!1),e.ref(null);const a=l,n=t,r=(i,c)=>{switch(i){case"edit":n("edit",c),a.onEdit&&a.onEdit(c);break;case"view":n("view",c),a.onView&&a.onView(c);break;case"delete":n("delete",c),a.onDelete&&a.onDelete(c);break}},o=i=>{const c=new Date,u=new Date(i),d=c.getTime()-u.getTime(),m=Math.floor(d/1e3),h=Math.floor(m/60),f=Math.floor(h/60),y=Math.floor(f/24),k=Math.floor(y/7);return k>=2?`${k} weeks ago`:k===1?"1 week ago":y>=2?`${y} days ago`:y===1?"1 day ago":f>=2?`${f} hours ago`:f===1?"1 hour ago":h>=2?`${h} minutes ago`:h===1?"1 minute ago":"just now"},s=i=>{switch(i){case"published":return{icon:_r,text:"Published",classes:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 border-green-200 dark:border-green-700"};case"draft":return{icon:_l,text:"Draft",classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"};case"archived":return{icon:Ar,text:"Archived",classes:"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300 border-gray-200 dark:border-gray-700"};default:return{icon:xl,text:"--",classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"}}};return(i,c)=>(e.openBlock(),e.createElementBlock("div",B_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.collections,u=>{var d,m,h;return e.openBlock(),e.createElementBlock("div",{key:u.id,class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:bg-slate-50"},[e.createElementVNode("div",S_,[u.type==="single"?(e.openBlock(),e.createBlock(e.unref(kl),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(e.openBlock(),e.createBlock(e.unref(wl),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),e.createElementVNode("p",D_,e.toDisplayString(u.title),1),s(u.status)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["whitespace-nowrap rounded-md border ml-auto px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700",(d=s(u.status))==null?void 0:d.classes])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((m=s(u.status))==null?void 0:m.icon),{class:"w-3 h-3 mr-1"})),e.createTextVNode(" "+e.toDisplayString((h=s(u.status))==null?void 0:h.text),1)],2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",A_,[e.createElementVNode("p",{class:"text-slate-600 dark:text-slate-300 mb-4 line-clamp-2",title:u.description},e.toDisplayString(u.description!==null?u.description:"No description"),9,M_),e.createElementVNode("div",T_,[e.createElementVNode("p",L_,e.toDisplayString(i.$t("cms.collections.entries"))+":",1),e.createElementVNode("p",$_,e.toDisplayString(u.entries),1)]),e.createElementVNode("div",F_,[e.createElementVNode("p",I_,e.toDisplayString(i.$t("cms.collections.fields"))+":",1),e.createElementVNode("p",O_,e.toDisplayString(u.fields),1)]),e.createElementVNode("div",P_,[e.createElementVNode("p",R_,e.toDisplayString(i.$t("cms.collections.lastModified"))+":",1),e.createElementVNode("p",j_,e.toDisplayString(o(u.last_edit)),1)]),e.createElementVNode("div",U_,[e.renderSlot(i.$slots,"actions",{collection:u,handleAction:r},()=>[e.createElementVNode("button",{class:"inline-flex gap-1 items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-4/5 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-green-50 hover:border-green-300",onClick:e.withModifiers(f=>r("edit",u),["stop"])},[e.createVNode(e.unref(_l),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-green-600 dark:group-hover:text-blue-50"}),e.createElementVNode("span",H_,e.toDisplayString(i.$t("cms.common.actions.edit")),1)],8,z_),e.createElementVNode("button",{class:e.normalizeClass([u.id==="pages"?"disabled":"","inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-red-50 hover:border-red-300"]),onClick:e.withModifiers(f=>u.id==="pages"?null:r("delete",u),["stop"])},[e.createVNode(e.unref(Kt),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-red-600 dark:group-hover:text-blue-50"})],10,q_),e.createElementVNode("button",{class:e.normalizeClass([u.type==="single"?"disabled cursor-not-allowed":"","inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-blue-50 hover:border-blue-300"]),onClick:e.withModifiers(f=>u.type==="single"?null:r("view",u),["stop"])},[e.createVNode(e.unref(pa),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-blue-600 dark:group-hover:text-blue-50"})],10,G_)])])])])}),128))]))}}),Wn=localStorage.getItem("collectionView"),Aa=e.ref(Wn==="list"||Wn==="grid"?Wn:"list");e.watch(Aa,l=>{localStorage.setItem("collectionView",l)});function K_(){Aa.value=Aa.value==="grid"?"list":"grid"}function Y_(){return{collectionView:Aa,toggleCollectionView:K_}}const X_={class:"space-y-6 max-w-7xl mx-auto"},Z_={class:"flex items-center justify-between mb-8"},Q_={class:"flex gap-4"},J_={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},eE={class:"text-slate-600 dark:text-slate-300"},tE=["href","title"],lE={class:"flex items-center gap-3"},aE={class:"relative"},nE={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},rE=["placeholder"],oE={class:"flex items-center bg-white dark:bg-slate-700 border border-slate-200 dark:border-slate-600 rounded-lg p-1 max-w-[fit-content]"},sE=["onClick"],iE=e.defineComponent({__name:"BuilderPage",setup(l){const{t,locale:a}=Fe(),n=nt.useRouter(),r=[{name:"name",title:t("cms.builder.collectionName"),type:"text",icon:wl},{name:"title",title:t("cms.builder.title"),type:"text",icon:wl},{name:"description",title:t("cms.common.description"),type:"text"},{name:"entries",title:t("cms.builder.entries"),type:"number"},{name:"fields",title:t("cms.builder.fields"),type:"number"},{name:"status",title:t("cms.builder.status"),type:"text"},{name:"last_edit",title:t("cms.builder.lastModified"),type:"date"}],o=e.ref(""),s=k_(o,300);y_({title:()=>t("cms.collections.title")+" | CMS"});const i=e.ref([]),c=e.inject("fetchContentTypes"),u=e.ref(1),d=e.ref(16),m=e.ref(null),{collectionView:h,toggleCollectionView:f}=Y_();async function y(){try{const w=s.value?`&search=${encodeURIComponent(String(s.value))}`:"",b=`/api/cms-type?page=${u.value}&limit=${d.value}${w}`;console.log("Fetching collections with URL:",b);const _=await fetch(b);if(!_.ok)throw new Error("Failed to fetch collections");const V=await _.json();console.log("Collections fetched:",V),i.value=V.rows,m.value=V}catch(w){console.error("Error fetching collections:",w)}}e.onMounted(()=>{y()});const k=e.computed(()=>[...i.value].sort((b,_)=>b.id==="pages"?-1:_.id==="pages"?1:0)),g=async w=>{try{await fetch(`/api/cms-type/${w.id}`,{method:"DELETE"}),y(),c()}catch(b){console.error("Error deleting collection:",b)}},p=w=>{n.push(`/settings/collections/edit/${w.id||w.name}`)},x=w=>{w.type==="single"?n.push(`/collections/single/${w.name}`):n.push(`/collections/${w.name}`)};return e.watch(u,()=>{y()}),e.watch(s,w=>{console.log("Search query changed:",w),u.value=1,y()}),(w,b)=>{var _,V,E,M;return e.openBlock(),e.createElementBlock("div",X_,[e.createElementVNode("div",Z_,[e.createElementVNode("div",Q_,[e.createElementVNode("div",null,[e.createElementVNode("h1",J_,e.toDisplayString(w.$t("cms.builder.collections")),1),e.createElementVNode("p",eE,e.toDisplayString(w.$t("cms.builder.manageContentCollections")),1)]),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(a)}/guides/collections/`,target:"_blank",title:w.$t("cms.guide.collections"),class:"mt-2"},[e.createVNode(e.unref(xl),{class:"w-5 h-5"})],8,tE)]),e.createElementVNode("div",lE,[e.createElementVNode("div",aE,[e.createElementVNode("div",nE,[e.createVNode(e.unref(ln),{class:"w-5 h-5 text-gray-400"})]),e.withDirectives(e.createElementVNode("input",{type:"text",class:"block w-full py-2 pl-10 pr-3 leading-5 text-gray-900 placeholder-gray-500 transition-colors bg-white border border-gray-300 rounded-md dark:border-gray-600 dark:bg-gray-700 dark:placeholder-gray-400 focus:outline-none focus:ring-sky-500 focus:border-sky-500 dark:text-white sm:text-sm",placeholder:w.$t("cms.builder.searchCollections"),"onUpdate:modelValue":b[0]||(b[0]=D=>o.value=D)},null,8,rE),[[e.vModelText,o.value]])]),e.createElementVNode("div",oE,[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors rounded-md text-xs h-8 w-8 p-0 hover:bg-blue-700 hover:text-white cursor-pointer",{"bg-blue-600 text-white":e.unref(h)==="list"}]),onClick:b[1]||(b[1]=D=>h.value="list")},[e.createVNode(E_,{class:"dark:text-blue-50 w-4 h-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors rounded-md text-xs h-8 w-8 p-0 hover:bg-blue-700 hover:text-white cursor-pointer",{"bg-blue-600 text-white":e.unref(h)==="grid"}]),onClick:b[2]||(b[2]=D=>h.value="grid")},[e.createVNode(v_,{class:"dark:text-blue-50 w-4 h-4"})],2)]),e.createVNode(u_)])]),e.createElementVNode("div",null,[e.unref(h)==="list"?(e.openBlock(),e.createBlock(Ko,{key:0,class:"max-h-[calc(100vh-270px)] overflow-y-auto overflow-x-hidden",columns:r,rows:k.value,onDelete:g,onEdit:p,onView:x},{actions:e.withCtx(({row:D})=>[e.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-blue-50 hover:border-blue-300 hover:text-blue-600",onClick:A=>x(D)},[e.createVNode(e.unref(pa),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-blue-600 dark:group-hover:text-blue-50"})],8,sE)]),_:1},8,["rows"])):e.createCommentVNode("",!0),e.unref(h)==="grid"?(e.openBlock(),e.createBlock(W_,{key:1,collections:k.value,onEdit:p,onView:x,onDelete:g,class:"max-h-[calc(100vh-270px)] overflow-y-auto overflow-x-hidden"},null,8,["collections"])):e.createCommentVNode("",!0),((_=m.value)==null?void 0:_.total)>16?(e.openBlock(),e.createBlock(Yo,{key:2,total:(V=m.value)==null?void 0:V.filtered,count:((E=m.value)==null?void 0:E.count)||((M=m.value)==null?void 0:M.total),page:u.value,"onUpdate:page":b[3]||(b[3]=D=>u.value=D),limit:d.value},null,8,["total","count","page","limit"])):e.createCommentVNode("",!0)])])}}});async function cE(){if(window.monaco)return window.monaco;const l="https://cdn.jsdelivr.net/npm/monaco-editor@0.45.0/min";return window.require||(window.require={paths:{vs:`${l}/vs`}},await new Promise((t,a)=>{const n=document.createElement("script");n.src=`${l}/vs/loader.min.js`,n.onload=()=>t(),n.onerror=a,document.head.appendChild(n)})),new Promise(t=>{window.require(["vs/editor/editor.main"],()=>t(window.monaco))})}const dE=e.defineComponent({__name:"MonacoEditor",props:e.mergeModels({language:{default:"javascript"},theme:{default:"vs-dark"},width:{default:"100%"},height:{default:"100%"},options:{default:()=>({minimap:{enabled:!1}})}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref(null);let r=null,o=null;return e.onMounted(async()=>{var s;if(n.value)try{o=await cE();const i=((s=a.value)==null?void 0:s.replace(/\\n/g,`
231
+ `))||"";r=o.editor.create(n.value,{value:i,language:t.language,theme:t.theme,automaticLayout:!0,...t.options}),r.onDidChangeModelContent(()=>{const c=(r==null?void 0:r.getValue())||"";a.value=c})}catch(i){console.error("Failed to load Monaco Editor:",i)}}),e.watch(()=>a.value,s=>{if(r){const i=(s==null?void 0:s.replace(/\\n/g,`
232
+ `))||"";i!==r.getValue()&&r.setValue(i)}},{immediate:!0}),e.watch(()=>t.language,s=>{r&&s&&o&&o.editor.setModelLanguage(r.getModel(),s)}),e.watch(()=>t.theme,s=>{r&&s&&o&&o.editor.setTheme(s)}),e.onBeforeUnmount(()=>{r&&(r.dispose(),r=null)}),(s,i)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"editorContainer",ref:n,style:e.normalizeStyle({width:l.width,height:l.height})},null,4))}}),uE={__name:"vs-builder-monaco",props:{yaml:{type:String,default:""},yamlModifiers:{}},emits:["update:yaml"],setup(l){const t=e.ref("");e.useModel(l,"yaml");const a=e.ref(null);return e.onMounted(()=>{a.value=Math.random().toString(36).substring(2,15)}),(n,r)=>a.value?(e.openBlock(),e.createElementBlock("div",{key:a.value},[e.createVNode(dE,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),language:"yaml",theme:"vs-light",height:"calc(100vh - 200px)",width:"100%",options:{minimap:{enabled:!1}}},null,8,["modelValue"])])):e.createCommentVNode("",!0)}},pl=(l=0,t)=>({name:{type:"text",label:t("cms.builder.fieldLabels.name"),required:!0,placeholder:t("cms.builder.fieldPlaceholders.name"),validators:["required"]},label:{type:"text",label:t("cms.builder.fieldLabels.label"),required:!0,placeholder:t("cms.builder.fieldPlaceholders.label"),validators:["required"]},placeholder:{type:"text",label:t("cms.builder.fieldLabels.placeholder"),required:!0,placeholder:t("cms.builder.fieldPlaceholders.placeholder")},help:{type:"text",label:t("cms.builder.fieldLabels.help"),placeholder:t("cms.builder.fieldPlaceholders.help")},type:{type:"combobox",mode:"combo",label:t("cms.builder.fieldLabels.type"),required:!0,maxHeight:"300",slots:{option:'<div class="flex items-center gap-2 p-2 py-1 rounded hover:bg-gray-100" :class="{ \'bg-gray-100\': selectedNavIndex === ind, \'bg-gray-100\': modelValue == ind }" ><div :class="`flex items-center gap-2 p-1 bg-${color }-100 rounded`"><component :is="`icon-${id}`" class="block" height="24" width="30" /></div><span class="text-sm text-gray-700">{{ text }}</span></div>'},options:[{text:t("cms.builder.fieldOptions.text"),id:"text",color:"blue"},{text:t("cms.builder.fieldOptions.number"),id:"number",color:"green"},{text:t("cms.builder.fieldOptions.date"),id:"date",color:"red"},{text:t("cms.builder.fieldOptions.datetime"),id:"datetime",color:"purple"},{text:t("cms.builder.fieldOptions.file"),id:"file",color:"yellow"},{text:t("cms.builder.fieldOptions.select"),id:"select",color:"yellow"},{text:t("cms.builder.fieldOptions.multiselect"),id:"multiselect",color:"blue"},{text:t("cms.builder.fieldOptions.mediaselect"),id:"mediaselect",color:"orange"},{text:t("cms.builder.fieldOptions.radio"),id:"radio",color:"blue"},{text:t("cms.builder.fieldOptions.boolean"),id:"boolean",color:"red"},{text:t("cms.builder.fieldOptions.datalist"),id:"datalist",color:"orange"},{text:t("cms.builder.fieldOptions.image"),id:"image",color:"blue"},{text:t("cms.builder.fieldOptions.slug"),id:"slug",color:"green"},{text:t("cms.builder.fieldOptions.richtext"),id:"richtext",color:"red"},{text:t("cms.builder.fieldOptions.reference"),id:"reference",color:"yellow"},{text:t("cms.builder.fieldOptions.relation"),id:"relation",color:"pink"},{text:t("cms.builder.fieldOptions.fileList"),id:"FileList",color:"orange"},{text:t("cms.builder.fieldOptions.tags"),id:"tags",color:"blue"}].filter(a=>l>1?a.id!=="datalist":!0),validators:["required"]},subtype:{type:"combobox",mode:"combo",label:t("cms.builder.fieldLabels.subtype"),placeholder:t("cms.builder.fieldPlaceholders.subtype"),options:[{text:t("cms.builder.fieldOptions.text"),id:"text"},{text:t("cms.builder.fieldOptions.number"),id:"number"},{text:t("cms.builder.fieldOptions.date"),id:"date"},{text:t("cms.builder.fieldOptions.datetime"),id:"datetime"}],conditions:["type","==","array"]},parent:{type:"text",label:t("cms.builder.fieldLabels.parent"),placeholder:t("cms.builder.fieldPlaceholders.parent"),conditions:["type","in",["slug","select","multiselect"]]},data:{type:"text",label:t("cms.builder.fieldLabels.data"),placeholder:t("cms.builder.fieldPlaceholders.data"),conditions:["type","in",["select","multiselect"]]},options:{type:"datalist",label:t("cms.builder.fieldLabels.options"),conditions:["type","in",["select","multiselect","radio"]],colModel:[{key:"id",ua:"ID",type:"text",validators:["required"],col:6},{key:"text",ua:"Text",type:"text",validators:["required"],col:6}]},colModel:l<=1?{type:"datalist",label:t("cms.builder.fieldLabels.colModel"),conditions:["type","==","datalist"],colModel:Object.entries(pl(l+1,t)).map(([a,n])=>({key:a,...n,ua:(n==null?void 0:n.label)||(n==null?void 0:n.ua)}))}:{type:"switcher",label:t("cms.builder.fieldLabels.required"),hidden:!0,required:!0},multiple:{type:"switcher",label:t("cms.builder.fieldLabels.multiple"),conditions:["type","==","file"]},relation:{type:"combobox",data:"collection",label:t("cms.builder.fieldLabels.relation"),conditions:["type","==","relation"]},required:{type:"switcher",label:t("cms.builder.fieldLabels.required"),required:!0},localization:{type:"switcher",label:t("cms.builder.fieldLabels.localization"),conditions:["type","in",["richtext","text","reference","multiselect","datalist"]],required:!0}}),mE={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},pE={__name:"vs-builder-datatable-form",props:{modelValue:{type:Array,default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(l){const{t}=Fe();$e["vs-input-datalist"]=$e.VsInputDatatable;const a=e.useModel(l,"modelValue"),n=e.ref(!1),r=e.ref({}),o=e.ref({}),s=e.computed(()=>(o.value,pl(0,t))),i=async()=>{if(await r.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.createFieldFailed")});return}try{a.value=[...a.value,o.value],o.value={},n.value=!1}catch(u){console.log(u)}};return(c,u)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{onClick:u[0]||(u[0]=d=>n.value=!0),class:"inline-flex items-center justify-center h-10 gap-2 px-4 py-2 text-sm font-medium transition-colors border rounded-md hover hover:bg-gray-200 whitespace-nowrap ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring 0"},[e.createVNode(e.unref(sl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(c.$t("cms.common.actions.addField")),1)]),e.createVNode(e.unref(Jt),{teleport:"#modal",title:c.$t("cms.builder.createField"),size:"small",visible:n.value,"onUpdate:visible":u[4]||(u[4]=d=>n.value=d),onClose:u[5]||(u[5]=d=>n.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",mE,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:u[3]||(u[3]=d=>n.value=!1)},e.toDisplayString(c.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:i,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(c.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Xe),{modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=d=>o.value=d),schema:s.value,form:r.value,"onUpdate:form":u[2]||(u[2]=d=>r.value=d)},null,8,["modelValue","schema","form"])]),_:1},8,["title","visible"])]))}},fE={class:"flex items-center justify-end col-span-3 gap-2"},hE={key:2,class:"w-8 h-4"},gE={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},yE={__name:"vs-builder-datatable-controls",props:e.mergeModels({index:{type:Number,required:!0},data:{type:Object,required:!0}},{columns:{type:Array,default:()=>[]},columnsModifiers:{}}),emits:["update:columns"],setup(l){const{t}=Fe(),a=l,n=e.useModel(l,"columns"),r=e.ref(!1),o=e.ref({}),s=e.ref({...a.data||{}}),i=e.ref({});e.onMounted(()=>{a.data.required?i.value={...pl(0,t),name:{...pl(0,t).name,disabled:!0},label:{...pl(0,t).label,disabled:!0},type:{...pl(0,t).type,disabled:!0}}:i.value=pl(0,t)});const c=()=>{Ca({title:t("cms.builder.deleteTitle"),message:t("cms.builder.deleteField"),type:"error",onConfirm:()=>{u()}})},u=()=>{n.value=n.value.filter((m,h)=>h!==a.index)},d=async()=>{if(await o.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}try{n.value[a.index]=s.value,r.value=!1}catch(h){console.log(h)}};return(m,h)=>(e.openBlock(),e.createElementBlock("div",fE,[["status"].includes(l.data.name)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,onClick:h[0]||(h[0]=f=>r.value=!0),class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground h-8 w-8 rounded-full hover:bg-gray-100"},[e.createVNode(e.unref(_l),{class:"w-4 h-4"})])),l.data.required?(e.openBlock(),e.createElementBlock("button",hE)):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:c,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 h-8 w-8 rounded-full hover:bg-red-100 text-red-600 hover:text-red-700"},[e.createVNode(e.unref(Ki),{class:"w-4 h-4"})])),e.createVNode(e.unref(Jt),{teleport:"#modal",visible:r.value,title:m.$t("cms.builder.editField"),onClose:h[4]||(h[4]=f=>r.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",gE,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:h[3]||(h[3]=f=>r.value=!1)},e.toDisplayString(m.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:d},e.toDisplayString(m.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Xe),{modelValue:s.value,"onUpdate:modelValue":h[1]||(h[1]=f=>s.value=f),schema:i.value,form:o.value,"onUpdate:form":h[2]||(h[2]=f=>o.value=f)},null,8,["modelValue","schema","form"])]),_:1},8,["visible","title"])]))}};/**!
232
233
  * Sortable 1.14.0
233
234
  * @author RubaXa <trash@rubaxa.org>
234
235
  * @author owenm <owen23355@gmail.com>
235
236
  * @license MIT
236
- */function Bs(l,t){var a=Object.keys(l);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(l);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(l,n).enumerable})),a.push.apply(a,r)}return a}function Tt(l){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Bs(Object(a),!0).forEach(function(r){J_(l,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(a)):Bs(Object(a)).forEach(function(r){Object.defineProperty(l,r,Object.getOwnPropertyDescriptor(a,r))})}return l}function Aa(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Aa=function(t){return typeof t}:Aa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Aa(l)}function J_(l,t,a){return t in l?Object.defineProperty(l,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[t]=a,l}function jt(){return jt=Object.assign||function(l){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(l[r]=a[r])}return l},jt.apply(this,arguments)}function eE(l,t){if(l==null)return{};var a={},r=Object.keys(l),n,o;for(o=0;o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&(a[n]=l[n]);return a}function tE(l,t){if(l==null)return{};var a=eE(l,t),r,n;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(l);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(l,r)&&(a[r]=l[r])}return a}var lE="1.14.0";function zt(l){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(l)}var Ht=zt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Kl=zt(/Edge/i),Ss=zt(/firefox/i),Yl=zt(/safari/i)&&!zt(/chrome/i)&&!zt(/android/i),Ds=zt(/iP(ad|od|hone)/i),aE=zt(/chrome/i)&&zt(/android/i),As={capture:!1,passive:!1};function ve(l,t,a){l.addEventListener(t,a,!Ht&&As)}function Ve(l,t,a){l.removeEventListener(t,a,!Ht&&As)}function Ma(l,t){if(t){if(t[0]===">"&&(t=t.substring(1)),l)try{if(l.matches)return l.matches(t);if(l.msMatchesSelector)return l.msMatchesSelector(t);if(l.webkitMatchesSelector)return l.webkitMatchesSelector(t)}catch{return!1}return!1}}function rE(l){return l.host&&l!==document&&l.host.nodeType?l.host:l.parentNode}function Lt(l,t,a,r){if(l){a=a||document;do{if(t!=null&&(t[0]===">"?l.parentNode===a&&Ma(l,t):Ma(l,t))||r&&l===a)return l;if(l===a)break}while(l=rE(l))}return null}var Ms=/\s+/g;function ht(l,t,a){if(l&&t)if(l.classList)l.classList[a?"add":"remove"](t);else{var r=(" "+l.className+" ").replace(Ms," ").replace(" "+t+" "," ");l.className=(r+(a?" "+t:"")).replace(Ms," ")}}function se(l,t,a){var r=l&&l.style;if(r){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(l,""):l.currentStyle&&(a=l.currentStyle),t===void 0?a:a[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=a+(typeof a=="string"?"":"px")}}function Bl(l,t){var a="";if(typeof l=="string")a=l;else do{var r=se(l,"transform");r&&r!=="none"&&(a=r+" "+a)}while(!t&&(l=l.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(a)}function Ts(l,t,a){if(l){var r=l.getElementsByTagName(t),n=0,o=r.length;if(a)for(;n<o;n++)a(r[n],n);return r}return[]}function $t(){var l=document.scrollingElement;return l||document.documentElement}function We(l,t,a,r,n){if(!(!l.getBoundingClientRect&&l!==window)){var o,s,i,c,u,d,m;if(l!==window&&l.parentNode&&l!==$t()?(o=l.getBoundingClientRect(),s=o.top,i=o.left,c=o.bottom,u=o.right,d=o.height,m=o.width):(s=0,i=0,c=window.innerHeight,u=window.innerWidth,d=window.innerHeight,m=window.innerWidth),(t||a)&&l!==window&&(n=n||l.parentNode,!Ht))do if(n&&n.getBoundingClientRect&&(se(n,"transform")!=="none"||a&&se(n,"position")!=="static")){var f=n.getBoundingClientRect();s-=f.top+parseInt(se(n,"border-top-width")),i-=f.left+parseInt(se(n,"border-left-width")),c=s+o.height,u=i+o.width;break}while(n=n.parentNode);if(r&&l!==window){var p=Bl(n||l),y=p&&p.a,h=p&&p.d;p&&(s/=h,i/=y,m/=y,d/=h,c=s+d,u=i+m)}return{top:s,left:i,bottom:c,right:u,width:m,height:d}}}function Ls(l,t,a){for(var r=Jt(l,!0),n=We(l)[t];r;){var o=We(r)[a],s=void 0;if(s=n>=o,!s)return r;if(r===$t())break;r=Jt(r,!1)}return!1}function Sl(l,t,a,r){for(var n=0,o=0,s=l.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==ie.ghost&&(r||s[o]!==ie.dragged)&&Lt(s[o],a.draggable,l,!1)){if(n===t)return s[o];n++}o++}return null}function Gr(l,t){for(var a=l.lastElementChild;a&&(a===ie.ghost||se(a,"display")==="none"||t&&!Ma(a,t));)a=a.previousElementSibling;return a||null}function _t(l,t){var a=0;if(!l||!l.parentNode)return-1;for(;l=l.previousElementSibling;)l.nodeName.toUpperCase()!=="TEMPLATE"&&l!==ie.clone&&(!t||Ma(l,t))&&a++;return a}function $s(l){var t=0,a=0,r=$t();if(l)do{var n=Bl(l),o=n.a,s=n.d;t+=l.scrollLeft*o,a+=l.scrollTop*s}while(l!==r&&(l=l.parentNode));return[t,a]}function nE(l,t){for(var a in l)if(l.hasOwnProperty(a)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===l[a][r])return Number(a)}return-1}function Jt(l,t){if(!l||!l.getBoundingClientRect)return $t();var a=l,r=!1;do if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var n=se(a);if(a.clientWidth<a.scrollWidth&&(n.overflowX=="auto"||n.overflowX=="scroll")||a.clientHeight<a.scrollHeight&&(n.overflowY=="auto"||n.overflowY=="scroll")){if(!a.getBoundingClientRect||a===document.body)return $t();if(r||t)return a;r=!0}}while(a=a.parentNode);return $t()}function oE(l,t){if(l&&t)for(var a in t)t.hasOwnProperty(a)&&(l[a]=t[a]);return l}function Wr(l,t){return Math.round(l.top)===Math.round(t.top)&&Math.round(l.left)===Math.round(t.left)&&Math.round(l.height)===Math.round(t.height)&&Math.round(l.width)===Math.round(t.width)}var Xl;function Fs(l,t){return function(){if(!Xl){var a=arguments,r=this;a.length===1?l.call(r,a[0]):l.apply(r,a),Xl=setTimeout(function(){Xl=void 0},t)}}}function sE(){clearTimeout(Xl),Xl=void 0}function Is(l,t,a){l.scrollLeft+=t,l.scrollTop+=a}function Os(l){var t=window.Polymer,a=window.jQuery||window.Zepto;return t&&t.dom?t.dom(l).cloneNode(!0):a?a(l).clone(!0)[0]:l.cloneNode(!0)}var gt="Sortable"+new Date().getTime();function iE(){var l=[],t;return{captureAnimationState:function(){if(l=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(n){if(!(se(n,"display")==="none"||n===ie.ghost)){l.push({target:n,rect:We(n)});var o=Tt({},l[l.length-1].rect);if(n.thisAnimationDuration){var s=Bl(n,!0);s&&(o.top-=s.f,o.left-=s.e)}n.fromRect=o}})}},addAnimationState:function(r){l.push(r)},removeAnimationState:function(r){l.splice(nE(l,{target:r}),1)},animateAll:function(r){var n=this;if(!this.options.animation){clearTimeout(t),typeof r=="function"&&r();return}var o=!1,s=0;l.forEach(function(i){var c=0,u=i.target,d=u.fromRect,m=We(u),f=u.prevFromRect,p=u.prevToRect,y=i.rect,h=Bl(u,!0);h&&(m.top-=h.f,m.left-=h.e),u.toRect=m,u.thisAnimationDuration&&Wr(f,m)&&!Wr(d,m)&&(y.top-m.top)/(y.left-m.left)===(d.top-m.top)/(d.left-m.left)&&(c=dE(y,f,p,n.options)),Wr(m,d)||(u.prevFromRect=d,u.prevToRect=m,c||(c=n.options.animation),n.animate(u,y,m,c)),c&&(o=!0,s=Math.max(s,c),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},c),u.thisAnimationDuration=c)}),clearTimeout(t),o?t=setTimeout(function(){typeof r=="function"&&r()},s):typeof r=="function"&&r(),l=[]},animate:function(r,n,o,s){if(s){se(r,"transition",""),se(r,"transform","");var i=Bl(this.el),c=i&&i.a,u=i&&i.d,d=(n.left-o.left)/(c||1),m=(n.top-o.top)/(u||1);r.animatingX=!!d,r.animatingY=!!m,se(r,"transform","translate3d("+d+"px,"+m+"px,0)"),this.forRepaintDummy=cE(r),se(r,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),se(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){se(r,"transition",""),se(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},s)}}}}function cE(l){return l.offsetWidth}function dE(l,t,a,r){return Math.sqrt(Math.pow(t.top-l.top,2)+Math.pow(t.left-l.left,2))/Math.sqrt(Math.pow(t.top-a.top,2)+Math.pow(t.left-a.left,2))*r.animation}var Dl=[],Kr={initializeByDefault:!0},Zl={mount:function(t){for(var a in Kr)Kr.hasOwnProperty(a)&&!(a in t)&&(t[a]=Kr[a]);Dl.forEach(function(r){if(r.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Dl.push(t)},pluginEvent:function(t,a,r){var n=this;this.eventCanceled=!1,r.cancel=function(){n.eventCanceled=!0};var o=t+"Global";Dl.forEach(function(s){a[s.pluginName]&&(a[s.pluginName][o]&&a[s.pluginName][o](Tt({sortable:a},r)),a.options[s.pluginName]&&a[s.pluginName][t]&&a[s.pluginName][t](Tt({sortable:a},r)))})},initializePlugins:function(t,a,r,n){Dl.forEach(function(i){var c=i.pluginName;if(!(!t.options[c]&&!i.initializeByDefault)){var u=new i(t,a,t.options);u.sortable=t,u.options=t.options,t[c]=u,jt(r,u.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var s=this.modifyOption(t,o,t.options[o]);typeof s<"u"&&(t.options[o]=s)}},getEventProperties:function(t,a){var r={};return Dl.forEach(function(n){typeof n.eventProperties=="function"&&jt(r,n.eventProperties.call(a[n.pluginName],t))}),r},modifyOption:function(t,a,r){var n;return Dl.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[a]=="function"&&(n=o.optionListeners[a].call(t[o.pluginName],r))}),n}};function uE(l){var t=l.sortable,a=l.rootEl,r=l.name,n=l.targetEl,o=l.cloneEl,s=l.toEl,i=l.fromEl,c=l.oldIndex,u=l.newIndex,d=l.oldDraggableIndex,m=l.newDraggableIndex,f=l.originalEvent,p=l.putSortable,y=l.extraEventProperties;if(t=t||a&&a[gt],!!t){var h,g=t.options,b="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Ht&&!Kl?h=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(h=document.createEvent("Event"),h.initEvent(r,!0,!0)),h.to=s||a,h.from=i||a,h.item=n||a,h.clone=o,h.oldIndex=c,h.newIndex=u,h.oldDraggableIndex=d,h.newDraggableIndex=m,h.originalEvent=f,h.pullMode=p?p.lastPutMode:void 0;var w=Tt(Tt({},y),Zl.getEventProperties(r,t));for(var x in w)h[x]=w[x];a&&a.dispatchEvent(h),g[b]&&g[b].call(t,h)}}var mE=["evt"],dt=function(t,a){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.evt,o=tE(r,mE);Zl.pluginEvent.bind(ie)(t,a,Tt({dragEl:X,parentEl:Ue,ghostEl:pe,rootEl:Ie,nextEl:pl,lastDownEl:Ta,cloneEl:je,cloneHidden:el,dragStarted:Jl,putSortable:Qe,activeSortable:ie.active,originalEvent:n,oldIndex:Al,oldDraggableIndex:Ql,newIndex:bt,newDraggableIndex:tl,hideGhostForTarget:qs,unhideGhostForTarget:Gs,cloneNowHidden:function(){el=!0},cloneNowShown:function(){el=!1},dispatchSortableEvent:function(i){ot({sortable:a,name:i,originalEvent:n})}},o))};function ot(l){uE(Tt({putSortable:Qe,cloneEl:je,targetEl:X,rootEl:Ie,oldIndex:Al,oldDraggableIndex:Ql,newIndex:bt,newDraggableIndex:tl},l))}var X,Ue,pe,Ie,pl,Ta,je,el,Al,bt,Ql,tl,La,Qe,Ml=!1,$a=!1,Fa=[],fl,Nt,Yr,Xr,Ps,Rs,Jl,Tl,ea,ta=!1,Ia=!1,Oa,lt,Zr=[],Qr=!1,Pa=[],Ra=typeof document<"u",Ua=Ds,Us=Kl||Ht?"cssFloat":"float",pE=Ra&&!aE&&!Ds&&"draggable"in document.createElement("div"),js=function(){if(Ra){if(Ht)return!1;var l=document.createElement("x");return l.style.cssText="pointer-events:auto",l.style.pointerEvents==="auto"}}(),zs=function(t,a){var r=se(t),n=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=Sl(t,0,a),s=Sl(t,1,a),i=o&&se(o),c=s&&se(s),u=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+We(o).width,d=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+We(s).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&i.float&&i.float!=="none"){var m=i.float==="left"?"left":"right";return s&&(c.clear==="both"||c.clear===m)?"vertical":"horizontal"}return o&&(i.display==="block"||i.display==="flex"||i.display==="table"||i.display==="grid"||u>=n&&r[Us]==="none"||s&&r[Us]==="none"&&u+d>n)?"vertical":"horizontal"},fE=function(t,a,r){var n=r?t.left:t.top,o=r?t.right:t.bottom,s=r?t.width:t.height,i=r?a.left:a.top,c=r?a.right:a.bottom,u=r?a.width:a.height;return n===i||o===c||n+s/2===i+u/2},hE=function(t,a){var r;return Fa.some(function(n){var o=n[gt].options.emptyInsertThreshold;if(!(!o||Gr(n))){var s=We(n),i=t>=s.left-o&&t<=s.right+o,c=a>=s.top-o&&a<=s.bottom+o;if(i&&c)return r=n}}),r},Hs=function(t){function a(o,s){return function(i,c,u,d){var m=i.options.group.name&&c.options.group.name&&i.options.group.name===c.options.group.name;if(o==null&&(s||m))return!0;if(o==null||o===!1)return!1;if(s&&o==="clone")return o;if(typeof o=="function")return a(o(i,c,u,d),s)(i,c,u,d);var f=(s?i:c).options.group.name;return o===!0||typeof o=="string"&&o===f||o.join&&o.indexOf(f)>-1}}var r={},n=t.group;(!n||Aa(n)!="object")&&(n={name:n}),r.name=n.name,r.checkPull=a(n.pull,!0),r.checkPut=a(n.put),r.revertClone=n.revertClone,t.group=r},qs=function(){!js&&pe&&se(pe,"display","none")},Gs=function(){!js&&pe&&se(pe,"display","")};Ra&&document.addEventListener("click",function(l){if($a)return l.preventDefault(),l.stopPropagation&&l.stopPropagation(),l.stopImmediatePropagation&&l.stopImmediatePropagation(),$a=!1,!1},!0);var hl=function(t){if(X){t=t.touches?t.touches[0]:t;var a=hE(t.clientX,t.clientY);if(a){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.target=r.rootEl=a,r.preventDefault=void 0,r.stopPropagation=void 0,a[gt]._onDragOver(r)}}},gE=function(t){X&&X.parentNode[gt]._isOutsideThisEl(t.target)};function ie(l,t){if(!(l&&l.nodeType&&l.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(l));this.el=l,this.options=t=jt({},t),l[gt]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(l.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return zs(l,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,i){s.setData("Text",i.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ie.supportPointer!==!1&&"PointerEvent"in window&&!Yl,emptyInsertThreshold:5};Zl.initializePlugins(this,l,a);for(var r in a)!(r in t)&&(t[r]=a[r]);Hs(t);for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this));this.nativeDraggable=t.forceFallback?!1:pE,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?ve(l,"pointerdown",this._onTapStart):(ve(l,"mousedown",this._onTapStart),ve(l,"touchstart",this._onTapStart)),this.nativeDraggable&&(ve(l,"dragover",this),ve(l,"dragenter",this)),Fa.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),jt(this,iE())}ie.prototype={constructor:ie,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Tl=null)},_getDirection:function(t,a){return typeof this.options.direction=="function"?this.options.direction.call(this,t,a,X):this.options.direction},_onTapStart:function(t){if(t.cancelable){var a=this,r=this.el,n=this.options,o=n.preventOnFilter,s=t.type,i=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,c=(i||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||c,d=n.filter;if(CE(r),!X&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||n.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Yl&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=Lt(c,n.draggable,r,!1),!(c&&c.animated)&&Ta!==c)){if(Al=_t(c),Ql=_t(c,n.draggable),typeof d=="function"){if(d.call(this,t,c,this)){ot({sortable:a,rootEl:u,name:"filter",targetEl:c,toEl:r,fromEl:r}),dt("filter",a,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(m){if(m=Lt(u,m.trim(),r,!1),m)return ot({sortable:a,rootEl:m,name:"filter",targetEl:c,fromEl:r,toEl:r}),dt("filter",a,{evt:t}),!0}),d)){o&&t.cancelable&&t.preventDefault();return}n.handle&&!Lt(u,n.handle,r,!1)||this._prepareDragStart(t,i,c)}}},_prepareDragStart:function(t,a,r){var n=this,o=n.el,s=n.options,i=o.ownerDocument,c;if(r&&!X&&r.parentNode===o){var u=We(r);if(Ie=o,X=r,Ue=X.parentNode,pl=X.nextSibling,Ta=r,La=s.group,ie.dragged=X,fl={target:X,clientX:(a||t).clientX,clientY:(a||t).clientY},Ps=fl.clientX-u.left,Rs=fl.clientY-u.top,this._lastX=(a||t).clientX,this._lastY=(a||t).clientY,X.style["will-change"]="all",c=function(){if(dt("delayEnded",n,{evt:t}),ie.eventCanceled){n._onDrop();return}n._disableDelayedDragEvents(),!Ss&&n.nativeDraggable&&(X.draggable=!0),n._triggerDragStart(t,a),ot({sortable:n,name:"choose",originalEvent:t}),ht(X,s.chosenClass,!0)},s.ignore.split(",").forEach(function(d){Ts(X,d.trim(),Jr)}),ve(i,"dragover",hl),ve(i,"mousemove",hl),ve(i,"touchmove",hl),ve(i,"mouseup",n._onDrop),ve(i,"touchend",n._onDrop),ve(i,"touchcancel",n._onDrop),Ss&&this.nativeDraggable&&(this.options.touchStartThreshold=4,X.draggable=!0),dt("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(Kl||Ht))){if(ie.eventCanceled){this._onDrop();return}ve(i,"mouseup",n._disableDelayedDrag),ve(i,"touchend",n._disableDelayedDrag),ve(i,"touchcancel",n._disableDelayedDrag),ve(i,"mousemove",n._delayedDragTouchMoveHandler),ve(i,"touchmove",n._delayedDragTouchMoveHandler),s.supportPointer&&ve(i,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(c,s.delay)}else c()}},_delayedDragTouchMoveHandler:function(t){var a=t.touches?t.touches[0]:t;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){X&&Jr(X),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Ve(t,"mouseup",this._disableDelayedDrag),Ve(t,"touchend",this._disableDelayedDrag),Ve(t,"touchcancel",this._disableDelayedDrag),Ve(t,"mousemove",this._delayedDragTouchMoveHandler),Ve(t,"touchmove",this._delayedDragTouchMoveHandler),Ve(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,a){a=a||t.pointerType=="touch"&&t,!this.nativeDraggable||a?this.options.supportPointer?ve(document,"pointermove",this._onTouchMove):a?ve(document,"touchmove",this._onTouchMove):ve(document,"mousemove",this._onTouchMove):(ve(X,"dragend",this),ve(Ie,"dragstart",this._onDragStart));try{document.selection?za(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,a){if(Ml=!1,Ie&&X){dt("dragStarted",this,{evt:a}),this.nativeDraggable&&ve(document,"dragover",gE);var r=this.options;!t&&ht(X,r.dragClass,!1),ht(X,r.ghostClass,!0),ie.active=this,t&&this._appendGhost(),ot({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(Nt){this._lastX=Nt.clientX,this._lastY=Nt.clientY,qs();for(var t=document.elementFromPoint(Nt.clientX,Nt.clientY),a=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Nt.clientX,Nt.clientY),t!==a);)a=t;if(X.parentNode[gt]._isOutsideThisEl(t),a)do{if(a[gt]){var r=void 0;if(r=a[gt]._onDragOver({clientX:Nt.clientX,clientY:Nt.clientY,target:t,rootEl:a}),r&&!this.options.dragoverBubble)break}t=a}while(a=a.parentNode);Gs()}},_onTouchMove:function(t){if(fl){var a=this.options,r=a.fallbackTolerance,n=a.fallbackOffset,o=t.touches?t.touches[0]:t,s=pe&&Bl(pe,!0),i=pe&&s&&s.a,c=pe&&s&&s.d,u=Ua&&lt&&$s(lt),d=(o.clientX-fl.clientX+n.x)/(i||1)+(u?u[0]-Zr[0]:0)/(i||1),m=(o.clientY-fl.clientY+n.y)/(c||1)+(u?u[1]-Zr[1]:0)/(c||1);if(!ie.active&&!Ml){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<r)return;this._onDragStart(t,!0)}if(pe){s?(s.e+=d-(Yr||0),s.f+=m-(Xr||0)):s={a:1,b:0,c:0,d:1,e:d,f:m};var f="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");se(pe,"webkitTransform",f),se(pe,"mozTransform",f),se(pe,"msTransform",f),se(pe,"transform",f),Yr=d,Xr=m,Nt=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!pe){var t=this.options.fallbackOnBody?document.body:Ie,a=We(X,!0,Ua,!0,t),r=this.options;if(Ua){for(lt=t;se(lt,"position")==="static"&&se(lt,"transform")==="none"&&lt!==document;)lt=lt.parentNode;lt!==document.body&&lt!==document.documentElement?(lt===document&&(lt=$t()),a.top+=lt.scrollTop,a.left+=lt.scrollLeft):lt=$t(),Zr=$s(lt)}pe=X.cloneNode(!0),ht(pe,r.ghostClass,!1),ht(pe,r.fallbackClass,!0),ht(pe,r.dragClass,!0),se(pe,"transition",""),se(pe,"transform",""),se(pe,"box-sizing","border-box"),se(pe,"margin",0),se(pe,"top",a.top),se(pe,"left",a.left),se(pe,"width",a.width),se(pe,"height",a.height),se(pe,"opacity","0.8"),se(pe,"position",Ua?"absolute":"fixed"),se(pe,"zIndex","100000"),se(pe,"pointerEvents","none"),ie.ghost=pe,t.appendChild(pe),se(pe,"transform-origin",Ps/parseInt(pe.style.width)*100+"% "+Rs/parseInt(pe.style.height)*100+"%")}},_onDragStart:function(t,a){var r=this,n=t.dataTransfer,o=r.options;if(dt("dragStart",this,{evt:t}),ie.eventCanceled){this._onDrop();return}dt("setupClone",this),ie.eventCanceled||(je=Os(X),je.draggable=!1,je.style["will-change"]="",this._hideClone(),ht(je,this.options.chosenClass,!1),ie.clone=je),r.cloneId=za(function(){dt("clone",r),!ie.eventCanceled&&(r.options.removeCloneOnHide||Ie.insertBefore(je,X),r._hideClone(),ot({sortable:r,name:"clone"}))}),!a&&ht(X,o.dragClass,!0),a?($a=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Ve(document,"mouseup",r._onDrop),Ve(document,"touchend",r._onDrop),Ve(document,"touchcancel",r._onDrop),n&&(n.effectAllowed="move",o.setData&&o.setData.call(r,n,X)),ve(document,"drop",r),se(X,"transform","translateZ(0)")),Ml=!0,r._dragStartId=za(r._dragStarted.bind(r,a,t)),ve(document,"selectstart",r),Jl=!0,Yl&&se(document.body,"user-select","none")},_onDragOver:function(t){var a=this.el,r=t.target,n,o,s,i=this.options,c=i.group,u=ie.active,d=La===c,m=i.sort,f=Qe||u,p,y=this,h=!1;if(Qr)return;function g(z,ee){dt(z,y,Tt({evt:t,isOwner:d,axis:p?"vertical":"horizontal",revert:s,dragRect:n,targetRect:o,canSort:m,fromSortable:f,target:r,completed:w,onMove:function(Ne,Ke){return ja(Ie,a,X,n,Ne,We(Ne),t,Ke)},changed:x},ee))}function b(){g("dragOverAnimationCapture"),y.captureAnimationState(),y!==f&&f.captureAnimationState()}function w(z){return g("dragOverCompleted",{insertion:z}),z&&(d?u._hideClone():u._showClone(y),y!==f&&(ht(X,Qe?Qe.options.ghostClass:u.options.ghostClass,!1),ht(X,i.ghostClass,!0)),Qe!==y&&y!==ie.active?Qe=y:y===ie.active&&Qe&&(Qe=null),f===y&&(y._ignoreWhileAnimating=r),y.animateAll(function(){g("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(r===X&&!X.animated||r===a&&!r.animated)&&(Tl=null),!i.dragoverBubble&&!t.rootEl&&r!==document&&(X.parentNode[gt]._isOutsideThisEl(t.target),!z&&hl(t)),!i.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function x(){bt=_t(X),tl=_t(X,i.draggable),ot({sortable:y,name:"change",toEl:a,newIndex:bt,newDraggableIndex:tl,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),r=Lt(r,i.draggable,a,!0),g("dragOver"),ie.eventCanceled)return h;if(X.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||y._ignoreWhileAnimating===r)return w(!1);if($a=!1,u&&!i.disabled&&(d?m||(s=Ue!==Ie):Qe===this||(this.lastPutMode=La.checkPull(this,u,X,t))&&c.checkPut(this,u,X,t))){if(p=this._getDirection(t,r)==="vertical",n=We(X),g("dragOverValid"),ie.eventCanceled)return h;if(s)return Ue=Ie,b(),this._hideClone(),g("revert"),ie.eventCanceled||(pl?Ie.insertBefore(X,pl):Ie.appendChild(X)),w(!0);var k=Gr(a,i.draggable);if(!k||xE(t,p,this)&&!k.animated){if(k===X)return w(!1);if(k&&a===t.target&&(r=k),r&&(o=We(r)),ja(Ie,a,X,n,r,o,t,!!r)!==!1)return b(),a.appendChild(X),Ue=a,x(),w(!0)}else if(k&&kE(t,p,this)){var _=Sl(a,0,i,!0);if(_===X)return w(!1);if(r=_,o=We(r),ja(Ie,a,X,n,r,o,t,!1)!==!1)return b(),a.insertBefore(X,_),Ue=a,x(),w(!0)}else if(r.parentNode===a){o=We(r);var N=0,V,P=X.parentNode!==a,$=!fE(X.animated&&X.toRect||n,r.animated&&r.toRect||o,p),M=p?"top":"left",A=Ls(r,"top","top")||Ls(X,"top","top"),q=A?A.scrollTop:void 0;Tl!==r&&(V=o[M],ta=!1,Ia=!$&&i.invertSwap||P),N=wE(t,r,o,p,$?1:i.swapThreshold,i.invertedSwapThreshold==null?i.swapThreshold:i.invertedSwapThreshold,Ia,Tl===r);var Q;if(N!==0){var R=_t(X);do R-=N,Q=Ue.children[R];while(Q&&(se(Q,"display")==="none"||Q===pe))}if(N===0||Q===r)return w(!1);Tl=r,ea=N;var I=r.nextElementSibling,F=!1;F=N===1;var D=ja(Ie,a,X,n,r,o,t,F);if(D!==!1)return(D===1||D===-1)&&(F=D===1),Qr=!0,setTimeout(yE,30),b(),F&&!I?a.appendChild(X):r.parentNode.insertBefore(X,F?I:r),A&&Is(A,0,q-A.scrollTop),Ue=X.parentNode,V!==void 0&&!Ia&&(Oa=Math.abs(V-We(r)[M])),x(),w(!0)}if(a.contains(X))return w(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ve(document,"mousemove",this._onTouchMove),Ve(document,"touchmove",this._onTouchMove),Ve(document,"pointermove",this._onTouchMove),Ve(document,"dragover",hl),Ve(document,"mousemove",hl),Ve(document,"touchmove",hl)},_offUpEvents:function(){var t=this.el.ownerDocument;Ve(t,"mouseup",this._onDrop),Ve(t,"touchend",this._onDrop),Ve(t,"pointerup",this._onDrop),Ve(t,"touchcancel",this._onDrop),Ve(document,"selectstart",this)},_onDrop:function(t){var a=this.el,r=this.options;if(bt=_t(X),tl=_t(X,r.draggable),dt("drop",this,{evt:t}),Ue=X&&X.parentNode,bt=_t(X),tl=_t(X,r.draggable),ie.eventCanceled){this._nulling();return}Ml=!1,Ia=!1,ta=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),en(this.cloneId),en(this._dragStartId),this.nativeDraggable&&(Ve(document,"drop",this),Ve(a,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Yl&&se(document.body,"user-select",""),se(X,"transform",""),t&&(Jl&&(t.cancelable&&t.preventDefault(),!r.dropBubble&&t.stopPropagation()),pe&&pe.parentNode&&pe.parentNode.removeChild(pe),(Ie===Ue||Qe&&Qe.lastPutMode!=="clone")&&je&&je.parentNode&&je.parentNode.removeChild(je),X&&(this.nativeDraggable&&Ve(X,"dragend",this),Jr(X),X.style["will-change"]="",Jl&&!Ml&&ht(X,Qe?Qe.options.ghostClass:this.options.ghostClass,!1),ht(X,this.options.chosenClass,!1),ot({sortable:this,name:"unchoose",toEl:Ue,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ie!==Ue?(bt>=0&&(ot({rootEl:Ue,name:"add",toEl:Ue,fromEl:Ie,originalEvent:t}),ot({sortable:this,name:"remove",toEl:Ue,originalEvent:t}),ot({rootEl:Ue,name:"sort",toEl:Ue,fromEl:Ie,originalEvent:t}),ot({sortable:this,name:"sort",toEl:Ue,originalEvent:t})),Qe&&Qe.save()):bt!==Al&&bt>=0&&(ot({sortable:this,name:"update",toEl:Ue,originalEvent:t}),ot({sortable:this,name:"sort",toEl:Ue,originalEvent:t})),ie.active&&((bt==null||bt===-1)&&(bt=Al,tl=Ql),ot({sortable:this,name:"end",toEl:Ue,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){dt("nulling",this),Ie=X=Ue=pe=pl=je=Ta=el=fl=Nt=Jl=bt=tl=Al=Ql=Tl=ea=Qe=La=ie.dragged=ie.ghost=ie.clone=ie.active=null,Pa.forEach(function(t){t.checked=!0}),Pa.length=Yr=Xr=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":X&&(this._onDragOver(t),bE(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],a,r=this.el.children,n=0,o=r.length,s=this.options;n<o;n++)a=r[n],Lt(a,s.draggable,this.el,!1)&&t.push(a.getAttribute(s.dataIdAttr)||EE(a));return t},sort:function(t,a){var r={},n=this.el;this.toArray().forEach(function(o,s){var i=n.children[s];Lt(i,this.options.draggable,n,!1)&&(r[o]=i)},this),a&&this.captureAnimationState(),t.forEach(function(o){r[o]&&(n.removeChild(r[o]),n.appendChild(r[o]))}),a&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,a){return Lt(t,a||this.options.draggable,this.el,!1)},option:function(t,a){var r=this.options;if(a===void 0)return r[t];var n=Zl.modifyOption(this,t,a);typeof n<"u"?r[t]=n:r[t]=a,t==="group"&&Hs(r)},destroy:function(){dt("destroy",this);var t=this.el;t[gt]=null,Ve(t,"mousedown",this._onTapStart),Ve(t,"touchstart",this._onTapStart),Ve(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ve(t,"dragover",this),Ve(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Fa.splice(Fa.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!el){if(dt("hideClone",this),ie.eventCanceled)return;se(je,"display","none"),this.options.removeCloneOnHide&&je.parentNode&&je.parentNode.removeChild(je),el=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(el){if(dt("showClone",this),ie.eventCanceled)return;X.parentNode==Ie&&!this.options.group.revertClone?Ie.insertBefore(je,X):pl?Ie.insertBefore(je,pl):Ie.appendChild(je),this.options.group.revertClone&&this.animate(X,je),se(je,"display",""),el=!1}}};function bE(l){l.dataTransfer&&(l.dataTransfer.dropEffect="move"),l.cancelable&&l.preventDefault()}function ja(l,t,a,r,n,o,s,i){var c,u=l[gt],d=u.options.onMove,m;return window.CustomEvent&&!Ht&&!Kl?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=t,c.from=l,c.dragged=a,c.draggedRect=r,c.related=n||t,c.relatedRect=o||We(t),c.willInsertAfter=i,c.originalEvent=s,l.dispatchEvent(c),d&&(m=d.call(u,c,s)),m}function Jr(l){l.draggable=!1}function yE(){Qr=!1}function kE(l,t,a){var r=We(Sl(a.el,0,a.options,!0)),n=10;return t?l.clientX<r.left-n||l.clientY<r.top&&l.clientX<r.right:l.clientY<r.top-n||l.clientY<r.bottom&&l.clientX<r.left}function xE(l,t,a){var r=We(Gr(a.el,a.options.draggable)),n=10;return t?l.clientX>r.right+n||l.clientX<=r.right&&l.clientY>r.bottom&&l.clientX>=r.left:l.clientX>r.right&&l.clientY>r.top||l.clientX<=r.right&&l.clientY>r.bottom+n}function wE(l,t,a,r,n,o,s,i){var c=r?l.clientY:l.clientX,u=r?a.height:a.width,d=r?a.top:a.left,m=r?a.bottom:a.right,f=!1;if(!s){if(i&&Oa<u*n){if(!ta&&(ea===1?c>d+u*o/2:c<m-u*o/2)&&(ta=!0),ta)f=!0;else if(ea===1?c<d+Oa:c>m-Oa)return-ea}else if(c>d+u*(1-n)/2&&c<m-u*(1-n)/2)return _E(t)}return f=f||s,f&&(c<d+u*o/2||c>m-u*o/2)?c>d+u/2?1:-1:0}function _E(l){return _t(X)<_t(l)?1:-1}function EE(l){for(var t=l.tagName+l.className+l.src+l.href+l.textContent,a=t.length,r=0;a--;)r+=t.charCodeAt(a);return r.toString(36)}function CE(l){Pa.length=0;for(var t=l.getElementsByTagName("input"),a=t.length;a--;){var r=t[a];r.checked&&Pa.push(r)}}function za(l){return setTimeout(l,0)}function en(l){return clearTimeout(l)}Ra&&ve(document,"touchmove",function(l){(ie.active||Ml)&&l.cancelable&&l.preventDefault()}),ie.utils={on:ve,off:Ve,css:se,find:Ts,is:function(t,a){return!!Lt(t,a,t,!1)},extend:oE,throttle:Fs,closest:Lt,toggleClass:ht,clone:Os,index:_t,nextTick:za,cancelNextTick:en,detectDirection:zs,getChild:Sl},ie.get=function(l){return l[gt]},ie.mount=function(){for(var l=arguments.length,t=new Array(l),a=0;a<l;a++)t[a]=arguments[a];t[0].constructor===Array&&(t=t[0]),t.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(ie.utils=Tt(Tt({},ie.utils),r.utils)),Zl.mount(r)})},ie.create=function(l,t){return new ie(l,t)},ie.version=lE;var He=[],la,tn,ln=!1,an,rn,Ha,aa;function VE(){function l(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return l.prototype={dragStarted:function(a){var r=a.originalEvent;this.sortable.nativeDraggable?ve(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ve(document,"pointermove",this._handleFallbackAutoScroll):r.touches?ve(document,"touchmove",this._handleFallbackAutoScroll):ve(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(a){var r=a.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Ve(document,"dragover",this._handleAutoScroll):(Ve(document,"pointermove",this._handleFallbackAutoScroll),Ve(document,"touchmove",this._handleFallbackAutoScroll),Ve(document,"mousemove",this._handleFallbackAutoScroll)),Ws(),qa(),sE()},nulling:function(){Ha=tn=la=ln=aa=an=rn=null,He.length=0},_handleFallbackAutoScroll:function(a){this._handleAutoScroll(a,!0)},_handleAutoScroll:function(a,r){var n=this,o=(a.touches?a.touches[0]:a).clientX,s=(a.touches?a.touches[0]:a).clientY,i=document.elementFromPoint(o,s);if(Ha=a,r||this.options.forceAutoScrollFallback||Kl||Ht||Yl){nn(a,this.options,i,r);var c=Jt(i,!0);ln&&(!aa||o!==an||s!==rn)&&(aa&&Ws(),aa=setInterval(function(){var u=Jt(document.elementFromPoint(o,s),!0);u!==c&&(c=u,qa()),nn(a,n.options,u,r)},10),an=o,rn=s)}else{if(!this.options.bubbleScroll||Jt(i,!0)===$t()){qa();return}nn(a,this.options,Jt(i,!1),!1)}}},jt(l,{pluginName:"scroll",initializeByDefault:!0})}function qa(){He.forEach(function(l){clearInterval(l.pid)}),He=[]}function Ws(){clearInterval(aa)}var nn=Fs(function(l,t,a,r){if(t.scroll){var n=(l.touches?l.touches[0]:l).clientX,o=(l.touches?l.touches[0]:l).clientY,s=t.scrollSensitivity,i=t.scrollSpeed,c=$t(),u=!1,d;tn!==a&&(tn=a,qa(),la=t.scroll,d=t.scrollFn,la===!0&&(la=Jt(a,!0)));var m=0,f=la;do{var p=f,y=We(p),h=y.top,g=y.bottom,b=y.left,w=y.right,x=y.width,k=y.height,_=void 0,N=void 0,V=p.scrollWidth,P=p.scrollHeight,$=se(p),M=p.scrollLeft,A=p.scrollTop;p===c?(_=x<V&&($.overflowX==="auto"||$.overflowX==="scroll"||$.overflowX==="visible"),N=k<P&&($.overflowY==="auto"||$.overflowY==="scroll"||$.overflowY==="visible")):(_=x<V&&($.overflowX==="auto"||$.overflowX==="scroll"),N=k<P&&($.overflowY==="auto"||$.overflowY==="scroll"));var q=_&&(Math.abs(w-n)<=s&&M+x<V)-(Math.abs(b-n)<=s&&!!M),Q=N&&(Math.abs(g-o)<=s&&A+k<P)-(Math.abs(h-o)<=s&&!!A);if(!He[m])for(var R=0;R<=m;R++)He[R]||(He[R]={});(He[m].vx!=q||He[m].vy!=Q||He[m].el!==p)&&(He[m].el=p,He[m].vx=q,He[m].vy=Q,clearInterval(He[m].pid),(q!=0||Q!=0)&&(u=!0,He[m].pid=setInterval((function(){r&&this.layer===0&&ie.active._onTouchMove(Ha);var I=He[this.layer].vy?He[this.layer].vy*i:0,F=He[this.layer].vx?He[this.layer].vx*i:0;typeof d=="function"&&d.call(ie.dragged.parentNode[gt],F,I,l,Ha,He[this.layer].el)!=="continue"||Is(He[this.layer].el,F,I)}).bind({layer:m}),24))),m++}while(t.bubbleScroll&&f!==c&&(f=Jt(f,!1)));ln=u}},30),Ks=function(t){var a=t.originalEvent,r=t.putSortable,n=t.dragEl,o=t.activeSortable,s=t.dispatchSortableEvent,i=t.hideGhostForTarget,c=t.unhideGhostForTarget;if(a){var u=r||o;i();var d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,m=document.elementFromPoint(d.clientX,d.clientY);c(),u&&!u.el.contains(m)&&(s("spill"),this.onSpill({dragEl:n,putSortable:r}))}};function on(){}on.prototype={startIndex:null,dragStart:function(t){var a=t.oldDraggableIndex;this.startIndex=a},onSpill:function(t){var a=t.dragEl,r=t.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var n=Sl(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(a,n):this.sortable.el.appendChild(a),this.sortable.animateAll(),r&&r.animateAll()},drop:Ks},jt(on,{pluginName:"revertOnSpill"});function sn(){}sn.prototype={onSpill:function(t){var a=t.dragEl,r=t.putSortable,n=r||this.sortable;n.captureAnimationState(),a.parentNode&&a.parentNode.removeChild(a),n.animateAll()},drop:Ks},jt(sn,{pluginName:"removeOnSpill"}),ie.mount(new VE),ie.mount(sn,on);function cn(l){l.parentElement!==null&&l.parentElement.removeChild(l)}function Ys(l,t,a){const r=a===0?l.children[0]:l.children[a-1].nextSibling;l.insertBefore(t,r)}function NE(){return typeof window<"u"?window.console:global.console}const vE=NE();function BE(l){const t=Object.create(null);return function(r){return t[r]||(t[r]=l(r))}}const SE=/-(\w)/g,DE=BE(l=>l.replace(SE,(t,a)=>a.toUpperCase())),Xs=["Start","Add","Remove","Update","End"],Zs=["Choose","Unchoose","Sort","Filter","Clone"],Qs=["Move"],AE=[Qs,Xs,Zs].flatMap(l=>l).map(l=>`on${l}`),dn={manage:Qs,manageAndEmit:Xs,emit:Zs};function ME(l){return AE.indexOf(l)!==-1}const TE=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function LE(l){return TE.includes(l)}function $E(l){return["transition-group","TransitionGroup"].includes(l)}function Js(l){return["id","class","role","style"].includes(l)||l.startsWith("data-")||l.startsWith("aria-")||l.startsWith("on")}function ei(l){return l.reduce((t,[a,r])=>(t[a]=r,t),{})}function FE({$attrs:l,componentData:t={}}){return{...ei(Object.entries(l).filter(([r,n])=>Js(r))),...t}}function IE({$attrs:l,callBackBuilder:t}){const a=ei(ti(l));Object.entries(t).forEach(([n,o])=>{dn[n].forEach(s=>{a[`on${s}`]=o(s)})});const r=`[data-draggable]${a.draggable||""}`;return{...a,draggable:r}}function ti(l){return Object.entries(l).filter(([t,a])=>!Js(t)).map(([t,a])=>[DE(t),a]).filter(([t,a])=>!ME(t))}const li=({el:l})=>l,OE=(l,t)=>l.__draggable_context=t,ai=l=>l.__draggable_context;class PE{constructor({nodes:{header:t,default:a,footer:r},root:n,realList:o}){this.defaultNodes=a,this.children=[...t,...a,...r],this.externalComponent=n.externalComponent,this.rootTransition=n.transition,this.tag=n.tag,this.realList=o}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(t,a){const{tag:r,children:n,_isRootComponent:o}=this;return t(r,a,o?{default:()=>n}:n)}updated(){const{defaultNodes:t,realList:a}=this;t.forEach((r,n)=>{OE(li(r),{element:a[n],index:n})})}getUnderlyingVm(t){return ai(t)}getVmIndexFromDomIndex(t,a){const{defaultNodes:r}=this,{length:n}=r,o=a.children,s=o.item(t);if(s===null)return n;const i=ai(s);if(i)return i.index;if(n===0)return 0;const c=li(r[0]),u=[...o].findIndex(d=>d===c);return t<u?0:n}}function RE(l,t){const a=l[t];return a?a():[]}function UE({$slots:l,realList:t,getKey:a}){const r=t||[],[n,o]=["header","footer"].map(c=>RE(l,c)),{item:s}=l;if(!s)throw new Error("draggable element must have an item slot");const i=r.flatMap((c,u)=>s({element:c,index:u}).map(d=>(d.key=a(c),d.props={...d.props||{},"data-draggable":!0},d)));if(i.length!==r.length)throw new Error("Item slot must have only one child");return{header:n,footer:o,default:i}}function jE(l){const t=$E(l),a=!LE(l)&&!t;return{transition:t,externalComponent:a,tag:a?e.resolveComponent(l):t?e.TransitionGroup:l}}function zE({$slots:l,tag:t,realList:a,getKey:r}){const n=UE({$slots:l,realList:a,getKey:r}),o=jE(t);return new PE({nodes:n,root:o,realList:a})}function ri(l,t){e.nextTick(()=>this.$emit(l.toLowerCase(),t))}function ni(l){return(t,a)=>{if(this.realList!==null)return this[`onDrag${l}`](t,a)}}function HE(l){const t=ni.call(this,l);return(a,r)=>{t.call(this,a,r),ri.call(this,l,a)}}let un=null;const qE={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:l=>l},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},GE=["update:modelValue","change",...[...dn.manageAndEmit,...dn.emit].map(l=>l.toLowerCase())],oi=e.defineComponent({name:"draggable",inheritAttrs:!1,props:qE,emits:GE,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:l,$attrs:t,tag:a,componentData:r,realList:n,getKey:o}=this,s=zE({$slots:l,tag:a,realList:n,getKey:o});this.componentStructure=s;const i=FE({$attrs:t,componentData:r});return s.render(e.h,i)}catch(l){return this.error=!0,e.h("pre",{style:{color:"red"}},l.stack)}},created(){this.list!==null&&this.modelValue!==null&&vE.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:l,$el:t,componentStructure:a}=this;a.updated();const r=IE({$attrs:l,callBackBuilder:{manageAndEmit:o=>HE.call(this,o),emit:o=>ri.bind(this,o),manage:o=>ni.call(this,o)}}),n=t.nodeType===1?t:t.parentElement;this._sortable=new ie(n,r),this.targetDomElement=n,n.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:l}=this;return l||this.modelValue},getKey(){const{itemKey:l}=this;return typeof l=="function"?l:t=>t[l]}},watch:{$attrs:{handler(l){const{_sortable:t}=this;t&&ti(l).forEach(([a,r])=>{t.option(a,r)})},deep:!0}},methods:{getUnderlyingVm(l){return this.componentStructure.getUnderlyingVm(l)||null},getUnderlyingPotencialDraggableComponent(l){return l.__draggable_component__},emitChanges(l){e.nextTick(()=>this.$emit("change",l))},alterList(l){if(this.list){l(this.list);return}const t=[...this.modelValue];l(t),this.$emit("update:modelValue",t)},spliceList(){const l=t=>t.splice(...arguments);this.alterList(l)},updatePosition(l,t){const a=r=>r.splice(t,0,r.splice(l,1)[0]);this.alterList(a)},getRelatedContextFromMoveEvent({to:l,related:t}){const a=this.getUnderlyingPotencialDraggableComponent(l);if(!a)return{component:a};const r=a.realList,n={list:r,component:a};return l!==t&&r?{...a.getUnderlyingVm(t)||{},...n}:n},getVmIndexFromDomIndex(l){return this.componentStructure.getVmIndexFromDomIndex(l,this.targetDomElement)},onDragStart(l){this.context=this.getUnderlyingVm(l.item),l.item._underlying_vm_=this.clone(this.context.element),un=l.item},onDragAdd(l){const t=l.item._underlying_vm_;if(t===void 0)return;cn(l.item);const a=this.getVmIndexFromDomIndex(l.newIndex);this.spliceList(a,0,t);const r={element:t,newIndex:a};this.emitChanges({added:r})},onDragRemove(l){if(Ys(this.$el,l.item,l.oldIndex),l.pullMode==="clone"){cn(l.clone);return}const{index:t,element:a}=this.context;this.spliceList(t,1);const r={element:a,oldIndex:t};this.emitChanges({removed:r})},onDragUpdate(l){cn(l.item),Ys(l.from,l.item,l.oldIndex);const t=this.context.index,a=this.getVmIndexFromDomIndex(l.newIndex);this.updatePosition(t,a);const r={element:this.context.element,oldIndex:t,newIndex:a};this.emitChanges({moved:r})},computeFutureIndex(l,t){if(!l.element)return 0;const a=[...t.to.children].filter(s=>s.style.display!=="none"),r=a.indexOf(t.related),n=l.component.getVmIndexFromDomIndex(r);return a.indexOf(un)!==-1||!t.willInsertAfter?n:n+1},onDragMove(l,t){const{move:a,realList:r}=this;if(!a||!r)return!0;const n=this.getRelatedContextFromMoveEvent(l),o=this.computeFutureIndex(n,l),s={...this.context,futureIndex:o},i={...l,relatedContext:n,draggedContext:s};return a(i,t)},onDragEnd(){un=null}}}),WE={class:"flex items-center justify-between mb-6"},KE={class:"text-xl font-semibold text-gray-900"},YE={class:"mt-1 text-sm text-gray-600"},XE={class:"flex items-center gap-2"},ZE={class:"overflow-hidden bg-white border border-gray-200 shadow-sm rounded-xl"},QE={class:"grid grid-cols-12 gap-4 px-6 py-4 border-b border-gray-200 bg-gray-50"},JE={class:"col-span-5 font-medium text-gray-700"},eC={class:"col-span-3 font-medium text-gray-700"},tC={class:"col-span-2 font-medium text-gray-700"},lC={class:"col-span-2 font-medium text-right text-gray-700"},aC={class:"divide-y divide-gray-100"},rC={class:"grid items-center grid-cols-12 gap-4 px-6 py-4 transition-colors hover:bg-gray-50/50"},nC={class:"flex items-center col-span-5 gap-3"},oC={class:"font-medium text-gray-900"},sC={class:"text-xs text-gray-500"},iC={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-700 rounded-full bg-blue-50 ring-1 ring-inset ring-blue-700/10"},cC={class:"col-span-3"},dC={class:"inline-flex items-center px-2 py-1 text-sm font-medium text-gray-600 rounded-md bg-gray-50 ring-1 ring-inset ring-gray-500/10"},uC={class:"col-span-1"},mC={key:0,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",class:"lucide lucide-circle-check w-4 h-4 text-emerald-600"},pC={key:1,class:"grid items-center grid-cols-12 gap-4 px-6 py-4 transition-colors hover:bg-gray-50/50"},fC={class:"col-span-5"},hC={class:"text-gray-500"},gC={__name:"vs-builder-datatable",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(l){const t=e.useModel(l,"modelValue"),a=n=>n==="array"?"purple":n==="boolean"||n==="date"?"red":n==="datetime"?"purple":n==="number"?"green":n==="text"?"blue":n==="file"||n==="select"?"yellow":n==="slug"?"green":n==="image"?"blue":"gray",r=n=>{switch(n){case"text":return fa;case"number":return Nn;case"integer":return Nn;case"date":return ua;case"datetime":return Ri;case"file":return yl;case"select":return Bn;case"multiselect":return pa;case"mediaselect":return Image;case"radio":return _n;case"boolean":return _n;case"datalist":return Bn;case"image":return ma;case"slug":return vn;case"richtext":return fa;case"markdown":return fa;case"reference":return Hi;case"relation":return vn;case"FileList":return yl;default:return fa}};return(n,o)=>{var s,i;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",WE,[e.createElementVNode("div",null,[e.createElementVNode("h2",KE,e.toDisplayString(n.$t("cms.builder.collectionStructure")),1),e.createElementVNode("p",YE,e.toDisplayString(n.$t("cms.builder.defineFields")),1)]),e.createElementVNode("div",XE,[e.createVNode(K_,{modelValue:t.value.columns,"onUpdate:modelValue":o[0]||(o[0]=c=>t.value.columns=c)},null,8,["modelValue"])])]),e.createElementVNode("div",ZE,[e.createElementVNode("div",QE,[e.createElementVNode("div",JE,e.toDisplayString(n.$t("cms.builder.name")),1),e.createElementVNode("div",eC,e.toDisplayString(n.$t("cms.builder.type")),1),e.createElementVNode("div",tC,e.toDisplayString(n.$t("cms.builder.localization")),1),e.createElementVNode("div",lC,e.toDisplayString(n.$t("cms.builder.actions")),1)]),e.createElementVNode("div",aC,[(i=(s=t.value)==null?void 0:s.columns)!=null&&i.length?(e.openBlock(),e.createBlock(e.unref(oi),{key:0,modelValue:t.value.columns,"onUpdate:modelValue":o[2]||(o[2]=c=>t.value.columns=c),"item-key":"name",handle:".drag-handle",animation:200},{item:e.withCtx(({element:c,index:u})=>{var d,m;return[e.createElementVNode("div",rC,[e.createElementVNode("div",nC,[o[3]||(o[3]=e.createElementVNode("span",{class:"drag-handle cursor-move mr-2 text-gray-400"},"☰",-1)),e.createElementVNode("div",{class:e.normalizeClass(["flex items-center justify-center p-1 rounded",`bg-${a((d=c.type)==null?void 0:d.toLowerCase())}-100`])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r((m=c.type)==null?void 0:m.toLowerCase())),{class:"w-4 h-4"}))],2),e.createElementVNode("div",null,[e.createElementVNode("p",oC,e.toDisplayString(c.label),1),e.createElementVNode("p",sC,e.toDisplayString(c.name),1)]),c.required?(e.openBlock(),e.createElementBlock("span",iC,e.toDisplayString(n.$t("cms.builder.required")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",cC,[e.createElementVNode("span",dC,e.toDisplayString(c.type),1)]),e.createElementVNode("div",uC,[c.localization?(e.openBlock(),e.createElementBlock("svg",mC,[...o[4]||(o[4]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("path",{d:"m9 12 2 2 4-4"},null,-1)])])):e.createCommentVNode("",!0)]),e.createVNode(Q_,{columns:t.value.columns,"onUpdate:columns":o[1]||(o[1]=f=>t.value.columns=f),data:t.value.columns[u],index:u},null,8,["columns","data","index"])])]}),_:1},8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",pC,[e.createElementVNode("div",fC,[e.createElementVNode("p",hC,e.toDisplayString(n.$t("cms.builder.noColumnsFound")),1)])]))])])],64)}}},bC={__name:"vs-builder-edit",props:{data:{},dataModifiers:{},form:{},formModifiers:{}},emits:["update:data","update:form"],setup(l){const{t}=Fe(),a=e.useModel(l,"data"),r=e.useModel(l,"form");e.ref({});const n=e.computed(()=>({name:{type:"text",label:t("cms.builder.scheme.name.label"),required:!0,placeholder:t("cms.builder.scheme.name.placeholder"),validators:["required"],col:4},title:{type:"text",label:t("cms.builder.scheme.title.label"),required:!0,placeholder:t("cms.builder.scheme.title.placeholder"),validators:["required"],col:4},preview_path:{type:"text",label:t("cms.builder.scheme.preview_path.label"),placeholder:t("cms.builder.scheme.preview_path.placeholder"),col:4,info:t("cms.builder.scheme.preview_path.info")},type:{type:"select",label:t("cms.builder.scheme.type.label"),required:!0,placeholder:t("cms.builder.scheme.type.placeholder"),validators:["required"],col:4,options:[{text:t("cms.builder.scheme.type.options.collection"),id:"collection"},{text:t("cms.builder.scheme.type.options.single"),id:"single"}]},status:{type:"select",label:t("cms.builder.scheme.status.label"),required:!0,placeholder:t("cms.builder.scheme.status.placeholder"),col:4,options:[{text:t("cms.builder.scheme.status.options.published"),id:"published"},{text:t("cms.builder.scheme.status.options.draft"),id:"draft"},{text:t("cms.builder.scheme.status.options.archived"),id:"archived"}]},include_search:{type:"switcher",label:t("cms.builder.scheme.include_search.label"),placeholder:t("cms.builder.scheme.include_search.placeholder"),col:4},description:{type:"textarea",label:t("cms.builder.scheme.description.label"),required:!0,placeholder:t("cms.builder.scheme.description.placeholder")}}));return e.onBeforeUnmount(()=>{r.value=null}),(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(Xe),{modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=i=>a.value=i),schema:n.value,form:r.value,"onUpdate:form":s[1]||(s[1]=i=>r.value=i)},null,8,["modelValue","schema","form"]),e.createVNode(gC,{modelValue:a.value,"onUpdate:modelValue":s[2]||(s[2]=i=>a.value=i)},null,8,["modelValue"])]))}},mn=l=>{var r,n;const t=(r=l==null?void 0:l.type)==null?void 0:r.toLowerCase(),a=l!=null&&l.required?["required"]:null;return t==="array"?{key:l.name,label:l.label||l.title,type:"multi-text",help:l==null?void 0:l.help,colModel:{type:(l==null?void 0:l.subtype)||"text",placeholder:l==null?void 0:l.placeholder},validators:a}:t==="boolean"?{key:l.name,label:l.label||l.title,type:"Switcher",help:l==null?void 0:l.help,validators:a}:t==="tags"?{key:l.name,label:l.label||l.title,type:"tags",help:l==null?void 0:l.help,validators:a}:t==="radio"?{key:l.name,label:l.label||l.title,type:"radio",help:l==null?void 0:l.help,options:l.options||[],validators:a}:t==="date"?{key:l.name,label:l.label||l.title,type:"Date",time:!1,help:l==null?void 0:l.help,validators:a}:t==="datetime"?{key:l.name,label:l.label||l.title,type:"Date",help:l==null?void 0:l.help,mode:"datetime",time:!0,validators:a}:t==="number"?{key:l.name,label:l.label||l.title,help:l==null?void 0:l.help,type:"Number",validators:a}:t==="integer"?{key:l.name,label:l.label||l.title,type:"Integer",help:l==null?void 0:l.help,validators:a}:t==="text"?{key:l.name,label:l.label||l.title,type:"Text",help:l==null?void 0:l.help,validators:a}:t==="file"?{key:l.name,label:l.label||l.title,type:"File",multiple:l.multi||l.multiple,help:l==null?void 0:l.help,validators:a,api:"/api/cms-media/upload?subdir=",dir:"uploads/"+new Date().toLocaleDateString("en-US").replace(/\//g,"-")}:t==="filelist"?{key:l.name,label:l.label||l.title,type:"file",multiple:!0,help:l==null?void 0:l.help,validators:a}:t==="slug"?{key:l.name,label:l.label||l.title,type:"Slug",parent:l.parent||"",help:l==null?void 0:l.help,validators:a}:t==="image"?{key:l.name,label:l.label||l.title,type:"File",multi:l.multiple,help:l==null?void 0:l.help,validators:a,api:"/api/cms-media/upload?subdir=",dir:"uploads/"+new Date().toLocaleDateString("en-US").replace(/\//g,"-")}:t==="select"?l.options?{key:l.name,label:l.label||l.title,type:"select",options:l.options||[],help:l==null?void 0:l.help,validators:a}:{key:l.name,label:l.label||l.title,type:"select",data:l.data||[],help:l==null?void 0:l.help,validators:a}:t==="multiselect"?{key:l.name,label:l.label||l.title,type:"select",data:l.data||[],parent:l.parent||"",options:l.options||[],help:l==null?void 0:l.help,validators:a,multiple:!0}:t==="richtext"?{key:l.name,label:l.label||l.title,type:"Texteditor",help:l==null?void 0:l.help,validators:a}:t==="datalist"?{key:l.name,label:l.label||l.title,type:"Custom-Datatable",colModel:((n=l.colModel)==null?void 0:n.map(o=>mn(o)))||[],help:l==null?void 0:l.help,validators:a}:t==="reference"?{key:l.name,label:l.label||l.title,type:"reference",reference_type:l.reference_type,help:l==null?void 0:l.help,validators:a}:t==="reference-list"?{key:l.name,label:l.label||l.title,type:"reference",reference_type:l.reference_type,help:l==null?void 0:l.help,validators:a}:t==="relation"?(console.log(l),{key:l.name,label:l.label||l.title,type:"relation-link",help:l==null?void 0:l.help,relation:l.relation,validators:a}):t==="markdown"?{key:l.name,label:l.label||l.title,type:"richtext-md",help:l==null?void 0:l.help,validators:a}:t==="mediaselect"?{key:l.name,label:l.label||l.title,type:"mediaselect",help:l==null?void 0:l.help,validators:a}:{key:l.name,label:l.label||l.title,placeholder:l.placeholder,help:l==null?void 0:l.help,type:"Text",validators:a}},yC={class:"flex items-center justify-end gap-2"},kC={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},xC={__name:"vs-form-custom-datatable-controls",props:e.mergeModels({item:{type:Object,required:!0},colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const{t}=Fe(),a=l,r=e.useModel(l,"modelValue"),n=e.ref(!1),o=e.ref({}),s=e.ref({}),i=()=>{Ca({title:t("cms.builder.deleteTitle"),message:t("cms.builder.deleteField"),type:"error",onConfirm:()=>{c()}})},c=()=>{r.value=r.value.filter(d=>d.id!==a.item.id)},u=async()=>{if(await s.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}r.value=r.value.map(m=>m.id===a.item.id?o.value:m),n.value=!1};return e.watch(n,d=>{d&&(o.value=a.item)}),(d,m)=>(e.openBlock(),e.createElementBlock("div",yC,[e.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-8 w-8 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm",onClick:m[0]||(m[0]=f=>n.value=!0)},[e.createVNode(e.unref(Sn),{class:"w-4 h-4"})]),e.createElementVNode("button",{onClick:i,class:"inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-8 w-8 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"},[e.createVNode(e.unref(Gt),{class:"w-4 h-4"})]),e.createVNode(e.unref(Zt),{teleport:"#modal",title:d.$t("cms.builder.editField"),visible:n.value,onClose:m[4]||(m[4]=f=>n.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",kC,[e.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:m[3]||(m[3]=f=>n.value=!1)},e.toDisplayString(d.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:u,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(d.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Xe),{form:s.value,"onUpdate:form":m[1]||(m[1]=f=>s.value=f),schema:l.colModel,modelValue:o.value,"onUpdate:modelValue":m[2]||(m[2]=f=>o.value=f)},null,8,["form","schema","modelValue"])]),_:1},8,["title","visible"])]))}},wC={class:"p-6 border-t border-slate-200 dark:border-slate-700 bg-slate-50/30 dark:bg-slate-700/30"},_C={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},EC={__name:"vs-form-custom-datatable-add",props:e.mergeModels({colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const{t}=Fe(),a=e.useModel(l,"modelValue"),r=e.ref(!1),n=e.ref({}),o=e.ref({}),s=async()=>{try{if(await o.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}a.value=[...a.value||[],{...n.value,id:Math.random().toString(36).substring(2,15)}],r.value=!1,n.value={}}catch(i){console.log(i)}};return(i,c)=>(e.openBlock(),e.createElementBlock("div",wC,[e.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow-sm h-9 px-4 w-full border-2 border-dashed border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-slate-50 dark:hover:bg-slate-600 hover:border-blue-400 dark:hover:border-blue-500 text-slate-600 dark:text-slate-300 hover:text-blue-600 dark:hover:text-blue-400 py-3 transition-all duration-200",onClick:c[0]||(c[0]=u=>r.value=!0)},[e.createVNode(e.unref(rl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(i.$t("cms.common.actions.add")),1)]),e.createVNode(e.unref(Zt),{teleport:"#modal",title:i.$t("cms.common.actions.add"),visible:r.value,onClose:c[4]||(c[4]=u=>r.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",_C,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:c[3]||(c[3]=u=>r.value=!1)},e.toDisplayString(i.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:s,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(i.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Xe),{form:o.value,"onUpdate:form":c[1]||(c[1]=u=>o.value=u),schema:l.colModel,modelValue:n.value,"onUpdate:modelValue":c[2]||(c[2]=u=>n.value=u)},null,8,["form","schema","modelValue"])]),_:1},8,["title","visible"])]))}},CC={class:"p-0 shadow w-full"},VC={class:"overflow-x-auto"},NC={class:"relative w-full overflow-auto"},vC={class:"w-full caption-bottom text-sm"},BC={class:"[&_tr]:border-b"},SC={class:"border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors"},DC={class:"h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-end"},AC={class:"[&_tr:last-child]:border-0"},MC=["onDragstart","onDragover","onDrop","onDragenter"],TC={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center"},LC={class:"flex items-center justify-center text-slate-400"},$C=["innerHTML"],FC={key:1,class:"flex items-center gap-2"},IC={key:0,class:"flex items-center gap-1"},OC=["src","alt"],PC={key:0,class:"text-xs text-gray-500 dark:text-gray-400 ml-1"},RC={key:1,class:"w-8 h-8 rounded bg-gray-100 dark:bg-gray-700 flex items-center justify-center"},UC={key:2},jC={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"},zC={key:0,class:"h-2 bg-blue-200 dark:bg-blue-800 transition-all duration-200"},si=3,ii={__name:"vs-form-custom-datatable",props:e.mergeModels({colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=e.useModel(l,"modelValue"),a=e.ref(null),r=e.ref(-1),n=e.ref(!1),o=(p,y,h)=>{a.value=y,r.value=h,p.dataTransfer.effectAllowed="move",p.dataTransfer.setData("text/html","")},s=(p,y)=>{p.preventDefault(),p.dataTransfer.dropEffect="move"},i=(p,y)=>{r.value!==y&&(n.value=!0)},c=p=>{p.currentTarget.contains(p.relatedTarget)||(n.value=!1)},u=(p,y)=>{if(p.preventDefault(),n.value=!1,r.value===-1||r.value===y)return;const h=[...t.value],[g]=h.splice(r.value,1);h.splice(y,0,g),t.value=h,a.value=null,r.value=-1},d=p=>Array.isArray(p)?p.slice(0,si):[],m=p=>Array.isArray(p)?Math.max(0,p.length-si):0,f=p=>{const y=p.target;y.style.display="none";const h=document.createElement("cms.div");h.className="w-full h-full flex items-center justify-center bg-gray-200 dark:bg-gray-600",h.innerHTML=`
237
+ */function Ds(l,t){var a=Object.keys(l);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(l);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(l,r).enumerable})),a.push.apply(a,n)}return a}function Tt(l){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Ds(Object(a),!0).forEach(function(n){bE(l,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(a)):Ds(Object(a)).forEach(function(n){Object.defineProperty(l,n,Object.getOwnPropertyDescriptor(a,n))})}return l}function Ma(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ma=function(t){return typeof t}:Ma=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ma(l)}function bE(l,t,a){return t in l?Object.defineProperty(l,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[t]=a,l}function Ht(){return Ht=Object.assign||function(l){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(l[n]=a[n])}return l},Ht.apply(this,arguments)}function kE(l,t){if(l==null)return{};var a={},n=Object.keys(l),r,o;for(o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&(a[r]=l[r]);return a}function xE(l,t){if(l==null)return{};var a=kE(l,t),n,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(l);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(l,n)&&(a[n]=l[n])}return a}var wE="1.14.0";function qt(l){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(l)}var Gt=qt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Kl=qt(/Edge/i),As=qt(/firefox/i),Yl=qt(/safari/i)&&!qt(/chrome/i)&&!qt(/android/i),Ms=qt(/iP(ad|od|hone)/i),_E=qt(/chrome/i)&&qt(/android/i),Ts={capture:!1,passive:!1};function ve(l,t,a){l.addEventListener(t,a,!Gt&&Ts)}function Ve(l,t,a){l.removeEventListener(t,a,!Gt&&Ts)}function Ta(l,t){if(t){if(t[0]===">"&&(t=t.substring(1)),l)try{if(l.matches)return l.matches(t);if(l.msMatchesSelector)return l.msMatchesSelector(t);if(l.webkitMatchesSelector)return l.webkitMatchesSelector(t)}catch{return!1}return!1}}function EE(l){return l.host&&l!==document&&l.host.nodeType?l.host:l.parentNode}function Lt(l,t,a,n){if(l){a=a||document;do{if(t!=null&&(t[0]===">"?l.parentNode===a&&Ta(l,t):Ta(l,t))||n&&l===a)return l;if(l===a)break}while(l=EE(l))}return null}var Ls=/\s+/g;function ht(l,t,a){if(l&&t)if(l.classList)l.classList[a?"add":"remove"](t);else{var n=(" "+l.className+" ").replace(Ls," ").replace(" "+t+" "," ");l.className=(n+(a?" "+t:"")).replace(Ls," ")}}function se(l,t,a){var n=l&&l.style;if(n){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(l,""):l.currentStyle&&(a=l.currentStyle),t===void 0?a:a[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=a+(typeof a=="string"?"":"px")}}function Bl(l,t){var a="";if(typeof l=="string")a=l;else do{var n=se(l,"transform");n&&n!=="none"&&(a=n+" "+a)}while(!t&&(l=l.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(a)}function $s(l,t,a){if(l){var n=l.getElementsByTagName(t),r=0,o=n.length;if(a)for(;r<o;r++)a(n[r],r);return n}return[]}function $t(){var l=document.scrollingElement;return l||document.documentElement}function We(l,t,a,n,r){if(!(!l.getBoundingClientRect&&l!==window)){var o,s,i,c,u,d,m;if(l!==window&&l.parentNode&&l!==$t()?(o=l.getBoundingClientRect(),s=o.top,i=o.left,c=o.bottom,u=o.right,d=o.height,m=o.width):(s=0,i=0,c=window.innerHeight,u=window.innerWidth,d=window.innerHeight,m=window.innerWidth),(t||a)&&l!==window&&(r=r||l.parentNode,!Gt))do if(r&&r.getBoundingClientRect&&(se(r,"transform")!=="none"||a&&se(r,"position")!=="static")){var h=r.getBoundingClientRect();s-=h.top+parseInt(se(r,"border-top-width")),i-=h.left+parseInt(se(r,"border-left-width")),c=s+o.height,u=i+o.width;break}while(r=r.parentNode);if(n&&l!==window){var f=Bl(r||l),y=f&&f.a,k=f&&f.d;f&&(s/=k,i/=y,m/=y,d/=k,c=s+d,u=i+m)}return{top:s,left:i,bottom:c,right:u,width:m,height:d}}}function Fs(l,t,a){for(var n=ll(l,!0),r=We(l)[t];n;){var o=We(n)[a],s=void 0;if(s=r>=o,!s)return n;if(n===$t())break;n=ll(n,!1)}return!1}function Sl(l,t,a,n){for(var r=0,o=0,s=l.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==ie.ghost&&(n||s[o]!==ie.dragged)&&Lt(s[o],a.draggable,l,!1)){if(r===t)return s[o];r++}o++}return null}function Kn(l,t){for(var a=l.lastElementChild;a&&(a===ie.ghost||se(a,"display")==="none"||t&&!Ta(a,t));)a=a.previousElementSibling;return a||null}function _t(l,t){var a=0;if(!l||!l.parentNode)return-1;for(;l=l.previousElementSibling;)l.nodeName.toUpperCase()!=="TEMPLATE"&&l!==ie.clone&&(!t||Ta(l,t))&&a++;return a}function Is(l){var t=0,a=0,n=$t();if(l)do{var r=Bl(l),o=r.a,s=r.d;t+=l.scrollLeft*o,a+=l.scrollTop*s}while(l!==n&&(l=l.parentNode));return[t,a]}function CE(l,t){for(var a in l)if(l.hasOwnProperty(a)){for(var n in t)if(t.hasOwnProperty(n)&&t[n]===l[a][n])return Number(a)}return-1}function ll(l,t){if(!l||!l.getBoundingClientRect)return $t();var a=l,n=!1;do if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var r=se(a);if(a.clientWidth<a.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||a.clientHeight<a.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!a.getBoundingClientRect||a===document.body)return $t();if(n||t)return a;n=!0}}while(a=a.parentNode);return $t()}function VE(l,t){if(l&&t)for(var a in t)t.hasOwnProperty(a)&&(l[a]=t[a]);return l}function Yn(l,t){return Math.round(l.top)===Math.round(t.top)&&Math.round(l.left)===Math.round(t.left)&&Math.round(l.height)===Math.round(t.height)&&Math.round(l.width)===Math.round(t.width)}var Xl;function Os(l,t){return function(){if(!Xl){var a=arguments,n=this;a.length===1?l.call(n,a[0]):l.apply(n,a),Xl=setTimeout(function(){Xl=void 0},t)}}}function NE(){clearTimeout(Xl),Xl=void 0}function Ps(l,t,a){l.scrollLeft+=t,l.scrollTop+=a}function Rs(l){var t=window.Polymer,a=window.jQuery||window.Zepto;return t&&t.dom?t.dom(l).cloneNode(!0):a?a(l).clone(!0)[0]:l.cloneNode(!0)}var gt="Sortable"+new Date().getTime();function vE(){var l=[],t;return{captureAnimationState:function(){if(l=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(r){if(!(se(r,"display")==="none"||r===ie.ghost)){l.push({target:r,rect:We(r)});var o=Tt({},l[l.length-1].rect);if(r.thisAnimationDuration){var s=Bl(r,!0);s&&(o.top-=s.f,o.left-=s.e)}r.fromRect=o}})}},addAnimationState:function(n){l.push(n)},removeAnimationState:function(n){l.splice(CE(l,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var o=!1,s=0;l.forEach(function(i){var c=0,u=i.target,d=u.fromRect,m=We(u),h=u.prevFromRect,f=u.prevToRect,y=i.rect,k=Bl(u,!0);k&&(m.top-=k.f,m.left-=k.e),u.toRect=m,u.thisAnimationDuration&&Yn(h,m)&&!Yn(d,m)&&(y.top-m.top)/(y.left-m.left)===(d.top-m.top)/(d.left-m.left)&&(c=SE(y,h,f,r.options)),Yn(m,d)||(u.prevFromRect=d,u.prevToRect=m,c||(c=r.options.animation),r.animate(u,y,m,c)),c&&(o=!0,s=Math.max(s,c),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},c),u.thisAnimationDuration=c)}),clearTimeout(t),o?t=setTimeout(function(){typeof n=="function"&&n()},s):typeof n=="function"&&n(),l=[]},animate:function(n,r,o,s){if(s){se(n,"transition",""),se(n,"transform","");var i=Bl(this.el),c=i&&i.a,u=i&&i.d,d=(r.left-o.left)/(c||1),m=(r.top-o.top)/(u||1);n.animatingX=!!d,n.animatingY=!!m,se(n,"transform","translate3d("+d+"px,"+m+"px,0)"),this.forRepaintDummy=BE(n),se(n,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),se(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){se(n,"transition",""),se(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},s)}}}}function BE(l){return l.offsetWidth}function SE(l,t,a,n){return Math.sqrt(Math.pow(t.top-l.top,2)+Math.pow(t.left-l.left,2))/Math.sqrt(Math.pow(t.top-a.top,2)+Math.pow(t.left-a.left,2))*n.animation}var Dl=[],Xn={initializeByDefault:!0},Zl={mount:function(t){for(var a in Xn)Xn.hasOwnProperty(a)&&!(a in t)&&(t[a]=Xn[a]);Dl.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Dl.push(t)},pluginEvent:function(t,a,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";Dl.forEach(function(s){a[s.pluginName]&&(a[s.pluginName][o]&&a[s.pluginName][o](Tt({sortable:a},n)),a.options[s.pluginName]&&a[s.pluginName][t]&&a[s.pluginName][t](Tt({sortable:a},n)))})},initializePlugins:function(t,a,n,r){Dl.forEach(function(i){var c=i.pluginName;if(!(!t.options[c]&&!i.initializeByDefault)){var u=new i(t,a,t.options);u.sortable=t,u.options=t.options,t[c]=u,Ht(n,u.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var s=this.modifyOption(t,o,t.options[o]);typeof s<"u"&&(t.options[o]=s)}},getEventProperties:function(t,a){var n={};return Dl.forEach(function(r){typeof r.eventProperties=="function"&&Ht(n,r.eventProperties.call(a[r.pluginName],t))}),n},modifyOption:function(t,a,n){var r;return Dl.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[a]=="function"&&(r=o.optionListeners[a].call(t[o.pluginName],n))}),r}};function DE(l){var t=l.sortable,a=l.rootEl,n=l.name,r=l.targetEl,o=l.cloneEl,s=l.toEl,i=l.fromEl,c=l.oldIndex,u=l.newIndex,d=l.oldDraggableIndex,m=l.newDraggableIndex,h=l.originalEvent,f=l.putSortable,y=l.extraEventProperties;if(t=t||a&&a[gt],!!t){var k,g=t.options,p="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Gt&&!Kl?k=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(k=document.createEvent("Event"),k.initEvent(n,!0,!0)),k.to=s||a,k.from=i||a,k.item=r||a,k.clone=o,k.oldIndex=c,k.newIndex=u,k.oldDraggableIndex=d,k.newDraggableIndex=m,k.originalEvent=h,k.pullMode=f?f.lastPutMode:void 0;var x=Tt(Tt({},y),Zl.getEventProperties(n,t));for(var w in x)k[w]=x[w];a&&a.dispatchEvent(k),g[p]&&g[p].call(t,k)}}var AE=["evt"],dt=function(t,a){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,o=xE(n,AE);Zl.pluginEvent.bind(ie)(t,a,Tt({dragEl:Z,parentEl:je,ghostEl:pe,rootEl:Ie,nextEl:fl,lastDownEl:La,cloneEl:Ue,cloneHidden:al,dragStarted:Jl,putSortable:Qe,activeSortable:ie.active,originalEvent:r,oldIndex:Al,oldDraggableIndex:Ql,newIndex:yt,newDraggableIndex:nl,hideGhostForTarget:Ws,unhideGhostForTarget:Ks,cloneNowHidden:function(){al=!0},cloneNowShown:function(){al=!1},dispatchSortableEvent:function(i){ot({sortable:a,name:i,originalEvent:r})}},o))};function ot(l){DE(Tt({putSortable:Qe,cloneEl:Ue,targetEl:Z,rootEl:Ie,oldIndex:Al,oldDraggableIndex:Ql,newIndex:yt,newDraggableIndex:nl},l))}var Z,je,pe,Ie,fl,La,Ue,al,Al,yt,Ql,nl,$a,Qe,Ml=!1,Fa=!1,Ia=[],hl,Nt,Zn,Qn,js,Us,Jl,Tl,ea,ta=!1,Oa=!1,Pa,lt,Jn=[],er=!1,Ra=[],ja=typeof document<"u",Ua=Ms,zs=Kl||Gt?"cssFloat":"float",ME=ja&&!_E&&!Ms&&"draggable"in document.createElement("div"),Hs=function(){if(ja){if(Gt)return!1;var l=document.createElement("x");return l.style.cssText="pointer-events:auto",l.style.pointerEvents==="auto"}}(),qs=function(t,a){var n=se(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Sl(t,0,a),s=Sl(t,1,a),i=o&&se(o),c=s&&se(s),u=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+We(o).width,d=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+We(s).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&i.float&&i.float!=="none"){var m=i.float==="left"?"left":"right";return s&&(c.clear==="both"||c.clear===m)?"vertical":"horizontal"}return o&&(i.display==="block"||i.display==="flex"||i.display==="table"||i.display==="grid"||u>=r&&n[zs]==="none"||s&&n[zs]==="none"&&u+d>r)?"vertical":"horizontal"},TE=function(t,a,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,s=n?t.width:t.height,i=n?a.left:a.top,c=n?a.right:a.bottom,u=n?a.width:a.height;return r===i||o===c||r+s/2===i+u/2},LE=function(t,a){var n;return Ia.some(function(r){var o=r[gt].options.emptyInsertThreshold;if(!(!o||Kn(r))){var s=We(r),i=t>=s.left-o&&t<=s.right+o,c=a>=s.top-o&&a<=s.bottom+o;if(i&&c)return n=r}}),n},Gs=function(t){function a(o,s){return function(i,c,u,d){var m=i.options.group.name&&c.options.group.name&&i.options.group.name===c.options.group.name;if(o==null&&(s||m))return!0;if(o==null||o===!1)return!1;if(s&&o==="clone")return o;if(typeof o=="function")return a(o(i,c,u,d),s)(i,c,u,d);var h=(s?i:c).options.group.name;return o===!0||typeof o=="string"&&o===h||o.join&&o.indexOf(h)>-1}}var n={},r=t.group;(!r||Ma(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=a(r.pull,!0),n.checkPut=a(r.put),n.revertClone=r.revertClone,t.group=n},Ws=function(){!Hs&&pe&&se(pe,"display","none")},Ks=function(){!Hs&&pe&&se(pe,"display","")};ja&&document.addEventListener("click",function(l){if(Fa)return l.preventDefault(),l.stopPropagation&&l.stopPropagation(),l.stopImmediatePropagation&&l.stopImmediatePropagation(),Fa=!1,!1},!0);var gl=function(t){if(Z){t=t.touches?t.touches[0]:t;var a=LE(t.clientX,t.clientY);if(a){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=a,n.preventDefault=void 0,n.stopPropagation=void 0,a[gt]._onDragOver(n)}}},$E=function(t){Z&&Z.parentNode[gt]._isOutsideThisEl(t.target)};function ie(l,t){if(!(l&&l.nodeType&&l.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(l));this.el=l,this.options=t=Ht({},t),l[gt]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(l.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return qs(l,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,i){s.setData("Text",i.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ie.supportPointer!==!1&&"PointerEvent"in window&&!Yl,emptyInsertThreshold:5};Zl.initializePlugins(this,l,a);for(var n in a)!(n in t)&&(t[n]=a[n]);Gs(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:ME,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?ve(l,"pointerdown",this._onTapStart):(ve(l,"mousedown",this._onTapStart),ve(l,"touchstart",this._onTapStart)),this.nativeDraggable&&(ve(l,"dragover",this),ve(l,"dragenter",this)),Ia.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ht(this,vE())}ie.prototype={constructor:ie,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Tl=null)},_getDirection:function(t,a){return typeof this.options.direction=="function"?this.options.direction.call(this,t,a,Z):this.options.direction},_onTapStart:function(t){if(t.cancelable){var a=this,n=this.el,r=this.options,o=r.preventOnFilter,s=t.type,i=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,c=(i||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||c,d=r.filter;if(zE(n),!Z&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||r.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Yl&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=Lt(c,r.draggable,n,!1),!(c&&c.animated)&&La!==c)){if(Al=_t(c),Ql=_t(c,r.draggable),typeof d=="function"){if(d.call(this,t,c,this)){ot({sortable:a,rootEl:u,name:"filter",targetEl:c,toEl:n,fromEl:n}),dt("filter",a,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(m){if(m=Lt(u,m.trim(),n,!1),m)return ot({sortable:a,rootEl:m,name:"filter",targetEl:c,fromEl:n,toEl:n}),dt("filter",a,{evt:t}),!0}),d)){o&&t.cancelable&&t.preventDefault();return}r.handle&&!Lt(u,r.handle,n,!1)||this._prepareDragStart(t,i,c)}}},_prepareDragStart:function(t,a,n){var r=this,o=r.el,s=r.options,i=o.ownerDocument,c;if(n&&!Z&&n.parentNode===o){var u=We(n);if(Ie=o,Z=n,je=Z.parentNode,fl=Z.nextSibling,La=n,$a=s.group,ie.dragged=Z,hl={target:Z,clientX:(a||t).clientX,clientY:(a||t).clientY},js=hl.clientX-u.left,Us=hl.clientY-u.top,this._lastX=(a||t).clientX,this._lastY=(a||t).clientY,Z.style["will-change"]="all",c=function(){if(dt("delayEnded",r,{evt:t}),ie.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!As&&r.nativeDraggable&&(Z.draggable=!0),r._triggerDragStart(t,a),ot({sortable:r,name:"choose",originalEvent:t}),ht(Z,s.chosenClass,!0)},s.ignore.split(",").forEach(function(d){$s(Z,d.trim(),tr)}),ve(i,"dragover",gl),ve(i,"mousemove",gl),ve(i,"touchmove",gl),ve(i,"mouseup",r._onDrop),ve(i,"touchend",r._onDrop),ve(i,"touchcancel",r._onDrop),As&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),dt("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(Kl||Gt))){if(ie.eventCanceled){this._onDrop();return}ve(i,"mouseup",r._disableDelayedDrag),ve(i,"touchend",r._disableDelayedDrag),ve(i,"touchcancel",r._disableDelayedDrag),ve(i,"mousemove",r._delayedDragTouchMoveHandler),ve(i,"touchmove",r._delayedDragTouchMoveHandler),s.supportPointer&&ve(i,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(c,s.delay)}else c()}},_delayedDragTouchMoveHandler:function(t){var a=t.touches?t.touches[0]:t;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&tr(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Ve(t,"mouseup",this._disableDelayedDrag),Ve(t,"touchend",this._disableDelayedDrag),Ve(t,"touchcancel",this._disableDelayedDrag),Ve(t,"mousemove",this._delayedDragTouchMoveHandler),Ve(t,"touchmove",this._delayedDragTouchMoveHandler),Ve(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,a){a=a||t.pointerType=="touch"&&t,!this.nativeDraggable||a?this.options.supportPointer?ve(document,"pointermove",this._onTouchMove):a?ve(document,"touchmove",this._onTouchMove):ve(document,"mousemove",this._onTouchMove):(ve(Z,"dragend",this),ve(Ie,"dragstart",this._onDragStart));try{document.selection?Ha(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,a){if(Ml=!1,Ie&&Z){dt("dragStarted",this,{evt:a}),this.nativeDraggable&&ve(document,"dragover",$E);var n=this.options;!t&&ht(Z,n.dragClass,!1),ht(Z,n.ghostClass,!0),ie.active=this,t&&this._appendGhost(),ot({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(Nt){this._lastX=Nt.clientX,this._lastY=Nt.clientY,Ws();for(var t=document.elementFromPoint(Nt.clientX,Nt.clientY),a=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Nt.clientX,Nt.clientY),t!==a);)a=t;if(Z.parentNode[gt]._isOutsideThisEl(t),a)do{if(a[gt]){var n=void 0;if(n=a[gt]._onDragOver({clientX:Nt.clientX,clientY:Nt.clientY,target:t,rootEl:a}),n&&!this.options.dragoverBubble)break}t=a}while(a=a.parentNode);Ks()}},_onTouchMove:function(t){if(hl){var a=this.options,n=a.fallbackTolerance,r=a.fallbackOffset,o=t.touches?t.touches[0]:t,s=pe&&Bl(pe,!0),i=pe&&s&&s.a,c=pe&&s&&s.d,u=Ua&&lt&&Is(lt),d=(o.clientX-hl.clientX+r.x)/(i||1)+(u?u[0]-Jn[0]:0)/(i||1),m=(o.clientY-hl.clientY+r.y)/(c||1)+(u?u[1]-Jn[1]:0)/(c||1);if(!ie.active&&!Ml){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(pe){s?(s.e+=d-(Zn||0),s.f+=m-(Qn||0)):s={a:1,b:0,c:0,d:1,e:d,f:m};var h="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");se(pe,"webkitTransform",h),se(pe,"mozTransform",h),se(pe,"msTransform",h),se(pe,"transform",h),Zn=d,Qn=m,Nt=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!pe){var t=this.options.fallbackOnBody?document.body:Ie,a=We(Z,!0,Ua,!0,t),n=this.options;if(Ua){for(lt=t;se(lt,"position")==="static"&&se(lt,"transform")==="none"&&lt!==document;)lt=lt.parentNode;lt!==document.body&&lt!==document.documentElement?(lt===document&&(lt=$t()),a.top+=lt.scrollTop,a.left+=lt.scrollLeft):lt=$t(),Jn=Is(lt)}pe=Z.cloneNode(!0),ht(pe,n.ghostClass,!1),ht(pe,n.fallbackClass,!0),ht(pe,n.dragClass,!0),se(pe,"transition",""),se(pe,"transform",""),se(pe,"box-sizing","border-box"),se(pe,"margin",0),se(pe,"top",a.top),se(pe,"left",a.left),se(pe,"width",a.width),se(pe,"height",a.height),se(pe,"opacity","0.8"),se(pe,"position",Ua?"absolute":"fixed"),se(pe,"zIndex","100000"),se(pe,"pointerEvents","none"),ie.ghost=pe,t.appendChild(pe),se(pe,"transform-origin",js/parseInt(pe.style.width)*100+"% "+Us/parseInt(pe.style.height)*100+"%")}},_onDragStart:function(t,a){var n=this,r=t.dataTransfer,o=n.options;if(dt("dragStart",this,{evt:t}),ie.eventCanceled){this._onDrop();return}dt("setupClone",this),ie.eventCanceled||(Ue=Rs(Z),Ue.draggable=!1,Ue.style["will-change"]="",this._hideClone(),ht(Ue,this.options.chosenClass,!1),ie.clone=Ue),n.cloneId=Ha(function(){dt("clone",n),!ie.eventCanceled&&(n.options.removeCloneOnHide||Ie.insertBefore(Ue,Z),n._hideClone(),ot({sortable:n,name:"clone"}))}),!a&&ht(Z,o.dragClass,!0),a?(Fa=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ve(document,"mouseup",n._onDrop),Ve(document,"touchend",n._onDrop),Ve(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,Z)),ve(document,"drop",n),se(Z,"transform","translateZ(0)")),Ml=!0,n._dragStartId=Ha(n._dragStarted.bind(n,a,t)),ve(document,"selectstart",n),Jl=!0,Yl&&se(document.body,"user-select","none")},_onDragOver:function(t){var a=this.el,n=t.target,r,o,s,i=this.options,c=i.group,u=ie.active,d=$a===c,m=i.sort,h=Qe||u,f,y=this,k=!1;if(er)return;function g(z,Q){dt(z,y,Tt({evt:t,isOwner:d,axis:f?"vertical":"horizontal",revert:s,dragRect:r,targetRect:o,canSort:m,fromSortable:h,target:n,completed:x,onMove:function(Ne,Ke){return za(Ie,a,Z,r,Ne,We(Ne),t,Ke)},changed:w},Q))}function p(){g("dragOverAnimationCapture"),y.captureAnimationState(),y!==h&&h.captureAnimationState()}function x(z){return g("dragOverCompleted",{insertion:z}),z&&(d?u._hideClone():u._showClone(y),y!==h&&(ht(Z,Qe?Qe.options.ghostClass:u.options.ghostClass,!1),ht(Z,i.ghostClass,!0)),Qe!==y&&y!==ie.active?Qe=y:y===ie.active&&Qe&&(Qe=null),h===y&&(y._ignoreWhileAnimating=n),y.animateAll(function(){g("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(n===Z&&!Z.animated||n===a&&!n.animated)&&(Tl=null),!i.dragoverBubble&&!t.rootEl&&n!==document&&(Z.parentNode[gt]._isOutsideThisEl(t.target),!z&&gl(t)),!i.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),k=!0}function w(){yt=_t(Z),nl=_t(Z,i.draggable),ot({sortable:y,name:"change",toEl:a,newIndex:yt,newDraggableIndex:nl,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=Lt(n,i.draggable,a,!0),g("dragOver"),ie.eventCanceled)return k;if(Z.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||y._ignoreWhileAnimating===n)return x(!1);if(Fa=!1,u&&!i.disabled&&(d?m||(s=je!==Ie):Qe===this||(this.lastPutMode=$a.checkPull(this,u,Z,t))&&c.checkPut(this,u,Z,t))){if(f=this._getDirection(t,n)==="vertical",r=We(Z),g("dragOverValid"),ie.eventCanceled)return k;if(s)return je=Ie,p(),this._hideClone(),g("revert"),ie.eventCanceled||(fl?Ie.insertBefore(Z,fl):Ie.appendChild(Z)),x(!0);var b=Kn(a,i.draggable);if(!b||PE(t,f,this)&&!b.animated){if(b===Z)return x(!1);if(b&&a===t.target&&(n=b),n&&(o=We(n)),za(Ie,a,Z,r,n,o,t,!!n)!==!1)return p(),a.appendChild(Z),je=a,w(),x(!0)}else if(b&&OE(t,f,this)){var _=Sl(a,0,i,!0);if(_===Z)return x(!1);if(n=_,o=We(n),za(Ie,a,Z,r,n,o,t,!1)!==!1)return p(),a.insertBefore(Z,_),je=a,w(),x(!0)}else if(n.parentNode===a){o=We(n);var V=0,E,M=Z.parentNode!==a,D=!TE(Z.animated&&Z.toRect||r,n.animated&&n.toRect||o,f),A=f?"top":"left",$=Fs(n,"top","top")||Fs(Z,"top","top"),U=$?$.scrollTop:void 0;Tl!==n&&(E=o[A],ta=!1,Oa=!D&&i.invertSwap||M),V=RE(t,n,o,f,D?1:i.swapThreshold,i.invertedSwapThreshold==null?i.swapThreshold:i.invertedSwapThreshold,Oa,Tl===n);var W;if(V!==0){var O=_t(Z);do O-=V,W=je.children[O];while(W&&(se(W,"display")==="none"||W===pe))}if(V===0||W===n)return x(!1);Tl=n,ea=V;var I=n.nextElementSibling,F=!1;F=V===1;var T=za(Ie,a,Z,r,n,o,t,F);if(T!==!1)return(T===1||T===-1)&&(F=T===1),er=!0,setTimeout(IE,30),p(),F&&!I?a.appendChild(Z):n.parentNode.insertBefore(Z,F?I:n),$&&Ps($,0,U-$.scrollTop),je=Z.parentNode,E!==void 0&&!Oa&&(Pa=Math.abs(E-We(n)[A])),w(),x(!0)}if(a.contains(Z))return x(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ve(document,"mousemove",this._onTouchMove),Ve(document,"touchmove",this._onTouchMove),Ve(document,"pointermove",this._onTouchMove),Ve(document,"dragover",gl),Ve(document,"mousemove",gl),Ve(document,"touchmove",gl)},_offUpEvents:function(){var t=this.el.ownerDocument;Ve(t,"mouseup",this._onDrop),Ve(t,"touchend",this._onDrop),Ve(t,"pointerup",this._onDrop),Ve(t,"touchcancel",this._onDrop),Ve(document,"selectstart",this)},_onDrop:function(t){var a=this.el,n=this.options;if(yt=_t(Z),nl=_t(Z,n.draggable),dt("drop",this,{evt:t}),je=Z&&Z.parentNode,yt=_t(Z),nl=_t(Z,n.draggable),ie.eventCanceled){this._nulling();return}Ml=!1,Oa=!1,ta=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),lr(this.cloneId),lr(this._dragStartId),this.nativeDraggable&&(Ve(document,"drop",this),Ve(a,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Yl&&se(document.body,"user-select",""),se(Z,"transform",""),t&&(Jl&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),pe&&pe.parentNode&&pe.parentNode.removeChild(pe),(Ie===je||Qe&&Qe.lastPutMode!=="clone")&&Ue&&Ue.parentNode&&Ue.parentNode.removeChild(Ue),Z&&(this.nativeDraggable&&Ve(Z,"dragend",this),tr(Z),Z.style["will-change"]="",Jl&&!Ml&&ht(Z,Qe?Qe.options.ghostClass:this.options.ghostClass,!1),ht(Z,this.options.chosenClass,!1),ot({sortable:this,name:"unchoose",toEl:je,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ie!==je?(yt>=0&&(ot({rootEl:je,name:"add",toEl:je,fromEl:Ie,originalEvent:t}),ot({sortable:this,name:"remove",toEl:je,originalEvent:t}),ot({rootEl:je,name:"sort",toEl:je,fromEl:Ie,originalEvent:t}),ot({sortable:this,name:"sort",toEl:je,originalEvent:t})),Qe&&Qe.save()):yt!==Al&&yt>=0&&(ot({sortable:this,name:"update",toEl:je,originalEvent:t}),ot({sortable:this,name:"sort",toEl:je,originalEvent:t})),ie.active&&((yt==null||yt===-1)&&(yt=Al,nl=Ql),ot({sortable:this,name:"end",toEl:je,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){dt("nulling",this),Ie=Z=je=pe=fl=Ue=La=al=hl=Nt=Jl=yt=nl=Al=Ql=Tl=ea=Qe=$a=ie.dragged=ie.ghost=ie.clone=ie.active=null,Ra.forEach(function(t){t.checked=!0}),Ra.length=Zn=Qn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Z&&(this._onDragOver(t),FE(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],a,n=this.el.children,r=0,o=n.length,s=this.options;r<o;r++)a=n[r],Lt(a,s.draggable,this.el,!1)&&t.push(a.getAttribute(s.dataIdAttr)||UE(a));return t},sort:function(t,a){var n={},r=this.el;this.toArray().forEach(function(o,s){var i=r.children[s];Lt(i,this.options.draggable,r,!1)&&(n[o]=i)},this),a&&this.captureAnimationState(),t.forEach(function(o){n[o]&&(r.removeChild(n[o]),r.appendChild(n[o]))}),a&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,a){return Lt(t,a||this.options.draggable,this.el,!1)},option:function(t,a){var n=this.options;if(a===void 0)return n[t];var r=Zl.modifyOption(this,t,a);typeof r<"u"?n[t]=r:n[t]=a,t==="group"&&Gs(n)},destroy:function(){dt("destroy",this);var t=this.el;t[gt]=null,Ve(t,"mousedown",this._onTapStart),Ve(t,"touchstart",this._onTapStart),Ve(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ve(t,"dragover",this),Ve(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ia.splice(Ia.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!al){if(dt("hideClone",this),ie.eventCanceled)return;se(Ue,"display","none"),this.options.removeCloneOnHide&&Ue.parentNode&&Ue.parentNode.removeChild(Ue),al=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(al){if(dt("showClone",this),ie.eventCanceled)return;Z.parentNode==Ie&&!this.options.group.revertClone?Ie.insertBefore(Ue,Z):fl?Ie.insertBefore(Ue,fl):Ie.appendChild(Ue),this.options.group.revertClone&&this.animate(Z,Ue),se(Ue,"display",""),al=!1}}};function FE(l){l.dataTransfer&&(l.dataTransfer.dropEffect="move"),l.cancelable&&l.preventDefault()}function za(l,t,a,n,r,o,s,i){var c,u=l[gt],d=u.options.onMove,m;return window.CustomEvent&&!Gt&&!Kl?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=t,c.from=l,c.dragged=a,c.draggedRect=n,c.related=r||t,c.relatedRect=o||We(t),c.willInsertAfter=i,c.originalEvent=s,l.dispatchEvent(c),d&&(m=d.call(u,c,s)),m}function tr(l){l.draggable=!1}function IE(){er=!1}function OE(l,t,a){var n=We(Sl(a.el,0,a.options,!0)),r=10;return t?l.clientX<n.left-r||l.clientY<n.top&&l.clientX<n.right:l.clientY<n.top-r||l.clientY<n.bottom&&l.clientX<n.left}function PE(l,t,a){var n=We(Kn(a.el,a.options.draggable)),r=10;return t?l.clientX>n.right+r||l.clientX<=n.right&&l.clientY>n.bottom&&l.clientX>=n.left:l.clientX>n.right&&l.clientY>n.top||l.clientX<=n.right&&l.clientY>n.bottom+r}function RE(l,t,a,n,r,o,s,i){var c=n?l.clientY:l.clientX,u=n?a.height:a.width,d=n?a.top:a.left,m=n?a.bottom:a.right,h=!1;if(!s){if(i&&Pa<u*r){if(!ta&&(ea===1?c>d+u*o/2:c<m-u*o/2)&&(ta=!0),ta)h=!0;else if(ea===1?c<d+Pa:c>m-Pa)return-ea}else if(c>d+u*(1-r)/2&&c<m-u*(1-r)/2)return jE(t)}return h=h||s,h&&(c<d+u*o/2||c>m-u*o/2)?c>d+u/2?1:-1:0}function jE(l){return _t(Z)<_t(l)?1:-1}function UE(l){for(var t=l.tagName+l.className+l.src+l.href+l.textContent,a=t.length,n=0;a--;)n+=t.charCodeAt(a);return n.toString(36)}function zE(l){Ra.length=0;for(var t=l.getElementsByTagName("input"),a=t.length;a--;){var n=t[a];n.checked&&Ra.push(n)}}function Ha(l){return setTimeout(l,0)}function lr(l){return clearTimeout(l)}ja&&ve(document,"touchmove",function(l){(ie.active||Ml)&&l.cancelable&&l.preventDefault()}),ie.utils={on:ve,off:Ve,css:se,find:$s,is:function(t,a){return!!Lt(t,a,t,!1)},extend:VE,throttle:Os,closest:Lt,toggleClass:ht,clone:Rs,index:_t,nextTick:Ha,cancelNextTick:lr,detectDirection:qs,getChild:Sl},ie.get=function(l){return l[gt]},ie.mount=function(){for(var l=arguments.length,t=new Array(l),a=0;a<l;a++)t[a]=arguments[a];t[0].constructor===Array&&(t=t[0]),t.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(ie.utils=Tt(Tt({},ie.utils),n.utils)),Zl.mount(n)})},ie.create=function(l,t){return new ie(l,t)},ie.version=wE;var He=[],la,ar,nr=!1,rr,or,qa,aa;function HE(){function l(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return l.prototype={dragStarted:function(a){var n=a.originalEvent;this.sortable.nativeDraggable?ve(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ve(document,"pointermove",this._handleFallbackAutoScroll):n.touches?ve(document,"touchmove",this._handleFallbackAutoScroll):ve(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(a){var n=a.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Ve(document,"dragover",this._handleAutoScroll):(Ve(document,"pointermove",this._handleFallbackAutoScroll),Ve(document,"touchmove",this._handleFallbackAutoScroll),Ve(document,"mousemove",this._handleFallbackAutoScroll)),Ys(),Ga(),NE()},nulling:function(){qa=ar=la=nr=aa=rr=or=null,He.length=0},_handleFallbackAutoScroll:function(a){this._handleAutoScroll(a,!0)},_handleAutoScroll:function(a,n){var r=this,o=(a.touches?a.touches[0]:a).clientX,s=(a.touches?a.touches[0]:a).clientY,i=document.elementFromPoint(o,s);if(qa=a,n||this.options.forceAutoScrollFallback||Kl||Gt||Yl){sr(a,this.options,i,n);var c=ll(i,!0);nr&&(!aa||o!==rr||s!==or)&&(aa&&Ys(),aa=setInterval(function(){var u=ll(document.elementFromPoint(o,s),!0);u!==c&&(c=u,Ga()),sr(a,r.options,u,n)},10),rr=o,or=s)}else{if(!this.options.bubbleScroll||ll(i,!0)===$t()){Ga();return}sr(a,this.options,ll(i,!1),!1)}}},Ht(l,{pluginName:"scroll",initializeByDefault:!0})}function Ga(){He.forEach(function(l){clearInterval(l.pid)}),He=[]}function Ys(){clearInterval(aa)}var sr=Os(function(l,t,a,n){if(t.scroll){var r=(l.touches?l.touches[0]:l).clientX,o=(l.touches?l.touches[0]:l).clientY,s=t.scrollSensitivity,i=t.scrollSpeed,c=$t(),u=!1,d;ar!==a&&(ar=a,Ga(),la=t.scroll,d=t.scrollFn,la===!0&&(la=ll(a,!0)));var m=0,h=la;do{var f=h,y=We(f),k=y.top,g=y.bottom,p=y.left,x=y.right,w=y.width,b=y.height,_=void 0,V=void 0,E=f.scrollWidth,M=f.scrollHeight,D=se(f),A=f.scrollLeft,$=f.scrollTop;f===c?(_=w<E&&(D.overflowX==="auto"||D.overflowX==="scroll"||D.overflowX==="visible"),V=b<M&&(D.overflowY==="auto"||D.overflowY==="scroll"||D.overflowY==="visible")):(_=w<E&&(D.overflowX==="auto"||D.overflowX==="scroll"),V=b<M&&(D.overflowY==="auto"||D.overflowY==="scroll"));var U=_&&(Math.abs(x-r)<=s&&A+w<E)-(Math.abs(p-r)<=s&&!!A),W=V&&(Math.abs(g-o)<=s&&$+b<M)-(Math.abs(k-o)<=s&&!!$);if(!He[m])for(var O=0;O<=m;O++)He[O]||(He[O]={});(He[m].vx!=U||He[m].vy!=W||He[m].el!==f)&&(He[m].el=f,He[m].vx=U,He[m].vy=W,clearInterval(He[m].pid),(U!=0||W!=0)&&(u=!0,He[m].pid=setInterval((function(){n&&this.layer===0&&ie.active._onTouchMove(qa);var I=He[this.layer].vy?He[this.layer].vy*i:0,F=He[this.layer].vx?He[this.layer].vx*i:0;typeof d=="function"&&d.call(ie.dragged.parentNode[gt],F,I,l,qa,He[this.layer].el)!=="continue"||Ps(He[this.layer].el,F,I)}).bind({layer:m}),24))),m++}while(t.bubbleScroll&&h!==c&&(h=ll(h,!1)));nr=u}},30),Xs=function(t){var a=t.originalEvent,n=t.putSortable,r=t.dragEl,o=t.activeSortable,s=t.dispatchSortableEvent,i=t.hideGhostForTarget,c=t.unhideGhostForTarget;if(a){var u=n||o;i();var d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,m=document.elementFromPoint(d.clientX,d.clientY);c(),u&&!u.el.contains(m)&&(s("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function ir(){}ir.prototype={startIndex:null,dragStart:function(t){var a=t.oldDraggableIndex;this.startIndex=a},onSpill:function(t){var a=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=Sl(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(a,r):this.sortable.el.appendChild(a),this.sortable.animateAll(),n&&n.animateAll()},drop:Xs},Ht(ir,{pluginName:"revertOnSpill"});function cr(){}cr.prototype={onSpill:function(t){var a=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),a.parentNode&&a.parentNode.removeChild(a),r.animateAll()},drop:Xs},Ht(cr,{pluginName:"removeOnSpill"}),ie.mount(new HE),ie.mount(cr,ir);function dr(l){l.parentElement!==null&&l.parentElement.removeChild(l)}function Zs(l,t,a){const n=a===0?l.children[0]:l.children[a-1].nextSibling;l.insertBefore(t,n)}function qE(){return typeof window<"u"?window.console:global.console}const GE=qE();function WE(l){const t=Object.create(null);return function(n){return t[n]||(t[n]=l(n))}}const KE=/-(\w)/g,YE=WE(l=>l.replace(KE,(t,a)=>a.toUpperCase())),Qs=["Start","Add","Remove","Update","End"],Js=["Choose","Unchoose","Sort","Filter","Clone"],ei=["Move"],XE=[ei,Qs,Js].flatMap(l=>l).map(l=>`on${l}`),ur={manage:ei,manageAndEmit:Qs,emit:Js};function ZE(l){return XE.indexOf(l)!==-1}const QE=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function JE(l){return QE.includes(l)}function eC(l){return["transition-group","TransitionGroup"].includes(l)}function ti(l){return["id","class","role","style"].includes(l)||l.startsWith("data-")||l.startsWith("aria-")||l.startsWith("on")}function li(l){return l.reduce((t,[a,n])=>(t[a]=n,t),{})}function tC({$attrs:l,componentData:t={}}){return{...li(Object.entries(l).filter(([n,r])=>ti(n))),...t}}function lC({$attrs:l,callBackBuilder:t}){const a=li(ai(l));Object.entries(t).forEach(([r,o])=>{ur[r].forEach(s=>{a[`on${s}`]=o(s)})});const n=`[data-draggable]${a.draggable||""}`;return{...a,draggable:n}}function ai(l){return Object.entries(l).filter(([t,a])=>!ti(t)).map(([t,a])=>[YE(t),a]).filter(([t,a])=>!ZE(t))}const ni=({el:l})=>l,aC=(l,t)=>l.__draggable_context=t,ri=l=>l.__draggable_context;class nC{constructor({nodes:{header:t,default:a,footer:n},root:r,realList:o}){this.defaultNodes=a,this.children=[...t,...a,...n],this.externalComponent=r.externalComponent,this.rootTransition=r.transition,this.tag=r.tag,this.realList=o}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(t,a){const{tag:n,children:r,_isRootComponent:o}=this;return t(n,a,o?{default:()=>r}:r)}updated(){const{defaultNodes:t,realList:a}=this;t.forEach((n,r)=>{aC(ni(n),{element:a[r],index:r})})}getUnderlyingVm(t){return ri(t)}getVmIndexFromDomIndex(t,a){const{defaultNodes:n}=this,{length:r}=n,o=a.children,s=o.item(t);if(s===null)return r;const i=ri(s);if(i)return i.index;if(r===0)return 0;const c=ni(n[0]),u=[...o].findIndex(d=>d===c);return t<u?0:r}}function rC(l,t){const a=l[t];return a?a():[]}function oC({$slots:l,realList:t,getKey:a}){const n=t||[],[r,o]=["header","footer"].map(c=>rC(l,c)),{item:s}=l;if(!s)throw new Error("draggable element must have an item slot");const i=n.flatMap((c,u)=>s({element:c,index:u}).map(d=>(d.key=a(c),d.props={...d.props||{},"data-draggable":!0},d)));if(i.length!==n.length)throw new Error("Item slot must have only one child");return{header:r,footer:o,default:i}}function sC(l){const t=eC(l),a=!JE(l)&&!t;return{transition:t,externalComponent:a,tag:a?e.resolveComponent(l):t?e.TransitionGroup:l}}function iC({$slots:l,tag:t,realList:a,getKey:n}){const r=oC({$slots:l,realList:a,getKey:n}),o=sC(t);return new nC({nodes:r,root:o,realList:a})}function oi(l,t){e.nextTick(()=>this.$emit(l.toLowerCase(),t))}function si(l){return(t,a)=>{if(this.realList!==null)return this[`onDrag${l}`](t,a)}}function cC(l){const t=si.call(this,l);return(a,n)=>{t.call(this,a,n),oi.call(this,l,a)}}let mr=null;const dC={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:l=>l},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},uC=["update:modelValue","change",...[...ur.manageAndEmit,...ur.emit].map(l=>l.toLowerCase())],ii=e.defineComponent({name:"draggable",inheritAttrs:!1,props:dC,emits:uC,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:l,$attrs:t,tag:a,componentData:n,realList:r,getKey:o}=this,s=iC({$slots:l,tag:a,realList:r,getKey:o});this.componentStructure=s;const i=tC({$attrs:t,componentData:n});return s.render(e.h,i)}catch(l){return this.error=!0,e.h("pre",{style:{color:"red"}},l.stack)}},created(){this.list!==null&&this.modelValue!==null&&GE.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:l,$el:t,componentStructure:a}=this;a.updated();const n=lC({$attrs:l,callBackBuilder:{manageAndEmit:o=>cC.call(this,o),emit:o=>oi.bind(this,o),manage:o=>si.call(this,o)}}),r=t.nodeType===1?t:t.parentElement;this._sortable=new ie(r,n),this.targetDomElement=r,r.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:l}=this;return l||this.modelValue},getKey(){const{itemKey:l}=this;return typeof l=="function"?l:t=>t[l]}},watch:{$attrs:{handler(l){const{_sortable:t}=this;t&&ai(l).forEach(([a,n])=>{t.option(a,n)})},deep:!0}},methods:{getUnderlyingVm(l){return this.componentStructure.getUnderlyingVm(l)||null},getUnderlyingPotencialDraggableComponent(l){return l.__draggable_component__},emitChanges(l){e.nextTick(()=>this.$emit("change",l))},alterList(l){if(this.list){l(this.list);return}const t=[...this.modelValue];l(t),this.$emit("update:modelValue",t)},spliceList(){const l=t=>t.splice(...arguments);this.alterList(l)},updatePosition(l,t){const a=n=>n.splice(t,0,n.splice(l,1)[0]);this.alterList(a)},getRelatedContextFromMoveEvent({to:l,related:t}){const a=this.getUnderlyingPotencialDraggableComponent(l);if(!a)return{component:a};const n=a.realList,r={list:n,component:a};return l!==t&&n?{...a.getUnderlyingVm(t)||{},...r}:r},getVmIndexFromDomIndex(l){return this.componentStructure.getVmIndexFromDomIndex(l,this.targetDomElement)},onDragStart(l){this.context=this.getUnderlyingVm(l.item),l.item._underlying_vm_=this.clone(this.context.element),mr=l.item},onDragAdd(l){const t=l.item._underlying_vm_;if(t===void 0)return;dr(l.item);const a=this.getVmIndexFromDomIndex(l.newIndex);this.spliceList(a,0,t);const n={element:t,newIndex:a};this.emitChanges({added:n})},onDragRemove(l){if(Zs(this.$el,l.item,l.oldIndex),l.pullMode==="clone"){dr(l.clone);return}const{index:t,element:a}=this.context;this.spliceList(t,1);const n={element:a,oldIndex:t};this.emitChanges({removed:n})},onDragUpdate(l){dr(l.item),Zs(l.from,l.item,l.oldIndex);const t=this.context.index,a=this.getVmIndexFromDomIndex(l.newIndex);this.updatePosition(t,a);const n={element:this.context.element,oldIndex:t,newIndex:a};this.emitChanges({moved:n})},computeFutureIndex(l,t){if(!l.element)return 0;const a=[...t.to.children].filter(s=>s.style.display!=="none"),n=a.indexOf(t.related),r=l.component.getVmIndexFromDomIndex(n);return a.indexOf(mr)!==-1||!t.willInsertAfter?r:r+1},onDragMove(l,t){const{move:a,realList:n}=this;if(!a||!n)return!0;const r=this.getRelatedContextFromMoveEvent(l),o=this.computeFutureIndex(r,l),s={...this.context,futureIndex:o},i={...l,relatedContext:r,draggedContext:s};return a(i,t)},onDragEnd(){mr=null}}}),mC={class:"flex items-center justify-between mb-6"},pC={class:"text-xl font-semibold text-gray-900"},fC={class:"mt-1 text-sm text-gray-600"},hC={class:"flex items-center gap-2"},gC={class:"overflow-hidden bg-white border border-gray-200 shadow-sm rounded-xl"},yC={class:"grid grid-cols-12 gap-4 px-6 py-4 border-b border-gray-200 bg-gray-50"},bC={class:"col-span-5 font-medium text-gray-700"},kC={class:"col-span-3 font-medium text-gray-700"},xC={class:"col-span-2 font-medium text-gray-700"},wC={class:"col-span-2 font-medium text-right text-gray-700"},_C={class:"divide-y divide-gray-100"},EC={class:"grid items-center grid-cols-12 gap-4 px-6 py-4 transition-colors hover:bg-gray-50/50"},CC={class:"flex items-center col-span-5 gap-3"},VC={class:"font-medium text-gray-900"},NC={class:"text-xs text-gray-500"},vC={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-700 rounded-full bg-blue-50 ring-1 ring-inset ring-blue-700/10"},BC={class:"col-span-3"},SC={class:"inline-flex items-center px-2 py-1 text-sm font-medium text-gray-600 rounded-md bg-gray-50 ring-1 ring-inset ring-gray-500/10"},DC={class:"col-span-1"},AC={key:0,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",class:"lucide lucide-circle-check w-4 h-4 text-emerald-600"},MC={key:1,class:"grid items-center grid-cols-12 gap-4 px-6 py-4 transition-colors hover:bg-gray-50/50"},TC={class:"col-span-5"},LC={class:"text-gray-500"},$C={__name:"vs-builder-datatable",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(l){const t=e.useModel(l,"modelValue"),a=r=>r==="array"?"purple":r==="boolean"||r==="date"?"red":r==="datetime"?"purple":r==="number"?"green":r==="text"?"blue":r==="file"||r==="select"?"yellow":r==="slug"?"green":r==="image"?"blue":"gray",n=r=>{switch(r){case"text":return fa;case"number":return vr;case"integer":return vr;case"date":return ua;case"datetime":return Ui;case"file":return kl;case"select":return Sr;case"multiselect":return pa;case"mediaselect":return Image;case"radio":return Er;case"boolean":return Er;case"datalist":return Sr;case"image":return ma;case"slug":return Br;case"richtext":return fa;case"markdown":return fa;case"reference":return Gi;case"relation":return Br;case"FileList":return kl;default:return fa}};return(r,o)=>{var s,i;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",mC,[e.createElementVNode("div",null,[e.createElementVNode("h2",pC,e.toDisplayString(r.$t("cms.builder.collectionStructure")),1),e.createElementVNode("p",fC,e.toDisplayString(r.$t("cms.builder.defineFields")),1)]),e.createElementVNode("div",hC,[e.createVNode(pE,{modelValue:t.value.columns,"onUpdate:modelValue":o[0]||(o[0]=c=>t.value.columns=c)},null,8,["modelValue"])])]),e.createElementVNode("div",gC,[e.createElementVNode("div",yC,[e.createElementVNode("div",bC,e.toDisplayString(r.$t("cms.builder.name")),1),e.createElementVNode("div",kC,e.toDisplayString(r.$t("cms.builder.type")),1),e.createElementVNode("div",xC,e.toDisplayString(r.$t("cms.builder.localization")),1),e.createElementVNode("div",wC,e.toDisplayString(r.$t("cms.builder.actions")),1)]),e.createElementVNode("div",_C,[(i=(s=t.value)==null?void 0:s.columns)!=null&&i.length?(e.openBlock(),e.createBlock(e.unref(ii),{key:0,modelValue:t.value.columns,"onUpdate:modelValue":o[2]||(o[2]=c=>t.value.columns=c),"item-key":"name",handle:".drag-handle",animation:200},{item:e.withCtx(({element:c,index:u})=>{var d,m;return[e.createElementVNode("div",EC,[e.createElementVNode("div",CC,[o[3]||(o[3]=e.createElementVNode("span",{class:"drag-handle cursor-move mr-2 text-gray-400"},"☰",-1)),e.createElementVNode("div",{class:e.normalizeClass(["flex items-center justify-center p-1 rounded",`bg-${a((d=c.type)==null?void 0:d.toLowerCase())}-100`])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n((m=c.type)==null?void 0:m.toLowerCase())),{class:"w-4 h-4"}))],2),e.createElementVNode("div",null,[e.createElementVNode("p",VC,e.toDisplayString(c.label),1),e.createElementVNode("p",NC,e.toDisplayString(c.name),1)]),c.required?(e.openBlock(),e.createElementBlock("span",vC,e.toDisplayString(r.$t("cms.builder.required")),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",BC,[e.createElementVNode("span",SC,e.toDisplayString(c.type),1)]),e.createElementVNode("div",DC,[c.localization?(e.openBlock(),e.createElementBlock("svg",AC,[...o[4]||(o[4]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("path",{d:"m9 12 2 2 4-4"},null,-1)])])):e.createCommentVNode("",!0)]),e.createVNode(yE,{columns:t.value.columns,"onUpdate:columns":o[1]||(o[1]=h=>t.value.columns=h),data:t.value.columns[u],index:u},null,8,["columns","data","index"])])]}),_:1},8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",MC,[e.createElementVNode("div",TC,[e.createElementVNode("p",LC,e.toDisplayString(r.$t("cms.builder.noColumnsFound")),1)])]))])])],64)}}},FC={__name:"vs-builder-edit",props:{data:{},dataModifiers:{},form:{},formModifiers:{}},emits:["update:data","update:form"],setup(l){const{t}=Fe(),a=e.useModel(l,"data"),n=e.useModel(l,"form");e.ref({});const r=e.computed(()=>({name:{type:"text",label:t("cms.builder.scheme.name.label"),required:!0,placeholder:t("cms.builder.scheme.name.placeholder"),validators:["required"],col:4},title:{type:"text",label:t("cms.builder.scheme.title.label"),required:!0,placeholder:t("cms.builder.scheme.title.placeholder"),validators:["required"],col:4},preview_path:{type:"text",label:t("cms.builder.scheme.preview_path.label"),placeholder:t("cms.builder.scheme.preview_path.placeholder"),col:4,info:t("cms.builder.scheme.preview_path.info")},type:{type:"select",label:t("cms.builder.scheme.type.label"),required:!0,placeholder:t("cms.builder.scheme.type.placeholder"),validators:["required"],col:4,options:[{text:t("cms.builder.scheme.type.options.collection"),id:"collection"},{text:t("cms.builder.scheme.type.options.single"),id:"single"}]},status:{type:"select",label:t("cms.builder.scheme.status.label"),required:!0,placeholder:t("cms.builder.scheme.status.placeholder"),col:4,options:[{text:t("cms.builder.scheme.status.options.published"),id:"published"},{text:t("cms.builder.scheme.status.options.draft"),id:"draft"},{text:t("cms.builder.scheme.status.options.archived"),id:"archived"}]},include_search:{type:"switcher",label:t("cms.builder.scheme.include_search.label"),placeholder:t("cms.builder.scheme.include_search.placeholder"),col:4},description:{type:"textarea",label:t("cms.builder.scheme.description.label"),required:!0,placeholder:t("cms.builder.scheme.description.placeholder")}}));return e.onBeforeUnmount(()=>{n.value=null}),(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(Xe),{modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=i=>a.value=i),schema:r.value,form:n.value,"onUpdate:form":s[1]||(s[1]=i=>n.value=i)},null,8,["modelValue","schema","form"]),e.createVNode($C,{modelValue:a.value,"onUpdate:modelValue":s[2]||(s[2]=i=>a.value=i)},null,8,["modelValue"])]))}},pr=l=>{var n,r;const t=(n=l==null?void 0:l.type)==null?void 0:n.toLowerCase(),a=l!=null&&l.required?["required"]:null;return t==="array"?{key:l.name,label:l.label||l.title,type:"multi-text",help:l==null?void 0:l.help,colModel:{type:(l==null?void 0:l.subtype)||"text",placeholder:l==null?void 0:l.placeholder},validators:a}:t==="boolean"?{key:l.name,label:l.label||l.title,type:"Switcher",help:l==null?void 0:l.help,validators:a}:t==="tags"?{key:l.name,label:l.label||l.title,type:"tags",help:l==null?void 0:l.help,validators:a}:t==="radio"?{key:l.name,label:l.label||l.title,type:"radio",help:l==null?void 0:l.help,options:l.options||[],validators:a}:t==="date"?{key:l.name,label:l.label||l.title,type:"Date",time:!1,help:l==null?void 0:l.help,validators:a}:t==="datetime"?{key:l.name,label:l.label||l.title,type:"Date",help:l==null?void 0:l.help,mode:"datetime",time:!0,validators:a}:t==="number"?{key:l.name,label:l.label||l.title,help:l==null?void 0:l.help,type:"Number",validators:a}:t==="integer"?{key:l.name,label:l.label||l.title,type:"Integer",help:l==null?void 0:l.help,validators:a}:t==="text"?{key:l.name,label:l.label||l.title,type:"Text",help:l==null?void 0:l.help,validators:a}:t==="file"?{key:l.name,label:l.label||l.title,type:"File",multiple:l.multi||l.multiple,help:l==null?void 0:l.help,validators:a,api:"/api/cms-media/upload?subdir=",dir:"uploads/"+new Date().toLocaleDateString("en-US").replace(/\//g,"-")}:t==="filelist"?{key:l.name,label:l.label||l.title,type:"file",multiple:!0,help:l==null?void 0:l.help,validators:a}:t==="slug"?{key:l.name,label:l.label||l.title,type:"Slug",parent:l.parent||"",help:l==null?void 0:l.help,validators:a}:t==="image"?{key:l.name,label:l.label||l.title,type:"File",multi:l.multiple,help:l==null?void 0:l.help,validators:a,api:"/api/cms-media/upload?subdir=",dir:"uploads/"+new Date().toLocaleDateString("en-US").replace(/\//g,"-")}:t==="select"?l.options?{key:l.name,label:l.label||l.title,type:"select",options:l.options||[],help:l==null?void 0:l.help,validators:a}:{key:l.name,label:l.label||l.title,type:"select",data:l.data||[],help:l==null?void 0:l.help,validators:a}:t==="multiselect"?{key:l.name,label:l.label||l.title,type:"select",data:l.data||[],parent:l.parent||"",options:l.options||[],help:l==null?void 0:l.help,validators:a,multiple:!0}:t==="richtext"?{key:l.name,label:l.label||l.title,type:"Texteditor",help:l==null?void 0:l.help,validators:a}:t==="datalist"?{key:l.name,label:l.label||l.title,type:"Custom-Datatable",colModel:((r=l.colModel)==null?void 0:r.map(o=>pr(o)))||[],help:l==null?void 0:l.help,validators:a}:t==="reference"?{key:l.name,label:l.label||l.title,type:"reference",reference_type:l.reference_type,help:l==null?void 0:l.help,validators:a}:t==="reference-list"?{key:l.name,label:l.label||l.title,type:"reference",reference_type:l.reference_type,help:l==null?void 0:l.help,validators:a}:t==="relation"?(console.log(l),{key:l.name,label:l.label||l.title,type:"relation-link",help:l==null?void 0:l.help,relation:l.relation,validators:a}):t==="markdown"?{key:l.name,label:l.label||l.title,type:"richtext-md",help:l==null?void 0:l.help,validators:a}:t==="mediaselect"?{key:l.name,label:l.label||l.title,type:"mediaselect",help:l==null?void 0:l.help,validators:a}:{key:l.name,label:l.label||l.title,placeholder:l.placeholder,help:l==null?void 0:l.help,type:"Text",validators:a}},IC={class:"flex items-center justify-end gap-2"},OC={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},PC={__name:"vs-form-custom-datatable-controls",props:e.mergeModels({item:{type:Object,required:!0},colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const{t}=Fe(),a=l,n=e.useModel(l,"modelValue"),r=e.ref(!1),o=e.ref({}),s=e.ref({}),i=()=>{Ca({title:t("cms.builder.deleteTitle"),message:t("cms.builder.deleteField"),type:"error",onConfirm:()=>{c()}})},c=()=>{n.value=n.value.filter(d=>d.id!==a.item.id)},u=async()=>{if(await s.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}n.value=n.value.map(m=>m.id===a.item.id?o.value:m),r.value=!1};return e.watch(r,d=>{d&&(o.value=a.item)}),(d,m)=>(e.openBlock(),e.createElementBlock("div",IC,[e.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-8 w-8 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm",onClick:m[0]||(m[0]=h=>r.value=!0)},[e.createVNode(e.unref(Dr),{class:"w-4 h-4"})]),e.createElementVNode("button",{onClick:i,class:"inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-8 w-8 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"},[e.createVNode(e.unref(Kt),{class:"w-4 h-4"})]),e.createVNode(e.unref(Jt),{teleport:"#modal",title:d.$t("cms.builder.editField"),visible:r.value,onClose:m[4]||(m[4]=h=>r.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",OC,[e.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:m[3]||(m[3]=h=>r.value=!1)},e.toDisplayString(d.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:u,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(d.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Xe),{form:s.value,"onUpdate:form":m[1]||(m[1]=h=>s.value=h),schema:l.colModel,modelValue:o.value,"onUpdate:modelValue":m[2]||(m[2]=h=>o.value=h)},null,8,["form","schema","modelValue"])]),_:1},8,["title","visible"])]))}},RC={class:"p-6 border-t border-slate-200 dark:border-slate-700 bg-slate-50/30 dark:bg-slate-700/30"},jC={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},UC={__name:"vs-form-custom-datatable-add",props:e.mergeModels({colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const{t}=Fe(),a=e.useModel(l,"modelValue"),n=e.ref(!1),r=e.ref({}),o=e.ref({}),s=async()=>{try{if(await o.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}a.value=[...a.value||[],{...r.value,id:Math.random().toString(36).substring(2,15)}],n.value=!1,r.value={}}catch(i){console.log(i)}};return(i,c)=>(e.openBlock(),e.createElementBlock("div",RC,[e.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow-sm h-9 px-4 w-full border-2 border-dashed border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-slate-50 dark:hover:bg-slate-600 hover:border-blue-400 dark:hover:border-blue-500 text-slate-600 dark:text-slate-300 hover:text-blue-600 dark:hover:text-blue-400 py-3 transition-all duration-200",onClick:c[0]||(c[0]=u=>n.value=!0)},[e.createVNode(e.unref(sl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(i.$t("cms.common.actions.add")),1)]),e.createVNode(e.unref(Jt),{teleport:"#modal",title:i.$t("cms.common.actions.add"),visible:n.value,onClose:c[4]||(c[4]=u=>n.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",jC,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:c[3]||(c[3]=u=>n.value=!1)},e.toDisplayString(i.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:s,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(i.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Xe),{form:o.value,"onUpdate:form":c[1]||(c[1]=u=>o.value=u),schema:l.colModel,modelValue:r.value,"onUpdate:modelValue":c[2]||(c[2]=u=>r.value=u)},null,8,["form","schema","modelValue"])]),_:1},8,["title","visible"])]))}},zC={class:"p-0 shadow w-full"},HC={class:"overflow-x-auto"},qC={class:"relative w-full overflow-auto"},GC={class:"w-full caption-bottom text-sm"},WC={class:"[&_tr]:border-b"},KC={class:"border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors"},YC={class:"h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-end"},XC={class:"[&_tr:last-child]:border-0"},ZC=["onDragstart","onDragover","onDrop","onDragenter"],QC={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center"},JC={class:"flex items-center justify-center text-slate-400"},eV=["innerHTML"],tV={key:1,class:"flex items-center gap-2"},lV={key:0,class:"flex items-center gap-1"},aV=["src","alt"],nV={key:0,class:"text-xs text-gray-500 dark:text-gray-400 ml-1"},rV={key:1,class:"w-8 h-8 rounded bg-gray-100 dark:bg-gray-700 flex items-center justify-center"},oV={key:2},sV={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"},iV={key:0,class:"h-2 bg-blue-200 dark:bg-blue-800 transition-all duration-200"},ci=3,di={__name:"vs-form-custom-datatable",props:e.mergeModels({colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=e.useModel(l,"modelValue"),a=e.ref(null),n=e.ref(-1),r=e.ref(!1),o=(f,y,k)=>{a.value=y,n.value=k,f.dataTransfer.effectAllowed="move",f.dataTransfer.setData("text/html","")},s=(f,y)=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},i=(f,y)=>{n.value!==y&&(r.value=!0)},c=f=>{f.currentTarget.contains(f.relatedTarget)||(r.value=!1)},u=(f,y)=>{if(f.preventDefault(),r.value=!1,n.value===-1||n.value===y)return;const k=[...t.value],[g]=k.splice(n.value,1);k.splice(y,0,g),t.value=k,a.value=null,n.value=-1},d=f=>Array.isArray(f)?f.slice(0,ci):[],m=f=>Array.isArray(f)?Math.max(0,f.length-ci):0,h=f=>{const y=f.target;y.style.display="none";const k=document.createElement("cms.div");k.className="w-full h-full flex items-center justify-center bg-gray-200 dark:bg-gray-600",k.innerHTML=`
237
238
  <svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
238
239
  <path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd" />
239
240
  </svg>
240
- `,y.parentNode.appendChild(h)};return e.onMounted(()=>{var p,y;(y=(p=t.value)==null?void 0:p.filter(h=>typeof h=="object"))==null||y.forEach(h=>h.id?h.id:h.id=Math.random().toString(36).substring(2,15))}),(p,y)=>(e.openBlock(),e.createElementBlock("div",CC,[e.createElementVNode("div",VC,[e.createElementVNode("div",NC,[e.createElementVNode("table",vC,[e.createElementVNode("thead",BC,[e.createElementVNode("tr",SC,[y[4]||(y[4]=e.createElementVNode("th",{class:"h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.colModel,h=>(e.openBlock(),e.createElementBlock("th",{key:h.name,class:"h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"},e.toDisplayString(h.label||h.title||h.name),1))),128)),e.createElementVNode("th",DC,e.toDisplayString(p.$t("cms.table.actions")),1)])]),e.createElementVNode("tbody",AC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(h,g)=>(e.openBlock(),e.createElementBlock("tr",{key:h==null?void 0:h.id,class:e.normalizeClass(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move",{"opacity-50":a.value===h}]),draggable:"true",onDragstart:b=>o(b,h,g),onDragover:b=>s(b),onDrop:b=>u(b,g),onDragenter:b=>i(b,g),onDragleave:y[2]||(y[2]=b=>c(b))},[e.createElementVNode("td",TC,[e.createElementVNode("div",LC,[e.createVNode(e.unref(Vn))])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.colModel,b=>(e.openBlock(),e.createElementBlock("td",{key:b.name,class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-slate-600 dark:text-slate-400 text-sm"},[b.type==="Texteditor"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:h[b.key]||"-"},null,8,$C)):b.type==="File"?(e.openBlock(),e.createElementBlock("div",FC,[Array.isArray(h[b.key])&&h[b.key].length>0?(e.openBlock(),e.createElementBlock("div",IC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d(h[b.key]),(w,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"relative w-8 h-8 rounded overflow-hidden bg-gray-100 dark:bg-gray-700 flex-shrink-0"},[e.createElementVNode("img",{src:w,alt:`Image ${x+1}`,class:"w-full h-full object-cover",onError:y[0]||(y[0]=k=>f(k))},null,40,OC)]))),128)),m(h[b.key])>0?(e.openBlock(),e.createElementBlock("span",PC," +"+e.toDisplayString(m(h[b.key])),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",RC,[...y[5]||(y[5]=[e.createElementVNode("svg",{class:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z","clip-rule":"evenodd"})],-1)])]))])):(e.openBlock(),e.createElementBlock("span",UC,e.toDisplayString(h[b.key]||"-"),1))]))),128)),e.createElementVNode("td",jC,[e.createVNode(xC,{item:h,colModel:l.colModel,modelValue:t.value,"onUpdate:modelValue":y[1]||(y[1]=b=>t.value=b)},null,8,["item","colModel","modelValue"])])],42,MC))),128)),n.value?(e.openBlock(),e.createElementBlock("tr",zC)):e.createCommentVNode("",!0)])])])]),e.createVNode(EC,{colModel:l.colModel,modelValue:t.value,"onUpdate:modelValue":y[3]||(y[3]=h=>t.value=h)},null,8,["colModel","modelValue"])]))}},ci="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAAAGfklEQVR4Ae3d7W6baBSF0d7/7Q6IDxkzmrHEQU2DHZudWH1XflRHcXNqVnka4tL01+qNAIGwwK/wfusJEFjPyexyuUzTNAxD3/dd1/3z/1vXdX3fD8MwTdPlcoFNoFmBlzJblmWapr7vb10d/9j3/TRNy7I0a+3AmxV4MrPr9TqO43FXnz06juP1em1W3IE3KPBMZvM8b1eGn7V0/P6u6+Z5bpDbIbcp8OXMnv4k9jG8cRzbRHfUrQl8LbNhGD7W8sp7hmFoTdzxNijwhcxOb+zWp9IaPO1aO+RHMzvxWvHjZz9Xj62ddq0d70OZzfP8sY1z3+MVkdbOvKaO935m1+v1xdcVHwmy6zqv8jd15jV1sPczi14u7gt06djUmdfUwd7JbFmWfQnp2T0iTZ187RzsncymaUqntd8/TVM79I60HYE7mT14v+I+lVfmvu+P6W93UQ7eCLyxwMd7d48yu1wurzTz3Mce3Mu/LMs4jt3/b88t91EE0gK383Mcx/1XQEeZffMV4+34D64bb42lmewn8LpA13X7l/SOMgvd9nF8DAc3hXzzFezx8/QogWOB/VdAR5n9yGm9f3K/fZ32DX99dwznUQKPC3Rdt53AR5n9yGm9f3Lbs7wNjx+hn0ngHQS2E/gos596otuT+234qefj1yXwnMB2AsvsOUAfReC+wEOZuWi8D+lnEPhc4KHM3u0lkM8PxyME3lHgocze7QX9d4T0nAh8LvBQZu/219M/8tn1c0OPEDgS2P/V1NFLIO92s9U0TT/y5eKRpccI/Emg67r9/UxHma3r+s2fQPZ/AGyfcLfhlW8O+ScK7yOQEvjtm5Heyeybrxv3fwBsde2HZVnmeZ68EXhjgXme9/cNr+u976Hvn3XuIzcTeE7gzmezdV19k4LnZH0UgU3gfma+5c6GZSDwnMD9zNZ19Q3knsP1UQRuAg9llr503P8DOL8xBP4+gUczW9c1dFPIwb/j/Pu4HVGbAl/ILFGaxto87Vo76q9ldu7Vo2vF1s62Zo/3y5ndXhF58aYn/41gsydcmwf+TGbrur5y39Nv96G06e6omxJ4MrObkf/ivalzxcE+LfBSZtuverlcpmkahqHv++16suu6vu+HYZim6eCbnG5LDAT+VoFzMvtbdRwXgVMEZHYKoyUEjgRkdqTjMQKnCMjsFEZLCBwJyOxIx2METhGQ2SmMlhA4EpDZkY7HCJwiILNTGC0hcCTwX2a3/1/QjwQInCuwlSezc2FtI1ACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhAS2DL7F8r/OP7dtZNpAAAAAElFTkSuQmCC",di={faq:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},show_dots:{type:"switcher",label:"Показувати точки"},show_index:{type:"switcher",conditions:["show_dots","==","true"],label:"Показувати нумерацію"},index_type:{type:"combobox",conditions:["show_index","==","true"],label:"Тип нумерації",options:[{id:"decimal",text:"Десятковий"},{id:"upper-alpha",text:"Латинські великі букви"},{id:"lower-alpha",text:"Латинські маленькі букви"},{id:"upper-roman",text:"Римські великі цифри"},{id:"lower-roman",text:"Римські маленькі цифри"},{id:"upper-cyrillic",text:"Кириличні великі букви"},{id:"lower-cyrillic",text:"Кириличні маленькі букви"}]},openfirst:{type:"switcher",label:"Відкрити перший елемент?"},collapse_mode:{type:"switcher",label:"Не згортати попередній елемент?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Вкладений контент",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},banner:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},image:{type:"file",label:"Зображення",placeholder:"Зображення"}}},photoGrid:{schema:{columns:{type:"number",label:"Кількість колонок",placeholder:"Кількість колонок",default:3},data:{type:"DataTable",colModel:[{key:"image",ua:"Зображення",type:"file"},{key:"caption",ua:"Заголовок",type:"text"}]}}},slider:{schema:{autoplay:{type:"switcher",label:"Автоматичне гортання?",default:!0},autoplaySpeed:{type:"number",label:"Швидкість автоматичного гортання(мс)",placeholder:"Швидкість автоматичного гортання(мс)",default:3e3},show_navigation:{type:"switcher",label:"Показувати кнопки навігації?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"image",ua:"Зображення",type:"file"},{key:"image_width",ua:"Ширина зображення(px)",type:"number",placeholder:"Ширина зображення"},{key:"image_height",ua:"Висота зображення(px)",type:"number",placeholder:"Висота зображення"},{ua:"Розтягувати по ширині",key:"stretch",type:"switcher"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},video:{schema:{file:{type:"file",max_size:50,description:"Максимальний розмір файлу 50MB",label:"Завантажити відео",placeholder:"Завантажити відео"},hidden_gif:{type:"switcher",label:"Сховати GIF"},preview:{type:"file",label:"Прев'ю для відео"},link:{type:"text",label:"Посилання",placeholder:"Посилання"}}},about:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},text:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"},url:{type:"file",label:"Зображення / відео",placeholder:"Посилання"}}},cards:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"img",ua:"Зображення",type:"file"},{key:"link",ua:"Посилання",type:"text"},{key:"description",ua:"Опис",type:"text"}]}}},usefulLinks:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"text",ua:"Назва",type:"text"},{key:"url",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},team:{schema:{data:{type:"DataTable",colModel:[{key:"avatar",ua:"Аватар",type:"file"},{key:"title",ua:"Ім'я/ПІБ",type:"text"},{key:"description",ua:"Опис",type:"textarea",optional:!0},{key:"position",ua:"Посада",type:"text",tooltip:!0},{key:"email",ua:"Email",type:"text",optional:!0},{key:"tel",ua:"Телефон",type:"text",optional:!0},{key:"schedule",ua:"Графік прийому",type:"text",optional:!0},{key:"isinfo",type:"switcher",label:"Відображати кнопку 'Детальніше'"},{key:"slug",ua:"Slug",type:"text",label:"Унікальний ідентифікатор"}]}}},body:{schema:{background_color:{type:"switcher",label:"Додати білий фон?"},content:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"}}},news:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},buttonText:{type:"text",label:"Текст кнопки",placeholder:"Текст кнопки"},buttonLink:{type:"text",label:"Посилання кнопки",placeholder:"Посилання кнопки"},tag:{type:"select",label:"Тег",placeholder:"Тег",data:"tag_id"},news_list:{type:"select",label:"Список новин",multiple:!0,placeholder:"Список новин",parent:"tag",data:"news_tag_id"}}},form:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},formUrl:{type:"text",label:"Посилання для відправки форми",placeholder:"Посилання"},schema:{label:"Схема форми",type:"DataTable",colModel:[{key:"name",ua:"Name",type:"text",placeholder:"Name"},{key:"label",ua:"Title",type:"text",placeholder:"Title"},{key:"type",ua:"Type",type:"combobox",options:[{text:"Text",id:"text"},{text:"Textarea",id:"textarea"},{text:"switcher",id:"switcher"},{text:"Email",id:"email"},{text:"Mask",id:"mask"},{text:"Number",id:"number"},{text:"Date",id:"date"},{text:"Datetime",id:"datetime"}]},{key:"mask",ua:"Маска",type:"text",conditions:["type","==","mask"],placeholder:"Маска"},{key:"placeholder",ua:"Плейсхолдер",type:"text",placeholder:"Placeholder"},{key:"required",ua:"Required",type:"switcher"}]}}},tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},description:{type:"textarea",label:"Опис",placeholder:"Опис"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},vertical_tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"},{id:"slug",text:"Привязати сторінку"}],required:!0,validators:["required"]},{key:"slug",type:"text",label:"Slug",placeholder:"Slug",conditions:["is_section","==","slug"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},documents:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},icon:{type:"file",label:"Завантажити іконку",placeholder:"Завантажити іконку"},show_icon:{type:"switcher",label:"Показувати іконку?"},documents:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"file",info:"Прев'ю доступно тільки для документів у форматі pdf, html, txt. Інші формати одразу завантажуються.",ua:"Файл",type:"file"}]}}},infoLine:{schema:{divider:{type:"file",label:"Завантажити розподілювач"},speed:{type:"number",label:"Швидкість автоматичного гортання(с)",placeholder:"Швидкість автоматичного гортання(с)",default:20},data:{type:"DataTable",colModel:[{key:"title",ua:"Текст",type:"text"}]}}},interested:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Заголовок",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"},{key:"color",ua:"Колір фону",type:"color"}]}}},contact:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"type",ua:"Тип",type:"combobox",options:[{id:"email",text:"Email"},{id:"tel",text:"Телефон"},{id:"address",text:"Адреса"}]},{key:"title",ua:"Пошта",type:"text",conditions:["type","==","email"]},{key:"title",ua:"Телефон",type:"text",conditions:["type","==","tel"]},{key:"title",ua:"Адреса",type:"text",conditions:["type","==","address"]},{key:"description",ua:"Опис",type:"text"}]}}},iframe:{schema:{link:{type:"text",label:"Посилання",placeholder:"Посилання"},file:{type:"file",label:"Завантажити файл",placeholder:"Завантажити файл"},height:{type:"text",label:"Висота iframe(px)",placeholder:"Висота iframe(px)"}}}},Ga=[{text:"reference.faq",id:"faq"},{text:"reference.banner",id:"banner"},{text:"reference.slider",id:"slider"},{text:"reference.photoGrid",id:"photoGrid"},{text:"reference.video",id:"video"},{text:"reference.about",id:"about"},{text:"reference.cards",id:"cards"},{text:"reference.usefulLinks",id:"usefulLinks"},{text:"reference.team",id:"team"},{text:"reference.body",id:"body"},{text:"reference.news",id:"news"},{text:"reference.form",id:"form"},{text:"reference.tabs",id:"tabs"},{text:"reference.vertical_tabs",id:"vertical_tabs"},{text:"reference.documents",id:"documents"},{text:"reference.infoLine",id:"infoLine"},{text:"reference.interested",id:"interested"},{text:"reference.contact",id:"contact"},{text:"reference.iframe",id:"iframe"}],HC={class:"h-full w-full flex flex-col"},qC={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},GC={class:"text-xs font-medium text-gray-600"},WC={key:0,class:"text-xs text-gray-500"},ui={__name:"cards-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",HC,[a[0]||(a[0]=e.createStaticVNode('<div class="flex-1 grid grid-cols-3 gap-1.5"><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div></div>',1)),e.createElementVNode("div",qC,[e.createElementVNode("div",GC,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",WC,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},KC={class:"h-full w-full flex flex-col"},YC={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},XC={class:"text-xs font-medium text-gray-600"},ZC={key:0,class:"text-xs text-gray-500"},QC={__name:"faq-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",KC,[a[0]||(a[0]=e.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg 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" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg 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" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div><div class="mt-1 pt-1 border-t border-gray-200"><div class="space-y-0.5"><div class="h-1 bg-gray-200 rounded"></div><div class="h-1 bg-gray-200 rounded w-5/6"></div><div class="h-1 bg-gray-200 rounded w-4/5"></div></div></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg 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" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg 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" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div></div>',2)),e.createElementVNode("div",YC,[e.createElementVNode("div",XC,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",ZC,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},JC={class:"h-full w-full flex flex-col"},eV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},tV={class:"text-xs font-medium text-gray-600"},lV={key:0,class:"text-xs text-gray-500"},mi={__name:"banner-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",JC,[a[0]||(a[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-16 h-10 bg-gray-300 rounded"></div></div><div class="absolute bottom-2 left-2"><div class="h-3 bg-gray-400 rounded w-16"></div></div></div>',1)),e.createElementVNode("div",eV,[e.createElementVNode("div",tV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",lV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},aV={class:"h-full w-full flex flex-col"},rV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},nV={class:"text-xs font-medium text-gray-600"},oV={key:0,class:"text-xs text-gray-500"},sV={__name:"form-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",aV,[a[0]||(a[0]=e.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-8 bg-gray-200 rounded border border-gray-300"></div></div></div><div class="h-6 bg-gray-600 rounded mt-2"></div>',3)),e.createElementVNode("div",rV,[e.createElementVNode("div",nV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",oV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},iV={class:"h-full w-full flex flex-col"},cV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},dV={class:"text-xs font-medium text-gray-600"},uV={key:0,class:"text-xs text-gray-500"},pi={__name:"news-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",iV,[a[0]||(a[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="flex gap-2 flex-1"><div class="flex-1 space-y-2"><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div></div><div class="w-20 space-y-1"><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div></div></div>',2)),e.createElementVNode("div",cV,[e.createElementVNode("div",dV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",uV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},mV={class:"h-full w-full flex flex-col"},pV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},fV={class:"text-xs font-medium text-gray-600"},hV={key:0,class:"text-xs text-gray-500"},gV={__name:"team-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",mV,[a[0]||(a[0]=e.createStaticVNode('<div class="space-y-2 flex-1"><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg 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" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg 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" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg 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" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg 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" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg 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" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg 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" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg 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" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg 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" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg 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" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg 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" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg 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" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg 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" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div></div>',1)),e.createElementVNode("div",pV,[e.createElementVNode("div",fV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",hV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},bV={class:"h-full w-full flex flex-col"},yV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},kV={class:"text-xs font-medium text-gray-600"},xV={key:0,class:"text-xs text-gray-500"},fi={__name:"usefulLinks-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",bV,[a[0]||(a[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-3"></div><div class="grid grid-cols-2 gap-2 flex-1"><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div></div>',2)),e.createElementVNode("div",yV,[e.createElementVNode("div",kV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",xV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},wV={class:"h-full w-full flex flex-col"},_V={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},EV={class:"text-xs font-medium text-gray-600"},CV={key:0,class:"text-xs text-gray-500"},VV={__name:"video-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",wV,[a[0]||(a[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-10 h-10 bg-gray-400 rounded-full flex items-center justify-center"><svg 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" class="lucide lucide-play w-5 h-5 text-white ml-0.5"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg></div></div><div class="absolute bottom-1.5 left-1.5 right-1.5"><div class="h-2 bg-gray-400 rounded mb-1"></div><div class="h-2 bg-gray-400 rounded w-3/4"></div></div></div><div class="mt-2 flex items-center gap-2"><div class="w-5 h-5 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded flex-1"></div></div>',2)),e.createElementVNode("div",_V,[e.createElementVNode("div",EV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",CV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},NV={class:"h-full w-full flex flex-col"},vV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},BV={class:"text-xs font-medium text-gray-600"},SV={key:0,class:"text-xs text-gray-500"},DV={__name:"about-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",NV,[a[0]||(a[0]=e.createStaticVNode('<div class="flex flex-1"><div class="flex-1 pr-2"><div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-4/5"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-3/4"></div><div class="h-2 bg-gray-300 rounded"></div></div></div><div class="w-16 h-20 bg-gray-200 rounded flex items-center justify-center"><div class="w-6 h-6 bg-gray-300 rounded-full"></div></div></div>',1)),e.createElementVNode("div",vV,[e.createElementVNode("div",BV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",SV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},AV={class:"h-full w-full flex flex-col"},MV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},TV={class:"text-xs font-medium text-gray-600"},LV={key:0,class:"text-xs text-gray-500"},$V={__name:"slider-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",AV,[a[0]||(a[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded mb-2 relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-12 h-8 bg-gray-300 rounded"></div></div><div class="absolute left-1 top-1/2 transform -translate-y-1/2"><svg 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" class="lucide lucide-chevron-left w-4 h-4 text-gray-400"><path d="m15 18-6-6 6-6"></path></svg></div><div class="absolute right-1 top-1/2 transform -translate-y-1/2"><svg 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" class="lucide lucide-chevron-right w-4 h-4 text-gray-400"><path d="m9 18 6-6-6-6"></path></svg></div></div><div class="h-3 bg-gray-300 rounded mb-2"></div><div class="h-6 w-20 bg-gray-400 rounded"></div><div class="flex justify-center gap-1 mt-2"><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div></div>',4)),e.createElementVNode("div",MV,[e.createElementVNode("div",TV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",LV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},FV={class:"h-full flex flex-col"},IV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},OV={class:"text-xs font-medium text-gray-600"},PV={key:0,class:"text-xs text-gray-500"},RV={__name:"infoLine-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",FV,[a[0]||(a[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative overflow-hidden"><div class="absolute inset-0 flex items-center"><div class="flex gap-8 whitespace-nowrap animate-pulse"><div class="h-3 bg-gray-400 rounded w-32"></div><div class="h-3 bg-gray-300 rounded w-24"></div><div class="h-3 bg-gray-400 rounded w-40"></div><div class="h-3 bg-gray-300 rounded w-28"></div><div class="h-3 bg-gray-400 rounded w-36"></div><div class="h-3 bg-gray-300 rounded w-20"></div></div></div><div class="absolute top-2 left-2 right-2 flex justify-between items-center"><div class="w-2 h-2 bg-gray-500 rounded-full"></div><div class="w-2 h-2 bg-gray-500 rounded-full"></div></div></div>',1)),e.createElementVNode("div",IV,[e.createElementVNode("div",OV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",PV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},UV={class:"h-full flex flex-col"},jV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},zV={class:"text-xs font-medium text-gray-600"},HV={key:0,class:"text-xs text-gray-500"},qV={__name:"tabs-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",UV,[a[0]||(a[0]=e.createStaticVNode('<div class="h-2 bg-gray-300 rounded mb-2"></div><div class="flex gap-1 mb-3"><div class="h-4 w-16 bg-gray-400 rounded"></div><div class="h-4 w-16 bg-gray-200 rounded"></div></div><div class="space-y-2 flex-1"><div class="h-2 bg-gray-300 rounded w-5/6"></div><div class="h-2 bg-gray-300 rounded"></div><div class="space-y-1 mt-3"><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-20"></div></div><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-16"></div></div></div></div>',3)),e.createElementVNode("div",jV,[e.createElementVNode("div",zV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",HV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},GV={class:"h-full flex flex-col"},WV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},KV={class:"text-xs font-medium text-gray-600"},YV={key:0,class:"text-xs text-gray-500"},hi={__name:"documents-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",GV,[a[0]||(a[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div></div>',2)),e.createElementVNode("div",WV,[e.createElementVNode("div",KV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",YV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},XV={class:"h-full flex flex-col"},ZV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},QV={class:"text-xs font-medium text-gray-600"},JV={key:0,class:"text-xs text-gray-500"},Wa={faq:QC,banner:mi,slider:$V,video:VV,about:DV,cards:ui,usefulLinks:fi,team:gV,news:pi,form:sV,tabs:qV,vertical_tabs:pi,documents:hi,infoLine:RV,body:{__name:"body-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",XV,[a[0]||(a[0]=e.createStaticVNode('<div class="grid grid-cols-3 gap-2 flex-1"><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div></div>',1)),e.createElementVNode("div",ZV,[e.createElementVNode("div",QV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",JV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},photoGrid:ui,interested:fi,contact:hi,iframe:mi},eN={class:"grid grid-cols-1 md:grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-4"},tN=["onClick"],lN={class:"wireframe-block h-[240px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-300 hover:border-gray-400 cursor-pointer"},aN=["src"],rN={__name:"vs-form-reference-choce",props:{modelValue:{type:String,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(l){const t=e.useModel(l,"modelValue");return(a,r)=>(e.openBlock(),e.createElementBlock("div",eN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Ga),n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,onClick:o=>t.value=n.id,class:"relative"},[e.createElementVNode("div",lN,[e.unref(Wa)[n.id]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Wa)[n.id]),{key:0,text:n==null?void 0:n.text,count:(n==null?void 0:n.data)||0},null,8,["text","count"])):(e.openBlock(),e.createElementBlock("img",{key:1,src:e.unref(ci),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,aN))])],8,tN))),128))]))}},nN={};function oN(l,t,a,r,n,o){const s=e.resolveComponent("vs-richtext");return e.openBlock(),e.createBlock(s,{class:"w-full"})}const pn=Qt(nN,[["render",oN]]),sN={class:"flex gap-4"},iN={class:"text-sm text-gray-500 dark:text-gray-400 border flex items-center h-10 px-4 rounded-lg w-full"},cN={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},dN={__name:"vs-form-reference-add",props:e.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const{t}=Fe();$e["vs-input-reference"]=fn,$e["vs-input-tiptap-editor"]=pn;const a=e.useModel(l,"modelValue"),r=e.ref(!1),n=e.ref({}),o=e.ref(null),s=e.ref({}),i=e.computed(()=>{var u;return((u=di[o.value])==null?void 0:u.schema)||null}),c=async()=>{if(await n.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}try{Object.keys(s.value).length!==0&&(a.value=[...a.value||[],{...s.value,id:Math.random().toString(36).substring(2,15),reference_type:o.value}]),r.value=!1,o.value=null,s.value={}}catch(d){console.log(d)}};return e.watch(r,()=>{r.value||(o.value=null,s.value={})}),(u,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{type:"button",class:"inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-sky-500",onClick:d[0]||(d[0]=m=>r.value=!r.value)},e.toDisplayString(u.$t("cms.builder.create")),1),e.createVNode(e.unref(Yo),{visible:r.value,"onUpdate:visible":d[6]||(d[6]=m=>r.value=m),position:"right",closeClickBackdrop:!1,onClose:d[7]||(d[7]=m=>r.value=!1),title:o.value?u.$t("cms.builder."+o.value):u.$t("cms.builder.selectType"),size:"50vw"},{footer:e.withCtx(()=>[e.createElementVNode("div",cN,[e.createElementVNode("button",{onClick:d[5]||(d[5]=m=>r.value=!1),class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100"},e.toDisplayString(u.$t("cms.builder.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.builder.create")),1)])]),default:e.withCtx(()=>{var m;return[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",sN,[e.createElementVNode("div",iN,[e.createElementVNode("span",null,e.toDisplayString((m=e.unref(Ga).find(f=>f.id===o.value))==null?void 0:m.text),1)]),e.createElementVNode("button",{class:"py-2.5 px-3 mb-4 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:d[2]||(d[2]=f=>o.value=null)},e.toDisplayString(u.$t("cms.builder.changeType")),1)]),i.value?(e.openBlock(),e.createBlock(e.unref(Xe),{key:o.value,schema:i.value,modelValue:s.value,"onUpdate:modelValue":d[3]||(d[3]=f=>s.value=f),form:n.value,"onUpdate:form":d[4]||(d[4]=f=>n.value=f)},null,8,["schema","modelValue","form"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(rN,{key:0,modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=f=>o.value=f),options:e.unref(Ga)},null,8,["modelValue","options"]))]}),_:1},8,["visible","title"])]))}},uN={class:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex space-x-1 z-10"},mN={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},pN={__name:"vs-form-reference-controls",props:e.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Object,default:()=>({})},modelModifiers:{},parent:{type:Array,default:()=>[]},parentModifiers:{}}),emits:["update:modelValue","update:parent"],setup(l){const{t}=Fe(),a=e.useModel(l,"modelValue"),r=e.useModel(l,"parent"),n=e.ref(!1),o=e.ref({}),s=e.ref({}),i=e.computed(()=>{var u;return((u=di[a.value.reference_type])==null?void 0:u.schema)||null});e.watch(n,u=>{u&&(o.value={...a.value})});const c=async()=>{try{if(await s.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}a.value={...o.value},n.value=!1}catch(u){console.log(u)}};return(u,d)=>(e.openBlock(),e.createElementBlock("div",uN,[e.createElementVNode("button",{onClick:d[0]||(d[0]=m=>n.value=!n.value),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors border border-gray-200 dark:border-gray-700"},[e.createVNode(e.unref(wl),{class:"h-4 w-4 text-gray-400"})]),e.createElementVNode("button",{onClick:d[1]||(d[1]=m=>r.value=r.value.filter(f=>f.id!==a.value.id)),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors border border-gray-200 dark:border-gray-700"},[e.createVNode(e.unref(Gt),{class:"h-4 w-4 text-red-500"})]),e.createVNode(e.unref(Yo),{visible:n.value,"onUpdate:visible":d[5]||(d[5]=m=>n.value=m),onClose:d[6]||(d[6]=m=>n.value=!1),title:l.title,width:"50vw"},{footer:e.withCtx(()=>[e.createElementVNode("div",mN,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:d[4]||(d[4]=m=>n.value=!1)},e.toDisplayString(u.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(e.unref(Xe),{key:0,form:s.value,"onUpdate:form":d[2]||(d[2]=m=>s.value=m),schema:i.value,modelValue:o.value,"onUpdate:modelValue":d[3]||(d[3]=m=>o.value=m),class:"-mr-[10px] ml-[10px] mt-[10px]"},null,8,["form","schema","modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["visible","title"])]))}},fN={class:"w-full"},hN={key:0,class:"relative"},gN={class:"group wireframe-block h-[280px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-00 hover:border-gray-400 cursor-grab"},bN=["src"],fn={__name:"vs-form-reference-list",props:e.mergeModels({reference_type:{type:String,required:!0},title:{type:String,required:!0}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=n=>{var o;return(o=Ga.find(s=>s.id===n))==null?void 0:o.text},a=e.useModel(l,"modelValue"),r=e.computed({get(){const n=a.value;return n==null?[]:Array.isArray(n)?n:[]},set(n){a.value=Array.isArray(n)?n:[]}});return e.watch(a,n=>{n!=null&&!Array.isArray(n)&&(a.value=[])},{immediate:!0}),(n,o)=>{var s;return e.openBlock(),e.createElementBlock("div",fN,[((s=r.value)==null?void 0:s.length)>0?(e.openBlock(),e.createBlock(e.unref(oi),{key:0,modelValue:r.value,"onUpdate:modelValue":o[1]||(o[1]=i=>r.value=i),"item-key":"id",handle:".drag-handle",class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4"},{item:e.withCtx(({element:i,index:c})=>[i!=null&&i.reference_type?(e.openBlock(),e.createElementBlock("div",hN,[e.createElementVNode("div",gN,[(e.openBlock(),e.createElementBlock("div",{key:i.id,class:"absolute top-2 left-2 opacity-0 group-hover:opacity-100 border border-gray-200 dark:border-gray-700 transition-opacity cursor-move z-10 bg-white dark:bg-gray-800 rounded p-1 shadow-sm drag-handle"},[e.createVNode(e.unref(Vn),{class:"h-4 w-4 text-gray-400"})])),e.createVNode(pN,{title:n.$t("cms.builder."+(i==null?void 0:i.reference_type)),modelValue:r.value[c],"onUpdate:modelValue":u=>r.value[c]=u,parent:r.value,"onUpdate:parent":o[0]||(o[0]=u=>r.value=u)},null,8,["title","modelValue","onUpdate:modelValue","parent"]),e.unref(Wa)[i==null?void 0:i.reference_type]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Wa)[i==null?void 0:i.reference_type]),{key:0,index:c,text:t(i==null?void 0:i.reference_type),count:Array.isArray(i==null?void 0:i.data)?i.data.length:0},null,8,["index","text","count"])):(e.openBlock(),e.createElementBlock("img",{key:1,src:e.unref(ci),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,bN))])])):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(dN,{class:"mt-4",title:l.title,modelValue:r.value,"onUpdate:modelValue":o[2]||(o[2]=i=>r.value=i)},null,8,["title","modelValue"])])}}};function gi(l){if(l===0)return"0 Bytes";const t=1024,a=["Bytes","KB","MB","GB","TB"],r=Math.floor(Math.log(l)/Math.log(t));return Number.parseFloat((l/Math.pow(t,r)).toFixed(2))+" "+a[r]}function yN(l){const t=new Date(l);return isNaN(t.getTime())?"":t.toISOString().slice(0,10)}const kN={__name:"TypeTag",props:{type:{type:String,required:!0}},setup(l){const t=new Map([["document","bg-blue-100 text-blue-800 border-blue-200 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-700"],["image","bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700"],["video","bg-purple-100 text-purple-800 border-purple-200 dark:bg-purple-900/30 dark:text-purple-300 dark:border-purple-700"]]);return(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors shadow-lg backdrop-blur-sm",e.unref(t).get(l.type)])},e.toDisplayString(l.type),3))}},xN={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 max-h-[calc(100%-130px)] overflow-y-auto px-2 pt-2 pb-5"},wN={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground col-span-full"},_N=["onClick"],EN=["onClick"],CN={class:"truncate font-medium text-slate-800 dark:text-slate-100 mb-2"},VN={class:"text-sm text-slate-500 dark:text-slate-400"},NN=["onClick"],vN={class:"p-0"},BN={class:"aspect-video bg-slate-100 dark:bg-slate-700 rounded-t-lg overflow-hidden relative"},SN={class:"w-full h-full flex items-center justify-center bg-gradient-to-br from-slate-100 to-slate-200 dark:from-slate-700 dark:to-slate-800"},DN={key:0,class:"relative w-full"},AN=["src","alt"],MN={class:"p-4"},TN={class:"flex items-center justify-between mb-2"},LN={class:"font-medium text-slate-800 dark:text-slate-100 truncate flex-1 mr-2"},$N={class:"space-y-1 text-sm text-slate-500 dark:text-slate-400"},FN={class:"flex justify-between"},IN={class:"flex justify-between"},ON={__name:"MediaGrid",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]},isDeleteButton:{type:Boolean,default:!1}},emits:["delete-file","file-click","delete-folder"],setup(l,{emit:t}){Fe();const a=l,r=e.ref([]),n=e.ref(null),o=i=>{if(!i)return"";const c=new Date(i);return isNaN(c.getTime())?"":c.toISOString().slice(0,10)},s=()=>{r.value=a.files.sort((i,c)=>i.type==="dir"&&c.type!=="dir"?-1:i.type!=="dir"&&c.type==="dir"?1:0)};return e.onMounted(()=>s()),e.onUpdated(()=>s()),(i,c)=>{var u;return e.openBlock(),e.createElementBlock("div",xN,[((u=l.files)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",wN,[e.createVNode(e.unref(yl),{class:"w-12 h-12 mb-2"}),e.createElementVNode("p",null,e.toDisplayString(i.$t("cms.noFilesInFolder")),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,d=>{var m;return e.openBlock(),e.createElementBlock(e.Fragment,{key:d==null?void 0:d.url},[(d==null?void 0:d.type)==="dir"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"p-6 text-center rounded-xl h-[fit-content] relative text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 cursor-pointer",onClick:f=>i.$emit("file-click",d)},[l.isDeleteButton?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(f=>{n.value=d},["stop"]),class:"absolute top-4 right-4 p-1 border border-gray-300 dark:border-slate-700 rounded-lg cursor-pointer hover:bg-gray-200 dark:hover:bg-slate-700 group"},[e.createVNode(e.unref(Gt),{class:"w-4 h-4 text-gray-500 group-hover:text-red-500"})],8,EN)):e.createCommentVNode("",!0),e.createVNode(e.unref(Cn),{class:"w-16 h-16 mx-auto mb-4 text-blue-600"}),e.createElementVNode("h3",CN,e.toDisplayString(d==null?void 0:d.name),1),e.createElementVNode("p",VN,e.toDisplayString(d==null?void 0:d.count)+" "+e.toDisplayString(i.$t("cms.media.files")),1)],8,_N)):(d==null?void 0:d.type)==="file"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["h-[fit-content] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 group cursor-pointer",{"bg-accent text-accent-foreground ring-2 ring-primary":((m=l.selectedFile)==null?void 0:m.url)===(d==null?void 0:d.url)||l.selectedFiles&&l.selectedFiles.some(f=>f.id===d.id)}]),onClick:f=>i.$emit("file-click",d)},[e.createElementVNode("div",vN,[e.createElementVNode("div",BN,[e.createElementVNode("div",SN,[(d==null?void 0:d.filetype)==="image"&&(d!=null&&d.filepath||d!=null&&d.url)?(e.openBlock(),e.createElementBlock("div",DN,[e.createElementVNode("img",{src:d==null?void 0:d.preview,alt:(d==null?void 0:d.alt)||(d==null?void 0:d.filename),class:"object-cover w-full h-full rounded text-xs"},null,8,AN)])):(e.openBlock(),e.createBlock(e.unref(Il),{key:1,class:"w-12 h-12 text-gray-500"}))])]),e.createElementVNode("div",MN,[e.createElementVNode("div",TN,[e.createElementVNode("h3",LN,e.toDisplayString(d.filename),1),e.createVNode(kN,{type:d==null?void 0:d.filetype},null,8,["type"])]),e.createElementVNode("div",$N,[e.createElementVNode("div",FN,[e.createElementVNode("span",null,e.toDisplayString(i.$t("cms.media.size"))+":",1),e.createElementVNode("span",null,e.toDisplayString(e.unref(gi)(d.filesize)),1)]),e.createElementVNode("div",IN,[e.createElementVNode("span",null,e.toDisplayString(i.$t("cms.media.uploaded"))+":",1),e.createElementVNode("span",null,e.toDisplayString(o(d.created_at)),1)])])])])],10,NN)):e.createCommentVNode("",!0)],64)}),128))])}}},PN={},RN={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function UN(l,t){return e.openBlock(),e.createElementBlock("svg",RN,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),e.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const jN=Qt(PN,[["render",UN]]),zN={},HN={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function qN(l,t){return e.openBlock(),e.createElementBlock("svg",HN,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),e.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const GN=Qt(zN,[["render",qN]]),WN={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground"},KN={key:1,class:"w-full text-sm caption-bottom"},YN={class:"[&_tr]:border-b"},XN={class:"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"},ZN={class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground w-[300px]"},QN={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},JN={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},ev={class:"hidden h-12 px-4 font-medium text-left align-middle text-muted-foreground md:table-cell"},tv={class:"[&_tr:last-child]:border-0"},lv=["onClick"],av={class:"p-4 font-medium align-middle"},rv={class:"flex items-center gap-2"},nv={key:1,class:"relative w-8 h-8"},ov=["src","alt"],sv={class:"truncate max-w-[200px]"},iv={class:"p-4 align-middle"},cv={class:"p-4 align-middle"},dv={class:"hidden p-4 align-middle md:table-cell"},uv={key:0},mv={__name:"MediaList",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]}},emits:["file-click","delete-folder"],setup(l,{emit:t}){const{t:a}=Fe(),r=e.ref(null),n=t,o=()=>{Ca({title:a("cms.builder.deleteTitle"),message:a("cms.builder.deleteObject"),type:"error",onConfirm:()=>{s()}})},s=()=>{n("delete-folder",r.value)};return(i,c)=>{const u=e.resolveComponent("File");return e.openBlock(),e.createElementBlock("div",null,[l.files.length===0?(e.openBlock(),e.createElementBlock("div",WN,[e.createVNode(u,{class:"w-12 h-12 mb-2"}),e.createElementVNode("p",null,e.toDisplayString(i.$t("cms.media.noFilesInFolder")),1)])):(e.openBlock(),e.createElementBlock("table",KN,[e.createElementVNode("thead",YN,[e.createElementVNode("tr",XN,[e.createElementVNode("th",ZN,e.toDisplayString(i.$t("cms.media.name")),1),e.createElementVNode("th",QN,e.toDisplayString(i.$t("cms.media.type")),1),e.createElementVNode("th",JN,e.toDisplayString(i.$t("cms.media.size")),1),e.createElementVNode("th",ev,e.toDisplayString(i.$t("cms.media.updatedAt")),1),c[0]||(c[0]=e.createElementVNode("th",null,null,-1))])]),e.createElementVNode("tbody",tv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,d=>{var m,f,p,y,h;return e.openBlock(),e.createElementBlock("tr",{key:d.id,class:e.normalizeClass(["border-b transition-colors hover:bg-blue-200/50 data-[state=selected]:bg-muted cursor-pointer",{"bg-blue-200":((m=r.value)==null?void 0:m.id)===d.id&&((f=r.value)==null?void 0:f.type)===d.type||l.selectedFiles&&l.selectedFiles.some(g=>g.id===d.id&&g.type===d.type)}]),onClick:g=>i.$emit("cms.file-click",d)},[e.createElementVNode("td",av,[e.createElementVNode("div",rv,[d.type==="dir"?(e.openBlock(),e.createBlock(jN,{key:0,class:"w-5 h-5 text-blue-500"})):(d==null?void 0:d.filetype)==="image"&&(d!=null&&d.filepath)?(e.openBlock(),e.createElementBlock("div",nv,[e.createElementVNode("img",{src:d==null?void 0:d.preview,alt:(d==null?void 0:d.alt)||(d==null?void 0:d.filename),class:"object-cover w-full h-full rounded"},null,8,ov)])):(d==null?void 0:d.filetype)==="image"?(e.openBlock(),e.createBlock(GN,{key:2,class:"w-5 h-5 text-green-500"})):(e.openBlock(),e.createBlock(u,{key:3,class:"w-5 h-5 text-gray-500"})),e.createElementVNode("span",sv,e.toDisplayString((d==null?void 0:d.filename)||(d==null?void 0:d.name)),1)])]),e.createElementVNode("td",iv,e.toDisplayString((d==null?void 0:d.type)==="dir"?i.$t("cms.media.folder"):((y=(p=d==null?void 0:d.filetype)==null?void 0:p.charAt(0))==null?void 0:y.toUpperCase())+((h=d==null?void 0:d.filetype)==null?void 0:h.slice(1))),1),e.createElementVNode("td",cv,e.toDisplayString((d==null?void 0:d.type)==="dir"?"--":e.unref(gi)(d==null?void 0:d.filesize)),1),e.createElementVNode("td",dv,e.toDisplayString(d!=null&&d.updated_at?e.unref(yN)(d==null?void 0:d.updated_at):"--"),1),d.type==="dir"?(e.openBlock(),e.createElementBlock("td",uv,[e.createVNode(e.unref(Gt),{class:"w-4 h-4 text-red-500 cursor-pointer",onClick:e.withModifiers(o,["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],10,lv)}),128))])]))])}}},pv={},fv={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function hv(l,t){return e.openBlock(),e.createElementBlock("svg",fv,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),e.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)])])}const gv=Qt(pv,[["render",hv]]),bv={class:"flex items-center space-x-1"},yv=["onClick"],kv={__name:"MediaBreadcrumb",props:{currentPath:{type:Array,required:!0}},emits:["navigate"],setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",bv,[e.createElementVNode("button",{class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20",onClick:a[0]||(a[0]=r=>t.$emit("navigate",[]))},[e.createVNode(gv,{class:"w-3 h-3"}),e.createTextVNode(" "+e.toDisplayString(t.$t("cms.media.mediaLibrary")),1)]),l.currentPath.length>0?(e.openBlock(),e.createBlock(e.unref(bl),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.currentPath,(r,n)=>(e.openBlock(),e.createElementBlock("button",{key:n,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20",onClick:o=>t.$emit("navigate",l.currentPath.slice(0,n+1))},[e.createVNode(e.unref(Cn),{class:"w-3 h-3"}),e.createTextVNode(" "+e.toDisplayString(r)+" ",1),n<l.currentPath.length-1?(e.openBlock(),e.createBlock(e.unref(bl),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0)],8,yv))),128))]))}},xv=["src"],wv={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},_v=["onClick"],Ev=["onClick"],Cv=["title"],Vv={key:1,class:"relative group"},Nv=["src"],vv={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},Bv=["title"],Sv={key:2,class:"absolute inset-0 bg-white bg-opacity-75 flex items-center justify-center rounded-lg z-10"},Dv={class:"flex flex-col items-center gap-2"},Av={class:"text-xs text-gray-600"},Mv=["multiple","disabled"],Tv={class:"whitespace-nowrap text-sm"},Lv={class:"whitespace-nowrap text-sm"},$v={class:"flex items-center justify-between p-4 border-b"},Fv={class:"text-lg font-semibold"},Iv={class:"flex items-center justify-between gap-4 p-4 border-b"},Ov={class:"relative z-[1] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm mb-6 p-4 mx-4"},Pv={class:"flex items-center justify-between gap-4"},Rv={class:"flex items-center gap-4 flex-1"},Uv={class:"relative flex-1 max-w-md"},jv=["placeholder"],zv={class:"flex items-center gap-2 relative"},Hv={class:"text-xs font-bold"},qv={class:"text-xs font-bold"},Gv={key:0,class:"w-full absolute top-full left-1/2 transform -translate-x-1/2 mt-2 z-50 bg-white dark:bg-slate-700 flex flex-col items-start border border-slate-200 dark:border-slate-600 rounded-md shadow-lg"},Wv={class:"flex items-center gap-2"},Kv={class:"flex flex-col gap-4 overflow-y-auto p-4 flex-1"},Yv={class:"p-4 border-t flex items-center justify-between"},Xv={key:0,class:"text-sm text-gray-600 dark:text-gray-400"},Zv={key:1},Qv=["disabled"],Ll={__name:"vs-form-media-select",props:e.mergeModels({multiple:{type:Boolean,default:!1},multi:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(l,{emit:t}){const{t:a}=Fe(),r=rt.useRoute(),n=rt.useRouter(),o=e.useModel(l,"modelValue"),s=t,i=l,c=e.computed(()=>i.multiple||i.multi),u=e.ref(null),d=e.computed(()=>o.value||u.value),m=e.computed(()=>{if(!c.value)return[];const U=d.value;return U?Array.isArray(U)?U:[U]:[]}),f=e.computed(()=>d.value?typeof d.value=="object"?d.value.filename||d.value.file_name||d.value.native_file_name||"File":typeof d.value=="string"?d.value.split("cms./").pop()||d.value:"File":""),p=e.ref(!1),y=e.ref(!1),h=e.ref("grid"),g=e.ref([]),b=e.ref([]),w=e.ref([]),x=e.ref(),k=e.ref([]),_=e.ref(null),N=e.ref(!1),V=e.ref(null),P=e.ref(null),$=e.ref({}),M=e.ref(""),A=e.ref(!1),q=e.ref("name"),Q=new Map([["name",a("cms.media.sortBy.name")],["filesize",a("cms.media.sortBy.filesize")]]),R=U=>typeof U=="string"?U:(U==null?void 0:U.filepath)||(U==null?void 0:U.file_path)||U,I=U=>U?typeof U=="string"?U.split("cms./").pop()||U:U.filename||U.file_name||U.native_file_name||"File":"",F=U=>typeof U=="string"?U:(U==null?void 0:U.preview)||`/file/resize?filepath=${R(U)}&h=137&quality=75`,D=()=>{_.value&&_.value.click()},z=()=>{p.value=!p.value,p.value&&ee()},ee=()=>{if(V.value){const U=V.value.getBoundingClientRect();$.value={top:`${U.bottom+10}px`,left:`${U.left+U.width/2}px`,transform:"translateX(-50%)",width:"200px"}}},me=U=>{var Y;if(U.type==="dir")Ye([...g.value,U.name]);else if(c.value){const le=k.value.findIndex(ae=>ae.id===U.id);le>=0?k.value.splice(le,1):k.value.push(U)}else x.value=U.id===((Y=x.value)==null?void 0:Y.id)?null:U},Ne=U=>{q.value=U,A.value=!1,b.value=b.value.sort((Y,le)=>{var ae;if((Y==null?void 0:Y.type)==="dir")return-1;if(U==="name")return(ae=Y==null?void 0:Y.name)==null?void 0:ae.localeCompare(le==null?void 0:le.name);if(U==="filesize")return(le==null?void 0:le.filesize)-(Y==null?void 0:Y.filesize)})},Ke=async()=>{try{const U=g.value.join("/"),le=await(await fetch(`/api/cms-media?subdir=${U}${M.value?"&search="+M.value:""}`,{method:"GET"})).json();le.data?(b.value=le.data.map(ae=>({...ae,id:ae.type==="dir"?`dir-${ae.name}`:ae.id,preview:`/file/resize?filepath=${ae.filepath}&h=137&quality=75`})),Ne(q.value)):b.value=[]}catch(U){console.error("Search error:",U),b.value=[]}},qt=()=>{if(c.value){if(k.value.length>0){const U=Array.isArray(o.value)?[...o.value]:o.value?[o.value]:[],Y=Array.isArray(u.value)?[...u.value]:u.value?[u.value]:[];k.value.forEach(le=>{const ae=le.filepath||le.file_path;U.some(de=>(typeof de=="string"?de:(de==null?void 0:de.filepath)||(de==null?void 0:de.file_path))===ae)||(U.push(ae),Y.push(le))}),o&&(o.value=U),u.value=Y,s("cms.change",U),k.value=[]}}else if(x.value){const U=x.value.filepath||x.value.file_path;o&&(o.value=U),u.value=x.value,s("cms.change",U),x.value=null}Re()},Re=()=>{y.value=!1},Ye=U=>{g.value=U,w.value=[...w.value,U],x.value=null,c.value&&(k.value=[]),yt()},vt=()=>{w.value.length>1&&(w.value.pop(),g.value=w.value[w.value.length-1],x.value=null,c.value&&(k.value=[]),yt())},yt=async()=>{try{const U=g.value.join("/"),le=await(await fetch(`/api/cms-media?subdir=${U}${M.value?"&search="+M.value:""}`,{method:"GET"})).json();le.data?(b.value=le.data.map(ae=>({...ae,id:ae.type==="dir"?`dir-${ae.name}`:ae.id,preview:`/file/resize?filepath=${ae.filepath}&h=137&quality=75`})),Ne(q.value)):b.value=[]}catch(U){console.error("Fetch error:",U),b.value=[]}},Et=async(U,Y)=>{try{const le=typeof U=="string"?U:R(U);if(await fetch(`/file/delete${le}`),c.value){const ae=Array.isArray(o.value)?[...o.value]:[],de=Array.isArray(u.value)?[...u.value]:[];if(Y!==void 0&&Y>=0)ae.splice(Y,1),de.splice(Y,1);else{const Ae=ae.findIndex(C=>(typeof C=="string"?C:(C==null?void 0:C.filepath)||(C==null?void 0:C.file_path))===le);Ae>=0&&(ae.splice(Ae,1),de.splice(Ae,1))}o&&(o.value=ae.length>0?ae:null),u.value=de.length>0?de:null,s("cms.change",ae.length>0?ae:null)}else o&&(o.value=null),u.value=null,s("cms.change",null);return!0}catch(le){return console.error(le),!1}},Pt=async U=>{try{const Y=await fetch(`/file/download/files/uploads${U}`),le=await Y.arrayBuffer(),ae=Y.headers["content-type"],de=new TextDecoder("utf-8").decode(le),Ae=new Blob([de],{type:ae}),C=document.createElement("cms.a");C.setAttribute("download",U),C.href=window.URL.createObjectURL(Ae),C.click()}catch(Y){console.error(Y.message)}},at=async U=>{if(!U.target.files||U.target.files.length===0)return;const Y=Array.from(U.target.files);console.log("Uploading files:",Y),N.value=!0;try{const le=[];for(const ae of Y){const de=new FormData;de.append("file",ae);const Ae=await fetch("/file/upload/uploads?id=1&form=form&table=table",{method:"POST",body:de});if(!Ae.ok)throw new Error(`Upload failed: ${Ae.status}`);const C=await Ae.json();console.log("Upload result:",C);const v=C.result,H={file_id:v.file_id,file_name:v.file_name,file_path:v.file_path,filepath:v.file_path,format:v.format,size:v.size,entity_id:v.entity_id,dir:v.dir,native_file_name:v.native_file_name,preview:`/file/resize?filepath=${v.file_path}&h=137&quality=75`};le.push(H)}if(c.value){const ae=Array.isArray(o.value)?[...o.value]:o.value?[o.value]:[],de=Array.isArray(u.value)?[...u.value]:u.value?[u.value]:[];le.forEach(Ae=>{ae.push(Ae.file_path),de.push(Ae)}),o&&(o.value=ae),u.value=de,s("cms.change",ae)}else{const ae=le[0];o&&(o.value=ae.file_path),u.value=ae,s("cms.change",ae.file_path)}p.value=!1}catch(le){console.error("Upload error:",le),alert("cms.Помилка завантаження файлу: "+le.message)}finally{N.value=!1}U.target.value=""};e.watch(y,U=>{U&&yt()}),e.watch(g,U=>{U.length>0?n.push({query:{path:U.join("/")}}):n.push({query:{path:void 0}})});let st;return e.watch(M,U=>{clearTimeout(st),st=setTimeout(()=>{Ke()},500)}),e.watch(o,U=>{var Y,le,ae,de;if(U&&typeof U=="object"){const Ae=((Y=x.value)==null?void 0:Y.filepath)||((le=x.value)==null?void 0:le.file_path);U.filepath!==Ae&&U.file_path!==Ae&&(x.value=null)}else if(U&&typeof U=="string"){const Ae=((ae=x.value)==null?void 0:ae.filepath)||((de=x.value)==null?void 0:de.file_path);U!==Ae&&(x.value=null)}}),e.onMounted(()=>{var Y,le;g.value=((le=(Y=r.query)==null?void 0:Y.path)==null?void 0:le.split("cms./"))||[],w.value=[[]],o.value||(x.value=null);const U=ae=>{var de;p.value&&!((de=V.value)!=null&&de.contains(ae.target))&&(p.value=!1),A.value&&P.value&&!P.value.contains(ae.target)&&(A.value=!1)};document.addEventListener("click",U)}),(U,Y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps(U.$attrs,{class:"flex gap-4 flex-wrap"}),[c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(le,ae)=>(e.openBlock(),e.createElementBlock("div",{key:ae,class:"relative group"},[e.createElementVNode("img",{src:F(le),alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,xv),e.createElementVNode("div",wv,[e.createElementVNode("button",{type:"button",onClick:de=>Et(le,ae),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[e.createVNode(e.unref(Gt),{class:"w-4 h-4"})],8,_v),e.createElementVNode("button",{type:"button",onClick:de=>Pt(R(le)),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[e.createVNode(e.unref(Qa),{class:"w-4 h-4"})],8,Ev)]),e.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:I(le)},[e.createTextVNode(e.toDisplayString(I(le))+" ",1),Y[12]||(Y[12]=e.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,Cv)]))),128)):d.value?(e.openBlock(),e.createElementBlock("div",Vv,[e.createElementVNode("img",{src:d.value.preview||d.value,alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,Nv),e.createElementVNode("div",vv,[e.createElementVNode("button",{type:"button",onClick:Y[0]||(Y[0]=le=>{var ae,de;return Et(((ae=d.value)==null?void 0:ae.filepath)||((de=d.value)==null?void 0:de.file_path)||d.value)}),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[e.createVNode(e.unref(Gt),{class:"w-4 h-4"})]),e.createElementVNode("button",{type:"button",onClick:Y[1]||(Y[1]=le=>{var ae,de;return Pt(((ae=d.value)==null?void 0:ae.filepath)||((de=d.value)==null?void 0:de.file_path)||d.value)}),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[e.createVNode(e.unref(Qa),{class:"w-4 h-4"})])]),e.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:f.value},[e.createTextVNode(e.toDisplayString(f.value)+" ",1),Y[13]||(Y[13]=e.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,Bv)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"triggerButton",ref:V,class:e.normalizeClass(["relative w-32 h-32 flex items-center justify-center border border-dotted border-gray-300 rounded-lg hover:border-blue-500 hover:bg-blue-500/10 hover:cursor-pointer transition-all",{"border-blue-500 bg-blue-500/10":p.value,"opacity-50 cursor-not-allowed":N.value}]),onClick:z},[N.value?(e.openBlock(),e.createBlock(e.unref(er),{key:0,class:"w-4 h-4 animate-spin text-blue-500"})):(e.openBlock(),e.createBlock(e.unref(rl),{key:1,class:"w-4 h-4"})),N.value?(e.openBlock(),e.createElementBlock("div",Sv,[e.createElementVNode("div",Dv,[e.createVNode(e.unref(er),{class:"w-6 h-6 animate-spin text-blue-500"}),e.createElementVNode("span",Av,e.toDisplayString(U.$t("cms.media.uploading")),1)])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed bg-white z-50 border border-gray-200 rounded-lg shadow-lg flex flex-col items-center justify-center",style:e.normalizeStyle($.value)},[e.createElementVNode("div",{class:e.normalizeClass(["relative overflow-hidden flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer",{"opacity-50 cursor-not-allowed":N.value}]),onClick:Y[3]||(Y[3]=le=>!N.value&&D())},[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:_,class:"absolute justify-center bottom-0 left-0 w-full opacity-0",onChange:at,onClick:Y[2]||(Y[2]=e.withModifiers(()=>{},["stop"])),multiple:c.value,disabled:N.value},null,40,Mv),N.value?(e.openBlock(),e.createBlock(e.unref(er),{key:0,class:"w-4 h-4 animate-spin"})):(e.openBlock(),e.createBlock(e.unref(Qa),{key:1})),e.createElementVNode("span",Tv,e.toDisplayString(N.value?U.$t("cms.media.uploading"):U.$t("cms.media.upload")),1)],2),e.createElementVNode("div",{onClick:Y[4]||(Y[4]=le=>y.value=!0),class:"flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer"},[e.createVNode(e.unref(ma)),e.createElementVNode("span",Lv,e.toDisplayString(U.$t("cms.media.selectFromMedia")),1)])],4)):e.createCommentVNode("",!0)]))],2)],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:Re},[e.createElementVNode("div",{class:"bg-white rounded-lg shadow-xl max-w-4xl w-full mx-4 max-h-[90vh] flex flex-col",onClick:Y[11]||(Y[11]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",$v,[e.createElementVNode("h3",Fv,e.toDisplayString(U.$t("cms.media.selectFiles")),1),e.createElementVNode("button",{onClick:Re,class:"text-gray-400 hover:text-gray-600"},[...Y[14]||(Y[14]=[e.createElementVNode("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),e.createElementVNode("div",Iv,[e.createVNode(kv,{"current-path":g.value,onNavigate:Ye,onNavigateBack:vt},null,8,["current-path"])]),e.createElementVNode("div",Ov,[e.createElementVNode("div",Pv,[e.createElementVNode("div",Rv,[e.createElementVNode("div",Uv,[e.createVNode(e.unref(tr),{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-slate-400 dark:text-slate-500"}),e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:U.$t("cms.media.search"),class:"w-full pl-10 pr-4 py-2 text-sm border border-slate-200 dark:border-slate-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-slate-700 text-slate-700 dark:text-slate-200 placeholder-slate-400 dark:placeholder-slate-500","onUpdate:modelValue":Y[5]||(Y[5]=le=>M.value=le)},null,8,jv),[[e.vModelText,M.value]])]),e.createElementVNode("div",zv,[e.createElementVNode("span",Hv,e.toDisplayString(U.$t("cms.media.sortBy.title")+": "),1),e.createElementVNode("button",{ref_key:"sortByButton",ref:P,class:"relative z-[1000] inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border shadow-sm h-8 rounded-md px-3 text-xs bg-white border-slate-300 text-slate-700 disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600",onClick:Y[8]||(Y[8]=le=>A.value=!A.value)},[e.createVNode(e.unref(En),{class:"w-4 h-4"}),e.createElementVNode("span",qv,e.toDisplayString(e.unref(Q).get(q.value)),1),A.value?(e.openBlock(),e.createElementBlock("div",Gv,[e.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 border-b border-slate-200 dark:border-slate-600 cursor-pointer",onClick:Y[6]||(Y[6]=e.withModifiers(le=>Ne("name"),["stop"]))},e.toDisplayString(U.$t("cms.media.sortBy.name")),1),e.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 cursor-pointer",onClick:Y[7]||(Y[7]=e.withModifiers(le=>Ne("filesize"),["stop"]))},e.toDisplayString(U.$t("cms.media.sortBy.filesize")),1)])):e.createCommentVNode("",!0)],512)])]),e.createElementVNode("div",Wv,[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":h.value==="grid","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":h.value==="list"}]),onClick:Y[9]||(Y[9]=le=>h.value="grid")},[e.createVNode(e.unref(zi),{class:"w-4 h-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":h.value==="list","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":h.value==="grid"}]),onClick:Y[10]||(Y[10]=le=>h.value="list")},[e.createVNode(e.unref(pa),{class:"w-4 h-4"})],2)])])]),e.createElementVNode("div",Kv,[h.value==="grid"?(e.openBlock(),e.createBlock(ON,{key:0,files:b.value,"selected-file":c.value?null:x.value,"selected-files":c.value?k.value:[],onFileClick:me},null,8,["files","selected-file","selected-files"])):(e.openBlock(),e.createBlock(mv,{key:1,files:b.value,"selected-file":c.value?null:x.value,"selected-files":c.value?k.value:[],onFileClick:me},null,8,["files","selected-file","selected-files"]))]),e.createElementVNode("div",Yv,[c.value&&k.value.length>0?(e.openBlock(),e.createElementBlock("div",Xv,e.toDisplayString(U.$t("cms.media.selectedFiles",{count:k.value.length})),1)):(e.openBlock(),e.createElementBlock("div",Zv)),e.createElementVNode("button",{onClick:qt,disabled:c.value?k.value.length===0:!x.value,class:"flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2 ml-auto bg-blue-600 hover:bg-blue-700 text-white shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-105"},[e.createVNode(e.unref(rl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(U.$t("cms.common.actions.add")),1)],8,Qv)])])])):e.createCommentVNode("",!0)]))],64))}},Jv={};function eB(l,t){const a=e.resolveComponent("vs-richtext-md",!0);return e.openBlock(),e.createBlock(a,{class:"w-full h-[300px]"})}const bi=Qt(Jv,[["render",eB]]),tB={props:{min:{type:Number},step:{type:Number,default:()=>1},max:{type:Number,default:()=>1/0},modelValue:{type:Number,default:()=>null},label:{type:String,default:()=>""},placeholder:{type:String,default:()=>"0"},disabled:{type:Boolean,default:()=>!1}},data(){return{id:`input-number-${Math.floor(Math.random()*1e3)}`,inputValue:this.modelValue}},watch:{modelValue(l){this.inputValue=l},inputValue(l){this.$emit("update:modelValue",l)}},methods:{validateInput(l){(l.key==="+"||l.key===","||l.key==="."||l.key==="-"&&this.inputValue&&this.inputValue.toString().length>0)&&l.preventDefault()},handleBlur(){let l=parseFloat(this.inputValue);this.$emit("blur"),isNaN(l)?l=this.min:l>this.max?l=this.max:l<this.min&&(l=this.min),this.inputValue=l,this.$emit("update:modelValue",this.inputValue)}}},lB={class:"p-0"},aB=["step","min","max","id","placeholder","disabled"];function rB(l,t,a,r,n,o){return e.openBlock(),e.createElementBlock("div",lB,[e.renderSlot(l.$slots,"label",e.normalizeProps(e.guardReactiveProps({id:n.id}))),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=s=>n.inputValue=s),type:"number",onKeydown:t[1]||(t[1]=(...s)=>o.validateInput&&o.validateInput(...s)),onBlur:t[2]||(t[2]=(...s)=>o.handleBlur&&o.handleBlur(...s)),step:a.step,min:a.min,max:a.max,id:n.id,"aria-describedby":"helper-text-explanation",class:e.normalizeClass(["vs-number__input py-2 px-3 block w-full h-[38px] border border-solid border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-1 focus:outline-none focus:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600",{"cursor-not-allowed":a.disabled}]),placeholder:a.placeholder,disabled:a.disabled},null,42,aB),[[e.vModelText,n.inputValue]])])}const yi=Qt(tB,[["render",rB]]),ki={__name:"vs-form-reletion-link",props:e.mergeModels({relation:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=e.useModel(l,"modelValue"),a=l,r=e.ref([]),n=async()=>{const s=await(await fetch(`/api/cms-suggest/${a.relation}`)).json();r.value=s==null?void 0:s.data};return e.onMounted(n),(o,s)=>{var i;return(i=r.value)!=null&&i.length?(e.openBlock(),e.createBlock(e.unref(Lr),{key:0,mode:"combo",modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value=c),options:r.value},null,8,["modelValue","options"])):e.createCommentVNode("",!0)}}},nB={monaco:G_,edit:bC,preview:{__name:"vs-builder-preview",props:{data:{},dataModifiers:{},form:{},formModifiers:{}},emits:["update:data","update:form"],setup(l){$e["vs-input-custom-datatable"]=ii,$e["vs-input-reference"]=fn,$e["vs-input-texteditor"]=pn,$e["vs-input-mediaselect"]=Ll,$e["vs-input-file"]=Ll,$e["vs-input-image"]=Ll,$e["vs-input-richtext-md"]=bi,$e["vs-input-integer"]=yi,$e["vs-input-relation-link"]=ki;const t=e.ref({}),a=e.useModel(l,"data"),r=e.useModel(l,"form"),n=e.computed(()=>{var o,s;return((s=(o=a.value)==null?void 0:o.columns)==null?void 0:s.map(mn))||[]});return(o,s)=>{var i;return e.openBlock(),e.createElementBlock("div",{ref_key:"form",ref:r},[((i=n.value)==null?void 0:i.length)>0?(e.openBlock(),e.createBlock(e.unref(Xe),{key:0,modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value=c),schema:n.value},null,8,["modelValue","schema"])):e.createCommentVNode("",!0)],512)}}}},oB={class:"max-w-6xl mx-auto"},sB={class:"flex items-center justify-between mb-6"},iB={class:"mb-2 text-2xl font-semibold text-gray-900"},cB={class:"lowercase"},dB={class:"text-gray-600"},uB={class:"flex items-center gap-2"},mB={class:"w-full"},pB={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 mb-6 bg-white border border-gray-200 rounded-md text-muted-foreground"},fB=["onClick"],hB={key:0,class:"container mx-auto bg-white rounded-md py-4 px-2 bg-opacity-50"},gB={__name:"EditCollectionPage",setup(l){const{t}=Fe(),a=e.inject("cms.fetchContentTypes"),r=e.ref("edit"),n=e.ref({yaml:"",data:{columns:[],type:"collection"}}),o=e.ref({}),s=e.ref(""),i=rt.useRoute(),c=rt.useRouter(),u=e.ref(!1),d=e.computed(()=>[{name:t("cms.builder.edit"),id:"edit"},{name:t("cms.builder.preview"),id:"preview"}]),m=async()=>{var p;try{const h=await(await fetch(`/api/cms-type/${i.params.id}`)).json(),g={...h,columns:Array.isArray(h.columns)?h.columns:(p=Object.entries((h==null?void 0:h.columns)||{}))==null?void 0:p.map(([b,w])=>({...w,name:b}))};n.value={...n.value,data:g},s.value=g.title||g.name}catch(y){console.error(y)}finally{u.value=!0}},f=async()=>{var p,y;try{if(await o.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}const g=await fetch(`/api/cms-type/${i.params.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.value==="monaco"?(p=n.value)==null?void 0:p.yaml:(y=n.value)==null?void 0:y.data)});c.push("/settings/collections"),a(),xe({type:"success",title:t("cms.common.actions.success"),message:t("cms.collections.collectionCreated")})}catch(h){console.error(h),xe({type:"error",title:t("cms.common.actions.error"),message:t("cms.collections.collectionCreationFailed")})}};return e.onMounted(()=>{m()}),(p,y)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",oB,[e.createElementVNode("div",sB,[e.createElementVNode("div",null,[e.createElementVNode("h1",iB,[e.createTextVNode(e.toDisplayString(p.$t("cms.builder.editCollection"))+" ",1),e.createElementVNode("span",cB,e.toDisplayString(s.value),1)]),e.createElementVNode("p",dB,e.toDisplayString(p.$t("cms.builder.editContentForYourSite")),1)]),e.createElementVNode("div",uB,[e.createVNode(h,{to:"/settings/collections",class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border bg-background hover:text-accent-foreground h-10 px-4 py-2 border-gray-300 text-gray-700 hover:bg-gray-50"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.$t("cms.common.actions.back")),1)]),_:1}),e.createElementVNode("button",{onClick:f,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-white rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-primary-foreground h-10 px-4 py-2 bg-blue-600 hover:bg-blue-700"},e.toDisplayString(p.$t("cms.common.actions.save")),1)])]),e.createElementVNode("div",mB,[e.createElementVNode("div",pB,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,g=>(e.openBlock(),e.createElementBlock("button",{key:g.id,onClick:b=>r.value=g.id,class:e.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",g.id===r.value?"bg-blue-50 text-blue-700 border-blue-200":""])},e.toDisplayString(g.name),11,fB))),128))])]),u.value?(e.openBlock(),e.createElementBlock("div",hB,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(nB)[r.value]),{yaml:n.value.yaml,"onUpdate:yaml":y[0]||(y[0]=g=>n.value.yaml=g),data:n.value.data,"onUpdate:data":y[1]||(y[1]=g=>n.value.data=g),form:o.value,"onUpdate:form":y[2]||(y[2]=g=>o.value=g)},null,40,["yaml","data","form"]))])):e.createCommentVNode("",!0)])}}},bB=[{key:"title",label:"common.title",localization:!0,type:"text"},{key:"description",label:"common.description",localization:!0,type:"text"},{key:"keywords",label:"common.keywords",localization:!0,type:"text"},{key:"meta",label:"common.meta",type:"key-value",ignore:["title","description","keywords"]}],yB={__name:"VsFormTags",props:{modelValue:{default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(l,{expose:t}){const{t:a}=Fe(),r=e.useModel(l,"modelValue"),n=e.ref({}),o=e.ref(!1);e.provide("metaParentValue",r);const s=m=>Array.isArray(m)?m.map(f=>typeof f=="object"&&f!==null&&f.id?f.id:f):[],i=async m=>{if(!Array.isArray(m)||m.length===0)return[];try{const p=await(await fetch("/api/tags")).json(),y=(p==null?void 0:p.rows)||[];return m.map(h=>{const g=y.find(b=>b.tag_id===h);return g?{id:g.tag_id,text:g.value,color:g.color}:{id:h,text:"",color:"#ababab"}})}catch(f){return console.error("Error fetching tags:",f),m.map(p=>({id:p,text:"",color:"#ababab"}))}};e.onMounted(async()=>{await e.nextTick(),await e.nextTick(),setTimeout(()=>{var m;if(Array.isArray((m=r.value)==null?void 0:m.tag_list)){const f=s(r.value.tag_list);JSON.stringify(f)!==JSON.stringify(r.value.tag_list)&&(r.value.tag_list=f)}},100)}),e.watch(()=>r.value.tag_list,m=>{if(Array.isArray(m)&&!o.value){const f=s(m);JSON.stringify(f)!==JSON.stringify(m)&&(r.value.tag_list=f)}},{deep:!0}),e.watch(()=>r.value,m=>{if(m&&Array.isArray(m.tag_list)&&!o.value){const f=s(m.tag_list);JSON.stringify(f)!==JSON.stringify(m.tag_list)&&(m.tag_list=f)}},{deep:!0,immediate:!0}),e.watch(()=>{var m;return(m=r.value)==null?void 0:m.tag_list},m=>{Array.isArray(m)&&n.value&&e.nextTick(()=>{n.value&&n.value.setValue&&n.value.setValue("tag_list",m)})},{deep:!0});const c=async m=>{if(m.tag_list&&(m.tag_list=s(m.tag_list),r.value.tag_list=m.tag_list),await n.value.validate()){xe({type:"warning",title:a("cms.common.actions.warning"),message:a("cms.builder.editFieldFailed")});return}};t({restoreTagsBeforeSubmit:async()=>{var m;if(o.value=!0,Array.isArray((m=r.value)==null?void 0:m.tag_list)){console.log("Before restore:",r.value.tag_list);const f=await i(r.value.tag_list);console.log("After restore:",f),r.value.tag_list=f}setTimeout(()=>{o.value=!1},2e3)}});const d=e.computed(()=>{var m;return[{key:"tag_list",type:"select",multiple:!0,searchable:!1,placeholder:a("cms.builder.tags"),data:"tag_id",value:((m=r.value)==null?void 0:m.tag_list)||[]}]});return(m,f)=>r.value?(e.openBlock(),e.createBlock(e.unref(Xe),{key:0,schema:d.value,modelValue:r.value,"onUpdate:modelValue":[f[0]||(f[0]=p=>r.value=p),c]},null,8,["schema","modelValue"])):e.createCommentVNode("",!0)}},kB={class:"flex justify-end mb-4"},xB=["href"],wB=["src"],_B=["src"],EB={key:2,class:"w-full h-[80vh] flex items-center justify-center text-gray-500"},CB={__name:"VsPreview",props:{preview_path:{type:String,default:""},slug:{type:String,default:""}},setup(l){const t=e.ref(""),a=e.ref(""),r=async()=>{var o,s;try{const c=await(await fetch("/api/settings")).json();t.value=((s=(o=c==null?void 0:c.settings)==null?void 0:o.site_info)==null?void 0:s.previewUrl)||"http://ip.local.softpro.ua"}catch(i){console.error("Failed to fetch settings:",i),t.value="http://ip.local.softpro.ua"}},n=async()=>{var o;try{const i=await(await fetch("/user")).json();a.value=(o=i==null?void 0:i.user)==null?void 0:o.draftKey}catch(s){console.error("Failed to fetch user:",s)}};return e.onMounted(()=>{r(),n()}),(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",kB,[e.createElementVNode("a",{href:`${t.value}/uk/${l.preview_path}${l.slug}${a.value?`?draftKey=${a.value}`:""}`,target:"_blank",class:"inline-flex items-center gap-2 px-3 py-1.5 text-black-600 bg-white border border-blue-200 rounded hover:border-blue-300 hover:bg-blue-50 transition-colors duration-200 font-normal cursor-pointer"},[s[0]||(s[0]=e.createTextVNode(" Переглянути на сайті ",-1)),e.createVNode(e.unref(Ui),{class:"w-4 h-4"})],8,xB)]),t.value&&l.preview_path?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:`${t.value}/uk/${l.preview_path}${l.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,wB)):t.value?(e.openBlock(),e.createElementBlock("iframe",{key:1,src:`${t.value}/uk/${l.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,_B)):(e.openBlock(),e.createElementBlock("div",EB," Loading preview... "))]))}},VB={class:"space-y-6 max-w-6xl mx-auto relative bg-white"},NB={class:"p-4 sticky top-[-24px] z-10 bg-white dark:bg-slate-800"},vB={class:"flex items-center justify-between"},BB={class:"flex items-center gap-4"},SB={class:"text-2xl font-semibold text-gray-900 dark:text-white"},DB=["href","title"],AB={class:"flex items-center space-x-3"},MB={class:"w-full mt-6 flex items-center justify-between"},TB={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 bg-white border border-gray-200 rounded-md text-muted-foreground"},LB=["onClick"],$B={class:"flex items-center gap-2"},FB={for:"is_pin",class:"text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer"},IB={class:"relative"},OB={key:0,class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},PB={class:"container mx-auto bg-white rounded-md pb-4 px-5"},RB={class:"container mx-auto bg-white rounded-md pb-4 px-2"},UB={key:0,class:"container mx-auto bg-white rounded-md pb-4 px-2"},jB={class:"container mx-auto bg-white rounded-md pb-4 px-2"},xi=e.defineComponent({__name:"contentForm",setup(l){$e["vs-input-custom-datatable"]=ii,$e["vs-input-reference"]=fn,$e["vs-input-texteditor"]=pn,$e["vs-input-mediaselect"]=Ll,$e["vs-input-file"]=Ll,$e["vs-input-image"]=Ll,$e["vs-input-richtext-md"]=bi,$e["vs-input-integer"]=yi,$e["vs-input-relation-link"]=ki;const{t,locale:a}=Fe(),r=rt.useRouter(),n=rt.useRoute(),o=e.inject("menu",e.ref([])),s=e.ref([]),i=e.ref({}),c=e.ref({}),u=e.ref({}),d=e.ref(""),m=$=>{const M=[];return $.forEach(A=>{if(M.push(A),A.localization){const q={...A,name:A.name+":en",label:A.label+" (en)"};M.push(q)}}),M},f=e.computed(()=>{var $;return($=s.value)==null?void 0:$.map(mn)}),p=e.computed(()=>(a.value,bB.flatMap($=>{const M={...$,label:t($.label)};if($.localization){const A={...$,key:`${$.key}:en`,label:t($.label)+" (en)"};return[M,A]}return[M]}))),y=e.ref({}),h=e.ref({title:"",status:"draft"}),g=e.computed(()=>{const $=[{id:"content",name:t("cms.builder.content")},{id:"seo",name:t("cms.builder.seo")},{id:"tags",name:t("cms.builder.tags")}];return d.value&&$.push({id:"preview",name:t("cms.builder.preview")}),$}),b=e.ref("content"),w=e.computed(()=>{var M,A,q,Q;const $=((M=n.params)==null?void 0:M.collection)||((A=n.params)==null?void 0:A.id);return((Q=(q=o.value)==null?void 0:q.find(R=>R.id===$))==null?void 0:Q.title)||$}),x=e.computed(()=>{var $,M;return(($=h.value)==null?void 0:$.title)||((M=n.params)!=null&&M.id?t("cms.builder.editCollection"):t("cms.articles.createArticle"))}),k=e.computed(()=>{var q,Q,R;const $=((q=n.params)==null?void 0:q.collection)||((Q=n.params)==null?void 0:Q.id),M=(R=n.params)==null?void 0:R.id,A=[{label:w.value,route:`collections/${$}`}];return M?A.push({label:x.value,route:`collections/${$}/${M}`}):A.push({label:t("cms.articles.createArticle"),route:`collections/${$}/create`}),A}),_=$=>{$==="collections"?r.push("/collections"):r.push(`/${$}`)};e.onMounted(async()=>{var Q,R,I;const $=(Q=n.params)==null?void 0:Q.collection,M=(R=n.params)==null?void 0:R.id,A=$||M,q=$&&M?M:void 0;if(!q){if(!A)return;const D=await(await fetch(`/api/cms/${A}/`)).json();s.value=m(D.columns)}try{if(!q||!A)return;const F=await fetch(`/api/cms/${A}/${q}`);if(!F.ok)throw new Error("Failed to fetch article");const D=await F.json();if(s.value=m(D==null?void 0:D.columns),D!=null&&D.preview_path&&(d.value=D==null?void 0:D.preview_path),D.rows){let z=D.rows;Array.isArray(z)||(z=[z]),h.value=z[0],await e.nextTick(),(I=z[0])!=null&&I.meta?y.value={...z[0].meta}:y.value={title:"",description:"",keywords:"",meta:{}},console.log("Initialized seoData from rows[0]:",y.value)}else h.value=D,await e.nextTick(),D!=null&&D.meta?(y.value={title:D.meta.title||"",description:D.meta.description||"",keywords:D.meta.keywords||"",meta:{...D.meta}},delete y.value.meta.title,delete y.value.meta.description,delete y.value.meta.keywords):y.value={title:"",description:"",keywords:"",meta:{}},console.log("Initialized seoData from data:",y.value)}catch(F){console.error("Error fetching article:",F)}});const N=e.computed({get:()=>{var $;return(($=h.value)==null?void 0:$.is_pin)||!1},set:$=>{h.value&&(h.value.is_pin=$)}}),V=()=>{h.value&&(h.value.is_pin=!h.value.is_pin)};e.watch(y,$=>{console.log("seoData changed:",$)},{deep:!0});const P=async $=>{var I,F,D,z;const M=(I=n.params)==null?void 0:I.collection,A=(F=n.params)==null?void 0:F.id,q=await i.value.validate();if(q){xe({title:t("cms.validation"),message:JSON.stringify(q),type:"warning"});return}(D=u.value)!=null&&D.restoreTagsBeforeSubmit&&await u.value.restoreTagsBeforeSubmit();const Q=y.value||{},R={...h.value,meta:{...Q,...Q.meta||{}}};console.log("Payload before submit:",R);try{const ee=await fetch(`/api/cms/${M}/${A||""}`,{method:A?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)});if(!ee.ok){let me;try{const Ne=await ee.json();me=JSON.stringify(Ne,null,2)}catch{me=await ee.text()}throw new Error(`HTTP ${ee.status}: ${me}`)}if(!A)try{const me=await ee.json(),Ne=me.id||((z=me.data)==null?void 0:z.id);Ne&&n.name==="createArticle"&&await r.push(`/collections/${M}/${Ne}`)}catch(me){console.warn("Could not parse response to get ID:",me)}xe({title:t("cms.common.success"),message:t("cms.common.successMessage"),type:"success"})}catch(ee){console.error("Submit error:",ee),xe({title:t("cms.common.error"),message:"Помилка збереження",type:"error"})}};return($,M)=>{var A,q,Q,R,I,F,D;return e.openBlock(),e.createElementBlock("div",VB,[e.createElementVNode("div",NB,[e.createVNode(Cs,{items:k.value,onNavigate:_},null,8,["items"]),e.createElementVNode("div",vB,[e.createElementVNode("div",BB,[e.createElementVNode("button",{onClick:M[0]||(M[0]=z=>e.unref(r).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[e.createVNode(e.unref(Oi),{class:"w-5 h-5"})]),e.createElementVNode("h1",SB,[e.createTextVNode(e.toDisplayString($.$t("cms.builder.editCollection"))+" ",1),e.createElementVNode("span",null,'"'+e.toDisplayString(((A=h.value)==null?void 0:A.type)==="single"?h.value.title:(Q=(q=e.unref(o).value)==null?void 0:q.find(z=>z.id===(e.unref(n).params.collection||e.unref(n).params.id)))==null?void 0:Q.title)+'"',1)]),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(a)}/guides/content/`,target:"_blank",title:$.$t("cms.guide.content")},[e.createVNode(e.unref(kl),{class:"w-5 h-5"})],8,DB)]),e.createElementVNode("div",AB,[e.createElementVNode("button",{onClick:P,type:"submit",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(qi),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString($.$t("cms.builder.save")),1)])])]),e.createElementVNode("div",MB,[e.createElementVNode("div",TB,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,z=>(e.openBlock(),e.createElementBlock("button",{key:z.id,onClick:ee=>b.value=z.id,class:e.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",z.id===b.value?"bg-blue-50 text-blue-700 border-blue-200":""])},e.toDisplayString(z.name),11,LB))),128))]),e.createElementVNode("div",$B,[e.createElementVNode("label",FB,e.toDisplayString($.$t("cms.collections.pinPublication")),1),e.createElementVNode("div",IB,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",id:"is_pin","onUpdate:modelValue":M[1]||(M[1]=z=>N.value=z),class:"sr-only"},null,512),[[e.vModelCheckbox,N.value]]),e.createElementVNode("div",{class:e.normalizeClass(["w-5 h-5 border-2 rounded transition-all duration-200 cursor-pointer flex items-center justify-center",(R=h.value)!=null&&R.is_pin?"bg-sky-600 border-sky-600":"bg-white border-gray-300 hover:border-sky-400 dark:bg-gray-700 dark:border-gray-600 dark:hover:border-sky-400"]),onClick:V},[(I=h.value)!=null&&I.is_pin?(e.openBlock(),e.createElementBlock("svg",OB,[...M[7]||(M[7]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)])])):e.createCommentVNode("",!0)],2)])])])]),e.withDirectives(e.createElementVNode("div",PB,[(F=s.value)!=null&&F.length?(e.openBlock(),e.createBlock(e.unref(Xe),{key:0,modelValue:h.value,"onUpdate:modelValue":M[2]||(M[2]=z=>h.value=z),schema:f.value,form:i.value,"onUpdate:form":M[3]||(M[3]=z=>i.value=z)},null,8,["modelValue","schema","form"])):e.createCommentVNode("",!0)],512),[[e.vShow,b.value==="content"]]),e.withDirectives(e.createElementVNode("div",RB,[e.createVNode(e.unref(Xe),{schema:p.value,values:y.value,"onUpdate:values":M[4]||(M[4]=z=>y.value=z),form:c.value,"onUpdate:form":M[5]||(M[5]=z=>c.value=z)},null,8,["schema","values","form"])],512),[[e.vShow,b.value==="seo"]]),b.value==="tags"?(e.openBlock(),e.createElementBlock("div",UB,[e.createVNode(yB,{ref_key:"tagsForm",ref:u,modelValue:h.value,"onUpdate:modelValue":M[6]||(M[6]=z=>h.value=z)},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",jB,[e.createVNode(CB,{slug:(D=h.value)==null?void 0:D.slug,preview_path:d.value},null,8,["slug","preview_path"])],512),[[e.vShow,b.value==="preview"]])])}}}),zB=(l,t)=>{const a=l==null?void 0:l.trim();return a?t?t==="create"?{type:"createArticle",collection:a}:{type:"editArticle",collection:a,id:t}:{type:"articles",collection:a}:{type:"collections"}},HB={key:1,class:"p-4 text-sm text-slate-600 dark:text-slate-300"},qB=e.defineComponent({__name:"CmsContentWrapper",setup(l){const t=rt.useRoute(),a=e.getCurrentInstance();if(!a)throw new Error("CmsContentWrapper must be used within a component instance");const r=e.computed(()=>{const y=a.appContext.config.globalProperties.$route;if(!y)throw new Error("Vue Router is not registered on the app instance");return y}),n=e.computed(()=>t??r.value),o=e.computed(()=>{var y;return((y=n.value)==null?void 0:y.params)??{}}),s=e.computed(()=>{var y,h;return((y=o.value)==null?void 0:y.collection)??((h=o.value)==null?void 0:h.type)}),i=e.computed(()=>{var y;return(y=o.value)==null?void 0:y.id}),c=e.computed(()=>zB(s.value,i.value)),u={collections:Mr,articles:Vs,createArticle:xi,editArticle:xi},d=e.computed(()=>u[c.value.type]??Mr),m=e.computed(()=>`${c.value.type}-${c.value.collection??""}-${c.value.id??""}`),f=e.computed(()=>{const{type:y,collection:h,id:g}=c.value,b={...o.value};return s.value?b.collection=s.value:delete b.collection,y==="articles"?b.id=h:y==="createArticle"?delete b.id:y==="editArticle"&&g?b.id=g:delete b.id,b}),p=new Proxy({},{get(y,h,g){const b=n.value;if(!b)return;if(h==="params")return f.value;const w=Reflect.get(b,h,g);return typeof w=="function"?w.bind(b):w},has(y,h){if(h==="params")return!0;const g=n.value;return g?Reflect.has(g,h):!1},ownKeys(){const y=n.value;return y?Reflect.ownKeys(y):["params"]},getOwnPropertyDescriptor(y,h){if(h==="params")return{configurable:!0,enumerable:!0,value:f.value};const g=n.value;if(!g)return;const b=Reflect.getOwnPropertyDescriptor(g,h);if(b)return{...b,configurable:!0}}});return e.provide(rt.routeLocationKey,p),(y,h)=>d.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),{key:m.value})):(e.openBlock(),e.createElementBlock("div",HB,e.toDisplayString(y.$t("cms.navigation.collections")),1))}}),GB=(l,t)=>{const a=l[t];return a?typeof a=="function"?a():Promise.resolve(a):new Promise((r,n)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+t)))})},WB=localStorage.locale||navigator.language.split("cms.-")[0]||"uk",$l=hu({legacy:!1,locale:WB,fallbackLocale:"en",datetimeFormats:{en:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}},uk:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}}},numberFormats:{en:{currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}},uk:{currency:{style:"currency",currency:"UAH"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}}},messages:{}}),hn="en";async function wi(l){return(await GB(Object.assign({"./locales/en.json":()=>Promise.resolve().then(()=>a4),"./locales/uk.json":()=>Promise.resolve().then(()=>r4)}),`./locales/${l}.json`)).default}async function gn(l){try{const t=await wi(l);return $l.global.setLocaleMessage(l,t),t}catch(t){if(console.error(`Failed to load locale ${l}:`,t),l!==hn)try{const a=await wi(hn);return $l.global.setLocaleMessage(l,a),a}catch(a){throw console.error(`Failed to load fallback locale ${hn}:`,a),a}throw t}}async function KB(l){await gn(l),$l.global.locale.value=l,localStorage.setItem("locale",l),document.documentElement.lang=l,window.dispatchEvent(new CustomEvent("cms.storage",{detail:{key:"locale",oldValue:null,newValue:l}}))}async function YB(){const l=$l.global.locale.value;await gn(l),$l.global.locale.value=l,localStorage.setItem("locale",l),document.documentElement.lang=l}async function XB(l){return await gn(l)}function ZB(l){l.component("Dashboard",Ar)}function ll(l){return typeof l=="string"||l instanceof String}function _i(l){var t;return typeof l=="object"&&l!=null&&(l==null||(t=l.constructor)==null?void 0:t.name)==="Object"}function Ei(l,t){return Array.isArray(t)?Ei(l,(a,r)=>t.includes(r)):Object.entries(l).reduce((a,r)=>{let[n,o]=r;return t(o,n)&&(a[n]=o),a},{})}const ne={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Ci(l){switch(l){case ne.LEFT:return ne.FORCE_LEFT;case ne.RIGHT:return ne.FORCE_RIGHT;default:return l}}function bn(l){return l.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ka(l,t){if(t===l)return!0;const a=Array.isArray(t),r=Array.isArray(l);let n;if(a&&r){if(t.length!=l.length)return!1;for(n=0;n<t.length;n++)if(!Ka(t[n],l[n]))return!1;return!0}if(a!=r)return!1;if(t&&l&&typeof t=="object"&&typeof l=="object"){const o=t instanceof Date,s=l instanceof Date;if(o&&s)return t.getTime()==l.getTime();if(o!=s)return!1;const i=t instanceof RegExp,c=l instanceof RegExp;if(i&&c)return t.toString()==l.toString();if(i!=c)return!1;const u=Object.keys(t);for(n=0;n<u.length;n++)if(!Object.prototype.hasOwnProperty.call(l,u[n]))return!1;for(n=0;n<u.length;n++)if(!Ka(l[u[n]],t[u[n]]))return!1;return!0}else if(t&&l&&typeof t=="function"&&typeof l=="function")return t.toString()===l.toString();return!1}class QB{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ne.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ne.RIGHT:ne.LEFT}}function ue(l,t){return new ue.InputMask(l,t)}function Vi(l){if(l==null)throw new Error("mask property should be defined");return l instanceof RegExp?ue.MaskedRegExp:ll(l)?ue.MaskedPattern:l===Date?ue.MaskedDate:l===Number?ue.MaskedNumber:Array.isArray(l)||l===Array?ue.MaskedDynamic:ue.Masked&&l.prototype instanceof ue.Masked?l:ue.Masked&&l instanceof ue.Masked?l.constructor:l instanceof Function?ue.MaskedFunction:(console.warn("Mask not found for mask",l),ue.Masked)}function Fl(l){if(!l)throw new Error("Options in not defined");if(ue.Masked){if(l.prototype instanceof ue.Masked)return{mask:l};const{mask:t=void 0,...a}=l instanceof ue.Masked?{mask:l}:_i(l)&&l.mask instanceof ue.Masked?l:{};if(t){const r=t.mask;return{...Ei(t,(n,o)=>!o.startsWith("_")),mask:t.constructor,_mask:r,...a}}}return _i(l)?{...l}:{mask:l}}function Ft(l){if(ue.Masked&&l instanceof ue.Masked)return l;const t=Fl(l),a=Vi(t.mask);if(!a)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===a&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new a(t)}ue.createMask=Ft;class Ya{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,a){if(!(t==null||a==null||t===this.selectionStart&&a===this.selectionEnd))try{this._unsafeSelect(t,a)}catch{}}get isActive(){return!1}}ue.MaskElement=Ya;const Ni=90,JB=89;class ra extends Ya{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,a,r;return(t=(a=(r=this.input).getRootNode)==null?void 0:a.call(r))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===Ni&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===JB&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===Ni&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}ue.HTMLMaskElement=ra;class vi extends ra{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,a){this.input.setSelectionRange(t,a)}get value(){return this.input.value}set value(t){this.input.value=t}}ue.HTMLMaskElement=ra;class yn extends ra{get _unsafeSelectionStart(){const t=this.rootElement,a=t.getSelection&&t.getSelection(),r=a&&a.anchorOffset,n=a&&a.focusOffset;return n==null||r==null||r<n?r:n}get _unsafeSelectionEnd(){const t=this.rootElement,a=t.getSelection&&t.getSelection(),r=a&&a.anchorOffset,n=a&&a.focusOffset;return n==null||r==null||r>n?r:n}_unsafeSelect(t,a){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,t),r.setEnd(this.input.lastChild||this.input,a);const n=this.rootElement,o=n.getSelection&&n.getSelection();o&&(o.removeAllRanges(),o.addRange(r))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}ue.HTMLContenteditableMaskElement=yn;class Xa{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>Xa.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Xa.MAX_LENGTH=100;class Bi{constructor(t,a){this.el=t instanceof Ya?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new yn(t):new vi(t),this.masked=Ft(a),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Xa,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var a;return t==null||((a=this.masked)==null?void 0:a.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof ue.Masked)&&this.masked.constructor===Vi(t)){this.masked.updateOptions({mask:t});return}const a=t instanceof ue.Masked?t:Ft({mask:t});a.unmaskedValue=this.masked.unmaskedValue,this.masked=a}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,a){const r=this._listeners[t];r&&r.forEach(n=>n(a))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const a=this.masked.unmaskedValue,r=this.masked.value,n=this.masked.rawInputValue,o=this.displayValue,s=this.unmaskedValue!==a||this.value!==r||this._rawInputValue!==n;this._unmaskedValue=a,this._value=r,this._rawInputValue=n,this.el.value!==o&&(this.el.value=o),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),s&&this._fireChangeEvents(),!this._historyChanging&&(s||this.history.isEmpty)&&this.history.push({unmaskedValue:a,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:a,...r}=t,n=!this.maskEquals(a),o=this.masked.optionsIsChanged(r);n&&(this.mask=a),o&&this.masked.updateOptions(r),(n||o)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,ne.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,a){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(a),this}off(t,a){if(!this._listeners[t])return this;if(!a)return delete this._listeners[t],this;const r=this._listeners[t].indexOf(a);return r>=0&&this._listeners[t].splice(r,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const a=new QB({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,n=this.masked.splice(a.startChangePos,a.removed.length,a.inserted,a.removeDirection,{input:!0,raw:!0}).offset,o=r===this.masked.rawInputValue?a.removeDirection:ne.NONE;let s=this.masked.nearestInputPos(a.startChangePos+n,o);o!==ne.NONE&&(s=this.masked.nearestInputPos(s,ne.NONE)),this.updateControl(s),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}ue.InputMask=Bi;class fe{static normalize(t){return Array.isArray(t)?t:[t,new fe]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}ue.ChangeDetails=fe;class It{constructor(t,a,r){t===void 0&&(t=""),a===void 0&&(a=0),this.value=t,this.from=a,this.stop=r}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const a=this.value[0];return this.value=this.value.slice(1),a}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class Je{constructor(t){this._value="",this._update({...Je.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,a){a===void 0&&(a={input:!0}),this.reset(),this.append(t,a,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,a){return t}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),Math.min(this.displayValue.length,a-t)}extractInput(t,a,r){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),this.displayValue.slice(t,a)}extractTail(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),new It(this.extractInput(t,a),t)}appendTail(t){return ll(t)&&(t=new It(String(t))),t.appendTo(this)}_appendCharRaw(t,a){return t?(this._value+=t,new fe({inserted:t,rawInserted:t})):new fe}_appendChar(t,a,r){a===void 0&&(a={});const n=this.state;let o;if([t,o]=this.doPrepareChar(t,a),t&&(o=o.aggregate(this._appendCharRaw(t,a)),!o.rawInserted&&this.autofix==="pad")){const s=this.state;this.state=n;let i=this.pad(a);const c=this._appendCharRaw(t,a);i=i.aggregate(c),c.rawInserted||i.equals(o)?o=i:this.state=s}if(o.inserted){let s,i=this.doValidate(a)!==!1;if(i&&r!=null){const c=this.state;if(this.overwrite===!0){s=r.state;for(let d=0;d<o.rawInserted.length;++d)r.unshift(this.displayValue.length-o.tailShift)}let u=this.appendTail(r);if(i=u.rawInserted.length===r.toString().length,!(i&&u.inserted)&&this.overwrite==="shift"){this.state=c,s=r.state;for(let d=0;d<o.rawInserted.length;++d)r.shift();u=this.appendTail(r),i=u.rawInserted.length===r.toString().length}i&&u.inserted&&(this.state=c)}i||(o=new fe,this.state=n,r&&s&&(r.state=s))}return o}_appendPlaceholder(){return new fe}_appendEager(){return new fe}append(t,a,r){if(!ll(t))throw new Error("value should be string");const n=ll(r)?new It(String(r)):r;a!=null&&a.tail&&(a._beforeTailState=this.state);let o;[t,o]=this.doPrepare(t,a);for(let s=0;s<t.length;++s){const i=this._appendChar(t[s],a,n);if(!i.rawInserted&&!this.doSkipInvalid(t[s],a,n))break;o.aggregate(i)}return(this.eager===!0||this.eager==="append")&&a!=null&&a.input&&t&&o.aggregate(this._appendEager()),n!=null&&(o.tailShift+=this.appendTail(n).tailShift),o}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(a),new fe}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const a=this.rawInputValue,r=this.value,n=t();return this.rawInputValue=a,this.value&&this.value!==r&&r.indexOf(this.value)===0&&(this.append(r.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const a=this.state,r=t(this);return this.state=a,delete this._isolated,r}doSkipInvalid(t,a,r){return!!this.skipInvalid}doPrepare(t,a){return a===void 0&&(a={}),fe.normalize(this.prepare?this.prepare(t,this,a):t)}doPrepareChar(t,a){return a===void 0&&(a={}),fe.normalize(this.prepareChar?this.prepareChar(t,this,a):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,a,r,n,o){r===void 0&&(r=""),n===void 0&&(n=ne.NONE),o===void 0&&(o={input:!0});const s=t+a,i=this.extractTail(s),c=this.eager===!0||this.eager==="remove";let u;c&&(n=Ci(n),u=this.extractInput(0,s,{raw:!0}));let d=t;const m=new fe;if(n!==ne.NONE&&(d=this.nearestInputPos(t,a>1&&t!==0&&!c?ne.NONE:n),m.tailShift=d-t),m.aggregate(this.remove(d)),c&&n!==ne.NONE&&u===this.rawInputValue)if(n===ne.FORCE_LEFT){let f;for(;u===this.rawInputValue&&(f=this.displayValue.length);)m.aggregate(new fe({tailShift:-1})).aggregate(this.remove(f-1))}else n===ne.FORCE_RIGHT&&i.unshift();return m.aggregate(this.append(r,o,i))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!Ka(this,t)}typedValueEquals(t){const a=this.typedValue;return t===a||Je.EMPTY_VALUES.includes(t)&&Je.EMPTY_VALUES.includes(a)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new fe}}Je.DEFAULTS={skipInvalid:!0},Je.EMPTY_VALUES=[void 0,null,""],ue.Masked=Je;class al{constructor(t,a){t===void 0&&(t=[]),a===void 0&&(a=0),this.chunks=t,this.from=a}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=ll(t)?new It(String(t)):t;const a=this.chunks[this.chunks.length-1],r=a&&(a.stop===t.stop||t.stop==null)&&t.from===a.from+a.toString().length;if(t instanceof It)r?a.extend(t.toString()):this.chunks.push(t);else if(t instanceof al){if(t.stop==null){let n;for(;t.chunks.length&&t.chunks[0].stop==null;)n=t.chunks.shift(),n.from+=t.from,this.extend(n)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof ue.MaskedPattern))return new It(this.toString()).appendTo(t);const a=new fe;for(let r=0;r<this.chunks.length;++r){const n=this.chunks[r],o=t._mapPosToBlock(t.displayValue.length),s=n.stop;let i;if(s!=null&&(!o||o.index<=s)&&((n instanceof al||t._stops.indexOf(s)>=0)&&a.aggregate(t._appendPlaceholder(s)),i=n instanceof al&&t._blocks[s]),i){const c=i.appendTail(n);a.aggregate(c);const u=n.toString().slice(c.rawInserted.length);u&&a.aggregate(t.append(u,{tail:!0}))}else a.aggregate(t.append(n.toString(),{tail:!0}))}return a}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:a,...r}=t;Object.assign(this,r),this.chunks=a.map(n=>{const o="chunks"in n?new al:new It;return o.state=n,o})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const a=t!=null?t-this.from:t;let r=0;for(;r<this.chunks.length;){const n=this.chunks[r],o=n.unshift(a);if(n.toString()){if(!o)break;++r}else this.chunks.splice(r,1);if(o)return o}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const a=this.chunks[t],r=a.shift();if(a.toString()){if(!r)break;--t}else this.chunks.splice(t,1);if(r)return r}return""}}class e4{constructor(t,a){this.masked=t,this._log=[];const{offset:r,index:n}=t._mapPosToBlock(a)||(a<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((a=this.block)==null?void 0:a.displayValue.length)||0){var a;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ne.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ne.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ne.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ne.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ne.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ne.NONE),!0})}}class kn{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(a),this._value||(this._isRawInput=!1),new fe}nearestInputPos(t,a){a===void 0&&(a=ne.NONE);const r=0,n=this._value.length;switch(a){case ne.LEFT:case ne.FORCE_LEFT:return r;case ne.NONE:case ne.RIGHT:case ne.FORCE_RIGHT:default:return n}}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),this._isRawInput?a-t:0}extractInput(t,a,r){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(t,a)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,a){if(a===void 0&&(a={}),this.isFilled)return new fe;const r=this.eager===!0||this.eager==="append",n=this.char===t&&(this.isUnmasking||a.input||a.raw)&&(!a.raw||!r)&&!a.tail,o=new fe({inserted:this.char,rawInserted:n?this.char:""});return this._value=this.char,this._isRawInput=n&&(a.raw||a.input),o}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new fe;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new It("")}appendTail(t){return ll(t)&&(t=new It(String(t))),t.appendTo(this)}append(t,a,r){const n=this._appendChar(t[0],a);return r!=null&&(n.tailShift+=this.appendTail(r).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}}class na{constructor(t){const{parent:a,isOptional:r,placeholderChar:n,displayChar:o,lazy:s,eager:i,...c}=t;this.masked=Ft(c),Object.assign(this,{parent:a,isOptional:r,placeholderChar:n,displayChar:o,lazy:s,eager:i})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),t===0&&a>=1?(this.isFilled=!1,this.masked.remove(t,a)):new fe}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,a){if(a===void 0&&(a={}),this.isFilled)return new fe;const r=this.masked.state;let n=this.masked._appendChar(t,this.currentMaskFlags(a));return n.inserted&&this.doValidate(a)===!1&&(n=new fe,this.masked.state=r),!n.inserted&&!this.isOptional&&!this.lazy&&!a.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(t,a,r){return this.masked.append(t,this.currentMaskFlags(a),r)}_appendPlaceholder(){return this.isFilled||this.isOptional?new fe:(this.isFilled=!0,new fe({inserted:this.placeholderChar}))}_appendEager(){return new fe}extractTail(t,a){return this.masked.extractTail(t,a)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,a,r){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),this.masked.extractInput(t,a,r)}nearestInputPos(t,a){a===void 0&&(a=ne.NONE);const r=0,n=this.value.length,o=Math.min(Math.max(t,r),n);switch(a){case ne.LEFT:case ne.FORCE_LEFT:return this.isComplete?o:r;case ne.RIGHT:case ne.FORCE_RIGHT:return this.isComplete?o:n;case ne.NONE:default:return o}}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),this.value.slice(t,a).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var a;return{...t,_beforeTailState:(t==null||(a=t._beforeTailState)==null?void 0:a.masked)||(t==null?void 0:t._beforeTailState)}}pad(t){return new fe}}na.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Si extends Je{updateOptions(t){super.updateOptions(t)}_update(t){const a=t.mask;a&&(t.validate=r=>r.search(a)>=0),super._update(t)}}ue.MaskedRegExp=Si;class et extends Je{constructor(t){super({...et.DEFAULTS,...t,definitions:Object.assign({},na.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const a=this.mask;if(!a||!t)return;let r=!1,n=!1;for(let o=0;o<a.length;++o){if(this.blocks){const u=a.slice(o),d=Object.keys(this.blocks).filter(f=>u.indexOf(f)===0);d.sort((f,p)=>p.length-f.length);const m=d[0];if(m){const{expose:f,repeat:p,...y}=Fl(this.blocks[m]),h={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...y,repeat:p,parent:this},g=p!=null?new ue.RepeatBlock(h):Ft(h);g&&(this._blocks.push(g),f&&(this.exposeBlock=g),this._maskedBlocks[m]||(this._maskedBlocks[m]=[]),this._maskedBlocks[m].push(this._blocks.length-1)),o+=m.length-1;continue}}let s=a[o],i=s in t;if(s===et.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){r=!r;continue}if(s==="["||s==="]"){n=!n;continue}if(s===et.ESCAPE_CHAR){if(++o,s=a[o],!s)break;i=!1}const c=i?new na({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Fl(t[s]),parent:this}):new kn({char:s,eager:this.eager,isUnmasking:r});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){if(!t){this.reset();return}const{_blocks:a,...r}=t;this._blocks.forEach((n,o)=>n.state=a[o]),super.state=r}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,a)=>t+=a.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(a),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,a)=>t+=a.value,"")}set value(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(a),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(a),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,a)=>t+=a.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const a=new fe;let r=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(r==null)return a;this._blocks[r].isFilled&&++r;for(let n=r;n<this._blocks.length;++n){const o=this._blocks[n]._appendEager();if(!o.inserted)break;a.aggregate(o)}return a}_appendCharRaw(t,a){a===void 0&&(a={});const r=this._mapPosToBlock(this.displayValue.length),n=new fe;if(!r)return n;for(let s=r.index,i;i=this._blocks[s];++s){var o;const c=i._appendChar(t,{...a,_beforeTailState:(o=a._beforeTailState)==null||(o=o._blocks)==null?void 0:o[s]});if(n.aggregate(c),c.consumed)break}return n}extractTail(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const r=new al;return t===a||this._forEachBlocksInRange(t,a,(n,o,s,i)=>{const c=n.extractTail(s,i);c.stop=this._findStopBefore(o),c.from=this._blockStartPos(o),c instanceof al&&(c.blockIndex=o),r.extend(c)}),r}extractInput(t,a,r){if(t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),r===void 0&&(r={}),t===a)return"";let n="";return this._forEachBlocksInRange(t,a,(o,s,i,c)=>{n+=o.extractInput(i,c,r)}),n}_findStopBefore(t){let a;for(let r=0;r<this._stops.length;++r){const n=this._stops[r];if(n<=t)a=n;else break}return a}_appendPlaceholder(t){const a=new fe;if(this.lazy&&t==null)return a;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return a;const n=r.index,o=t??this._blocks.length;return this._blocks.slice(n,o).forEach(s=>{if(!s.lazy||t!=null){var i;a.aggregate(s._appendPlaceholder((i=s._blocks)==null?void 0:i.length))}}),a}_mapPosToBlock(t){let a="";for(let r=0;r<this._blocks.length;++r){const n=this._blocks[r],o=a.length;if(a+=n.displayValue,t<=a.length)return{index:r,offset:t-o}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((a,r)=>a+=r.displayValue.length,0)}_forEachBlocksInRange(t,a,r){a===void 0&&(a=this.displayValue.length);const n=this._mapPosToBlock(t);if(n){const o=this._mapPosToBlock(a),s=o&&n.index===o.index,i=n.offset,c=o&&s?o.offset:this._blocks[n.index].displayValue.length;if(r(this._blocks[n.index],n.index,i,c),o&&!s){for(let u=n.index+1;u<o.index;++u)r(this._blocks[u],u,0,this._blocks[u].displayValue.length);r(this._blocks[o.index],o.index,0,o.offset)}}}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const r=super.remove(t,a);return this._forEachBlocksInRange(t,a,(n,o,s,i)=>{r.aggregate(n.remove(s,i))}),r}nearestInputPos(t,a){if(a===void 0&&(a=ne.NONE),!this._blocks.length)return 0;const r=new e4(this,t);if(a===ne.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(a===ne.LEFT||a===ne.FORCE_LEFT){if(a===ne.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===t)return t;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),a===ne.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=t||(r.popState(),r.ok&&r.pos<=t))return r.pos;r.popState()}return r.ok?r.pos:a===ne.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return a===ne.RIGHT||a===ne.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:a===ne.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(t,ne.LEFT))):t}totalInputPositions(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);let r=0;return this._forEachBlocksInRange(t,a,(n,o,s,i)=>{r+=n.totalInputPositions(s,i)}),r}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const a=this._maskedBlocks[t];return a?a.map(r=>this._blocks[r]):[]}pad(t){const a=new fe;return this._forEachBlocksInRange(0,this.displayValue.length,r=>a.aggregate(r.pad(t))),a}}et.DEFAULTS={...Je.DEFAULTS,lazy:!0,placeholderChar:"_"},et.STOP_CHAR="`",et.ESCAPE_CHAR="\\",et.InputDefinition=na,et.FixedDefinition=kn,ue.MaskedPattern=et;class oa extends et{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:a=this.to||0,from:r=this.from||0,maxLength:n=this.maxLength||0,autofix:o=this.autofix,...s}=t;this.to=a,this.from=r,this.maxLength=Math.max(String(a).length,n),this.autofix=o;const i=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let u=0;for(;u<c.length&&c[u]===i[u];)++u;s.mask=c.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u),super._update(s)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let a="",r="";const[,n,o]=t.match(/^(\D*)(\d*)(\D*)/)||[];return o&&(a="0".repeat(n.length)+o,r="9".repeat(n.length)+o),a=a.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[a,r]}doPrepareChar(t,a){a===void 0&&(a={});let r;return[t,r]=super.doPrepareChar(t.replace(/\D/g,""),a),t||(r.skip=!this.isComplete),[t,r]}_appendCharRaw(t,a){if(a===void 0&&(a={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,a);const r=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[o,s]=this.boundaries(this.value+t);return Number(s)<this.from?super._appendCharRaw(r[this.value.length],a):Number(o)>this.to?!a.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(r[this.value.length],a).aggregate(this._appendCharRaw(t,a)):super._appendCharRaw(n[this.value.length],a):super._appendCharRaw(t,a)}doValidate(t){const a=this.value;if(a.search(/[^0]/)===-1&&a.length<=this._matchFrom)return!0;const[r,n]=this.boundaries(a);return this.from<=Number(n)&&Number(r)<=this.to&&super.doValidate(t)}pad(t){const a=new fe;if(this.value.length===this.maxLength)return a;const r=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let o=0;o<n;++o)a.aggregate(super._appendCharRaw("0",t));r.split("").forEach(o=>this._appendCharRaw(o))}return a}}ue.MaskedRange=oa;const t4="d{.}`m{.}`Y";class Ot extends et{static extractPatternOptions(t){const{mask:a,pattern:r,...n}=t;return{...n,mask:ll(a)?a:r}}constructor(t){super(Ot.extractPatternOptions({...Ot.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:a,pattern:r,blocks:n,...o}={...Ot.DEFAULTS,...t},s=Object.assign({},Ot.GET_DEFAULT_BLOCKS());t.min&&(s.Y.from=t.min.getFullYear()),t.max&&(s.Y.to=t.max.getFullYear()),t.min&&t.max&&s.Y.from===s.Y.to&&(s.m.from=t.min.getMonth()+1,s.m.to=t.max.getMonth()+1,s.m.from===s.m.to&&(s.d.from=t.min.getDate(),s.d.to=t.max.getDate())),Object.assign(s,this.blocks,n),super._update({...o,mask:ll(a)?a:r,blocks:s})}doValidate(t){const a=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&a!=null&&(this.min==null||this.min<=a)&&(this.max==null||a<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(Ot.extractPatternOptions(t))}}Ot.GET_DEFAULT_BLOCKS=()=>({d:{mask:oa,from:1,to:31,maxLength:2},m:{mask:oa,from:1,to:12,maxLength:2},Y:{mask:oa,from:1900,to:9999}}),Ot.DEFAULTS={...et.DEFAULTS,mask:Date,pattern:t4,format:(l,t)=>{if(!l)return"";const a=String(l.getDate()).padStart(2,"0"),r=String(l.getMonth()+1).padStart(2,"0"),n=l.getFullYear();return[a,r,n].join(".")},parse:(l,t)=>{const[a,r,n]=l.split(".").map(Number);return new Date(n,r-1,a)}},ue.MaskedDate=Ot;class sa extends Je{constructor(t){super({...sa.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(a=>{const{expose:r,...n}=Fl(a),o=Ft({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return r&&(this.exposeMask=o),o}):[])}_appendCharRaw(t,a){a===void 0&&(a={});const r=this._applyDispatch(t,a);return this.currentMask&&r.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(a))),r}_applyDispatch(t,a,r){t===void 0&&(t=""),a===void 0&&(a={}),r===void 0&&(r="");const n=a.tail&&a._beforeTailState!=null?a._beforeTailState._value:this.value,o=this.rawInputValue,s=a.tail&&a._beforeTailState!=null?a._beforeTailState._rawInputValue:o,i=o.slice(s.length),c=this.currentMask,u=new fe,d=c==null?void 0:c.state;return this.currentMask=this.doDispatch(t,{...a},r),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),s&&(this.currentMask.append(s,{raw:!0}),u.tailShift=this.currentMask.value.length-n.length),i&&(u.tailShift+=this.currentMask.append(i,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),u}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const a=new fe;return t&&a.aggregate(this._applyDispatch("",{},t)),a.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var a,r;return{...t,_beforeTailState:((a=t._beforeTailState)==null?void 0:a.currentMaskRef)===this.currentMask&&((r=t._beforeTailState)==null?void 0:r.currentMask)||t._beforeTailState}}doDispatch(t,a,r){return a===void 0&&(a={}),r===void 0&&(r=""),this.dispatch(t,this,a,r)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,a){a===void 0&&(a={});let[r,n]=super.doPrepare(t,a);if(this.currentMask){let o;[r,o]=super.doPrepare(r,this.currentMaskFlags(a)),n=n.aggregate(o)}return[r,n]}doPrepareChar(t,a){a===void 0&&(a={});let[r,n]=super.doPrepareChar(t,a);if(this.currentMask){let o;[r,o]=super.doPrepareChar(r,this.currentMaskFlags(a)),n=n.aggregate(o)}return[r,n]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(a=>a.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let a=String(t);this.currentMask&&(this.currentMask.typedValue=t,a=this.currentMask.unmaskedValue),this.unmaskedValue=a}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,a){const r=new fe;return this.currentMask&&r.aggregate(this.currentMask.remove(t,a)).aggregate(this._applyDispatch()),r}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(a=>a.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:a,currentMaskRef:r,currentMask:n,...o}=t;a&&this.compiledMasks.forEach((s,i)=>s.state=a[i]),r!=null&&(this.currentMask=r,this.currentMask.state=n),super.state=o}extractInput(t,a,r){return this.currentMask?this.currentMask.extractInput(t,a,r):""}extractTail(t,a){return this.currentMask?this.currentMask.extractTail(t,a):super.extractTail(t,a)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,a){return this.currentMask?this.currentMask.nearestInputPos(t,a):super.nearestInputPos(t,a)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((a,r)=>{if(!t[r])return;const{mask:n,...o}=t[r];return Ka(a,o)&&a.maskEquals(n)}):super.maskEquals(t)}typedValueEquals(t){var a;return!!((a=this.currentMask)!=null&&a.typedValueEquals(t))}}sa.DEFAULTS={...Je.DEFAULTS,dispatch:(l,t,a,r)=>{if(!t.compiledMasks.length)return;const n=t.rawInputValue,o=t.compiledMasks.map((s,i)=>{const c=t.currentMask===s,u=c?s.displayValue.length:s.nearestInputPos(s.displayValue.length,ne.FORCE_LEFT);return s.rawInputValue!==n?(s.reset(),s.append(n,{raw:!0})):c||s.remove(u),s.append(l,t.currentMaskFlags(a)),s.appendTail(r),{index:i,weight:s.rawInputValue.length,totalInputPositions:s.totalInputPositions(0,Math.max(u,s.nearestInputPos(s.displayValue.length,ne.FORCE_LEFT)))}});return o.sort((s,i)=>i.weight-s.weight||i.totalInputPositions-s.totalInputPositions),t.compiledMasks[o[0].index]}},ue.MaskedDynamic=sa;class ia extends et{constructor(t){super({...ia.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:a,...r}=t;if(a){const n=a.map(i=>i.length),o=Math.min(...n),s=Math.max(...n)-o;r.mask="*".repeat(o),s&&(r.mask+="["+"*".repeat(s)+"]"),this.enum=a}super._update(r)}_appendCharRaw(t,a){a===void 0&&(a={});const r=Math.min(this.nearestInputPos(0,ne.FORCE_RIGHT),this.value.length),n=this.enum.filter(o=>this.matchValue(o,this.unmaskedValue+t,r));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(s,i)=>{const c=n[0][i];i>=this.value.length||c===s.value||(s.reset(),s._appendChar(c,a))});const o=super._appendCharRaw(n[0][this.value.length],a);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(s=>o.aggregate(super._appendCharRaw(s))),o}return new fe({skip:!this.isComplete})}extractTail(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),new It("",t)}remove(t,a){if(t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),t===a)return new fe;const r=Math.min(super.nearestInputPos(0,ne.FORCE_RIGHT),this.value.length);let n;for(n=t;n>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(r,n),r)).length>1);--n);const o=super.remove(n,a);return o.tailShift+=n-t,o}get isComplete(){return this.enum.indexOf(this.value)>=0}}ia.DEFAULTS={...et.DEFAULTS,matchValue:(l,t,a)=>l.indexOf(t,a)===a},ue.MaskedEnum=ia;class Di extends Je{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}ue.MaskedFunction=Di;var Ai;class ut extends Je{constructor(t){super({...ut.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),a="\\d*",r=(this.scale?"("+bn(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+a+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(bn).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(bn(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const a=t.split(this.radix);return a[0]=a[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),a.join(this.radix)}doPrepareChar(t,a){a===void 0&&(a={});const[r,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(a.input&&a.raw||!a.input&&!a.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),a);return t&&!r&&(n.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&n.aggregate(this._appendChar("-")),[r,n]}_separatorsCount(t,a){a===void 0&&(a=!1);let r=0;for(let n=0;n<t;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++r,a&&(t+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,a,r){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),[t,a]=this._adjustRangeWithSeparators(t,a),this._removeThousandsSeparators(super.extractInput(t,a,r))}_appendCharRaw(t,a){a===void 0&&(a={});const r=a.tail&&a._beforeTailState?a._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const o=this._value;this._value+=t;const s=this.number;let i=!isNaN(s),c=!1;if(i){let f;this.min!=null&&this.min<0&&this.number<this.min&&(f=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(f=this.max),f!=null&&(this.autofix?(this._value=this.format(f,this).replace(ut.UNMASKED_RADIX,this.radix),c||(c=o===this._value&&!a.tail)):i=!1),i&&(i=!!this._value.match(this._numberRegExp))}let u;i?u=new fe({inserted:this._value.slice(o.length),rawInserted:c?"":t,skip:c}):(this._value=o,u=new fe),this._value=this._insertThousandsSeparators(this._value);const d=a.tail&&a._beforeTailState?a._beforeTailState._value:this._value,m=this._separatorsCountFromSlice(d);return u.tailShift+=(m-n)*this.thousandsSeparator.length,u}_findSeparatorAround(t){if(this.thousandsSeparator){const a=t-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,a);if(r<=t)return r}return-1}_adjustRangeWithSeparators(t,a){const r=this._findSeparatorAround(t);r>=0&&(t=r);const n=this._findSeparatorAround(a);return n>=0&&(a=n+this.thousandsSeparator.length),[t,a]}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),[t,a]=this._adjustRangeWithSeparators(t,a);const r=this.value.slice(0,t),n=this.value.slice(a),o=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+n));const s=this._separatorsCountFromSlice(r);return new fe({tailShift:(s-o)*this.thousandsSeparator.length})}nearestInputPos(t,a){if(!this.thousandsSeparator)return t;switch(a){case ne.NONE:case ne.LEFT:case ne.FORCE_LEFT:{const r=this._findSeparatorAround(t-1);if(r>=0){const n=r+this.thousandsSeparator.length;if(t<n||this.value.length<=n||a===ne.FORCE_LEFT)return r}break}case ne.RIGHT:case ne.FORCE_RIGHT:{const r=this._findSeparatorAround(t);if(r>=0)return r+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let a=t;this.min!=null&&(a=Math.max(a,this.min)),this.max!=null&&(a=Math.min(a,this.max)),a!==t&&(this.unmaskedValue=this.format(a,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(t){const a=this._removeThousandsSeparators(t).split(this.radix);return a[0]=a[0].replace(/^(\D*)(0*)(\d*)/,(r,n,o,s)=>n+s),t.length&&!/\d$/.test(a[0])&&(a[0]=a[0]+"0"),a.length>1&&(a[1]=a[1].replace(/0*$/,""),a[1].length||(a.length=1)),this._insertThousandsSeparators(a.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const a=t.split(this.radix);return a.length<2&&a.push(""),a[1]=a[1].padEnd(this.scale,"0"),a.join(this.radix)}doSkipInvalid(t,a,r){a===void 0&&(a={});const n=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===ut.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,a,r)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,ut.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(ut.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||ut.EMPTY_VALUES.includes(t)&&ut.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}Ai=ut,ut.UNMASKED_RADIX=".",ut.EMPTY_VALUES=[...Je.EMPTY_VALUES,0],ut.DEFAULTS={...Je.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Ai.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:l=>l.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},ue.MaskedNumber=ut;const Za={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function xn(l,t,a){t===void 0&&(t=Za.MASKED),a===void 0&&(a=Za.MASKED);const r=Ft(l);return n=>r.runIsolated(o=>(o[t]=n,o[a]))}function Mi(l,t,a,r){return xn(t,a,r)(l)}ue.PIPE_TYPE=Za,ue.createPipe=xn,ue.pipe=Mi;class Ti extends et{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var a,r,n;const{repeat:o,...s}=Fl(t);this._blockOpts=Object.assign({},this._blockOpts,s);const i=Ft(this._blockOpts);this.repeat=(a=(r=o??i.repeat)!=null?r:this.repeat)!=null?a:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:i},eager:i.eager,overwrite:i.overwrite,skipInvalid:i.skipInvalid,lazy:i.lazy,placeholderChar:i.placeholderChar,displayChar:i.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ft(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,a){a===void 0&&(a={});const r=new fe;for(let c=(n=(o=this._mapPosToBlock(this.displayValue.length))==null?void 0:o.index)!=null?n:Math.max(this._blocks.length-1,0),u,d;u=(s=this._blocks[c])!=null?s:d=!d&&this._allocateBlock(c);++c){var n,o,s,i;const m=u._appendChar(t,{...a,_beforeTailState:(i=a._beforeTailState)==null||(i=i._blocks)==null?void 0:i[c]});if(m.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(r.aggregate(m),m.consumed)break}return r}_trimEmptyTail(t,a){var r,n;t===void 0&&(t=0);const o=Math.max(((r=this._mapPosToBlock(t))==null?void 0:r.index)||0,this.repeatFrom,0);let s;a!=null&&(s=(n=this._mapPosToBlock(a))==null?void 0:n.index),s==null&&(s=this._blocks.length-1);let i=0;for(let c=s;o<=c&&!this._blocks[c].unmaskedValue;--c,++i);i&&(this._blocks.splice(s-i+1,i),this.mask=this.mask.slice(i))}reset(){super.reset(),this._trimEmptyTail()}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const r=super.remove(t,a);return this._trimEmptyTail(t,a),r}totalInputPositions(t,a){return t===void 0&&(t=0),a==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,a)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}}ue.RepeatBlock=Ti;try{globalThis.IMask=ue}catch{}const l4=Object.freeze(Object.defineProperty({__proto__:null,ChangeDetails:fe,ChunksTailDetails:al,DIRECTION:ne,HTMLContenteditableMaskElement:yn,HTMLInputMaskElement:vi,HTMLMaskElement:ra,InputMask:Bi,MaskElement:Ya,Masked:Je,MaskedDate:Ot,MaskedDynamic:sa,MaskedEnum:ia,MaskedFunction:Di,MaskedNumber:ut,MaskedPattern:et,MaskedRange:oa,MaskedRegExp:Si,PIPE_TYPE:Za,PatternFixedDefinition:kn,PatternInputDefinition:na,RepeatBlock:Ti,createMask:Ft,createPipe:xn,default:ue,forceDirection:Ci,normalizeOpts:Fl,pipe:Mi},Symbol.toStringTag,{value:"Module"})),Li={reference:{faq:"FAQ",banner:"Banner",slider:"Slider",video:"Video",about:"About",cards:"Cards",usefulLinks:"Useful Links",team:"Team",body:"Body",news:"News",form:"Form",tabs:"Tabs",vertical_tabs:"Vertical Tabs",documents:"Documents",infoLine:"Information Line",interested:"You may be interested",contact:"Contact"},navigation:{editMenu:"Edit Menu",dashboard:"Dashboard",collections:"Collections Structure",articles:"Articles",posts:"Posts",media:"Media",permissions:"Permissions",tags:"Tags",singletons:"Pages",feedback:"Feedback",email:"Пошти користувачів",singletonsMenu:"Menu",menuAdd:"Create Menu",builder:"Collections Structure",back:"Back",settings:"Settings",settingsDescription:"Manage your CMS configuration",singletonsMenuDescription:"Manage your menu.",users:"Users",general:"General",apiKeys:"API Keys",appearance:"Appearance",logs:"Logs"},dashboard:{title:"Dashboard",newCollection:"Create Collection",quickActions:"Quick Actions",views:"views",stats:{totalArticles:"Total Articles",totalMedia:"Total Media",activeUsers:"Active Users",apiRequests:"API Requests",fromLastMonth:"from last month"},collections:{title:"Collections",articles:"Articles",articlesDesc:"Description for articles",posts:"Posts",postsDesc:"Description for posts",products:"Products",productsDesc:"Description for products",categories:"Categories",categoriesDesc:"Description for categories",items:"items",new:"New Collection"},recentArticles:"Recent Articles",recentPosts:"Recent Posts",activeUsers:"Active Users",mediaFiles:"Media Files",createArticle:"Create Article",createPost:"Create Post",uploadMedia:"Upload Media",manageUsers:"Manage Users",feedback:"Feedback",createArticleDescription:"Create a new article for your site",uploadMediaDescription:"Upload media files for your site",manageUsersDescription:"Manage users for your site",viewFeedbackDescription:"View feedback for your site",activityFeed:"Activity Feed",viewAll:"View all",description:"Welcome to the CMS dashboard. You can create, edit, and manage your site's content.",newArticle:"Create Article",totalContent:"Total Content",articlesPostsPages:"Articles, Posts and Pages",monthlyActiveUsers:"Monthly Active Users",imagesVideosDocs:"Images, Videos and Docs",thisMonth:"This Month",newMediaFiles:"New Media Files",gettingStartedWithNextJs14:"Getting Started with Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Advanced React Patterns",uiUxDesignPrinciples:"UI/UX Design Principles",databaseOptimizationTips:"Database Optimization Tips",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez",recentContent:"Recent Content"},collections:{title:"Collections",selectCollection:"Select a collection to view its content",createCollection:"New Collection",searchCollections:"Search collections...",entries:"Entries",fields:"Fields",lastModified:"Last Modified",edit:"Edit",delete:"Delete",view:"View",form:{name:"Collection Name",slug:"Slug",description:"Description",fields:"Fields",addField:"Add Field"},dragToBuild:"Drag and drop content blocks here to build your collection structure",collectionCreated:"Collection created successfully",collectionCreationFailed:"Error creating collection",pinPublication:"Pin Publication"},articles:{title:"Articles",createArticle:"Create Article",searchArticles:"Search articles...",showColumns:"Show columns",update:"Update",create:"Create",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},posts:{title:"Posts",createPost:"Create Post",searchPosts:"Search posts...",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},singletons:{title:"Singletons",createSingleton:"Create Singleton",searchSingletons:"Search singletons...",form:{name:"Name",description:"Description",content:"Content",status:"Status"},search:"Search singletons..."},media:{title:"Media Library",description:"Manage your images, documents, and media files.",uploadMedia:"Upload Media",searchMedia:"Search files...",fileInfo:"File Information",preview:"Preview",newFolder:"New Folder",selectFile:"Select a file to view details",fileDetails:"File Details",name:"Name",size:"Size",dimensions:"Dimensions",uploadDate:"Upload Date",author:"Author",tags:"Tags",banner:"Banner",hero:"Hero",homepage:"Homepage",download:"Download",copyPath:"Copy path",copyPathFailed:"Failed to copy path",delete:"Delete",edit:"Edit",share:"Share",moreActions:"More actions",deleteFile:"Delete File",cancel:"Cancel",mediaLibrary:"Media Library",showColumns:"Show columns",update:"Update",create:"Create",createFolder:"Create Folder",files:"files",noFilesInFolder:"No files in this folder",deleteConfirmation:"Are you sure you want to delete this file?",uploaded:"Uploaded",filter:"Filter",search:"Search media files...",uploadingFiles:"Uploading files",uploading:"Uploading...",folder:"Folder",updatedAt:"Updated At",type:"Type",sortBy:{title:"Sort by",name:"File name",filesize:"File size"},upload:"Upload",selectFromMedia:"Select from media",selectedFiles:"Selected files: {count}",selectFiles:"Select files"},tags:{title:"Tags",description:"Manage your tags.",createTag:"Create Tag",editTag:"Edit Tag",searchTags:"Search tags...",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No tags found",emptyDescription:"Create your first tag to get started.",emptyButton:"Create Tag"},feedback:{title:"Feedback",description:"View feedback",table:{number:"№",noFeedback:"No feedback",email:"Email",userName:"Full name",messageText:"Message text",feedbackType:"Type of appeal",phone:"Phone",resumeLink:"Resume link",linkedinLink:"Linkedin link",portfolioLink:"Portfolio link",telegramLink:"Telegram link"}},email:{title:"User mails",description:"View users awaiting feedback",table:{number:"№",date:"Date of shipment",email:"Email"}},emptyData:{title:"No data found",description:"Create your first item to get started.",buttonText:"Create Item"},form:{gen:"Generate",key:"Key",value:"Value",noDataToDisplay:"No data to display",add:"Add"},builder:{manageContentCollections:"Manage content collections",searchCollections:"Search collections...",collections:"Collections",collectionStructure:"Collection Structure",defineFields:"Define the fields and their types for this collection",name:"Name",edit:"Edit",preview:"Preview",type:"Type",content:"Content",seo:"SEO",tags:"Tags",save:"Save",cancel:"Cancel",create:"Create",localization:"Localization",actions:"Actions",noColumnsFound:"No columns found",collectionName:"Collection Name",title:"Title",entries:"Entries",fields:"Fields",status:"Status",lastModified:"Last Modified",editCollection:"Edit collection",editContentForYourSite:"Edit content for your site",deleteObject:"Are you sure you want to delete this object?",editField:"Edit field",deleteTitle:"Delete field",deleteField:"Are you sure you want to delete this field?",scheme:{name:{label:"Name",placeholder:"Name"},title:{label:"Title",placeholder:"Title"},type:{label:"Type",placeholder:"Type",options:{collection:"Collection",single:"Single"}},customTable:{label:"Custom Table"},status:{label:"Status",placeholder:"Status",options:{published:"Published",draft:"Draft",archived:"Archived"}},description:{label:"Description",placeholder:"Description"},preview_path:{label:"Preview path",placeholder:"Preview path",info:"Path to slug for preview"},include_search:{label:"Include in search?",placeholder:"Include in search?"}},required:"Required field",createField:"Create field",selectType:"Select type",createFolder:"Create folder",changeType:"Change type",fieldLabels:{name:"Name",label:"Label",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",multiple:"Multiple",api:"API",relation:"Relation",required:"Required",localization:"Localization"},fieldPlaceholders:{name:"Name",label:"Title",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",api:"API",relation:"Relation"},fieldOptions:{text:"Text",number:"Number",integer:"Integer",date:"Date",datetime:"Datetime",file:"File",select:"Select",multiselect:"MultiSelect",mediaselect:"MediaSelect",radio:"Radio",boolean:"Boolean",datalist:"Data list",image:"Image",slug:"Slug",richtext:"Rich Text",markdown:"Markdown",reference:"Reference",relation:"Relation",fileList:"Gallery",tags:"Tags"}},menu:{title:"Menu",description:"Manage your menu.",createMenu:"Create Menu",searchMenu:"Search menu...",menuAdd:"Add Menu",editMenu:"Edit Menu",textEditor:"Text Editor",listTree:"List Tree",filter:"Filter",search:"Search menu...",menuCreated:"Menu created",menuCreateError:"Error creating menu",menuUpdated:"Menu updated",menuUpdateError:"Error updating menu",menuDeleted:"Menu deleted",menuDeleteError:"Error deleting menu",form:{name:"Name",description:"Description",content:"Content",status:"Status",value:"Value",language:"Language"}},settings:{title:"Settings",description:"Configure your CMS settings and preferences.",systemStatus:"System Status",siteInformation:"Site Information",siteName:"Site Name",version:"Version",environment:"Environment",security:"Security",localization:"Localization",production:"Production",systemHealth:"System Health",database:"Database",connected:"Connected",cache:"Cache",active:"Active",storage:"Storage",used:"Used",configure:"Configure",successTitle:"Success",successMessage:"Settings saved successfully",errorTitle:"Error",errorMessage:"Error saving settings",generateNewKey:"Generate New Key",apiSecurity:"API Security",general:{general:"General Settings",generalDescription:"Manage your general settings.",url:"URL",language:"Language",languages:"Languages",contacts:"Contacts",showSocialsNumber:"Number of socials to display",mapCoords:"Map coordinates",socials:"Socials",saveChanges:"Save Changes",cancel:"Cancel",notifications:"Notifications",emailNotifications:"Email Notifications",emailNotificationsDescription:"Receive notifications by email",pushNotifications:"Browser Notifications",pushNotificationsDescription:"Browser notifications for important updates",smsNotifications:"SMS Notifications",smsNotificationsDescription:"SMS notifications for critical updates",desktopNotifications:"Desktop Notifications",desktopNotificationsDescription:"Desktop notifications",siteDescription:"Site Description",siteUrl:"Site URL",siteLanguage:"Site Language",siteEmail:"Site Email",sitePhone:"Site Phone",siteAddress:"Site Address",siteName:"Site Name",title:"Title",content:"Content",name:"Name",siteInformation:"Site Information",logoSite:"Site Logo",logoCms:"CMS Logo",imageLogin:"Login Image",logo:"Logo",siteInformationDescription:"Manage your site information."},users:{users:"User Management",usersDescription:"Manage your user management configuration.",userRegistration:"User Registration",allowRegistration:"Allow User Registration",allowRegistrationDescription:"Enable new users to register accounts",emailVerification:"Email Verification Required",emailVerificationDescription:"Require email verification for new accounts",autoApprove:"Auto-approve Users",autoApproveDescription:"Automatically approve new user registrations",defaultRole:"Default User Role"},"api-keys":{apiKeys:"API Keys",apiKeysDescription:"Manage your api keys configuration.",productionApiKey:"Production API Key",developmentApiKey:"Development API Key",generateNewKey:"Generate New Key",apiSecurity:"API Security",rateLimiting:"Rate Limiting",rateLimitingDescription:"Enable API rate limiting protection",corsProtection:"CORS Protection",corsProtectionDescription:"Cross-origin request security",apiLogging:"API Logging",apiLoggingDescription:"Log all API requests and responses"},appearance:{appearance:"Appearance",appearanceDescription:"Manage your appearance settings.",colorTheme:"Color Theme",darkMode:"Dark Mode",darkModeDescription:"Switch to dark theme",compactMode:"Compact Mode",compactModeDescription:"Reduce spacing and padding",animations:"Animations",animationsDescription:"Enable interface animations",themeBlue:"Blue",themeGreen:"Green",themePurple:"Purple"},logs:{title:"Logs",description:"View all your actions in the system",table:{objectId:"Object Identifier",dateTime:"Date and Time of Change",changeType:"Change Type",noLogs:"No user logs found",noLogsDescription:"No user logs found"}},permissions:{title:"Permissions",user:"User",role:"Role",lastActive:"Last Active",actions:"Actions",rolePermissions:"Role Permissions",rolePermissionsDescription:"Permissions assigned to each role in the system.",permission:"Permission",admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer",customizePermissions:"Customize Permissions",inviteUser:"Invite User",searchUsers:"Search users...",createContent:"Create Content",editContent:"Edit Content",deleteContent:"Delete Content",publishContent:"Publish Content",manageMedia:"Manage Media",manageUsers:"Manage Users",manageSettings:"Manage Settings",remove:"Remove",edit:"Edit",time:{hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},roles:{admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer"}}},block:{type:{heading:"Heading",paragraph:"Paragraph"}},app:{name:"SOFTPRO software package: GIS MBK Kamyansk City TG",tagline:"Do more with less"},nav:{home:"Home",about:"About",profile:"Profile",settings:"Settings",logout:"Log out"},common:{ok:"OK",save:"Save",cancel:"Cancel",close:"Close",delete:"Delete",edit:"Edit",loading:"Loading…",retry:"Retry",title:"Title",description:"Description",keywords:"Keywords",successMessage:"Success",errorMessage:"Error",success:"Success",error:"Error",meta:"Meta",actions:{add:"Add",save:"Save",cancel:"Cancel",edit:"Edit",delete:"Delete",create:"Create",preview:"Preview",search:"Search",filter:"Filter",export:"Export",addField:"Add Field",success:"Success",error:"Error",back:"Back"},status:{published:"Published",draft:"Draft",archived:"Archived"},content:"Content",pagination:{showing:"Showing",to:"to",of:"of",results:"results",previous:"Previous",next:"Next"}},auth:{title:"Sign in",email:"Email",password:"Password",remember:"Remember me",submit:"Sign in",errors:{invalid:"Invalid email or password",required:"{field} is required"}},table:{choose:"Choose columns to display",columns:"Columns",actions:"Actions",search:"Search",export:"Export",exportTitle:"Export table",close:"Close",chooseColumns:"Select columns for export:",selectAll:"Select all",selectCurrent:"Select current",none:"None",chooseFormat:"Choose table format:",time:{weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},format:{json:"JSON format",csv:"CSV format",xlsx:"XLSX format"},cancel:"Cancel",download:"Download table"},filter:{search:"Search",more:"Show more",less:"Show less",selected:"selected",clear:"Clear",apply:"Apply",from:"From",to:"To",notfound:"Nothing found",period:"Period",today:"Today",week:"Week",month:"Month",quarter:"Quarter",year:"Year",alltime:"All Time",prev:"Prev",next:"Next"},items:{title:"Items",add:"Add item",count:"No items | One item | {count} items",created:"Item “{name}” has been created",deleted:"Item deleted"},errors:{network:"Network error. Please try again.",notFound:"We couldn't find what you were looking for."},toast:{saved:"Changes saved",copied:"Copied to clipboard"},users:{title:"Users",description:"Manage your users.",createUser:"Create User",editUser:"Edit User",searchUsers:"Search users...",createUserFailed:"Create user failed",createUserSuccess:"User created successfully",editUserFailed:"Edit user failed",editUserSuccess:"User edited successfully",deleteUserSuccess:"User deleted successfully",deleteUserFailed:"User deleted failed",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No users found",emptyDescription:"Create your first user to get started.",emptyButton:"Create User"},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Guide for menu",general:"Guide",media:"Guide for media",settings:"Guide for settings",users:"Guide for users",content:"Guide for content",appOverview:"Guide for app overview",collections:"Guide for collections",help:"Help"}},a4=Object.freeze(Object.defineProperty({__proto__:null,cms:Li,default:{cms:Li}},Symbol.toStringTag,{value:"Module"})),$i={reference:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",interested:"Вас може зацікавити",contact:"Контакти"},navigation:{editMenu:"Редагувати меню",dashboard:"Панель керування",collections:"Керування контентом",articles:"Статті",posts:"Дописи",media:"Медіа",permissions:"Дозволи",tags:"Теги",singletons:"Сторінки",singletonsMenu:"Меню",feedback:"Зворотній зв'язок",email:"Пошти користувачів",menuAdd:"Створити меню",builder:"Структура колекцій",back:"Назад",settings:"Налаштування",settingsDescription:"Налаштування вашого сайту",singletonsMenuDescription:"Керування меню.",users:"Користувачі",general:"Основні",apiKeys:"API ключі",appearance:"Вигляд",logs:"Логи"},dashboard:{title:"Панель керування",description:"Вітаємо в панелі керування CMS. Ви можете створювати, редагувати та управляти контентом вашого сайту.",newCollection:"Створити колекцію",quickActions:"Швидкі дії",views:"переглядів",stats:{totalArticles:"Всього статей",totalMedia:"Всього медіа",activeUsers:"Активні користувачі",apiRequests:"API запити",fromLastMonth:"з минулого місяця"},collections:{title:"Колекції",articles:"Статті",articlesDesc:"Опис для статей",posts:"Дописи",postsDesc:"Опис для дописів",products:"Продукти",productsDesc:"Опис для продуктів",categories:"Категорії",categoriesDesc:"Опис для категорій",items:"шт.",new:"Нова колекція"},recentArticles:"Останні статті",recentPosts:"Останні дописи",recentContent:"Останній контент",activityFeed:"Стрічка активності",viewAll:"Показати все",totalContent:"Всього контенту",articlesPostsPages:"Статті, дописи та сторінки",monthlyActiveUsers:"Активних користувачів за місяць",imagesVideosDocs:"Зображення, відео та документи",thisMonth:"Цього місяця",activeUsers:"Активні користувачі",mediaFiles:"Файли медіа",createArticle:"Створити статтю",createPost:"Створити допис",uploadMedia:"Завантажити медіа",createArticleDescription:"Створіть статтю для вашого сайту",uploadMediaDescription:"Завантажте медіа файли для вашого сайту",manageUsersDescription:"Керуйте користувачами вашого сайту",viewFeedbackDescription:"Перегляд зворотнього зв'язку",manageUsers:"Керування користувачами",feedback:"Зворотній зв'язок",newMediaFiles:"Нових файлів медіа",gettingStartedWithNextJs14:"Початок роботи з Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Підвищені шаблони React",uiUxDesignPrinciples:"Принципи дизайну UI/UX",databaseOptimizationTips:"Поради з оптимізації бази даних",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez"},collections:{title:"Колекції",selectCollection:"Виберіть колекцію для перегляду її контенту",createCollection:"Створити колекцію",searchCollections:"Пошук колекцій...",entries:"Записи",fields:"Поля",lastModified:"Останнє редагування",edit:"Редагувати",delete:"Видалити",view:"Перегляд",form:{name:"Назва колекції",slug:"Слаг",description:"Опис",fields:"Поля",addField:"Додати поле"},dragToBuild:"Перетягніть блоки контенту сюди, щоб створити структуру колекції",collectionCreated:"Колекція успішно створена",collectionCreationFailed:"Помилка при створенні колекції",pinPublication:"Закріпити публікацію"},articles:{title:"Сторінки",createArticle:"Створити сторінку",searchArticles:"Пошук статей...",showColumns:"Показати колонки",update:"Оновити",create:"Створити",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},posts:{title:"Дописи",createPost:"Створити допис",searchPosts:"Пошук дописів...",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},singletons:{title:"Синглтони",createSingleton:"Створити синглтон",searchSingletons:"Пошук синглтонів...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус"},search:"Пошук синглтонів..."},media:{title:"Медіа бібліотека",description:"Керуйте своїми зображеннями, документами та медіа файлами.",uploadMedia:"Завантажити медіа",searchMedia:"Пошук файлів...",fileInfo:"Інформація про файл",preview:"Перегляд",newFolder:"Нова папка",selectFile:"Виберіть файл для перегляду деталей",fileDetails:"Інформація про файл",name:"Назва",size:"Розмір",dimensions:"Розміри",uploadDate:"Дата завантаження",author:"Автор",tags:"Теги",banner:"Банер",hero:"Герой",homepage:"Головна",download:"Завантажити",copyPath:"Копіювати шлях",copyPathFailed:"Не вдалося скопіювати шлях",delete:"Видалити",edit:"Редагувати",share:"Поділитися",moreActions:"Більше дій",deleteFile:"Ви впевнені, що хочете видалити цей файл?",createFolder:"Створити папку",cancel:"Скасувати",mediaLibrary:"Медіа бібліотека",files:"файлів",noFilesInFolder:"Немає файлів у цій папці",deleteConfirmation:"Ви впевнені, що хочете видалити цей файл?",uploaded:"Завантажено",filter:"Фільтр",search:"Пошук файлів...",uploadingFiles:"Завантаження файлів",uploading:"Завантаження...",folder:"Папка",type:"Тип",updatedAt:"Оновлено",sortBy:{title:"Сортувати за",name:"Назва файлу",filesize:"Розмір файлу"},upload:"Завантажити",selectFromMedia:"Вибрати з медіа",selectFiles:"Вибрати файли",selectedFiles:"Вибрано файлів: {count}"},tags:{title:"Теги",description:"Керування тегами.",createTag:"Створити тег",editTag:"Редагувати тег",searchTags:"Пошук тегів...",form:{name:"Назва",description:"Опис",color:"Колір",slug:"Slug",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"},emptyTitle:"Теги не знайдені",emptyDescription:"Створіть свій перший тег, щоб почати.",emptyButton:"Створити тег"},feedback:{title:"Зворотній зв'язок",description:"Переглядайте зворотній зв'язок",table:{number:"№",noFeedback:"Фідбек відсутній",email:"Email",userName:"ПІБ",messageText:"Текст повідомлення",feedbackType:"Тип звернення",cdate:"Дата відгуку",phone:"Телефон",resumeLink:"Посилання на резюме",linkedinLink:"Посилання на лінкедин",portfolioLink:"Посилання на портфоліо",telegramLink:"Посилання на телеграм"}},email:{title:"Пошти користувачів",description:"Переглядайте користувачів, які очікують зворотнього зв'язку",table:{number:"№",date:"Дата відправки",email:"Email"}},emptyData:{title:"Немає даних",description:"Створіть свій перший елемент, щоб почати.",buttonText:"Створити елемент"},form:{gen:"Згенерувати",key:"Ключ",value:"Значення",noDataToDisplay:"Дані для відображення відсутні",add:"Додати"},builder:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",manageContentCollections:"Керування колекціями контенту",searchCollections:"Пошук колекцій...",collections:"Структура колекцій",collectionStructure:"Структура колекції",defineFields:"Визначте поля та їх типи для цієї колекції",name:"Назва",changeType:"Змінити тип",type:"Тип",save:"Зберегти",edit:"Редагувати",content:"Контент",seo:"SEO",tags:"Теги",preview:"Перегляд",collectionName:"Назва колекції",title:"Заголовок",entries:"Записи",fields:"Поля",status:"Статус",lastModified:"Останнє редагування",cancel:"Скасувати",create:"Створити",localization:"Локалізація",actions:"Дії",noColumnsFound:"Немає колонок",editCollection:"Редагувати колекцію",editContentForYourSite:"Редагувати контент для вашого сайту",deleteObject:"Ви впевнені, що хочете видалити цей об'єкт?",editField:"Редагувати поле",deleteTitle:"Видалити поле",deleteField:"Ви впевнені, що хочете видалити це поле?",scheme:{name:{label:"Назва",placeholder:"Назва"},title:{label:"Заголовок",placeholder:"Заголовок"},type:{label:"Тип",placeholder:"Тип",options:{collection:"Колекція",single:"Сторінка"}},customTable:{label:"Власна таблиця"},status:{label:"Статус",placeholder:"Статус",options:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"}},description:{label:"Опис",placeholder:"Опис"},preview_path:{label:"Шлях для прев'ю",placeholder:"Шлях для прев'ю",info:"Шлях до slug для прев'ю"},include_search:{label:"Включити в пошук?",placeholder:"Включити в пошук?"}},required:"Обов'язкове поле",createField:"Створити поле",selectType:"Оберіть тип",createFolder:"Створити папку",fieldLabels:{name:"Назва",label:"Мітка",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",multiple:"Множинний",api:"API",relation:"Зв'язок",required:"Обов'язковий",localization:"Локалізація"},fieldPlaceholders:{name:"Назва",label:"Заголовок",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",api:"API",relation:"Зв'язок"},fieldOptions:{text:"Текст",number:"Число",integer:"Ціле число",date:"Дата",datetime:"Дата і час",file:"Файл",select:"Селект",multiselect:"Мультиселект",mediaselect:"Вибір медіа",radio:"Радіо",boolean:"Булевий",datalist:"Дататейбл",image:"Зображення",slug:"Слаг",richtext:"Текстовий редактор",markdown:"Markdown",reference:"Секції",relation:"Зв'язок",fileList:"Мультифайл",tags:"Теги"}},menu:{title:"Меню",description:"Керування меню.",createMenu:"Створити меню",searchMenu:"Пошук меню...",menuAdd:"Додати меню",editMenu:"Редагувати меню",textEditor:"Текстовий редактор",menuCreated:"Меню створено",menuCreateError:"Помилка при створенні меню",menuUpdated:"Меню оновлено",menuUpdateError:"Помилка при оновленні меню",menuDeleted:"Меню видалено",menuDeleteError:"Помилка при видаленні меню",listTree:"Список дерева",filter:"Фільтр",search:"Пошук меню...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус",value:"Значення",language:"Мова"}},settings:{title:"Налаштування",description:"Налаштуйте ваші налаштування CMS та налаштування.",systemStatus:"Статус системи",siteInformation:"Інформація про сайт",logo:"Логотип",siteName:"Назва сайту",version:"Версія",environment:"Середовище",security:"Безпека",localization:"Локалізація",production:"Виробництво",systemHealth:"Здоров'я системи",database:"База даних",connected:"З'єднано",cache:"Кеш",active:"Активний",storage:"Хмарне сховище",used:"Використано",configure:"Налаштувати",successTitle:"Успішно",successMessage:"Налаштування успішно збережено",errorTitle:"Помилка",errorMessage:"Помилка при збереженні налаштувань",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",general:{general:"Основні налаштування",generalDescription:"Керуйте вашими загальними налаштуваннями.",url:"URL",language:"Мова",languages:"Мови",contacts:"Контакти",socials:"Соціальні мережі",showSocialsNumber:"Кількість соціальних мереж для відображення",mapCoords:"Координати для відображення на карті",saveChanges:"Зберегти зміни",cancel:"Скасувати",notifications:"Сповіщення",emailNotifications:"Сповіщення по email",emailNotificationsDescription:"Отримувати сповіщення по email",pushNotifications:"Сповіщення в браузері",pushNotificationsDescription:"Сповіщення в браузері для важливих оновлень",smsNotifications:"Сповіщення по SMS",smsNotificationsDescription:"Сповіщення по SMS для критичних оновлень",desktopNotifications:"Сповіщення на комп'ютері",desktopNotificationsDescription:"Сповіщення на комп'ютері",siteName:"Назва сайту",siteDescription:"Опис сайту",siteUrl:"URL сайту",previewUrl:"URL попереднього перегляду",logoSite:"Логотип сайту",logoCms:"Логотип CMS",imageLogin:"Зображення для входу",siteLanguage:"Мова сайту",siteEmail:"Email сайту",sitePhone:"Телефон сайту",siteAddress:"Адреса сайту",siteInformation:"Інформація про сайт",logo:"Логотип",siteInformationDescription:"Керуйте вашою інформацією про сайт.",title:"Заголовок",content:"Контент",name:"Назва соцмережі"},users:{users:"Керування користувачами",usersDescription:"Керуйте налаштуваннями керування користувачами.",userRegistration:"Реєстрація користувачів",allowRegistration:"Дозволити реєстрацію користувачів",allowRegistrationDescription:"Дозволити новим користувачам реєструвати акаунти",emailVerification:"Потрібна верифікація email",emailVerificationDescription:"Вимагати підтвердження email для нових акаунтів",autoApprove:"Автоматичне схвалення користувачів",autoApproveDescription:"Автоматично схвалювати нові реєстрації користувачів",defaultRole:"Роль за замовчуванням"},"api-keys":{apiKeys:"API ключі",apiKeysDescription:"Керуйте налаштуваннями API ключів.",productionApiKey:"Production API ключ",developmentApiKey:"Development API ключ",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",rateLimiting:"Обмеження швидкості",rateLimitingDescription:"Увімкнути захист обмеження швидкості API",corsProtection:"Захист CORS",corsProtectionDescription:"Безпека крос-доменних запитів",apiLogging:"Логування API",apiLoggingDescription:"Логувати всі API запити та відповіді"},appearance:{appearance:"Вигляд",appearanceDescription:"Керуйте вашим виглядом та налаштуваннями.",colorTheme:"Кольорова тема",darkMode:"Темний режим",darkModeDescription:"Перемкнути на темну тему",compactMode:"Компактний режим",compactModeDescription:"Зменшити відступи та поля",animations:"Анімації",animationsDescription:"Увімкнути анімації інтерфейсу",themeBlue:"Синя",themeGreen:"Зелена",themePurple:"Фіолетова"},logs:{title:"Логи",description:"Переглядай всі свої дії в системі",table:{number:"№",objectId:"Ідентифікатор об'єкта",dateTime:"Дата та час зміни",changeType:"Тип зміни",noLogs:"Логи користувача відсутні"}},permissions:{title:"Дозволи",user:"Користувач",role:"Роль",lastActive:"Остання активність",actions:"Дії",rolePermissions:"Дозволи ролі",rolePermissionsDescription:"Дозволи, призначені для кожної ролі в системі.",permission:"Дозвіл",admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач",customizePermissions:"Налаштувати дозволи",inviteUser:"Запросити користувача",searchUsers:"Пошук користувачів...",createContent:"Створити контент",editContent:"Редагувати контент",deleteContent:"Видалити контент",publishContent:"Опублікувати контент",manageMedia:"Керування медіа",manageUsers:"Керування користувачами",manageSettings:"Керування налаштуваннями",remove:"Вилучити",edit:"Редагувати",time:{hoursAgo:"{count} годин тому",hourAgo:"1 година тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},roles:{admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач"}}},block:{type:{heading:"Заголовок",paragraph:"Параграф"}},app:{name:"Програмний комплекс SOFTPRO: ГІС МБК Кам'янської міської ТГ",tagline:"Зробіть більше з меншим"},nav:{home:"Домашній",about:"Про",profile:"Профіль",settings:"Налаштування",logout:"Вихід"},common:{ok:"Добре",save:"Зберегти",cancel:"Скасувати",close:"Закрити",delete:"Вилучити",edit:"Редагувати",loading:"Завантаження…",retry:"Повторити",title:"Назва",description:"Опис",keywords:"Ключові слова",success:"Успіх",error:"Помилка",successMessage:"Успішно",errorMessage:"Помилка",meta:"Мета",content:"Контент",actions:{add:"Додати",save:"Зберегти",cancel:"Скасувати",edit:"Редагувати",delete:"Видалити",create:"Створити",preview:"Перегляд",search:"Пошук",filter:"Фільтр",export:"Експорт",addField:"Додати поле",success:"Успіх",error:"Помилка",back:"Повернутися"},status:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"},pagination:{showing:"Показано",to:"по",of:"з",results:"результатів",previous:"Попередня",next:"Наступна"}},auth:{title:"Увійти",email:"Електронна пошта",password:"Пароль",remember:"Пам'ятайте мене",submit:"Увійти",errors:{invalid:"Недійсний електронний лист або пароль",required:"{Поле} потрібно"}},table:{choose:"Оберіть колонки для відображення",columns:"Колонки",actions:"Дії",search:"Пошук",export:"Експорт",exportTitle:"Експорт таблиці",close:"Закрити",chooseColumns:"Виберіть стовпці таблиці для експорту:",selectAll:"Вибрати усі",selectCurrent:"Вибрати поточні",none:"Жодного",chooseFormat:"Виберіть формат таблиці:",cancel:"Скасувати",download:"Завантажити таблицю",time:{weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",hoursAgo:"{count} годин тому",hourAgo:"1 година тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},format:{json:"Формат json",csv:"Формат csv",xlsx:"Формат xlsx"}},filter:{search:"Пошук",more:"Показати більше",less:"Показати меньше",selected:"обрано",clear:"Очистити",apply:"Застосувати",from:"Від",period:"Період",today:"Сьогодні",week:"Тиждень",month:"Місяць",quarter:"Квартал",year:"Рік",alltime:"Весь час",prev:"Попередній період",next:"Настпуний період",to:"До",notfound:"Нічого не знайдено"},items:{title:"Предмети",add:"Додати елемент",count:"Немає предметів | ",created:`Елемент "{Ім'я}" створений`,deleted:"Елемент видалено"},errors:{network:"Помилка мережі. ",notFound:"Ми не змогли знайти те, що ви шукали."},toast:{saved:"Збережені зміни",copied:"Скопіювано в буфер обміну"},users:{title:"Користувачі",description:"Керування користувачами.",createUser:"Створити користувача",editUser:"Редагувати користувача",searchUsers:"Пошук користувачів...",createUserFailed:"Створити користувача не вдалося",createUserSuccess:"Користувача створено успішно",editUserFailed:"Редагувати користувача не вдалося",editUserSuccess:"Користувача редаговано успішно",deleteUserSuccess:"Користувача видалено успішно",deleteUserFailed:"Користувача видалено не вдалося",form:{name:"Назва",description:"Опис",color:"Колір",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"}},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Посібник з меню",general:"Посібник",media:"Посібник з медіа",settings:"Посібник з налаштувань",users:"Посібник з користувачів",content:"Посібник з контенту",appOverview:"Посібник з огляду програми",collections:"Посібник з колекцій",help:"Допомога"}},r4=Object.freeze(Object.defineProperty({__proto__:null,cms:$i,default:{cms:$i}},Symbol.toStringTag,{value:"Module"}));qe.ArticlesPage=Vs,qe.BuilderPage=z_,qe.CmsContentWrapper=qB,qe.CollectionsPage=Mr,qe.Dashboard=Ar,qe.EditCollectionPage=gB,qe.default=Ar,qe.i18n=$l,qe.initI18n=YB,qe.install=ZB,qe.loadLocaleMessages=XB,qe.setLocale=KB,Object.defineProperties(qe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
241
+ `,y.parentNode.appendChild(k)};return e.onMounted(()=>{var f,y;(y=(f=t.value)==null?void 0:f.filter(k=>typeof k=="object"))==null||y.forEach(k=>k.id?k.id:k.id=Math.random().toString(36).substring(2,15))}),(f,y)=>(e.openBlock(),e.createElementBlock("div",zC,[e.createElementVNode("div",HC,[e.createElementVNode("div",qC,[e.createElementVNode("table",GC,[e.createElementVNode("thead",WC,[e.createElementVNode("tr",KC,[y[4]||(y[4]=e.createElementVNode("th",{class:"h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.colModel,k=>(e.openBlock(),e.createElementBlock("th",{key:k.name,class:"h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"},e.toDisplayString(k.label||k.title||k.name),1))),128)),e.createElementVNode("th",YC,e.toDisplayString(f.$t("cms.table.actions")),1)])]),e.createElementVNode("tbody",XC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(k,g)=>(e.openBlock(),e.createElementBlock("tr",{key:k==null?void 0:k.id,class:e.normalizeClass(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move",{"opacity-50":a.value===k}]),draggable:"true",onDragstart:p=>o(p,k,g),onDragover:p=>s(p),onDrop:p=>u(p,g),onDragenter:p=>i(p,g),onDragleave:y[2]||(y[2]=p=>c(p))},[e.createElementVNode("td",QC,[e.createElementVNode("div",JC,[e.createVNode(e.unref(Nr))])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.colModel,p=>(e.openBlock(),e.createElementBlock("td",{key:p.name,class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-slate-600 dark:text-slate-400 text-sm"},[p.type==="Texteditor"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:k[p.key]||"-"},null,8,eV)):p.type==="File"?(e.openBlock(),e.createElementBlock("div",tV,[Array.isArray(k[p.key])&&k[p.key].length>0?(e.openBlock(),e.createElementBlock("div",lV,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d(k[p.key]),(x,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"relative w-8 h-8 rounded overflow-hidden bg-gray-100 dark:bg-gray-700 flex-shrink-0"},[e.createElementVNode("img",{src:x,alt:`Image ${w+1}`,class:"w-full h-full object-cover",onError:y[0]||(y[0]=b=>h(b))},null,40,aV)]))),128)),m(k[p.key])>0?(e.openBlock(),e.createElementBlock("span",nV," +"+e.toDisplayString(m(k[p.key])),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",rV,[...y[5]||(y[5]=[e.createElementVNode("svg",{class:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z","clip-rule":"evenodd"})],-1)])]))])):(e.openBlock(),e.createElementBlock("span",oV,e.toDisplayString(k[p.key]||"-"),1))]))),128)),e.createElementVNode("td",sV,[e.createVNode(PC,{item:k,colModel:l.colModel,modelValue:t.value,"onUpdate:modelValue":y[1]||(y[1]=p=>t.value=p)},null,8,["item","colModel","modelValue"])])],42,ZC))),128)),r.value?(e.openBlock(),e.createElementBlock("tr",iV)):e.createCommentVNode("",!0)])])])]),e.createVNode(UC,{colModel:l.colModel,modelValue:t.value,"onUpdate:modelValue":y[3]||(y[3]=k=>t.value=k)},null,8,["colModel","modelValue"])]))}},ui="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAAAGfklEQVR4Ae3d7W6baBSF0d7/7Q6IDxkzmrHEQU2DHZudWH1XflRHcXNqVnka4tL01+qNAIGwwK/wfusJEFjPyexyuUzTNAxD3/dd1/3z/1vXdX3fD8MwTdPlcoFNoFmBlzJblmWapr7vb10d/9j3/TRNy7I0a+3AmxV4MrPr9TqO43FXnz06juP1em1W3IE3KPBMZvM8b1eGn7V0/P6u6+Z5bpDbIbcp8OXMnv4k9jG8cRzbRHfUrQl8LbNhGD7W8sp7hmFoTdzxNijwhcxOb+zWp9IaPO1aO+RHMzvxWvHjZz9Xj62ddq0d70OZzfP8sY1z3+MVkdbOvKaO935m1+v1xdcVHwmy6zqv8jd15jV1sPczi14u7gt06djUmdfUwd7JbFmWfQnp2T0iTZ187RzsncymaUqntd8/TVM79I60HYE7mT14v+I+lVfmvu+P6W93UQ7eCLyxwMd7d48yu1wurzTz3Mce3Mu/LMs4jt3/b88t91EE0gK383Mcx/1XQEeZffMV4+34D64bb42lmewn8LpA13X7l/SOMgvd9nF8DAc3hXzzFezx8/QogWOB/VdAR5n9yGm9f3K/fZ32DX99dwznUQKPC3Rdt53AR5n9yGm9f3Lbs7wNjx+hn0ngHQS2E/gos596otuT+234qefj1yXwnMB2AsvsOUAfReC+wEOZuWi8D+lnEPhc4KHM3u0lkM8PxyME3lHgocze7QX9d4T0nAh8LvBQZu/219M/8tn1c0OPEDgS2P/V1NFLIO92s9U0TT/y5eKRpccI/Emg67r9/UxHma3r+s2fQPZ/AGyfcLfhlW8O+ScK7yOQEvjtm5Heyeybrxv3fwBsde2HZVnmeZ68EXhjgXme9/cNr+u976Hvn3XuIzcTeE7gzmezdV19k4LnZH0UgU3gfma+5c6GZSDwnMD9zNZ19Q3knsP1UQRuAg9llr503P8DOL8xBP4+gUczW9c1dFPIwb/j/Pu4HVGbAl/ILFGaxto87Vo76q9ldu7Vo2vF1s62Zo/3y5ndXhF58aYn/41gsydcmwf+TGbrur5y39Nv96G06e6omxJ4MrObkf/ivalzxcE+LfBSZtuverlcpmkahqHv++16suu6vu+HYZim6eCbnG5LDAT+VoFzMvtbdRwXgVMEZHYKoyUEjgRkdqTjMQKnCMjsFEZLCBwJyOxIx2METhGQ2SmMlhA4EpDZkY7HCJwiILNTGC0hcCTwX2a3/1/QjwQInCuwlSezc2FtI1ACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhAS2DL7F8r/OP7dtZNpAAAAAElFTkSuQmCC",mi={faq:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},show_dots:{type:"switcher",label:"Показувати точки"},show_index:{type:"switcher",conditions:["show_dots","==","true"],label:"Показувати нумерацію"},index_type:{type:"combobox",conditions:["show_index","==","true"],label:"Тип нумерації",options:[{id:"decimal",text:"Десятковий"},{id:"upper-alpha",text:"Латинські великі букви"},{id:"lower-alpha",text:"Латинські маленькі букви"},{id:"upper-roman",text:"Римські великі цифри"},{id:"lower-roman",text:"Римські маленькі цифри"},{id:"upper-cyrillic",text:"Кириличні великі букви"},{id:"lower-cyrillic",text:"Кириличні маленькі букви"}]},openfirst:{type:"switcher",label:"Відкрити перший елемент?"},collapse_mode:{type:"switcher",label:"Не згортати попередній елемент?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Вкладений контент",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},banner:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},image:{type:"file",label:"Зображення",placeholder:"Зображення"}}},photoGrid:{schema:{columns:{type:"number",label:"Кількість колонок",placeholder:"Кількість колонок",default:3},data:{type:"DataTable",colModel:[{key:"image",ua:"Зображення",type:"file"},{key:"caption",ua:"Заголовок",type:"text"}]}}},slider:{schema:{autoplay:{type:"switcher",label:"Автоматичне гортання?",default:!0},autoplaySpeed:{type:"number",label:"Швидкість автоматичного гортання(мс)",placeholder:"Швидкість автоматичного гортання(мс)",default:3e3},show_navigation:{type:"switcher",label:"Показувати кнопки навігації?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"image",ua:"Зображення",type:"file"},{key:"image_width",ua:"Ширина зображення(px)",type:"number",placeholder:"Ширина зображення"},{key:"image_height",ua:"Висота зображення(px)",type:"number",placeholder:"Висота зображення"},{ua:"Розтягувати по ширині",key:"stretch",type:"switcher"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},video:{schema:{file:{type:"file",max_size:50,description:"Максимальний розмір файлу 50MB",label:"Завантажити відео",placeholder:"Завантажити відео"},hidden_gif:{type:"switcher",label:"Сховати GIF"},preview:{type:"file",label:"Прев'ю для відео"},link:{type:"text",label:"Посилання",placeholder:"Посилання"}}},about:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},text:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"},url:{type:"file",label:"Зображення / відео",placeholder:"Посилання"}}},cards:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"img",ua:"Зображення",type:"file"},{key:"link",ua:"Посилання",type:"text"},{key:"description",ua:"Опис",type:"text"}]}}},usefulLinks:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"text",ua:"Назва",type:"text"},{key:"url",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},team:{schema:{data:{type:"DataTable",colModel:[{key:"avatar",ua:"Аватар",type:"file"},{key:"title",ua:"Ім'я/ПІБ",type:"text"},{key:"description",ua:"Опис",type:"textarea",optional:!0},{key:"position",ua:"Посада",type:"text",tooltip:!0},{key:"email",ua:"Email",type:"text",optional:!0},{key:"tel",ua:"Телефон",type:"text",optional:!0},{key:"schedule",ua:"Графік прийому",type:"text",optional:!0},{key:"isinfo",type:"switcher",label:"Відображати кнопку 'Детальніше'"},{key:"slug",ua:"Slug",type:"text",label:"Унікальний ідентифікатор"}]}}},body:{schema:{background_color:{type:"switcher",label:"Додати білий фон?"},content:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"}}},news:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},buttonText:{type:"text",label:"Текст кнопки",placeholder:"Текст кнопки"},buttonLink:{type:"text",label:"Посилання кнопки",placeholder:"Посилання кнопки"},tag:{type:"select",label:"Тег",placeholder:"Тег",data:"tag_id"},news_list:{type:"select",label:"Список новин",multiple:!0,placeholder:"Список новин",parent:"tag",data:"news_tag_id"}}},form:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},formUrl:{type:"text",label:"Посилання для відправки форми",placeholder:"Посилання"},schema:{label:"Схема форми",type:"DataTable",colModel:[{key:"name",ua:"Name",type:"text",placeholder:"Name"},{key:"label",ua:"Title",type:"text",placeholder:"Title"},{key:"type",ua:"Type",type:"combobox",options:[{text:"Text",id:"text"},{text:"Textarea",id:"textarea"},{text:"switcher",id:"switcher"},{text:"Email",id:"email"},{text:"Mask",id:"mask"},{text:"Number",id:"number"},{text:"Date",id:"date"},{text:"Datetime",id:"datetime"}]},{key:"mask",ua:"Маска",type:"text",conditions:["type","==","mask"],placeholder:"Маска"},{key:"placeholder",ua:"Плейсхолдер",type:"text",placeholder:"Placeholder"},{key:"required",ua:"Required",type:"switcher"}]}}},tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},description:{type:"textarea",label:"Опис",placeholder:"Опис"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},vertical_tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"},{id:"slug",text:"Привязати сторінку"}],required:!0,validators:["required"]},{key:"slug",type:"text",label:"Slug",placeholder:"Slug",conditions:["is_section","==","slug"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},documents:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},icon:{type:"file",label:"Завантажити іконку",placeholder:"Завантажити іконку"},show_icon:{type:"switcher",label:"Показувати іконку?"},documents:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"file",info:"Прев'ю доступно тільки для документів у форматі pdf, html, txt. Інші формати одразу завантажуються.",ua:"Файл",type:"file"}]}}},infoLine:{schema:{divider:{type:"file",label:"Завантажити розподілювач"},speed:{type:"number",label:"Швидкість автоматичного гортання(с)",placeholder:"Швидкість автоматичного гортання(с)",default:20},data:{type:"DataTable",colModel:[{key:"title",ua:"Текст",type:"text"}]}}},interested:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Заголовок",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"},{key:"color",ua:"Колір фону",type:"color"}]}}},contact:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"type",ua:"Тип",type:"combobox",options:[{id:"email",text:"Email"},{id:"tel",text:"Телефон"},{id:"address",text:"Адреса"}]},{key:"title",ua:"Пошта",type:"text",conditions:["type","==","email"]},{key:"title",ua:"Телефон",type:"text",conditions:["type","==","tel"]},{key:"title",ua:"Адреса",type:"text",conditions:["type","==","address"]},{key:"description",ua:"Опис",type:"text"}]}}},iframe:{schema:{link:{type:"text",label:"Посилання",placeholder:"Посилання"},file:{type:"file",label:"Завантажити файл",placeholder:"Завантажити файл"},height:{type:"text",label:"Висота iframe(px)",placeholder:"Висота iframe(px)"}}}},Wa=[{text:"reference.faq",id:"faq"},{text:"reference.banner",id:"banner"},{text:"reference.slider",id:"slider"},{text:"reference.photoGrid",id:"photoGrid"},{text:"reference.video",id:"video"},{text:"reference.about",id:"about"},{text:"reference.cards",id:"cards"},{text:"reference.usefulLinks",id:"usefulLinks"},{text:"reference.team",id:"team"},{text:"reference.body",id:"body"},{text:"reference.news",id:"news"},{text:"reference.form",id:"form"},{text:"reference.tabs",id:"tabs"},{text:"reference.vertical_tabs",id:"vertical_tabs"},{text:"reference.documents",id:"documents"},{text:"reference.infoLine",id:"infoLine"},{text:"reference.interested",id:"interested"},{text:"reference.contact",id:"contact"},{text:"reference.iframe",id:"iframe"}],cV={class:"h-full w-full flex flex-col"},dV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},uV={class:"text-xs font-medium text-gray-600"},mV={key:0,class:"text-xs text-gray-500"},pi={__name:"cards-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",cV,[a[0]||(a[0]=e.createStaticVNode('<div class="flex-1 grid grid-cols-3 gap-1.5"><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div></div>',1)),e.createElementVNode("div",dV,[e.createElementVNode("div",uV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",mV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},pV={class:"h-full w-full flex flex-col"},fV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},hV={class:"text-xs font-medium text-gray-600"},gV={key:0,class:"text-xs text-gray-500"},yV={__name:"faq-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",pV,[a[0]||(a[0]=e.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg 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" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg 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" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div><div class="mt-1 pt-1 border-t border-gray-200"><div class="space-y-0.5"><div class="h-1 bg-gray-200 rounded"></div><div class="h-1 bg-gray-200 rounded w-5/6"></div><div class="h-1 bg-gray-200 rounded w-4/5"></div></div></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg 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" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg 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" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div></div>',2)),e.createElementVNode("div",fV,[e.createElementVNode("div",hV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",gV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},bV={class:"h-full w-full flex flex-col"},kV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},xV={class:"text-xs font-medium text-gray-600"},wV={key:0,class:"text-xs text-gray-500"},fi={__name:"banner-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",bV,[a[0]||(a[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-16 h-10 bg-gray-300 rounded"></div></div><div class="absolute bottom-2 left-2"><div class="h-3 bg-gray-400 rounded w-16"></div></div></div>',1)),e.createElementVNode("div",kV,[e.createElementVNode("div",xV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",wV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},_V={class:"h-full w-full flex flex-col"},EV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},CV={class:"text-xs font-medium text-gray-600"},VV={key:0,class:"text-xs text-gray-500"},NV={__name:"form-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",_V,[a[0]||(a[0]=e.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-8 bg-gray-200 rounded border border-gray-300"></div></div></div><div class="h-6 bg-gray-600 rounded mt-2"></div>',3)),e.createElementVNode("div",EV,[e.createElementVNode("div",CV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",VV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},vV={class:"h-full w-full flex flex-col"},BV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},SV={class:"text-xs font-medium text-gray-600"},DV={key:0,class:"text-xs text-gray-500"},hi={__name:"news-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",vV,[a[0]||(a[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="flex gap-2 flex-1"><div class="flex-1 space-y-2"><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div></div><div class="w-20 space-y-1"><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div></div></div>',2)),e.createElementVNode("div",BV,[e.createElementVNode("div",SV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",DV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},AV={class:"h-full w-full flex flex-col"},MV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},TV={class:"text-xs font-medium text-gray-600"},LV={key:0,class:"text-xs text-gray-500"},$V={__name:"team-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",AV,[a[0]||(a[0]=e.createStaticVNode('<div class="space-y-2 flex-1"><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg 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" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg 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" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg 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" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg 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" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg 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" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg 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" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg 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" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg 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" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg 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" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg 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" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg 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" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg 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" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div></div>',1)),e.createElementVNode("div",MV,[e.createElementVNode("div",TV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",LV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},FV={class:"h-full w-full flex flex-col"},IV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},OV={class:"text-xs font-medium text-gray-600"},PV={key:0,class:"text-xs text-gray-500"},gi={__name:"usefulLinks-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",FV,[a[0]||(a[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-3"></div><div class="grid grid-cols-2 gap-2 flex-1"><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div></div>',2)),e.createElementVNode("div",IV,[e.createElementVNode("div",OV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",PV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},RV={class:"h-full w-full flex flex-col"},jV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},UV={class:"text-xs font-medium text-gray-600"},zV={key:0,class:"text-xs text-gray-500"},HV={__name:"video-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",RV,[a[0]||(a[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-10 h-10 bg-gray-400 rounded-full flex items-center justify-center"><svg 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" class="lucide lucide-play w-5 h-5 text-white ml-0.5"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg></div></div><div class="absolute bottom-1.5 left-1.5 right-1.5"><div class="h-2 bg-gray-400 rounded mb-1"></div><div class="h-2 bg-gray-400 rounded w-3/4"></div></div></div><div class="mt-2 flex items-center gap-2"><div class="w-5 h-5 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded flex-1"></div></div>',2)),e.createElementVNode("div",jV,[e.createElementVNode("div",UV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",zV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},qV={class:"h-full w-full flex flex-col"},GV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},WV={class:"text-xs font-medium text-gray-600"},KV={key:0,class:"text-xs text-gray-500"},YV={__name:"about-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",qV,[a[0]||(a[0]=e.createStaticVNode('<div class="flex flex-1"><div class="flex-1 pr-2"><div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-4/5"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-3/4"></div><div class="h-2 bg-gray-300 rounded"></div></div></div><div class="w-16 h-20 bg-gray-200 rounded flex items-center justify-center"><div class="w-6 h-6 bg-gray-300 rounded-full"></div></div></div>',1)),e.createElementVNode("div",GV,[e.createElementVNode("div",WV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",KV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},XV={class:"h-full w-full flex flex-col"},ZV={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},QV={class:"text-xs font-medium text-gray-600"},JV={key:0,class:"text-xs text-gray-500"},eN={__name:"slider-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",XV,[a[0]||(a[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded mb-2 relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-12 h-8 bg-gray-300 rounded"></div></div><div class="absolute left-1 top-1/2 transform -translate-y-1/2"><svg 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" class="lucide lucide-chevron-left w-4 h-4 text-gray-400"><path d="m15 18-6-6 6-6"></path></svg></div><div class="absolute right-1 top-1/2 transform -translate-y-1/2"><svg 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" class="lucide lucide-chevron-right w-4 h-4 text-gray-400"><path d="m9 18 6-6-6-6"></path></svg></div></div><div class="h-3 bg-gray-300 rounded mb-2"></div><div class="h-6 w-20 bg-gray-400 rounded"></div><div class="flex justify-center gap-1 mt-2"><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div></div>',4)),e.createElementVNode("div",ZV,[e.createElementVNode("div",QV,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",JV,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},tN={class:"h-full flex flex-col"},lN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},aN={class:"text-xs font-medium text-gray-600"},nN={key:0,class:"text-xs text-gray-500"},rN={__name:"infoLine-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",tN,[a[0]||(a[0]=e.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative overflow-hidden"><div class="absolute inset-0 flex items-center"><div class="flex gap-8 whitespace-nowrap animate-pulse"><div class="h-3 bg-gray-400 rounded w-32"></div><div class="h-3 bg-gray-300 rounded w-24"></div><div class="h-3 bg-gray-400 rounded w-40"></div><div class="h-3 bg-gray-300 rounded w-28"></div><div class="h-3 bg-gray-400 rounded w-36"></div><div class="h-3 bg-gray-300 rounded w-20"></div></div></div><div class="absolute top-2 left-2 right-2 flex justify-between items-center"><div class="w-2 h-2 bg-gray-500 rounded-full"></div><div class="w-2 h-2 bg-gray-500 rounded-full"></div></div></div>',1)),e.createElementVNode("div",lN,[e.createElementVNode("div",aN,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",nN,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},oN={class:"h-full flex flex-col"},sN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},iN={class:"text-xs font-medium text-gray-600"},cN={key:0,class:"text-xs text-gray-500"},dN={__name:"tabs-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",oN,[a[0]||(a[0]=e.createStaticVNode('<div class="h-2 bg-gray-300 rounded mb-2"></div><div class="flex gap-1 mb-3"><div class="h-4 w-16 bg-gray-400 rounded"></div><div class="h-4 w-16 bg-gray-200 rounded"></div></div><div class="space-y-2 flex-1"><div class="h-2 bg-gray-300 rounded w-5/6"></div><div class="h-2 bg-gray-300 rounded"></div><div class="space-y-1 mt-3"><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-20"></div></div><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-16"></div></div></div></div>',3)),e.createElementVNode("div",sN,[e.createElementVNode("div",iN,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",cN,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},uN={class:"h-full flex flex-col"},mN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},pN={class:"text-xs font-medium text-gray-600"},fN={key:0,class:"text-xs text-gray-500"},yi={__name:"documents-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",uN,[a[0]||(a[0]=e.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div></div>',2)),e.createElementVNode("div",mN,[e.createElementVNode("div",pN,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",fN,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},hN={class:"h-full flex flex-col"},gN={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},yN={class:"text-xs font-medium text-gray-600"},bN={key:0,class:"text-xs text-gray-500"},Ka={faq:yV,banner:fi,slider:eN,video:HV,about:YV,cards:pi,usefulLinks:gi,team:$V,news:hi,form:NV,tabs:dN,vertical_tabs:hi,documents:yi,infoLine:rN,body:{__name:"body-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",hN,[a[0]||(a[0]=e.createStaticVNode('<div class="grid grid-cols-3 gap-2 flex-1"><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div></div>',1)),e.createElementVNode("div",gN,[e.createElementVNode("div",yN,e.toDisplayString(t.$t(l.text)),1),l.count&&l.count>0?(e.openBlock(),e.createElementBlock("div",bN,e.toDisplayString(l.count),1)):e.createCommentVNode("",!0)])]))}},photoGrid:pi,interested:gi,contact:yi,iframe:fi},kN={class:"grid grid-cols-1 md:grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-4"},xN=["onClick"],wN={class:"wireframe-block h-[240px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-300 hover:border-gray-400 cursor-pointer"},_N=["src"],EN={__name:"vs-form-reference-choce",props:{modelValue:{type:String,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(l){const t=e.useModel(l,"modelValue");return(a,n)=>(e.openBlock(),e.createElementBlock("div",kN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Wa),r=>(e.openBlock(),e.createElementBlock("div",{key:r.id,onClick:o=>t.value=r.id,class:"relative"},[e.createElementVNode("div",wN,[e.unref(Ka)[r.id]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Ka)[r.id]),{key:0,text:r==null?void 0:r.text,count:(r==null?void 0:r.data)||0},null,8,["text","count"])):(e.openBlock(),e.createElementBlock("img",{key:1,src:e.unref(ui),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,_N))])],8,xN))),128))]))}},CN={};function VN(l,t,a,n,r,o){const s=e.resolveComponent("vs-richtext");return e.openBlock(),e.createBlock(s,{class:"w-full"})}const fr=tl(CN,[["render",VN]]),NN={class:"flex gap-4"},vN={class:"text-sm text-gray-500 dark:text-gray-400 border flex items-center h-10 px-4 rounded-lg w-full"},BN={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},SN={__name:"vs-form-reference-add",props:e.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const{t}=Fe();$e["vs-input-reference"]=hr,$e["vs-input-tiptap-editor"]=fr;const a=e.useModel(l,"modelValue"),n=e.ref(!1),r=e.ref({}),o=e.ref(null),s=e.ref({}),i=e.computed(()=>{var u;return((u=mi[o.value])==null?void 0:u.schema)||null}),c=async()=>{if(await r.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}try{Object.keys(s.value).length!==0&&(a.value=[...a.value||[],{...s.value,id:Math.random().toString(36).substring(2,15),reference_type:o.value}]),n.value=!1,o.value=null,s.value={}}catch(d){console.log(d)}};return e.watch(n,()=>{n.value||(o.value=null,s.value={})}),(u,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{type:"button",class:"inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-sky-500",onClick:d[0]||(d[0]=m=>n.value=!n.value)},e.toDisplayString(u.$t("cms.builder.create")),1),e.createVNode(e.unref(Xo),{visible:n.value,"onUpdate:visible":d[6]||(d[6]=m=>n.value=m),position:"right",closeClickBackdrop:!1,onClose:d[7]||(d[7]=m=>n.value=!1),title:o.value?u.$t("cms.builder."+o.value):u.$t("cms.builder.selectType"),size:"50vw"},{footer:e.withCtx(()=>[e.createElementVNode("div",BN,[e.createElementVNode("button",{onClick:d[5]||(d[5]=m=>n.value=!1),class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100"},e.toDisplayString(u.$t("cms.builder.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.builder.create")),1)])]),default:e.withCtx(()=>{var m;return[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",NN,[e.createElementVNode("div",vN,[e.createElementVNode("span",null,e.toDisplayString((m=e.unref(Wa).find(h=>h.id===o.value))==null?void 0:m.text),1)]),e.createElementVNode("button",{class:"py-2.5 px-3 mb-4 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:d[2]||(d[2]=h=>o.value=null)},e.toDisplayString(u.$t("cms.builder.changeType")),1)]),i.value?(e.openBlock(),e.createBlock(e.unref(Xe),{key:o.value,schema:i.value,modelValue:s.value,"onUpdate:modelValue":d[3]||(d[3]=h=>s.value=h),form:r.value,"onUpdate:form":d[4]||(d[4]=h=>r.value=h)},null,8,["schema","modelValue","form"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(EN,{key:0,modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=h=>o.value=h),options:e.unref(Wa)},null,8,["modelValue","options"]))]}),_:1},8,["visible","title"])]))}},DN={class:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex space-x-1 z-10"},AN={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},MN={__name:"vs-form-reference-controls",props:e.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Object,default:()=>({})},modelModifiers:{},parent:{type:Array,default:()=>[]},parentModifiers:{}}),emits:["update:modelValue","update:parent"],setup(l){const{t}=Fe(),a=e.useModel(l,"modelValue"),n=e.useModel(l,"parent"),r=e.ref(!1),o=e.ref({}),s=e.ref({}),i=e.computed(()=>{var u;return((u=mi[a.value.reference_type])==null?void 0:u.schema)||null});e.watch(r,u=>{u&&(o.value={...a.value})});const c=async()=>{try{if(await s.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}a.value={...o.value},r.value=!1}catch(u){console.log(u)}};return(u,d)=>(e.openBlock(),e.createElementBlock("div",DN,[e.createElementVNode("button",{onClick:d[0]||(d[0]=m=>r.value=!r.value),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors border border-gray-200 dark:border-gray-700"},[e.createVNode(e.unref(_l),{class:"h-4 w-4 text-gray-400"})]),e.createElementVNode("button",{onClick:d[1]||(d[1]=m=>n.value=n.value.filter(h=>h.id!==a.value.id)),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors border border-gray-200 dark:border-gray-700"},[e.createVNode(e.unref(Kt),{class:"h-4 w-4 text-red-500"})]),e.createVNode(e.unref(Xo),{visible:r.value,"onUpdate:visible":d[5]||(d[5]=m=>r.value=m),onClose:d[6]||(d[6]=m=>r.value=!1),title:l.title,width:"50vw"},{footer:e.withCtx(()=>[e.createElementVNode("div",AN,[e.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:d[4]||(d[4]=m=>r.value=!1)},e.toDisplayString(u.$t("cms.common.actions.cancel")),1),e.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},e.toDisplayString(u.$t("cms.common.actions.save")),1)])]),default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(e.unref(Xe),{key:0,form:s.value,"onUpdate:form":d[2]||(d[2]=m=>s.value=m),schema:i.value,modelValue:o.value,"onUpdate:modelValue":d[3]||(d[3]=m=>o.value=m),class:"-mr-[10px] ml-[10px] mt-[10px]"},null,8,["form","schema","modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["visible","title"])]))}},TN={class:"w-full"},LN={key:0,class:"relative"},$N={class:"group wireframe-block h-[280px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-00 hover:border-gray-400 cursor-grab"},FN=["src"],hr={__name:"vs-form-reference-list",props:e.mergeModels({reference_type:{type:String,required:!0},title:{type:String,required:!0}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=r=>{var o;return(o=Wa.find(s=>s.id===r))==null?void 0:o.text},a=e.useModel(l,"modelValue"),n=e.computed({get(){const r=a.value;return r==null?[]:Array.isArray(r)?r:[]},set(r){a.value=Array.isArray(r)?r:[]}});return e.watch(a,r=>{r!=null&&!Array.isArray(r)&&(a.value=[])},{immediate:!0}),(r,o)=>{var s;return e.openBlock(),e.createElementBlock("div",TN,[((s=n.value)==null?void 0:s.length)>0?(e.openBlock(),e.createBlock(e.unref(ii),{key:0,modelValue:n.value,"onUpdate:modelValue":o[1]||(o[1]=i=>n.value=i),"item-key":"id",handle:".drag-handle",class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4"},{item:e.withCtx(({element:i,index:c})=>[i!=null&&i.reference_type?(e.openBlock(),e.createElementBlock("div",LN,[e.createElementVNode("div",$N,[(e.openBlock(),e.createElementBlock("div",{key:i.id,class:"absolute top-2 left-2 opacity-0 group-hover:opacity-100 border border-gray-200 dark:border-gray-700 transition-opacity cursor-move z-10 bg-white dark:bg-gray-800 rounded p-1 shadow-sm drag-handle"},[e.createVNode(e.unref(Nr),{class:"h-4 w-4 text-gray-400"})])),e.createVNode(MN,{title:r.$t("cms.builder."+(i==null?void 0:i.reference_type)),modelValue:n.value[c],"onUpdate:modelValue":u=>n.value[c]=u,parent:n.value,"onUpdate:parent":o[0]||(o[0]=u=>n.value=u)},null,8,["title","modelValue","onUpdate:modelValue","parent"]),e.unref(Ka)[i==null?void 0:i.reference_type]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Ka)[i==null?void 0:i.reference_type]),{key:0,index:c,text:t(i==null?void 0:i.reference_type),count:Array.isArray(i==null?void 0:i.data)?i.data.length:0},null,8,["index","text","count"])):(e.openBlock(),e.createElementBlock("img",{key:1,src:e.unref(ui),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,FN))])])):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(SN,{class:"mt-4",title:l.title,modelValue:n.value,"onUpdate:modelValue":o[2]||(o[2]=i=>n.value=i)},null,8,["title","modelValue"])])}}};function bi(l){if(l===0)return"0 Bytes";const t=1024,a=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(l)/Math.log(t));return Number.parseFloat((l/Math.pow(t,n)).toFixed(2))+" "+a[n]}function IN(l){const t=new Date(l);return isNaN(t.getTime())?"":t.toISOString().slice(0,10)}const ON={__name:"TypeTag",props:{type:{type:String,required:!0}},setup(l){const t=new Map([["document","bg-blue-100 text-blue-800 border-blue-200 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-700"],["image","bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700"],["video","bg-purple-100 text-purple-800 border-purple-200 dark:bg-purple-900/30 dark:text-purple-300 dark:border-purple-700"]]);return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors shadow-lg backdrop-blur-sm",e.unref(t).get(l.type)])},e.toDisplayString(l.type),3))}},PN={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 max-h-[calc(100%-130px)] overflow-y-auto px-2 pt-2 pb-5"},RN={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground col-span-full"},jN=["onClick"],UN=["onClick"],zN={class:"truncate font-medium text-slate-800 dark:text-slate-100 mb-2"},HN={class:"text-sm text-slate-500 dark:text-slate-400"},qN=["onClick"],GN={class:"p-0"},WN={class:"aspect-video bg-slate-100 dark:bg-slate-700 rounded-t-lg overflow-hidden relative"},KN={class:"w-full h-full flex items-center justify-center bg-gradient-to-br from-slate-100 to-slate-200 dark:from-slate-700 dark:to-slate-800"},YN={key:0,class:"relative w-full"},XN=["src","alt"],ZN={class:"p-4"},QN={class:"flex items-center justify-between mb-2"},JN={class:"font-medium text-slate-800 dark:text-slate-100 truncate flex-1 mr-2"},ev={class:"space-y-1 text-sm text-slate-500 dark:text-slate-400"},tv={class:"flex justify-between"},lv={class:"flex justify-between"},av={__name:"MediaGrid",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]},isDeleteButton:{type:Boolean,default:!1}},emits:["delete-file","file-click","delete-folder"],setup(l,{emit:t}){Fe();const a=l,n=e.ref([]),r=e.ref(null),o=i=>{if(!i)return"";const c=new Date(i);return isNaN(c.getTime())?"":c.toISOString().slice(0,10)},s=()=>{n.value=a.files.sort((i,c)=>i.type==="dir"&&c.type!=="dir"?-1:i.type!=="dir"&&c.type==="dir"?1:0)};return e.onMounted(()=>s()),e.onUpdated(()=>s()),(i,c)=>{var u;return e.openBlock(),e.createElementBlock("div",PN,[((u=l.files)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",RN,[e.createVNode(e.unref(kl),{class:"w-12 h-12 mb-2"}),e.createElementVNode("p",null,e.toDisplayString(i.$t("cms.noFilesInFolder")),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,d=>{var m;return e.openBlock(),e.createElementBlock(e.Fragment,{key:d==null?void 0:d.url},[(d==null?void 0:d.type)==="dir"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"p-6 text-center rounded-xl h-[fit-content] relative text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 cursor-pointer",onClick:h=>i.$emit("file-click",d)},[l.isDeleteButton?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(h=>{r.value=d},["stop"]),class:"absolute top-4 right-4 p-1 border border-gray-300 dark:border-slate-700 rounded-lg cursor-pointer hover:bg-gray-200 dark:hover:bg-slate-700 group"},[e.createVNode(e.unref(Kt),{class:"w-4 h-4 text-gray-500 group-hover:text-red-500"})],8,UN)):e.createCommentVNode("",!0),e.createVNode(e.unref(Vr),{class:"w-16 h-16 mx-auto mb-4 text-blue-600"}),e.createElementVNode("h3",zN,e.toDisplayString(d==null?void 0:d.name),1),e.createElementVNode("p",HN,e.toDisplayString(d==null?void 0:d.count)+" "+e.toDisplayString(i.$t("cms.media.files")),1)],8,jN)):(d==null?void 0:d.type)==="file"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["h-[fit-content] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 group cursor-pointer",{"bg-accent text-accent-foreground ring-2 ring-primary":((m=l.selectedFile)==null?void 0:m.url)===(d==null?void 0:d.url)||l.selectedFiles&&l.selectedFiles.some(h=>h.id===d.id)}]),onClick:h=>i.$emit("file-click",d)},[e.createElementVNode("div",GN,[e.createElementVNode("div",WN,[e.createElementVNode("div",KN,[(d==null?void 0:d.filetype)==="image"&&(d!=null&&d.filepath||d!=null&&d.url)?(e.openBlock(),e.createElementBlock("div",YN,[e.createElementVNode("img",{src:d==null?void 0:d.preview,alt:(d==null?void 0:d.alt)||(d==null?void 0:d.filename),class:"object-cover w-full h-full rounded text-xs"},null,8,XN)])):(e.openBlock(),e.createBlock(e.unref(Il),{key:1,class:"w-12 h-12 text-gray-500"}))])]),e.createElementVNode("div",ZN,[e.createElementVNode("div",QN,[e.createElementVNode("h3",JN,e.toDisplayString(d.filename),1),e.createVNode(ON,{type:d==null?void 0:d.filetype},null,8,["type"])]),e.createElementVNode("div",ev,[e.createElementVNode("div",tv,[e.createElementVNode("span",null,e.toDisplayString(i.$t("cms.media.size"))+":",1),e.createElementVNode("span",null,e.toDisplayString(e.unref(bi)(d.filesize)),1)]),e.createElementVNode("div",lv,[e.createElementVNode("span",null,e.toDisplayString(i.$t("cms.media.uploaded"))+":",1),e.createElementVNode("span",null,e.toDisplayString(o(d.created_at)),1)])])])])],10,qN)):e.createCommentVNode("",!0)],64)}),128))])}}},nv={},rv={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function ov(l,t){return e.openBlock(),e.createElementBlock("svg",rv,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),e.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const sv=tl(nv,[["render",ov]]),iv={},cv={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function dv(l,t){return e.openBlock(),e.createElementBlock("svg",cv,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),e.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const uv=tl(iv,[["render",dv]]),mv={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground"},pv={key:1,class:"w-full text-sm caption-bottom"},fv={class:"[&_tr]:border-b"},hv={class:"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"},gv={class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground w-[300px]"},yv={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},bv={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},kv={class:"hidden h-12 px-4 font-medium text-left align-middle text-muted-foreground md:table-cell"},xv={class:"[&_tr:last-child]:border-0"},wv=["onClick"],_v={class:"p-4 font-medium align-middle"},Ev={class:"flex items-center gap-2"},Cv={key:1,class:"relative w-8 h-8"},Vv=["src","alt"],Nv={class:"truncate max-w-[200px]"},vv={class:"p-4 align-middle"},Bv={class:"p-4 align-middle"},Sv={class:"hidden p-4 align-middle md:table-cell"},Dv={key:0},Av={__name:"MediaList",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]}},emits:["file-click","delete-folder"],setup(l,{emit:t}){const{t:a}=Fe(),n=e.ref(null),r=t,o=()=>{Ca({title:a("cms.builder.deleteTitle"),message:a("cms.builder.deleteObject"),type:"error",onConfirm:()=>{s()}})},s=()=>{r("delete-folder",n.value)};return(i,c)=>{const u=e.resolveComponent("File");return e.openBlock(),e.createElementBlock("div",null,[l.files.length===0?(e.openBlock(),e.createElementBlock("div",mv,[e.createVNode(u,{class:"w-12 h-12 mb-2"}),e.createElementVNode("p",null,e.toDisplayString(i.$t("cms.media.noFilesInFolder")),1)])):(e.openBlock(),e.createElementBlock("table",pv,[e.createElementVNode("thead",fv,[e.createElementVNode("tr",hv,[e.createElementVNode("th",gv,e.toDisplayString(i.$t("cms.media.name")),1),e.createElementVNode("th",yv,e.toDisplayString(i.$t("cms.media.type")),1),e.createElementVNode("th",bv,e.toDisplayString(i.$t("cms.media.size")),1),e.createElementVNode("th",kv,e.toDisplayString(i.$t("cms.media.updatedAt")),1),c[0]||(c[0]=e.createElementVNode("th",null,null,-1))])]),e.createElementVNode("tbody",xv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,d=>{var m,h,f,y,k;return e.openBlock(),e.createElementBlock("tr",{key:d.id,class:e.normalizeClass(["border-b transition-colors hover:bg-blue-200/50 data-[state=selected]:bg-muted cursor-pointer",{"bg-blue-200":((m=n.value)==null?void 0:m.id)===d.id&&((h=n.value)==null?void 0:h.type)===d.type||l.selectedFiles&&l.selectedFiles.some(g=>g.id===d.id&&g.type===d.type)}]),onClick:g=>i.$emit("cms.file-click",d)},[e.createElementVNode("td",_v,[e.createElementVNode("div",Ev,[d.type==="dir"?(e.openBlock(),e.createBlock(sv,{key:0,class:"w-5 h-5 text-blue-500"})):(d==null?void 0:d.filetype)==="image"&&(d!=null&&d.filepath)?(e.openBlock(),e.createElementBlock("div",Cv,[e.createElementVNode("img",{src:d==null?void 0:d.preview,alt:(d==null?void 0:d.alt)||(d==null?void 0:d.filename),class:"object-cover w-full h-full rounded"},null,8,Vv)])):(d==null?void 0:d.filetype)==="image"?(e.openBlock(),e.createBlock(uv,{key:2,class:"w-5 h-5 text-green-500"})):(e.openBlock(),e.createBlock(u,{key:3,class:"w-5 h-5 text-gray-500"})),e.createElementVNode("span",Nv,e.toDisplayString((d==null?void 0:d.filename)||(d==null?void 0:d.name)),1)])]),e.createElementVNode("td",vv,e.toDisplayString((d==null?void 0:d.type)==="dir"?i.$t("cms.media.folder"):((y=(f=d==null?void 0:d.filetype)==null?void 0:f.charAt(0))==null?void 0:y.toUpperCase())+((k=d==null?void 0:d.filetype)==null?void 0:k.slice(1))),1),e.createElementVNode("td",Bv,e.toDisplayString((d==null?void 0:d.type)==="dir"?"--":e.unref(bi)(d==null?void 0:d.filesize)),1),e.createElementVNode("td",Sv,e.toDisplayString(d!=null&&d.updated_at?e.unref(IN)(d==null?void 0:d.updated_at):"--"),1),d.type==="dir"?(e.openBlock(),e.createElementBlock("td",Dv,[e.createVNode(e.unref(Kt),{class:"w-4 h-4 text-red-500 cursor-pointer",onClick:e.withModifiers(o,["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],10,wv)}),128))])]))])}}},Mv={},Tv={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function Lv(l,t){return e.openBlock(),e.createElementBlock("svg",Tv,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),e.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)])])}const $v=tl(Mv,[["render",Lv]]),Fv={class:"flex items-center space-x-1"},Iv=["onClick"],Ov={__name:"MediaBreadcrumb",props:{currentPath:{type:Array,required:!0}},emits:["navigate"],setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",Fv,[e.createElementVNode("button",{class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20",onClick:a[0]||(a[0]=n=>t.$emit("navigate",[]))},[e.createVNode($v,{class:"w-3 h-3"}),e.createTextVNode(" "+e.toDisplayString(t.$t("cms.media.mediaLibrary")),1)]),l.currentPath.length>0?(e.openBlock(),e.createBlock(e.unref(bl),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.currentPath,(n,r)=>(e.openBlock(),e.createElementBlock("button",{key:r,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20",onClick:o=>t.$emit("navigate",l.currentPath.slice(0,r+1))},[e.createVNode(e.unref(Vr),{class:"w-3 h-3"}),e.createTextVNode(" "+e.toDisplayString(n)+" ",1),r<l.currentPath.length-1?(e.openBlock(),e.createBlock(e.unref(bl),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):e.createCommentVNode("",!0)],8,Iv))),128))]))}},Pv=["src"],Rv={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},jv=["onClick"],Uv=["onClick"],zv=["title"],Hv={key:1,class:"relative group"},qv=["src"],Gv={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},Wv=["title"],Kv={key:2,class:"absolute inset-0 bg-white bg-opacity-75 flex items-center justify-center rounded-lg z-10"},Yv={class:"flex flex-col items-center gap-2"},Xv={class:"text-xs text-gray-600"},Zv=["multiple","disabled"],Qv={class:"whitespace-nowrap text-sm"},Jv={class:"whitespace-nowrap text-sm"},eB={class:"flex items-center justify-between p-4 border-b"},tB={class:"text-lg font-semibold"},lB={class:"flex items-center justify-between gap-4 p-4 border-b"},aB={class:"relative z-[1] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm mb-6 p-4 mx-4"},nB={class:"flex items-center justify-between gap-4"},rB={class:"flex items-center gap-4 flex-1"},oB={class:"relative flex-1 max-w-md"},sB=["placeholder"],iB={class:"flex items-center gap-2 relative"},cB={class:"text-xs font-bold"},dB={class:"text-xs font-bold"},uB={key:0,class:"w-full absolute top-full left-1/2 transform -translate-x-1/2 mt-2 z-50 bg-white dark:bg-slate-700 flex flex-col items-start border border-slate-200 dark:border-slate-600 rounded-md shadow-lg"},mB={class:"flex items-center gap-2"},pB={class:"flex flex-col gap-4 overflow-y-auto p-4 flex-1"},fB={class:"p-4 border-t flex items-center justify-between"},hB={key:0,class:"text-sm text-gray-600 dark:text-gray-400"},gB={key:1},yB=["disabled"],Ll={__name:"vs-form-media-select",props:e.mergeModels({multiple:{type:Boolean,default:!1},multi:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(l,{emit:t}){const{t:a}=Fe(),n=nt.useRoute(),r=nt.useRouter(),o=e.useModel(l,"modelValue"),s=t,i=l,c=e.computed(()=>i.multiple||i.multi),u=e.ref(null),d=e.computed(()=>o.value||u.value),m=e.computed(()=>{if(!c.value)return[];const j=d.value;return j?Array.isArray(j)?j:[j]:[]}),h=e.computed(()=>d.value?typeof d.value=="object"?d.value.filename||d.value.file_name||d.value.native_file_name||"File":typeof d.value=="string"?d.value.split("cms./").pop()||d.value:"File":""),f=e.ref(!1),y=e.ref(!1),k=e.ref("grid"),g=e.ref([]),p=e.ref([]),x=e.ref([]),w=e.ref(),b=e.ref([]),_=e.ref(null),V=e.ref(!1),E=e.ref(null),M=e.ref(null),D=e.ref({}),A=e.ref(""),$=e.ref(!1),U=e.ref("name"),W=new Map([["name",a("cms.media.sortBy.name")],["filesize",a("cms.media.sortBy.filesize")]]),O=j=>typeof j=="string"?j:(j==null?void 0:j.filepath)||(j==null?void 0:j.file_path)||j,I=j=>j?typeof j=="string"?j.split("cms./").pop()||j:j.filename||j.file_name||j.native_file_name||"File":"",F=j=>typeof j=="string"?j:(j==null?void 0:j.preview)||`/file/resize?filepath=${O(j)}&h=137&quality=75`,T=()=>{_.value&&_.value.click()},z=()=>{f.value=!f.value,f.value&&Q()},Q=()=>{if(E.value){const j=E.value.getBoundingClientRect();D.value={top:`${j.bottom+10}px`,left:`${j.left+j.width/2}px`,transform:"translateX(-50%)",width:"200px"}}},me=j=>{var X;if(j.type==="dir")Ye([...g.value,j.name]);else if(c.value){const le=b.value.findIndex(ae=>ae.id===j.id);le>=0?b.value.splice(le,1):b.value.push(j)}else w.value=j.id===((X=w.value)==null?void 0:X.id)?null:j},Ne=j=>{U.value=j,$.value=!1,p.value=p.value.sort((X,le)=>{var ae;if((X==null?void 0:X.type)==="dir")return-1;if(j==="name")return(ae=X==null?void 0:X.name)==null?void 0:ae.localeCompare(le==null?void 0:le.name);if(j==="filesize")return(le==null?void 0:le.filesize)-(X==null?void 0:X.filesize)})},Ke=async()=>{try{const j=g.value.join("/"),le=await(await fetch(`/api/cms-media?subdir=${j}${A.value?"&search="+A.value:""}`,{method:"GET"})).json();le.data?(p.value=le.data.map(ae=>({...ae,id:ae.type==="dir"?`dir-${ae.name}`:ae.id,preview:`/file/resize?filepath=${ae.filepath}&h=137&quality=75`})),Ne(U.value)):p.value=[]}catch(j){console.error("Search error:",j),p.value=[]}},Wt=()=>{if(c.value){if(b.value.length>0){const j=Array.isArray(o.value)?[...o.value]:o.value?[o.value]:[],X=Array.isArray(u.value)?[...u.value]:u.value?[u.value]:[];b.value.forEach(le=>{const ae=le.filepath||le.file_path;j.some(de=>(typeof de=="string"?de:(de==null?void 0:de.filepath)||(de==null?void 0:de.file_path))===ae)||(j.push(ae),X.push(le))}),o&&(o.value=j),u.value=X,s("cms.change",j),b.value=[]}}else if(w.value){const j=w.value.filepath||w.value.file_path;o&&(o.value=j),u.value=w.value,s("cms.change",j),w.value=null}Re()},Re=()=>{y.value=!1},Ye=j=>{g.value=j,x.value=[...x.value,j],w.value=null,c.value&&(b.value=[]),bt()},vt=()=>{x.value.length>1&&(x.value.pop(),g.value=x.value[x.value.length-1],w.value=null,c.value&&(b.value=[]),bt())},bt=async()=>{try{const j=g.value.join("/"),le=await(await fetch(`/api/cms-media?subdir=${j}${A.value?"&search="+A.value:""}`,{method:"GET"})).json();le.data?(p.value=le.data.map(ae=>({...ae,id:ae.type==="dir"?`dir-${ae.name}`:ae.id,preview:`/file/resize?filepath=${ae.filepath}&h=137&quality=75`})),Ne(U.value)):p.value=[]}catch(j){console.error("Fetch error:",j),p.value=[]}},Et=async(j,X)=>{try{const le=typeof j=="string"?j:O(j);if(await fetch(`/file/delete${le}`),c.value){const ae=Array.isArray(o.value)?[...o.value]:[],de=Array.isArray(u.value)?[...u.value]:[];if(X!==void 0&&X>=0)ae.splice(X,1),de.splice(X,1);else{const Ae=ae.findIndex(N=>(typeof N=="string"?N:(N==null?void 0:N.filepath)||(N==null?void 0:N.file_path))===le);Ae>=0&&(ae.splice(Ae,1),de.splice(Ae,1))}o&&(o.value=ae.length>0?ae:null),u.value=de.length>0?de:null,s("cms.change",ae.length>0?ae:null)}else o&&(o.value=null),u.value=null,s("cms.change",null);return!0}catch(le){return console.error(le),!1}},Pt=async j=>{try{const X=await fetch(`/file/download/files/uploads${j}`),le=await X.arrayBuffer(),ae=X.headers["content-type"],de=new TextDecoder("utf-8").decode(le),Ae=new Blob([de],{type:ae}),N=document.createElement("cms.a");N.setAttribute("download",j),N.href=window.URL.createObjectURL(Ae),N.click()}catch(X){console.error(X.message)}},at=async j=>{if(!j.target.files||j.target.files.length===0)return;const X=Array.from(j.target.files);console.log("Uploading files:",X),V.value=!0;try{const le=[];for(const ae of X){const de=new FormData;de.append("file",ae);const Ae=await fetch("/file/upload/uploads?id=1&form=form&table=table",{method:"POST",body:de});if(!Ae.ok)throw new Error(`Upload failed: ${Ae.status}`);const N=await Ae.json();console.log("Upload result:",N);const v=N.result,q={file_id:v.file_id,file_name:v.file_name,file_path:v.file_path,filepath:v.file_path,format:v.format,size:v.size,entity_id:v.entity_id,dir:v.dir,native_file_name:v.native_file_name,preview:`/file/resize?filepath=${v.file_path}&h=137&quality=75`};le.push(q)}if(c.value){const ae=Array.isArray(o.value)?[...o.value]:o.value?[o.value]:[],de=Array.isArray(u.value)?[...u.value]:u.value?[u.value]:[];le.forEach(Ae=>{ae.push(Ae.file_path),de.push(Ae)}),o&&(o.value=ae),u.value=de,s("cms.change",ae)}else{const ae=le[0];o&&(o.value=ae.file_path),u.value=ae,s("cms.change",ae.file_path)}f.value=!1}catch(le){console.error("Upload error:",le),alert("cms.Помилка завантаження файлу: "+le.message)}finally{V.value=!1}j.target.value=""};e.watch(y,j=>{j&&bt()}),e.watch(g,j=>{j.length>0?r.push({query:{path:j.join("/")}}):r.push({query:{path:void 0}})});let st;return e.watch(A,j=>{clearTimeout(st),st=setTimeout(()=>{Ke()},500)}),e.watch(o,j=>{var X,le,ae,de;if(j&&typeof j=="object"){const Ae=((X=w.value)==null?void 0:X.filepath)||((le=w.value)==null?void 0:le.file_path);j.filepath!==Ae&&j.file_path!==Ae&&(w.value=null)}else if(j&&typeof j=="string"){const Ae=((ae=w.value)==null?void 0:ae.filepath)||((de=w.value)==null?void 0:de.file_path);j!==Ae&&(w.value=null)}}),e.onMounted(()=>{var X,le;g.value=((le=(X=n.query)==null?void 0:X.path)==null?void 0:le.split("cms./"))||[],x.value=[[]],o.value||(w.value=null);const j=ae=>{var de;f.value&&!((de=E.value)!=null&&de.contains(ae.target))&&(f.value=!1),$.value&&M.value&&!M.value.contains(ae.target)&&($.value=!1)};document.addEventListener("click",j)}),(j,X)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps(j.$attrs,{class:"flex gap-4 flex-wrap"}),[c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(le,ae)=>(e.openBlock(),e.createElementBlock("div",{key:ae,class:"relative group"},[e.createElementVNode("img",{src:F(le),alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,Pv),e.createElementVNode("div",Rv,[e.createElementVNode("button",{type:"button",onClick:de=>Et(le,ae),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[e.createVNode(e.unref(Kt),{class:"w-4 h-4"})],8,jv),e.createElementVNode("button",{type:"button",onClick:de=>Pt(O(le)),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[e.createVNode(e.unref(Ja),{class:"w-4 h-4"})],8,Uv)]),e.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:I(le)},[e.createTextVNode(e.toDisplayString(I(le))+" ",1),X[12]||(X[12]=e.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,zv)]))),128)):d.value?(e.openBlock(),e.createElementBlock("div",Hv,[e.createElementVNode("img",{src:d.value.preview||d.value,alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,qv),e.createElementVNode("div",Gv,[e.createElementVNode("button",{type:"button",onClick:X[0]||(X[0]=le=>{var ae,de;return Et(((ae=d.value)==null?void 0:ae.filepath)||((de=d.value)==null?void 0:de.file_path)||d.value)}),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[e.createVNode(e.unref(Kt),{class:"w-4 h-4"})]),e.createElementVNode("button",{type:"button",onClick:X[1]||(X[1]=le=>{var ae,de;return Pt(((ae=d.value)==null?void 0:ae.filepath)||((de=d.value)==null?void 0:de.file_path)||d.value)}),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[e.createVNode(e.unref(Ja),{class:"w-4 h-4"})])]),e.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:h.value},[e.createTextVNode(e.toDisplayString(h.value)+" ",1),X[13]||(X[13]=e.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,Wv)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"triggerButton",ref:E,class:e.normalizeClass(["relative w-32 h-32 flex items-center justify-center border border-dotted border-gray-300 rounded-lg hover:border-blue-500 hover:bg-blue-500/10 hover:cursor-pointer transition-all",{"border-blue-500 bg-blue-500/10":f.value,"opacity-50 cursor-not-allowed":V.value}]),onClick:z},[V.value?(e.openBlock(),e.createBlock(e.unref(tn),{key:0,class:"w-4 h-4 animate-spin text-blue-500"})):(e.openBlock(),e.createBlock(e.unref(sl),{key:1,class:"w-4 h-4"})),V.value?(e.openBlock(),e.createElementBlock("div",Kv,[e.createElementVNode("div",Yv,[e.createVNode(e.unref(tn),{class:"w-6 h-6 animate-spin text-blue-500"}),e.createElementVNode("span",Xv,e.toDisplayString(j.$t("cms.media.uploading")),1)])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed bg-white z-50 border border-gray-200 rounded-lg shadow-lg flex flex-col items-center justify-center",style:e.normalizeStyle(D.value)},[e.createElementVNode("div",{class:e.normalizeClass(["relative overflow-hidden flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer",{"opacity-50 cursor-not-allowed":V.value}]),onClick:X[3]||(X[3]=le=>!V.value&&T())},[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:_,class:"absolute justify-center bottom-0 left-0 w-full opacity-0",onChange:at,onClick:X[2]||(X[2]=e.withModifiers(()=>{},["stop"])),multiple:c.value,disabled:V.value},null,40,Zv),V.value?(e.openBlock(),e.createBlock(e.unref(tn),{key:0,class:"w-4 h-4 animate-spin"})):(e.openBlock(),e.createBlock(e.unref(Ja),{key:1})),e.createElementVNode("span",Qv,e.toDisplayString(V.value?j.$t("cms.media.uploading"):j.$t("cms.media.upload")),1)],2),e.createElementVNode("div",{onClick:X[4]||(X[4]=le=>y.value=!0),class:"flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer"},[e.createVNode(e.unref(ma)),e.createElementVNode("span",Jv,e.toDisplayString(j.$t("cms.media.selectFromMedia")),1)])],4)):e.createCommentVNode("",!0)]))],2)],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:Re},[e.createElementVNode("div",{class:"bg-white rounded-lg shadow-xl max-w-4xl w-full mx-4 max-h-[90vh] flex flex-col",onClick:X[11]||(X[11]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",eB,[e.createElementVNode("h3",tB,e.toDisplayString(j.$t("cms.media.selectFiles")),1),e.createElementVNode("button",{onClick:Re,class:"text-gray-400 hover:text-gray-600"},[...X[14]||(X[14]=[e.createElementVNode("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),e.createElementVNode("div",lB,[e.createVNode(Ov,{"current-path":g.value,onNavigate:Ye,onNavigateBack:vt},null,8,["current-path"])]),e.createElementVNode("div",aB,[e.createElementVNode("div",nB,[e.createElementVNode("div",rB,[e.createElementVNode("div",oB,[e.createVNode(e.unref(ln),{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-slate-400 dark:text-slate-500"}),e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:j.$t("cms.media.search"),class:"w-full pl-10 pr-4 py-2 text-sm border border-slate-200 dark:border-slate-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-slate-700 text-slate-700 dark:text-slate-200 placeholder-slate-400 dark:placeholder-slate-500","onUpdate:modelValue":X[5]||(X[5]=le=>A.value=le)},null,8,sB),[[e.vModelText,A.value]])]),e.createElementVNode("div",iB,[e.createElementVNode("span",cB,e.toDisplayString(j.$t("cms.media.sortBy.title")+": "),1),e.createElementVNode("button",{ref_key:"sortByButton",ref:M,class:"relative z-[1000] inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border shadow-sm h-8 rounded-md px-3 text-xs bg-white border-slate-300 text-slate-700 disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600",onClick:X[8]||(X[8]=le=>$.value=!$.value)},[e.createVNode(e.unref(Cr),{class:"w-4 h-4"}),e.createElementVNode("span",dB,e.toDisplayString(e.unref(W).get(U.value)),1),$.value?(e.openBlock(),e.createElementBlock("div",uB,[e.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 border-b border-slate-200 dark:border-slate-600 cursor-pointer",onClick:X[6]||(X[6]=e.withModifiers(le=>Ne("name"),["stop"]))},e.toDisplayString(j.$t("cms.media.sortBy.name")),1),e.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 cursor-pointer",onClick:X[7]||(X[7]=e.withModifiers(le=>Ne("filesize"),["stop"]))},e.toDisplayString(j.$t("cms.media.sortBy.filesize")),1)])):e.createCommentVNode("",!0)],512)])]),e.createElementVNode("div",mB,[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":k.value==="grid","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":k.value==="list"}]),onClick:X[9]||(X[9]=le=>k.value="grid")},[e.createVNode(e.unref(qi),{class:"w-4 h-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":k.value==="list","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":k.value==="grid"}]),onClick:X[10]||(X[10]=le=>k.value="list")},[e.createVNode(e.unref(pa),{class:"w-4 h-4"})],2)])])]),e.createElementVNode("div",pB,[k.value==="grid"?(e.openBlock(),e.createBlock(av,{key:0,files:p.value,"selected-file":c.value?null:w.value,"selected-files":c.value?b.value:[],onFileClick:me},null,8,["files","selected-file","selected-files"])):(e.openBlock(),e.createBlock(Av,{key:1,files:p.value,"selected-file":c.value?null:w.value,"selected-files":c.value?b.value:[],onFileClick:me},null,8,["files","selected-file","selected-files"]))]),e.createElementVNode("div",fB,[c.value&&b.value.length>0?(e.openBlock(),e.createElementBlock("div",hB,e.toDisplayString(j.$t("cms.media.selectedFiles",{count:b.value.length})),1)):(e.openBlock(),e.createElementBlock("div",gB)),e.createElementVNode("button",{onClick:Wt,disabled:c.value?b.value.length===0:!w.value,class:"flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2 ml-auto bg-blue-600 hover:bg-blue-700 text-white shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-105"},[e.createVNode(e.unref(sl),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(j.$t("cms.common.actions.add")),1)],8,yB)])])])):e.createCommentVNode("",!0)]))],64))}},bB={};function kB(l,t){const a=e.resolveComponent("vs-richtext-md",!0);return e.openBlock(),e.createBlock(a,{class:"w-full h-[300px]"})}const ki=tl(bB,[["render",kB]]),xB={props:{min:{type:Number},step:{type:Number,default:()=>1},max:{type:Number,default:()=>1/0},modelValue:{type:Number,default:()=>null},label:{type:String,default:()=>""},placeholder:{type:String,default:()=>"0"},disabled:{type:Boolean,default:()=>!1}},data(){return{id:`input-number-${Math.floor(Math.random()*1e3)}`,inputValue:this.modelValue}},watch:{modelValue(l){this.inputValue=l},inputValue(l){this.$emit("update:modelValue",l)}},methods:{validateInput(l){(l.key==="+"||l.key===","||l.key==="."||l.key==="-"&&this.inputValue&&this.inputValue.toString().length>0)&&l.preventDefault()},handleBlur(){let l=parseFloat(this.inputValue);this.$emit("blur"),isNaN(l)?l=this.min:l>this.max?l=this.max:l<this.min&&(l=this.min),this.inputValue=l,this.$emit("update:modelValue",this.inputValue)}}},wB={class:"p-0"},_B=["step","min","max","id","placeholder","disabled"];function EB(l,t,a,n,r,o){return e.openBlock(),e.createElementBlock("div",wB,[e.renderSlot(l.$slots,"label",e.normalizeProps(e.guardReactiveProps({id:r.id}))),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=s=>r.inputValue=s),type:"number",onKeydown:t[1]||(t[1]=(...s)=>o.validateInput&&o.validateInput(...s)),onBlur:t[2]||(t[2]=(...s)=>o.handleBlur&&o.handleBlur(...s)),step:a.step,min:a.min,max:a.max,id:r.id,"aria-describedby":"helper-text-explanation",class:e.normalizeClass(["vs-number__input py-2 px-3 block w-full h-[38px] border border-solid border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-1 focus:outline-none focus:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600",{"cursor-not-allowed":a.disabled}]),placeholder:a.placeholder,disabled:a.disabled},null,42,_B),[[e.vModelText,r.inputValue]])])}const xi=tl(xB,[["render",EB]]),wi={__name:"vs-form-reletion-link",props:e.mergeModels({relation:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=e.useModel(l,"modelValue"),a=l,n=e.ref([]),r=async()=>{const s=await(await fetch(`/api/cms-suggest/${a.relation}`)).json();n.value=s==null?void 0:s.data};return e.onMounted(r),(o,s)=>{var i;return(i=n.value)!=null&&i.length?(e.openBlock(),e.createBlock(e.unref(Fn),{key:0,mode:"combo",modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value=c),options:n.value},null,8,["modelValue","options"])):e.createCommentVNode("",!0)}}},CB={monaco:uE,edit:FC,preview:{__name:"vs-builder-preview",props:{data:{},dataModifiers:{},form:{},formModifiers:{}},emits:["update:data","update:form"],setup(l){$e["vs-input-custom-datatable"]=di,$e["vs-input-reference"]=hr,$e["vs-input-texteditor"]=fr,$e["vs-input-mediaselect"]=Ll,$e["vs-input-file"]=Ll,$e["vs-input-image"]=Ll,$e["vs-input-richtext-md"]=ki,$e["vs-input-integer"]=xi,$e["vs-input-relation-link"]=wi;const t=e.ref({}),a=e.useModel(l,"data"),n=e.useModel(l,"form"),r=e.computed(()=>{var o,s;return((s=(o=a.value)==null?void 0:o.columns)==null?void 0:s.map(pr))||[]});return(o,s)=>{var i;return e.openBlock(),e.createElementBlock("div",{ref_key:"form",ref:n},[((i=r.value)==null?void 0:i.length)>0?(e.openBlock(),e.createBlock(e.unref(Xe),{key:0,modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value=c),schema:r.value},null,8,["modelValue","schema"])):e.createCommentVNode("",!0)],512)}}}},VB={class:"max-w-6xl mx-auto"},NB={class:"flex items-center justify-between mb-6"},vB={class:"mb-2 text-2xl font-semibold text-gray-900"},BB={class:"lowercase"},SB={class:"text-gray-600"},DB={class:"flex items-center gap-2"},AB={class:"w-full"},MB={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 mb-6 bg-white border border-gray-200 rounded-md text-muted-foreground"},TB=["onClick"],LB={key:0,class:"container mx-auto bg-white rounded-md py-4 px-2 bg-opacity-50"},$B={__name:"EditCollectionPage",setup(l){const{t}=Fe(),a=e.inject("cms.fetchContentTypes"),n=e.ref("edit"),r=e.ref({yaml:"",data:{columns:[],type:"collection"}}),o=e.ref({}),s=e.ref(""),i=nt.useRoute(),c=nt.useRouter(),u=e.ref(!1),d=e.computed(()=>[{name:t("cms.builder.edit"),id:"edit"},{name:t("cms.builder.preview"),id:"preview"}]),m=async()=>{var f;try{const k=await(await fetch(`/api/cms-type/${i.params.id}`)).json(),g={...k,columns:Array.isArray(k.columns)?k.columns:(f=Object.entries((k==null?void 0:k.columns)||{}))==null?void 0:f.map(([p,x])=>({...x,name:p}))};r.value={...r.value,data:g},s.value=g.title||g.name}catch(y){console.error(y)}finally{u.value=!0}},h=async()=>{var f,y;try{if(await o.value.validate()){xe({type:"warning",title:t("cms.common.actions.warning"),message:t("cms.builder.editFieldFailed")});return}const g=await fetch(`/api/cms-type/${i.params.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n.value==="monaco"?(f=r.value)==null?void 0:f.yaml:(y=r.value)==null?void 0:y.data)});c.push("/settings/collections"),a(),xe({type:"success",title:t("cms.common.actions.success"),message:t("cms.collections.collectionCreated")})}catch(k){console.error(k),xe({type:"error",title:t("cms.common.actions.error"),message:t("cms.collections.collectionCreationFailed")})}};return e.onMounted(()=>{m()}),(f,y)=>{const k=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",VB,[e.createElementVNode("div",NB,[e.createElementVNode("div",null,[e.createElementVNode("h1",vB,[e.createTextVNode(e.toDisplayString(f.$t("cms.builder.editCollection"))+" ",1),e.createElementVNode("span",BB,e.toDisplayString(s.value),1)]),e.createElementVNode("p",SB,e.toDisplayString(f.$t("cms.builder.editContentForYourSite")),1)]),e.createElementVNode("div",DB,[e.createVNode(k,{to:"/settings/collections",class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border bg-background hover:text-accent-foreground h-10 px-4 py-2 border-gray-300 text-gray-700 hover:bg-gray-50"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.$t("cms.common.actions.back")),1)]),_:1}),e.createElementVNode("button",{onClick:h,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-white rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-primary-foreground h-10 px-4 py-2 bg-blue-600 hover:bg-blue-700"},e.toDisplayString(f.$t("cms.common.actions.save")),1)])]),e.createElementVNode("div",AB,[e.createElementVNode("div",MB,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,g=>(e.openBlock(),e.createElementBlock("button",{key:g.id,onClick:p=>n.value=g.id,class:e.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",g.id===n.value?"bg-blue-50 text-blue-700 border-blue-200":""])},e.toDisplayString(g.name),11,TB))),128))])]),u.value?(e.openBlock(),e.createElementBlock("div",LB,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(CB)[n.value]),{yaml:r.value.yaml,"onUpdate:yaml":y[0]||(y[0]=g=>r.value.yaml=g),data:r.value.data,"onUpdate:data":y[1]||(y[1]=g=>r.value.data=g),form:o.value,"onUpdate:form":y[2]||(y[2]=g=>o.value=g)},null,40,["yaml","data","form"]))])):e.createCommentVNode("",!0)])}}},FB=[{key:"title",label:"common.title",localization:!0,type:"text"},{key:"description",label:"common.description",localization:!0,type:"text"},{key:"keywords",label:"common.keywords",localization:!0,type:"text"},{key:"meta",label:"common.meta",type:"key-value",ignore:["title","description","keywords"]}],IB={__name:"VsFormTags",props:{modelValue:{default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(l,{expose:t}){const{t:a}=Fe(),n=e.useModel(l,"modelValue"),r=e.ref({}),o=e.ref(!1);e.provide("metaParentValue",n);const s=m=>Array.isArray(m)?m.map(h=>typeof h=="object"&&h!==null&&h.id?h.id:h):[],i=async m=>{if(!Array.isArray(m)||m.length===0)return[];try{const f=await(await fetch("/api/tags")).json(),y=(f==null?void 0:f.rows)||[];return m.map(k=>{const g=y.find(p=>p.tag_id===k);return g?{id:g.tag_id,text:g.value,color:g.color}:{id:k,text:"",color:"#ababab"}})}catch(h){return console.error("Error fetching tags:",h),m.map(f=>({id:f,text:"",color:"#ababab"}))}};e.onMounted(async()=>{await e.nextTick(),await e.nextTick(),setTimeout(()=>{var m;if(Array.isArray((m=n.value)==null?void 0:m.tag_list)){const h=s(n.value.tag_list);JSON.stringify(h)!==JSON.stringify(n.value.tag_list)&&(n.value.tag_list=h)}},100)}),e.watch(()=>n.value.tag_list,m=>{if(Array.isArray(m)&&!o.value){const h=s(m);JSON.stringify(h)!==JSON.stringify(m)&&(n.value.tag_list=h)}},{deep:!0}),e.watch(()=>n.value,m=>{if(m&&Array.isArray(m.tag_list)&&!o.value){const h=s(m.tag_list);JSON.stringify(h)!==JSON.stringify(m.tag_list)&&(m.tag_list=h)}},{deep:!0,immediate:!0}),e.watch(()=>{var m;return(m=n.value)==null?void 0:m.tag_list},m=>{Array.isArray(m)&&r.value&&e.nextTick(()=>{r.value&&r.value.setValue&&r.value.setValue("tag_list",m)})},{deep:!0});const c=async m=>{if(m.tag_list&&(m.tag_list=s(m.tag_list),n.value.tag_list=m.tag_list),await r.value.validate()){xe({type:"warning",title:a("cms.common.actions.warning"),message:a("cms.builder.editFieldFailed")});return}};t({restoreTagsBeforeSubmit:async()=>{var m;if(o.value=!0,Array.isArray((m=n.value)==null?void 0:m.tag_list)){console.log("Before restore:",n.value.tag_list);const h=await i(n.value.tag_list);console.log("After restore:",h),n.value.tag_list=h}setTimeout(()=>{o.value=!1},2e3)}});const d=e.computed(()=>{var m;return[{key:"tag_list",type:"select",multiple:!0,searchable:!1,placeholder:a("cms.builder.tags"),data:"tag_id",value:((m=n.value)==null?void 0:m.tag_list)||[]}]});return(m,h)=>n.value?(e.openBlock(),e.createBlock(e.unref(Xe),{key:0,schema:d.value,modelValue:n.value,"onUpdate:modelValue":[h[0]||(h[0]=f=>n.value=f),c]},null,8,["schema","modelValue"])):e.createCommentVNode("",!0)}},OB={class:"flex justify-end mb-4"},PB=["href"],RB=["src"],jB=["src"],UB={key:2,class:"w-full h-[80vh] flex items-center justify-center text-gray-500"},zB={__name:"VsPreview",props:{preview_path:{type:String,default:""},slug:{type:String,default:""}},setup(l){const t=e.ref(""),a=e.ref(""),n=async()=>{var o,s;try{const c=await(await fetch("/api/settings")).json();t.value=((s=(o=c==null?void 0:c.settings)==null?void 0:o.site_info)==null?void 0:s.previewUrl)||"http://ip.local.softpro.ua"}catch(i){console.error("Failed to fetch settings:",i),t.value="http://ip.local.softpro.ua"}},r=async()=>{var o;try{const i=await(await fetch("/user")).json();a.value=(o=i==null?void 0:i.user)==null?void 0:o.draftKey}catch(s){console.error("Failed to fetch user:",s)}};return e.onMounted(()=>{n(),r()}),(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",OB,[e.createElementVNode("a",{href:`${t.value}/uk/${l.preview_path}${l.slug}${a.value?`?draftKey=${a.value}`:""}`,target:"_blank",class:"inline-flex items-center gap-2 px-3 py-1.5 text-black-600 bg-white border border-blue-200 rounded hover:border-blue-300 hover:bg-blue-50 transition-colors duration-200 font-normal cursor-pointer"},[s[0]||(s[0]=e.createTextVNode(" Переглянути на сайті ",-1)),e.createVNode(e.unref(zi),{class:"w-4 h-4"})],8,PB)]),t.value&&l.preview_path?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:`${t.value}/uk/${l.preview_path}${l.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,RB)):t.value?(e.openBlock(),e.createElementBlock("iframe",{key:1,src:`${t.value}/uk/${l.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,jB)):(e.openBlock(),e.createElementBlock("div",UB," Loading preview... "))]))}},HB={class:"space-y-6 max-w-6xl mx-auto relative bg-white"},qB={class:"p-4 sticky top-[-24px] z-10 bg-white dark:bg-slate-800"},GB={class:"flex items-center justify-between"},WB={class:"flex items-center gap-4"},KB={class:"text-2xl font-semibold text-gray-900 dark:text-white"},YB=["href","title"],XB={class:"flex items-center space-x-3"},ZB={class:"w-full mt-6 flex items-center justify-between"},QB={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 bg-white border border-gray-200 rounded-md text-muted-foreground"},JB=["onClick"],e4={class:"flex items-center gap-2"},t4={for:"is_pin",class:"text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer"},l4={class:"relative"},a4={key:0,class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},n4={class:"container mx-auto bg-white rounded-md pb-4 px-5"},r4={class:"container mx-auto bg-white rounded-md pb-4 px-2"},o4={key:0,class:"container mx-auto bg-white rounded-md pb-4 px-2"},s4={class:"container mx-auto bg-white rounded-md pb-4 px-2"},_i=e.defineComponent({__name:"contentForm",setup(l){$e["vs-input-custom-datatable"]=di,$e["vs-input-reference"]=hr,$e["vs-input-texteditor"]=fr,$e["vs-input-mediaselect"]=Ll,$e["vs-input-file"]=Ll,$e["vs-input-image"]=Ll,$e["vs-input-richtext-md"]=ki,$e["vs-input-integer"]=xi,$e["vs-input-relation-link"]=wi;const{t,locale:a}=Fe(),n=nt.useRouter(),r=nt.useRoute(),o=e.inject("menu",e.ref([])),s=e.ref([]),i=e.ref({}),c=e.ref({}),u=e.ref({}),d=e.ref(""),m=D=>{const A=[];return D.forEach($=>{if(A.push($),$.localization){const U={...$,name:$.name+":en",label:$.label+" (en)"};A.push(U)}}),A},h=e.computed(()=>{var D;return(D=s.value)==null?void 0:D.map(pr)}),f=e.computed(()=>(a.value,FB.flatMap(D=>{const A={...D,label:t(D.label)};if(D.localization){const $={...D,key:`${D.key}:en`,label:t(D.label)+" (en)"};return[A,$]}return[A]}))),y=e.ref({}),k=e.ref({title:"",status:"draft"}),g=e.computed(()=>{const D=[{id:"content",name:t("cms.builder.content")},{id:"seo",name:t("cms.builder.seo")},{id:"tags",name:t("cms.builder.tags")}];return d.value&&D.push({id:"preview",name:t("cms.builder.preview")}),D}),p=e.ref("content"),x=e.computed(()=>{var A,$,U,W;const D=((A=r.params)==null?void 0:A.collection)||(($=r.params)==null?void 0:$.id);return((W=(U=o.value)==null?void 0:U.find(O=>O.id===D))==null?void 0:W.title)||D}),w=e.computed(()=>{var D,A;return((D=k.value)==null?void 0:D.title)||((A=r.params)!=null&&A.id?t("cms.builder.editCollection"):t("cms.articles.createArticle"))}),b=e.computed(()=>{var U,W,O;const D=((U=r.params)==null?void 0:U.collection)||((W=r.params)==null?void 0:W.id),A=(O=r.params)==null?void 0:O.id,$=[{label:x.value,route:`collections/${D}`}];return A?$.push({label:w.value,route:`collections/${D}/${A}`}):$.push({label:t("cms.articles.createArticle"),route:`collections/${D}/create`}),$}),_=D=>{D==="collections"?n.push("/collections"):n.push(`/${D}`)};e.onMounted(async()=>{var W,O,I;const D=(W=r.params)==null?void 0:W.collection,A=(O=r.params)==null?void 0:O.id,$=D||A,U=D&&A?A:void 0;if(!U){if(!$)return;const T=await(await fetch(`/api/cms/${$}/`)).json();s.value=m(T.columns)}try{if(!U||!$)return;const F=await fetch(`/api/cms/${$}/${U}`);if(!F.ok)throw new Error("Failed to fetch article");const T=await F.json();if(s.value=m(T==null?void 0:T.columns),T!=null&&T.preview_path&&(d.value=T==null?void 0:T.preview_path),T.rows){let z=T.rows;Array.isArray(z)||(z=[z]),k.value=z[0],await e.nextTick(),(I=z[0])!=null&&I.meta?y.value={...z[0].meta}:y.value={title:"",description:"",keywords:"",meta:{}},console.log("Initialized seoData from rows[0]:",y.value)}else k.value=T,await e.nextTick(),T!=null&&T.meta?(y.value={title:T.meta.title||"",description:T.meta.description||"",keywords:T.meta.keywords||"",meta:{...T.meta}},delete y.value.meta.title,delete y.value.meta.description,delete y.value.meta.keywords):y.value={title:"",description:"",keywords:"",meta:{}},console.log("Initialized seoData from data:",y.value)}catch(F){console.error("Error fetching article:",F)}});const V=e.computed({get:()=>{var D;return((D=k.value)==null?void 0:D.is_pin)||!1},set:D=>{k.value&&(k.value.is_pin=D)}}),E=()=>{k.value&&(k.value.is_pin=!k.value.is_pin)};e.watch(y,D=>{console.log("seoData changed:",D)},{deep:!0});const M=async D=>{var I,F,T,z;const A=(I=r.params)==null?void 0:I.collection,$=(F=r.params)==null?void 0:F.id,U=await i.value.validate();if(U){xe({title:t("cms.validation"),message:JSON.stringify(U),type:"warning"});return}(T=u.value)!=null&&T.restoreTagsBeforeSubmit&&await u.value.restoreTagsBeforeSubmit();const W=y.value||{},O={...k.value,meta:{...W,...W.meta||{}}};console.log("Payload before submit:",O);try{const Q=await fetch(`/api/cms/${A}/${$||""}`,{method:$?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)});if(!Q.ok){let me;try{const Ne=await Q.json();me=JSON.stringify(Ne,null,2)}catch{me=await Q.text()}throw new Error(`HTTP ${Q.status}: ${me}`)}if(!$)try{const me=await Q.json(),Ne=me.id||((z=me.data)==null?void 0:z.id);Ne&&r.name==="createArticle"&&await n.push(`/collections/${A}/${Ne}`)}catch(me){console.warn("Could not parse response to get ID:",me)}xe({title:t("cms.common.success"),message:t("cms.common.successMessage"),type:"success"})}catch(Q){console.error("Submit error:",Q),xe({title:t("cms.common.error"),message:"Помилка збереження",type:"error"})}};return(D,A)=>{var $,U,W,O,I,F,T;return e.openBlock(),e.createElementBlock("div",HB,[e.createElementVNode("div",qB,[e.createVNode(Ns,{items:b.value,onNavigate:_},null,8,["items"]),e.createElementVNode("div",GB,[e.createElementVNode("div",WB,[e.createElementVNode("button",{onClick:A[0]||(A[0]=z=>e.unref(n).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[e.createVNode(e.unref(Ri),{class:"w-5 h-5"})]),e.createElementVNode("h1",KB,[e.createTextVNode(e.toDisplayString(D.$t("cms.builder.editCollection"))+" ",1),e.createElementVNode("span",null,'"'+e.toDisplayString((($=k.value)==null?void 0:$.type)==="single"?k.value.title:(W=(U=e.unref(o).value)==null?void 0:U.find(z=>z.id===(e.unref(r).params.collection||e.unref(r).params.id)))==null?void 0:W.title)+'"',1)]),e.createElementVNode("a",{href:`https://cms.opengis.info/${e.unref(a)}/guides/content/`,target:"_blank",title:D.$t("cms.guide.content")},[e.createVNode(e.unref(xl),{class:"w-5 h-5"})],8,YB)]),e.createElementVNode("div",XB,[e.createElementVNode("button",{onClick:M,type:"submit",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[e.createVNode(e.unref(Wi),{class:"w-4 h-4 mr-2"}),e.createTextVNode(" "+e.toDisplayString(D.$t("cms.builder.save")),1)])])]),e.createElementVNode("div",ZB,[e.createElementVNode("div",QB,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,z=>(e.openBlock(),e.createElementBlock("button",{key:z.id,onClick:Q=>p.value=z.id,class:e.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",z.id===p.value?"bg-blue-50 text-blue-700 border-blue-200":""])},e.toDisplayString(z.name),11,JB))),128))]),e.createElementVNode("div",e4,[e.createElementVNode("label",t4,e.toDisplayString(D.$t("cms.collections.pinPublication")),1),e.createElementVNode("div",l4,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",id:"is_pin","onUpdate:modelValue":A[1]||(A[1]=z=>V.value=z),class:"sr-only"},null,512),[[e.vModelCheckbox,V.value]]),e.createElementVNode("div",{class:e.normalizeClass(["w-5 h-5 border-2 rounded transition-all duration-200 cursor-pointer flex items-center justify-center",(O=k.value)!=null&&O.is_pin?"bg-sky-600 border-sky-600":"bg-white border-gray-300 hover:border-sky-400 dark:bg-gray-700 dark:border-gray-600 dark:hover:border-sky-400"]),onClick:E},[(I=k.value)!=null&&I.is_pin?(e.openBlock(),e.createElementBlock("svg",a4,[...A[7]||(A[7]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)])])):e.createCommentVNode("",!0)],2)])])])]),e.withDirectives(e.createElementVNode("div",n4,[(F=s.value)!=null&&F.length?(e.openBlock(),e.createBlock(e.unref(Xe),{key:0,modelValue:k.value,"onUpdate:modelValue":A[2]||(A[2]=z=>k.value=z),schema:h.value,form:i.value,"onUpdate:form":A[3]||(A[3]=z=>i.value=z)},null,8,["modelValue","schema","form"])):e.createCommentVNode("",!0)],512),[[e.vShow,p.value==="content"]]),e.withDirectives(e.createElementVNode("div",r4,[e.createVNode(e.unref(Xe),{schema:f.value,values:y.value,"onUpdate:values":A[4]||(A[4]=z=>y.value=z),form:c.value,"onUpdate:form":A[5]||(A[5]=z=>c.value=z)},null,8,["schema","values","form"])],512),[[e.vShow,p.value==="seo"]]),p.value==="tags"?(e.openBlock(),e.createElementBlock("div",o4,[e.createVNode(IB,{ref_key:"tagsForm",ref:u,modelValue:k.value,"onUpdate:modelValue":A[6]||(A[6]=z=>k.value=z)},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",s4,[e.createVNode(zB,{slug:(T=k.value)==null?void 0:T.slug,preview_path:d.value},null,8,["slug","preview_path"])],512),[[e.vShow,p.value==="preview"]])])}}}),i4=(l,t)=>{const a=l==null?void 0:l.trim();return a?t?t==="create"?{type:"createArticle",collection:a}:{type:"editArticle",collection:a,id:t}:{type:"articles",collection:a}:{type:"collections"}},c4={key:1,class:"p-4 text-sm text-slate-600 dark:text-slate-300"},d4=e.defineComponent({__name:"CmsContentWrapper",setup(l){const t=nt.useRoute(),a=e.getCurrentInstance();if(!a)throw new Error("CmsContentWrapper must be used within a component instance");const n=e.computed(()=>{const y=a.appContext.config.globalProperties.$route;if(!y)throw new Error("Vue Router is not registered on the app instance");return y}),r=e.computed(()=>t??n.value),o=e.computed(()=>{var y;return((y=r.value)==null?void 0:y.params)??{}}),s=e.computed(()=>{var y,k;return((y=o.value)==null?void 0:y.collection)??((k=o.value)==null?void 0:k.type)}),i=e.computed(()=>{var y;return(y=o.value)==null?void 0:y.id}),c=e.computed(()=>i4(s.value,i.value)),u={collections:Ln,articles:vs,createArticle:_i,editArticle:_i},d=e.computed(()=>u[c.value.type]??Ln),m=e.computed(()=>`${c.value.type}-${c.value.collection??""}-${c.value.id??""}`),h=e.computed(()=>{const{type:y,collection:k,id:g}=c.value,p={...o.value};return s.value?p.collection=s.value:delete p.collection,y==="articles"?p.id=k:y==="createArticle"?delete p.id:y==="editArticle"&&g?p.id=g:delete p.id,p}),f=new Proxy({},{get(y,k,g){const p=r.value;if(!p)return;if(k==="params")return h.value;const x=Reflect.get(p,k,g);return typeof x=="function"?x.bind(p):x},has(y,k){if(k==="params")return!0;const g=r.value;return g?Reflect.has(g,k):!1},ownKeys(){const y=r.value;return y?Reflect.ownKeys(y):["params"]},getOwnPropertyDescriptor(y,k){if(k==="params")return{configurable:!0,enumerable:!0,value:h.value};const g=r.value;if(!g)return;const p=Reflect.getOwnPropertyDescriptor(g,k);if(p)return{...p,configurable:!0}}});return e.provide(nt.routeLocationKey,f),(y,k)=>d.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),{key:m.value})):(e.openBlock(),e.createElementBlock("div",c4,e.toDisplayString(y.$t("cms.navigation.collections")),1))}}),u4=(l,t)=>{const a=l[t];return a?typeof a=="function"?a():Promise.resolve(a):new Promise((n,r)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(r.bind(null,new Error("Unknown variable dynamic import: "+t)))})},m4=localStorage.locale||navigator.language.split("cms.-")[0]||"uk",$l=yu({legacy:!1,locale:m4,fallbackLocale:"en",datetimeFormats:{en:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}},uk:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}}},numberFormats:{en:{currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}},uk:{currency:{style:"currency",currency:"UAH"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}}},messages:{}}),gr="en";async function Ei(l){return(await u4(Object.assign({"./locales/en.json":()=>Promise.resolve().then(()=>_4),"./locales/uk.json":()=>Promise.resolve().then(()=>E4)}),`./locales/${l}.json`)).default}async function yr(l){try{const t=await Ei(l);return $l.global.setLocaleMessage(l,t),t}catch(t){if(console.error(`Failed to load locale ${l}:`,t),l!==gr)try{const a=await Ei(gr);return $l.global.setLocaleMessage(l,a),a}catch(a){throw console.error(`Failed to load fallback locale ${gr}:`,a),a}throw t}}async function p4(l){await yr(l),$l.global.locale.value=l,localStorage.setItem("locale",l),document.documentElement.lang=l,window.dispatchEvent(new CustomEvent("cms.storage",{detail:{key:"locale",oldValue:null,newValue:l}}))}async function f4(){const l=$l.global.locale.value;await yr(l),$l.global.locale.value=l,localStorage.setItem("locale",l),document.documentElement.lang=l}async function h4(l){return await yr(l)}function g4(l){l.component("Dashboard",Tn)}function rl(l){return typeof l=="string"||l instanceof String}function Ci(l){var t;return typeof l=="object"&&l!=null&&(l==null||(t=l.constructor)==null?void 0:t.name)==="Object"}function Vi(l,t){return Array.isArray(t)?Vi(l,(a,n)=>t.includes(n)):Object.entries(l).reduce((a,n)=>{let[r,o]=n;return t(o,r)&&(a[r]=o),a},{})}const re={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Ni(l){switch(l){case re.LEFT:return re.FORCE_LEFT;case re.RIGHT:return re.FORCE_RIGHT;default:return l}}function br(l){return l.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ya(l,t){if(t===l)return!0;const a=Array.isArray(t),n=Array.isArray(l);let r;if(a&&n){if(t.length!=l.length)return!1;for(r=0;r<t.length;r++)if(!Ya(t[r],l[r]))return!1;return!0}if(a!=n)return!1;if(t&&l&&typeof t=="object"&&typeof l=="object"){const o=t instanceof Date,s=l instanceof Date;if(o&&s)return t.getTime()==l.getTime();if(o!=s)return!1;const i=t instanceof RegExp,c=l instanceof RegExp;if(i&&c)return t.toString()==l.toString();if(i!=c)return!1;const u=Object.keys(t);for(r=0;r<u.length;r++)if(!Object.prototype.hasOwnProperty.call(l,u[r]))return!1;for(r=0;r<u.length;r++)if(!Ya(l[u[r]],t[u[r]]))return!1;return!0}else if(t&&l&&typeof t=="function"&&typeof l=="function")return t.toString()===l.toString();return!1}class y4{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?re.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?re.RIGHT:re.LEFT}}function ue(l,t){return new ue.InputMask(l,t)}function vi(l){if(l==null)throw new Error("mask property should be defined");return l instanceof RegExp?ue.MaskedRegExp:rl(l)?ue.MaskedPattern:l===Date?ue.MaskedDate:l===Number?ue.MaskedNumber:Array.isArray(l)||l===Array?ue.MaskedDynamic:ue.Masked&&l.prototype instanceof ue.Masked?l:ue.Masked&&l instanceof ue.Masked?l.constructor:l instanceof Function?ue.MaskedFunction:(console.warn("Mask not found for mask",l),ue.Masked)}function Fl(l){if(!l)throw new Error("Options in not defined");if(ue.Masked){if(l.prototype instanceof ue.Masked)return{mask:l};const{mask:t=void 0,...a}=l instanceof ue.Masked?{mask:l}:Ci(l)&&l.mask instanceof ue.Masked?l:{};if(t){const n=t.mask;return{...Vi(t,(r,o)=>!o.startsWith("_")),mask:t.constructor,_mask:n,...a}}}return Ci(l)?{...l}:{mask:l}}function Ft(l){if(ue.Masked&&l instanceof ue.Masked)return l;const t=Fl(l),a=vi(t.mask);if(!a)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===a&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new a(t)}ue.createMask=Ft;class Xa{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,a){if(!(t==null||a==null||t===this.selectionStart&&a===this.selectionEnd))try{this._unsafeSelect(t,a)}catch{}}get isActive(){return!1}}ue.MaskElement=Xa;const Bi=90,b4=89;class na extends Xa{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,a,n;return(t=(a=(n=this.input).getRootNode)==null?void 0:a.call(n))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===Bi&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===b4&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===Bi&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}ue.HTMLMaskElement=na;class Si extends na{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,a){this.input.setSelectionRange(t,a)}get value(){return this.input.value}set value(t){this.input.value=t}}ue.HTMLMaskElement=na;class kr extends na{get _unsafeSelectionStart(){const t=this.rootElement,a=t.getSelection&&t.getSelection(),n=a&&a.anchorOffset,r=a&&a.focusOffset;return r==null||n==null||n<r?n:r}get _unsafeSelectionEnd(){const t=this.rootElement,a=t.getSelection&&t.getSelection(),n=a&&a.anchorOffset,r=a&&a.focusOffset;return r==null||n==null||n>r?n:r}_unsafeSelect(t,a){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,t),n.setEnd(this.input.lastChild||this.input,a);const r=this.rootElement,o=r.getSelection&&r.getSelection();o&&(o.removeAllRanges(),o.addRange(n))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}ue.HTMLContenteditableMaskElement=kr;class Za{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>Za.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Za.MAX_LENGTH=100;class Di{constructor(t,a){this.el=t instanceof Xa?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new kr(t):new Si(t),this.masked=Ft(a),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Za,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var a;return t==null||((a=this.masked)==null?void 0:a.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof ue.Masked)&&this.masked.constructor===vi(t)){this.masked.updateOptions({mask:t});return}const a=t instanceof ue.Masked?t:Ft({mask:t});a.unmaskedValue=this.masked.unmaskedValue,this.masked=a}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,a){const n=this._listeners[t];n&&n.forEach(r=>r(a))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const a=this.masked.unmaskedValue,n=this.masked.value,r=this.masked.rawInputValue,o=this.displayValue,s=this.unmaskedValue!==a||this.value!==n||this._rawInputValue!==r;this._unmaskedValue=a,this._value=n,this._rawInputValue=r,this.el.value!==o&&(this.el.value=o),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),s&&this._fireChangeEvents(),!this._historyChanging&&(s||this.history.isEmpty)&&this.history.push({unmaskedValue:a,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:a,...n}=t,r=!this.maskEquals(a),o=this.masked.optionsIsChanged(n);r&&(this.mask=a),o&&this.masked.updateOptions(n),(r||o)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,re.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,a){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(a),this}off(t,a){if(!this._listeners[t])return this;if(!a)return delete this._listeners[t],this;const n=this._listeners[t].indexOf(a);return n>=0&&this._listeners[t].splice(n,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const a=new y4({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,r=this.masked.splice(a.startChangePos,a.removed.length,a.inserted,a.removeDirection,{input:!0,raw:!0}).offset,o=n===this.masked.rawInputValue?a.removeDirection:re.NONE;let s=this.masked.nearestInputPos(a.startChangePos+r,o);o!==re.NONE&&(s=this.masked.nearestInputPos(s,re.NONE)),this.updateControl(s),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}ue.InputMask=Di;class fe{static normalize(t){return Array.isArray(t)?t:[t,new fe]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}ue.ChangeDetails=fe;class It{constructor(t,a,n){t===void 0&&(t=""),a===void 0&&(a=0),this.value=t,this.from=a,this.stop=n}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const a=this.value[0];return this.value=this.value.slice(1),a}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class Je{constructor(t){this._value="",this._update({...Je.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,a){a===void 0&&(a={input:!0}),this.reset(),this.append(t,a,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,a){return t}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),Math.min(this.displayValue.length,a-t)}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),this.displayValue.slice(t,a)}extractTail(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),new It(this.extractInput(t,a),t)}appendTail(t){return rl(t)&&(t=new It(String(t))),t.appendTo(this)}_appendCharRaw(t,a){return t?(this._value+=t,new fe({inserted:t,rawInserted:t})):new fe}_appendChar(t,a,n){a===void 0&&(a={});const r=this.state;let o;if([t,o]=this.doPrepareChar(t,a),t&&(o=o.aggregate(this._appendCharRaw(t,a)),!o.rawInserted&&this.autofix==="pad")){const s=this.state;this.state=r;let i=this.pad(a);const c=this._appendCharRaw(t,a);i=i.aggregate(c),c.rawInserted||i.equals(o)?o=i:this.state=s}if(o.inserted){let s,i=this.doValidate(a)!==!1;if(i&&n!=null){const c=this.state;if(this.overwrite===!0){s=n.state;for(let d=0;d<o.rawInserted.length;++d)n.unshift(this.displayValue.length-o.tailShift)}let u=this.appendTail(n);if(i=u.rawInserted.length===n.toString().length,!(i&&u.inserted)&&this.overwrite==="shift"){this.state=c,s=n.state;for(let d=0;d<o.rawInserted.length;++d)n.shift();u=this.appendTail(n),i=u.rawInserted.length===n.toString().length}i&&u.inserted&&(this.state=c)}i||(o=new fe,this.state=r,n&&s&&(n.state=s))}return o}_appendPlaceholder(){return new fe}_appendEager(){return new fe}append(t,a,n){if(!rl(t))throw new Error("value should be string");const r=rl(n)?new It(String(n)):n;a!=null&&a.tail&&(a._beforeTailState=this.state);let o;[t,o]=this.doPrepare(t,a);for(let s=0;s<t.length;++s){const i=this._appendChar(t[s],a,r);if(!i.rawInserted&&!this.doSkipInvalid(t[s],a,r))break;o.aggregate(i)}return(this.eager===!0||this.eager==="append")&&a!=null&&a.input&&t&&o.aggregate(this._appendEager()),r!=null&&(o.tailShift+=this.appendTail(r).tailShift),o}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(a),new fe}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const a=this.rawInputValue,n=this.value,r=t();return this.rawInputValue=a,this.value&&this.value!==n&&n.indexOf(this.value)===0&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const a=this.state,n=t(this);return this.state=a,delete this._isolated,n}doSkipInvalid(t,a,n){return!!this.skipInvalid}doPrepare(t,a){return a===void 0&&(a={}),fe.normalize(this.prepare?this.prepare(t,this,a):t)}doPrepareChar(t,a){return a===void 0&&(a={}),fe.normalize(this.prepareChar?this.prepareChar(t,this,a):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,a,n,r,o){n===void 0&&(n=""),r===void 0&&(r=re.NONE),o===void 0&&(o={input:!0});const s=t+a,i=this.extractTail(s),c=this.eager===!0||this.eager==="remove";let u;c&&(r=Ni(r),u=this.extractInput(0,s,{raw:!0}));let d=t;const m=new fe;if(r!==re.NONE&&(d=this.nearestInputPos(t,a>1&&t!==0&&!c?re.NONE:r),m.tailShift=d-t),m.aggregate(this.remove(d)),c&&r!==re.NONE&&u===this.rawInputValue)if(r===re.FORCE_LEFT){let h;for(;u===this.rawInputValue&&(h=this.displayValue.length);)m.aggregate(new fe({tailShift:-1})).aggregate(this.remove(h-1))}else r===re.FORCE_RIGHT&&i.unshift();return m.aggregate(this.append(n,o,i))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!Ya(this,t)}typedValueEquals(t){const a=this.typedValue;return t===a||Je.EMPTY_VALUES.includes(t)&&Je.EMPTY_VALUES.includes(a)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new fe}}Je.DEFAULTS={skipInvalid:!0},Je.EMPTY_VALUES=[void 0,null,""],ue.Masked=Je;class ol{constructor(t,a){t===void 0&&(t=[]),a===void 0&&(a=0),this.chunks=t,this.from=a}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=rl(t)?new It(String(t)):t;const a=this.chunks[this.chunks.length-1],n=a&&(a.stop===t.stop||t.stop==null)&&t.from===a.from+a.toString().length;if(t instanceof It)n?a.extend(t.toString()):this.chunks.push(t);else if(t instanceof ol){if(t.stop==null){let r;for(;t.chunks.length&&t.chunks[0].stop==null;)r=t.chunks.shift(),r.from+=t.from,this.extend(r)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof ue.MaskedPattern))return new It(this.toString()).appendTo(t);const a=new fe;for(let n=0;n<this.chunks.length;++n){const r=this.chunks[n],o=t._mapPosToBlock(t.displayValue.length),s=r.stop;let i;if(s!=null&&(!o||o.index<=s)&&((r instanceof ol||t._stops.indexOf(s)>=0)&&a.aggregate(t._appendPlaceholder(s)),i=r instanceof ol&&t._blocks[s]),i){const c=i.appendTail(r);a.aggregate(c);const u=r.toString().slice(c.rawInserted.length);u&&a.aggregate(t.append(u,{tail:!0}))}else a.aggregate(t.append(r.toString(),{tail:!0}))}return a}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:a,...n}=t;Object.assign(this,n),this.chunks=a.map(r=>{const o="chunks"in r?new ol:new It;return o.state=r,o})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const a=t!=null?t-this.from:t;let n=0;for(;n<this.chunks.length;){const r=this.chunks[n],o=r.unshift(a);if(r.toString()){if(!o)break;++n}else this.chunks.splice(n,1);if(o)return o}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const a=this.chunks[t],n=a.shift();if(a.toString()){if(!n)break;--t}else this.chunks.splice(t,1);if(n)return n}return""}}class k4{constructor(t,a){this.masked=t,this._log=[];const{offset:n,index:r}=t._mapPosToBlock(a)||(a<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((a=this.block)==null?void 0:a.displayValue.length)||0){var a;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,re.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,re.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,re.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,re.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,re.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,re.NONE),!0})}}class xr{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(a),this._value||(this._isRawInput=!1),new fe}nearestInputPos(t,a){a===void 0&&(a=re.NONE);const n=0,r=this._value.length;switch(a){case re.LEFT:case re.FORCE_LEFT:return n;case re.NONE:case re.RIGHT:case re.FORCE_RIGHT:default:return r}}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),this._isRawInput?a-t:0}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),n===void 0&&(n={}),n.raw&&this._isRawInput&&this._value.slice(t,a)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,a){if(a===void 0&&(a={}),this.isFilled)return new fe;const n=this.eager===!0||this.eager==="append",r=this.char===t&&(this.isUnmasking||a.input||a.raw)&&(!a.raw||!n)&&!a.tail,o=new fe({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(a.raw||a.input),o}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new fe;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new It("")}appendTail(t){return rl(t)&&(t=new It(String(t))),t.appendTo(this)}append(t,a,n){const r=this._appendChar(t[0],a);return n!=null&&(r.tailShift+=this.appendTail(n).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}}class ra{constructor(t){const{parent:a,isOptional:n,placeholderChar:r,displayChar:o,lazy:s,eager:i,...c}=t;this.masked=Ft(c),Object.assign(this,{parent:a,isOptional:n,placeholderChar:r,displayChar:o,lazy:s,eager:i})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),t===0&&a>=1?(this.isFilled=!1,this.masked.remove(t,a)):new fe}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,a){if(a===void 0&&(a={}),this.isFilled)return new fe;const n=this.masked.state;let r=this.masked._appendChar(t,this.currentMaskFlags(a));return r.inserted&&this.doValidate(a)===!1&&(r=new fe,this.masked.state=n),!r.inserted&&!this.isOptional&&!this.lazy&&!a.input&&(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=!!r.inserted,r}append(t,a,n){return this.masked.append(t,this.currentMaskFlags(a),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new fe:(this.isFilled=!0,new fe({inserted:this.placeholderChar}))}_appendEager(){return new fe}extractTail(t,a){return this.masked.extractTail(t,a)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),this.masked.extractInput(t,a,n)}nearestInputPos(t,a){a===void 0&&(a=re.NONE);const n=0,r=this.value.length,o=Math.min(Math.max(t,n),r);switch(a){case re.LEFT:case re.FORCE_LEFT:return this.isComplete?o:n;case re.RIGHT:case re.FORCE_RIGHT:return this.isComplete?o:r;case re.NONE:default:return o}}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),this.value.slice(t,a).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var a;return{...t,_beforeTailState:(t==null||(a=t._beforeTailState)==null?void 0:a.masked)||(t==null?void 0:t._beforeTailState)}}pad(t){return new fe}}ra.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Ai extends Je{updateOptions(t){super.updateOptions(t)}_update(t){const a=t.mask;a&&(t.validate=n=>n.search(a)>=0),super._update(t)}}ue.MaskedRegExp=Ai;class et extends Je{constructor(t){super({...et.DEFAULTS,...t,definitions:Object.assign({},ra.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const a=this.mask;if(!a||!t)return;let n=!1,r=!1;for(let o=0;o<a.length;++o){if(this.blocks){const u=a.slice(o),d=Object.keys(this.blocks).filter(h=>u.indexOf(h)===0);d.sort((h,f)=>f.length-h.length);const m=d[0];if(m){const{expose:h,repeat:f,...y}=Fl(this.blocks[m]),k={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...y,repeat:f,parent:this},g=f!=null?new ue.RepeatBlock(k):Ft(k);g&&(this._blocks.push(g),h&&(this.exposeBlock=g),this._maskedBlocks[m]||(this._maskedBlocks[m]=[]),this._maskedBlocks[m].push(this._blocks.length-1)),o+=m.length-1;continue}}let s=a[o],i=s in t;if(s===et.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){n=!n;continue}if(s==="["||s==="]"){r=!r;continue}if(s===et.ESCAPE_CHAR){if(++o,s=a[o],!s)break;i=!1}const c=i?new ra({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Fl(t[s]),parent:this}):new xr({char:s,eager:this.eager,isUnmasking:n});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){if(!t){this.reset();return}const{_blocks:a,...n}=t;this._blocks.forEach((r,o)=>r.state=a[o]),super.state=n}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,a)=>t+=a.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(a),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,a)=>t+=a.value,"")}set value(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(a),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(a),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,a)=>t+=a.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const a=new fe;let n=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(n==null)return a;this._blocks[n].isFilled&&++n;for(let r=n;r<this._blocks.length;++r){const o=this._blocks[r]._appendEager();if(!o.inserted)break;a.aggregate(o)}return a}_appendCharRaw(t,a){a===void 0&&(a={});const n=this._mapPosToBlock(this.displayValue.length),r=new fe;if(!n)return r;for(let s=n.index,i;i=this._blocks[s];++s){var o;const c=i._appendChar(t,{...a,_beforeTailState:(o=a._beforeTailState)==null||(o=o._blocks)==null?void 0:o[s]});if(r.aggregate(c),c.consumed)break}return r}extractTail(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const n=new ol;return t===a||this._forEachBlocksInRange(t,a,(r,o,s,i)=>{const c=r.extractTail(s,i);c.stop=this._findStopBefore(o),c.from=this._blockStartPos(o),c instanceof ol&&(c.blockIndex=o),n.extend(c)}),n}extractInput(t,a,n){if(t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),n===void 0&&(n={}),t===a)return"";let r="";return this._forEachBlocksInRange(t,a,(o,s,i,c)=>{r+=o.extractInput(i,c,n)}),r}_findStopBefore(t){let a;for(let n=0;n<this._stops.length;++n){const r=this._stops[n];if(r<=t)a=r;else break}return a}_appendPlaceholder(t){const a=new fe;if(this.lazy&&t==null)return a;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return a;const r=n.index,o=t??this._blocks.length;return this._blocks.slice(r,o).forEach(s=>{if(!s.lazy||t!=null){var i;a.aggregate(s._appendPlaceholder((i=s._blocks)==null?void 0:i.length))}}),a}_mapPosToBlock(t){let a="";for(let n=0;n<this._blocks.length;++n){const r=this._blocks[n],o=a.length;if(a+=r.displayValue,t<=a.length)return{index:n,offset:t-o}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((a,n)=>a+=n.displayValue.length,0)}_forEachBlocksInRange(t,a,n){a===void 0&&(a=this.displayValue.length);const r=this._mapPosToBlock(t);if(r){const o=this._mapPosToBlock(a),s=o&&r.index===o.index,i=r.offset,c=o&&s?o.offset:this._blocks[r.index].displayValue.length;if(n(this._blocks[r.index],r.index,i,c),o&&!s){for(let u=r.index+1;u<o.index;++u)n(this._blocks[u],u,0,this._blocks[u].displayValue.length);n(this._blocks[o.index],o.index,0,o.offset)}}}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const n=super.remove(t,a);return this._forEachBlocksInRange(t,a,(r,o,s,i)=>{n.aggregate(r.remove(s,i))}),n}nearestInputPos(t,a){if(a===void 0&&(a=re.NONE),!this._blocks.length)return 0;const n=new k4(this,t);if(a===re.NONE)return n.pushRightBeforeInput()||(n.popState(),n.pushLeftBeforeInput())?n.pos:this.displayValue.length;if(a===re.LEFT||a===re.FORCE_LEFT){if(a===re.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===t)return t;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),a===re.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=t||(n.popState(),n.ok&&n.pos<=t))return n.pos;n.popState()}return n.ok?n.pos:a===re.FORCE_LEFT?0:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:0)}return a===re.RIGHT||a===re.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:a===re.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:this.nearestInputPos(t,re.LEFT))):t}totalInputPositions(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);let n=0;return this._forEachBlocksInRange(t,a,(r,o,s,i)=>{n+=r.totalInputPositions(s,i)}),n}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const a=this._maskedBlocks[t];return a?a.map(n=>this._blocks[n]):[]}pad(t){const a=new fe;return this._forEachBlocksInRange(0,this.displayValue.length,n=>a.aggregate(n.pad(t))),a}}et.DEFAULTS={...Je.DEFAULTS,lazy:!0,placeholderChar:"_"},et.STOP_CHAR="`",et.ESCAPE_CHAR="\\",et.InputDefinition=ra,et.FixedDefinition=xr,ue.MaskedPattern=et;class oa extends et{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:a=this.to||0,from:n=this.from||0,maxLength:r=this.maxLength||0,autofix:o=this.autofix,...s}=t;this.to=a,this.from=n,this.maxLength=Math.max(String(a).length,r),this.autofix=o;const i=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let u=0;for(;u<c.length&&c[u]===i[u];)++u;s.mask=c.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u),super._update(s)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let a="",n="";const[,r,o]=t.match(/^(\D*)(\d*)(\D*)/)||[];return o&&(a="0".repeat(r.length)+o,n="9".repeat(r.length)+o),a=a.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[a,n]}doPrepareChar(t,a){a===void 0&&(a={});let n;return[t,n]=super.doPrepareChar(t.replace(/\D/g,""),a),t||(n.skip=!this.isComplete),[t,n]}_appendCharRaw(t,a){if(a===void 0&&(a={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,a);const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[o,s]=this.boundaries(this.value+t);return Number(s)<this.from?super._appendCharRaw(n[this.value.length],a):Number(o)>this.to?!a.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],a).aggregate(this._appendCharRaw(t,a)):super._appendCharRaw(r[this.value.length],a):super._appendCharRaw(t,a)}doValidate(t){const a=this.value;if(a.search(/[^0]/)===-1&&a.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(a);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){const a=new fe;if(this.value.length===this.maxLength)return a;const n=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let o=0;o<r;++o)a.aggregate(super._appendCharRaw("0",t));n.split("").forEach(o=>this._appendCharRaw(o))}return a}}ue.MaskedRange=oa;const x4="d{.}`m{.}`Y";class Ot extends et{static extractPatternOptions(t){const{mask:a,pattern:n,...r}=t;return{...r,mask:rl(a)?a:n}}constructor(t){super(Ot.extractPatternOptions({...Ot.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:a,pattern:n,blocks:r,...o}={...Ot.DEFAULTS,...t},s=Object.assign({},Ot.GET_DEFAULT_BLOCKS());t.min&&(s.Y.from=t.min.getFullYear()),t.max&&(s.Y.to=t.max.getFullYear()),t.min&&t.max&&s.Y.from===s.Y.to&&(s.m.from=t.min.getMonth()+1,s.m.to=t.max.getMonth()+1,s.m.from===s.m.to&&(s.d.from=t.min.getDate(),s.d.to=t.max.getDate())),Object.assign(s,this.blocks,r),super._update({...o,mask:rl(a)?a:n,blocks:s})}doValidate(t){const a=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&a!=null&&(this.min==null||this.min<=a)&&(this.max==null||a<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(Ot.extractPatternOptions(t))}}Ot.GET_DEFAULT_BLOCKS=()=>({d:{mask:oa,from:1,to:31,maxLength:2},m:{mask:oa,from:1,to:12,maxLength:2},Y:{mask:oa,from:1900,to:9999}}),Ot.DEFAULTS={...et.DEFAULTS,mask:Date,pattern:x4,format:(l,t)=>{if(!l)return"";const a=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),r=l.getFullYear();return[a,n,r].join(".")},parse:(l,t)=>{const[a,n,r]=l.split(".").map(Number);return new Date(r,n-1,a)}},ue.MaskedDate=Ot;class sa extends Je{constructor(t){super({...sa.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(a=>{const{expose:n,...r}=Fl(a),o=Ft({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});return n&&(this.exposeMask=o),o}):[])}_appendCharRaw(t,a){a===void 0&&(a={});const n=this._applyDispatch(t,a);return this.currentMask&&n.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(a))),n}_applyDispatch(t,a,n){t===void 0&&(t=""),a===void 0&&(a={}),n===void 0&&(n="");const r=a.tail&&a._beforeTailState!=null?a._beforeTailState._value:this.value,o=this.rawInputValue,s=a.tail&&a._beforeTailState!=null?a._beforeTailState._rawInputValue:o,i=o.slice(s.length),c=this.currentMask,u=new fe,d=c==null?void 0:c.state;return this.currentMask=this.doDispatch(t,{...a},n),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),s&&(this.currentMask.append(s,{raw:!0}),u.tailShift=this.currentMask.value.length-r.length),i&&(u.tailShift+=this.currentMask.append(i,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),u}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const a=new fe;return t&&a.aggregate(this._applyDispatch("",{},t)),a.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var a,n;return{...t,_beforeTailState:((a=t._beforeTailState)==null?void 0:a.currentMaskRef)===this.currentMask&&((n=t._beforeTailState)==null?void 0:n.currentMask)||t._beforeTailState}}doDispatch(t,a,n){return a===void 0&&(a={}),n===void 0&&(n=""),this.dispatch(t,this,a,n)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,a){a===void 0&&(a={});let[n,r]=super.doPrepare(t,a);if(this.currentMask){let o;[n,o]=super.doPrepare(n,this.currentMaskFlags(a)),r=r.aggregate(o)}return[n,r]}doPrepareChar(t,a){a===void 0&&(a={});let[n,r]=super.doPrepareChar(t,a);if(this.currentMask){let o;[n,o]=super.doPrepareChar(n,this.currentMaskFlags(a)),r=r.aggregate(o)}return[n,r]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(a=>a.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let a=String(t);this.currentMask&&(this.currentMask.typedValue=t,a=this.currentMask.unmaskedValue),this.unmaskedValue=a}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,a){const n=new fe;return this.currentMask&&n.aggregate(this.currentMask.remove(t,a)).aggregate(this._applyDispatch()),n}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(a=>a.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:a,currentMaskRef:n,currentMask:r,...o}=t;a&&this.compiledMasks.forEach((s,i)=>s.state=a[i]),n!=null&&(this.currentMask=n,this.currentMask.state=r),super.state=o}extractInput(t,a,n){return this.currentMask?this.currentMask.extractInput(t,a,n):""}extractTail(t,a){return this.currentMask?this.currentMask.extractTail(t,a):super.extractTail(t,a)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,a){return this.currentMask?this.currentMask.nearestInputPos(t,a):super.nearestInputPos(t,a)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((a,n)=>{if(!t[n])return;const{mask:r,...o}=t[n];return Ya(a,o)&&a.maskEquals(r)}):super.maskEquals(t)}typedValueEquals(t){var a;return!!((a=this.currentMask)!=null&&a.typedValueEquals(t))}}sa.DEFAULTS={...Je.DEFAULTS,dispatch:(l,t,a,n)=>{if(!t.compiledMasks.length)return;const r=t.rawInputValue,o=t.compiledMasks.map((s,i)=>{const c=t.currentMask===s,u=c?s.displayValue.length:s.nearestInputPos(s.displayValue.length,re.FORCE_LEFT);return s.rawInputValue!==r?(s.reset(),s.append(r,{raw:!0})):c||s.remove(u),s.append(l,t.currentMaskFlags(a)),s.appendTail(n),{index:i,weight:s.rawInputValue.length,totalInputPositions:s.totalInputPositions(0,Math.max(u,s.nearestInputPos(s.displayValue.length,re.FORCE_LEFT)))}});return o.sort((s,i)=>i.weight-s.weight||i.totalInputPositions-s.totalInputPositions),t.compiledMasks[o[0].index]}},ue.MaskedDynamic=sa;class ia extends et{constructor(t){super({...ia.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:a,...n}=t;if(a){const r=a.map(i=>i.length),o=Math.min(...r),s=Math.max(...r)-o;n.mask="*".repeat(o),s&&(n.mask+="["+"*".repeat(s)+"]"),this.enum=a}super._update(n)}_appendCharRaw(t,a){a===void 0&&(a={});const n=Math.min(this.nearestInputPos(0,re.FORCE_RIGHT),this.value.length),r=this.enum.filter(o=>this.matchValue(o,this.unmaskedValue+t,n));if(r.length){r.length===1&&this._forEachBlocksInRange(0,this.value.length,(s,i)=>{const c=r[0][i];i>=this.value.length||c===s.value||(s.reset(),s._appendChar(c,a))});const o=super._appendCharRaw(r[0][this.value.length],a);return r.length===1&&r[0].slice(this.unmaskedValue.length).split("").forEach(s=>o.aggregate(super._appendCharRaw(s))),o}return new fe({skip:!this.isComplete})}extractTail(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),new It("",t)}remove(t,a){if(t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),t===a)return new fe;const n=Math.min(super.nearestInputPos(0,re.FORCE_RIGHT),this.value.length);let r;for(r=t;r>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(n,r),n)).length>1);--r);const o=super.remove(r,a);return o.tailShift+=r-t,o}get isComplete(){return this.enum.indexOf(this.value)>=0}}ia.DEFAULTS={...et.DEFAULTS,matchValue:(l,t,a)=>l.indexOf(t,a)===a},ue.MaskedEnum=ia;class Mi extends Je{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}ue.MaskedFunction=Mi;var Ti;class ut extends Je{constructor(t){super({...ut.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),a="\\d*",n=(this.scale?"("+br(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+a+n),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(br).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(br(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const a=t.split(this.radix);return a[0]=a[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),a.join(this.radix)}doPrepareChar(t,a){a===void 0&&(a={});const[n,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(a.input&&a.raw||!a.input&&!a.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),a);return t&&!n&&(r.skip=!0),n&&!this.allowPositive&&!this.value&&n!=="-"&&r.aggregate(this._appendChar("-")),[n,r]}_separatorsCount(t,a){a===void 0&&(a=!1);let n=0;for(let r=0;r<t;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++n,a&&(t+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),[t,a]=this._adjustRangeWithSeparators(t,a),this._removeThousandsSeparators(super.extractInput(t,a,n))}_appendCharRaw(t,a){a===void 0&&(a={});const n=a.tail&&a._beforeTailState?a._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const o=this._value;this._value+=t;const s=this.number;let i=!isNaN(s),c=!1;if(i){let h;this.min!=null&&this.min<0&&this.number<this.min&&(h=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(h=this.max),h!=null&&(this.autofix?(this._value=this.format(h,this).replace(ut.UNMASKED_RADIX,this.radix),c||(c=o===this._value&&!a.tail)):i=!1),i&&(i=!!this._value.match(this._numberRegExp))}let u;i?u=new fe({inserted:this._value.slice(o.length),rawInserted:c?"":t,skip:c}):(this._value=o,u=new fe),this._value=this._insertThousandsSeparators(this._value);const d=a.tail&&a._beforeTailState?a._beforeTailState._value:this._value,m=this._separatorsCountFromSlice(d);return u.tailShift+=(m-r)*this.thousandsSeparator.length,u}_findSeparatorAround(t){if(this.thousandsSeparator){const a=t-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,a);if(n<=t)return n}return-1}_adjustRangeWithSeparators(t,a){const n=this._findSeparatorAround(t);n>=0&&(t=n);const r=this._findSeparatorAround(a);return r>=0&&(a=r+this.thousandsSeparator.length),[t,a]}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),[t,a]=this._adjustRangeWithSeparators(t,a);const n=this.value.slice(0,t),r=this.value.slice(a),o=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+r));const s=this._separatorsCountFromSlice(n);return new fe({tailShift:(s-o)*this.thousandsSeparator.length})}nearestInputPos(t,a){if(!this.thousandsSeparator)return t;switch(a){case re.NONE:case re.LEFT:case re.FORCE_LEFT:{const n=this._findSeparatorAround(t-1);if(n>=0){const r=n+this.thousandsSeparator.length;if(t<r||this.value.length<=r||a===re.FORCE_LEFT)return n}break}case re.RIGHT:case re.FORCE_RIGHT:{const n=this._findSeparatorAround(t);if(n>=0)return n+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let a=t;this.min!=null&&(a=Math.max(a,this.min)),this.max!=null&&(a=Math.min(a,this.max)),a!==t&&(this.unmaskedValue=this.format(a,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(t){const a=this._removeThousandsSeparators(t).split(this.radix);return a[0]=a[0].replace(/^(\D*)(0*)(\d*)/,(n,r,o,s)=>r+s),t.length&&!/\d$/.test(a[0])&&(a[0]=a[0]+"0"),a.length>1&&(a[1]=a[1].replace(/0*$/,""),a[1].length||(a.length=1)),this._insertThousandsSeparators(a.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const a=t.split(this.radix);return a.length<2&&a.push(""),a[1]=a[1].padEnd(this.scale,"0"),a.join(this.radix)}doSkipInvalid(t,a,n){a===void 0&&(a={});const r=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===ut.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,a,n)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,ut.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(ut.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||ut.EMPTY_VALUES.includes(t)&&ut.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}Ti=ut,ut.UNMASKED_RADIX=".",ut.EMPTY_VALUES=[...Je.EMPTY_VALUES,0],ut.DEFAULTS={...Je.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Ti.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:l=>l.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},ue.MaskedNumber=ut;const Qa={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function wr(l,t,a){t===void 0&&(t=Qa.MASKED),a===void 0&&(a=Qa.MASKED);const n=Ft(l);return r=>n.runIsolated(o=>(o[t]=r,o[a]))}function Li(l,t,a,n){return wr(t,a,n)(l)}ue.PIPE_TYPE=Qa,ue.createPipe=wr,ue.pipe=Li;class $i extends et{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var a,n,r;const{repeat:o,...s}=Fl(t);this._blockOpts=Object.assign({},this._blockOpts,s);const i=Ft(this._blockOpts);this.repeat=(a=(n=o??i.repeat)!=null?n:this.repeat)!=null?a:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((r=this._blocks)==null?void 0:r.length)||0,this.repeatFrom)),blocks:{m:i},eager:i.eager,overwrite:i.overwrite,skipInvalid:i.skipInvalid,lazy:i.lazy,placeholderChar:i.placeholderChar,displayChar:i.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ft(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,a){a===void 0&&(a={});const n=new fe;for(let c=(r=(o=this._mapPosToBlock(this.displayValue.length))==null?void 0:o.index)!=null?r:Math.max(this._blocks.length-1,0),u,d;u=(s=this._blocks[c])!=null?s:d=!d&&this._allocateBlock(c);++c){var r,o,s,i;const m=u._appendChar(t,{...a,_beforeTailState:(i=a._beforeTailState)==null||(i=i._blocks)==null?void 0:i[c]});if(m.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(m),m.consumed)break}return n}_trimEmptyTail(t,a){var n,r;t===void 0&&(t=0);const o=Math.max(((n=this._mapPosToBlock(t))==null?void 0:n.index)||0,this.repeatFrom,0);let s;a!=null&&(s=(r=this._mapPosToBlock(a))==null?void 0:r.index),s==null&&(s=this._blocks.length-1);let i=0;for(let c=s;o<=c&&!this._blocks[c].unmaskedValue;--c,++i);i&&(this._blocks.splice(s-i+1,i),this.mask=this.mask.slice(i))}reset(){super.reset(),this._trimEmptyTail()}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const n=super.remove(t,a);return this._trimEmptyTail(t,a),n}totalInputPositions(t,a){return t===void 0&&(t=0),a==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,a)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}}ue.RepeatBlock=$i;try{globalThis.IMask=ue}catch{}const w4=Object.freeze(Object.defineProperty({__proto__:null,ChangeDetails:fe,ChunksTailDetails:ol,DIRECTION:re,HTMLContenteditableMaskElement:kr,HTMLInputMaskElement:Si,HTMLMaskElement:na,InputMask:Di,MaskElement:Xa,Masked:Je,MaskedDate:Ot,MaskedDynamic:sa,MaskedEnum:ia,MaskedFunction:Mi,MaskedNumber:ut,MaskedPattern:et,MaskedRange:oa,MaskedRegExp:Ai,PIPE_TYPE:Qa,PatternFixedDefinition:xr,PatternInputDefinition:ra,RepeatBlock:$i,createMask:Ft,createPipe:wr,default:ue,forceDirection:Ni,normalizeOpts:Fl,pipe:Li},Symbol.toStringTag,{value:"Module"})),Fi={reference:{faq:"FAQ",banner:"Banner",slider:"Slider",video:"Video",about:"About",cards:"Cards",usefulLinks:"Useful Links",team:"Team",body:"Body",news:"News",form:"Form",tabs:"Tabs",vertical_tabs:"Vertical Tabs",documents:"Documents",infoLine:"Information Line",interested:"You may be interested",contact:"Contact"},navigation:{editMenu:"Edit Menu",dashboard:"Dashboard",collections:"Collections Structure",articles:"Articles",posts:"Posts",media:"Media",permissions:"Permissions",tags:"Tags",singletons:"Pages",feedback:"Feedback",email:"Пошти користувачів",singletonsMenu:"Menu",menuAdd:"Create Menu",builder:"Collections Structure",back:"Back",settings:"Settings",settingsDescription:"Manage your CMS configuration",singletonsMenuDescription:"Manage your menu.",users:"Users",general:"General",apiKeys:"API Keys",appearance:"Appearance",logs:"Logs"},dashboard:{title:"Dashboard",newCollection:"Create Collection",quickActions:"Quick Actions",views:"views",stats:{totalArticles:"Total Articles",totalMedia:"Total Media",activeUsers:"Active Users",apiRequests:"API Requests",fromLastMonth:"from last month"},collections:{title:"Collections",articles:"Articles",articlesDesc:"Description for articles",posts:"Posts",postsDesc:"Description for posts",products:"Products",productsDesc:"Description for products",categories:"Categories",categoriesDesc:"Description for categories",items:"items",new:"New Collection"},recentArticles:"Recent Articles",recentPosts:"Recent Posts",activeUsers:"Active Users",mediaFiles:"Media Files",createArticle:"Create Article",createPost:"Create Post",uploadMedia:"Upload Media",manageUsers:"Manage Users",feedback:"Feedback",createArticleDescription:"Create a new article for your site",uploadMediaDescription:"Upload media files for your site",manageUsersDescription:"Manage users for your site",viewFeedbackDescription:"View feedback for your site",activityFeed:"Activity Feed",viewAll:"View all",description:"Welcome to the CMS dashboard. You can create, edit, and manage your site's content.",newArticle:"Create Article",totalContent:"Total Content",articlesPostsPages:"Articles, Posts and Pages",monthlyActiveUsers:"Monthly Active Users",imagesVideosDocs:"Images, Videos and Docs",thisMonth:"This Month",newMediaFiles:"New Media Files",gettingStartedWithNextJs14:"Getting Started with Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Advanced React Patterns",uiUxDesignPrinciples:"UI/UX Design Principles",databaseOptimizationTips:"Database Optimization Tips",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez",recentContent:"Recent Content"},collections:{title:"Collections",selectCollection:"Select a collection to view its content",createCollection:"New Collection",searchCollections:"Search collections...",entries:"Entries",fields:"Fields",lastModified:"Last Modified",edit:"Edit",delete:"Delete",view:"View",form:{name:"Collection Name",slug:"Slug",description:"Description",fields:"Fields",addField:"Add Field"},dragToBuild:"Drag and drop content blocks here to build your collection structure",collectionCreated:"Collection created successfully",collectionCreationFailed:"Error creating collection",pinPublication:"Pin Publication"},articles:{title:"Articles",createArticle:"Create Article",searchArticles:"Search articles...",showColumns:"Show columns",update:"Update",create:"Create",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},posts:{title:"Posts",createPost:"Create Post",searchPosts:"Search posts...",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},singletons:{title:"Singletons",createSingleton:"Create Singleton",searchSingletons:"Search singletons...",form:{name:"Name",description:"Description",content:"Content",status:"Status"},search:"Search singletons..."},media:{title:"Media Library",description:"Manage your images, documents, and media files.",uploadMedia:"Upload Media",searchMedia:"Search files...",fileInfo:"File Information",preview:"Preview",newFolder:"New Folder",selectFile:"Select a file to view details",fileDetails:"File Details",name:"Name",size:"Size",dimensions:"Dimensions",uploadDate:"Upload Date",author:"Author",tags:"Tags",banner:"Banner",hero:"Hero",homepage:"Homepage",download:"Download",copyPath:"Copy path",copyPathFailed:"Failed to copy path",delete:"Delete",edit:"Edit",share:"Share",moreActions:"More actions",deleteFile:"Delete File",cancel:"Cancel",mediaLibrary:"Media Library",showColumns:"Show columns",update:"Update",create:"Create",createFolder:"Create Folder",files:"files",noFilesInFolder:"No files in this folder",deleteConfirmation:"Are you sure you want to delete this file?",uploaded:"Uploaded",filter:"Filter",search:"Search media files...",uploadingFiles:"Uploading files",uploading:"Uploading...",folder:"Folder",updatedAt:"Updated At",type:"Type",sortBy:{title:"Sort by",name:"File name",filesize:"File size"},upload:"Upload",selectFromMedia:"Select from media",selectedFiles:"Selected files: {count}",selectFiles:"Select files"},tags:{title:"Tags",description:"Manage your tags.",createTag:"Create Tag",editTag:"Edit Tag",searchTags:"Search tags...",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No tags found",emptyDescription:"Create your first tag to get started.",emptyButton:"Create Tag"},feedback:{title:"Feedback",description:"View feedback",table:{number:"№",noFeedback:"No feedback",email:"Email",userName:"Full name",messageText:"Message text",feedbackType:"Type of appeal",phone:"Phone",resumeLink:"Resume link",linkedinLink:"Linkedin link",portfolioLink:"Portfolio link",telegramLink:"Telegram link"}},email:{title:"User mails",description:"View users awaiting feedback",table:{number:"№",date:"Date of shipment",email:"Email"}},emptyData:{title:"No data found",description:"Create your first item to get started.",buttonText:"Create Item"},form:{gen:"Generate",key:"Key",value:"Value",noDataToDisplay:"No data to display",add:"Add"},builder:{manageContentCollections:"Manage content collections",searchCollections:"Search collections...",collections:"Collections",collectionStructure:"Collection Structure",defineFields:"Define the fields and their types for this collection",name:"Name",edit:"Edit",preview:"Preview",type:"Type",content:"Content",seo:"SEO",tags:"Tags",save:"Save",cancel:"Cancel",create:"Create",localization:"Localization",actions:"Actions",noColumnsFound:"No columns found",collectionName:"Collection Name",title:"Title",entries:"Entries",fields:"Fields",status:"Status",lastModified:"Last Modified",editCollection:"Edit collection",editContentForYourSite:"Edit content for your site",deleteObject:"Are you sure you want to delete this object?",editField:"Edit field",deleteTitle:"Delete field",deleteField:"Are you sure you want to delete this field?",scheme:{name:{label:"Name",placeholder:"Name"},title:{label:"Title",placeholder:"Title"},type:{label:"Type",placeholder:"Type",options:{collection:"Collection",single:"Single"}},customTable:{label:"Custom Table"},status:{label:"Status",placeholder:"Status",options:{published:"Published",draft:"Draft",archived:"Archived"}},description:{label:"Description",placeholder:"Description"},preview_path:{label:"Preview path",placeholder:"Preview path",info:"Path to slug for preview"},include_search:{label:"Include in search?",placeholder:"Include in search?"}},required:"Required field",createField:"Create field",selectType:"Select type",createFolder:"Create folder",changeType:"Change type",fieldLabels:{name:"Name",label:"Label",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",multiple:"Multiple",api:"API",relation:"Relation",required:"Required",localization:"Localization"},fieldPlaceholders:{name:"Name",label:"Title",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",api:"API",relation:"Relation"},fieldOptions:{text:"Text",number:"Number",integer:"Integer",date:"Date",datetime:"Datetime",file:"File",select:"Select",multiselect:"MultiSelect",mediaselect:"MediaSelect",radio:"Radio",boolean:"Boolean",datalist:"Data list",image:"Image",slug:"Slug",richtext:"Rich Text",markdown:"Markdown",reference:"Reference",relation:"Relation",fileList:"Gallery",tags:"Tags"}},menu:{title:"Menu",description:"Manage your menu.",createMenu:"Create Menu",searchMenu:"Search menu...",menuAdd:"Add Menu",editMenu:"Edit Menu",textEditor:"Text Editor",listTree:"List Tree",filter:"Filter",search:"Search menu...",menuCreated:"Menu created",menuCreateError:"Error creating menu",menuUpdated:"Menu updated",menuUpdateError:"Error updating menu",menuDeleted:"Menu deleted",menuDeleteError:"Error deleting menu",form:{name:"Name",description:"Description",content:"Content",status:"Status",value:"Value",language:"Language"}},settings:{title:"Settings",description:"Configure your CMS settings and preferences.",systemStatus:"System Status",siteInformation:"Site Information",siteName:"Site Name",version:"Version",environment:"Environment",security:"Security",localization:"Localization",production:"Production",systemHealth:"System Health",database:"Database",connected:"Connected",cache:"Cache",active:"Active",storage:"Storage",used:"Used",configure:"Configure",successTitle:"Success",successMessage:"Settings saved successfully",errorTitle:"Error",errorMessage:"Error saving settings",generateNewKey:"Generate New Key",apiSecurity:"API Security",general:{general:"General Settings",generalDescription:"Manage your general settings.",url:"URL",language:"Language",languages:"Languages",contacts:"Contacts",showSocialsNumber:"Number of socials to display",mapCoords:"Map coordinates",socials:"Socials",saveChanges:"Save Changes",cancel:"Cancel",notifications:"Notifications",emailNotifications:"Email Notifications",emailNotificationsDescription:"Receive notifications by email",pushNotifications:"Browser Notifications",pushNotificationsDescription:"Browser notifications for important updates",smsNotifications:"SMS Notifications",smsNotificationsDescription:"SMS notifications for critical updates",desktopNotifications:"Desktop Notifications",desktopNotificationsDescription:"Desktop notifications",siteDescription:"Site Description",siteUrl:"Site URL",siteLanguage:"Site Language",siteEmail:"Site Email",sitePhone:"Site Phone",siteAddress:"Site Address",siteName:"Site Name",title:"Title",content:"Content",name:"Name",siteInformation:"Site Information",logoSite:"Site Logo",logoCms:"CMS Logo",imageLogin:"Login Image",logo:"Logo",siteInformationDescription:"Manage your site information."},users:{users:"User Management",usersDescription:"Manage your user management configuration.",userRegistration:"User Registration",allowRegistration:"Allow User Registration",allowRegistrationDescription:"Enable new users to register accounts",emailVerification:"Email Verification Required",emailVerificationDescription:"Require email verification for new accounts",autoApprove:"Auto-approve Users",autoApproveDescription:"Automatically approve new user registrations",defaultRole:"Default User Role"},"api-keys":{apiKeys:"API Keys",apiKeysDescription:"Manage your api keys configuration.",productionApiKey:"Production API Key",developmentApiKey:"Development API Key",generateNewKey:"Generate New Key",apiSecurity:"API Security",rateLimiting:"Rate Limiting",rateLimitingDescription:"Enable API rate limiting protection",corsProtection:"CORS Protection",corsProtectionDescription:"Cross-origin request security",apiLogging:"API Logging",apiLoggingDescription:"Log all API requests and responses"},appearance:{appearance:"Appearance",appearanceDescription:"Manage your appearance settings.",colorTheme:"Color Theme",darkMode:"Dark Mode",darkModeDescription:"Switch to dark theme",compactMode:"Compact Mode",compactModeDescription:"Reduce spacing and padding",animations:"Animations",animationsDescription:"Enable interface animations",themeBlue:"Blue",themeGreen:"Green",themePurple:"Purple"},logs:{title:"Logs",description:"View all your actions in the system",table:{objectId:"Object Identifier",dateTime:"Date and Time of Change",changeType:"Change Type",noLogs:"No user logs found",noLogsDescription:"No user logs found"}},permissions:{title:"Permissions",user:"User",role:"Role",lastActive:"Last Active",actions:"Actions",rolePermissions:"Role Permissions",rolePermissionsDescription:"Permissions assigned to each role in the system.",permission:"Permission",admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer",customizePermissions:"Customize Permissions",inviteUser:"Invite User",searchUsers:"Search users...",createContent:"Create Content",editContent:"Edit Content",deleteContent:"Delete Content",publishContent:"Publish Content",manageMedia:"Manage Media",manageUsers:"Manage Users",manageSettings:"Manage Settings",remove:"Remove",edit:"Edit",time:{hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},roles:{admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer"}}},block:{type:{heading:"Heading",paragraph:"Paragraph"}},app:{name:"SOFTPRO software package: GIS MBK Kamyansk City TG",tagline:"Do more with less"},nav:{home:"Home",about:"About",profile:"Profile",settings:"Settings",logout:"Log out"},common:{ok:"OK",save:"Save",cancel:"Cancel",close:"Close",delete:"Delete",edit:"Edit",loading:"Loading…",retry:"Retry",title:"Title",description:"Description",keywords:"Keywords",successMessage:"Success",errorMessage:"Error",success:"Success",error:"Error",meta:"Meta",actions:{add:"Add",save:"Save",cancel:"Cancel",edit:"Edit",delete:"Delete",create:"Create",preview:"Preview",search:"Search",filter:"Filter",export:"Export",addField:"Add Field",success:"Success",error:"Error",back:"Back"},status:{published:"Published",draft:"Draft",archived:"Archived"},content:"Content",pagination:{showing:"Showing",to:"to",of:"of",results:"results",previous:"Previous",next:"Next"}},auth:{title:"Sign in",email:"Email",password:"Password",remember:"Remember me",submit:"Sign in",errors:{invalid:"Invalid email or password",required:"{field} is required"}},table:{choose:"Choose columns to display",columns:"Columns",actions:"Actions",search:"Search",export:"Export",exportTitle:"Export table",close:"Close",chooseColumns:"Select columns for export:",selectAll:"Select all",selectCurrent:"Select current",none:"None",chooseFormat:"Choose table format:",time:{weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},format:{json:"JSON format",csv:"CSV format",xlsx:"XLSX format"},cancel:"Cancel",download:"Download table"},filter:{search:"Search",more:"Show more",less:"Show less",selected:"selected",clear:"Clear",apply:"Apply",from:"From",to:"To",notfound:"Nothing found",period:"Period",today:"Today",week:"Week",month:"Month",quarter:"Quarter",year:"Year",alltime:"All Time",prev:"Prev",next:"Next"},items:{title:"Items",add:"Add item",count:"No items | One item | {count} items",created:"Item “{name}” has been created",deleted:"Item deleted"},errors:{network:"Network error. Please try again.",notFound:"We couldn't find what you were looking for."},toast:{saved:"Changes saved",copied:"Copied to clipboard"},users:{title:"Users",description:"Manage your users.",createUser:"Create User",editUser:"Edit User",searchUsers:"Search users...",createUserFailed:"Create user failed",createUserSuccess:"User created successfully",editUserFailed:"Edit user failed",editUserSuccess:"User edited successfully",deleteUserSuccess:"User deleted successfully",deleteUserFailed:"User deleted failed",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No users found",emptyDescription:"Create your first user to get started.",emptyButton:"Create User"},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Guide for menu",general:"Guide",media:"Guide for media",settings:"Guide for settings",users:"Guide for users",content:"Guide for content",appOverview:"Guide for app overview",collections:"Guide for collections",help:"Help"}},_4=Object.freeze(Object.defineProperty({__proto__:null,cms:Fi,default:{cms:Fi}},Symbol.toStringTag,{value:"Module"})),Ii={reference:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",interested:"Вас може зацікавити",contact:"Контакти"},navigation:{editMenu:"Редагувати меню",dashboard:"Панель керування",collections:"Керування контентом",articles:"Статті",posts:"Дописи",media:"Медіа",permissions:"Дозволи",tags:"Теги",singletons:"Сторінки",singletonsMenu:"Меню",feedback:"Зворотній зв'язок",email:"Пошти користувачів",menuAdd:"Створити меню",builder:"Структура колекцій",back:"Назад",settings:"Налаштування",settingsDescription:"Налаштування вашого сайту",singletonsMenuDescription:"Керування меню.",users:"Користувачі",general:"Основні",apiKeys:"API ключі",appearance:"Вигляд",logs:"Логи"},dashboard:{title:"Панель керування",description:"Вітаємо в панелі керування CMS. Ви можете створювати, редагувати та управляти контентом вашого сайту.",newCollection:"Створити колекцію",quickActions:"Швидкі дії",views:"переглядів",stats:{totalArticles:"Всього статей",totalMedia:"Всього медіа",activeUsers:"Активні користувачі",apiRequests:"API запити",fromLastMonth:"з минулого місяця"},collections:{title:"Колекції",articles:"Статті",articlesDesc:"Опис для статей",posts:"Дописи",postsDesc:"Опис для дописів",products:"Продукти",productsDesc:"Опис для продуктів",categories:"Категорії",categoriesDesc:"Опис для категорій",items:"шт.",new:"Нова колекція"},recentArticles:"Останні статті",recentPosts:"Останні дописи",recentContent:"Останній контент",activityFeed:"Стрічка активності",viewAll:"Показати все",totalContent:"Всього контенту",articlesPostsPages:"Статті, дописи та сторінки",monthlyActiveUsers:"Активних користувачів за місяць",imagesVideosDocs:"Зображення, відео та документи",thisMonth:"Цього місяця",activeUsers:"Активні користувачі",mediaFiles:"Файли медіа",createArticle:"Створити статтю",createPost:"Створити допис",uploadMedia:"Завантажити медіа",createArticleDescription:"Створіть статтю для вашого сайту",uploadMediaDescription:"Завантажте медіа файли для вашого сайту",manageUsersDescription:"Керуйте користувачами вашого сайту",viewFeedbackDescription:"Перегляд зворотнього зв'язку",manageUsers:"Керування користувачами",feedback:"Зворотній зв'язок",newMediaFiles:"Нових файлів медіа",gettingStartedWithNextJs14:"Початок роботи з Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Підвищені шаблони React",uiUxDesignPrinciples:"Принципи дизайну UI/UX",databaseOptimizationTips:"Поради з оптимізації бази даних",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez"},collections:{title:"Колекції",selectCollection:"Виберіть колекцію для перегляду її контенту",createCollection:"Створити колекцію",searchCollections:"Пошук колекцій...",entries:"Записи",fields:"Поля",lastModified:"Останнє редагування",edit:"Редагувати",delete:"Видалити",view:"Перегляд",form:{name:"Назва колекції",slug:"Слаг",description:"Опис",fields:"Поля",addField:"Додати поле"},dragToBuild:"Перетягніть блоки контенту сюди, щоб створити структуру колекції",collectionCreated:"Колекція успішно створена",collectionCreationFailed:"Помилка при створенні колекції",pinPublication:"Закріпити публікацію"},articles:{title:"Сторінки",createArticle:"Створити сторінку",searchArticles:"Пошук статей...",showColumns:"Показати колонки",update:"Оновити",create:"Створити",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},posts:{title:"Дописи",createPost:"Створити допис",searchPosts:"Пошук дописів...",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},singletons:{title:"Синглтони",createSingleton:"Створити синглтон",searchSingletons:"Пошук синглтонів...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус"},search:"Пошук синглтонів..."},media:{title:"Медіа бібліотека",description:"Керуйте своїми зображеннями, документами та медіа файлами.",uploadMedia:"Завантажити медіа",searchMedia:"Пошук файлів...",fileInfo:"Інформація про файл",preview:"Перегляд",newFolder:"Нова папка",selectFile:"Виберіть файл для перегляду деталей",fileDetails:"Інформація про файл",name:"Назва",size:"Розмір",dimensions:"Розміри",uploadDate:"Дата завантаження",author:"Автор",tags:"Теги",banner:"Банер",hero:"Герой",homepage:"Головна",download:"Завантажити",copyPath:"Копіювати шлях",copyPathFailed:"Не вдалося скопіювати шлях",delete:"Видалити",edit:"Редагувати",share:"Поділитися",moreActions:"Більше дій",deleteFile:"Ви впевнені, що хочете видалити цей файл?",createFolder:"Створити папку",cancel:"Скасувати",mediaLibrary:"Медіа бібліотека",files:"файлів",noFilesInFolder:"Немає файлів у цій папці",deleteConfirmation:"Ви впевнені, що хочете видалити цей файл?",uploaded:"Завантажено",filter:"Фільтр",search:"Пошук файлів...",uploadingFiles:"Завантаження файлів",uploading:"Завантаження...",folder:"Папка",type:"Тип",updatedAt:"Оновлено",sortBy:{title:"Сортувати за",name:"Назва файлу",filesize:"Розмір файлу"},upload:"Завантажити",selectFromMedia:"Вибрати з медіа",selectFiles:"Вибрати файли",selectedFiles:"Вибрано файлів: {count}"},tags:{title:"Теги",description:"Керування тегами.",createTag:"Створити тег",editTag:"Редагувати тег",searchTags:"Пошук тегів...",form:{name:"Назва",description:"Опис",color:"Колір",slug:"Slug",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"},emptyTitle:"Теги не знайдені",emptyDescription:"Створіть свій перший тег, щоб почати.",emptyButton:"Створити тег"},feedback:{title:"Зворотній зв'язок",description:"Переглядайте зворотній зв'язок",table:{number:"№",noFeedback:"Фідбек відсутній",email:"Email",userName:"ПІБ",messageText:"Текст повідомлення",feedbackType:"Тип звернення",cdate:"Дата відгуку",phone:"Телефон",resumeLink:"Посилання на резюме",linkedinLink:"Посилання на лінкедин",portfolioLink:"Посилання на портфоліо",telegramLink:"Посилання на телеграм"}},email:{title:"Пошти користувачів",description:"Переглядайте користувачів, які очікують зворотнього зв'язку",table:{number:"№",date:"Дата відправки",email:"Email"}},emptyData:{title:"Немає даних",description:"Створіть свій перший елемент, щоб почати.",buttonText:"Створити елемент"},form:{gen:"Згенерувати",key:"Ключ",value:"Значення",noDataToDisplay:"Дані для відображення відсутні",add:"Додати"},builder:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",manageContentCollections:"Керування колекціями контенту",searchCollections:"Пошук колекцій...",collections:"Структура колекцій",collectionStructure:"Структура колекції",defineFields:"Визначте поля та їх типи для цієї колекції",name:"Назва",changeType:"Змінити тип",type:"Тип",save:"Зберегти",edit:"Редагувати",content:"Контент",seo:"SEO",tags:"Теги",preview:"Перегляд",collectionName:"Назва колекції",title:"Заголовок",entries:"Записи",fields:"Поля",status:"Статус",lastModified:"Останнє редагування",cancel:"Скасувати",create:"Створити",localization:"Локалізація",actions:"Дії",noColumnsFound:"Немає колонок",editCollection:"Редагувати колекцію",editContentForYourSite:"Редагувати контент для вашого сайту",deleteObject:"Ви впевнені, що хочете видалити цей об'єкт?",editField:"Редагувати поле",deleteTitle:"Видалити поле",deleteField:"Ви впевнені, що хочете видалити це поле?",scheme:{name:{label:"Назва",placeholder:"Назва"},title:{label:"Заголовок",placeholder:"Заголовок"},type:{label:"Тип",placeholder:"Тип",options:{collection:"Колекція",single:"Сторінка"}},customTable:{label:"Власна таблиця"},status:{label:"Статус",placeholder:"Статус",options:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"}},description:{label:"Опис",placeholder:"Опис"},preview_path:{label:"Шлях для прев'ю",placeholder:"Шлях для прев'ю",info:"Шлях до slug для прев'ю"},include_search:{label:"Включити в пошук?",placeholder:"Включити в пошук?"}},required:"Обов'язкове поле",createField:"Створити поле",selectType:"Оберіть тип",createFolder:"Створити папку",fieldLabels:{name:"Назва",label:"Мітка",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",multiple:"Множинний",api:"API",relation:"Зв'язок",required:"Обов'язковий",localization:"Локалізація"},fieldPlaceholders:{name:"Назва",label:"Заголовок",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",api:"API",relation:"Зв'язок"},fieldOptions:{text:"Текст",number:"Число",integer:"Ціле число",date:"Дата",datetime:"Дата і час",file:"Файл",select:"Селект",multiselect:"Мультиселект",mediaselect:"Вибір медіа",radio:"Радіо",boolean:"Булевий",datalist:"Дататейбл",image:"Зображення",slug:"Слаг",richtext:"Текстовий редактор",markdown:"Markdown",reference:"Секції",relation:"Зв'язок",fileList:"Мультифайл",tags:"Теги"}},menu:{title:"Меню",description:"Керування меню.",createMenu:"Створити меню",searchMenu:"Пошук меню...",menuAdd:"Додати меню",editMenu:"Редагувати меню",textEditor:"Текстовий редактор",menuCreated:"Меню створено",menuCreateError:"Помилка при створенні меню",menuUpdated:"Меню оновлено",menuUpdateError:"Помилка при оновленні меню",menuDeleted:"Меню видалено",menuDeleteError:"Помилка при видаленні меню",listTree:"Список дерева",filter:"Фільтр",search:"Пошук меню...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус",value:"Значення",language:"Мова"}},settings:{title:"Налаштування",description:"Налаштуйте ваші налаштування CMS та налаштування.",systemStatus:"Статус системи",siteInformation:"Інформація про сайт",logo:"Логотип",siteName:"Назва сайту",version:"Версія",environment:"Середовище",security:"Безпека",localization:"Локалізація",production:"Виробництво",systemHealth:"Здоров'я системи",database:"База даних",connected:"З'єднано",cache:"Кеш",active:"Активний",storage:"Хмарне сховище",used:"Використано",configure:"Налаштувати",successTitle:"Успішно",successMessage:"Налаштування успішно збережено",errorTitle:"Помилка",errorMessage:"Помилка при збереженні налаштувань",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",general:{general:"Основні налаштування",generalDescription:"Керуйте вашими загальними налаштуваннями.",url:"URL",language:"Мова",languages:"Мови",contacts:"Контакти",socials:"Соціальні мережі",showSocialsNumber:"Кількість соціальних мереж для відображення",mapCoords:"Координати для відображення на карті",saveChanges:"Зберегти зміни",cancel:"Скасувати",notifications:"Сповіщення",emailNotifications:"Сповіщення по email",emailNotificationsDescription:"Отримувати сповіщення по email",pushNotifications:"Сповіщення в браузері",pushNotificationsDescription:"Сповіщення в браузері для важливих оновлень",smsNotifications:"Сповіщення по SMS",smsNotificationsDescription:"Сповіщення по SMS для критичних оновлень",desktopNotifications:"Сповіщення на комп'ютері",desktopNotificationsDescription:"Сповіщення на комп'ютері",siteName:"Назва сайту",siteDescription:"Опис сайту",siteUrl:"URL сайту",previewUrl:"URL попереднього перегляду",logoSite:"Логотип сайту",logoCms:"Логотип CMS",imageLogin:"Зображення для входу",siteLanguage:"Мова сайту",siteEmail:"Email сайту",sitePhone:"Телефон сайту",siteAddress:"Адреса сайту",siteInformation:"Інформація про сайт",logo:"Логотип",siteInformationDescription:"Керуйте вашою інформацією про сайт.",title:"Заголовок",content:"Контент",name:"Назва соцмережі"},users:{users:"Керування користувачами",usersDescription:"Керуйте налаштуваннями керування користувачами.",userRegistration:"Реєстрація користувачів",allowRegistration:"Дозволити реєстрацію користувачів",allowRegistrationDescription:"Дозволити новим користувачам реєструвати акаунти",emailVerification:"Потрібна верифікація email",emailVerificationDescription:"Вимагати підтвердження email для нових акаунтів",autoApprove:"Автоматичне схвалення користувачів",autoApproveDescription:"Автоматично схвалювати нові реєстрації користувачів",defaultRole:"Роль за замовчуванням"},"api-keys":{apiKeys:"API ключі",apiKeysDescription:"Керуйте налаштуваннями API ключів.",productionApiKey:"Production API ключ",developmentApiKey:"Development API ключ",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",rateLimiting:"Обмеження швидкості",rateLimitingDescription:"Увімкнути захист обмеження швидкості API",corsProtection:"Захист CORS",corsProtectionDescription:"Безпека крос-доменних запитів",apiLogging:"Логування API",apiLoggingDescription:"Логувати всі API запити та відповіді"},appearance:{appearance:"Вигляд",appearanceDescription:"Керуйте вашим виглядом та налаштуваннями.",colorTheme:"Кольорова тема",darkMode:"Темний режим",darkModeDescription:"Перемкнути на темну тему",compactMode:"Компактний режим",compactModeDescription:"Зменшити відступи та поля",animations:"Анімації",animationsDescription:"Увімкнути анімації інтерфейсу",themeBlue:"Синя",themeGreen:"Зелена",themePurple:"Фіолетова"},logs:{title:"Логи",description:"Переглядай всі свої дії в системі",table:{number:"№",objectId:"Ідентифікатор об'єкта",dateTime:"Дата та час зміни",changeType:"Тип зміни",noLogs:"Логи користувача відсутні"}},permissions:{title:"Дозволи",user:"Користувач",role:"Роль",lastActive:"Остання активність",actions:"Дії",rolePermissions:"Дозволи ролі",rolePermissionsDescription:"Дозволи, призначені для кожної ролі в системі.",permission:"Дозвіл",admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач",customizePermissions:"Налаштувати дозволи",inviteUser:"Запросити користувача",searchUsers:"Пошук користувачів...",createContent:"Створити контент",editContent:"Редагувати контент",deleteContent:"Видалити контент",publishContent:"Опублікувати контент",manageMedia:"Керування медіа",manageUsers:"Керування користувачами",manageSettings:"Керування налаштуваннями",remove:"Вилучити",edit:"Редагувати",time:{hoursAgo:"{count} годин тому",hourAgo:"1 година тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},roles:{admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач"}}},block:{type:{heading:"Заголовок",paragraph:"Параграф"}},app:{name:"Програмний комплекс SOFTPRO: ГІС МБК Кам'янської міської ТГ",tagline:"Зробіть більше з меншим"},nav:{home:"Домашній",about:"Про",profile:"Профіль",settings:"Налаштування",logout:"Вихід"},common:{ok:"Добре",save:"Зберегти",cancel:"Скасувати",close:"Закрити",delete:"Вилучити",edit:"Редагувати",loading:"Завантаження…",retry:"Повторити",title:"Назва",description:"Опис",keywords:"Ключові слова",success:"Успіх",error:"Помилка",successMessage:"Успішно",errorMessage:"Помилка",meta:"Мета",content:"Контент",actions:{add:"Додати",save:"Зберегти",cancel:"Скасувати",edit:"Редагувати",delete:"Видалити",create:"Створити",preview:"Перегляд",search:"Пошук",filter:"Фільтр",export:"Експорт",addField:"Додати поле",success:"Успіх",error:"Помилка",back:"Повернутися"},status:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"},pagination:{showing:"Показано",to:"по",of:"з",results:"результатів",previous:"Попередня",next:"Наступна"}},auth:{title:"Увійти",email:"Електронна пошта",password:"Пароль",remember:"Пам'ятайте мене",submit:"Увійти",errors:{invalid:"Недійсний електронний лист або пароль",required:"{Поле} потрібно"}},table:{choose:"Оберіть колонки для відображення",columns:"Колонки",actions:"Дії",search:"Пошук",export:"Експорт",exportTitle:"Експорт таблиці",close:"Закрити",chooseColumns:"Виберіть стовпці таблиці для експорту:",selectAll:"Вибрати усі",selectCurrent:"Вибрати поточні",none:"Жодного",chooseFormat:"Виберіть формат таблиці:",cancel:"Скасувати",download:"Завантажити таблицю",time:{weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",hoursAgo:"{count} годин тому",hourAgo:"1 година тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},format:{json:"Формат json",csv:"Формат csv",xlsx:"Формат xlsx"}},filter:{search:"Пошук",more:"Показати більше",less:"Показати меньше",selected:"обрано",clear:"Очистити",apply:"Застосувати",from:"Від",period:"Період",today:"Сьогодні",week:"Тиждень",month:"Місяць",quarter:"Квартал",year:"Рік",alltime:"Весь час",prev:"Попередній період",next:"Настпуний період",to:"До",notfound:"Нічого не знайдено"},items:{title:"Предмети",add:"Додати елемент",count:"Немає предметів | ",created:`Елемент "{Ім'я}" створений`,deleted:"Елемент видалено"},errors:{network:"Помилка мережі. ",notFound:"Ми не змогли знайти те, що ви шукали."},toast:{saved:"Збережені зміни",copied:"Скопіювано в буфер обміну"},users:{title:"Користувачі",description:"Керування користувачами.",createUser:"Створити користувача",editUser:"Редагувати користувача",searchUsers:"Пошук користувачів...",createUserFailed:"Створити користувача не вдалося",createUserSuccess:"Користувача створено успішно",editUserFailed:"Редагувати користувача не вдалося",editUserSuccess:"Користувача редаговано успішно",deleteUserSuccess:"Користувача видалено успішно",deleteUserFailed:"Користувача видалено не вдалося",form:{name:"Назва",description:"Опис",color:"Колір",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"}},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Посібник з меню",general:"Посібник",media:"Посібник з медіа",settings:"Посібник з налаштувань",users:"Посібник з користувачів",content:"Посібник з контенту",appOverview:"Посібник з огляду програми",collections:"Посібник з колекцій",help:"Допомога"}},E4=Object.freeze(Object.defineProperty({__proto__:null,cms:Ii,default:{cms:Ii}},Symbol.toStringTag,{value:"Module"}));qe.ArticlesPage=vs,qe.BuilderPage=iE,qe.CmsContentWrapper=d4,qe.CollectionsPage=Ln,qe.Dashboard=Tn,qe.EditCollectionPage=$B,qe.default=Tn,qe.i18n=$l,qe.initI18n=f4,qe.install=g4,qe.loadLocaleMessages=h4,qe.setLocale=p4,Object.defineProperties(qe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});