@opengis/widgets 0.0.32 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.cjs
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
(function(te,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@opengis/core")):typeof define=="function"&&define.amd?define(["exports","vue","@opengis/core"],e):(te=typeof globalThis<"u"?globalThis:te||self,e(te.WidgetLib={},te.Vue,te.OpenGISCore))})(this,(function(te,e,
|
|
1
|
+
(function(te,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@opengis/core")):typeof define=="function"&&define.amd?define(["exports","vue","@opengis/core"],e):(te=typeof globalThis<"u"?globalThis:te||self,e(te.WidgetLib={},te.Vue,te.OpenGISCore))})(this,(function(te,e,et){"use strict";function So(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const Bo=So(e);/**
|
|
2
2
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const es=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),To=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,s,o)=>o?o.toUpperCase():s.toLowerCase()),$o=t=>{const n=To(t);return n.charAt(0).toUpperCase()+n.slice(1)},Do=(...t)=>t.filter((n,s,o)=>!!n&&n.trim()!==""&&o.indexOf(n)===s).join(" ").trim();/**
|
|
7
7
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var
|
|
11
|
+
*/var bt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
12
12
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const
|
|
16
|
+
*/const Oo=({size:t,strokeWidth:n=2,absoluteStrokeWidth:s,color:o,iconNode:r,name:l,class:i,...a},{slots:c})=>e.h("svg",{...bt,width:t||bt.width,height:t||bt.height,stroke:o||bt.stroke,"stroke-width":s?Number(n)*24/Number(t):n,class:Do("lucide",...l?[`lucide-${es($o(l))}-icon`,`lucide-${es(l)}`]:["lucide-icon"]),...a},[...r.map(f=>e.h(...f)),...c.default?[c.default()]:[]]);/**
|
|
17
17
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const X=(t,n)=>(s,{slots:o})=>e.h(
|
|
21
|
+
*/const X=(t,n)=>(s,{slots:o})=>e.h(Oo,{...s,iconNode:n,name:t},o);/**
|
|
22
22
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const
|
|
26
|
+
*/const Ao=X("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
27
27
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const Lo=X("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
32
32
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const
|
|
36
|
+
*/const Io=X("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
37
37
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
41
|
+
*/const ts=X("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);/**
|
|
42
42
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
46
|
+
*/const Mo=X("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
47
47
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const
|
|
51
|
+
*/const qe=X("file-text",[["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"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
52
52
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
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
|
|
56
|
+
*/const Po=X("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
57
57
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
61
|
+
*/const Ro=X("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
62
62
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
66
|
+
*/const Fo=X("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]);/**
|
|
67
67
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
71
|
+
*/const jo=X("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
72
72
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
76
|
+
*/const ns=X("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
77
77
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const
|
|
81
|
+
*/const zo=X("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
82
82
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
86
|
+
*/const ss=X("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
87
87
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
91
|
+
*/const Ho=X("reply",[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]);/**
|
|
92
92
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const os=X("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
97
97
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
101
|
+
*/const Uo=X("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/**
|
|
102
102
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
106
|
+
*/const qo=X("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
107
107
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
@@ -113,7 +113,7 @@
|
|
|
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
|
|
116
|
+
*/const Wo=X("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);/**
|
|
117
117
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
@@ -123,29 +123,29 @@
|
|
|
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
|
|
126
|
+
*/const Ko=X("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|
127
127
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const tn=X("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Wo={class:"border-t pt-3 mt-4"},Ko={class:"flex gap-2"},Go={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Jo={class:"flex-1 space-y-2"},Zo={class:"flex justify-between items-center"},Yo={class:"flex gap-2"},Xo=["disabled"],ss=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(t,{emit:n}){const s=e.useModel(t,"isReply"),o=e.ref(""),r=n,l=()=>{o.value.trim()&&(r("sendComment",o.value),o.value="")},i=a=>{(a.ctrlKey||a.metaKey)&&a.key==="Enter"&&(a.preventDefault(),l())};return(a,c)=>(e.openBlock(),e.createElementBlock("div",Wo,[e.createElementVNode("div",Ko,[e.createElementVNode("span",Go,[e.createVNode(e.unref(en),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",Jo,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=f=>o.value=f),onKeydown:i,placeholder:"Add a comment...",class:"w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"},null,544),[[e.vModelText,o.value]]),e.createElementVNode("div",Zo,[c[4]||(c[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",Yo,[s.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:c[1]||(c[1]=f=>s.value=!1)},[e.createVNode(e.unref(tn),{class:"h-3 w-3"}),c[2]||(c[2]=e.createTextVNode(" Cancel ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!o.value.trim(),onClick:l},[e.createVNode(e.unref(ns),{class:"h-3 w-3 mr-1"}),c[3]||(c[3]=e.createTextVNode(" Send ",-1))],8,Xo)])])])])]))}}),Qo={class:"z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto"},Vo=e.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:e.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(t,{emit:n}){const s=n,o=e.useModel(t,"showMoreOptions"),r=e.ref(),l=e.ref(!0),i=async f=>{o.value&&r.value&&!r.value.contains(f.target)&&!l.value&&(o.value=!1),l.value=!1},a=()=>{o.value=!1,s("edit")},c=()=>{o.value=!1,s("delete")};return e.onMounted(()=>{document.addEventListener("click",i)}),e.onUnmounted(()=>{document.removeEventListener("click",i)}),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:r},[e.createElementVNode("div",Qo,[e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",onClick:a},[e.createVNode(e.unref(Ho),{class:"h-3 w-3 mr-2"}),u[0]||(u[0]=e.createTextVNode(" Edit ",-1))]),e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",onClick:c},[e.createVNode(e.unref(Vt),{class:"h-3 w-3 mr-2"}),u[1]||(u[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),er={class:"space-y-2"},tr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},nr={class:"flex-1 min-w-0 space-y-1 relative"},sr={class:"flex items-center gap-2"},or={class:"font-medium text-xs"},rr={class:"text-xs text-gray-500"},ir={key:0,class:"text-xs text-gray-700 leading-relaxed"},lr={class:"flex justify-between text-xs"},ar={class:"flex items-center gap-2"},cr={key:0,class:"flex gap-2"},dr=["disabled"],pr={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},fr=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(t,{emit:n}){const s=n,o=t,r=e.ref(o.comment.text),l=e.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),i=e.ref("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"),a=e.ref(!1),c=e.ref(!1),f=e.ref(!1),u=e.ref(!1),m=N=>{const C=new Date,I=Math.floor((C.getTime()-N.getTime())/(1e3*60*60));return I<1?`${Math.floor((C.getTime()-N.getTime())/6e4)}m`:I<24?`${I}h`:`${Math.floor(I/24)}d`},h=()=>{u.value=!u.value,u.value?s("like",o.comment.id,"add"):s("like",o.comment.id,"delete")},v=()=>{s("edit",o.comment.id,r.value),f.value=!1},x=(N,C)=>{s("like",N,C)},_=(N,C)=>{s("edit",N,C)};return(N,C)=>{const I=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",er,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",f.value?"bg-gray-50":""])},[e.createElementVNode("span",tr,[e.createVNode(e.unref(en),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",nr,[e.createElementVNode("div",sr,[e.createElementVNode("span",or,e.toDisplayString(N.comment?.author),1),e.createElementVNode("span",rr,e.toDisplayString(m(N.comment?.createdAt)),1)]),f.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":C[0]||(C[0]=B=>r.value=B),class:e.normalizeClass(f.value?i.value:l.value)},null,2)),[[e.vModelText,r.value]]):(e.openBlock(),e.createElementBlock("p",ir,e.toDisplayString(N.comment?.text),1)),e.createElementVNode("div",lr,[e.createElementVNode("div",ar,[e.createElementVNode("button",{class:e.normalizeClass(["flex items-center gap-1",u.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:C[1]||(C[1]=B=>h())},[e.createVNode(e.unref(Po),{class:e.normalizeClass(["h-3 w-3",u.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(N.comment?.likes),1)],2),N.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-gray-500 hover:text-blue-600 transition-colors",onClick:C[2]||(C[2]=B=>c.value=!0)},[e.createVNode(e.unref(zo),{class:"h-3 w-3"})])),e.createElementVNode("button",{class:"text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",type:"button",onClick:C[3]||(C[3]=B=>a.value=!0)},[e.createVNode(e.unref(Io),{class:"h-3 w-3"})])]),f.value?(e.openBlock(),e.createElementBlock("div",cr,[e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:C[4]||(C[4]=B=>f.value=!1)},[e.createVNode(e.unref(tn),{class:"h-3 w-3"}),C[11]||(C[11]=e.createTextVNode(" Cancel ",-1))]),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!r.value.trim(),onClick:C[5]||(C[5]=B=>v())},[e.createVNode(e.unref(ns),{class:"h-3 w-3 mr-1"}),C[12]||(C[12]=e.createTextVNode(" Send ",-1))],8,dr)])):e.createCommentVNode("",!0)])]),a.value?(e.openBlock(),e.createBlock(Vo,{key:0,showMoreOptions:a.value,"onUpdate:showMoreOptions":C[6]||(C[6]=B=>a.value=B),onEdit:C[7]||(C[7]=B=>f.value=!0),onDelete:C[8]||(C[8]=B=>N.$emit("delete",N.comment?.id)),comment:N.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),N.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",pr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.comment?.replies,B=>(e.openBlock(),e.createBlock(I,{key:B.id,comment:B,isInside:!0,onDelete:T=>N.$emit("delete",B.id),onLike:x,onEdit:_},null,8,["comment","onDelete"]))),128)),c.value&&!N.isInside?(e.openBlock(),e.createBlock(ss,{key:0,onSendComment:C[9]||(C[9]=B=>N.$emit("reply",N.comment?.id,B)),isReply:c.value,"onUpdate:isReply":C[10]||(C[10]=B=>c.value=B)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),mr=["id"],ur={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},gt=e.defineComponent({__name:"CommentsWidget",props:{title:{},comments:{},maxHeight:{},onAddComment:{type:Function},onReply:{type:Function},onLike:{type:Function},onDelete:{type:Function},onEdit:{type:Function},id:{},className:{},style:{}},emits:["add","reply","like","delete","edit"],setup(t,{emit:n}){const s=t,o=n,r=e.ref(s.comments??[]);async function l(){if(!s.id)return;const m=await fetch(`/api/widget/comment/${s.id}`).then(h=>h.json());r.value=m.rows.map(h=>({id:h.communication_id,author:h.username,text:h.body,createdAt:new Date(h.cdate)}))}r.value.length===0&&l();const i=async m=>{s.onAddComment?s.onAddComment(m):s.id&&(await fetch(`/api/widget/comment/${s.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:m})}),await l()),o("add",m)},a=(m,h)=>{s?.onLike?.(m,h),o("like",m,h)},c=(m,h)=>{s.onReply?.(m,h),o("reply",m,h)},f=async(m,h)=>{s.onEdit?s.onEdit(m,h):s.id&&(await fetch(`/api/widget/comment/${s.id}/${m}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:h})}),await l()),o("edit",m,h)},u=async m=>{s.onDelete?s.onDelete(m):s.id&&(await fetch(`/api/widget/comment/${s.id}/${m}`,{method:"DELETE"}),await l()),o("delete",m)};return(m,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",m.className]),id:m.id,style:e.normalizeStyle(m.style)},[m.title?(e.openBlock(),e.createElementBlock("h3",ur,e.toDisplayString(m.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([m.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:m.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,v=>(e.openBlock(),e.createBlock(fr,{key:v.id,comment:v,onReply:c,onLike:a,onDelete:h[0]||(h[0]=x=>u(x)),onEdit:f},null,8,["comment"]))),128))],6),e.createVNode(ss,{onSendComment:h[1]||(h[1]=v=>i(v))})],14,mr))}}),os=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:We}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:jo}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:Uo}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:Ro}]]),hr={class:"mx-auto font-sans"},gr={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},yr={class:"relative"},vr={class:"space-y-3"},br={class:"flex-1 min-w-0 pb-2"},kr={class:"flex items-center gap-1.5 mb-1 mt-0.5"},Er={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Nr={class:"font-medium text-xs"},wr={class:"text-xs text-gray-500"},xr={class:"space-y-1"},_r={class:"text-xs text-gray-700"},Cr={class:"capitalize mr-1"},Sr={key:0,class:"inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"},Br={key:0,class:"flex items-center gap-1 text-xs"},$r={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},Tr={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},yt=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(t){const n=t,s=e.ref(Array.isArray(n.data)?n.data:[]);s.value.length===0&&n.id&&o();async function o(){const r=await fetch(`/api/widget/history/${n.id}`);if(!r.ok)return{data:[]};const l=await r.json();l.rows.forEach(i=>{i.timestamp=new Date(i.cdate),i.id=i.entity_id,i.entityType=i.entity_type,i.entityId=i.entity_id,i.action=i.change_type,i.userId=i.change_user_id,i.userName=i.username,i.timestamp=new Date(i.cdate),i.description=i.username,i.status=i.username}),s.value=l.rows}return(r,l)=>(e.openBlock(),e.createElementBlock("div",hr,[r.title?(e.openBlock(),e.createElementBlock("h3",gr,e.toDisplayString(r.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:r.maxHeight+"px"})},[e.createElementVNode("div",yr,[l[0]||(l[0]=e.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),e.createElementVNode("div",vr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,i=>(e.openBlock(),e.createElementBlock("div",{class:"relative flex items-start gap-2",key:i?.id},[e.createElementVNode("div",{class:e.normalizeClass(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${e.unref(os).get(i?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(os).get(i?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",br,[e.createElementVNode("div",kr,[e.createElementVNode("span",Er,[e.createVNode(e.unref(en),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",Nr,e.toDisplayString(i?.userName),1),e.createElementVNode("span",wr,e.toDisplayString(i?.timestamp.toLocaleDateString("ua-UA",{day:"2-digit",month:"2-digit",year:"numeric"}))+" "+e.toDisplayString(i?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),e.createElementVNode("div",xr,[e.createElementVNode("div",_r,[e.createElementVNode("span",Cr,e.toDisplayString(i?.action),1),i?.entityId?(e.openBlock(),e.createElementBlock("span",Sr,e.toDisplayString(i?.entityId),1)):e.createCommentVNode("",!0)]),i?.changes?.[i?.entityId]?(e.openBlock(),e.createElementBlock("div",Br,[i?.changes?.[i?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",$r,e.toDisplayString(i?.changes?.[i?.entityId]?.old),1)):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.old&&i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createBlock(e.unref(Oo),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",Tr,e.toDisplayString(i?.changes?.[i?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),Dr={key:0,class:"text-xl font-semibold"},Or={class:"flex gap-1"},Lr={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},Ir=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(t){const n=e.useModel(t,"modelValue"),s={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",o.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[o.title?(e.openBlock(),e.createElementBlock("h3",Dr,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Or,[e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",n.value==="list"?s.active:s.inactive]),onClick:r[0]||(r[0]=l=>n.value="list")},[e.createVNode(e.unref(Fo),{class:"h-4 w-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",n.value==="grid"?s.active:s.inactive]),onClick:r[1]||(r[1]=l=>n.value="grid")},[e.createVNode(e.unref(Mo),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:r[2]||(r[2]=l=>o.$emit("onAddFile",l))},null,32),e.createElementVNode("div",Lr,[e.createVNode(e.unref(ts),{class:"h-4 w-4"}),r[3]||(r[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),nn={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:We,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:Ao,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:qo,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:We,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:Do,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:es,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:es,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:We,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:We,label:"PPT"}};function rs(t,n="en"){const s={month:"short",day:"numeric"};return new Intl.DateTimeFormat(n,s).format(t)}function is(t){if(t===0)return"0 B";const n=1024,s=["B","KB","MB","GB","TB"],o=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,o)).toFixed(1))} ${s[o]}`}const Ar={class:"space-y-0.5"},Mr=["onClick"],Pr=["onClick"],Rr={class:"flex items-center gap-2"},Fr={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},zr={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},jr={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},Hr={class:"flex items-center gap-1"},Ur=["onClick"],qr=["onClick"],Wr=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",Ar,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,o=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",key:o.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",o),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(nn)[o?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(nn)[o?.ext]?.icon||e.unref(nn).pdf.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:r=>n.$emit("openLightbox",o)},[e.createElementVNode("div",Rr,[e.createElementVNode("span",Fr,e.toDisplayString(o?.uploaded_name||o?.name),1)])],8,Pr),e.createElementVNode("div",zr,e.toDisplayString(e.unref(is)(o.size)),1),e.createElementVNode("div",jr,e.toDisplayString(e.unref(rs)(o.createdAt)),1),e.createElementVNode("div",Hr,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",o),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"},[e.createVNode(e.unref(Vn),{class:"h-3 w-3"})],8,Ur),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",onClick:e.withModifiers(r=>n.$emit("delete",r,o?.file_id),["stop"])},[e.createVNode(e.unref(Vt),{class:"h-3 w-3"})],8,qr)])],8,Mr))),128))]))}}),Kr={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},Gr=["onClick"],Jr={class:"space-y-2"},Zr={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},Yr=["src"],Xr={class:"space-y-1"},Qr=["title"],Vr={class:"text-xs text-gray-500 text-left"},ei={class:"absolute top-2 right-1 flex items-center gap-1"},ti=["onClick"],ni=["onClick"],si=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",Kr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",o),["stop"]),class:"group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"},[e.createElementVNode("div",Jr,[e.createElementVNode("div",Zr,[o.ext==="png"||o.ext==="jpg"||o.ext==="jpeg"||o.ext==="gif"||o.ext==="svg"||o.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${o?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,Yr)):(e.openBlock(),e.createBlock(e.unref(We),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",Xr,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:o.uploaded_name||o.name},e.toDisplayString(o.uploaded_name||o.name),9,Qr),e.createElementVNode("p",Vr,e.toDisplayString(e.unref(rs)(o.createdAt))+", "+e.toDisplayString(e.unref(is)(o.size)),1)])]),e.createElementVNode("div",ei,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",o),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"},[e.createVNode(e.unref(Vn),{class:"h-3 w-3"})],8,ti),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",onClick:e.withModifiers(r=>n.$emit("delete",r,o?.file_id),["stop"])},[e.createVNode(e.unref(Vt),{class:"h-3 w-3"})],8,ni)])],8,Gr))),128))]))}}),oi={class:"mx-auto font-sans"},ri={key:1},vt=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const s=t,o=e.ref(!1),r=e.ref(null),l=e.ref(!1),i=e.ref(0),a=e.ref(s.files??[]),c=n;a.value.length===0&&C();const f=(T,S)=>{r.value=S,o.value=!0},u=()=>{r.value&&(x(r.value),r.value=null,o.value=!1)},m=e.computed(()=>Array.isArray(a.value)?a.value.map(T=>T?.file_path):[]),h=T=>{const S=m.value.findIndex(W=>W===T.file_path);S!==-1&&(l.value=!0,i.value=S)},v=T=>{s.onAddFile?s.onAddFile(T):I(T),c("add",T)},x=T=>{s.onDelete?s.onDelete(T):B(T),c("delete",T)},_=T=>{const S=document.createElement("a");S.setAttribute("download",T?.uploaded_name||T?.name),S.href=T?.file_path||T?.path,S.click()},N=e.ref("list");async function C(){if(!s.id)return;const T=await fetch(`/api/widget/file/${s.id}`).then(S=>S.json());T.rows.forEach(S=>{S.timestamp=new Date(S.cdate),S.id=S.entity_id,S.entityType=S.entity_type,S.entityId=S.entity_id,S.entityType=S.entity_type,S.action=S.change_type,S.userId=S.change_user_id,S.userName=S.username,S.timestamp=new Date(S.cdate),S.description=S.username,S.status=S.username}),a.value=T.rows}const I=async T=>{if(!(!T.target||!T.target.files||T.target.files.length===0))try{await Promise.all(Array.from(T.target.files).map(async S=>{const W=new FormData;W.append("file",S);const ee=`/api/widget/file/${s.id}`,O=await fetch(ee,{method:"POST",body:W});if(!O.ok)throw new Error(`HTTP error! status: ${O.status}`);return S})),await C()}catch(S){console.error("Помилка при завантаженні файлів:",S)}},B=async T=>{try{await fetch(`/api/widget/file/${s.id}/${T}`,{method:"DELETE"}),await C()}catch(S){console.error(S)}};return(T,S)=>{const W=e.resolveComponent("MessageBox"),ee=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",oi,[e.createVNode(Ir,{modelValue:N.value,"onUpdate:modelValue":S[0]||(S[0]=O=>N.value=O),title:s.title,onOnAddFile:S[1]||(S[1]=O=>v(O))},null,8,["modelValue","title"]),a.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(T.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:T.maxHeight+"px"})},[N.value==="list"?(e.openBlock(),e.createBlock(Wr,{key:0,onDelete:f,onDownload:_,onOpenLightbox:S[2]||(S[2]=O=>h(O)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0),N.value==="grid"?(e.openBlock(),e.createBlock(si,{key:1,onDelete:f,onDownload:_,onOpenLightbox:S[3]||(S[3]=O=>h(O)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",ri,S[6]||(S[6]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])))]),e.createVNode(W,{modelValue:o.value,"onUpdate:modelValue":S[4]||(S[4]=O=>o.value=O),onConfirm:u,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode(ee,{modelValue:l.value,"onUpdate:modelValue":S[5]||(S[5]=O=>l.value=O),images:m.value,"start-index":i.value},null,8,["modelValue","images","start-index"])],64)}}}),ii={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},li=["onClick"],ai={key:0,rel:"noreferrer",class:"relative block h-full w-full"},ci=["src"],di={key:0,class:"thumb-cover"},pi=e.defineComponent({__name:"GalleryContent",props:{title:{},items:{},columns:{},maxHeight:{},onAddImage:{type:Function},onDelete:{type:Function},id:{},className:{},style:{}},emits:["delete"],setup(t,{emit:n}){const s=n,o=e.ref(!1),r=e.ref(0),l=t,i=e.computed(()=>Array.isArray(l.items)?l.items.map(c=>c?.file_path):[]),a=c=>{const f=i.value.findIndex(u=>u===c.file_path);f!==-1&&(o.value=!0,r.value=f)};return(c,f)=>{const u=e.resolveComponent("Lightbox");return c.items?.length>=1?(e.openBlock(),e.createElementBlock("div",ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.items,(m,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["h-full w-full image"+h,"cursor-pointer bg-teal-500 rounded-[3px]"]),key:h,onClick:e.withModifiers(v=>a(m),["stop"])},[h<5?(e.openBlock(),e.createElementBlock("div",ai,[e.createElementVNode("img",{src:`/file/resize?filepath=${m?.file_path}&w=500`,alt:"alt",height:"auto",width:"100%",class:e.normalizeClass(["object-cover h-full w-full bg-gray-200 rounded-[3px]",h===0?"max-h-[411px]":"max-h-[calc((411px-3px)/2)]"])},null,10,ci),h===4&&c.items?.length>5?(e.openBlock(),e.createElementBlock("div",di," +"+e.toDisplayString(c.items?.length-5),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,li))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Math.max(0,5-c.items.length),m=>(e.openBlock(),e.createElementBlock("div",{key:"empty-"+m,class:e.normalizeClass(["h-full w-full image"+(c.items.length+m-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),e.createVNode(u,{modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=m=>o.value=m),images:i.value,"start-index":r.value,delete:"true",download:"true",onDelete:f[1]||(f[1]=m=>s("delete",m))},null,8,["modelValue","images","start-index"])])):e.createCommentVNode("",!0)}}}),fi={key:0,class:"text-xl font-semibold"},mi={class:"flex gap-1"},ui={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},hi=e.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",n.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[n.title?(e.openBlock(),e.createElementBlock("h3",fi,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",mi,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:s[0]||(s[0]=o=>n.$emit("onAddImage",o))},null,32),e.createElementVNode("div",ui,[e.createVNode(e.unref(ts),{class:"h-4 w-4"}),s[1]||(s[1]=e.createTextVNode(" Додати зображення ",-1))])])])],2))}}),gi={class:"w-full mx-auto font-sans",ref:"containerRef"},yi={key:1},bt=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const s=t,o=e.ref(s.items??[]),r=n;o.value.length===0&&c();const l=u=>{s.onAddImage?s.onAddImage(u):a(u),r("add",u)},i=u=>{const m=o.value.find(h=>h.file_path===u)?.file_id;m&&(s.onDelete?s.onDelete(m):f(m))},a=async u=>{if(!(!u.target||!u.target.files||u.target.files.length===0))try{await Promise.all(Array.from(u.target.files).map(async m=>{const h=new FormData;h.append("file",m);const v=`/api/widget/file/${s.id}`,x=await fetch(v,{method:"POST",body:h});if(!x.ok)throw new Error(`HTTP error! status: ${x.status}`);return m})),await c()}catch(m){console.error("Помилка при завантаженні файлів:",m)}};async function c(){if(!s.id)return;const u=await fetch(`/api/widget/file/${s.id}`).then(m=>m.json());o.value=u.rows}const f=async u=>{try{await fetch(`/api/widget/file/${s.id}/${u}`,{method:"DELETE"}),await c()}catch(m){console.error(m)}};return(u,m)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createVNode(hi,{title:u.title,onOnAddImage:m[0]||(m[0]=h=>l(h))},null,8,["title"]),o.value.length>0?(e.openBlock(),e.createBlock(pi,{key:0,items:o.value,onDelete:m[1]||(m[1]=h=>i(h))},null,8,["items"])):(e.openBlock(),e.createElementBlock("div",yi,m[2]||(m[2]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])))],512))}}),vi={class:"text-value"},bi={class:"text-sm text-gray-900"},ki=e.defineComponent({__name:"TextValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{const o=n.item.value;return typeof o=="boolean"?o?"Так":"Ні":o==null?"—":String(o)});return(o,r)=>(e.openBlock(),e.createElementBlock("div",vi,[e.createElementVNode("span",bi,e.toDisplayString(s.value),1)]))}}),Ie=(t,n)=>{const s=t.__vccOpts||t;for(const[o,r]of n)s[o]=r;return s},Ei=Ie(ki,[["__scopeId","data-v-34a76c89"]]),Ni={class:"link-value"},wi=["href"],xi=Ie(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{const o=String(n.item.value);try{const r=new URL(o);return r.hostname+r.pathname}catch{return o}});return(o,r)=>(e.openBlock(),e.createElementBlock("div",Ni,[e.createElementVNode("a",{href:String(o.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(s.value)+" ",1),r[0]||(r[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,wi)]))}}),[["__scopeId","data-v-932f028c"]]),_i={class:"date-value"},Ci={class:"text-sm text-gray-900"},Si=Ie(e.defineComponent({__name:"DateValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{const o=n.item.value;if(o instanceof Date)return o.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof o=="string"){const r=new Date(o);if(!isNaN(r.getTime()))return r.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(o)});return(o,r)=>(e.openBlock(),e.createElementBlock("div",_i,[e.createElementVNode("span",Ci,e.toDisplayString(s.value),1)]))}}),[["__scopeId","data-v-cd4df08e"]]),Bi={class:"status-value"},$i={key:0,class:"mr-1"},Ti=Ie(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{switch(String(n.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"bg-green-100 text-green-800";case"inactive":case"неактивний":case"pending":case"очікує":return"bg-yellow-100 text-yellow-800";case"error":case"помилка":case"failed":case"неуспішно":return"bg-red-100 text-red-800";case"draft":case"чернетка":return"bg-gray-100 text-gray-800";default:return"bg-blue-100 text-blue-800"}}),o=e.computed(()=>{switch(String(n.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"fas fa-check-circle";case"inactive":case"неактивний":case"pending":case"очікує":return"fas fa-clock";case"error":case"помилка":case"failed":case"неуспішно":return"fas fa-exclamation-circle";case"draft":case"чернетка":return"fas fa-edit";default:return"fas fa-info-circle"}});return(r,l)=>(e.openBlock(),e.createElementBlock("div",Bi,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",s.value])},[o.value?(e.openBlock(),e.createElementBlock("span",$i,[e.createElementVNode("i",{class:e.normalizeClass(o.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(r.item.value)),1)],2)]))}}),[["__scopeId","data-v-aea1f529"]]),Di={class:"custom-value"},Oi={class:"text-sm text-gray-900"},Li=Ie(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",Di,[e.renderSlot(n.$slots,"default",{item:n.item,value:n.item.value},()=>[e.createElementVNode("span",Oi,e.toDisplayString(String(n.item.value)),1)],!0)]))}}),[["__scopeId","data-v-12c8b3f3"]]),Ii=["id"],Ai={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Mi={key:1,class:"overflow-x-auto"},Pi={class:"min-w-full divide-y divide-gray-200"},Ri={class:"bg-white divide-y divide-gray-200"},Fi={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},zi={class:"flex items-center gap-2"},ji=["title"],Hi={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},Ui={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},qi={class:"flex items-start gap-3"},Wi={key:0,class:"flex-shrink-0"},Ki={class:"flex-1 min-w-0"},Gi={class:"flex items-center gap-2 mb-2"},Ji={class:"text-sm font-medium text-gray-900"},Zi=["title"],Yi={key:3,class:"overflow-x-auto"},Xi={class:"min-w-full divide-y divide-gray-200"},Qi={class:"bg-white divide-y divide-gray-200"},Vi={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},el={class:"flex items-center gap-2"},tl=["title"],nl={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},sn=Ie(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(t){const n=s=>{switch(s.type){case"link":return xi;case"date":return Si;case"status":return Ti;case"custom":return Li;default:return Ei}};return(s,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",s.className]),id:s.id,style:e.normalizeStyle(s.style)},[s.title?(e.openBlock(),e.createElementBlock("h3",Ai,e.toDisplayString(s.title),1)):e.createCommentVNode("",!0),s.view==="table"?(e.openBlock(),e.createElementBlock("div",Mi,[e.createElementVNode("table",Pi,[e.createElementVNode("tbody",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",Fi,[e.createElementVNode("div",zi,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},o[0]||(o[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,ji)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",Hi,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])])):s.view==="grid"?(e.openBlock(),e.createElementBlock("div",Ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id||r.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[e.createElementVNode("div",qi,[r.icon?(e.openBlock(),e.createElementBlock("div",Wi,[e.createElementVNode("i",{class:e.normalizeClass([r.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ki,[e.createElementVNode("div",Gi,[e.createElementVNode("h4",Ji,e.toDisplayString(r.label),1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:r.tooltip},o[1]||(o[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,Zi)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",Yi,[e.createElementVNode("table",Xi,[e.createElementVNode("tbody",Qi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",Vi,[e.createElementVNode("div",el,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},o[2]||(o[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,tl)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",nl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])]))],14,Ii))}}),[["__scopeId","data-v-106790ef"]]),sl={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 ol(t){return t?t.type==="FeatureCollection"||t.type==="Feature"?t:t.geom?{type:"Feature",geometry:{type:t.geom.type,coordinates:t.geom.coordinates},properties:{}}:t.type&&t.coordinates?{type:"Feature",geometry:t,properties:{}}:null:null}const rl={key:0,class:"absolute inset-0 z-[600] flex items-center justify-center pointer-events-none bg-black/20"},il={class:"bg-black/70 text-white text-xs sm:text-sm px-4 py-2 rounded-md shadow"},ll={class:"bg-white/95 border border-gray-200 rounded-md shadow-xl px-3 py-2 max-w-[240px] text-[11px] sm:text-xs text-gray-900"},al={class:"font-semibold truncate text-gray-900"},cl={class:"mt-1 space-y-0.5"},dl={class:"text-gray-500"},pl={class:"text-gray-900 text-right break-all"},fl={key:3,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"},ml={class:"flex items-center justify-between p-2 border-b"},ul={class:"p-2 border-b"},hl={class:"flex items-center"},gl=["value"],yl={class:"ml-2"},vl={class:"p-2"},bl={class:"flex items-center"},kl=["checked","onChange"],El={class:"ml-2"},kt=e.defineComponent({__name:"MapWidget",props:{pattern:{},geom:{},id:{},tms:{},layers:{},title:{},height:{},bounds:{}},setup(t){function n(p){let d=p?.parent??null;for(;d;){const k=d.props?.view;if(k==="tabs"||k==="vertical-tabs")return!0;d=d.parent??null}return!1}const s=t,o=e.getCurrentInstance(),r=e.inject("vsCardTabsContext",!1),l=e.computed(()=>(typeof r=="boolean"?r:r.value)?!0:n(o)),i=o?.appContext.config.globalProperties?.$settings??{},a=(()=>{const p=Array.isArray(i.center)?i.center:[],d=Number(p[0]),k=Number(p[1]);return Number.isFinite(d)&&Number.isFinite(k)?[d,k]:[50,30]})(),c=o?.uid??Math.floor(Math.random()*1e4),f=e.ref(null);let u,m,h,v;const x=He(),_=e.ref(Object.keys(x)[0]),N=`base-layer-${c}`;let C;const I=e.ref(!0),B=e.ref(!1),T=e.ref(!1),S=e.ref(!1),W=e.ref("Використовуйте Ctrl + колесо миші для зміни масштабу");let ee=null;const O=e.reactive({}),A=e.ref([]),z=e.computed(()=>A.value.map(p=>O[p]).filter(Boolean)),R=e.ref(null),y=e.computed(()=>R.value?.title||R.value?.layerId||""),$=e.computed(()=>R.value?.entries??[]),b=e.computed(()=>{if(!R.value)return;const p=12,d=R.value.point.x+p,k=R.value.point.y+p;return{left:`${d}px`,top:`${k}px`}}),D=e.computed(()=>{if(B.value)return"fixed inset-0 w-screen h-screen z-[9999] bg-white";const p=["relative","h-full"];return s.height||p.push("min-h-[300px]"),s.title&&!l.value&&p.push("pb-[3.25rem]"),p.join(" ")}),J=e.computed(()=>B.value||s.height==null?void 0:{height:typeof s.height=="number"?`${s.height}px`:String(s.height)}),ve=e.computed(()=>{const p=["w-full","h-full"];return!s.height&&!B.value&&p.push("min-h-[300px]"),p.join(" ")});async function be(){const p=g=>{if(!Array.from(document.styleSheets??[]).some(M=>M?.href?.includes(g))){const M=document.createElement("link");M.rel="stylesheet",M.href=g,document.head.appendChild(M)}};p("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),p("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css");const d=g=>new Promise((L,M)=>{if(Array.from(document.scripts??[]).some(H=>H.src===g))return L();const K=document.createElement("script");K.src=g,K.async=!0,K.onload=()=>L(),K.onerror=H=>M(H),document.body.appendChild(K)});return await d("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").catch(()=>{}),await d("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js").catch(()=>{}),await d("https://unpkg.com/leaflet.vectorgrid@1.3.0/dist/Leaflet.VectorGrid.bundled.js").catch(()=>{}),window.L}function He(){const p=d=>d.map((k,g)=>{const L=typeof k?.key=="string"&&k.key?k.key:`b${g}`,M=xe(k?.url);return M?{...k,key:L,url:M}:null}).filter(k=>!!k).reduce((k,g)=>({...k,[g.key]:g}),{});return Array.isArray(i?.basemaps)&&i.basemaps.length?p(i.basemaps):p([{key:"topo100",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"},{key:"orto10",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"},{key:"osmb",url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"}])}function xe(p){if(typeof p!="string"||!p.trim())return"";const d=p.trim();if(/^https?:\/\//i.test(d))return d;const k=window.location?.origin??"",g=d.replace(/^\/+/,"");return k?`${k}/${g}`:`/${g}`}function ke(p,d){return p?.id!=null?String(p.id):p?.url?`${p.url}-${d}`:`layer-${d}`}function Se(p){if(!p||typeof p!="object")return;const d={},k=j=>{if(typeof j=="string"){const P=j.trim().replace(/,+$/,"");return P?/^-?\d+(\.\d+)?$/.test(P)?Number(P):P:void 0}return j},g=()=>(d.colorSet||(d.colorSet={}),d.colorSet),L=(j,P)=>{if(j==null||typeof P!="string")return;const K=P.trim().replace(/,+$/,"");K&&(g()[String(j)]=K)},M=j=>{const P=["color","fill","hex","valueColor","value_color"].map(H=>j[H]).find(H=>typeof H=="string"&&H.trim());if(!P)return!1;const K=["value","key","id","code","status"].map(H=>j[H]).find(H=>H!=null&&H!=="");return K==null?!1:(L(K,P),!0)};return Object.entries(p).forEach(([j,P])=>{if(j==="colorSet"&&P!=null){Array.isArray(P)?P.forEach(H=>{H&&(typeof H=="object"&&M(H)||typeof H=="object"&&Object.entries(H).forEach(([Qt,wo])=>L(Qt,typeof wo=="string"?wo:void 0)))}):typeof P=="object"&&(M(P)||Object.entries(P).forEach(([H,Qt])=>L(H,typeof Qt=="string"?Qt:void 0)));return}const K=k(P);if(K!==void 0){if(j==="border"){typeof K=="number"&&d.width==null?d.width=K:typeof K=="string"&&d.stroke==null&&(d.stroke=K);return}d[j]=K}}),d.colorSet&&!Object.keys(d.colorSet).length&&delete d.colorSet,Object.keys(d).length?d:void 0}function Wn(){if(Array.isArray(s.layers)&&s.layers.length)return s.layers.map((d,k)=>{if(!d)return null;const g=ke(d,k),L=d.url||(s.pattern&&g?s.pattern.replace("{{id}}",String(d.id??g)):"");return L?{...d,id:g,url:L,name:d.name||`Шар ${k+1}`,style:Se(d.style)}:null}).filter(d=>!!d?.url);const p=Array.isArray(s.tms)?s.tms:s.tms?.split(",");return p?p.map((d,k)=>{if(!d)return null;const g=typeof d=="string"?d.trim():`${d}`;if(!g)return null;const L=`legacy-${k}`,M=s.pattern?s.pattern.replace("{{id}}",g):g;return{id:L,name:`Шар ${k+1}`,url:M,visible:!0}}).filter(d=>!!d?.url):[]}function Ue(p){const d=(p?.url??"").trim();if(!d)return"";if(/^https?:\/\//i.test(d))return d;const k=window.location?.origin??"",g=d.replace(/^\/+/,"");return`${k}/${g}`}function Ut(p){const d=p.style??{};return k=>{const g=d.colorAttr,L=d.colorSet??{},M=typeof g=="string"?L?.[k?.[g]]??d.color??"#3388ff":d.color??"#3388ff",j=d.stroke??M;return{weight:d.width??1,color:j,opacity:d.opacity??1,fill:d.type?d.type!=="polyline":!0,fillColor:M,fillOpacity:d.opacity??.5}}}function qt(p,d){if(!u||!d?.latlng||p.popup===!1)return;const k=u.latLngToContainerPoint(d.latlng),g=Wt(d),L=Kt(p,g);if(!L.length){qe(p.id);return}R.value={layerId:p.id,title:g?.name??p.name,properties:g,entries:L,point:{x:k.x,y:k.y}}}function qe(p){p&&R.value?.layerId!==p||(R.value=null)}function Wt(p){return p?.layer?.properties||p?.layer?.feature?.properties||p?.properties||p?.data||{}}function Kt(p,d={}){const k=g=>g==null||g===""?"—":typeof g=="object"?JSON.stringify(g):String(g);return p.popup&&Array.isArray(p.popup)&&p.popup.length?p.popup.map(g=>({label:g.label||g.field,value:k(d?.[g.field])})):Object.entries(d).map(([g,L])=>({label:g,value:k(L)}))}function Kn(p,d){if(!u||p.popup===!1||!d?.latlng)return;const k=Wt(d),g=Kt(p,k);if(!g.length)return;const L=p.name||k?.name,M=['<div class="map-popup">'];L&&M.push(`<div class="map-popup__title">${L}</div>`),M.push('<div class="map-popup__body">'),g.forEach(j=>{M.push(`<div class="map-popup__row"><span class="map-popup__label">${j.label}</span><span class="map-popup__value">${j.value}</span></div>`)}),M.push("</div></div>"),v.popup({maxWidth:360}).setLatLng(d.latlng).setContent(M.join("")).openOn(u)}e.onMounted(async()=>{v=await be(),v.drawLocal={...sl};const p=typeof i?.zoom=="number"&&Number.isFinite(i.zoom)?i.zoom:10;u=v.map(f.value,{zoomControl:!1}).setView(a,p),v.control.zoom({position:"bottomright"}).addTo(u),C=v.tileLayer(x[_.value].url,{maxZoom:19}).addTo(u),m=new v.FeatureGroup().addTo(u),ft(),Jt(),ee=w();const d=ol(s.geom);if(d){const k=[];v.geoJSON(d).eachLayer(g=>k.push(g)),k.length&&m.addLayer(k[0]),E()}if(f.value){const k=new ResizeObserver(()=>{u&&u.invalidateSize()});k.observe(f.value),e.onBeforeUnmount(()=>{k.disconnect()})}}),e.onBeforeUnmount(()=>{ee?.(),Zn(),h&&u?.hasLayer(h)&&u.removeLayer(h)});function Gn(p){const d=(p?.service??"").toLowerCase();if(d)return d;const k=(p?.url??"").toLowerCase();return/\.(mvt|pbf|vtile|vmt)(\?|$)/.test(k)?"vtile":/service=wms|request=getmap|\/(wms|ows)(\?|$)/.test(k)?"wms":""}function Gt(p){const d=Gn(p),k=Ue(p),L={opacity:p?.style?.opacity??1,...p.options??{}},M=!!(p?.style&&Object.keys(p.style).length),j=p.sourceLayer||p.layer||p.service_layer||p.service_key||p.map_key||p.dataset?.layer||p.id;if(d==="vtile"){const P=v?.vectorGrid;if(P?.protobuf&&(M||!v?.maplibreGL)){const K=P.protobuf(k,{interactive:!0,maxNativeZoom:p.maxzoom??19,vectorTileLayerStyles:{[j??"default"]:Ut(p),default:Ut(p)}});return K.on?.("mouseover",H=>qt(p,H)),K.on?.("mousemove",H=>qt(p,H)),K.on?.("mouseout",()=>qe(p.id)),K.on?.("click",H=>Kn(p,H)),K}if(!M&&v?.maplibreGL&&window?.maplibregl){const K=k;return v.maplibreGL({style:K,interactive:!1,pane:"overlayPane"})}}if(d==="wms"&&v?.tileLayer?.wms){const P={...p.params??{}};return j&&!P.layers&&(P.layers=j),P.format==null&&(P.format="image/png"),P.transparent==null&&(P.transparent=!0),v.tileLayer.wms(k,{...P,...L})}return v.tileLayer(k,L)}function Ee(p){const d=("bounds"in p?p.bounds:void 0)??s.bounds;if(!Array.isArray(d)||!d.length||!v)return null;const g={color:p.style?.stroke??p.style?.color??"#2563eb",weight:p.style?.width??2,interactive:!1,opacity:p.style?.opacity??.8,dashArray:"4 4"},L=Array.isArray(p.bounds)&&p.bounds.length?p.bounds:d,M=Jn(L);if(!M.length||!v.polyline)return null;const j=M.map(P=>{if(!P.length)return P;const K=P[0],H=P[P.length-1];return K&&H&&(!H.equals||!H.equals(K))?[...P,K]:P});return v.polyline(j,g)}function Jn(p){const d=g=>{if(!Array.isArray(g)||g.length<2)return null;const[L,M]=g;return!Number.isFinite(Number(M))||!Number.isFinite(Number(L))?null:v.latLng(Number(M),Number(L))},k=g=>Array.isArray(g)&&g.length>=2&&g.every(L=>Number.isFinite(Number(L)));if(!Array.isArray(p))return[];if(p.length&&k(p[0])){const g=p.map(d).filter(Boolean);return g.length?[g]:[]}return p.length&&Array.isArray(p[0])&&k(p[0][0])?p.map(L=>Array.isArray(L)?L.map(d).filter(Boolean):[]).filter(L=>L.length):[]}function Zn(){Object.values(O).forEach(p=>{p.layer&&u?.hasLayer(p.layer)&&u.removeLayer(p.layer),p.boundsLayer&&u?.hasLayer(p.boundsLayer)&&u.removeLayer(p.boundsLayer),p.layer=null,p.boundsLayer=null}),qe()}function Jt(){if(!u)return;h&&u.hasLayer(h)&&u.removeLayer(h);const p=Ee({id:"global-bounds",bounds:s.bounds,style:{}});p?(h=p,h.addTo(u)):h=null}function Zt(){u&&A.value.forEach(p=>{const d=O[p];d&&(d.visible?(d.layer||(d.layer=Gt(d.config)),d.boundsLayer||(d.boundsLayer=Ee(d.config)),d.layer&&!u.hasLayer(d.layer)&&d.layer.addTo(u),d.boundsLayer&&!u.hasLayer(d.boundsLayer)&&d.boundsLayer.addTo(u)):(d.layer&&u.hasLayer(d.layer)&&u.removeLayer(d.layer),d.boundsLayer&&u.hasLayer(d.boundsLayer)&&u.removeLayer(d.boundsLayer)))})}function ft(){const p=Wn(),d=[],k=new Set;p.forEach((g,L)=>{const M=ke(g,L);d.push(M),k.add(M);const j=O[M];j&&j.config.url!==g.url&&(j.layer&&u?.hasLayer(j.layer)&&u.removeLayer(j.layer),j.layer=null);const P=j?.visible??g.visible??g.overlay!==!1;O[M]={id:M,config:{...g,id:M},visible:P,layer:j?.layer??null,boundsLayer:j?.boundsLayer??null}}),Object.keys(O).forEach(g=>{if(!k.has(g)){const L=O[g];L?.layer&&u?.hasLayer(L.layer)&&u.removeLayer(L.layer),delete O[g]}}),A.value=d,u&&Zt()}function Yn(p,d){const k=typeof d=="boolean"?d:d.target?.checked;if(k==null)return;const g=O[p];g&&(g.visible=k,g.visible?(g.layer||(g.layer=Gt(g.config)),g.boundsLayer||(g.boundsLayer=Ee(g.config)),g.layer&&!u.hasLayer(g.layer)&&g.layer.addTo(u),g.boundsLayer&&!u.hasLayer(g.boundsLayer)&&g.boundsLayer.addTo(u)):(g.layer&&u.hasLayer(g.layer)&&(u.removeLayer(g.layer),qe(p)),g.boundsLayer&&u.hasLayer(g.boundsLayer)&&u.removeLayer(g.boundsLayer)))}function Yt(p){mt(p),_.value=p}function mt(p){if(!u||!x[p])return;C&&C.removeFrom(u);const d=x[p];C=v.tileLayer(d.url,d.options||{}).addTo(u),C.bringToBack()}function ut(){!u||!m||I.value&&!u.hasLayer(m)&&m.addTo(u)}function Xn(){Yt(_.value)}function Xt(){I.value?m.addTo(u):m.removeFrom(u)}function E(p=30){const d=m.getLayers();if(!d.length)return;const g=v.featureGroup(d).getBounds();g&&g.isValid()&&u.fitBounds(g,{padding:[p,p],maxZoom:16})}function w(){if(!u||!f.value)return null;u.scrollWheelZoom.disable(),W.value="Використовуйте Ctrl + колесо миші для зміни масштабу";let p;const d=(g=1500)=>{S.value=!0,p&&clearTimeout(p),p=window.setTimeout(()=>S.value=!1,g)},k=g=>{if(!(g.ctrlKey||g.metaKey||g.shiftKey)){d(),u.scrollWheelZoom.disable();return}g.preventDefault(),g.stopPropagation(),u.scrollWheelZoom.enable(),S.value=!1,p&&clearTimeout(p),p=window.setTimeout(()=>u.scrollWheelZoom.disable(),200)};return f.value.addEventListener("wheel",k,{passive:!1}),()=>{u.scrollWheelZoom.enable(),f.value?.removeEventListener("wheel",k),p&&clearTimeout(p),S.value=!1}}return e.watch(B,async()=>{await e.nextTick(),requestAnimationFrame(()=>{u?.invalidateSize(!0),mt(_.value),ut(),Zt(),h&&!u?.hasLayer(h)&&h.addTo(u)})}),e.watch(()=>s.layers,()=>ft(),{deep:!0}),e.watch(()=>[s.tms,s.pattern],()=>{s.layers?.length||ft()}),e.watch(()=>s.bounds,()=>Jt(),{deep:!0}),(p,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(D.value),style:e.normalizeStyle(J.value)},[e.createElementVNode("div",{ref_key:"mapContainer",ref:f,class:e.normalizeClass(ve.value)},null,2),S.value?(e.openBlock(),e.createElementBlock("div",rl,[e.createElementVNode("div",il,e.toDisplayString(W.value),1)])):e.createCommentVNode("",!0),$.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:"absolute z-[550] pointer-events-none",style:e.normalizeStyle(b.value)},[e.createElementVNode("div",ll,[e.createElementVNode("div",al,e.toDisplayString(y.value),1),e.createElementVNode("dl",cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,k=>(e.openBlock(),e.createElementBlock("div",{key:`${k.label}-${k.value}`,class:"flex justify-between gap-2"},[e.createElementVNode("dt",dl,e.toDisplayString(k.label),1),e.createElementVNode("dd",pl,e.toDisplayString(k.value),1)]))),128))])])],4)):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:d[0]||(d[0]=k=>T.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer layers-button"}," Шари ")),T.value?(e.openBlock(),e.createElementBlock("div",fl,[e.createElementVNode("div",ml,[d[5]||(d[5]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:d[1]||(d[1]=k=>T.value=!1),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4"},d[4]||(d[4]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))]),e.createElementVNode("div",ul,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(x),(k,g)=>(e.openBlock(),e.createElementBlock("div",{key:`base-${g}`},[e.createElementVNode("label",hl,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:N,value:g,"onUpdate:modelValue":d[2]||(d[2]=L=>_.value=L),onChange:Xn},null,40,gl),[[e.vModelRadio,_.value]]),e.createElementVNode("span",yl,e.toDisplayString(k.name||g),1)])]))),128))]),e.createElementVNode("div",vl,[e.createElementVNode("label",bl,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":d[3]||(d[3]=k=>I.value=k),onChange:Xt},null,544),[[e.vModelCheckbox,I.value]]),d[6]||(d[6]=e.createElementVNode("span",{class:"ml-2"},"Геометрія/Межі",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,k=>(e.openBlock(),e.createElementBlock("label",{class:"flex items-center",key:k.id},[e.createElementVNode("input",{type:"checkbox",checked:k.visible,onChange:g=>Yn(k.id,g)},null,40,kl),e.createElementVNode("span",El,e.toDisplayString(k.config.name||k.id),1)]))),128))])])):e.createCommentVNode("",!0)],6))}});/**
|
|
131
|
+
*/const tn=X("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Go={class:"border-t pt-3 mt-4"},Jo={class:"flex gap-2"},Zo={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Yo={class:"flex-1 space-y-2"},Xo={class:"flex justify-between items-center"},Qo={class:"flex gap-2"},Vo=["disabled"],rs=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(t,{emit:n}){const s=e.useModel(t,"isReply"),o=e.ref(""),r=n,l=()=>{o.value.trim()&&(r("sendComment",o.value),o.value="")},i=a=>{(a.ctrlKey||a.metaKey)&&a.key==="Enter"&&(a.preventDefault(),l())};return(a,c)=>(e.openBlock(),e.createElementBlock("div",Go,[e.createElementVNode("div",Jo,[e.createElementVNode("span",Zo,[e.createVNode(e.unref(en),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",Yo,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=f=>o.value=f),onKeydown:i,placeholder:"Add a comment...",class:"w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"},null,544),[[e.vModelText,o.value]]),e.createElementVNode("div",Xo,[c[4]||(c[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",Qo,[s.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:c[1]||(c[1]=f=>s.value=!1)},[e.createVNode(e.unref(tn),{class:"h-3 w-3"}),c[2]||(c[2]=e.createTextVNode(" Cancel ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!o.value.trim(),onClick:l},[e.createVNode(e.unref(os),{class:"h-3 w-3 mr-1"}),c[3]||(c[3]=e.createTextVNode(" Send ",-1))],8,Vo)])])])])]))}}),er={class:"z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto"},tr=e.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:e.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(t,{emit:n}){const s=n,o=e.useModel(t,"showMoreOptions"),r=e.ref(),l=e.ref(!0),i=async f=>{o.value&&r.value&&!r.value.contains(f.target)&&!l.value&&(o.value=!1),l.value=!1},a=()=>{o.value=!1,s("edit")},c=()=>{o.value=!1,s("delete")};return e.onMounted(()=>{document.addEventListener("click",i)}),e.onUnmounted(()=>{document.removeEventListener("click",i)}),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:r},[e.createElementVNode("div",er,[e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",onClick:a},[e.createVNode(e.unref(qo),{class:"h-3 w-3 mr-2"}),u[0]||(u[0]=e.createTextVNode(" Edit ",-1))]),e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",onClick:c},[e.createVNode(e.unref(Vt),{class:"h-3 w-3 mr-2"}),u[1]||(u[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),nr={class:"space-y-2"},sr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},or={class:"flex-1 min-w-0 space-y-1 relative"},rr={class:"flex items-center gap-2"},ir={class:"font-medium text-xs"},lr={class:"text-xs text-gray-500"},ar={key:0,class:"text-xs text-gray-700 leading-relaxed"},cr={class:"flex justify-between text-xs"},dr={class:"flex items-center gap-2"},pr={key:0,class:"flex gap-2"},fr=["disabled"],mr={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},ur=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(t,{emit:n}){const s=n,o=t,r=e.ref(o.comment.text),l=e.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),i=e.ref("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"),a=e.ref(!1),c=e.ref(!1),f=e.ref(!1),u=e.ref(!1),m=N=>{const C=new Date,A=Math.floor((C.getTime()-N.getTime())/(1e3*60*60));return A<1?`${Math.floor((C.getTime()-N.getTime())/6e4)}m`:A<24?`${A}h`:`${Math.floor(A/24)}d`},h=()=>{u.value=!u.value,u.value?s("like",o.comment.id,"add"):s("like",o.comment.id,"delete")},v=()=>{s("edit",o.comment.id,r.value),f.value=!1},x=(N,C)=>{s("like",N,C)},_=(N,C)=>{s("edit",N,C)};return(N,C)=>{const A=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",nr,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",f.value?"bg-gray-50":""])},[e.createElementVNode("span",sr,[e.createVNode(e.unref(en),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",or,[e.createElementVNode("div",rr,[e.createElementVNode("span",ir,e.toDisplayString(N.comment?.author),1),e.createElementVNode("span",lr,e.toDisplayString(m(N.comment?.createdAt)),1)]),f.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":C[0]||(C[0]=B=>r.value=B),class:e.normalizeClass(f.value?i.value:l.value)},null,2)),[[e.vModelText,r.value]]):(e.openBlock(),e.createElementBlock("p",ar,e.toDisplayString(N.comment?.text),1)),e.createElementVNode("div",cr,[e.createElementVNode("div",dr,[e.createElementVNode("button",{class:e.normalizeClass(["flex items-center gap-1",u.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:C[1]||(C[1]=B=>h())},[e.createVNode(e.unref(Fo),{class:e.normalizeClass(["h-3 w-3",u.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(N.comment?.likes),1)],2),N.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-gray-500 hover:text-blue-600 transition-colors",onClick:C[2]||(C[2]=B=>c.value=!0)},[e.createVNode(e.unref(Ho),{class:"h-3 w-3"})])),e.createElementVNode("button",{class:"text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",type:"button",onClick:C[3]||(C[3]=B=>a.value=!0)},[e.createVNode(e.unref(Mo),{class:"h-3 w-3"})])]),f.value?(e.openBlock(),e.createElementBlock("div",pr,[e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:C[4]||(C[4]=B=>f.value=!1)},[e.createVNode(e.unref(tn),{class:"h-3 w-3"}),C[11]||(C[11]=e.createTextVNode(" Cancel ",-1))]),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!r.value.trim(),onClick:C[5]||(C[5]=B=>v())},[e.createVNode(e.unref(os),{class:"h-3 w-3 mr-1"}),C[12]||(C[12]=e.createTextVNode(" Send ",-1))],8,fr)])):e.createCommentVNode("",!0)])]),a.value?(e.openBlock(),e.createBlock(tr,{key:0,showMoreOptions:a.value,"onUpdate:showMoreOptions":C[6]||(C[6]=B=>a.value=B),onEdit:C[7]||(C[7]=B=>f.value=!0),onDelete:C[8]||(C[8]=B=>N.$emit("delete",N.comment?.id)),comment:N.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),N.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",mr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.comment?.replies,B=>(e.openBlock(),e.createBlock(A,{key:B.id,comment:B,isInside:!0,onDelete:$=>N.$emit("delete",B.id),onLike:x,onEdit:_},null,8,["comment","onDelete"]))),128)),c.value&&!N.isInside?(e.openBlock(),e.createBlock(rs,{key:0,onSendComment:C[9]||(C[9]=B=>N.$emit("reply",N.comment?.id,B)),isReply:c.value,"onUpdate:isReply":C[10]||(C[10]=B=>c.value=B)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),hr=["id"],gr={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},kt=e.defineComponent({__name:"CommentsWidget",props:{title:{},comments:{},maxHeight:{},onAddComment:{type:Function},onReply:{type:Function},onLike:{type:Function},onDelete:{type:Function},onEdit:{type:Function},id:{},className:{},style:{}},emits:["add","reply","like","delete","edit"],setup(t,{emit:n}){const s=t,o=n,r=e.ref(s.comments??[]);async function l(){if(!s.id)return;const m=await fetch(`/api/widget/comment/${s.id}`).then(h=>h.json());r.value=m.rows.map(h=>({id:h.communication_id,author:h.username,text:h.body,createdAt:new Date(h.cdate)}))}r.value.length===0&&l();const i=async m=>{s.onAddComment?s.onAddComment(m):s.id&&(await fetch(`/api/widget/comment/${s.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:m})}),await l()),o("add",m)},a=(m,h)=>{s?.onLike?.(m,h),o("like",m,h)},c=(m,h)=>{s.onReply?.(m,h),o("reply",m,h)},f=async(m,h)=>{s.onEdit?s.onEdit(m,h):s.id&&(await fetch(`/api/widget/comment/${s.id}/${m}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:h})}),await l()),o("edit",m,h)},u=async m=>{s.onDelete?s.onDelete(m):s.id&&(await fetch(`/api/widget/comment/${s.id}/${m}`,{method:"DELETE"}),await l()),o("delete",m)};return(m,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",m.className]),id:m.id,style:e.normalizeStyle(m.style)},[m.title?(e.openBlock(),e.createElementBlock("h3",gr,e.toDisplayString(m.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([m.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:m.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,v=>(e.openBlock(),e.createBlock(ur,{key:v.id,comment:v,onReply:c,onLike:a,onDelete:h[0]||(h[0]=x=>u(x)),onEdit:f},null,8,["comment"]))),128))],6),e.createVNode(rs,{onSendComment:h[1]||(h[1]=v=>i(v))})],14,hr))}}),is=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:qe}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:Uo}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:Wo}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:jo}]]),yr={class:"mx-auto font-sans"},vr={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},br={class:"relative"},kr={class:"space-y-3"},Er={class:"flex-1 min-w-0 pb-2"},Nr={class:"flex items-center gap-1.5 mb-1 mt-0.5"},wr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},xr={class:"font-medium text-xs"},_r={class:"text-xs text-gray-500"},Cr={class:"space-y-1"},Sr={class:"text-xs text-gray-700"},Br={class:"capitalize mr-1"},Tr={key:0,class:"inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"},$r={key:0,class:"flex items-center gap-1 text-xs"},Dr={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},Or={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},Et=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(t){const n=t,s=e.ref(Array.isArray(n.data)?n.data:[]);s.value.length===0&&n.id&&o();async function o(){const r=await fetch(`/api/widget/history/${n.id}`);if(!r.ok)return{data:[]};const l=await r.json();l.rows.forEach(i=>{i.timestamp=new Date(i.cdate),i.id=i.entity_id,i.entityType=i.entity_type,i.entityId=i.entity_id,i.action=i.change_type,i.userId=i.change_user_id,i.userName=i.username,i.timestamp=new Date(i.cdate),i.description=i.username,i.status=i.username}),s.value=l.rows}return(r,l)=>(e.openBlock(),e.createElementBlock("div",yr,[r.title?(e.openBlock(),e.createElementBlock("h3",vr,e.toDisplayString(r.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:r.maxHeight+"px"})},[e.createElementVNode("div",br,[l[0]||(l[0]=e.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),e.createElementVNode("div",kr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,i=>(e.openBlock(),e.createElementBlock("div",{class:"relative flex items-start gap-2",key:i?.id},[e.createElementVNode("div",{class:e.normalizeClass(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${e.unref(is).get(i?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(is).get(i?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",Er,[e.createElementVNode("div",Nr,[e.createElementVNode("span",wr,[e.createVNode(e.unref(en),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",xr,e.toDisplayString(i?.userName),1),e.createElementVNode("span",_r,e.toDisplayString(i?.timestamp.toLocaleDateString("ua-UA",{day:"2-digit",month:"2-digit",year:"numeric"}))+" "+e.toDisplayString(i?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),e.createElementVNode("div",Cr,[e.createElementVNode("div",Sr,[e.createElementVNode("span",Br,e.toDisplayString(i?.action),1),i?.entityId?(e.openBlock(),e.createElementBlock("span",Tr,e.toDisplayString(i?.entityId),1)):e.createCommentVNode("",!0)]),i?.changes?.[i?.entityId]?(e.openBlock(),e.createElementBlock("div",$r,[i?.changes?.[i?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",Dr,e.toDisplayString(i?.changes?.[i?.entityId]?.old),1)):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.old&&i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createBlock(e.unref(Lo),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",Or,e.toDisplayString(i?.changes?.[i?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),Ar={key:0,class:"text-xl font-semibold"},Lr={class:"flex gap-1"},Ir={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},Mr=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(t){const n=e.useModel(t,"modelValue"),s={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",o.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[o.title?(e.openBlock(),e.createElementBlock("h3",Ar,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Lr,[e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",n.value==="list"?s.active:s.inactive]),onClick:r[0]||(r[0]=l=>n.value="list")},[e.createVNode(e.unref(zo),{class:"h-4 w-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",n.value==="grid"?s.active:s.inactive]),onClick:r[1]||(r[1]=l=>n.value="grid")},[e.createVNode(e.unref(Ro),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:r[2]||(r[2]=l=>o.$emit("onAddFile",l))},null,32),e.createElementVNode("div",Ir,[e.createVNode(e.unref(ss),{class:"h-4 w-4"}),r[3]||(r[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),nn={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:qe,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:Po,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:Ko,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:qe,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:Ao,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:ns,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:ns,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:qe,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:qe,label:"PPT"}};function ls(t,n="en"){const s={month:"short",day:"numeric"};return new Intl.DateTimeFormat(n,s).format(t)}function as(t){if(t===0)return"0 B";const n=1024,s=["B","KB","MB","GB","TB"],o=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,o)).toFixed(1))} ${s[o]}`}const Pr={class:"space-y-0.5"},Rr=["onClick"],Fr=["onClick"],jr={class:"flex items-center gap-2"},zr={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},Hr={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},Ur={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},qr={class:"flex items-center gap-1"},Wr=["onClick"],Kr=["onClick"],Gr=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",Pr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,o=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",key:o.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",o),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(nn)[o?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(nn)[o?.ext]?.icon||e.unref(nn).pdf.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:r=>n.$emit("openLightbox",o)},[e.createElementVNode("div",jr,[e.createElementVNode("span",zr,e.toDisplayString(o?.uploaded_name||o?.name),1)])],8,Fr),e.createElementVNode("div",Hr,e.toDisplayString(e.unref(as)(o.size)),1),e.createElementVNode("div",Ur,e.toDisplayString(e.unref(ls)(o.createdAt)),1),e.createElementVNode("div",qr,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",o),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"},[e.createVNode(e.unref(ts),{class:"h-3 w-3"})],8,Wr),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",onClick:e.withModifiers(r=>n.$emit("delete",r,o?.file_id),["stop"])},[e.createVNode(e.unref(Vt),{class:"h-3 w-3"})],8,Kr)])],8,Rr))),128))]))}}),Jr={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},Zr=["onClick"],Yr={class:"space-y-2"},Xr={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},Qr=["src"],Vr={class:"space-y-1"},ei=["title"],ti={class:"text-xs text-gray-500 text-left"},ni={class:"absolute top-2 right-1 flex items-center gap-1"},si=["onClick"],oi=["onClick"],ri=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",Jr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",o),["stop"]),class:"group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"},[e.createElementVNode("div",Yr,[e.createElementVNode("div",Xr,[o.ext==="png"||o.ext==="jpg"||o.ext==="jpeg"||o.ext==="gif"||o.ext==="svg"||o.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${o?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,Qr)):(e.openBlock(),e.createBlock(e.unref(qe),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",Vr,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:o.uploaded_name||o.name},e.toDisplayString(o.uploaded_name||o.name),9,ei),e.createElementVNode("p",ti,e.toDisplayString(e.unref(ls)(o.createdAt))+", "+e.toDisplayString(e.unref(as)(o.size)),1)])]),e.createElementVNode("div",ni,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",o),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"},[e.createVNode(e.unref(ts),{class:"h-3 w-3"})],8,si),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",onClick:e.withModifiers(r=>n.$emit("delete",r,o?.file_id),["stop"])},[e.createVNode(e.unref(Vt),{class:"h-3 w-3"})],8,oi)])],8,Zr))),128))]))}}),ii={class:"mx-auto font-sans"},li={key:1},Nt=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const s=t,o=e.ref(!1),r=e.ref(null),l=e.ref(!1),i=e.ref(0),a=e.ref(s.files??[]),c=n;a.value.length===0&&C();const f=($,S)=>{r.value=S,o.value=!0},u=()=>{r.value&&(x(r.value),r.value=null,o.value=!1)},m=e.computed(()=>Array.isArray(a.value)?a.value.map($=>$?.file_path):[]),h=$=>{const S=m.value.findIndex(q=>q===$.file_path);S!==-1&&(l.value=!0,i.value=S)},v=$=>{s.onAddFile?s.onAddFile($):A($),c("add",$)},x=$=>{s.onDelete?s.onDelete($):B($),c("delete",$)},_=$=>{const S=document.createElement("a");S.setAttribute("download",$?.uploaded_name||$?.name),S.href=$?.file_path||$?.path,S.click()},N=e.ref("list");async function C(){if(!s.id)return;const $=await fetch(`/api/widget/file/${s.id}`).then(S=>S.json());$.rows.forEach(S=>{S.timestamp=new Date(S.cdate),S.id=S.entity_id,S.entityType=S.entity_type,S.entityId=S.entity_id,S.entityType=S.entity_type,S.action=S.change_type,S.userId=S.change_user_id,S.userName=S.username,S.timestamp=new Date(S.cdate),S.description=S.username,S.status=S.username}),a.value=$.rows}const A=async $=>{if(!(!$.target||!$.target.files||$.target.files.length===0))try{await Promise.all(Array.from($.target.files).map(async S=>{const q=new FormData;q.append("file",S);const V=`/api/widget/file/${s.id}`,I=await fetch(V,{method:"POST",body:q});if(!I.ok)throw new Error(`HTTP error! status: ${I.status}`);return S})),await C()}catch(S){console.error("Помилка при завантаженні файлів:",S)}},B=async $=>{try{await fetch(`/api/widget/file/${s.id}/${$}`,{method:"DELETE"}),await C()}catch(S){console.error(S)}};return($,S)=>{const q=e.resolveComponent("MessageBox"),V=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ii,[e.createVNode(Mr,{modelValue:N.value,"onUpdate:modelValue":S[0]||(S[0]=I=>N.value=I),title:s.title,onOnAddFile:S[1]||(S[1]=I=>v(I))},null,8,["modelValue","title"]),a.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass($.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:$.maxHeight+"px"})},[N.value==="list"?(e.openBlock(),e.createBlock(Gr,{key:0,onDelete:f,onDownload:_,onOpenLightbox:S[2]||(S[2]=I=>h(I)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0),N.value==="grid"?(e.openBlock(),e.createBlock(ri,{key:1,onDelete:f,onDownload:_,onOpenLightbox:S[3]||(S[3]=I=>h(I)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",li,S[6]||(S[6]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])))]),e.createVNode(q,{modelValue:o.value,"onUpdate:modelValue":S[4]||(S[4]=I=>o.value=I),onConfirm:u,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode(V,{modelValue:l.value,"onUpdate:modelValue":S[5]||(S[5]=I=>l.value=I),images:m.value,"start-index":i.value},null,8,["modelValue","images","start-index"])],64)}}}),ai={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},ci=["onClick"],di={key:0,rel:"noreferrer",class:"relative block h-full w-full"},pi=["src"],fi={key:0,class:"thumb-cover"},mi=e.defineComponent({__name:"GalleryContent",props:{title:{},items:{},columns:{},maxHeight:{},onAddImage:{type:Function},onDelete:{type:Function},id:{},className:{},style:{}},emits:["delete"],setup(t,{emit:n}){const s=n,o=e.ref(!1),r=e.ref(0),l=t,i=e.computed(()=>Array.isArray(l.items)?l.items.map(c=>c?.file_path):[]),a=c=>{const f=i.value.findIndex(u=>u===c.file_path);f!==-1&&(o.value=!0,r.value=f)};return(c,f)=>{const u=e.resolveComponent("Lightbox");return c.items?.length>=1?(e.openBlock(),e.createElementBlock("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.items,(m,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["h-full w-full image"+h,"cursor-pointer bg-teal-500 rounded-[3px]"]),key:h,onClick:e.withModifiers(v=>a(m),["stop"])},[h<5?(e.openBlock(),e.createElementBlock("div",di,[e.createElementVNode("img",{src:`/file/resize?filepath=${m?.file_path}&w=500`,alt:"alt",height:"auto",width:"100%",class:e.normalizeClass(["object-cover h-full w-full bg-gray-200 rounded-[3px]",h===0?"max-h-[411px]":"max-h-[calc((411px-3px)/2)]"])},null,10,pi),h===4&&c.items?.length>5?(e.openBlock(),e.createElementBlock("div",fi," +"+e.toDisplayString(c.items?.length-5),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,ci))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Math.max(0,5-c.items.length),m=>(e.openBlock(),e.createElementBlock("div",{key:"empty-"+m,class:e.normalizeClass(["h-full w-full image"+(c.items.length+m-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),e.createVNode(u,{modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=m=>o.value=m),images:i.value,"start-index":r.value,delete:"true",download:"true",onDelete:f[1]||(f[1]=m=>s("delete",m))},null,8,["modelValue","images","start-index"])])):e.createCommentVNode("",!0)}}}),ui={key:0,class:"text-xl font-semibold"},hi={class:"flex gap-1"},gi={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},yi=e.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",n.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[n.title?(e.openBlock(),e.createElementBlock("h3",ui,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",hi,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:s[0]||(s[0]=o=>n.$emit("onAddImage",o))},null,32),e.createElementVNode("div",gi,[e.createVNode(e.unref(ss),{class:"h-4 w-4"}),s[1]||(s[1]=e.createTextVNode(" Додати зображення ",-1))])])])],2))}}),vi={class:"w-full mx-auto font-sans",ref:"containerRef"},bi={key:1},wt=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const s=t,o=e.ref(s.items??[]),r=n;o.value.length===0&&c();const l=u=>{s.onAddImage?s.onAddImage(u):a(u),r("add",u)},i=u=>{const m=o.value.find(h=>h.file_path===u)?.file_id;m&&(s.onDelete?s.onDelete(m):f(m))},a=async u=>{if(!(!u.target||!u.target.files||u.target.files.length===0))try{await Promise.all(Array.from(u.target.files).map(async m=>{const h=new FormData;h.append("file",m);const v=`/api/widget/file/${s.id}`,x=await fetch(v,{method:"POST",body:h});if(!x.ok)throw new Error(`HTTP error! status: ${x.status}`);return m})),await c()}catch(m){console.error("Помилка при завантаженні файлів:",m)}};async function c(){if(!s.id)return;const u=await fetch(`/api/widget/file/${s.id}`).then(m=>m.json());o.value=u.rows}const f=async u=>{try{await fetch(`/api/widget/file/${s.id}/${u}`,{method:"DELETE"}),await c()}catch(m){console.error(m)}};return(u,m)=>(e.openBlock(),e.createElementBlock("div",vi,[e.createVNode(yi,{title:u.title,onOnAddImage:m[0]||(m[0]=h=>l(h))},null,8,["title"]),o.value.length>0?(e.openBlock(),e.createBlock(mi,{key:0,items:o.value,onDelete:m[1]||(m[1]=h=>i(h))},null,8,["items"])):(e.openBlock(),e.createElementBlock("div",bi,m[2]||(m[2]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])))],512))}}),ki={class:"text-value"},Ei={class:"text-sm text-gray-900"},Ni=e.defineComponent({__name:"TextValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{const o=n.item.value;return typeof o=="boolean"?o?"Так":"Ні":o==null?"—":String(o)});return(o,r)=>(e.openBlock(),e.createElementBlock("div",ki,[e.createElementVNode("span",Ei,e.toDisplayString(s.value),1)]))}}),Me=(t,n)=>{const s=t.__vccOpts||t;for(const[o,r]of n)s[o]=r;return s},wi=Me(Ni,[["__scopeId","data-v-34a76c89"]]),xi={class:"link-value"},_i=["href"],Ci=Me(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{const o=String(n.item.value);try{const r=new URL(o);return r.hostname+r.pathname}catch{return o}});return(o,r)=>(e.openBlock(),e.createElementBlock("div",xi,[e.createElementVNode("a",{href:String(o.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(s.value)+" ",1),r[0]||(r[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,_i)]))}}),[["__scopeId","data-v-932f028c"]]),Si={class:"date-value"},Bi={class:"text-sm text-gray-900"},Ti=Me(e.defineComponent({__name:"DateValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{const o=n.item.value;if(o instanceof Date)return o.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof o=="string"){const r=new Date(o);if(!isNaN(r.getTime()))return r.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(o)});return(o,r)=>(e.openBlock(),e.createElementBlock("div",Si,[e.createElementVNode("span",Bi,e.toDisplayString(s.value),1)]))}}),[["__scopeId","data-v-cd4df08e"]]),$i={class:"status-value"},Di={key:0,class:"mr-1"},Oi=Me(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{switch(String(n.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"bg-green-100 text-green-800";case"inactive":case"неактивний":case"pending":case"очікує":return"bg-yellow-100 text-yellow-800";case"error":case"помилка":case"failed":case"неуспішно":return"bg-red-100 text-red-800";case"draft":case"чернетка":return"bg-gray-100 text-gray-800";default:return"bg-blue-100 text-blue-800"}}),o=e.computed(()=>{switch(String(n.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"fas fa-check-circle";case"inactive":case"неактивний":case"pending":case"очікує":return"fas fa-clock";case"error":case"помилка":case"failed":case"неуспішно":return"fas fa-exclamation-circle";case"draft":case"чернетка":return"fas fa-edit";default:return"fas fa-info-circle"}});return(r,l)=>(e.openBlock(),e.createElementBlock("div",$i,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",s.value])},[o.value?(e.openBlock(),e.createElementBlock("span",Di,[e.createElementVNode("i",{class:e.normalizeClass(o.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(r.item.value)),1)],2)]))}}),[["__scopeId","data-v-aea1f529"]]),Ai={class:"custom-value"},Li={class:"text-sm text-gray-900"},Ii=Me(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",Ai,[e.renderSlot(n.$slots,"default",{item:n.item,value:n.item.value},()=>[e.createElementVNode("span",Li,e.toDisplayString(String(n.item.value)),1)],!0)]))}}),[["__scopeId","data-v-12c8b3f3"]]),Mi=["id"],Pi={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Ri={key:1,class:"overflow-x-auto"},Fi={class:"min-w-full divide-y divide-gray-200"},ji={class:"bg-white divide-y divide-gray-200"},zi={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},Hi={class:"flex items-center gap-2"},Ui=["title"],qi={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},Wi={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},Ki={class:"flex items-start gap-3"},Gi={key:0,class:"flex-shrink-0"},Ji={class:"flex-1 min-w-0"},Zi={class:"flex items-center gap-2 mb-2"},Yi={class:"text-sm font-medium text-gray-900"},Xi=["title"],Qi={key:3,class:"overflow-x-auto"},Vi={class:"min-w-full divide-y divide-gray-200"},el={class:"bg-white divide-y divide-gray-200"},tl={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},nl={class:"flex items-center gap-2"},sl=["title"],ol={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},sn=Me(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(t){const n=s=>{switch(s.type){case"link":return Ci;case"date":return Ti;case"status":return Oi;case"custom":return Ii;default:return wi}};return(s,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",s.className]),id:s.id,style:e.normalizeStyle(s.style)},[s.title?(e.openBlock(),e.createElementBlock("h3",Pi,e.toDisplayString(s.title),1)):e.createCommentVNode("",!0),s.view==="table"?(e.openBlock(),e.createElementBlock("div",Ri,[e.createElementVNode("table",Fi,[e.createElementVNode("tbody",ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",zi,[e.createElementVNode("div",Hi,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},o[0]||(o[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,Ui)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",qi,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])])):s.view==="grid"?(e.openBlock(),e.createElementBlock("div",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id||r.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[e.createElementVNode("div",Ki,[r.icon?(e.openBlock(),e.createElementBlock("div",Gi,[e.createElementVNode("i",{class:e.normalizeClass([r.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ji,[e.createElementVNode("div",Zi,[e.createElementVNode("h4",Yi,e.toDisplayString(r.label),1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:r.tooltip},o[1]||(o[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,Xi)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",Qi,[e.createElementVNode("table",Vi,[e.createElementVNode("tbody",el,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",tl,[e.createElementVNode("div",nl,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},o[2]||(o[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,sl)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",ol,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])]))],14,Mi))}}),[["__scopeId","data-v-106790ef"]]),rl={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 cs(t){return t?t.type==="FeatureCollection"||t.type==="Feature"?t:t.geom?{type:"Feature",geometry:{type:t.geom.type,coordinates:t.geom.coordinates},properties:{}}:t.type&&t.coordinates?{type:"Feature",geometry:t,properties:{}}:null:null}const il={key:0,class:"absolute inset-0 z-[600] flex items-center justify-center pointer-events-none bg-black/20"},ll={class:"bg-black/70 text-white text-xs sm:text-sm px-4 py-2 rounded-md shadow"},al={class:"bg-white/95 border border-gray-200 rounded-md shadow-xl px-3 py-2 max-w-[240px] text-[11px] sm:text-xs text-gray-900"},cl={class:"space-y-0.5"},dl={class:"text-gray-500"},pl={class:"text-gray-900 text-right break-all"},fl={key:3,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"},ml={class:"flex items-center justify-between p-2 border-b"},ul={class:"p-2 border-b"},hl={class:"flex items-center"},gl=["value"],yl={class:"ml-2"},vl={class:"p-2"},bl={class:"flex items-center"},kl=["checked","onChange"],El={class:"ml-2"},xt=e.defineComponent({__name:"MapWidget",props:{pattern:{},geom:{},id:{},katottg:{},tms:{},layers:{},title:{},height:{},bounds:{}},setup(t){function n(p){let d=p?.parent??null;for(;d;){const k=d.props?.view;if(k==="tabs"||k==="vertical-tabs")return!0;d=d.parent??null}return!1}const s=t,o=e.getCurrentInstance(),r=e.inject("vsCardTabsContext",!1),l=e.computed(()=>(typeof r=="boolean"?r:r.value)?!0:n(o)),i=o?.appContext.config.globalProperties?.$settings??{},a=(()=>{const p=Array.isArray(i.center)?i.center:[],d=Number(p[0]),k=Number(p[1]);return Number.isFinite(d)&&Number.isFinite(k)?[d,k]:[50,30]})(),c=o?.uid??Math.floor(Math.random()*1e4),f=e.ref(null);let u,m,h,v;const x=Ce(),_=e.ref(Object.keys(x)[0]),N=`base-layer-${c}`;let C;const A=e.ref(!0),B=e.ref(!1),$=e.ref(!1),S=e.ref(!1),q=e.ref("Використовуйте Ctrl + колесо миші для зміни масштабу");let V=null;const I=e.ref([]),L=e.reactive({}),z=e.ref([]),F=e.computed(()=>z.value.map(p=>L[p]).filter(Boolean)),y=e.ref(null),T=e.computed(()=>y.value?.entries??[]),b=e.computed(()=>{if(!y.value)return;const p=12,d=y.value.point.x+p,k=y.value.point.y+p;return{left:`${d}px`,top:`${k}px`}}),D=e.computed(()=>{if(B.value)return"fixed inset-0 w-screen h-screen z-[9999] bg-white";const p=["relative","h-full"];return s.height||p.push("min-h-[300px]"),s.title&&!l.value&&p.push("pb-[3.25rem]"),p.join(" ")}),Z=e.computed(()=>B.value||s.height==null?void 0:{height:typeof s.height=="number"?`${s.height}px`:String(s.height)}),ae=e.computed(()=>{const p=["w-full","h-full"];return!s.height&&!B.value&&p.push("min-h-[300px]"),p.join(" ")});async function Le(){const p=g=>{if(!Array.from(document.styleSheets??[]).some(M=>M?.href?.includes(g))){const M=document.createElement("link");M.rel="stylesheet",M.href=g,document.head.appendChild(M)}};p("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),p("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css");const d=g=>new Promise((O,M)=>{if(Array.from(document.scripts??[]).some(H=>H.src===g))return O();const K=document.createElement("script");K.src=g,K.async=!0,K.onload=()=>O(),K.onerror=H=>M(H),document.body.appendChild(K)});return await d("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").catch(()=>{}),await d("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js").catch(()=>{}),await d("https://unpkg.com/leaflet.vectorgrid@1.3.0/dist/Leaflet.VectorGrid.bundled.js").catch(()=>{}),window.L}function Ce(){const p=d=>d.map((k,g)=>{const O=typeof k?.key=="string"&&k.key?k.key:`b${g}`,M=be(k?.url);return M?{...k,key:O,url:M}:null}).filter(k=>!!k).reduce((k,g)=>({...k,[g.key]:g}),{});return Array.isArray(i?.basemaps)&&i.basemaps.length?p(i.basemaps):p([{key:"topo100",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"},{key:"orto10",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"},{key:"osmb",url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"}])}function be(p){if(typeof p!="string"||!p.trim())return"";const d=p.trim();if(/^https?:\/\//i.test(d))return d;const k=window.location?.origin??"",g=d.replace(/^\/+/,"");return k?`${k}/${g}`:`/${g}`}function ke(p,d){return p?.id!=null?String(p.id):p?.url?`${p.url}-${d}`:`layer-${d}`}function Se(p){if(!p||typeof p!="object")return;const d={},k=j=>{if(typeof j=="string"){const P=j.trim().replace(/,+$/,"");return P?/^-?\d+(\.\d+)?$/.test(P)?Number(P):P:void 0}return j},g=()=>(d.colorSet||(d.colorSet={}),d.colorSet),O=(j,P)=>{if(j==null||typeof P!="string")return;const K=P.trim().replace(/,+$/,"");K&&(g()[String(j)]=K)},M=j=>{const P=["color","fill","hex","valueColor","value_color"].map(H=>j[H]).find(H=>typeof H=="string"&&H.trim());if(!P)return!1;const K=["value","key","id","code","status"].map(H=>j[H]).find(H=>H!=null&&H!=="");return K==null?!1:(O(K,P),!0)};return Object.entries(p).forEach(([j,P])=>{if(j==="colorSet"&&P!=null){Array.isArray(P)?P.forEach(H=>{H&&(typeof H=="object"&&M(H)||typeof H=="object"&&Object.entries(H).forEach(([Qt,Co])=>O(Qt,typeof Co=="string"?Co:void 0)))}):typeof P=="object"&&(M(P)||Object.entries(P).forEach(([H,Qt])=>O(H,typeof Qt=="string"?Qt:void 0)));return}const K=k(P);if(K!==void 0){if(j==="border"){typeof K=="number"&&d.width==null?d.width=K:typeof K=="string"&&d.stroke==null&&(d.stroke=K);return}d[j]=K}}),d.colorSet&&!Object.keys(d.colorSet).length&&delete d.colorSet,Object.keys(d).length?d:void 0}function Wn(){if(Array.isArray(s.layers)&&s.layers.length)return s.layers.map((d,k)=>{if(!d)return null;const g=ke(d,k),O=d.url||(s.pattern&&g?s.pattern.replace("{{id}}",String(d.id??g)):"");return O?{...d,id:g,url:O,name:d.name||`Шар ${k+1}`,style:Se(d.style)}:null}).filter(d=>!!d?.url);const p=Array.isArray(s.tms)?s.tms:s.tms?.split(",");return p?p.map((d,k)=>{if(!d)return null;const g=typeof d=="string"?d.trim():`${d}`;if(!g)return null;const O=`legacy-${k}`,M=s.pattern?s.pattern.replace("{{id}}",g):g;return{id:O,name:`Шар ${k+1}`,url:M,visible:!0}}).filter(d=>!!d?.url):[]}function Kn(p){const d=(p?.url??"").trim();if(!d)return"";if(/^https?:\/\//i.test(d))return d;const k=window.location?.origin??"",g=d.replace(/^\/+/,"");return`${k}/${g}`}function Ie(p){const d=p.style??{};return k=>{const g=d.colorAttr,O=d.colorSet??{},M=typeof g=="string"?O?.[k?.[g]]??d.color??"#3388ff":d.color??"#3388ff",j=d.stroke??M;return{weight:d.width??1,color:j,opacity:d.opacity??1,fill:d.type?d.type!=="polyline":!0,fillColor:M,fillOpacity:d.opacity??.5}}}function Gt(p,d){if(!u||!d?.latlng||p.popup===!1)return;const k=u.latLngToContainerPoint(d.latlng),g=ut(d),O=Jt(p,g);if(!O.length){Qe(p.id);return}y.value={layerId:p.id,title:g?.name??p.name,properties:g,entries:O,point:{x:k.x,y:k.y}}}function Qe(p){p&&y.value?.layerId!==p||(y.value=null)}function ut(p){return p?.layer?.properties||p?.layer?.feature?.properties||p?.properties||p?.data||{}}function Jt(p,d={}){const k=g=>g==null||g===""?"—":typeof g=="object"?JSON.stringify(g):String(g);return p.popup&&Array.isArray(p.popup)&&p.popup.length?p.popup.map(g=>({label:g.label||g.field,value:k(d?.[g.field])})):Object.entries(d).map(([g,O])=>({label:g,value:k(O)}))}function Gn(p,d){if(!u||p.popup===!1||!d?.latlng)return;const k=ut(d),g=Jt(p,k);if(!g.length)return;const O=['<div class="map-popup">'];O.push('<div class="map-popup__body">'),g.forEach(M=>{O.push(`<div class="map-popup__row"><span class="map-popup__label">${M.label}</span><span class="map-popup__value">${M.value}</span></div>`)}),O.push("</div></div>"),v.popup({maxWidth:360}).setLatLng(d.latlng).setContent(O.join("")).openOn(u)}e.onMounted(async()=>{v=await Le(),v.drawLocal={...rl};const p=typeof i?.zoom=="number"&&Number.isFinite(i.zoom)?i.zoom:10;u=v.map(f.value,{zoomControl:!1}).setView(a,p),v.control.zoom({position:"bottomright"}).addTo(u),C=v.tileLayer(x[_.value].url,{maxZoom:19}).addTo(u),m=new v.FeatureGroup().addTo(u),gt(),Ve(),V=w();const d=cs(s.geom);if(d){const k=[];v.geoJSON(d).eachLayer(g=>k.push(g)),k.length&&m.addLayer(k[0]),E()}if(f.value){const k=new ResizeObserver(()=>{u&&u.invalidateSize()});k.observe(f.value),e.onBeforeUnmount(()=>{k.disconnect()})}});function Jn(){if(!m)return;m.clearLayers();const p=cs(s.geom);if(!p)return;const d=[];v.geoJSON(p).eachLayer(k=>d.push(k)),d.length&&(d.forEach(k=>m.addLayer(k)),E())}e.onBeforeUnmount(()=>{V?.(),Xn(),h&&u?.hasLayer(h)&&u.removeLayer(h)});function Zn(p){const d=(p?.service??"").toLowerCase();if(d)return d;const k=(p?.url??"").toLowerCase();return/\.(mvt|pbf|vtile|vmt)(\?|$)/.test(k)?"vtile":/service=wms|request=getmap|\/(wms|ows)(\?|$)/.test(k)?"wms":""}function Zt(p){const d=Zn(p),k=Kn(p),O={opacity:p?.style?.opacity??1,...p.options??{}},M=!!(p?.style&&Object.keys(p.style).length),j=p.sourceLayer||p.layer||p.service_layer||p.service_key||p.map_key||p.dataset?.layer||p.id;if(d==="vtile"){const P=v?.vectorGrid;if(P?.protobuf&&(M||!v?.maplibreGL)){const K=P.protobuf(k,{interactive:!0,maxNativeZoom:p.maxzoom??19,vectorTileLayerStyles:{[j??"default"]:Ie(p),default:Ie(p)}});return K.on?.("mouseover",H=>Gt(p,H)),K.on?.("mousemove",H=>Gt(p,H)),K.on?.("mouseout",()=>Qe(p.id)),K.on?.("click",H=>Gn(p,H)),K}if(!M&&v?.maplibreGL&&window?.maplibregl){const K=k;return v.maplibreGL({style:K,interactive:!1,pane:"overlayPane"})}}if(d==="wms"&&v?.tileLayer?.wms){const P={...p.params??{}};return j&&!P.layers&&(P.layers=j),P.format==null&&(P.format="image/png"),P.transparent==null&&(P.transparent=!0),v.tileLayer.wms(k,{...P,...O})}return v.tileLayer(k,O)}function Ee(p){const d=("bounds"in p?p.bounds:void 0)??s.bounds??I.value;if(!Array.isArray(d)||!d.length||!v)return null;const g={color:p.style?.stroke??p.style?.color??"#2563eb",weight:p.style?.width??2,interactive:!1,opacity:p.style?.opacity??.8,dashArray:"4 4"},O=Array.isArray(p.bounds)&&p.bounds.length?p.bounds:d,M=Yn(O);if(!M.length||!v.polyline)return null;const j=M.map(P=>{if(!P.length)return P;const K=P[0],H=P[P.length-1];return K&&H&&(!H.equals||!H.equals(K))?[...P,K]:P});return v.polyline(j,g)}function Yn(p){const d=O=>{if(!Array.isArray(O)||O.length<2)return null;const[M,j]=O;return!Number.isFinite(Number(j))||!Number.isFinite(Number(M))?null:v.latLng(Number(j),Number(M))},k=O=>Array.isArray(O)&&O.length>=2&&O.every(M=>Number.isFinite(Number(M))),g=O=>Array.isArray(O)?O.map(d).filter(Boolean):[];if(!Array.isArray(p))return[];if(p.length&&k(p[0])){const O=p.map(d).filter(Boolean);return O.length?[O]:[]}if(p.length&&Array.isArray(p[0])){if(k(p[0][0]))return p.map(M=>g(M)).filter(M=>M.length);if(Array.isArray(p[0][0])&&k(p[0][0][0]))return p.flatMap(M=>Array.isArray(M)?M.map(j=>g(j)).filter(j=>j.length):[]).filter(M=>M.length)}return[]}function Xn(){Object.values(L).forEach(p=>{p.layer&&u?.hasLayer(p.layer)&&u.removeLayer(p.layer),p.boundsLayer&&u?.hasLayer(p.boundsLayer)&&u.removeLayer(p.boundsLayer),p.layer=null,p.boundsLayer=null}),Qe()}function Ve(){if(!u)return;h&&u.hasLayer(h)&&u.removeLayer(h);const p=Ee({id:"global-bounds",bounds:s.bounds,style:{}});p?(h=p,h.addTo(u)):h=null}function ht(){u&&z.value.forEach(p=>{const d=L[p];d&&(d.visible?(d.layer||(d.layer=Zt(d.config)),d.boundsLayer||(d.boundsLayer=Ee(d.config)),d.layer&&!u.hasLayer(d.layer)&&d.layer.addTo(u),d.boundsLayer&&!u.hasLayer(d.boundsLayer)&&d.boundsLayer.addTo(u)):(d.layer&&u.hasLayer(d.layer)&&u.removeLayer(d.layer),d.boundsLayer&&u.hasLayer(d.boundsLayer)&&u.removeLayer(d.boundsLayer)))})}function gt(){const p=Wn(),d=[],k=new Set;p.forEach((g,O)=>{const M=ke(g,O);d.push(M),k.add(M);const j=L[M];j&&j.config.url!==g.url&&(j.layer&&u?.hasLayer(j.layer)&&u.removeLayer(j.layer),j.layer=null);const P=j?.visible??g.visible??g.overlay!==!1;L[M]={id:M,config:{...g,id:M},visible:P,layer:j?.layer??null,boundsLayer:j?.boundsLayer??null}}),Object.keys(L).forEach(g=>{if(!k.has(g)){const O=L[g];O?.layer&&u?.hasLayer(O.layer)&&u.removeLayer(O.layer),delete L[g]}}),z.value=d,u&&ht()}function Qn(p,d){const k=typeof d=="boolean"?d:d.target?.checked;if(k==null)return;const g=L[p];g&&(g.visible=k,g.visible?(g.layer||(g.layer=Zt(g.config)),g.boundsLayer||(g.boundsLayer=Ee(g.config)),g.layer&&!u.hasLayer(g.layer)&&g.layer.addTo(u),g.boundsLayer&&!u.hasLayer(g.boundsLayer)&&g.boundsLayer.addTo(u)):(g.layer&&u.hasLayer(g.layer)&&(u.removeLayer(g.layer),Qe(p)),g.boundsLayer&&u.hasLayer(g.boundsLayer)&&u.removeLayer(g.boundsLayer)))}function Yt(p){yt(p),_.value=p}function yt(p){if(!u||!x[p])return;C&&C.removeFrom(u);const d=x[p];C=v.tileLayer(d.url,d.options||{}).addTo(u),C.bringToBack()}function vt(){!u||!m||A.value&&!u.hasLayer(m)&&m.addTo(u)}function Vn(){Yt(_.value)}function Xt(){A.value?m.addTo(u):m.removeFrom(u)}function E(p=30){const d=m.getLayers();if(!d.length)return;const g=v.featureGroup(d).getBounds();g&&g.isValid()&&u.fitBounds(g,{padding:[p,p],maxZoom:16})}function w(){if(!u||!f.value)return null;u.scrollWheelZoom.disable(),q.value="Використовуйте Ctrl + колесо миші для зміни масштабу";let p;const d=(g=1500)=>{S.value=!0,p&&clearTimeout(p),p=window.setTimeout(()=>S.value=!1,g)},k=g=>{if(!(g.ctrlKey||g.metaKey||g.shiftKey)){d(),u.scrollWheelZoom.disable();return}g.preventDefault(),g.stopPropagation(),u.scrollWheelZoom.enable(),S.value=!1,p&&clearTimeout(p),p=window.setTimeout(()=>u.scrollWheelZoom.disable(),200)};return f.value.addEventListener("wheel",k,{passive:!1}),()=>{u.scrollWheelZoom.enable(),f.value?.removeEventListener("wheel",k),p&&clearTimeout(p),S.value=!1}}return e.watch(B,async()=>{await e.nextTick(),requestAnimationFrame(()=>{u?.invalidateSize(!0),yt(_.value),vt(),ht(),h&&!u?.hasLayer(h)&&h.addTo(u)})}),e.watch(()=>s.layers,()=>gt(),{deep:!0}),e.watch(()=>[s.tms,s.pattern],()=>{s.layers?.length||gt()}),e.watch(()=>s.bounds,()=>Ve(),{deep:!0}),e.watch(()=>s.geom,()=>Jn(),{deep:!0}),e.watch(()=>s.katottg,async p=>{if(I.value=[],!p){Ve();return}try{const d=await fetch(`https://data.gki.com.ua/api-user/atu/${p}`);if(!d?.ok)return;const g=(await d.json())?.geometry?.coordinates;Array.isArray(g)&&g.length&&(I.value=g)}catch(d){console.error("Failed to fetch KATOTTG bounds",d)}finally{Ve(),ht()}},{immediate:!0}),(p,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(D.value),style:e.normalizeStyle(Z.value)},[e.createElementVNode("div",{ref_key:"mapContainer",ref:f,class:e.normalizeClass(ae.value)},null,2),S.value?(e.openBlock(),e.createElementBlock("div",il,[e.createElementVNode("div",ll,e.toDisplayString(q.value),1)])):e.createCommentVNode("",!0),T.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:"absolute z-[550] pointer-events-none",style:e.normalizeStyle(b.value)},[e.createElementVNode("div",al,[e.createElementVNode("dl",cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,k=>(e.openBlock(),e.createElementBlock("div",{key:`${k.label}-${k.value}`,class:"flex justify-between gap-2"},[e.createElementVNode("dt",dl,e.toDisplayString(k.label),1),e.createElementVNode("dd",pl,e.toDisplayString(k.value),1)]))),128))])])],4)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:d[0]||(d[0]=k=>$.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer layers-button"}," Шари ")),$.value?(e.openBlock(),e.createElementBlock("div",fl,[e.createElementVNode("div",ml,[d[5]||(d[5]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:d[1]||(d[1]=k=>$.value=!1),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4"},d[4]||(d[4]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))]),e.createElementVNode("div",ul,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(x),(k,g)=>(e.openBlock(),e.createElementBlock("div",{key:`base-${g}`},[e.createElementVNode("label",hl,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:N,value:g,"onUpdate:modelValue":d[2]||(d[2]=O=>_.value=O),onChange:Vn},null,40,gl),[[e.vModelRadio,_.value]]),e.createElementVNode("span",yl,e.toDisplayString(k.name||g),1)])]))),128))]),e.createElementVNode("div",vl,[e.createElementVNode("label",bl,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":d[3]||(d[3]=k=>A.value=k),onChange:Xt},null,544),[[e.vModelCheckbox,A.value]]),d[6]||(d[6]=e.createElementVNode("span",{class:"ml-2"},"Геометрія/Межі",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,k=>(e.openBlock(),e.createElementBlock("label",{class:"flex items-center",key:k.id},[e.createElementVNode("input",{type:"checkbox",checked:k.visible,onChange:g=>Qn(k.id,g)},null,40,kl),e.createElementVNode("span",El,e.toDisplayString(k.config.name||k.id),1)]))),128))])])):e.createCommentVNode("",!0)],6))}});/**
|
|
132
132
|
* @vue/shared v3.5.18
|
|
133
133
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
134
134
|
* @license MIT
|
|
135
|
-
**//*! #__NO_SIDE_EFFECTS__ */function Ne(t){const n=Object.create(null);for(const s of t.split(","))n[s]=1;return s=>s in n}const Nl=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const on=()=>{},
|
|
135
|
+
**//*! #__NO_SIDE_EFFECTS__ */function Ne(t){const n=Object.create(null);for(const s of t.split(","))n[s]=1;return s=>s in n}const Nl=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const on=()=>{},_t=()=>!1,rn=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Be=Object.assign,we=Array.isArray,se=t=>typeof t=="string",ln=t=>typeof t=="symbol",wl=t=>t!==null&&typeof t=="object",ds=Ne(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),xl=Ne("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),an=t=>{const n=Object.create(null);return s=>n[s]||(n[s]=t(s))},_l=/-(\w)/g,Te=an(t=>t.replace(_l,(n,s)=>s?s.toUpperCase():"")),cn=an(t=>t.charAt(0).toUpperCase()+t.slice(1)),Cl=an(t=>t?`on${cn(t)}`:""),tt={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"NEED_HYDRATION",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"CACHED",[-2]:"BAIL"},Sl={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},Bl=/;(?![^(]*\))/g,Tl=/:([^]+)/,$l=/\/\*[^]*?\*\//g;function Dl(t){const n={};return t.replace($l,"").split(Bl).forEach(s=>{if(s){const o=s.split(Tl);o.length>1&&(n[o[0].trim()]=o[1].trim())}}),n}const Ol="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Al="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Ll="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",Il="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Ml=Ne(Ol),Pl=Ne(Al),Rl=Ne(Ll),Fl=Ne(Il);/**
|
|
136
136
|
* @vue/compiler-core v3.5.18
|
|
137
137
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
138
138
|
* @license MIT
|
|
139
|
-
**/const et=Symbol(process.env.NODE_ENV!=="production"?"Fragment":""),tt=Symbol(process.env.NODE_ENV!=="production"?"Teleport":""),dn=Symbol(process.env.NODE_ENV!=="production"?"Suspense":""),Nt=Symbol(process.env.NODE_ENV!=="production"?"KeepAlive":""),as=Symbol(process.env.NODE_ENV!=="production"?"BaseTransition":""),Ae=Symbol(process.env.NODE_ENV!=="production"?"openBlock":""),cs=Symbol(process.env.NODE_ENV!=="production"?"createBlock":""),ds=Symbol(process.env.NODE_ENV!=="production"?"createElementBlock":""),pn=Symbol(process.env.NODE_ENV!=="production"?"createVNode":""),fn=Symbol(process.env.NODE_ENV!=="production"?"createElementVNode":""),nt=Symbol(process.env.NODE_ENV!=="production"?"createCommentVNode":""),mn=Symbol(process.env.NODE_ENV!=="production"?"createTextVNode":""),ps=Symbol(process.env.NODE_ENV!=="production"?"createStaticVNode":""),un=Symbol(process.env.NODE_ENV!=="production"?"resolveComponent":""),hn=Symbol(process.env.NODE_ENV!=="production"?"resolveDynamicComponent":""),gn=Symbol(process.env.NODE_ENV!=="production"?"resolveDirective":""),yn=Symbol(process.env.NODE_ENV!=="production"?"resolveFilter":""),vn=Symbol(process.env.NODE_ENV!=="production"?"withDirectives":""),bn=Symbol(process.env.NODE_ENV!=="production"?"renderList":""),fs=Symbol(process.env.NODE_ENV!=="production"?"renderSlot":""),ms=Symbol(process.env.NODE_ENV!=="production"?"createSlots":""),wt=Symbol(process.env.NODE_ENV!=="production"?"toDisplayString":""),xt=Symbol(process.env.NODE_ENV!=="production"?"mergeProps":""),kn=Symbol(process.env.NODE_ENV!=="production"?"normalizeClass":""),En=Symbol(process.env.NODE_ENV!=="production"?"normalizeStyle":""),st=Symbol(process.env.NODE_ENV!=="production"?"normalizeProps":""),ot=Symbol(process.env.NODE_ENV!=="production"?"guardReactiveProps":""),Nn=Symbol(process.env.NODE_ENV!=="production"?"toHandlers":""),wn=Symbol(process.env.NODE_ENV!=="production"?"camelize":""),zl=Symbol(process.env.NODE_ENV!=="production"?"capitalize":""),xn=Symbol(process.env.NODE_ENV!=="production"?"toHandlerKey":""),_t=Symbol(process.env.NODE_ENV!=="production"?"setBlockTracking":""),jl=Symbol(process.env.NODE_ENV!=="production"?"pushScopeId":""),Hl=Symbol(process.env.NODE_ENV!=="production"?"popScopeId":""),_n=Symbol(process.env.NODE_ENV!=="production"?"withCtx":""),Ul=Symbol(process.env.NODE_ENV!=="production"?"unref":""),ql=Symbol(process.env.NODE_ENV!=="production"?"isRef":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"withMemo":""),us=Symbol(process.env.NODE_ENV!=="production"?"isMemoSame":""),Ke={[et]:"Fragment",[tt]:"Teleport",[dn]:"Suspense",[Nt]:"KeepAlive",[as]:"BaseTransition",[Ae]:"openBlock",[cs]:"createBlock",[ds]:"createElementBlock",[pn]:"createVNode",[fn]:"createElementVNode",[nt]:"createCommentVNode",[mn]:"createTextVNode",[ps]:"createStaticVNode",[un]:"resolveComponent",[hn]:"resolveDynamicComponent",[gn]:"resolveDirective",[yn]:"resolveFilter",[vn]:"withDirectives",[bn]:"renderList",[fs]:"renderSlot",[ms]:"createSlots",[wt]:"toDisplayString",[xt]:"mergeProps",[kn]:"normalizeClass",[En]:"normalizeStyle",[st]:"normalizeProps",[ot]:"guardReactiveProps",[Nn]:"toHandlers",[wn]:"camelize",[zl]:"capitalize",[xn]:"toHandlerKey",[_t]:"setBlockTracking",[jl]:"pushScopeId",[Hl]:"popScopeId",[_n]:"withCtx",[Ul]:"unref",[ql]:"isRef",[Cn]:"withMemo",[us]:"isMemoSame"};function Wl(t){Object.getOwnPropertySymbols(t).forEach(n=>{Ke[n]=t[n]})}const fe={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Kl(t,n=""){return{type:0,source:n,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:fe}}function rt(t,n,s,o,r,l,i,a=!1,c=!1,f=!1,u=fe){return t&&(a?(t.helper(Ae),t.helper(Ze(t.inSSR,f))):t.helper(Je(t.inSSR,f)),i&&t.helper(vn)),{type:13,tag:n,props:s,children:o,patchFlag:r,dynamicProps:l,directives:i,isBlock:a,disableTracking:c,isComponent:f,loc:u}}function Me(t,n=fe){return{type:17,loc:n,elements:t}}function he(t,n=fe){return{type:15,loc:n,properties:t}}function Q(t,n){return{type:16,loc:fe,key:se(t)?F(t,!0):t,value:n}}function F(t,n=!1,s=fe,o=0){return{type:4,loc:s,content:t,isStatic:n,constType:n?3:o}}function ge(t,n=fe){return{type:8,loc:n,children:t}}function ne(t,n=[],s=fe){return{type:14,loc:s,callee:t,arguments:n}}function Ge(t,n=void 0,s=!1,o=!1,r=fe){return{type:18,params:t,returns:n,newline:s,isSlot:o,loc:r}}function Sn(t,n,s,o=!0){return{type:19,test:t,consequent:n,alternate:s,newline:o,loc:fe}}function Gl(t,n,s=!1,o=!1){return{type:20,index:t,value:n,needPauseTracking:s,inVOnce:o,needArraySpread:!1,loc:fe}}function Jl(t){return{type:21,body:t,loc:fe}}function Je(t,n){return t||n?pn:fn}function Ze(t,n){return t||n?cs:ds}function Bn(t,{helper:n,removeHelper:s,inSSR:o}){t.isBlock||(t.isBlock=!0,s(Je(o,t.isComponent)),n(Ae),n(Ze(o,t.isComponent)))}const hs=new Uint8Array([123,123]),gs=new Uint8Array([125,125]);function ys(t){return t>=97&&t<=122||t>=65&&t<=90}function me(t){return t===32||t===10||t===9||t===12||t===13}function Te(t){return t===47||t===62||me(t)}function Ct(t){const n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}const oe={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class Zl{constructor(n,s){this.stack=n,this.cbs=s,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=hs,this.delimiterClose=gs,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=hs,this.delimiterClose=gs}getPos(n){let s=1,o=n+1;for(let r=this.newlines.length-1;r>=0;r--){const l=this.newlines[r];if(n>l){s=r+2,o=n-l;break}}return{column:o,line:s,offset:n}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(n){n===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n))}stateInterpolationOpen(n){if(n===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const s=this.index+1-this.delimiterOpen.length;s>this.sectionStart&&this.cbs.ontext(this.sectionStart,s),this.state=3,this.sectionStart=s}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(n)):(this.state=1,this.stateText(n))}stateInterpolation(n){n===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(n))}stateInterpolationClose(n){n===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(n))}stateSpecialStartSequence(n){const s=this.sequenceIndex===this.currentSequence.length;if(!(s?Te(n):(n|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!s){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(n)}stateInRCDATA(n){if(this.sequenceIndex===this.currentSequence.length){if(n===62||me(n)){const s=this.index-this.currentSequence.length;if(this.sectionStart<s){const o=this.index;this.index=s,this.cbs.ontext(this.sectionStart,s),this.index=o}this.sectionStart=s+2,this.stateInClosingTagName(n),this.inRCDATA=!1;return}this.sequenceIndex=0}(n|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===oe.TitleEnd||this.currentSequence===oe.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(n===60)}stateCDATASequence(n){n===oe.Cdata[this.sequenceIndex]?++this.sequenceIndex===oe.Cdata.length&&(this.state=28,this.currentSequence=oe.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(n))}fastForwardTo(n){for(;++this.index<this.buffer.length;){const s=this.buffer.charCodeAt(this.index);if(s===10&&this.newlines.push(this.index),s===n)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(n){n===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===oe.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):n!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(n,s){this.enterRCDATA(n,s),this.state=31}enterRCDATA(n,s){this.inRCDATA=!0,this.currentSequence=n,this.sequenceIndex=s}stateBeforeTagName(n){n===33?(this.state=22,this.sectionStart=this.index+1):n===63?(this.state=24,this.sectionStart=this.index+1):ys(n)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:n===116?this.state=30:this.state=n===115?29:6):n===47?this.state=8:(this.state=1,this.stateText(n))}stateInTagName(n){Te(n)&&this.handleTagName(n)}stateInSFCRootTagName(n){if(Te(n)){const s=this.buffer.slice(this.sectionStart,this.index);s!=="template"&&this.enterRCDATA(Ct("</"+s),0),this.handleTagName(n)}}handleTagName(n){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)}stateBeforeClosingTagName(n){me(n)||(n===62?(process.env.NODE_ENV!=="production"&&this.cbs.onerr(14,this.index),this.state=1,this.sectionStart=this.index+1):(this.state=ys(n)?9:27,this.sectionStart=this.index))}stateInClosingTagName(n){(n===62||me(n))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(n))}stateAfterClosingTagName(n){n===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(n){n===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):n===47?(this.state=7,process.env.NODE_ENV!=="production"&&this.peek()!==62&&this.cbs.onerr(22,this.index)):n===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):me(n)||(process.env.NODE_ENV!=="production"&&n===61&&this.cbs.onerr(19,this.index),this.handleAttrStart(n))}handleAttrStart(n){n===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):n===46||n===58||n===64||n===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(n){n===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):me(n)||(this.state=11,this.stateBeforeAttrName(n))}stateInAttrName(n){n===61||Te(n)?(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):process.env.NODE_ENV!=="production"&&(n===34||n===39||n===60)&&this.cbs.onerr(17,this.index)}stateInDirName(n){n===61||Te(n)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):n===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(n){n===61||Te(n)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===91?this.state=15:n===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(n){n===93?this.state=14:(n===61||Te(n))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(n),process.env.NODE_ENV!=="production"&&this.cbs.onerr(27,this.index))}stateInDirModifier(n){n===61||Te(n)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(n){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(n)}stateAfterAttrName(n){n===61?this.state=18:n===47||n===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)):me(n)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(n))}stateBeforeAttrValue(n){n===34?(this.state=19,this.sectionStart=this.index+1):n===39?(this.state=20,this.sectionStart=this.index+1):me(n)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(n))}handleInAttrValue(n,s){(n===s||this.fastForwardTo(s))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(s===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(n){this.handleInAttrValue(n,34)}stateInAttrValueSingleQuotes(n){this.handleInAttrValue(n,39)}stateInAttrValueNoQuotes(n){me(n)||n===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(n)):(process.env.NODE_ENV!=="production"&&n===34||n===39||n===60||n===61||n===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(n){n===91?(this.state=26,this.sequenceIndex=0):this.state=n===45?25:23}stateInDeclaration(n){(n===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(n){(n===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(n){n===45?(this.state=28,this.currentSequence=oe.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(n){(n===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(n){n===oe.ScriptEnd[3]?this.startSpecial(oe.ScriptEnd,4):n===oe.StyleEnd[3]?this.startSpecial(oe.StyleEnd,4):(this.state=6,this.stateInTagName(n))}stateBeforeSpecialT(n){n===oe.TitleEnd[3]?this.startSpecial(oe.TitleEnd,4):n===oe.TextareaEnd[3]?this.startSpecial(oe.TextareaEnd,4):(this.state=6,this.stateInTagName(n))}startEntity(){}stateInEntity(){}parse(n){for(this.buffer=n;this.index<this.buffer.length;){const s=this.buffer.charCodeAt(this.index);switch(s===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(s);break}case 2:{this.stateInterpolationOpen(s);break}case 3:{this.stateInterpolation(s);break}case 4:{this.stateInterpolationClose(s);break}case 31:{this.stateSpecialStartSequence(s);break}case 32:{this.stateInRCDATA(s);break}case 26:{this.stateCDATASequence(s);break}case 19:{this.stateInAttrValueDoubleQuotes(s);break}case 12:{this.stateInAttrName(s);break}case 13:{this.stateInDirName(s);break}case 14:{this.stateInDirArg(s);break}case 15:{this.stateInDynamicDirArg(s);break}case 16:{this.stateInDirModifier(s);break}case 28:{this.stateInCommentLike(s);break}case 27:{this.stateInSpecialComment(s);break}case 11:{this.stateBeforeAttrName(s);break}case 6:{this.stateInTagName(s);break}case 34:{this.stateInSFCRootTagName(s);break}case 9:{this.stateInClosingTagName(s);break}case 5:{this.stateBeforeTagName(s);break}case 17:{this.stateAfterAttrName(s);break}case 20:{this.stateInAttrValueSingleQuotes(s);break}case 18:{this.stateBeforeAttrValue(s);break}case 8:{this.stateBeforeClosingTagName(s);break}case 10:{this.stateAfterClosingTagName(s);break}case 29:{this.stateBeforeSpecialS(s);break}case 30:{this.stateBeforeSpecialT(s);break}case 21:{this.stateInAttrValueNoQuotes(s);break}case 7:{this.stateInSelfClosingTag(s);break}case 23:{this.stateInDeclaration(s);break}case 22:{this.stateBeforeDeclaration(s);break}case 25:{this.stateBeforeComment(s);break}case 24:{this.stateInProcessingInstruction(s);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const n=this.buffer.length;this.sectionStart>=n||(this.state===28?this.currentSequence===oe.CdataEnd?this.cbs.oncdata(this.sectionStart,n):this.cbs.oncomment(this.sectionStart,n):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,n))}emitCodePoint(n,s){}}const Yl={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:t=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${t}.sync\` should be changed to \`v-model:${t}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function $n(t,{compatConfig:n}){const s=n&&n[t];return t==="MODE"?s||3:s}function De(t,n){const s=$n("MODE",n),o=$n(t,n);return s===3?o===!0:o!==!1}function Ye(t,n,s,...o){const r=De(t,n);return process.env.NODE_ENV!=="production"&&r&&St(t,n,s,...o),r}function St(t,n,s,...o){if($n(t,n)==="suppress-warning")return;const{message:l,link:i}=Yl[t],a=`(deprecation ${t}) ${typeof l=="function"?l(...o):l}${i?`
|
|
140
|
-
Details: ${i}`:""}`,c=new SyntaxError(a);c.code=t,s&&(c.loc=s),n.onWarn(c)}function
|
|
141
|
-
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""},ae=t=>t.type===4&&t.isStatic;function bs(t){switch(t){case"Teleport":case"teleport":return tt;case"Suspense":case"suspense":return dn;case"KeepAlive":case"keep-alive":return Nt;case"BaseTransition":case"base-transition":return as}}const Ql=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Dn=t=>!Ql.test(t),Vl=/[A-Za-z_$\xA0-\uFFFF]/,ea=/[\.\?\w$\xA0-\uFFFF]/,ta=/\s+[.[]\s*|\s*[.[]\s+/g,ks=t=>t.type===4?t.content:t.loc.source,Es=t=>{const n=ks(t).trim().replace(ta,a=>a.trim());let s=0,o=[],r=0,l=0,i=null;for(let a=0;a<n.length;a++){const c=n.charAt(a);switch(s){case 0:if(c==="[")o.push(s),s=1,r++;else if(c==="(")o.push(s),s=2,l++;else if(!(a===0?Vl:ea).test(c))return!1;break;case 1:c==="'"||c==='"'||c==="`"?(o.push(s),s=3,i=c):c==="["?r++:c==="]"&&(--r||(s=o.pop()));break;case 2:if(c==="'"||c==='"'||c==="`")o.push(s),s=3,i=c;else if(c==="(")l++;else if(c===")"){if(a===n.length-1)return!1;--l||(s=o.pop())}break;case 3:c===i&&(s=o.pop(),i=null);break}}return!r&&!l},na=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,sa=t=>na.test(ks(t));function Ns(t,n){if(!t)throw new Error(n||"unexpected compiler condition")}function ce(t,n,s=!1){for(let o=0;o<t.props.length;o++){const r=t.props[o];if(r.type===7&&(s||r.exp)&&(se(n)?r.name===n:n.test(r.name)))return r}}function it(t,n,s=!1,o=!1){for(let r=0;r<t.props.length;r++){const l=t.props[r];if(l.type===6){if(s)continue;if(l.name===n&&(l.value||o))return l}else if(l.name==="bind"&&(l.exp||o)&&Oe(l.arg,n))return l}}function Oe(t,n){return!!(t&&ae(t)&&t.content===n)}function oa(t){return t.props.some(n=>n.type===7&&n.name==="bind"&&(!n.arg||n.arg.type!==4||!n.arg.isStatic))}function On(t){return t.type===5||t.type===2}function ws(t){return t.type===7&&t.name==="pre"}function ra(t){return t.type===7&&t.name==="slot"}function Bt(t){return t.type===1&&t.tagType===3}function $t(t){return t.type===1&&t.tagType===2}const ia=new Set([st,ot]);function xs(t,n=[]){if(t&&!se(t)&&t.type===14){const s=t.callee;if(!se(s)&&ia.has(s))return xs(t.arguments[0],n.concat(t))}return[t,n]}function Tt(t,n,s){let o,r=t.type===13?t.props:t.arguments[2],l=[],i;if(r&&!se(r)&&r.type===14){const a=xs(r);r=a[0],l=a[1],i=l[l.length-1]}if(r==null||se(r))o=he([n]);else if(r.type===14){const a=r.arguments[0];!se(a)&&a.type===15?_s(n,a)||a.properties.unshift(n):r.callee===Nn?o=ne(s.helper(xt),[he([n]),r]):r.arguments.unshift(he([n])),!o&&(o=r)}else r.type===15?(_s(n,r)||r.properties.unshift(n),o=r):(o=ne(s.helper(xt),[he([n]),r]),i&&i.callee===ot&&(i=l[l.length-2]));t.type===13?i?i.arguments[0]=o:t.props=o:i?i.arguments[0]=o:t.arguments[2]=o}function _s(t,n){let s=!1;if(t.key.type===4){const o=t.key.content;s=n.properties.some(r=>r.key.type===4&&r.key.content===o)}return s}function lt(t,n){return`_${n}_${t.replace(/[^\w]/g,(s,o)=>s==="-"?"_":t.charCodeAt(o).toString())}`}function la(t){return t.type===14&&t.callee===Cn?t.arguments[1].returns:t}const aa=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Cs={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:Et,isPreTag:Et,isIgnoreNewlineTag:Et,isCustomElement:Et,onError:Tn,onWarn:vs,comments:process.env.NODE_ENV!=="production",prefixIdentifiers:!1};let q=Cs,at=null,_e="",ie=null,U=null,de="",Ce=-1,Pe=-1,Ln=0,Le=!1,In=null;const Y=[],Z=new Zl(Y,{onerr:pe,ontext(t,n){Dt(re(t,n),t,n)},ontextentity(t,n,s){Dt(t,n,s)},oninterpolation(t,n){if(Le)return Dt(re(t,n),t,n);let s=t+Z.delimiterOpen.length,o=n-Z.delimiterClose.length;for(;me(_e.charCodeAt(s));)s++;for(;me(_e.charCodeAt(o-1));)o--;let r=re(s,o);r.includes("&")&&(r=q.decodeEntities(r,!1)),An({type:5,content:Lt(r,!1,V(s,o)),loc:V(t,n)})},onopentagname(t,n){const s=re(t,n);ie={type:1,tag:s,ns:q.getNamespace(s,Y[0],q.ns),tagType:0,props:[],children:[],loc:V(t-1,n),codegenNode:void 0}},onopentagend(t){Bs(t)},onclosetag(t,n){const s=re(t,n);if(!q.isVoidTag(s)){let o=!1;for(let r=0;r<Y.length;r++)if(Y[r].tag.toLowerCase()===s.toLowerCase()){o=!0,r>0&&pe(24,Y[0].loc.start.offset);for(let i=0;i<=r;i++){const a=Y.shift();Ot(a,n,i<r)}break}o||pe(23,$s(t,60))}},onselfclosingtag(t){const n=ie.tag;ie.isSelfClosing=!0,Bs(t),Y[0]&&Y[0].tag===n&&Ot(Y.shift(),t)},onattribname(t,n){U={type:6,name:re(t,n),nameLoc:V(t,n),value:void 0,loc:V(t)}},ondirname(t,n){const s=re(t,n),o=s==="."||s===":"?"bind":s==="@"?"on":s==="#"?"slot":s.slice(2);if(!Le&&o===""&&pe(26,t),Le||o==="")U={type:6,name:s,nameLoc:V(t,n),value:void 0,loc:V(t)};else if(U={type:7,name:o,rawName:s,exp:void 0,arg:void 0,modifiers:s==="."?[F("prop")]:[],loc:V(t)},o==="pre"){Le=Z.inVPre=!0,In=ie;const r=ie.props;for(let l=0;l<r.length;l++)r[l].type===7&&(r[l]=ba(r[l]))}},ondirarg(t,n){if(t===n)return;const s=re(t,n);if(Le&&!ws(U))U.name+=s,Re(U.nameLoc,n);else{const o=s[0]!=="[";U.arg=Lt(o?s:s.slice(1,-1),o,V(t,n),o?3:0)}},ondirmodifier(t,n){const s=re(t,n);if(Le&&!ws(U))U.name+="."+s,Re(U.nameLoc,n);else if(U.name==="slot"){const o=U.arg;o&&(o.content+="."+s,Re(o.loc,n))}else{const o=F(s,!0,V(t,n));U.modifiers.push(o)}},onattribdata(t,n){de+=re(t,n),Ce<0&&(Ce=t),Pe=n},onattribentity(t,n,s){de+=t,Ce<0&&(Ce=n),Pe=s},onattribnameend(t){const n=U.loc.start.offset,s=re(n,t);U.type===7&&(U.rawName=s),ie.props.some(o=>(o.type===7?o.rawName:o.name)===s)&&pe(2,n)},onattribend(t,n){if(ie&&U){if(Re(U.loc,n),t!==0)if(de.includes("&")&&(de=q.decodeEntities(de,!0)),U.type===6)U.name==="class"&&(de=Os(de).trim()),t===1&&!de&&pe(13,n),U.value={type:2,content:de,loc:t===1?V(Ce,Pe):V(Ce-1,Pe+1)},Z.inSFCRoot&&ie.tag==="template"&&U.name==="lang"&&de&&de!=="html"&&Z.enterRCDATA(Ct("</template"),0);else{let s=0;U.exp=Lt(de,!1,V(Ce,Pe),0,s),U.name==="for"&&(U.forParseResult=da(U.exp));let o=-1;U.name==="bind"&&(o=U.modifiers.findIndex(r=>r.content==="sync"))>-1&&Ye("COMPILER_V_BIND_SYNC",q,U.loc,U.arg.loc.source)&&(U.name="model",U.modifiers.splice(o,1))}(U.type!==7||U.name!=="pre")&&ie.props.push(U)}de="",Ce=Pe=-1},oncomment(t,n){q.comments&&An({type:3,content:re(t,n),loc:V(t-4,n+3)})},onend(){const t=_e.length;if(process.env.NODE_ENV!=="production"&&Z.state!==1)switch(Z.state){case 5:case 8:pe(5,t);break;case 3:case 4:pe(25,Z.sectionStart);break;case 28:Z.currentSequence===oe.CdataEnd?pe(6,t):pe(7,t);break;case 6:case 7:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:pe(9,t);break}for(let n=0;n<Y.length;n++)Ot(Y[n],t-1),pe(24,Y[n].loc.start.offset)},oncdata(t,n){Y[0].ns!==0?Dt(re(t,n),t,n):pe(1,t-9)},onprocessinginstruction(t){(Y[0]?Y[0].ns:q.ns)===0&&pe(21,t-1)}}),Ss=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ca=/^\(|\)$/g;function da(t){const n=t.loc,s=t.content,o=s.match(aa);if(!o)return;const[,r,l]=o,i=(m,h,v=!1)=>{const x=n.start.offset+h,_=x+m.length;return Lt(m,!1,V(x,_),0,v?1:0)},a={source:i(l.trim(),s.indexOf(l,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(ca,"").trim();const f=r.indexOf(c),u=c.match(Ss);if(u){c=c.replace(Ss,"").trim();const m=u[1].trim();let h;if(m&&(h=s.indexOf(m,f+c.length),a.key=i(m,h,!0)),u[2]){const v=u[2].trim();v&&(a.index=i(v,s.indexOf(v,a.key?h+m.length:f+c.length),!0))}}return c&&(a.value=i(c,f,!0)),a}function re(t,n){return _e.slice(t,n)}function Bs(t){Z.inSFCRoot&&(ie.innerLoc=V(t+1,t+1)),An(ie);const{tag:n,ns:s}=ie;s===0&&q.isPreTag(n)&&Ln++,q.isVoidTag(n)?Ot(ie,t):(Y.unshift(ie),(s===1||s===2)&&(Z.inXML=!0)),ie=null}function Dt(t,n,s){{const l=Y[0]&&Y[0].tag;l!=="script"&&l!=="style"&&t.includes("&")&&(t=q.decodeEntities(t,!1))}const o=Y[0]||at,r=o.children[o.children.length-1];r&&r.type===2?(r.content+=t,Re(r.loc,s)):o.children.push({type:2,content:t,loc:V(n,s)})}function Ot(t,n,s=!1){s?Re(t.loc,$s(n,60)):Re(t.loc,pa(n,62)+1),Z.inSFCRoot&&(t.children.length?t.innerLoc.end=Be({},t.children[t.children.length-1].loc.end):t.innerLoc.end=Be({},t.innerLoc.start),t.innerLoc.source=re(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:o,ns:r,children:l}=t;if(Le||(o==="slot"?t.tagType=2:Ts(t)?t.tagType=3:ma(t)&&(t.tagType=1)),Z.inRCDATA||(t.children=Ds(l)),r===0&&q.isIgnoreNewlineTag(o)){const i=l[0];i&&i.type===2&&(i.content=i.content.replace(/^\r?\n/,""))}r===0&&q.isPreTag(o)&&Ln--,In===t&&(Le=Z.inVPre=!1,In=null),Z.inXML&&(Y[0]?Y[0].ns:q.ns)===0&&(Z.inXML=!1);{const i=t.props;if(process.env.NODE_ENV!=="production"&&De("COMPILER_V_IF_V_FOR_PRECEDENCE",q)){let c=!1,f=!1;for(let u=0;u<i.length;u++){const m=i[u];if(m.type===7&&(m.name==="if"?c=!0:m.name==="for"&&(f=!0)),c&&f){St("COMPILER_V_IF_V_FOR_PRECEDENCE",q,t.loc);break}}}if(!Z.inSFCRoot&&De("COMPILER_NATIVE_TEMPLATE",q)&&t.tag==="template"&&!Ts(t)){process.env.NODE_ENV!=="production"&&St("COMPILER_NATIVE_TEMPLATE",q,t.loc);const c=Y[0]||at,f=c.children.indexOf(t);c.children.splice(f,1,...t.children)}const a=i.find(c=>c.type===6&&c.name==="inline-template");a&&Ye("COMPILER_INLINE_TEMPLATE",q,a.loc)&&t.children.length&&(a.value={type:2,content:re(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function pa(t,n){let s=t;for(;_e.charCodeAt(s)!==n&&s<_e.length-1;)s++;return s}function $s(t,n){let s=t;for(;_e.charCodeAt(s)!==n&&s>=0;)s--;return s}const fa=new Set(["if","else","else-if","for","slot"]);function Ts({tag:t,props:n}){if(t==="template"){for(let s=0;s<n.length;s++)if(n[s].type===7&&fa.has(n[s].name))return!0}return!1}function ma({tag:t,props:n}){if(q.isCustomElement(t))return!1;if(t==="component"||ua(t.charCodeAt(0))||bs(t)||q.isBuiltInComponent&&q.isBuiltInComponent(t)||q.isNativeTag&&!q.isNativeTag(t))return!0;for(let s=0;s<n.length;s++){const o=n[s];if(o.type===6){if(o.name==="is"&&o.value){if(o.value.content.startsWith("vue:"))return!0;if(Ye("COMPILER_IS_ON_ELEMENT",q,o.loc))return!0}}else if(o.name==="bind"&&Oe(o.arg,"is")&&Ye("COMPILER_IS_ON_ELEMENT",q,o.loc))return!0}return!1}function ua(t){return t>64&&t<91}const ha=/\r\n/g;function Ds(t){const n=q.whitespace!=="preserve";let s=!1;for(let o=0;o<t.length;o++){const r=t[o];if(r.type===2)if(Ln)r.content=r.content.replace(ha,`
|
|
142
|
-
`);else if(ga(r.content)){const l=t[o-1]&&t[o-1].type,i=t[o+1]&&t[o+1].type;!l||!i||n&&(l===3&&(i===3||i===1)||l===1&&(i===3||i===1&&ya(r.content)))?(s=!0,t[o]=null):r.content=" "}else n&&(r.content=Os(r.content))}return s?t.filter(Boolean):t}function ga(t){for(let n=0;n<t.length;n++)if(!me(t.charCodeAt(n)))return!1;return!0}function ya(t){for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);if(s===10||s===13)return!0}return!1}function Os(t){let n="",s=!1;for(let o=0;o<t.length;o++)me(t.charCodeAt(o))?s||(n+=" ",s=!0):(n+=t[o],s=!1);return n}function An(t){(Y[0]||at).children.push(t)}function V(t,n){return{start:Z.getPos(t),end:n==null?n:Z.getPos(n),source:n==null?n:re(t,n)}}function va(t){return V(t.start.offset,t.end.offset)}function Re(t,n){t.end=Z.getPos(n),t.source=re(t.start.offset,n)}function ba(t){const n={type:6,name:t.rawName,nameLoc:V(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const s=t.exp.loc;s.end.offset<t.loc.end.offset&&(s.start.offset--,s.start.column--,s.end.offset++,s.end.column++),n.value={type:2,content:t.exp.content,loc:s}}return n}function Lt(t,n=!1,s,o=0,r=0){return F(t,n,s,o)}function pe(t,n,s){q.onError(G(t,V(n,n),void 0,s))}function ka(){Z.reset(),ie=null,U=null,de="",Ce=-1,Pe=-1,Y.length=0}function Ea(t,n){if(ka(),_e=t,q=Be({},Cs),n){let r;for(r in n)n[r]!=null&&(q[r]=n[r])}if(process.env.NODE_ENV!=="production"&&!q.decodeEntities)throw new Error("[@vue/compiler-core] decodeEntities option is required in browser builds.");Z.mode=q.parseMode==="html"?1:q.parseMode==="sfc"?2:0,Z.inXML=q.ns===1||q.ns===2;const s=n&&n.delimiters;s&&(Z.delimiterOpen=Ct(s[0]),Z.delimiterClose=Ct(s[1]));const o=at=Kl([],t);return Z.parse(_e),o.loc=V(0,t.length),o.children=Ds(o.children),at=null,o}function Na(t,n){It(t,void 0,n,!!Ls(t))}function Ls(t){const n=t.children.filter(s=>s.type!==3);return n.length===1&&n[0].type===1&&!$t(n[0])?n[0]:null}function It(t,n,s,o=!1,r=!1){const{children:l}=t,i=[];for(let m=0;m<l.length;m++){const h=l[m];if(h.type===1&&h.tagType===0){const v=o?0:ue(h,s);if(v>0){if(v>=2){h.codegenNode.patchFlag=-1,i.push(h);continue}}else{const x=h.codegenNode;if(x.type===13){const _=x.patchFlag;if((_===void 0||_===512||_===1)&&As(h,s)>=2){const N=Ms(h);N&&(x.props=s.hoist(N))}x.dynamicProps&&(x.dynamicProps=s.hoist(x.dynamicProps))}}}else if(h.type===12&&(o?0:ue(h,s))>=2){h.codegenNode.type===14&&h.codegenNode.arguments.length>0&&h.codegenNode.arguments.push(-1+(process.env.NODE_ENV!=="production"?` /* ${Ve[-1]} */`:"")),i.push(h);continue}if(h.type===1){const v=h.tagType===1;v&&s.scopes.vSlot++,It(h,t,s,!1,r),v&&s.scopes.vSlot--}else if(h.type===11)It(h,t,s,h.children.length===1,!0);else if(h.type===9)for(let v=0;v<h.branches.length;v++)It(h.branches[v],t,s,h.branches[v].children.length===1,r)}let a=!1;const c=[];if(i.length===l.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&we(t.codegenNode.children))t.codegenNode.children=f(Me(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!we(t.codegenNode.children)&&t.codegenNode.children.type===15){const m=u(t.codegenNode,"default");m&&(c.push(s.cached.length),m.returns=f(Me(m.returns)),a=!0)}else if(t.tagType===3&&n&&n.type===1&&n.tagType===1&&n.codegenNode&&n.codegenNode.type===13&&n.codegenNode.children&&!we(n.codegenNode.children)&&n.codegenNode.children.type===15){const m=ce(t,"slot",!0),h=m&&m.arg&&u(n.codegenNode,m.arg);h&&(c.push(s.cached.length),h.returns=f(Me(h.returns)),a=!0)}}if(!a)for(const m of i)c.push(s.cached.length),m.codegenNode=s.cache(m.codegenNode);c.length&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!we(t.codegenNode.children)&&t.codegenNode.children.type===15&&t.codegenNode.children.properties.push(Q("__",F(JSON.stringify(c),!1)));function f(m){const h=s.cache(m);return r&&s.hmr&&(h.needArraySpread=!0),h}function u(m,h){if(m.children&&!we(m.children)&&m.children.type===15){const v=m.children.properties.find(x=>x.key===h||x.key.content===h);return v&&v.value}}i.length&&s.transformHoist&&s.transformHoist(l,s,t)}function ue(t,n){const{constantCache:s}=n;switch(t.type){case 1:if(t.tagType!==0)return 0;const o=s.get(t);if(o!==void 0)return o;const r=t.codegenNode;if(r.type!==13||r.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(r.patchFlag===void 0){let i=3;const a=As(t,n);if(a===0)return s.set(t,0),0;a<i&&(i=a);for(let c=0;c<t.children.length;c++){const f=ue(t.children[c],n);if(f===0)return s.set(t,0),0;f<i&&(i=f)}if(i>1)for(let c=0;c<t.props.length;c++){const f=t.props[c];if(f.type===7&&f.name==="bind"&&f.exp){const u=ue(f.exp,n);if(u===0)return s.set(t,0),0;u<i&&(i=u)}}if(r.isBlock){for(let c=0;c<t.props.length;c++)if(t.props[c].type===7)return s.set(t,0),0;n.removeHelper(Ae),n.removeHelper(Ze(n.inSSR,r.isComponent)),r.isBlock=!1,n.helper(Je(n.inSSR,r.isComponent))}return s.set(t,i),i}else return s.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return ue(t.content,n);case 4:return t.constType;case 8:let l=3;for(let i=0;i<t.children.length;i++){const a=t.children[i];if(se(a)||ln(a))continue;const c=ue(a,n);if(c===0)return 0;c<l&&(l=c)}return l;case 20:return 2;default:return process.env.NODE_ENV,0}}const wa=new Set([kn,En,st,ot]);function Is(t,n){if(t.type===14&&!se(t.callee)&&wa.has(t.callee)){const s=t.arguments[0];if(s.type===4)return ue(s,n);if(s.type===14)return Is(s,n)}return 0}function As(t,n){let s=3;const o=Ms(t);if(o&&o.type===15){const{properties:r}=o;for(let l=0;l<r.length;l++){const{key:i,value:a}=r[l],c=ue(i,n);if(c===0)return c;c<s&&(s=c);let f;if(a.type===4?f=ue(a,n):a.type===14?f=Is(a,n):f=0,f===0)return f;f<s&&(s=f)}}return s}function Ms(t){const n=t.codegenNode;if(n.type===13)return n.props}function xa(t,{filename:n="",prefixIdentifiers:s=!1,hoistStatic:o=!1,hmr:r=!1,cacheHandlers:l=!1,nodeTransforms:i=[],directiveTransforms:a={},transformHoist:c=null,isBuiltInComponent:f=on,isCustomElement:u=on,expressionPlugins:m=[],scopeId:h=null,slotted:v=!0,ssr:x=!1,inSSR:_=!1,ssrCssVars:N="",bindingMetadata:C=Nl,inline:I=!1,isTS:B=!1,onError:T=Tn,onWarn:S=vs,compatConfig:W}){const ee=n.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),O={filename:n,selfName:ee&&cn($e(ee[1])),prefixIdentifiers:s,hoistStatic:o,hmr:r,cacheHandlers:l,nodeTransforms:i,directiveTransforms:a,transformHoist:c,isBuiltInComponent:f,isCustomElement:u,expressionPlugins:m,scopeId:h,slotted:v,ssr:x,inSSR:_,ssrCssVars:N,bindingMetadata:C,inline:I,isTS:B,onError:T,onWarn:S,compatConfig:W,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:t,childIndex:0,inVOnce:!1,helper(A){const z=O.helpers.get(A)||0;return O.helpers.set(A,z+1),A},removeHelper(A){const z=O.helpers.get(A);if(z){const R=z-1;R?O.helpers.set(A,R):O.helpers.delete(A)}},helperString(A){return`_${Ke[O.helper(A)]}`},replaceNode(A){if(process.env.NODE_ENV!=="production"){if(!O.currentNode)throw new Error("Node being replaced is already removed.");if(!O.parent)throw new Error("Cannot replace root node.")}O.parent.children[O.childIndex]=O.currentNode=A},removeNode(A){if(process.env.NODE_ENV!=="production"&&!O.parent)throw new Error("Cannot remove root node.");const z=O.parent.children,R=A?z.indexOf(A):O.currentNode?O.childIndex:-1;if(process.env.NODE_ENV!=="production"&&R<0)throw new Error("node being removed is not a child of current parent");!A||A===O.currentNode?(O.currentNode=null,O.onNodeRemoved()):O.childIndex>R&&(O.childIndex--,O.onNodeRemoved()),O.parent.children.splice(R,1)},onNodeRemoved:on,addIdentifiers(A){},removeIdentifiers(A){},hoist(A){se(A)&&(A=F(A)),O.hoists.push(A);const z=F(`_hoisted_${O.hoists.length}`,!1,A.loc,2);return z.hoisted=A,z},cache(A,z=!1,R=!1){const y=Gl(O.cached.length,A,z,R);return O.cached.push(y),y}};return O.filters=new Set,O}function _a(t,n){const s=xa(t,n);At(t,s),n.hoistStatic&&Na(t,s),n.ssr||Ca(t,s),t.helpers=new Set([...s.helpers.keys()]),t.components=[...s.components],t.directives=[...s.directives],t.imports=s.imports,t.hoists=s.hoists,t.temps=s.temps,t.cached=s.cached,t.transformed=!0,t.filters=[...s.filters]}function Ca(t,n){const{helper:s}=n,{children:o}=t;if(o.length===1){const r=Ls(t);if(r&&r.codegenNode){const l=r.codegenNode;l.type===13&&Bn(l,n),t.codegenNode=l}else t.codegenNode=o[0]}else if(o.length>1){let r=64;process.env.NODE_ENV!=="production"&&o.filter(l=>l.type!==3).length===1&&(r|=2048),t.codegenNode=rt(n,s(et),void 0,t.children,r,void 0,void 0,!0,void 0,!1)}}function Sa(t,n){let s=0;const o=()=>{s--};for(;s<t.children.length;s++){const r=t.children[s];se(r)||(n.grandParent=n.parent,n.parent=t,n.childIndex=s,n.onNodeRemoved=o,At(r,n))}}function At(t,n){n.currentNode=t;const{nodeTransforms:s}=n,o=[];for(let l=0;l<s.length;l++){const i=s[l](t,n);if(i&&(we(i)?o.push(...i):o.push(i)),n.currentNode)t=n.currentNode;else return}switch(t.type){case 3:n.ssr||n.helper(nt);break;case 5:n.ssr||n.helper(wt);break;case 9:for(let l=0;l<t.branches.length;l++)At(t.branches[l],n);break;case 10:case 11:case 1:case 0:Sa(t,n);break}n.currentNode=t;let r=o.length;for(;r--;)o[r]()}function Ps(t,n){const s=se(t)?o=>o===t:o=>t.test(o);return(o,r)=>{if(o.type===1){const{props:l}=o;if(o.tagType===3&&l.some(ra))return;const i=[];for(let a=0;a<l.length;a++){const c=l[a];if(c.type===7&&s(c.name)){l.splice(a,1),a--;const f=n(o,c,r);f&&i.push(f)}}return i}}}const Mt="/*@__PURE__*/",Rs=t=>`${Ke[t]}: _${Ke[t]}`;function Ba(t,{mode:n="function",prefixIdentifiers:s=n==="module",sourceMap:o=!1,filename:r="template.vue.html",scopeId:l=null,optimizeImports:i=!1,runtimeGlobalName:a="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:f="vue/server-renderer",ssr:u=!1,isTS:m=!1,inSSR:h=!1}){const v={mode:n,prefixIdentifiers:s,sourceMap:o,filename:r,scopeId:l,optimizeImports:i,runtimeGlobalName:a,runtimeModuleName:c,ssrRuntimeModuleName:f,ssr:u,isTS:m,inSSR:h,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(_){return`_${Ke[_]}`},push(_,N=-2,C){v.code+=_},indent(){x(++v.indentLevel)},deindent(_=!1){_?--v.indentLevel:x(--v.indentLevel)},newline(){x(v.indentLevel)}};function x(_){v.push(`
|
|
143
|
-
`+" ".repeat(_),0)}return v}function
|
|
144
|
-
`,-1),c())),t.components.length&&(Mn(t.components,"component",s),(t.directives.length||t.temps>0)&&c()),t.directives.length&&(Mn(t.directives,"directive",s),t.temps>0&&c()),t.filters&&t.filters.length&&(c(),Mn(t.filters,"filter",s),c()),t.temps>0){r("let ");for(let
|
|
145
|
-
`,0),c()),u||r("return "),t.codegenNode?le(t.codegenNode,s):r("null"),v&&(a(),r("}")),a(),r("}"),{ast:t,code:s.code,preamble:"",map:s.map?s.map.toJSON():void 0}}function
|
|
146
|
-
`,-1),t.hoists.length)){const m=[pn,fn,
|
|
147
|
-
`,-1)}Da(t.hoists,n),l(),r("return ")}function Mn(t,n,{helper:s,push:o,newline:r,isTS:l}){const i=s(n==="filter"?yn:n==="component"?un:gn);for(let a=0;a<t.length;a++){let c=t[a];const f=c.endsWith("__self");f&&(c=c.slice(0,-6)),o(`const ${lt(c,n)} = ${i}(${JSON.stringify(c)}${f?", true":""})${l?"!":""}`),a<t.length-1&&r()}}function Da(t,n){if(!t.length)return;n.pure=!0;const{push:s,newline:o}=n;o();for(let r=0;r<t.length;r++){const l=t[r];l&&(s(`const _hoisted_${r+1} = `),le(l,n),o())}n.pure=!1}function Oa(t){return se(t)||t.type===4||t.type===2||t.type===5||t.type===8}function Pn(t,n){const s=t.length>3||process.env.NODE_ENV!=="production"&&t.some(o=>we(o)||!Oa(o));n.push("["),s&&n.indent(),ct(t,n,s),s&&n.deindent(),n.push("]")}function ct(t,n,s=!1,o=!0){const{push:r,newline:l}=n;for(let i=0;i<t.length;i++){const a=t[i];se(a)?r(a,-3):we(a)?Pn(a,n):le(a,n),i<t.length-1&&(s?(o&&r(","),l()):o&&r(", "))}}function le(t,n){if(se(t)){n.push(t,-3);return}if(ln(t)){n.push(n.helper(t));return}switch(t.type){case 1:case 9:case 11:process.env.NODE_ENV!=="production"&&Ns(t.codegenNode!=null,"Codegen node is missing for element/if/for node. Apply appropriate transforms first."),le(t.codegenNode,n);break;case 2:La(t,n);break;case 4:Fs(t,n);break;case 5:Ia(t,n);break;case 12:le(t.codegenNode,n);break;case 8:zs(t,n);break;case 3:Ma(t,n);break;case 13:Pa(t,n);break;case 14:Fa(t,n);break;case 15:za(t,n);break;case 17:ja(t,n);break;case 18:Ha(t,n);break;case 19:Ua(t,n);break;case 20:qa(t,n);break;case 21:ct(t.body,n,!0,!1);break;case 22:break;case 23:break;case 24:break;case 25:break;case 26:break;case 10:break;default:if(process.env.NODE_ENV!=="production")return Ns(!1,`unhandled codegen node type: ${t.type}`),t}}function La(t,n){n.push(JSON.stringify(t.content),-3,t)}function Fs(t,n){const{content:s,isStatic:o}=t;n.push(o?JSON.stringify(s):s,-3,t)}function Ia(t,n){const{push:s,helper:o,pure:r}=n;r&&s(Mt),s(`${o(wt)}(`),le(t.content,n),s(")")}function zs(t,n){for(let s=0;s<t.children.length;s++){const o=t.children[s];se(o)?n.push(o,-3):le(o,n)}}function Aa(t,n){const{push:s}=n;if(t.type===8)s("["),zs(t,n),s("]");else if(t.isStatic){const o=Dn(t.content)?t.content:JSON.stringify(t.content);s(o,-2,t)}else s(`[${t.content}]`,-3,t)}function Ma(t,n){const{push:s,helper:o,pure:r}=n;r&&s(Mt),s(`${o(nt)}(${JSON.stringify(t.content)})`,-3,t)}function Pa(t,n){const{push:s,helper:o,pure:r}=n,{tag:l,props:i,children:a,patchFlag:c,dynamicProps:f,directives:u,isBlock:m,disableTracking:h,isComponent:v}=t;let x;if(c)if(process.env.NODE_ENV!=="production")if(c<0)x=c+` /* ${Ve[c]} */`;else{const N=Object.keys(Ve).map(Number).filter(C=>C>0&&c&C).map(C=>Ve[C]).join(", ");x=c+` /* ${N} */`}else x=String(c);u&&s(o(vn)+"("),m&&s(`(${o(Ae)}(${h?"true":""}), `),r&&s(Mt);const _=m?Ze(n.inSSR,v):Je(n.inSSR,v);s(o(_)+"(",-2,t),ct(Ra([l,i,a,x,f]),n),s(")"),m&&s(")"),u&&(s(", "),le(u,n),s(")"))}function Ra(t){let n=t.length;for(;n--&&t[n]==null;);return t.slice(0,n+1).map(s=>s||"null")}function Fa(t,n){const{push:s,helper:o,pure:r}=n,l=se(t.callee)?t.callee:o(t.callee);r&&s(Mt),s(l+"(",-2,t),ct(t.arguments,n),s(")")}function za(t,n){const{push:s,indent:o,deindent:r,newline:l}=n,{properties:i}=t;if(!i.length){s("{}",-2,t);return}const a=i.length>1||process.env.NODE_ENV!=="production"&&i.some(c=>c.value.type!==4);s(a?"{":"{ "),a&&o();for(let c=0;c<i.length;c++){const{key:f,value:u}=i[c];Aa(f,n),s(": "),le(u,n),c<i.length-1&&(s(","),l())}a&&r(),s(a?"}":" }")}function ja(t,n){Pn(t.elements,n)}function Ha(t,n){const{push:s,indent:o,deindent:r}=n,{params:l,returns:i,body:a,newline:c,isSlot:f}=t;f&&s(`_${Ke[_n]}(`),s("(",-2,t),we(l)?ct(l,n):l&&le(l,n),s(") => "),(c||a)&&(s("{"),o()),i?(c&&s("return "),we(i)?Pn(i,n):le(i,n)):a&&le(a,n),(c||a)&&(r(),s("}")),f&&(t.isNonScopedSlot&&s(", undefined, true"),s(")"))}function Ua(t,n){const{test:s,consequent:o,alternate:r,newline:l}=t,{push:i,indent:a,deindent:c,newline:f}=n;if(s.type===4){const m=!Dn(s.content);m&&i("("),Fs(s,n),m&&i(")")}else i("("),le(s,n),i(")");l&&a(),n.indentLevel++,l||i(" "),i("? "),le(o,n),n.indentLevel--,l&&f(),l||i(" "),i(": ");const u=r.type===19;u||n.indentLevel++,le(r,n),u||n.indentLevel--,l&&c(!0)}function qa(t,n){const{push:s,helper:o,indent:r,deindent:l,newline:i}=n,{needPauseTracking:a,needArraySpread:c}=t;c&&s("[...("),s(`_cache[${t.index}] || (`),a&&(r(),s(`${o(_t)}(-1`),t.inVOnce&&s(", true"),s("),"),i(),s("(")),s(`_cache[${t.index}] = `),le(t.value,n),a&&(s(`).cacheIndex = ${t.index},`),i(),s(`${o(_t)}(1),`),i(),s(`_cache[${t.index}]`),l()),s(")"),c&&s(")]")}const Wa=new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b"),Ka=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function Fe(t,n,s=!1,o=!1){const r=t.content;if(r.trim())try{new Function(o?` ${r} `:`return ${s?`(${r}) => {}`:`(${r})`}`)}catch(l){let i=l.message;const a=r.replace(Ka,"").match(Wa);a&&(i=`avoid using JavaScript keyword as property name: "${a[0]}"`),n.onError(G(45,t.loc,void 0,i))}}const Ga=(t,n)=>{if(t.type===5)t.content=Rn(t.content,n);else if(t.type===1){const s=ce(t,"memo");for(let o=0;o<t.props.length;o++){const r=t.props[o];if(r.type===7&&r.name!=="for"){const l=r.exp,i=r.arg;l&&l.type===4&&!(r.name==="on"&&i)&&!(s&&i&&i.type===4&&i.content==="key")&&(r.exp=Rn(l,n,r.name==="slot")),i&&i.type===4&&!i.isStatic&&(r.arg=Rn(i,n))}}}};function Rn(t,n,s=!1,o=!1,r=Object.create(n.identifiers)){return process.env.NODE_ENV!=="production"&&Fe(t,n,s,o),t}const Ja=Ps(/^(if|else|else-if)$/,(t,n,s)=>Za(t,n,s,(o,r,l)=>{const i=s.parent.children;let a=i.indexOf(o),c=0;for(;a-->=0;){const f=i[a];f&&f.type===9&&(c+=f.branches.length)}return()=>{if(l)o.codegenNode=Hs(r,c,s);else{const f=Xa(o.codegenNode);f.alternate=Hs(r,c+o.branches.length-1,s)}}}));function Za(t,n,s,o){if(n.name!=="else"&&(!n.exp||!n.exp.content.trim())){const r=n.exp?n.exp.loc:t.loc;s.onError(G(28,n.loc)),n.exp=F("true",!1,r)}if(process.env.NODE_ENV!=="production"&&n.exp&&Fe(n.exp,s),n.name==="if"){const r=js(t,n),l={type:9,loc:va(t.loc),branches:[r]};if(s.replaceNode(l),o)return o(l,r,!0)}else{const r=s.parent.children,l=[];let i=r.indexOf(t);for(;i-->=-1;){const a=r[i];if(a&&a.type===3){s.removeNode(a),process.env.NODE_ENV!=="production"&&l.unshift(a);continue}if(a&&a.type===2&&!a.content.trim().length){s.removeNode(a);continue}if(a&&a.type===9){n.name==="else-if"&&a.branches[a.branches.length-1].condition===void 0&&s.onError(G(30,t.loc)),s.removeNode();const c=js(t,n);if(process.env.NODE_ENV!=="production"&&l.length&&!(s.parent&&s.parent.type===1&&(s.parent.tag==="transition"||s.parent.tag==="Transition"))&&(c.children=[...l,...c.children]),process.env.NODE_ENV!=="production"){const u=c.userKey;u&&a.branches.forEach(({userKey:m})=>{Ya(m,u)&&s.onError(G(29,c.userKey.loc))})}a.branches.push(c);const f=o&&o(a,c,!1);At(c,s),f&&f(),s.currentNode=null}else s.onError(G(30,t.loc));break}}}function js(t,n){const s=t.tagType===3;return{type:10,loc:t.loc,condition:n.name==="else"?void 0:n.exp,children:s&&!ce(t,"for")?t.children:[t],userKey:it(t,"key"),isTemplateIf:s}}function Hs(t,n,s){return t.condition?Sn(t.condition,Us(t,n,s),ne(s.helper(nt),[process.env.NODE_ENV!=="production"?'"v-if"':'""',"true"])):Us(t,n,s)}function Us(t,n,s){const{helper:o}=s,r=Q("key",F(`${n}`,!1,fe,2)),{children:l}=t,i=l[0];if(l.length!==1||i.type!==1)if(l.length===1&&i.type===11){const c=i.codegenNode;return Tt(c,r,s),c}else{let c=64;return process.env.NODE_ENV!=="production"&&!t.isTemplateIf&&l.filter(f=>f.type!==3).length===1&&(c|=2048),rt(s,o(et),he([r]),l,c,void 0,void 0,!0,!1,!1,t.loc)}else{const c=i.codegenNode,f=la(c);return f.type===13&&Bn(f,s),Tt(f,r,s),c}}function Ya(t,n){if(!t||t.type!==n.type)return!1;if(t.type===6){if(t.value.content!==n.value.content)return!1}else{const s=t.exp,o=n.exp;if(s.type!==o.type||s.type!==4||s.isStatic!==o.isStatic||s.content!==o.content)return!1}return!0}function Xa(t){for(;;)if(t.type===19)if(t.alternate.type===19)t=t.alternate;else return t;else t.type===20&&(t=t.value)}const Qa=(t,n,s)=>{const{modifiers:o,loc:r}=t,l=t.arg;let{exp:i}=t;if(i&&i.type===4&&!i.content.trim()&&(i=void 0),!i){if(l.type!==4||!l.isStatic)return s.onError(G(52,l.loc)),{props:[Q(l,F("",!0,r))]};qs(t),i=t.exp}return l.type!==4?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=l.content?`${l.content} || ""`:'""'),o.some(a=>a.content==="camel")&&(l.type===4?l.isStatic?l.content=$e(l.content):l.content=`${s.helperString(wn)}(${l.content})`:(l.children.unshift(`${s.helperString(wn)}(`),l.children.push(")"))),s.inSSR||(o.some(a=>a.content==="prop")&&Ws(l,"."),o.some(a=>a.content==="attr")&&Ws(l,"^")),{props:[Q(l,i)]}},qs=(t,n)=>{const s=t.arg,o=$e(s.content);t.exp=F(o,!1,s.loc)},Ws=(t,n)=>{t.type===4?t.isStatic?t.content=n+t.content:t.content=`\`${n}\${${t.content}}\``:(t.children.unshift(`'${n}' + (`),t.children.push(")"))},Va=Ps("for",(t,n,s)=>{const{helper:o,removeHelper:r}=s;return ec(t,n,s,l=>{const i=ne(o(bn),[l.source]),a=Bt(t),c=ce(t,"memo"),f=it(t,"key",!1,!0);f&&f.type===7&&!f.exp&&qs(f);let m=f&&(f.type===6?f.value?F(f.value.content,!0):void 0:f.exp);const h=f&&m?Q("key",m):null,v=l.source.type===4&&l.source.constType>0,x=v?64:f?128:256;return l.codegenNode=rt(s,o(et),void 0,i,x,void 0,void 0,!0,!v,!1,t.loc),()=>{let _;const{children:N}=l;process.env.NODE_ENV!=="production"&&a&&t.children.some(B=>{if(B.type===1){const T=it(B,"key");if(T)return s.onError(G(33,T.loc)),!0}});const C=N.length!==1||N[0].type!==1,I=$t(t)?t:a&&t.children.length===1&&$t(t.children[0])?t.children[0]:null;if(I?(_=I.codegenNode,a&&h&&Tt(_,h,s)):C?_=rt(s,o(et),h?he([h]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(_=N[0].codegenNode,a&&h&&Tt(_,h,s),_.isBlock!==!v&&(_.isBlock?(r(Ae),r(Ze(s.inSSR,_.isComponent))):r(Je(s.inSSR,_.isComponent))),_.isBlock=!v,_.isBlock?(o(Ae),o(Ze(s.inSSR,_.isComponent))):o(Je(s.inSSR,_.isComponent))),c){const B=Ge(Fn(l.parseResult,[F("_cached")]));B.body=Jl([ge(["const _memo = (",c.exp,")"]),ge(["if (_cached",...m?[" && _cached.key === ",m]:[],` && ${s.helperString(us)}(_cached, _memo)) return _cached`]),ge(["const _item = ",_]),F("_item.memo = _memo"),F("return _item")]),i.arguments.push(B,F("_cache"),F(String(s.cached.length))),s.cached.push(null)}else i.arguments.push(Ge(Fn(l.parseResult),_,!0))}})});function ec(t,n,s,o){if(!n.exp){s.onError(G(31,n.loc));return}const r=n.forParseResult;if(!r){s.onError(G(32,n.loc));return}Ks(r,s);const{addIdentifiers:l,removeIdentifiers:i,scopes:a}=s,{source:c,value:f,key:u,index:m}=r,h={type:11,loc:n.loc,source:c,valueAlias:f,keyAlias:u,objectIndexAlias:m,parseResult:r,children:Bt(t)?t.children:[t]};s.replaceNode(h),a.vFor++;const v=o&&o(h);return()=>{a.vFor--,v&&v()}}function Ks(t,n){t.finalized||(process.env.NODE_ENV!=="production"&&(Fe(t.source,n),t.key&&Fe(t.key,n,!0),t.index&&Fe(t.index,n,!0),t.value&&Fe(t.value,n,!0)),t.finalized=!0)}function Fn({value:t,key:n,index:s},o=[]){return tc([t,n,s,...o])}function tc(t){let n=t.length;for(;n--&&!t[n];);return t.slice(0,n+1).map((s,o)=>s||F("_".repeat(o+1),!1))}const Gs=F("undefined",!1),nc=(t,n)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const s=ce(t,"slot");if(s)return s.exp,n.scopes.vSlot++,()=>{n.scopes.vSlot--}}},sc=(t,n,s,o)=>Ge(t,s,!1,!0,s.length?s[0].loc:o);function oc(t,n,s=sc){n.helper(_n);const{children:o,loc:r}=t,l=[],i=[];let a=n.scopes.vSlot>0||n.scopes.vFor>0;const c=ce(t,"slot",!0);if(c){const{arg:N,exp:C}=c;N&&!ae(N)&&(a=!0),l.push(Q(N||F("default",!0),s(C,void 0,o,r)))}let f=!1,u=!1;const m=[],h=new Set;let v=0;for(let N=0;N<o.length;N++){const C=o[N];let I;if(!Bt(C)||!(I=ce(C,"slot",!0))){C.type!==3&&m.push(C);continue}if(c){n.onError(G(37,I.loc));break}f=!0;const{children:B,loc:T}=C,{arg:S=F("default",!0),exp:W,loc:ee}=I;let O;ae(S)?O=S?S.content:"default":a=!0;const A=ce(C,"for"),z=s(W,A,B,T);let R,y;if(R=ce(C,"if"))a=!0,i.push(Sn(R.exp,Pt(S,z,v++),Gs));else if(y=ce(C,/^else(-if)?$/,!0)){let $=N,b;for(;$--&&(b=o[$],!(b.type!==3&&zn(b))););if(b&&Bt(b)&&ce(b,/^(else-)?if$/)){let D=i[i.length-1];for(;D.alternate.type===19;)D=D.alternate;D.alternate=y.exp?Sn(y.exp,Pt(S,z,v++),Gs):Pt(S,z,v++)}else n.onError(G(30,y.loc))}else if(A){a=!0;const $=A.forParseResult;$?(Ks($,n),i.push(ne(n.helper(bn),[$.source,Ge(Fn($),Pt(S,z),!0)]))):n.onError(G(32,A.loc))}else{if(O){if(h.has(O)){n.onError(G(38,ee));continue}h.add(O),O==="default"&&(u=!0)}l.push(Q(S,z))}}if(!c){const N=(C,I)=>{const B=s(C,void 0,I,r);return n.compatConfig&&(B.isNonScopedSlot=!0),Q("default",B)};f?m.length&&m.some(C=>zn(C))&&(u?n.onError(G(39,m[0].loc)):l.push(N(void 0,m))):l.push(N(void 0,o))}const x=a?2:Rt(t.children)?3:1;let _=he(l.concat(Q("_",F(x+(process.env.NODE_ENV!=="production"?` /* ${Sl[x]} */`:""),!1))),r);return i.length&&(_=ne(n.helper(ms),[_,Me(i)])),{slots:_,hasDynamicSlots:a}}function Pt(t,n,s){const o=[Q("name",t),Q("fn",n)];return s!=null&&o.push(Q("key",F(String(s),!0))),he(o)}function Rt(t){for(let n=0;n<t.length;n++){const s=t[n];switch(s.type){case 1:if(s.tagType===2||Rt(s.children))return!0;break;case 9:if(Rt(s.branches))return!0;break;case 10:case 11:if(Rt(s.children))return!0;break}}return!1}function zn(t){return t.type!==2&&t.type!==12?!0:t.type===2?!!t.content.trim():zn(t.content)}const Js=new WeakMap,rc=(t,n)=>function(){if(t=n.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:o,props:r}=t,l=t.tagType===1;let i=l?ic(t,n):`"${o}"`;const a=wl(i)&&i.callee===hn;let c,f,u=0,m,h,v,x=a||i===tt||i===dn||!l&&(o==="svg"||o==="foreignObject"||o==="math");if(r.length>0){const _=Zs(t,n,void 0,l,a);c=_.props,u=_.patchFlag,h=_.dynamicPropNames;const N=_.directives;v=N&&N.length?Me(N.map(C=>ac(C,n))):void 0,_.shouldUseBlock&&(x=!0)}if(t.children.length>0)if(i===Nt&&(x=!0,u|=1024,process.env.NODE_ENV!=="production"&&t.children.length>1&&n.onError(G(46,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}))),l&&i!==tt&&i!==Nt){const{slots:N,hasDynamicSlots:C}=oc(t,n);f=N,C&&(u|=1024)}else if(t.children.length===1&&i!==tt){const N=t.children[0],C=N.type,I=C===5||C===8;I&&ue(N,n)===0&&(u|=1),I||C===2?f=N:f=t.children}else f=t.children;h&&h.length&&(m=cc(h)),t.codegenNode=rt(n,i,c,f,u===0?void 0:u,m,v,!!x,!1,l,t.loc)};function ic(t,n,s=!1){let{tag:o}=t;const r=jn(o),l=it(t,"is",!1,!0);if(l)if(r||De("COMPILER_IS_ON_ELEMENT",n)){let a;if(l.type===6?a=l.value&&F(l.value.content,!0):(a=l.exp,a||(a=F("is",!1,l.arg.loc))),a)return ne(n.helper(hn),[a])}else l.type===6&&l.value.content.startsWith("vue:")&&(o=l.value.content.slice(4));const i=bs(o)||n.isBuiltInComponent(o);return i?(s||n.helper(i),i):(n.helper(un),n.components.add(o),lt(o,"component"))}function Zs(t,n,s=t.props,o,r,l=!1){const{tag:i,loc:a,children:c}=t;let f=[];const u=[],m=[],h=c.length>0;let v=!1,x=0,_=!1,N=!1,C=!1,I=!1,B=!1,T=!1;const S=[],W=z=>{f.length&&(u.push(he(Ys(f),a)),f=[]),z&&u.push(z)},ee=()=>{n.scopes.vFor>0&&f.push(Q(F("ref_for",!0),F("true")))},O=({key:z,value:R})=>{if(ae(z)){const y=z.content,$=rn(y);if($&&(!o||r)&&y.toLowerCase()!=="onclick"&&y!=="onUpdate:modelValue"&&!ls(y)&&(I=!0),$&&ls(y)&&(T=!0),$&&R.type===14&&(R=R.arguments[0]),R.type===20||(R.type===4||R.type===8)&&ue(R,n)>0)return;y==="ref"?_=!0:y==="class"?N=!0:y==="style"?C=!0:y!=="key"&&!S.includes(y)&&S.push(y),o&&(y==="class"||y==="style")&&!S.includes(y)&&S.push(y)}else B=!0};for(let z=0;z<s.length;z++){const R=s[z];if(R.type===6){const{loc:y,name:$,nameLoc:b,value:D}=R;let J=!0;if($==="ref"&&(_=!0,ee()),$==="is"&&(jn(i)||D&&D.content.startsWith("vue:")||De("COMPILER_IS_ON_ELEMENT",n)))continue;f.push(Q(F($,!0,b),F(D?D.content:"",J,D?D.loc:y)))}else{const{name:y,arg:$,exp:b,loc:D,modifiers:J}=R,ve=y==="bind",be=y==="on";if(y==="slot"){o||n.onError(G(40,D));continue}if(y==="once"||y==="memo"||y==="is"||ve&&Oe($,"is")&&(jn(i)||De("COMPILER_IS_ON_ELEMENT",n))||be&&l)continue;if((ve&&Oe($,"key")||be&&h&&Oe($,"vue:before-update"))&&(v=!0),ve&&Oe($,"ref")&&ee(),!$&&(ve||be)){if(B=!0,b)if(ve){if(W(),process.env.NODE_ENV!=="production"&&u.some(ke=>ke.type===15?ke.properties.some(({key:Se})=>Se.type!==4||!Se.isStatic?!0:Se.content!=="class"&&Se.content!=="style"&&!rn(Se.content)):!0)&&Ye("COMPILER_V_BIND_OBJECT_ORDER",n,D),De("COMPILER_V_BIND_OBJECT_ORDER",n)){u.unshift(b);continue}ee(),W(),u.push(b)}else W({type:14,loc:D,callee:n.helper(Nn),arguments:o?[b]:[b,"true"]});else n.onError(G(ve?34:35,D));continue}ve&&J.some(xe=>xe.content==="prop")&&(x|=32);const He=n.directiveTransforms[y];if(He){const{props:xe,needRuntime:ke}=He(R,t,n);!l&&xe.forEach(O),be&&$&&!ae($)?W(he(xe,a)):f.push(...xe),ke&&(m.push(R),ln(ke)&&Js.set(R,ke))}else xl(y)||(m.push(R),h&&(v=!0))}}let A;if(u.length?(W(),u.length>1?A=ne(n.helper(xt),u,a):A=u[0]):f.length&&(A=he(Ys(f),a)),B?x|=16:(N&&!o&&(x|=2),C&&!o&&(x|=4),S.length&&(x|=8),I&&(x|=32)),!v&&(x===0||x===32)&&(_||T||m.length>0)&&(x|=512),!n.inSSR&&A)switch(A.type){case 15:let z=-1,R=-1,y=!1;for(let D=0;D<A.properties.length;D++){const J=A.properties[D].key;ae(J)?J.content==="class"?z=D:J.content==="style"&&(R=D):J.isHandlerKey||(y=!0)}const $=A.properties[z],b=A.properties[R];y?A=ne(n.helper(st),[A]):($&&!ae($.value)&&($.value=ne(n.helper(kn),[$.value])),b&&(C||b.value.type===4&&b.value.content.trim()[0]==="["||b.value.type===17)&&(b.value=ne(n.helper(En),[b.value])));break;case 14:break;default:A=ne(n.helper(st),[ne(n.helper(ot),[A])]);break}return{props:A,directives:m,patchFlag:x,dynamicPropNames:S,shouldUseBlock:v}}function Ys(t){const n=new Map,s=[];for(let o=0;o<t.length;o++){const r=t[o];if(r.key.type===8||!r.key.isStatic){s.push(r);continue}const l=r.key.content,i=n.get(l);i?(l==="style"||l==="class"||rn(l))&&lc(i,r):(n.set(l,r),s.push(r))}return s}function lc(t,n){t.value.type===17?t.value.elements.push(n.value):t.value=Me([t.value,n.value],t.loc)}function ac(t,n){const s=[],o=Js.get(t);o?s.push(n.helperString(o)):(n.helper(gn),n.directives.add(t.name),s.push(lt(t.name,"directive")));const{loc:r}=t;if(t.exp&&s.push(t.exp),t.arg&&(t.exp||s.push("void 0"),s.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||s.push("void 0"),s.push("void 0"));const l=F("true",!1,r);s.push(he(t.modifiers.map(i=>Q(i,l)),r))}return Me(s,t.loc)}function cc(t){let n="[";for(let s=0,o=t.length;s<o;s++)n+=JSON.stringify(t[s]),s<o-1&&(n+=", ");return n+"]"}function jn(t){return t==="component"||t==="Component"}const dc=(t,n)=>{if($t(t)){const{children:s,loc:o}=t,{slotName:r,slotProps:l}=pc(t,n),i=[n.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let a=2;l&&(i[2]=l,a=3),s.length&&(i[3]=Ge([],s,!1,!1,o),a=4),n.scopeId&&!n.slotted&&(a=5),i.splice(a),t.codegenNode=ne(n.helper(fs),i,o)}};function pc(t,n){let s='"default"',o;const r=[];for(let l=0;l<t.props.length;l++){const i=t.props[l];if(i.type===6)i.value&&(i.name==="name"?s=JSON.stringify(i.value.content):(i.name=$e(i.name),r.push(i)));else if(i.name==="bind"&&Oe(i.arg,"name")){if(i.exp)s=i.exp;else if(i.arg&&i.arg.type===4){const a=$e(i.arg.content);s=i.exp=F(a,!1,i.arg.loc)}}else i.name==="bind"&&i.arg&&ae(i.arg)&&(i.arg.content=$e(i.arg.content)),r.push(i)}if(r.length>0){const{props:l,directives:i}=Zs(t,n,r,!1,!1);o=l,i.length&&n.onError(G(36,i[0].loc))}return{slotName:s,slotProps:o}}const Xs=(t,n,s,o)=>{const{loc:r,modifiers:l,arg:i}=t;!t.exp&&!l.length&&s.onError(G(35,r));let a;if(i.type===4)if(i.isStatic){let m=i.content;process.env.NODE_ENV!=="production"&&m.startsWith("vnode")&&s.onError(G(51,i.loc)),m.startsWith("vue:")&&(m=`vnode-${m.slice(4)}`);const h=n.tagType!==0||m.startsWith("vnode")||!/[A-Z]/.test(m)?Cl($e(m)):`on:${m}`;a=F(h,!0,i.loc)}else a=ge([`${s.helperString(xn)}(`,i,")"]);else a=i,a.children.unshift(`${s.helperString(xn)}(`),a.children.push(")");let c=t.exp;c&&!c.content.trim()&&(c=void 0);let f=s.cacheHandlers&&!c&&!s.inVOnce;if(c){const m=Es(c),h=!(m||sa(c)),v=c.content.includes(";");process.env.NODE_ENV!=="production"&&Fe(c,s,!1,v),(h||f&&m)&&(c=ge([`${h?"$event":"(...args)"} => ${v?"{":"("}`,c,v?"}":")"]))}let u={props:[Q(a,c||F("() => {}",!1,r))]};return o&&(u=o(u)),f&&(u.props[0].value=s.cache(u.props[0].value)),u.props.forEach(m=>m.key.isHandlerKey=!0),u},fc=(t,n)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const s=t.children;let o,r=!1;for(let l=0;l<s.length;l++){const i=s[l];if(On(i)){r=!0;for(let a=l+1;a<s.length;a++){const c=s[a];if(On(c))o||(o=s[l]=ge([i],i.loc)),o.children.push(" + ",c),s.splice(a,1),a--;else{o=void 0;break}}}}if(!(!r||s.length===1&&(t.type===0||t.type===1&&t.tagType===0&&!t.props.find(l=>l.type===7&&!n.directiveTransforms[l.name])&&t.tag!=="template")))for(let l=0;l<s.length;l++){const i=s[l];if(On(i)||i.type===8){const a=[];(i.type!==2||i.content!==" ")&&a.push(i),!n.ssr&&ue(i,n)===0&&a.push(1+(process.env.NODE_ENV!=="production"?` /* ${Ve[1]} */`:"")),s[l]={type:12,content:i,loc:i.loc,codegenNode:ne(n.helper(mn),a)}}}}},Qs=new WeakSet,mc=(t,n)=>{if(t.type===1&&ce(t,"once",!0))return Qs.has(t)||n.inVOnce||n.inSSR?void 0:(Qs.add(t),n.inVOnce=!0,n.helper(_t),()=>{n.inVOnce=!1;const s=n.currentNode;s.codegenNode&&(s.codegenNode=n.cache(s.codegenNode,!0,!0))})},Vs=(t,n,s)=>{const{exp:o,arg:r}=t;if(!o)return s.onError(G(41,t.loc)),Ft();const l=o.loc.source.trim(),i=o.type===4?o.content:l,a=s.bindingMetadata[l];if(a==="props"||a==="props-aliased")return s.onError(G(44,o.loc)),Ft();if(!i.trim()||!Es(o))return s.onError(G(42,o.loc)),Ft();const c=r||F("modelValue",!0),f=r?ae(r)?`onUpdate:${$e(r.content)}`:ge(['"onUpdate:" + ',r]):"onUpdate:modelValue";let u;const m=s.isTS?"($event: any)":"$event";u=ge([`${m} => ((`,o,") = $event)"]);const h=[Q(c,t.exp),Q(f,u)];if(t.modifiers.length&&n.tagType===1){const v=t.modifiers.map(_=>_.content).map(_=>(Dn(_)?_:JSON.stringify(_))+": true").join(", "),x=r?ae(r)?`${r.content}Modifiers`:ge([r,' + "Modifiers"']):"modelModifiers";h.push(Q(x,F(`{ ${v} }`,!1,t.loc,2)))}return Ft(h)};function Ft(t=[]){return{props:t}}const uc=/[\w).+\-_$\]]/,hc=(t,n)=>{De("COMPILER_FILTERS",n)&&(t.type===5?zt(t.content,n):t.type===1&&t.props.forEach(s=>{s.type===7&&s.name!=="for"&&s.exp&&zt(s.exp,n)}))};function zt(t,n){if(t.type===4)eo(t,n);else for(let s=0;s<t.children.length;s++){const o=t.children[s];typeof o=="object"&&(o.type===4?eo(o,n):o.type===8?zt(t,n):o.type===5&&zt(o.content,n))}}function eo(t,n){const s=t.content;let o=!1,r=!1,l=!1,i=!1,a=0,c=0,f=0,u=0,m,h,v,x,_=[];for(v=0;v<s.length;v++)if(h=m,m=s.charCodeAt(v),o)m===39&&h!==92&&(o=!1);else if(r)m===34&&h!==92&&(r=!1);else if(l)m===96&&h!==92&&(l=!1);else if(i)m===47&&h!==92&&(i=!1);else if(m===124&&s.charCodeAt(v+1)!==124&&s.charCodeAt(v-1)!==124&&!a&&!c&&!f)x===void 0?(u=v+1,x=s.slice(0,v).trim()):N();else{switch(m){case 34:r=!0;break;case 39:o=!0;break;case 96:l=!0;break;case 40:f++;break;case 41:f--;break;case 91:c++;break;case 93:c--;break;case 123:a++;break;case 125:a--;break}if(m===47){let C=v-1,I;for(;C>=0&&(I=s.charAt(C),I===" ");C--);(!I||!uc.test(I))&&(i=!0)}}x===void 0?x=s.slice(0,v).trim():u!==0&&N();function N(){_.push(s.slice(u,v).trim()),u=v+1}if(_.length){for(process.env.NODE_ENV!=="production"&&St("COMPILER_FILTERS",n,t.loc),v=0;v<_.length;v++)x=gc(x,_[v],n);t.content=x,t.ast=void 0}}function gc(t,n,s){s.helper(yn);const o=n.indexOf("(");if(o<0)return s.filters.add(n),`${lt(n,"filter")}(${t})`;{const r=n.slice(0,o),l=n.slice(o+1);return s.filters.add(r),`${lt(r,"filter")}(${t}${l!==")"?","+l:l}`}}const to=new WeakSet,yc=(t,n)=>{if(t.type===1){const s=ce(t,"memo");return!s||to.has(t)?void 0:(to.add(t),()=>{const o=t.codegenNode||n.currentNode.codegenNode;o&&o.type===13&&(t.tagType!==1&&Bn(o,n),t.codegenNode=ne(n.helper(Cn),[s.exp,Ge(void 0,o),"_cache",String(n.cached.length)]),n.cached.push(null))})}};function vc(t){return[[mc,Ja,yc,Va,hc,...process.env.NODE_ENV!=="production"?[Ga]:[],dc,rc,nc,fc],{on:Xs,bind:Qa,model:Vs}]}function bc(t,n={}){const s=n.onError||Tn,o=n.mode==="module";n.prefixIdentifiers===!0?s(G(47)):o&&s(G(48));const r=!1;n.cacheHandlers&&s(G(49)),n.scopeId&&!o&&s(G(50));const l=Be({},n,{prefixIdentifiers:r}),i=se(t)?Ea(t,l):t,[a,c]=vc();return _a(i,Be({},l,{nodeTransforms:[...a,...n.nodeTransforms||[]],directiveTransforms:Be({},c,n.directiveTransforms||{})})),$a(i,l)}const kc=()=>({props:[]});/**
|
|
139
|
+
**/const nt=Symbol(process.env.NODE_ENV!=="production"?"Fragment":""),st=Symbol(process.env.NODE_ENV!=="production"?"Teleport":""),dn=Symbol(process.env.NODE_ENV!=="production"?"Suspense":""),Ct=Symbol(process.env.NODE_ENV!=="production"?"KeepAlive":""),ps=Symbol(process.env.NODE_ENV!=="production"?"BaseTransition":""),Pe=Symbol(process.env.NODE_ENV!=="production"?"openBlock":""),fs=Symbol(process.env.NODE_ENV!=="production"?"createBlock":""),ms=Symbol(process.env.NODE_ENV!=="production"?"createElementBlock":""),pn=Symbol(process.env.NODE_ENV!=="production"?"createVNode":""),fn=Symbol(process.env.NODE_ENV!=="production"?"createElementVNode":""),ot=Symbol(process.env.NODE_ENV!=="production"?"createCommentVNode":""),mn=Symbol(process.env.NODE_ENV!=="production"?"createTextVNode":""),us=Symbol(process.env.NODE_ENV!=="production"?"createStaticVNode":""),un=Symbol(process.env.NODE_ENV!=="production"?"resolveComponent":""),hn=Symbol(process.env.NODE_ENV!=="production"?"resolveDynamicComponent":""),gn=Symbol(process.env.NODE_ENV!=="production"?"resolveDirective":""),yn=Symbol(process.env.NODE_ENV!=="production"?"resolveFilter":""),vn=Symbol(process.env.NODE_ENV!=="production"?"withDirectives":""),bn=Symbol(process.env.NODE_ENV!=="production"?"renderList":""),hs=Symbol(process.env.NODE_ENV!=="production"?"renderSlot":""),gs=Symbol(process.env.NODE_ENV!=="production"?"createSlots":""),St=Symbol(process.env.NODE_ENV!=="production"?"toDisplayString":""),Bt=Symbol(process.env.NODE_ENV!=="production"?"mergeProps":""),kn=Symbol(process.env.NODE_ENV!=="production"?"normalizeClass":""),En=Symbol(process.env.NODE_ENV!=="production"?"normalizeStyle":""),rt=Symbol(process.env.NODE_ENV!=="production"?"normalizeProps":""),it=Symbol(process.env.NODE_ENV!=="production"?"guardReactiveProps":""),Nn=Symbol(process.env.NODE_ENV!=="production"?"toHandlers":""),wn=Symbol(process.env.NODE_ENV!=="production"?"camelize":""),jl=Symbol(process.env.NODE_ENV!=="production"?"capitalize":""),xn=Symbol(process.env.NODE_ENV!=="production"?"toHandlerKey":""),Tt=Symbol(process.env.NODE_ENV!=="production"?"setBlockTracking":""),zl=Symbol(process.env.NODE_ENV!=="production"?"pushScopeId":""),Hl=Symbol(process.env.NODE_ENV!=="production"?"popScopeId":""),_n=Symbol(process.env.NODE_ENV!=="production"?"withCtx":""),Ul=Symbol(process.env.NODE_ENV!=="production"?"unref":""),ql=Symbol(process.env.NODE_ENV!=="production"?"isRef":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"withMemo":""),ys=Symbol(process.env.NODE_ENV!=="production"?"isMemoSame":""),We={[nt]:"Fragment",[st]:"Teleport",[dn]:"Suspense",[Ct]:"KeepAlive",[ps]:"BaseTransition",[Pe]:"openBlock",[fs]:"createBlock",[ms]:"createElementBlock",[pn]:"createVNode",[fn]:"createElementVNode",[ot]:"createCommentVNode",[mn]:"createTextVNode",[us]:"createStaticVNode",[un]:"resolveComponent",[hn]:"resolveDynamicComponent",[gn]:"resolveDirective",[yn]:"resolveFilter",[vn]:"withDirectives",[bn]:"renderList",[hs]:"renderSlot",[gs]:"createSlots",[St]:"toDisplayString",[Bt]:"mergeProps",[kn]:"normalizeClass",[En]:"normalizeStyle",[rt]:"normalizeProps",[it]:"guardReactiveProps",[Nn]:"toHandlers",[wn]:"camelize",[jl]:"capitalize",[xn]:"toHandlerKey",[Tt]:"setBlockTracking",[zl]:"pushScopeId",[Hl]:"popScopeId",[_n]:"withCtx",[Ul]:"unref",[ql]:"isRef",[Cn]:"withMemo",[ys]:"isMemoSame"};function Wl(t){Object.getOwnPropertySymbols(t).forEach(n=>{We[n]=t[n]})}const me={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Kl(t,n=""){return{type:0,source:n,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:me}}function lt(t,n,s,o,r,l,i,a=!1,c=!1,f=!1,u=me){return t&&(a?(t.helper(Pe),t.helper(Je(t.inSSR,f))):t.helper(Ge(t.inSSR,f)),i&&t.helper(vn)),{type:13,tag:n,props:s,children:o,patchFlag:r,dynamicProps:l,directives:i,isBlock:a,disableTracking:c,isComponent:f,loc:u}}function Re(t,n=me){return{type:17,loc:n,elements:t}}function ge(t,n=me){return{type:15,loc:n,properties:t}}function Q(t,n){return{type:16,loc:me,key:se(t)?R(t,!0):t,value:n}}function R(t,n=!1,s=me,o=0){return{type:4,loc:s,content:t,isStatic:n,constType:n?3:o}}function ye(t,n=me){return{type:8,loc:n,children:t}}function ne(t,n=[],s=me){return{type:14,loc:s,callee:t,arguments:n}}function Ke(t,n=void 0,s=!1,o=!1,r=me){return{type:18,params:t,returns:n,newline:s,isSlot:o,loc:r}}function Sn(t,n,s,o=!0){return{type:19,test:t,consequent:n,alternate:s,newline:o,loc:me}}function Gl(t,n,s=!1,o=!1){return{type:20,index:t,value:n,needPauseTracking:s,inVOnce:o,needArraySpread:!1,loc:me}}function Jl(t){return{type:21,body:t,loc:me}}function Ge(t,n){return t||n?pn:fn}function Je(t,n){return t||n?fs:ms}function Bn(t,{helper:n,removeHelper:s,inSSR:o}){t.isBlock||(t.isBlock=!0,s(Ge(o,t.isComponent)),n(Pe),n(Je(o,t.isComponent)))}const vs=new Uint8Array([123,123]),bs=new Uint8Array([125,125]);function ks(t){return t>=97&&t<=122||t>=65&&t<=90}function ue(t){return t===32||t===10||t===9||t===12||t===13}function $e(t){return t===47||t===62||ue(t)}function $t(t){const n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}const oe={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class Zl{constructor(n,s){this.stack=n,this.cbs=s,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=vs,this.delimiterClose=bs,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=vs,this.delimiterClose=bs}getPos(n){let s=1,o=n+1;for(let r=this.newlines.length-1;r>=0;r--){const l=this.newlines[r];if(n>l){s=r+2,o=n-l;break}}return{column:o,line:s,offset:n}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(n){n===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n))}stateInterpolationOpen(n){if(n===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const s=this.index+1-this.delimiterOpen.length;s>this.sectionStart&&this.cbs.ontext(this.sectionStart,s),this.state=3,this.sectionStart=s}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(n)):(this.state=1,this.stateText(n))}stateInterpolation(n){n===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(n))}stateInterpolationClose(n){n===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(n))}stateSpecialStartSequence(n){const s=this.sequenceIndex===this.currentSequence.length;if(!(s?$e(n):(n|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!s){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(n)}stateInRCDATA(n){if(this.sequenceIndex===this.currentSequence.length){if(n===62||ue(n)){const s=this.index-this.currentSequence.length;if(this.sectionStart<s){const o=this.index;this.index=s,this.cbs.ontext(this.sectionStart,s),this.index=o}this.sectionStart=s+2,this.stateInClosingTagName(n),this.inRCDATA=!1;return}this.sequenceIndex=0}(n|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===oe.TitleEnd||this.currentSequence===oe.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(n===60)}stateCDATASequence(n){n===oe.Cdata[this.sequenceIndex]?++this.sequenceIndex===oe.Cdata.length&&(this.state=28,this.currentSequence=oe.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(n))}fastForwardTo(n){for(;++this.index<this.buffer.length;){const s=this.buffer.charCodeAt(this.index);if(s===10&&this.newlines.push(this.index),s===n)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(n){n===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===oe.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):n!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(n,s){this.enterRCDATA(n,s),this.state=31}enterRCDATA(n,s){this.inRCDATA=!0,this.currentSequence=n,this.sequenceIndex=s}stateBeforeTagName(n){n===33?(this.state=22,this.sectionStart=this.index+1):n===63?(this.state=24,this.sectionStart=this.index+1):ks(n)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:n===116?this.state=30:this.state=n===115?29:6):n===47?this.state=8:(this.state=1,this.stateText(n))}stateInTagName(n){$e(n)&&this.handleTagName(n)}stateInSFCRootTagName(n){if($e(n)){const s=this.buffer.slice(this.sectionStart,this.index);s!=="template"&&this.enterRCDATA($t("</"+s),0),this.handleTagName(n)}}handleTagName(n){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)}stateBeforeClosingTagName(n){ue(n)||(n===62?(process.env.NODE_ENV!=="production"&&this.cbs.onerr(14,this.index),this.state=1,this.sectionStart=this.index+1):(this.state=ks(n)?9:27,this.sectionStart=this.index))}stateInClosingTagName(n){(n===62||ue(n))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(n))}stateAfterClosingTagName(n){n===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(n){n===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):n===47?(this.state=7,process.env.NODE_ENV!=="production"&&this.peek()!==62&&this.cbs.onerr(22,this.index)):n===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):ue(n)||(process.env.NODE_ENV!=="production"&&n===61&&this.cbs.onerr(19,this.index),this.handleAttrStart(n))}handleAttrStart(n){n===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):n===46||n===58||n===64||n===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(n){n===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):ue(n)||(this.state=11,this.stateBeforeAttrName(n))}stateInAttrName(n){n===61||$e(n)?(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):process.env.NODE_ENV!=="production"&&(n===34||n===39||n===60)&&this.cbs.onerr(17,this.index)}stateInDirName(n){n===61||$e(n)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):n===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(n){n===61||$e(n)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===91?this.state=15:n===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(n){n===93?this.state=14:(n===61||$e(n))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(n),process.env.NODE_ENV!=="production"&&this.cbs.onerr(27,this.index))}stateInDirModifier(n){n===61||$e(n)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(n){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(n)}stateAfterAttrName(n){n===61?this.state=18:n===47||n===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)):ue(n)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(n))}stateBeforeAttrValue(n){n===34?(this.state=19,this.sectionStart=this.index+1):n===39?(this.state=20,this.sectionStart=this.index+1):ue(n)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(n))}handleInAttrValue(n,s){(n===s||this.fastForwardTo(s))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(s===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(n){this.handleInAttrValue(n,34)}stateInAttrValueSingleQuotes(n){this.handleInAttrValue(n,39)}stateInAttrValueNoQuotes(n){ue(n)||n===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(n)):(process.env.NODE_ENV!=="production"&&n===34||n===39||n===60||n===61||n===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(n){n===91?(this.state=26,this.sequenceIndex=0):this.state=n===45?25:23}stateInDeclaration(n){(n===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(n){(n===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(n){n===45?(this.state=28,this.currentSequence=oe.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(n){(n===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(n){n===oe.ScriptEnd[3]?this.startSpecial(oe.ScriptEnd,4):n===oe.StyleEnd[3]?this.startSpecial(oe.StyleEnd,4):(this.state=6,this.stateInTagName(n))}stateBeforeSpecialT(n){n===oe.TitleEnd[3]?this.startSpecial(oe.TitleEnd,4):n===oe.TextareaEnd[3]?this.startSpecial(oe.TextareaEnd,4):(this.state=6,this.stateInTagName(n))}startEntity(){}stateInEntity(){}parse(n){for(this.buffer=n;this.index<this.buffer.length;){const s=this.buffer.charCodeAt(this.index);switch(s===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(s);break}case 2:{this.stateInterpolationOpen(s);break}case 3:{this.stateInterpolation(s);break}case 4:{this.stateInterpolationClose(s);break}case 31:{this.stateSpecialStartSequence(s);break}case 32:{this.stateInRCDATA(s);break}case 26:{this.stateCDATASequence(s);break}case 19:{this.stateInAttrValueDoubleQuotes(s);break}case 12:{this.stateInAttrName(s);break}case 13:{this.stateInDirName(s);break}case 14:{this.stateInDirArg(s);break}case 15:{this.stateInDynamicDirArg(s);break}case 16:{this.stateInDirModifier(s);break}case 28:{this.stateInCommentLike(s);break}case 27:{this.stateInSpecialComment(s);break}case 11:{this.stateBeforeAttrName(s);break}case 6:{this.stateInTagName(s);break}case 34:{this.stateInSFCRootTagName(s);break}case 9:{this.stateInClosingTagName(s);break}case 5:{this.stateBeforeTagName(s);break}case 17:{this.stateAfterAttrName(s);break}case 20:{this.stateInAttrValueSingleQuotes(s);break}case 18:{this.stateBeforeAttrValue(s);break}case 8:{this.stateBeforeClosingTagName(s);break}case 10:{this.stateAfterClosingTagName(s);break}case 29:{this.stateBeforeSpecialS(s);break}case 30:{this.stateBeforeSpecialT(s);break}case 21:{this.stateInAttrValueNoQuotes(s);break}case 7:{this.stateInSelfClosingTag(s);break}case 23:{this.stateInDeclaration(s);break}case 22:{this.stateBeforeDeclaration(s);break}case 25:{this.stateBeforeComment(s);break}case 24:{this.stateInProcessingInstruction(s);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const n=this.buffer.length;this.sectionStart>=n||(this.state===28?this.currentSequence===oe.CdataEnd?this.cbs.oncdata(this.sectionStart,n):this.cbs.oncomment(this.sectionStart,n):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,n))}emitCodePoint(n,s){}}const Yl={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:t=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${t}.sync\` should be changed to \`v-model:${t}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function Tn(t,{compatConfig:n}){const s=n&&n[t];return t==="MODE"?s||3:s}function De(t,n){const s=Tn("MODE",n),o=Tn(t,n);return s===3?o===!0:o!==!1}function Ze(t,n,s,...o){const r=De(t,n);return process.env.NODE_ENV!=="production"&&r&&Dt(t,n,s,...o),r}function Dt(t,n,s,...o){if(Tn(t,n)==="suppress-warning")return;const{message:l,link:i}=Yl[t],a=`(deprecation ${t}) ${typeof l=="function"?l(...o):l}${i?`
|
|
140
|
+
Details: ${i}`:""}`,c=new SyntaxError(a);c.code=t,s&&(c.loc=s),n.onWarn(c)}function $n(t){throw t}function Es(t){process.env.NODE_ENV!=="production"&&console.warn(`[Vue warn] ${t.message}`)}function G(t,n,s,o){const r=process.env.NODE_ENV!=="production"?(s||Xl)[t]+(o||""):`https://vuejs.org/error-reference/#compiler-${t}`,l=new SyntaxError(String(r));return l.code=t,l.loc=n,l}const Xl={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:`Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",52:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
141
|
+
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""},ce=t=>t.type===4&&t.isStatic;function Ns(t){switch(t){case"Teleport":case"teleport":return st;case"Suspense":case"suspense":return dn;case"KeepAlive":case"keep-alive":return Ct;case"BaseTransition":case"base-transition":return ps}}const Ql=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Dn=t=>!Ql.test(t),Vl=/[A-Za-z_$\xA0-\uFFFF]/,ea=/[\.\?\w$\xA0-\uFFFF]/,ta=/\s+[.[]\s*|\s*[.[]\s+/g,ws=t=>t.type===4?t.content:t.loc.source,xs=t=>{const n=ws(t).trim().replace(ta,a=>a.trim());let s=0,o=[],r=0,l=0,i=null;for(let a=0;a<n.length;a++){const c=n.charAt(a);switch(s){case 0:if(c==="[")o.push(s),s=1,r++;else if(c==="(")o.push(s),s=2,l++;else if(!(a===0?Vl:ea).test(c))return!1;break;case 1:c==="'"||c==='"'||c==="`"?(o.push(s),s=3,i=c):c==="["?r++:c==="]"&&(--r||(s=o.pop()));break;case 2:if(c==="'"||c==='"'||c==="`")o.push(s),s=3,i=c;else if(c==="(")l++;else if(c===")"){if(a===n.length-1)return!1;--l||(s=o.pop())}break;case 3:c===i&&(s=o.pop(),i=null);break}}return!r&&!l},na=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,sa=t=>na.test(ws(t));function _s(t,n){if(!t)throw new Error(n||"unexpected compiler condition")}function de(t,n,s=!1){for(let o=0;o<t.props.length;o++){const r=t.props[o];if(r.type===7&&(s||r.exp)&&(se(n)?r.name===n:n.test(r.name)))return r}}function at(t,n,s=!1,o=!1){for(let r=0;r<t.props.length;r++){const l=t.props[r];if(l.type===6){if(s)continue;if(l.name===n&&(l.value||o))return l}else if(l.name==="bind"&&(l.exp||o)&&Oe(l.arg,n))return l}}function Oe(t,n){return!!(t&&ce(t)&&t.content===n)}function oa(t){return t.props.some(n=>n.type===7&&n.name==="bind"&&(!n.arg||n.arg.type!==4||!n.arg.isStatic))}function On(t){return t.type===5||t.type===2}function Cs(t){return t.type===7&&t.name==="pre"}function ra(t){return t.type===7&&t.name==="slot"}function Ot(t){return t.type===1&&t.tagType===3}function At(t){return t.type===1&&t.tagType===2}const ia=new Set([rt,it]);function Ss(t,n=[]){if(t&&!se(t)&&t.type===14){const s=t.callee;if(!se(s)&&ia.has(s))return Ss(t.arguments[0],n.concat(t))}return[t,n]}function Lt(t,n,s){let o,r=t.type===13?t.props:t.arguments[2],l=[],i;if(r&&!se(r)&&r.type===14){const a=Ss(r);r=a[0],l=a[1],i=l[l.length-1]}if(r==null||se(r))o=ge([n]);else if(r.type===14){const a=r.arguments[0];!se(a)&&a.type===15?Bs(n,a)||a.properties.unshift(n):r.callee===Nn?o=ne(s.helper(Bt),[ge([n]),r]):r.arguments.unshift(ge([n])),!o&&(o=r)}else r.type===15?(Bs(n,r)||r.properties.unshift(n),o=r):(o=ne(s.helper(Bt),[ge([n]),r]),i&&i.callee===it&&(i=l[l.length-2]));t.type===13?i?i.arguments[0]=o:t.props=o:i?i.arguments[0]=o:t.arguments[2]=o}function Bs(t,n){let s=!1;if(t.key.type===4){const o=t.key.content;s=n.properties.some(r=>r.key.type===4&&r.key.content===o)}return s}function ct(t,n){return`_${n}_${t.replace(/[^\w]/g,(s,o)=>s==="-"?"_":t.charCodeAt(o).toString())}`}function la(t){return t.type===14&&t.callee===Cn?t.arguments[1].returns:t}const aa=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Ts={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:_t,isPreTag:_t,isIgnoreNewlineTag:_t,isCustomElement:_t,onError:$n,onWarn:Es,comments:process.env.NODE_ENV!=="production",prefixIdentifiers:!1};let W=Ts,dt=null,xe="",ie=null,U=null,pe="",_e=-1,Fe=-1,An=0,Ae=!1,Ln=null;const Y=[],J=new Zl(Y,{onerr:fe,ontext(t,n){It(re(t,n),t,n)},ontextentity(t,n,s){It(t,n,s)},oninterpolation(t,n){if(Ae)return It(re(t,n),t,n);let s=t+J.delimiterOpen.length,o=n-J.delimiterClose.length;for(;ue(xe.charCodeAt(s));)s++;for(;ue(xe.charCodeAt(o-1));)o--;let r=re(s,o);r.includes("&")&&(r=W.decodeEntities(r,!1)),In({type:5,content:Pt(r,!1,ee(s,o)),loc:ee(t,n)})},onopentagname(t,n){const s=re(t,n);ie={type:1,tag:s,ns:W.getNamespace(s,Y[0],W.ns),tagType:0,props:[],children:[],loc:ee(t-1,n),codegenNode:void 0}},onopentagend(t){Ds(t)},onclosetag(t,n){const s=re(t,n);if(!W.isVoidTag(s)){let o=!1;for(let r=0;r<Y.length;r++)if(Y[r].tag.toLowerCase()===s.toLowerCase()){o=!0,r>0&&fe(24,Y[0].loc.start.offset);for(let i=0;i<=r;i++){const a=Y.shift();Mt(a,n,i<r)}break}o||fe(23,Os(t,60))}},onselfclosingtag(t){const n=ie.tag;ie.isSelfClosing=!0,Ds(t),Y[0]&&Y[0].tag===n&&Mt(Y.shift(),t)},onattribname(t,n){U={type:6,name:re(t,n),nameLoc:ee(t,n),value:void 0,loc:ee(t)}},ondirname(t,n){const s=re(t,n),o=s==="."||s===":"?"bind":s==="@"?"on":s==="#"?"slot":s.slice(2);if(!Ae&&o===""&&fe(26,t),Ae||o==="")U={type:6,name:s,nameLoc:ee(t,n),value:void 0,loc:ee(t)};else if(U={type:7,name:o,rawName:s,exp:void 0,arg:void 0,modifiers:s==="."?[R("prop")]:[],loc:ee(t)},o==="pre"){Ae=J.inVPre=!0,Ln=ie;const r=ie.props;for(let l=0;l<r.length;l++)r[l].type===7&&(r[l]=ba(r[l]))}},ondirarg(t,n){if(t===n)return;const s=re(t,n);if(Ae&&!Cs(U))U.name+=s,je(U.nameLoc,n);else{const o=s[0]!=="[";U.arg=Pt(o?s:s.slice(1,-1),o,ee(t,n),o?3:0)}},ondirmodifier(t,n){const s=re(t,n);if(Ae&&!Cs(U))U.name+="."+s,je(U.nameLoc,n);else if(U.name==="slot"){const o=U.arg;o&&(o.content+="."+s,je(o.loc,n))}else{const o=R(s,!0,ee(t,n));U.modifiers.push(o)}},onattribdata(t,n){pe+=re(t,n),_e<0&&(_e=t),Fe=n},onattribentity(t,n,s){pe+=t,_e<0&&(_e=n),Fe=s},onattribnameend(t){const n=U.loc.start.offset,s=re(n,t);U.type===7&&(U.rawName=s),ie.props.some(o=>(o.type===7?o.rawName:o.name)===s)&&fe(2,n)},onattribend(t,n){if(ie&&U){if(je(U.loc,n),t!==0)if(pe.includes("&")&&(pe=W.decodeEntities(pe,!0)),U.type===6)U.name==="class"&&(pe=Is(pe).trim()),t===1&&!pe&&fe(13,n),U.value={type:2,content:pe,loc:t===1?ee(_e,Fe):ee(_e-1,Fe+1)},J.inSFCRoot&&ie.tag==="template"&&U.name==="lang"&&pe&&pe!=="html"&&J.enterRCDATA($t("</template"),0);else{let s=0;U.exp=Pt(pe,!1,ee(_e,Fe),0,s),U.name==="for"&&(U.forParseResult=da(U.exp));let o=-1;U.name==="bind"&&(o=U.modifiers.findIndex(r=>r.content==="sync"))>-1&&Ze("COMPILER_V_BIND_SYNC",W,U.loc,U.arg.loc.source)&&(U.name="model",U.modifiers.splice(o,1))}(U.type!==7||U.name!=="pre")&&ie.props.push(U)}pe="",_e=Fe=-1},oncomment(t,n){W.comments&&In({type:3,content:re(t,n),loc:ee(t-4,n+3)})},onend(){const t=xe.length;if(process.env.NODE_ENV!=="production"&&J.state!==1)switch(J.state){case 5:case 8:fe(5,t);break;case 3:case 4:fe(25,J.sectionStart);break;case 28:J.currentSequence===oe.CdataEnd?fe(6,t):fe(7,t);break;case 6:case 7:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:fe(9,t);break}for(let n=0;n<Y.length;n++)Mt(Y[n],t-1),fe(24,Y[n].loc.start.offset)},oncdata(t,n){Y[0].ns!==0?It(re(t,n),t,n):fe(1,t-9)},onprocessinginstruction(t){(Y[0]?Y[0].ns:W.ns)===0&&fe(21,t-1)}}),$s=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ca=/^\(|\)$/g;function da(t){const n=t.loc,s=t.content,o=s.match(aa);if(!o)return;const[,r,l]=o,i=(m,h,v=!1)=>{const x=n.start.offset+h,_=x+m.length;return Pt(m,!1,ee(x,_),0,v?1:0)},a={source:i(l.trim(),s.indexOf(l,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(ca,"").trim();const f=r.indexOf(c),u=c.match($s);if(u){c=c.replace($s,"").trim();const m=u[1].trim();let h;if(m&&(h=s.indexOf(m,f+c.length),a.key=i(m,h,!0)),u[2]){const v=u[2].trim();v&&(a.index=i(v,s.indexOf(v,a.key?h+m.length:f+c.length),!0))}}return c&&(a.value=i(c,f,!0)),a}function re(t,n){return xe.slice(t,n)}function Ds(t){J.inSFCRoot&&(ie.innerLoc=ee(t+1,t+1)),In(ie);const{tag:n,ns:s}=ie;s===0&&W.isPreTag(n)&&An++,W.isVoidTag(n)?Mt(ie,t):(Y.unshift(ie),(s===1||s===2)&&(J.inXML=!0)),ie=null}function It(t,n,s){{const l=Y[0]&&Y[0].tag;l!=="script"&&l!=="style"&&t.includes("&")&&(t=W.decodeEntities(t,!1))}const o=Y[0]||dt,r=o.children[o.children.length-1];r&&r.type===2?(r.content+=t,je(r.loc,s)):o.children.push({type:2,content:t,loc:ee(n,s)})}function Mt(t,n,s=!1){s?je(t.loc,Os(n,60)):je(t.loc,pa(n,62)+1),J.inSFCRoot&&(t.children.length?t.innerLoc.end=Be({},t.children[t.children.length-1].loc.end):t.innerLoc.end=Be({},t.innerLoc.start),t.innerLoc.source=re(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:o,ns:r,children:l}=t;if(Ae||(o==="slot"?t.tagType=2:As(t)?t.tagType=3:ma(t)&&(t.tagType=1)),J.inRCDATA||(t.children=Ls(l)),r===0&&W.isIgnoreNewlineTag(o)){const i=l[0];i&&i.type===2&&(i.content=i.content.replace(/^\r?\n/,""))}r===0&&W.isPreTag(o)&&An--,Ln===t&&(Ae=J.inVPre=!1,Ln=null),J.inXML&&(Y[0]?Y[0].ns:W.ns)===0&&(J.inXML=!1);{const i=t.props;if(process.env.NODE_ENV!=="production"&&De("COMPILER_V_IF_V_FOR_PRECEDENCE",W)){let c=!1,f=!1;for(let u=0;u<i.length;u++){const m=i[u];if(m.type===7&&(m.name==="if"?c=!0:m.name==="for"&&(f=!0)),c&&f){Dt("COMPILER_V_IF_V_FOR_PRECEDENCE",W,t.loc);break}}}if(!J.inSFCRoot&&De("COMPILER_NATIVE_TEMPLATE",W)&&t.tag==="template"&&!As(t)){process.env.NODE_ENV!=="production"&&Dt("COMPILER_NATIVE_TEMPLATE",W,t.loc);const c=Y[0]||dt,f=c.children.indexOf(t);c.children.splice(f,1,...t.children)}const a=i.find(c=>c.type===6&&c.name==="inline-template");a&&Ze("COMPILER_INLINE_TEMPLATE",W,a.loc)&&t.children.length&&(a.value={type:2,content:re(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function pa(t,n){let s=t;for(;xe.charCodeAt(s)!==n&&s<xe.length-1;)s++;return s}function Os(t,n){let s=t;for(;xe.charCodeAt(s)!==n&&s>=0;)s--;return s}const fa=new Set(["if","else","else-if","for","slot"]);function As({tag:t,props:n}){if(t==="template"){for(let s=0;s<n.length;s++)if(n[s].type===7&&fa.has(n[s].name))return!0}return!1}function ma({tag:t,props:n}){if(W.isCustomElement(t))return!1;if(t==="component"||ua(t.charCodeAt(0))||Ns(t)||W.isBuiltInComponent&&W.isBuiltInComponent(t)||W.isNativeTag&&!W.isNativeTag(t))return!0;for(let s=0;s<n.length;s++){const o=n[s];if(o.type===6){if(o.name==="is"&&o.value){if(o.value.content.startsWith("vue:"))return!0;if(Ze("COMPILER_IS_ON_ELEMENT",W,o.loc))return!0}}else if(o.name==="bind"&&Oe(o.arg,"is")&&Ze("COMPILER_IS_ON_ELEMENT",W,o.loc))return!0}return!1}function ua(t){return t>64&&t<91}const ha=/\r\n/g;function Ls(t){const n=W.whitespace!=="preserve";let s=!1;for(let o=0;o<t.length;o++){const r=t[o];if(r.type===2)if(An)r.content=r.content.replace(ha,`
|
|
142
|
+
`);else if(ga(r.content)){const l=t[o-1]&&t[o-1].type,i=t[o+1]&&t[o+1].type;!l||!i||n&&(l===3&&(i===3||i===1)||l===1&&(i===3||i===1&&ya(r.content)))?(s=!0,t[o]=null):r.content=" "}else n&&(r.content=Is(r.content))}return s?t.filter(Boolean):t}function ga(t){for(let n=0;n<t.length;n++)if(!ue(t.charCodeAt(n)))return!1;return!0}function ya(t){for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);if(s===10||s===13)return!0}return!1}function Is(t){let n="",s=!1;for(let o=0;o<t.length;o++)ue(t.charCodeAt(o))?s||(n+=" ",s=!0):(n+=t[o],s=!1);return n}function In(t){(Y[0]||dt).children.push(t)}function ee(t,n){return{start:J.getPos(t),end:n==null?n:J.getPos(n),source:n==null?n:re(t,n)}}function va(t){return ee(t.start.offset,t.end.offset)}function je(t,n){t.end=J.getPos(n),t.source=re(t.start.offset,n)}function ba(t){const n={type:6,name:t.rawName,nameLoc:ee(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const s=t.exp.loc;s.end.offset<t.loc.end.offset&&(s.start.offset--,s.start.column--,s.end.offset++,s.end.column++),n.value={type:2,content:t.exp.content,loc:s}}return n}function Pt(t,n=!1,s,o=0,r=0){return R(t,n,s,o)}function fe(t,n,s){W.onError(G(t,ee(n,n),void 0,s))}function ka(){J.reset(),ie=null,U=null,pe="",_e=-1,Fe=-1,Y.length=0}function Ea(t,n){if(ka(),xe=t,W=Be({},Ts),n){let r;for(r in n)n[r]!=null&&(W[r]=n[r])}if(process.env.NODE_ENV!=="production"&&!W.decodeEntities)throw new Error("[@vue/compiler-core] decodeEntities option is required in browser builds.");J.mode=W.parseMode==="html"?1:W.parseMode==="sfc"?2:0,J.inXML=W.ns===1||W.ns===2;const s=n&&n.delimiters;s&&(J.delimiterOpen=$t(s[0]),J.delimiterClose=$t(s[1]));const o=dt=Kl([],t);return J.parse(xe),o.loc=ee(0,t.length),o.children=Ls(o.children),dt=null,o}function Na(t,n){Rt(t,void 0,n,!!Ms(t))}function Ms(t){const n=t.children.filter(s=>s.type!==3);return n.length===1&&n[0].type===1&&!At(n[0])?n[0]:null}function Rt(t,n,s,o=!1,r=!1){const{children:l}=t,i=[];for(let m=0;m<l.length;m++){const h=l[m];if(h.type===1&&h.tagType===0){const v=o?0:he(h,s);if(v>0){if(v>=2){h.codegenNode.patchFlag=-1,i.push(h);continue}}else{const x=h.codegenNode;if(x.type===13){const _=x.patchFlag;if((_===void 0||_===512||_===1)&&Rs(h,s)>=2){const N=Fs(h);N&&(x.props=s.hoist(N))}x.dynamicProps&&(x.dynamicProps=s.hoist(x.dynamicProps))}}}else if(h.type===12&&(o?0:he(h,s))>=2){h.codegenNode.type===14&&h.codegenNode.arguments.length>0&&h.codegenNode.arguments.push(-1+(process.env.NODE_ENV!=="production"?` /* ${tt[-1]} */`:"")),i.push(h);continue}if(h.type===1){const v=h.tagType===1;v&&s.scopes.vSlot++,Rt(h,t,s,!1,r),v&&s.scopes.vSlot--}else if(h.type===11)Rt(h,t,s,h.children.length===1,!0);else if(h.type===9)for(let v=0;v<h.branches.length;v++)Rt(h.branches[v],t,s,h.branches[v].children.length===1,r)}let a=!1;const c=[];if(i.length===l.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&we(t.codegenNode.children))t.codegenNode.children=f(Re(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!we(t.codegenNode.children)&&t.codegenNode.children.type===15){const m=u(t.codegenNode,"default");m&&(c.push(s.cached.length),m.returns=f(Re(m.returns)),a=!0)}else if(t.tagType===3&&n&&n.type===1&&n.tagType===1&&n.codegenNode&&n.codegenNode.type===13&&n.codegenNode.children&&!we(n.codegenNode.children)&&n.codegenNode.children.type===15){const m=de(t,"slot",!0),h=m&&m.arg&&u(n.codegenNode,m.arg);h&&(c.push(s.cached.length),h.returns=f(Re(h.returns)),a=!0)}}if(!a)for(const m of i)c.push(s.cached.length),m.codegenNode=s.cache(m.codegenNode);c.length&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!we(t.codegenNode.children)&&t.codegenNode.children.type===15&&t.codegenNode.children.properties.push(Q("__",R(JSON.stringify(c),!1)));function f(m){const h=s.cache(m);return r&&s.hmr&&(h.needArraySpread=!0),h}function u(m,h){if(m.children&&!we(m.children)&&m.children.type===15){const v=m.children.properties.find(x=>x.key===h||x.key.content===h);return v&&v.value}}i.length&&s.transformHoist&&s.transformHoist(l,s,t)}function he(t,n){const{constantCache:s}=n;switch(t.type){case 1:if(t.tagType!==0)return 0;const o=s.get(t);if(o!==void 0)return o;const r=t.codegenNode;if(r.type!==13||r.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(r.patchFlag===void 0){let i=3;const a=Rs(t,n);if(a===0)return s.set(t,0),0;a<i&&(i=a);for(let c=0;c<t.children.length;c++){const f=he(t.children[c],n);if(f===0)return s.set(t,0),0;f<i&&(i=f)}if(i>1)for(let c=0;c<t.props.length;c++){const f=t.props[c];if(f.type===7&&f.name==="bind"&&f.exp){const u=he(f.exp,n);if(u===0)return s.set(t,0),0;u<i&&(i=u)}}if(r.isBlock){for(let c=0;c<t.props.length;c++)if(t.props[c].type===7)return s.set(t,0),0;n.removeHelper(Pe),n.removeHelper(Je(n.inSSR,r.isComponent)),r.isBlock=!1,n.helper(Ge(n.inSSR,r.isComponent))}return s.set(t,i),i}else return s.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return he(t.content,n);case 4:return t.constType;case 8:let l=3;for(let i=0;i<t.children.length;i++){const a=t.children[i];if(se(a)||ln(a))continue;const c=he(a,n);if(c===0)return 0;c<l&&(l=c)}return l;case 20:return 2;default:return process.env.NODE_ENV,0}}const wa=new Set([kn,En,rt,it]);function Ps(t,n){if(t.type===14&&!se(t.callee)&&wa.has(t.callee)){const s=t.arguments[0];if(s.type===4)return he(s,n);if(s.type===14)return Ps(s,n)}return 0}function Rs(t,n){let s=3;const o=Fs(t);if(o&&o.type===15){const{properties:r}=o;for(let l=0;l<r.length;l++){const{key:i,value:a}=r[l],c=he(i,n);if(c===0)return c;c<s&&(s=c);let f;if(a.type===4?f=he(a,n):a.type===14?f=Ps(a,n):f=0,f===0)return f;f<s&&(s=f)}}return s}function Fs(t){const n=t.codegenNode;if(n.type===13)return n.props}function xa(t,{filename:n="",prefixIdentifiers:s=!1,hoistStatic:o=!1,hmr:r=!1,cacheHandlers:l=!1,nodeTransforms:i=[],directiveTransforms:a={},transformHoist:c=null,isBuiltInComponent:f=on,isCustomElement:u=on,expressionPlugins:m=[],scopeId:h=null,slotted:v=!0,ssr:x=!1,inSSR:_=!1,ssrCssVars:N="",bindingMetadata:C=Nl,inline:A=!1,isTS:B=!1,onError:$=$n,onWarn:S=Es,compatConfig:q}){const V=n.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),I={filename:n,selfName:V&&cn(Te(V[1])),prefixIdentifiers:s,hoistStatic:o,hmr:r,cacheHandlers:l,nodeTransforms:i,directiveTransforms:a,transformHoist:c,isBuiltInComponent:f,isCustomElement:u,expressionPlugins:m,scopeId:h,slotted:v,ssr:x,inSSR:_,ssrCssVars:N,bindingMetadata:C,inline:A,isTS:B,onError:$,onWarn:S,compatConfig:q,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:t,childIndex:0,inVOnce:!1,helper(L){const z=I.helpers.get(L)||0;return I.helpers.set(L,z+1),L},removeHelper(L){const z=I.helpers.get(L);if(z){const F=z-1;F?I.helpers.set(L,F):I.helpers.delete(L)}},helperString(L){return`_${We[I.helper(L)]}`},replaceNode(L){if(process.env.NODE_ENV!=="production"){if(!I.currentNode)throw new Error("Node being replaced is already removed.");if(!I.parent)throw new Error("Cannot replace root node.")}I.parent.children[I.childIndex]=I.currentNode=L},removeNode(L){if(process.env.NODE_ENV!=="production"&&!I.parent)throw new Error("Cannot remove root node.");const z=I.parent.children,F=L?z.indexOf(L):I.currentNode?I.childIndex:-1;if(process.env.NODE_ENV!=="production"&&F<0)throw new Error("node being removed is not a child of current parent");!L||L===I.currentNode?(I.currentNode=null,I.onNodeRemoved()):I.childIndex>F&&(I.childIndex--,I.onNodeRemoved()),I.parent.children.splice(F,1)},onNodeRemoved:on,addIdentifiers(L){},removeIdentifiers(L){},hoist(L){se(L)&&(L=R(L)),I.hoists.push(L);const z=R(`_hoisted_${I.hoists.length}`,!1,L.loc,2);return z.hoisted=L,z},cache(L,z=!1,F=!1){const y=Gl(I.cached.length,L,z,F);return I.cached.push(y),y}};return I.filters=new Set,I}function _a(t,n){const s=xa(t,n);Ft(t,s),n.hoistStatic&&Na(t,s),n.ssr||Ca(t,s),t.helpers=new Set([...s.helpers.keys()]),t.components=[...s.components],t.directives=[...s.directives],t.imports=s.imports,t.hoists=s.hoists,t.temps=s.temps,t.cached=s.cached,t.transformed=!0,t.filters=[...s.filters]}function Ca(t,n){const{helper:s}=n,{children:o}=t;if(o.length===1){const r=Ms(t);if(r&&r.codegenNode){const l=r.codegenNode;l.type===13&&Bn(l,n),t.codegenNode=l}else t.codegenNode=o[0]}else if(o.length>1){let r=64;process.env.NODE_ENV!=="production"&&o.filter(l=>l.type!==3).length===1&&(r|=2048),t.codegenNode=lt(n,s(nt),void 0,t.children,r,void 0,void 0,!0,void 0,!1)}}function Sa(t,n){let s=0;const o=()=>{s--};for(;s<t.children.length;s++){const r=t.children[s];se(r)||(n.grandParent=n.parent,n.parent=t,n.childIndex=s,n.onNodeRemoved=o,Ft(r,n))}}function Ft(t,n){n.currentNode=t;const{nodeTransforms:s}=n,o=[];for(let l=0;l<s.length;l++){const i=s[l](t,n);if(i&&(we(i)?o.push(...i):o.push(i)),n.currentNode)t=n.currentNode;else return}switch(t.type){case 3:n.ssr||n.helper(ot);break;case 5:n.ssr||n.helper(St);break;case 9:for(let l=0;l<t.branches.length;l++)Ft(t.branches[l],n);break;case 10:case 11:case 1:case 0:Sa(t,n);break}n.currentNode=t;let r=o.length;for(;r--;)o[r]()}function js(t,n){const s=se(t)?o=>o===t:o=>t.test(o);return(o,r)=>{if(o.type===1){const{props:l}=o;if(o.tagType===3&&l.some(ra))return;const i=[];for(let a=0;a<l.length;a++){const c=l[a];if(c.type===7&&s(c.name)){l.splice(a,1),a--;const f=n(o,c,r);f&&i.push(f)}}return i}}}const jt="/*@__PURE__*/",zs=t=>`${We[t]}: _${We[t]}`;function Ba(t,{mode:n="function",prefixIdentifiers:s=n==="module",sourceMap:o=!1,filename:r="template.vue.html",scopeId:l=null,optimizeImports:i=!1,runtimeGlobalName:a="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:f="vue/server-renderer",ssr:u=!1,isTS:m=!1,inSSR:h=!1}){const v={mode:n,prefixIdentifiers:s,sourceMap:o,filename:r,scopeId:l,optimizeImports:i,runtimeGlobalName:a,runtimeModuleName:c,ssrRuntimeModuleName:f,ssr:u,isTS:m,inSSR:h,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(_){return`_${We[_]}`},push(_,N=-2,C){v.code+=_},indent(){x(++v.indentLevel)},deindent(_=!1){_?--v.indentLevel:x(--v.indentLevel)},newline(){x(v.indentLevel)}};function x(_){v.push(`
|
|
143
|
+
`+" ".repeat(_),0)}return v}function Ta(t,n={}){const s=Ba(t,n);n.onContextCreated&&n.onContextCreated(s);const{mode:o,push:r,prefixIdentifiers:l,indent:i,deindent:a,newline:c,scopeId:f,ssr:u}=s,m=Array.from(t.helpers),h=m.length>0,v=!l&&o!=="module";$a(t,s);const _=u?"ssrRender":"render",C=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(r(`function ${_}(${C}) {`),i(),v&&(r("with (_ctx) {"),i(),h&&(r(`const { ${m.map(zs).join(", ")} } = _Vue
|
|
144
|
+
`,-1),c())),t.components.length&&(Mn(t.components,"component",s),(t.directives.length||t.temps>0)&&c()),t.directives.length&&(Mn(t.directives,"directive",s),t.temps>0&&c()),t.filters&&t.filters.length&&(c(),Mn(t.filters,"filter",s),c()),t.temps>0){r("let ");for(let A=0;A<t.temps;A++)r(`${A>0?", ":""}_temp${A}`)}return(t.components.length||t.directives.length||t.temps)&&(r(`
|
|
145
|
+
`,0),c()),u||r("return "),t.codegenNode?le(t.codegenNode,s):r("null"),v&&(a(),r("}")),a(),r("}"),{ast:t,code:s.code,preamble:"",map:s.map?s.map.toJSON():void 0}}function $a(t,n){const{ssr:s,prefixIdentifiers:o,push:r,newline:l,runtimeModuleName:i,runtimeGlobalName:a,ssrRuntimeModuleName:c}=n,f=a,u=Array.from(t.helpers);if(u.length>0&&(r(`const _Vue = ${f}
|
|
146
|
+
`,-1),t.hoists.length)){const m=[pn,fn,ot,mn,us].filter(h=>u.includes(h)).map(zs).join(", ");r(`const { ${m} } = _Vue
|
|
147
|
+
`,-1)}Da(t.hoists,n),l(),r("return ")}function Mn(t,n,{helper:s,push:o,newline:r,isTS:l}){const i=s(n==="filter"?yn:n==="component"?un:gn);for(let a=0;a<t.length;a++){let c=t[a];const f=c.endsWith("__self");f&&(c=c.slice(0,-6)),o(`const ${ct(c,n)} = ${i}(${JSON.stringify(c)}${f?", true":""})${l?"!":""}`),a<t.length-1&&r()}}function Da(t,n){if(!t.length)return;n.pure=!0;const{push:s,newline:o}=n;o();for(let r=0;r<t.length;r++){const l=t[r];l&&(s(`const _hoisted_${r+1} = `),le(l,n),o())}n.pure=!1}function Oa(t){return se(t)||t.type===4||t.type===2||t.type===5||t.type===8}function Pn(t,n){const s=t.length>3||process.env.NODE_ENV!=="production"&&t.some(o=>we(o)||!Oa(o));n.push("["),s&&n.indent(),pt(t,n,s),s&&n.deindent(),n.push("]")}function pt(t,n,s=!1,o=!0){const{push:r,newline:l}=n;for(let i=0;i<t.length;i++){const a=t[i];se(a)?r(a,-3):we(a)?Pn(a,n):le(a,n),i<t.length-1&&(s?(o&&r(","),l()):o&&r(", "))}}function le(t,n){if(se(t)){n.push(t,-3);return}if(ln(t)){n.push(n.helper(t));return}switch(t.type){case 1:case 9:case 11:process.env.NODE_ENV!=="production"&&_s(t.codegenNode!=null,"Codegen node is missing for element/if/for node. Apply appropriate transforms first."),le(t.codegenNode,n);break;case 2:Aa(t,n);break;case 4:Hs(t,n);break;case 5:La(t,n);break;case 12:le(t.codegenNode,n);break;case 8:Us(t,n);break;case 3:Ma(t,n);break;case 13:Pa(t,n);break;case 14:Fa(t,n);break;case 15:ja(t,n);break;case 17:za(t,n);break;case 18:Ha(t,n);break;case 19:Ua(t,n);break;case 20:qa(t,n);break;case 21:pt(t.body,n,!0,!1);break;case 22:break;case 23:break;case 24:break;case 25:break;case 26:break;case 10:break;default:if(process.env.NODE_ENV!=="production")return _s(!1,`unhandled codegen node type: ${t.type}`),t}}function Aa(t,n){n.push(JSON.stringify(t.content),-3,t)}function Hs(t,n){const{content:s,isStatic:o}=t;n.push(o?JSON.stringify(s):s,-3,t)}function La(t,n){const{push:s,helper:o,pure:r}=n;r&&s(jt),s(`${o(St)}(`),le(t.content,n),s(")")}function Us(t,n){for(let s=0;s<t.children.length;s++){const o=t.children[s];se(o)?n.push(o,-3):le(o,n)}}function Ia(t,n){const{push:s}=n;if(t.type===8)s("["),Us(t,n),s("]");else if(t.isStatic){const o=Dn(t.content)?t.content:JSON.stringify(t.content);s(o,-2,t)}else s(`[${t.content}]`,-3,t)}function Ma(t,n){const{push:s,helper:o,pure:r}=n;r&&s(jt),s(`${o(ot)}(${JSON.stringify(t.content)})`,-3,t)}function Pa(t,n){const{push:s,helper:o,pure:r}=n,{tag:l,props:i,children:a,patchFlag:c,dynamicProps:f,directives:u,isBlock:m,disableTracking:h,isComponent:v}=t;let x;if(c)if(process.env.NODE_ENV!=="production")if(c<0)x=c+` /* ${tt[c]} */`;else{const N=Object.keys(tt).map(Number).filter(C=>C>0&&c&C).map(C=>tt[C]).join(", ");x=c+` /* ${N} */`}else x=String(c);u&&s(o(vn)+"("),m&&s(`(${o(Pe)}(${h?"true":""}), `),r&&s(jt);const _=m?Je(n.inSSR,v):Ge(n.inSSR,v);s(o(_)+"(",-2,t),pt(Ra([l,i,a,x,f]),n),s(")"),m&&s(")"),u&&(s(", "),le(u,n),s(")"))}function Ra(t){let n=t.length;for(;n--&&t[n]==null;);return t.slice(0,n+1).map(s=>s||"null")}function Fa(t,n){const{push:s,helper:o,pure:r}=n,l=se(t.callee)?t.callee:o(t.callee);r&&s(jt),s(l+"(",-2,t),pt(t.arguments,n),s(")")}function ja(t,n){const{push:s,indent:o,deindent:r,newline:l}=n,{properties:i}=t;if(!i.length){s("{}",-2,t);return}const a=i.length>1||process.env.NODE_ENV!=="production"&&i.some(c=>c.value.type!==4);s(a?"{":"{ "),a&&o();for(let c=0;c<i.length;c++){const{key:f,value:u}=i[c];Ia(f,n),s(": "),le(u,n),c<i.length-1&&(s(","),l())}a&&r(),s(a?"}":" }")}function za(t,n){Pn(t.elements,n)}function Ha(t,n){const{push:s,indent:o,deindent:r}=n,{params:l,returns:i,body:a,newline:c,isSlot:f}=t;f&&s(`_${We[_n]}(`),s("(",-2,t),we(l)?pt(l,n):l&&le(l,n),s(") => "),(c||a)&&(s("{"),o()),i?(c&&s("return "),we(i)?Pn(i,n):le(i,n)):a&&le(a,n),(c||a)&&(r(),s("}")),f&&(t.isNonScopedSlot&&s(", undefined, true"),s(")"))}function Ua(t,n){const{test:s,consequent:o,alternate:r,newline:l}=t,{push:i,indent:a,deindent:c,newline:f}=n;if(s.type===4){const m=!Dn(s.content);m&&i("("),Hs(s,n),m&&i(")")}else i("("),le(s,n),i(")");l&&a(),n.indentLevel++,l||i(" "),i("? "),le(o,n),n.indentLevel--,l&&f(),l||i(" "),i(": ");const u=r.type===19;u||n.indentLevel++,le(r,n),u||n.indentLevel--,l&&c(!0)}function qa(t,n){const{push:s,helper:o,indent:r,deindent:l,newline:i}=n,{needPauseTracking:a,needArraySpread:c}=t;c&&s("[...("),s(`_cache[${t.index}] || (`),a&&(r(),s(`${o(Tt)}(-1`),t.inVOnce&&s(", true"),s("),"),i(),s("(")),s(`_cache[${t.index}] = `),le(t.value,n),a&&(s(`).cacheIndex = ${t.index},`),i(),s(`${o(Tt)}(1),`),i(),s(`_cache[${t.index}]`),l()),s(")"),c&&s(")]")}const Wa=new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b"),Ka=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function ze(t,n,s=!1,o=!1){const r=t.content;if(r.trim())try{new Function(o?` ${r} `:`return ${s?`(${r}) => {}`:`(${r})`}`)}catch(l){let i=l.message;const a=r.replace(Ka,"").match(Wa);a&&(i=`avoid using JavaScript keyword as property name: "${a[0]}"`),n.onError(G(45,t.loc,void 0,i))}}const Ga=(t,n)=>{if(t.type===5)t.content=Rn(t.content,n);else if(t.type===1){const s=de(t,"memo");for(let o=0;o<t.props.length;o++){const r=t.props[o];if(r.type===7&&r.name!=="for"){const l=r.exp,i=r.arg;l&&l.type===4&&!(r.name==="on"&&i)&&!(s&&i&&i.type===4&&i.content==="key")&&(r.exp=Rn(l,n,r.name==="slot")),i&&i.type===4&&!i.isStatic&&(r.arg=Rn(i,n))}}}};function Rn(t,n,s=!1,o=!1,r=Object.create(n.identifiers)){return process.env.NODE_ENV!=="production"&&ze(t,n,s,o),t}const Ja=js(/^(if|else|else-if)$/,(t,n,s)=>Za(t,n,s,(o,r,l)=>{const i=s.parent.children;let a=i.indexOf(o),c=0;for(;a-->=0;){const f=i[a];f&&f.type===9&&(c+=f.branches.length)}return()=>{if(l)o.codegenNode=Ws(r,c,s);else{const f=Xa(o.codegenNode);f.alternate=Ws(r,c+o.branches.length-1,s)}}}));function Za(t,n,s,o){if(n.name!=="else"&&(!n.exp||!n.exp.content.trim())){const r=n.exp?n.exp.loc:t.loc;s.onError(G(28,n.loc)),n.exp=R("true",!1,r)}if(process.env.NODE_ENV!=="production"&&n.exp&&ze(n.exp,s),n.name==="if"){const r=qs(t,n),l={type:9,loc:va(t.loc),branches:[r]};if(s.replaceNode(l),o)return o(l,r,!0)}else{const r=s.parent.children,l=[];let i=r.indexOf(t);for(;i-->=-1;){const a=r[i];if(a&&a.type===3){s.removeNode(a),process.env.NODE_ENV!=="production"&&l.unshift(a);continue}if(a&&a.type===2&&!a.content.trim().length){s.removeNode(a);continue}if(a&&a.type===9){n.name==="else-if"&&a.branches[a.branches.length-1].condition===void 0&&s.onError(G(30,t.loc)),s.removeNode();const c=qs(t,n);if(process.env.NODE_ENV!=="production"&&l.length&&!(s.parent&&s.parent.type===1&&(s.parent.tag==="transition"||s.parent.tag==="Transition"))&&(c.children=[...l,...c.children]),process.env.NODE_ENV!=="production"){const u=c.userKey;u&&a.branches.forEach(({userKey:m})=>{Ya(m,u)&&s.onError(G(29,c.userKey.loc))})}a.branches.push(c);const f=o&&o(a,c,!1);Ft(c,s),f&&f(),s.currentNode=null}else s.onError(G(30,t.loc));break}}}function qs(t,n){const s=t.tagType===3;return{type:10,loc:t.loc,condition:n.name==="else"?void 0:n.exp,children:s&&!de(t,"for")?t.children:[t],userKey:at(t,"key"),isTemplateIf:s}}function Ws(t,n,s){return t.condition?Sn(t.condition,Ks(t,n,s),ne(s.helper(ot),[process.env.NODE_ENV!=="production"?'"v-if"':'""',"true"])):Ks(t,n,s)}function Ks(t,n,s){const{helper:o}=s,r=Q("key",R(`${n}`,!1,me,2)),{children:l}=t,i=l[0];if(l.length!==1||i.type!==1)if(l.length===1&&i.type===11){const c=i.codegenNode;return Lt(c,r,s),c}else{let c=64;return process.env.NODE_ENV!=="production"&&!t.isTemplateIf&&l.filter(f=>f.type!==3).length===1&&(c|=2048),lt(s,o(nt),ge([r]),l,c,void 0,void 0,!0,!1,!1,t.loc)}else{const c=i.codegenNode,f=la(c);return f.type===13&&Bn(f,s),Lt(f,r,s),c}}function Ya(t,n){if(!t||t.type!==n.type)return!1;if(t.type===6){if(t.value.content!==n.value.content)return!1}else{const s=t.exp,o=n.exp;if(s.type!==o.type||s.type!==4||s.isStatic!==o.isStatic||s.content!==o.content)return!1}return!0}function Xa(t){for(;;)if(t.type===19)if(t.alternate.type===19)t=t.alternate;else return t;else t.type===20&&(t=t.value)}const Qa=(t,n,s)=>{const{modifiers:o,loc:r}=t,l=t.arg;let{exp:i}=t;if(i&&i.type===4&&!i.content.trim()&&(i=void 0),!i){if(l.type!==4||!l.isStatic)return s.onError(G(52,l.loc)),{props:[Q(l,R("",!0,r))]};Gs(t),i=t.exp}return l.type!==4?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=l.content?`${l.content} || ""`:'""'),o.some(a=>a.content==="camel")&&(l.type===4?l.isStatic?l.content=Te(l.content):l.content=`${s.helperString(wn)}(${l.content})`:(l.children.unshift(`${s.helperString(wn)}(`),l.children.push(")"))),s.inSSR||(o.some(a=>a.content==="prop")&&Js(l,"."),o.some(a=>a.content==="attr")&&Js(l,"^")),{props:[Q(l,i)]}},Gs=(t,n)=>{const s=t.arg,o=Te(s.content);t.exp=R(o,!1,s.loc)},Js=(t,n)=>{t.type===4?t.isStatic?t.content=n+t.content:t.content=`\`${n}\${${t.content}}\``:(t.children.unshift(`'${n}' + (`),t.children.push(")"))},Va=js("for",(t,n,s)=>{const{helper:o,removeHelper:r}=s;return ec(t,n,s,l=>{const i=ne(o(bn),[l.source]),a=Ot(t),c=de(t,"memo"),f=at(t,"key",!1,!0);f&&f.type===7&&!f.exp&&Gs(f);let m=f&&(f.type===6?f.value?R(f.value.content,!0):void 0:f.exp);const h=f&&m?Q("key",m):null,v=l.source.type===4&&l.source.constType>0,x=v?64:f?128:256;return l.codegenNode=lt(s,o(nt),void 0,i,x,void 0,void 0,!0,!v,!1,t.loc),()=>{let _;const{children:N}=l;process.env.NODE_ENV!=="production"&&a&&t.children.some(B=>{if(B.type===1){const $=at(B,"key");if($)return s.onError(G(33,$.loc)),!0}});const C=N.length!==1||N[0].type!==1,A=At(t)?t:a&&t.children.length===1&&At(t.children[0])?t.children[0]:null;if(A?(_=A.codegenNode,a&&h&&Lt(_,h,s)):C?_=lt(s,o(nt),h?ge([h]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(_=N[0].codegenNode,a&&h&&Lt(_,h,s),_.isBlock!==!v&&(_.isBlock?(r(Pe),r(Je(s.inSSR,_.isComponent))):r(Ge(s.inSSR,_.isComponent))),_.isBlock=!v,_.isBlock?(o(Pe),o(Je(s.inSSR,_.isComponent))):o(Ge(s.inSSR,_.isComponent))),c){const B=Ke(Fn(l.parseResult,[R("_cached")]));B.body=Jl([ye(["const _memo = (",c.exp,")"]),ye(["if (_cached",...m?[" && _cached.key === ",m]:[],` && ${s.helperString(ys)}(_cached, _memo)) return _cached`]),ye(["const _item = ",_]),R("_item.memo = _memo"),R("return _item")]),i.arguments.push(B,R("_cache"),R(String(s.cached.length))),s.cached.push(null)}else i.arguments.push(Ke(Fn(l.parseResult),_,!0))}})});function ec(t,n,s,o){if(!n.exp){s.onError(G(31,n.loc));return}const r=n.forParseResult;if(!r){s.onError(G(32,n.loc));return}Zs(r,s);const{addIdentifiers:l,removeIdentifiers:i,scopes:a}=s,{source:c,value:f,key:u,index:m}=r,h={type:11,loc:n.loc,source:c,valueAlias:f,keyAlias:u,objectIndexAlias:m,parseResult:r,children:Ot(t)?t.children:[t]};s.replaceNode(h),a.vFor++;const v=o&&o(h);return()=>{a.vFor--,v&&v()}}function Zs(t,n){t.finalized||(process.env.NODE_ENV!=="production"&&(ze(t.source,n),t.key&&ze(t.key,n,!0),t.index&&ze(t.index,n,!0),t.value&&ze(t.value,n,!0)),t.finalized=!0)}function Fn({value:t,key:n,index:s},o=[]){return tc([t,n,s,...o])}function tc(t){let n=t.length;for(;n--&&!t[n];);return t.slice(0,n+1).map((s,o)=>s||R("_".repeat(o+1),!1))}const Ys=R("undefined",!1),nc=(t,n)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const s=de(t,"slot");if(s)return s.exp,n.scopes.vSlot++,()=>{n.scopes.vSlot--}}},sc=(t,n,s,o)=>Ke(t,s,!1,!0,s.length?s[0].loc:o);function oc(t,n,s=sc){n.helper(_n);const{children:o,loc:r}=t,l=[],i=[];let a=n.scopes.vSlot>0||n.scopes.vFor>0;const c=de(t,"slot",!0);if(c){const{arg:N,exp:C}=c;N&&!ce(N)&&(a=!0),l.push(Q(N||R("default",!0),s(C,void 0,o,r)))}let f=!1,u=!1;const m=[],h=new Set;let v=0;for(let N=0;N<o.length;N++){const C=o[N];let A;if(!Ot(C)||!(A=de(C,"slot",!0))){C.type!==3&&m.push(C);continue}if(c){n.onError(G(37,A.loc));break}f=!0;const{children:B,loc:$}=C,{arg:S=R("default",!0),exp:q,loc:V}=A;let I;ce(S)?I=S?S.content:"default":a=!0;const L=de(C,"for"),z=s(q,L,B,$);let F,y;if(F=de(C,"if"))a=!0,i.push(Sn(F.exp,zt(S,z,v++),Ys));else if(y=de(C,/^else(-if)?$/,!0)){let T=N,b;for(;T--&&(b=o[T],!(b.type!==3&&jn(b))););if(b&&Ot(b)&&de(b,/^(else-)?if$/)){let D=i[i.length-1];for(;D.alternate.type===19;)D=D.alternate;D.alternate=y.exp?Sn(y.exp,zt(S,z,v++),Ys):zt(S,z,v++)}else n.onError(G(30,y.loc))}else if(L){a=!0;const T=L.forParseResult;T?(Zs(T,n),i.push(ne(n.helper(bn),[T.source,Ke(Fn(T),zt(S,z),!0)]))):n.onError(G(32,L.loc))}else{if(I){if(h.has(I)){n.onError(G(38,V));continue}h.add(I),I==="default"&&(u=!0)}l.push(Q(S,z))}}if(!c){const N=(C,A)=>{const B=s(C,void 0,A,r);return n.compatConfig&&(B.isNonScopedSlot=!0),Q("default",B)};f?m.length&&m.some(C=>jn(C))&&(u?n.onError(G(39,m[0].loc)):l.push(N(void 0,m))):l.push(N(void 0,o))}const x=a?2:Ht(t.children)?3:1;let _=ge(l.concat(Q("_",R(x+(process.env.NODE_ENV!=="production"?` /* ${Sl[x]} */`:""),!1))),r);return i.length&&(_=ne(n.helper(gs),[_,Re(i)])),{slots:_,hasDynamicSlots:a}}function zt(t,n,s){const o=[Q("name",t),Q("fn",n)];return s!=null&&o.push(Q("key",R(String(s),!0))),ge(o)}function Ht(t){for(let n=0;n<t.length;n++){const s=t[n];switch(s.type){case 1:if(s.tagType===2||Ht(s.children))return!0;break;case 9:if(Ht(s.branches))return!0;break;case 10:case 11:if(Ht(s.children))return!0;break}}return!1}function jn(t){return t.type!==2&&t.type!==12?!0:t.type===2?!!t.content.trim():jn(t.content)}const Xs=new WeakMap,rc=(t,n)=>function(){if(t=n.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:o,props:r}=t,l=t.tagType===1;let i=l?ic(t,n):`"${o}"`;const a=wl(i)&&i.callee===hn;let c,f,u=0,m,h,v,x=a||i===st||i===dn||!l&&(o==="svg"||o==="foreignObject"||o==="math");if(r.length>0){const _=Qs(t,n,void 0,l,a);c=_.props,u=_.patchFlag,h=_.dynamicPropNames;const N=_.directives;v=N&&N.length?Re(N.map(C=>ac(C,n))):void 0,_.shouldUseBlock&&(x=!0)}if(t.children.length>0)if(i===Ct&&(x=!0,u|=1024,process.env.NODE_ENV!=="production"&&t.children.length>1&&n.onError(G(46,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}))),l&&i!==st&&i!==Ct){const{slots:N,hasDynamicSlots:C}=oc(t,n);f=N,C&&(u|=1024)}else if(t.children.length===1&&i!==st){const N=t.children[0],C=N.type,A=C===5||C===8;A&&he(N,n)===0&&(u|=1),A||C===2?f=N:f=t.children}else f=t.children;h&&h.length&&(m=cc(h)),t.codegenNode=lt(n,i,c,f,u===0?void 0:u,m,v,!!x,!1,l,t.loc)};function ic(t,n,s=!1){let{tag:o}=t;const r=zn(o),l=at(t,"is",!1,!0);if(l)if(r||De("COMPILER_IS_ON_ELEMENT",n)){let a;if(l.type===6?a=l.value&&R(l.value.content,!0):(a=l.exp,a||(a=R("is",!1,l.arg.loc))),a)return ne(n.helper(hn),[a])}else l.type===6&&l.value.content.startsWith("vue:")&&(o=l.value.content.slice(4));const i=Ns(o)||n.isBuiltInComponent(o);return i?(s||n.helper(i),i):(n.helper(un),n.components.add(o),ct(o,"component"))}function Qs(t,n,s=t.props,o,r,l=!1){const{tag:i,loc:a,children:c}=t;let f=[];const u=[],m=[],h=c.length>0;let v=!1,x=0,_=!1,N=!1,C=!1,A=!1,B=!1,$=!1;const S=[],q=z=>{f.length&&(u.push(ge(Vs(f),a)),f=[]),z&&u.push(z)},V=()=>{n.scopes.vFor>0&&f.push(Q(R("ref_for",!0),R("true")))},I=({key:z,value:F})=>{if(ce(z)){const y=z.content,T=rn(y);if(T&&(!o||r)&&y.toLowerCase()!=="onclick"&&y!=="onUpdate:modelValue"&&!ds(y)&&(A=!0),T&&ds(y)&&($=!0),T&&F.type===14&&(F=F.arguments[0]),F.type===20||(F.type===4||F.type===8)&&he(F,n)>0)return;y==="ref"?_=!0:y==="class"?N=!0:y==="style"?C=!0:y!=="key"&&!S.includes(y)&&S.push(y),o&&(y==="class"||y==="style")&&!S.includes(y)&&S.push(y)}else B=!0};for(let z=0;z<s.length;z++){const F=s[z];if(F.type===6){const{loc:y,name:T,nameLoc:b,value:D}=F;let Z=!0;if(T==="ref"&&(_=!0,V()),T==="is"&&(zn(i)||D&&D.content.startsWith("vue:")||De("COMPILER_IS_ON_ELEMENT",n)))continue;f.push(Q(R(T,!0,b),R(D?D.content:"",Z,D?D.loc:y)))}else{const{name:y,arg:T,exp:b,loc:D,modifiers:Z}=F,ae=y==="bind",Le=y==="on";if(y==="slot"){o||n.onError(G(40,D));continue}if(y==="once"||y==="memo"||y==="is"||ae&&Oe(T,"is")&&(zn(i)||De("COMPILER_IS_ON_ELEMENT",n))||Le&&l)continue;if((ae&&Oe(T,"key")||Le&&h&&Oe(T,"vue:before-update"))&&(v=!0),ae&&Oe(T,"ref")&&V(),!T&&(ae||Le)){if(B=!0,b)if(ae){if(q(),process.env.NODE_ENV!=="production"&&u.some(ke=>ke.type===15?ke.properties.some(({key:Se})=>Se.type!==4||!Se.isStatic?!0:Se.content!=="class"&&Se.content!=="style"&&!rn(Se.content)):!0)&&Ze("COMPILER_V_BIND_OBJECT_ORDER",n,D),De("COMPILER_V_BIND_OBJECT_ORDER",n)){u.unshift(b);continue}V(),q(),u.push(b)}else q({type:14,loc:D,callee:n.helper(Nn),arguments:o?[b]:[b,"true"]});else n.onError(G(ae?34:35,D));continue}ae&&Z.some(be=>be.content==="prop")&&(x|=32);const Ce=n.directiveTransforms[y];if(Ce){const{props:be,needRuntime:ke}=Ce(F,t,n);!l&&be.forEach(I),Le&&T&&!ce(T)?q(ge(be,a)):f.push(...be),ke&&(m.push(F),ln(ke)&&Xs.set(F,ke))}else xl(y)||(m.push(F),h&&(v=!0))}}let L;if(u.length?(q(),u.length>1?L=ne(n.helper(Bt),u,a):L=u[0]):f.length&&(L=ge(Vs(f),a)),B?x|=16:(N&&!o&&(x|=2),C&&!o&&(x|=4),S.length&&(x|=8),A&&(x|=32)),!v&&(x===0||x===32)&&(_||$||m.length>0)&&(x|=512),!n.inSSR&&L)switch(L.type){case 15:let z=-1,F=-1,y=!1;for(let D=0;D<L.properties.length;D++){const Z=L.properties[D].key;ce(Z)?Z.content==="class"?z=D:Z.content==="style"&&(F=D):Z.isHandlerKey||(y=!0)}const T=L.properties[z],b=L.properties[F];y?L=ne(n.helper(rt),[L]):(T&&!ce(T.value)&&(T.value=ne(n.helper(kn),[T.value])),b&&(C||b.value.type===4&&b.value.content.trim()[0]==="["||b.value.type===17)&&(b.value=ne(n.helper(En),[b.value])));break;case 14:break;default:L=ne(n.helper(rt),[ne(n.helper(it),[L])]);break}return{props:L,directives:m,patchFlag:x,dynamicPropNames:S,shouldUseBlock:v}}function Vs(t){const n=new Map,s=[];for(let o=0;o<t.length;o++){const r=t[o];if(r.key.type===8||!r.key.isStatic){s.push(r);continue}const l=r.key.content,i=n.get(l);i?(l==="style"||l==="class"||rn(l))&&lc(i,r):(n.set(l,r),s.push(r))}return s}function lc(t,n){t.value.type===17?t.value.elements.push(n.value):t.value=Re([t.value,n.value],t.loc)}function ac(t,n){const s=[],o=Xs.get(t);o?s.push(n.helperString(o)):(n.helper(gn),n.directives.add(t.name),s.push(ct(t.name,"directive")));const{loc:r}=t;if(t.exp&&s.push(t.exp),t.arg&&(t.exp||s.push("void 0"),s.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||s.push("void 0"),s.push("void 0"));const l=R("true",!1,r);s.push(ge(t.modifiers.map(i=>Q(i,l)),r))}return Re(s,t.loc)}function cc(t){let n="[";for(let s=0,o=t.length;s<o;s++)n+=JSON.stringify(t[s]),s<o-1&&(n+=", ");return n+"]"}function zn(t){return t==="component"||t==="Component"}const dc=(t,n)=>{if(At(t)){const{children:s,loc:o}=t,{slotName:r,slotProps:l}=pc(t,n),i=[n.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let a=2;l&&(i[2]=l,a=3),s.length&&(i[3]=Ke([],s,!1,!1,o),a=4),n.scopeId&&!n.slotted&&(a=5),i.splice(a),t.codegenNode=ne(n.helper(hs),i,o)}};function pc(t,n){let s='"default"',o;const r=[];for(let l=0;l<t.props.length;l++){const i=t.props[l];if(i.type===6)i.value&&(i.name==="name"?s=JSON.stringify(i.value.content):(i.name=Te(i.name),r.push(i)));else if(i.name==="bind"&&Oe(i.arg,"name")){if(i.exp)s=i.exp;else if(i.arg&&i.arg.type===4){const a=Te(i.arg.content);s=i.exp=R(a,!1,i.arg.loc)}}else i.name==="bind"&&i.arg&&ce(i.arg)&&(i.arg.content=Te(i.arg.content)),r.push(i)}if(r.length>0){const{props:l,directives:i}=Qs(t,n,r,!1,!1);o=l,i.length&&n.onError(G(36,i[0].loc))}return{slotName:s,slotProps:o}}const eo=(t,n,s,o)=>{const{loc:r,modifiers:l,arg:i}=t;!t.exp&&!l.length&&s.onError(G(35,r));let a;if(i.type===4)if(i.isStatic){let m=i.content;process.env.NODE_ENV!=="production"&&m.startsWith("vnode")&&s.onError(G(51,i.loc)),m.startsWith("vue:")&&(m=`vnode-${m.slice(4)}`);const h=n.tagType!==0||m.startsWith("vnode")||!/[A-Z]/.test(m)?Cl(Te(m)):`on:${m}`;a=R(h,!0,i.loc)}else a=ye([`${s.helperString(xn)}(`,i,")"]);else a=i,a.children.unshift(`${s.helperString(xn)}(`),a.children.push(")");let c=t.exp;c&&!c.content.trim()&&(c=void 0);let f=s.cacheHandlers&&!c&&!s.inVOnce;if(c){const m=xs(c),h=!(m||sa(c)),v=c.content.includes(";");process.env.NODE_ENV!=="production"&&ze(c,s,!1,v),(h||f&&m)&&(c=ye([`${h?"$event":"(...args)"} => ${v?"{":"("}`,c,v?"}":")"]))}let u={props:[Q(a,c||R("() => {}",!1,r))]};return o&&(u=o(u)),f&&(u.props[0].value=s.cache(u.props[0].value)),u.props.forEach(m=>m.key.isHandlerKey=!0),u},fc=(t,n)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const s=t.children;let o,r=!1;for(let l=0;l<s.length;l++){const i=s[l];if(On(i)){r=!0;for(let a=l+1;a<s.length;a++){const c=s[a];if(On(c))o||(o=s[l]=ye([i],i.loc)),o.children.push(" + ",c),s.splice(a,1),a--;else{o=void 0;break}}}}if(!(!r||s.length===1&&(t.type===0||t.type===1&&t.tagType===0&&!t.props.find(l=>l.type===7&&!n.directiveTransforms[l.name])&&t.tag!=="template")))for(let l=0;l<s.length;l++){const i=s[l];if(On(i)||i.type===8){const a=[];(i.type!==2||i.content!==" ")&&a.push(i),!n.ssr&&he(i,n)===0&&a.push(1+(process.env.NODE_ENV!=="production"?` /* ${tt[1]} */`:"")),s[l]={type:12,content:i,loc:i.loc,codegenNode:ne(n.helper(mn),a)}}}}},to=new WeakSet,mc=(t,n)=>{if(t.type===1&&de(t,"once",!0))return to.has(t)||n.inVOnce||n.inSSR?void 0:(to.add(t),n.inVOnce=!0,n.helper(Tt),()=>{n.inVOnce=!1;const s=n.currentNode;s.codegenNode&&(s.codegenNode=n.cache(s.codegenNode,!0,!0))})},no=(t,n,s)=>{const{exp:o,arg:r}=t;if(!o)return s.onError(G(41,t.loc)),Ut();const l=o.loc.source.trim(),i=o.type===4?o.content:l,a=s.bindingMetadata[l];if(a==="props"||a==="props-aliased")return s.onError(G(44,o.loc)),Ut();if(!i.trim()||!xs(o))return s.onError(G(42,o.loc)),Ut();const c=r||R("modelValue",!0),f=r?ce(r)?`onUpdate:${Te(r.content)}`:ye(['"onUpdate:" + ',r]):"onUpdate:modelValue";let u;const m=s.isTS?"($event: any)":"$event";u=ye([`${m} => ((`,o,") = $event)"]);const h=[Q(c,t.exp),Q(f,u)];if(t.modifiers.length&&n.tagType===1){const v=t.modifiers.map(_=>_.content).map(_=>(Dn(_)?_:JSON.stringify(_))+": true").join(", "),x=r?ce(r)?`${r.content}Modifiers`:ye([r,' + "Modifiers"']):"modelModifiers";h.push(Q(x,R(`{ ${v} }`,!1,t.loc,2)))}return Ut(h)};function Ut(t=[]){return{props:t}}const uc=/[\w).+\-_$\]]/,hc=(t,n)=>{De("COMPILER_FILTERS",n)&&(t.type===5?qt(t.content,n):t.type===1&&t.props.forEach(s=>{s.type===7&&s.name!=="for"&&s.exp&&qt(s.exp,n)}))};function qt(t,n){if(t.type===4)so(t,n);else for(let s=0;s<t.children.length;s++){const o=t.children[s];typeof o=="object"&&(o.type===4?so(o,n):o.type===8?qt(t,n):o.type===5&&qt(o.content,n))}}function so(t,n){const s=t.content;let o=!1,r=!1,l=!1,i=!1,a=0,c=0,f=0,u=0,m,h,v,x,_=[];for(v=0;v<s.length;v++)if(h=m,m=s.charCodeAt(v),o)m===39&&h!==92&&(o=!1);else if(r)m===34&&h!==92&&(r=!1);else if(l)m===96&&h!==92&&(l=!1);else if(i)m===47&&h!==92&&(i=!1);else if(m===124&&s.charCodeAt(v+1)!==124&&s.charCodeAt(v-1)!==124&&!a&&!c&&!f)x===void 0?(u=v+1,x=s.slice(0,v).trim()):N();else{switch(m){case 34:r=!0;break;case 39:o=!0;break;case 96:l=!0;break;case 40:f++;break;case 41:f--;break;case 91:c++;break;case 93:c--;break;case 123:a++;break;case 125:a--;break}if(m===47){let C=v-1,A;for(;C>=0&&(A=s.charAt(C),A===" ");C--);(!A||!uc.test(A))&&(i=!0)}}x===void 0?x=s.slice(0,v).trim():u!==0&&N();function N(){_.push(s.slice(u,v).trim()),u=v+1}if(_.length){for(process.env.NODE_ENV!=="production"&&Dt("COMPILER_FILTERS",n,t.loc),v=0;v<_.length;v++)x=gc(x,_[v],n);t.content=x,t.ast=void 0}}function gc(t,n,s){s.helper(yn);const o=n.indexOf("(");if(o<0)return s.filters.add(n),`${ct(n,"filter")}(${t})`;{const r=n.slice(0,o),l=n.slice(o+1);return s.filters.add(r),`${ct(r,"filter")}(${t}${l!==")"?","+l:l}`}}const oo=new WeakSet,yc=(t,n)=>{if(t.type===1){const s=de(t,"memo");return!s||oo.has(t)?void 0:(oo.add(t),()=>{const o=t.codegenNode||n.currentNode.codegenNode;o&&o.type===13&&(t.tagType!==1&&Bn(o,n),t.codegenNode=ne(n.helper(Cn),[s.exp,Ke(void 0,o),"_cache",String(n.cached.length)]),n.cached.push(null))})}};function vc(t){return[[mc,Ja,yc,Va,hc,...process.env.NODE_ENV!=="production"?[Ga]:[],dc,rc,nc,fc],{on:eo,bind:Qa,model:no}]}function bc(t,n={}){const s=n.onError||$n,o=n.mode==="module";n.prefixIdentifiers===!0?s(G(47)):o&&s(G(48));const r=!1;n.cacheHandlers&&s(G(49)),n.scopeId&&!o&&s(G(50));const l=Be({},n,{prefixIdentifiers:r}),i=se(t)?Ea(t,l):t,[a,c]=vc();return _a(i,Be({},l,{nodeTransforms:[...a,...n.nodeTransforms||[]],directiveTransforms:Be({},c,n.directiveTransforms||{})})),Ta(i,l)}const kc=()=>({props:[]});/**
|
|
148
148
|
* @vue/compiler-dom v3.5.18
|
|
149
149
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
150
150
|
* @license MIT
|
|
151
|
-
**/const no=Symbol(process.env.NODE_ENV!=="production"?"vModelRadio":""),so=Symbol(process.env.NODE_ENV!=="production"?"vModelCheckbox":""),oo=Symbol(process.env.NODE_ENV!=="production"?"vModelText":""),ro=Symbol(process.env.NODE_ENV!=="production"?"vModelSelect":""),Hn=Symbol(process.env.NODE_ENV!=="production"?"vModelDynamic":""),io=Symbol(process.env.NODE_ENV!=="production"?"vOnModifiersGuard":""),lo=Symbol(process.env.NODE_ENV!=="production"?"vOnKeysGuard":""),ao=Symbol(process.env.NODE_ENV!=="production"?"vShow":""),Un=Symbol(process.env.NODE_ENV!=="production"?"Transition":""),co=Symbol(process.env.NODE_ENV!=="production"?"TransitionGroup":"");Wl({[no]:"vModelRadio",[so]:"vModelCheckbox",[oo]:"vModelText",[ro]:"vModelSelect",[Hn]:"vModelDynamic",[io]:"withModifiers",[lo]:"withKeys",[ao]:"vShow",[Un]:"Transition",[co]:"TransitionGroup"});let Xe;function Ec(t,n=!1){return Xe||(Xe=document.createElement("div")),n?(Xe.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,Xe.children[0].getAttribute("foo")):(Xe.innerHTML=t,Xe.textContent)}const Nc={parseMode:"html",isVoidTag:Fl,isNativeTag:t=>Ml(t)||Pl(t)||Rl(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:Ec,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return Un;if(t==="TransitionGroup"||t==="transition-group")return co},getNamespace(t,n,s){let o=n?n.ns:s;if(n&&o===2)if(n.tag==="annotation-xml"){if(t==="svg")return 1;n.props.some(r=>r.type===6&&r.name==="encoding"&&r.value!=null&&(r.value.content==="text/html"||r.value.content==="application/xhtml+xml"))&&(o=0)}else/^m(?:[ions]|text)$/.test(n.tag)&&t!=="mglyph"&&t!=="malignmark"&&(o=0);else n&&o===1&&(n.tag==="foreignObject"||n.tag==="desc"||n.tag==="title")&&(o=0);if(o===0){if(t==="svg")return 1;if(t==="math")return 2}return o}},wc=t=>{t.type===1&&t.props.forEach((n,s)=>{n.type===6&&n.name==="style"&&n.value&&(t.props[s]={type:7,name:"bind",arg:F("style",!0,n.loc),exp:xc(n.value.content,n.loc),modifiers:[],loc:n.loc})})},xc=(t,n)=>{const s=Dl(t);return F(JSON.stringify(s),!1,n,3)};function ye(t,n){return G(t,n,process.env.NODE_ENV!=="production"?_c:void 0)}const _c={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},Cc=(t,n,s)=>{const{exp:o,loc:r}=t;return o||s.onError(ye(53,r)),n.children.length&&(s.onError(ye(54,r)),n.children.length=0),{props:[Q(F("innerHTML",!0,r),o||F("",!0))]}},Sc=(t,n,s)=>{const{exp:o,loc:r}=t;return o||s.onError(ye(55,r)),n.children.length&&(s.onError(ye(56,r)),n.children.length=0),{props:[Q(F("textContent",!0),o?ue(o,s)>0?o:ne(s.helperString(wt),[o],r):F("",!0))]}},Bc=(t,n,s)=>{const o=Vs(t,n,s);if(!o.props.length||n.tagType===1)return o;t.arg&&s.onError(ye(58,t.arg.loc));function r(){const a=ce(n,"bind");a&&Oe(a.arg,"value")&&s.onError(ye(60,a.loc))}const{tag:l}=n,i=s.isCustomElement(l);if(l==="input"||l==="textarea"||l==="select"||i){let a=oo,c=!1;if(l==="input"||i){const f=it(n,"type");if(f){if(f.type===7)a=Hn;else if(f.value)switch(f.value.content){case"radio":a=no;break;case"checkbox":a=so;break;case"file":c=!0,s.onError(ye(59,t.loc));break;default:process.env.NODE_ENV!=="production"&&r();break}}else oa(n)?a=Hn:process.env.NODE_ENV!=="production"&&r()}else l==="select"?a=ro:process.env.NODE_ENV!=="production"&&r();c||(o.needRuntime=s.helper(a))}else s.onError(ye(57,t.loc));return o.props=o.props.filter(a=>!(a.key.type===4&&a.key.content==="modelValue")),o},$c=Ne("passive,once,capture"),Tc=Ne("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Dc=Ne("left,right"),po=Ne("onkeyup,onkeydown,onkeypress"),Oc=(t,n,s,o)=>{const r=[],l=[],i=[];for(let a=0;a<n.length;a++){const c=n[a].content;c==="native"&&Ye("COMPILER_V_ON_NATIVE",s,o)||$c(c)?i.push(c):Dc(c)?ae(t)?po(t.content.toLowerCase())?r.push(c):l.push(c):(r.push(c),l.push(c)):Tc(c)?l.push(c):r.push(c)}return{keyModifiers:r,nonKeyModifiers:l,eventOptionModifiers:i}},fo=(t,n)=>ae(t)&&t.content.toLowerCase()==="onclick"?F(n,!0):t.type!==4?ge(["(",t,`) === "onClick" ? "${n}" : (`,t,")"]):t,Lc=(t,n,s)=>Xs(t,n,s,o=>{const{modifiers:r}=t;if(!r.length)return o;let{key:l,value:i}=o.props[0];const{keyModifiers:a,nonKeyModifiers:c,eventOptionModifiers:f}=Oc(l,r,s,t.loc);if(c.includes("right")&&(l=fo(l,"onContextmenu")),c.includes("middle")&&(l=fo(l,"onMouseup")),c.length&&(i=ne(s.helper(io),[i,JSON.stringify(c)])),a.length&&(!ae(l)||po(l.content.toLowerCase()))&&(i=ne(s.helper(lo),[i,JSON.stringify(a)])),f.length){const u=f.map(cn).join("");l=ae(l)?F(`${l.content}${u}`,!0):ge(["(",l,`) + "${u}"`])}return{props:[Q(l,i)]}}),Ic=(t,n,s)=>{const{exp:o,loc:r}=t;return o||s.onError(ye(61,r)),{props:[],needRuntime:s.helper(ao)}},Ac=(t,n)=>{if(t.type===1&&t.tagType===1&&n.isBuiltInComponent(t.tag)===Un)return()=>{if(!t.children.length)return;mo(t)&&n.onError(ye(62,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}));const o=t.children[0];if(o.type===1)for(const r of o.props)r.type===7&&r.name==="show"&&t.props.push({type:6,name:"persisted",nameLoc:t.loc,value:void 0,loc:t.loc})}};function mo(t){const n=t.children=t.children.filter(o=>o.type!==3&&!(o.type===2&&!o.content.trim())),s=n[0];return n.length!==1||s.type===11||s.type===9&&s.branches.some(mo)}const Mc=(t,n)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&(process.env.NODE_ENV!=="production"&&n.onError(ye(63,t.loc)),n.removeNode())};function Pc(t,n){return t==="template"?!0:t in uo?uo[t].has(n):n in ho?ho[n].has(t):!(t in go&&go[t].has(n)||n in yo&&yo[n].has(t))}const Qe=new Set(["h1","h2","h3","h4","h5","h6"]),ze=new Set([]),uo={head:new Set(["base","basefront","bgsound","link","meta","title","noscript","noframes","style","script","template"]),optgroup:new Set(["option"]),select:new Set(["optgroup","option","hr"]),table:new Set(["caption","colgroup","tbody","tfoot","thead"]),tr:new Set(["td","th"]),colgroup:new Set(["col"]),tbody:new Set(["tr"]),thead:new Set(["tr"]),tfoot:new Set(["tr"]),script:ze,iframe:ze,option:ze,textarea:ze,style:ze,title:ze},ho={html:ze,body:new Set(["html"]),head:new Set(["html"]),td:new Set(["tr"]),colgroup:new Set(["table"]),caption:new Set(["table"]),tbody:new Set(["table"]),tfoot:new Set(["table"]),col:new Set(["colgroup"]),th:new Set(["tr"]),thead:new Set(["table"]),tr:new Set(["tbody","thead","tfoot"]),dd:new Set(["dl","div"]),dt:new Set(["dl","div"]),figcaption:new Set(["figure"]),summary:new Set(["details"]),area:new Set(["map"])},go={p:new Set(["address","article","aside","blockquote","center","details","dialog","dir","div","dl","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","menu","ol","p","pre","section","table","ul"]),svg:new Set(["b","blockquote","br","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","hr","i","img","li","menu","meta","ol","p","pre","ruby","s","small","span","strong","sub","sup","table","u","ul","var"])},yo={a:new Set(["a"]),button:new Set(["button"]),dd:new Set(["dd","dt"]),dt:new Set(["dd","dt"]),form:new Set(["form"]),li:new Set(["li"]),h1:Qe,h2:Qe,h3:Qe,h4:Qe,h5:Qe,h6:Qe},Rc=(t,n)=>{if(t.type===1&&t.tagType===0&&n.parent&&n.parent.type===1&&n.parent.tagType===0&&!Pc(n.parent.tag,t.tag)){const s=new SyntaxError(`<${t.tag}> cannot be child of <${n.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`);s.loc=t.loc,n.onWarn(s)}},Fc=[wc,...process.env.NODE_ENV!=="production"?[Ac,Rc]:[]],zc={cloak:kc,html:Cc,text:Sc,model:Bc,on:Lc,show:Ic};function jc(t,n={}){return bc(t,Be({},Nc,n,{nodeTransforms:[Mc,...Fc,...n.nodeTransforms||[]],directiveTransforms:Be({},zc,n.directiveTransforms||{}),transformHoist:null}))}function Hc(t,n={}){const s=t.trim().startsWith("<")?t:`<span>${t}</span>`,{code:o}=jc(s,{mode:"function"}),r=new Function("Vue",`${o}; return render;`)(Co);return e.defineComponent({name:"DynamicFromString",props:n.props??{},emits:n.emits??[],setup(){return n.setup?.()??{}},render:r})}const qn={};function Uc(t){return qn[t]||(qn[t]=Hc(t,{props:{row:{type:Object,default:void 0},value:{type:null,default:void 0},data:{type:Object,default:void 0},column:{type:Object,default:void 0}}})),qn[t]}const qc={class:"mt-4 flex flex-wrap items-center justify-between gap-3 text-sm text-gray-600"},Wc={class:"flex items-center gap-2"},Kc=["disabled"],Gc={class:"text-sm"},Jc=["disabled"],Zc=e.defineComponent({__name:"TablePagination",props:{currentPage:{},totalPages:{},label:{}},setup(t){const n=t,s=e.computed(()=>n.currentPage<=1),o=e.computed(()=>n.currentPage>=n.totalPages);return(r,l)=>(e.openBlock(),e.createElementBlock("div",qc,[e.createElementVNode("div",null,e.toDisplayString(r.label),1),e.createElementVNode("div",Wc,[e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:s.value,onClick:l[0]||(l[0]=i=>r.$emit("previous"))}," Назад ",8,Kc),e.createElementVNode("span",Gc,"Сторінка "+e.toDisplayString(r.currentPage)+" з "+e.toDisplayString(r.totalPages),1),e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:o.value,onClick:l[1]||(l[1]=i=>r.$emit("next"))}," Далі ",8,Jc)])]))}}),Yc={class:"relative inline-flex"},Xc=["aria-label"],Qc={class:"px-3 pb-2"},Vc={class:"px-3 pb-3 max-h-64 overflow-y-auto"},ed=["onClick"],td={class:"truncate"},nd={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},sd="inline-flex items-center justify-center size-8 rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",od=e.defineComponent({__name:"TableColumnSettings",props:{columns:{}},emits:["update:columns"],setup(t,{emit:n}){const s=t,o=n,r=e.useAttrs(),l=e.ref(!1),i=e.ref(""),a=e.ref([...s.columns]),c=e.ref(null),f=e.ref(null),u=e.ref(null),m=e.ref({top:0,left:0}),h=e.computed(()=>{if(!i.value)return a.value;const B=i.value.toLowerCase();return a.value.filter(T=>v(T).toLowerCase().includes(B))});e.watch(()=>s.columns,B=>{if(!B){a.value=[];return}const T=JSON.stringify(B),S=JSON.stringify(a.value);T!==S&&(a.value=[...B])},{deep:!0}),e.watch(a,B=>{o("update:columns",B)},{deep:!0});function v(B){return B.ua||B.label||B.name||"Колонка"}function x(B){const T=!B.hidden;T&&a.value.filter(S=>!S.hidden).length<=1||(B.hidden=T)}function _(){l.value=!l.value,l.value&&e.nextTick(()=>{u.value?.focus(),N()})}function N(){if(!c.value)return;const B=c.value.getBoundingClientRect();m.value={top:B.bottom+window.scrollY+6,left:B.left+window.scrollX-200}}function C(B){if(!l.value)return;const T=B.target;T&&(f.value?.contains(T)||c.value?.contains(T)||(l.value=!1))}function I(B){B.key==="Escape"&&(l.value=!1)}return e.onMounted(()=>{document.addEventListener("click",C,!0),document.addEventListener("keydown",I)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",C,!0),document.removeEventListener("keydown",I)}),(B,T)=>(e.openBlock(),e.createElementBlock("div",Yc,[e.createElementVNode("button",{ref_key:"buttonRef",ref:c,type:"button",onClick:_,class:e.normalizeClass([sd,e.unref(r).class]),"aria-label":e.unref(r)["aria-label"]??"Налаштування колонок",title:"Налаштування колонок"},T[2]||(T[2]=[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="icon icon-tabler icons-tabler-outline icon-tabler-columns" height="18" width="18" aria-hidden="true"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6h5.5"></path><path d="M4 10h5.5"></path><path d="M4 14h5.5"></path><path d="M4 18h5.5"></path><path d="M14.5 6h5.5"></path><path d="M14.5 10h5.5"></path><path d="M14.5 14h5.5"></path><path d="M14.5 18h5.5"></path></svg>',1)]),10,Xc),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:f,class:"fixed z-50 w-64 bg-white rounded-xl shadow-lg border border-gray-200 dark:bg-neutral-900 dark:border-neutral-700",style:e.normalizeStyle({top:`${m.value.top}px`,left:`${m.value.left}px`})},[T[5]||(T[5]=e.createElementVNode("div",{class:"flex items-center justify-between h-12 px-4 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Налаштування колонок ",-1)),e.createElementVNode("div",Qc,[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:u,"onUpdate:modelValue":T[0]||(T[0]=S=>i.value=S),type:"text",class:"w-full rounded-md border border-gray-200 px-3 py-2 text-sm text-gray-800 placeholder:text-gray-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200",placeholder:"Пошук колонок"},null,512),[[e.vModelText,i.value]])]),e.createElementVNode("div",Vc,[T[4]||(T[4]=e.createElementVNode("p",{class:"px-1 pb-2 text-xs text-gray-500 uppercase tracking-wide"},"Виберіть колонки",-1)),e.createElementVNode("ul",{class:"space-y-1",onClick:T[1]||(T[1]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,S=>(e.openBlock(),e.createElementBlock("li",{key:S.name,class:"flex items-center justify-between rounded-lg px-3 py-2 text-sm text-gray-800 hover:bg-gray-100 dark:text-neutral-200 dark:hover:bg-neutral-800 cursor-pointer",onClick:W=>x(S)},[e.createElementVNode("span",td,e.toDisplayString(v(S)),1),e.createElementVNode("span",{class:e.normalizeClass(["flex items-center justify-center size-4 rounded border border-gray-300 text-white",S.hidden?"bg-white text-transparent":"bg-blue-600 border-blue-600"])},[S.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",nd,T[3]||(T[3]=[e.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])))],2)],8,ed))),128))])])],4)):e.createCommentVNode("",!0)]))]))}}),rd={class:"flex flex-col gap-4 mb-[15px]"},id={class:"flex flex-wrap justify-between items-center gap-4"},ld={class:"font-semibold text-[16px]"},ad={class:"flex flex-wrap items-center gap-4"},cd={class:"relative"},dd={class:"ml-auto flex items-center gap-2"},pd={class:"overflow-x-auto"},fd={class:"min-w-full relative divide-y-2 divide-gray-200 bg-white min-w-full overflow-auto divide-y-2 divide-gray-200 bg-white text-[12px] text-gray-600"},md={class:"text-left font-medium text-gray-700"},ud={key:0,class:"py-2 pr-4 min-w-[80px] max-w-[120px] text-right"},hd={class:"divide-y divide-gray-200"},gd=["href"],yd={key:2},vd={key:3},bd={key:0,class:"py-2 pr-4 text-right"},kd=["data-action-key"],Ed=["onClick"],Nd=["onClick"],wd={key:0,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"},xd={key:1,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"},_d={key:2,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"},Cd={key:3,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"},Sd={key:0},Bd=["colspan"],vo=e.defineComponent({__name:"TableWidget",props:{name:{},label:{},component:{},path:{},slot:{},col:{},width:{},html:{},title:{},type:{},token:{},count:{},props:{},items:{}},setup(t){const n=e.getCurrentInstance(),s=e.ref([]),o=e.ref([]),r=new Map,l=t,i=e.ref([]),a=e.ref(""),c=e.ref(""),f=e.ref(""),u=e.ref(1),m=e.ref(10),h=e.ref(0),v=e.ref(0),x=e.ref("id"),_=e.ref("");let N=null,C=0;const I=e.ref(null);async function B(){const E=u.value,w=++C,p=new URLSearchParams,d=f.value.trim();d&&p.set("search",d),p.set("page",String(E)),p.set("limit",String(m.value));const k=`/api/data/${l.token}${p.toString()?`?${p.toString()}`:""}`;let g;try{const H=await fetch(k);if(!H.ok)throw new Error(`Request failed with status ${H.status}`);g=await H.json()}catch(H){w===C&&(s.value=[],v.value=0,h.value=0),console.error("Failed to load table data",H);return}if(w!==C)return;s.value=Array.isArray(g?.rows)?g.rows:[],o.value=R(g?.columns||[]),i.value=Array.isArray(g?.actions)?g.actions:[],a.value=g?.form,c.value=g?.addToken,x.value=typeof g?.pk=="string"&&g.pk?g.pk:x.value,typeof g?.form=="string"&&g.form&&(_.value=g.form.replace(/\.form$/,".table")),Ee();const L=Number(g?.total??g?.count??g?.totalCount),M=Number(g?.filtered??g?.filteredCount);h.value=Number.isFinite(L)&&L>0?L:s.value.length,v.value=Number.isFinite(M)&&M>0?M:Math.max(s.value.length,h.value);const j=Math.max(1,Math.ceil((v.value||s.value.length||1)/m.value));let P=E;typeof g?.page=="number"&&g.page>0&&(P=g.page),P>j&&(P=j),P<1&&(P=1);const K=P!==E;if(u.value=P,K&&v.value>0)return B()}const{$notify:T,$confirm:S,$form:W}=n?.appContext?.config?.globalProperties||{};async function ee(E){await W({token:E.token}),B()}function O(){W({token:c.value})}function A(E){S({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const w=await fetch(`/api/table/${E.token}`,{method:"DELETE"});if(!w.ok){const{error:p}=await w.json();T({title:"Помилка",type:"warning",message:p});return}T({title:"Видаленно",message:"Успішно видалено"}),await B()}})}e.onMounted(async()=>{await B()});function z(E){return typeof E?.format=="string"?E.format.toLowerCase():""}function R(E){const w=new Map;o.value.forEach(d=>{d?.name&&w.set(d.name,!!d.hidden)});const p=E.map(d=>{const k=w.has(d.name)?w.get(d.name):!!d.hidden;return{...d,hidden:k}});return p.length&&!p.some(d=>!d.hidden)&&(p[0].hidden=!1),p}const y=e.computed(()=>{const E=o.value.filter(w=>!w.hidden);return E.length?E:o.value}),$=e.computed(()=>{const E=[],w=new Set;for(const p of i.value){if(typeof p=="string"){if(p==="view"){const d="row:view";w.has(d)||(E.push({key:d,type:"view",label:"Переглянути",scope:"row",handler:Yn}),w.add(d));continue}if(p==="edit"){const d="row:edit";w.has(d)||(E.push({key:d,type:"edit",label:"Редагувати",scope:"row",handler:Jn}),w.add(d));continue}if(p==="delete"||p==="del"){const d="row:delete";w.has(d)||(E.push({key:d,type:"delete",label:"Видалити",scope:"row",handler:Zn,variant:"danger"}),w.add(d));continue}if(p==="add"){const d="toolbar:add";w.has(d)||(E.push({key:d,type:"add",label:"Додати",scope:"toolbar"}),w.add(d))}continue}if(p&&typeof p=="object"){const d=String(p.name??p.type??"action"),k=String(p.label??p.title??d),g=p.scope==="toolbar"?"toolbar":"row",L=`${g}:${d}`;if(w.has(L))continue;w.add(L),E.push({key:L,type:d,label:k,scope:g,handler:g==="row"?M=>Jt(p,M):void 0,variant:p.variant==="danger"?"danger":"default",original:p})}}return E}),b=e.computed(()=>$.value.filter(E=>E.scope==="row"&&typeof E.handler=="function")),D=e.computed(()=>$.value.filter(E=>E.scope==="toolbar")),J=e.computed(()=>b.value.length>0),ve=e.computed(()=>D.value.some(E=>E.type==="add")),be=e.computed(()=>s.value),He=e.computed(()=>{const E=v.value||be.value.length,w=Math.ceil(E/m.value);return w>0?w:1}),xe=e.computed(()=>{const E=be.value.length,w=v.value||E,p=h.value||w;return`Показано ${E} з ${w} (усього ${p})`});function ke(){u.value<He.value&&(u.value+=1,B())}function Se(){u.value>1&&(u.value-=1,B())}e.watch(o,E=>{E?.length&&(E.some(w=>!w.hidden)||(E[0].hidden=!1))},{deep:!0});function Wn(){N&&clearTimeout(N),Ee(),N=setTimeout(()=>{u.value=1,B()},300)}function Ue(E){const w=x.value||"id",p=E?.token??E?.[w]??E?.id;return p?String(p):""}function Ut(E){const w=y.value[E],p=["py-2",...qe(w)];E===0&&p.push("pl-4");const d=E===y.value.length-1&&!J.value;return p.push(d?"pr-4":"pr-5"),p.join(" ")}function qt(E,w){const p=["py-2",...qe(w)];z(w)==="badge"&&p.push("center"),E===0&&p.push("pl-4");const d=E===y.value.length-1&&!J.value;return p.push(d?"pr-4":"pr-5"),p.join(" ")}function qe(E){const w=[],p=L=>{if(L==null||L==="")return;const M=Number(L);return Number.isFinite(M)&&M>0?`${M}px`:String(L).replace(/\s+/g,"")},d=p(E?.width),k=p(E?.minWidth),g=p(E?.maxWidth);return d?(w.push(`min-w-[${d}]`,`max-w-[${d}]`),w):(w.push(`min-w-[${k??"100px"}]`),w.push(`max-w-[${g??"350px"}]`),w)}function Wt(E){if(!b.value.length)return!1;const w=x.value||"id";return!!(E?.token||E?.[w]||E?.id)}function Kt(E){return I.value===Ue(E)}function Kn(E){const w=Ue(E);w&&(I.value=I.value===w?null:w)}function Gn(E,w){const p=Ue(E);if(p){if(w){r.set(p,w);return}r.delete(p)}}function Gt(E){const w=Ue(E),p=r.get(w);if(!p)return{};const d=p.getBoundingClientRect();return{top:`${d.bottom+window.scrollY+8}px`,left:`${d.right+window.scrollX-200}px`,width:"auto"}}function Ee(){I.value=null}function Jn(E){Ee(),ee(E)}function Zn(E){Ee(),A(E)}async function Jt(E,w){Ee();const p=x.value||"id",d=E.isId?w?.[p]??w?.id:w?.token??w?.[p]??w?.id;if(!d){console.warn("Cannot execute action without identifier",E);return}if(E.form&&typeof W=="function"){const k=await ft(E.form,d),g={form:E.form,token:k?.token??w?.token??d,schema:k?.schema,mode:k?.mode??"edit"};console.log("formConfig",k),k?.data!==void 0&&(g.defaultValue=k.data);try{await W(g),await B()}catch(L){console.error("Failed to execute form action",L)}return}if(typeof E.api=="string"&&E.api){const k=Zt(E.api,d);window.location.href=k;return}w?.token&&typeof W=="function"&&W({token:w.token})}function Zt(E,w){return`${E.endsWith("/")?E:`${E}/`}${w}`}async function ft(E,w){const p=`/api/form/${E}/${w}`;try{const d=await fetch(p);if(!d.ok)throw new Error(`Request failed with status ${d.status}`);return await d.json()}catch(d){console.error("Failed to load form config",d),typeof T=="function"&&T({title:"Помилка",type:"warning",message:"Не вдалося отримати дані форми."});return}}function Yn(E){Ee();const w=_.value||(a.value?String(a.value).replace(/\.form$/,".table"):""),p=x.value||"id",d=E?.[p]??E?.id??E?.token;if(w&&d){const k=`/card/${w}/${d}`;window.location.href=k;return}if(E?.token&&typeof W=="function"){W({token:E.token,readonly:!0,mode:"view"});return}E?.token&&ee(E)}function Yt(E){if(!I.value)return;const w=E.target;if(!w)return;const p=w.closest("[data-action-key]");p&&p.getAttribute("data-action-key")===I.value||Ee()}e.onMounted(()=>{document.addEventListener("click",Yt,!0)}),e.onBeforeUnmount(()=>{N&&clearTimeout(N),document.removeEventListener("click",Yt,!0)});function mt(E,w){const d=E?.[`${w.name}_text`];if(Array.isArray(d))return d.length?d.join(", "):"-";if(d!=null&&d!=="")return d;const k=E?.[w.name];return Array.isArray(k)?k.length?k.join(", "):"-":k??"-"}function ut(E,w){const d=E?.[`${w.name}_data`];if(d&&typeof d=="object")return{text:d.text??d.label??d.name??d.title??"-",color:d.color,textColor:d.textColor};const k=E?.[`${w.name}_text`]??E?.[w.name];return{text:(Array.isArray(k)?k.join(", "):k)??"-"}}function Xn(E,w){const p=ut(E,w);return p.color?{backgroundColor:p.color,color:p.textColor??"#ffffff"}:{}}function Xt(E,w){const p=z(w);if(p==="badge")return ut(E,w).text;if(p==="select")return mt(E,w);if(p==="slot")return"-";if(p==="text")return E?.[w.name]??"-";const d=E?.[`${w.name}_data`];return d!=null&&typeof d!="object"?d:E?.[`${w.name}_text`]??E?.[w.name]??"-"}return(E,w)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",rd,[e.createElementVNode("div",id,[e.createElementVNode("div",ld,e.toDisplayString(E.title),1)]),e.createElementVNode("div",ad,[e.createElementVNode("div",cd,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":w[0]||(w[0]=p=>f.value=p),type:"text",class:"w-52 rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Пошук",onInput:Wn},null,544),[[e.vModelText,f.value]])]),e.createElementVNode("div",dd,[e.createVNode(od,{columns:o.value,"onUpdate:columns":w[1]||(w[1]=p=>o.value=p)},null,8,["columns"]),ve.value&&c.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:O,class:"inline-flex size-8 items-center justify-center rounded-lg bg-blue-500 text-white shadow-sm transition-colors hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",title:"Додати запис","aria-label":"Додати запис"},w[3]||(w[3]=[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("path",{d:"M5 12h14"}),e.createElementVNode("path",{d:"M12 5v14"})],-1)]))):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",pd,[e.createElementVNode("table",fd,[e.createElementVNode("thead",md,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(p,d)=>(e.openBlock(),e.createElementBlock("th",{key:p.name,class:e.normalizeClass(Ut(d))},e.toDisplayString(p.ua),3))),128)),J.value?(e.openBlock(),e.createElementBlock("th",ud," Дії ")):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",hd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(be.value,p=>(e.openBlock(),e.createElementBlock("tr",{class:"bg-white odd:bg-gray-50",key:p.id??JSON.stringify(p)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(d,k)=>(e.openBlock(),e.createElementBlock("td",{key:d.name,class:e.normalizeClass([qt(k,d),"truncate"])},[d.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:d.link.replace("{{id}}",p.id),class:"font-medium cursor-pointer text-start text-wrap text-cyan-800 decoration-2 focus:outline-none focus:underline hover:text-cyan-700 hover:underline"},e.toDisplayString(Xt(p,d)),9,gd)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[z(d)==="slot"&&d.slot?.content?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Uc)(d.slot.content)),{key:0,data:p,row:p,column:d,value:p?.[d.name]},null,8,["data","row","column","value"])):z(d)==="badge"?(e.openBlock(),e.createElementBlock("span",{key:1,class:"items-center px-2 py-1 rounded-full text-xs font-semibold text-center justify-center flex",style:e.normalizeStyle(Xn(p,d))},e.toDisplayString(ut(p,d).text),5)):z(d)==="select"?(e.openBlock(),e.createElementBlock("span",yd,e.toDisplayString(mt(p,d)),1)):(e.openBlock(),e.createElementBlock("span",vd,e.toDisplayString(Xt(p,d)),1))],64))],2))),128)),J.value?(e.openBlock(),e.createElementBlock("td",bd,[Wt(p)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative inline-flex","data-action-key":Ue(p),ref_for:!0,ref:d=>Gn(p,d)},[e.createElementVNode("button",{type:"button",class:"inline-flex size-7 items-center justify-center rounded-md border border-gray-200 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",onClick:e.withModifiers(d=>Kn(p),["stop"])},w[4]||(w[4]=[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:"1"}),e.createElementVNode("circle",{cx:"12",cy:"5",r:"1"}),e.createElementVNode("circle",{cx:"12",cy:"19",r:"1"})],-1)]),8,Ed),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[Kt(p)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed z-50 w-40 overflow-hidden rounded-lg border border-gray-200 bg-white py-1 shadow-lg",style:e.normalizeStyle(Gt(p)),onClick:w[2]||(w[2]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,d=>(e.openBlock(),e.createElementBlock("button",{key:d.type,type:"button",class:e.normalizeClass(["flex w-full items-center gap-2 px-4 py-2 text-sm transition-colors",d.variant==="danger"?"text-red-600 hover:bg-red-50":"text-gray-700 hover:bg-gray-50"]),onClick:k=>d.handler?.(p)},[d.type==="view"?(e.openBlock(),e.createElementBlock("svg",wd,w[5]||(w[5]=[e.createElementVNode("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)]))):d.type==="edit"?(e.openBlock(),e.createElementBlock("svg",xd,w[6]||(w[6]=[e.createElementVNode("path",{d:"M18 2a2.828 2.828 0 1 1 4 4L7 21l-4 1 1-4Z"},null,-1)]))):d.type==="delete"?(e.openBlock(),e.createElementBlock("svg",_d,w[7]||(w[7]=[e.createElementVNode("path",{d:"M3 6h18"},null,-1),e.createElementVNode("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"},null,-1),e.createElementVNode("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"},null,-1),e.createElementVNode("line",{x1:"10",x2:"10",y1:"11",y2:"17"},null,-1),e.createElementVNode("line",{x1:"14",x2:"14",y1:"11",y2:"17"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",Cd,w[8]||(w[8]=[e.createElementVNode("path",{d:"M12 8v8"},null,-1),e.createElementVNode("path",{d:"M8 12h8"},null,-1)]))),e.createTextVNode(" "+e.toDisplayString(d.label),1)],10,Nd))),128))],4)):e.createCommentVNode("",!0)]))],8,kd)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),128)),be.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",Sd,[e.createElementVNode("td",{colspan:y.value.length+(J.value?1:0),class:"py-6 text-center text-gray-500"}," Немає записів для відображення ",8,Bd)]))])])]),e.createVNode(Zc,{"current-page":u.value,"total-pages":He.value,label:xe.value,onPrevious:Se,onNext:ke},null,8,["current-page","total-pages","label"])]))}}),$d={class:"p-[20px]"},Td={class:"flex gap-[6px] mb-5"},Dd={class:"vs-form-text relative bg-white rounded-lg flex-grow"},Od={class:"grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5 grid-cols-6"},Ld={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},Id={class:"space-y-8"},Ad={key:0},Md={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Pd=["onClick"],Rd={class:"md:col-span-2"},Fd={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},zd={class:"text-sm text-gray-500 dark:text-neutral-500"},jd={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},Hd=["checked","onChange"],Ud={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},qd={class:"md:col-span-2"},Wd={class:"font-semibold text-gray-800 dark:text-neutral-200"},Kd=["onClick"],Gd={class:"md:col-span-2"},Jd={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Zd={class:"text-sm text-gray-500 dark:text-neutral-500"},Yd={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},Xd=["checked","onChange"],jt=e.defineComponent({__name:"GroupInterfaceWidget",props:{data:{},id:{}},setup(t){const n=t,s=e.ref(""),o=["view","add","edit","del"],r=e.ref({});e.onMounted(async()=>{const _=await(await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`)).json();_.routes&&_.routes.forEach(N=>{r.value[N.path]=new Set(N.actions)})});const l=(x,_)=>r.value[x]?.has(_)??!1,i=(x,_)=>{r.value[x]||(r.value[x]=new Set),r.value[x].has(_)?r.value[x].delete(_):r.value[x].add(_)},a=(x,_)=>{x.forEach(N=>{N.path&&(r.value[N.path]||(r.value[N.path]=new Set),r.value[N.path].has(_)?r.value[N.path].delete(_):r.value[N.path].add(_))})},c=e.computed(()=>Object.entries(r.value).map(([x,_])=>({path:x,actions:Array.from(_)})).filter(x=>x.actions.length)),f=async()=>{await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({routes:c.value})}),xo.notify({title:"Success!",message:"Permissions saved."})},u=()=>{r.value={}},m=x=>{if(!s.value.trim())return x;const _=s.value.toLowerCase();return x.filter(N=>N.ua.toLowerCase().includes(_)||N.path&&N.path.toLowerCase().includes(_))},h=e.computed(()=>m(n.data.routers.filter(x=>!x.menu))),v=e.computed(()=>n.data.routers.filter(x=>x.menu).map(x=>({...x,menu:m(x.menu||[])})).filter(x=>x.menu&&x.menu.length>0));return(x,_)=>(e.openBlock(),e.createElementBlock("div",$d,[e.createElementVNode("div",Td,[e.createElementVNode("div",Dd,[_[1]||(_[1]=e.createElementVNode("i",{class:"absolute bottom-2/4 translate-y-2/4 text-gray-500 cursor-pointer ti"},null,-1)),e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:"Пошук","onUpdate:modelValue":_[0]||(_[0]=N=>s.value=N),class:"bg-white h-[38px] 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:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,512),[[e.vModelText,s.value]])]),e.createElementVNode("button",{onClick:u,class:"inline-flex items-center px-3 py-2 text-sm font-medium duration-300 bg-white border rounded-lg gap-x-2 hover:bg-gray-100"}," Скинути всі "),e.createElementVNode("button",{onClick:f,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"}," Зберегти ")]),e.createElementVNode("div",Od,[_[2]||(_[2]=e.createElementVNode("div",{class:"self-center col-span-2"},[e.createElementVNode("h2",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Групи")],-1)),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(N,C)=>e.createElementVNode("div",{class:"col-span-1 text-center",key:C},[e.createElementVNode("h3",Ld,e.toDisplayString(N),1)])),64))]),e.createElementVNode("div",Id,[h.value.length?(e.openBlock(),e.createElementBlock("div",Ad,[e.createElementVNode("ul",Md,[_[3]||(_[3]=e.createElementVNode("li",{class:"md:col-span-2"},[e.createElementVNode("h3",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Без категорії")],-1)),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(N,C)=>e.createElementVNode("li",{key:C,class:"md:block md:col-span-1 md:text-center"},[e.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:I=>a(h.value,o[C])}," Toggle all ",8,Pd)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(N,C)=>(e.openBlock(),e.createElementBlock("ul",{key:"uncat-"+C,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",Rd,[e.createElementVNode("p",Fd,e.toDisplayString(N.ua),1),e.createElementVNode("p",zd,e.toDisplayString(N.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(I,B)=>e.createElementVNode("li",{key:B,class:"col-span-1"},[e.createElementVNode("div",jd,[e.createElementVNode("input",{type:"checkbox",checked:l(N.path,I),onChange:T=>i(N.path,I),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,Hd)])])),64))]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(N,C)=>(e.openBlock(),e.createElementBlock("div",{key:C,class:"space-y-5"},[e.createElementVNode("ul",Ud,[e.createElementVNode("li",qd,[e.createElementVNode("h3",Wd,e.toDisplayString(N.ua),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(I,B)=>e.createElementVNode("li",{key:B,class:"md:block md:col-span-1 md:text-center"},[e.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:T=>a(N.menu,o[B])}," Toggle all ",8,Kd)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.menu,(I,B)=>(e.openBlock(),e.createElementBlock("ul",{key:B,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",Gd,[e.createElementVNode("p",Jd,e.toDisplayString(I.ua),1),e.createElementVNode("p",Zd,e.toDisplayString(I.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(T,S)=>e.createElementVNode("li",{key:S,class:"col-span-1"},[e.createElementVNode("div",Yd,[e.createElementVNode("input",{type:"checkbox",checked:l(I.path,T),onChange:W=>i(I.path,T),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,Xd)])])),64))]))),128))]))),128))])]))}}),je={"vs-widget-map":kt,"vs-widget-comments":gt,"vs-widget-history":yt,"vs-widget-gallery":bt,"vs-widget-file":vt,"vs-widget-list":sn,"vs-widget-table":vo,"vs-group-interface":jt};function bo(t){if(t==null)return null;const n=Number(t);return Number.isFinite(n)?Math.max(1,Math.min(12,Math.floor(n))):null}function ko(t){const n={...t};return Array.isArray(t.items)&&(n.items=t.items.map(s=>ko(s))),n}function Qd(t,n=12){if(!t.length)return;const s=[],o=[];t.forEach(c=>{const f=bo(c.col);f?(c.col=f,s.push({item:c,span:f})):o.push(c)});const r=s.reduce((c,f)=>c+f.span,0);let l=n-r;if(o.length===0)return;l<=0&&(l=n);const i=Math.max(1,Math.floor(l/o.length));let a=Math.max(0,l-i*o.length);o.forEach(c=>{let f=i;a>0&&(f+=1,a-=1),c.col=Math.max(1,Math.min(12,f))})}function Ht(t,n=12){if(!Array.isArray(t)||!t.length)return[];const s=t.map(o=>ko(o));return s.forEach(o=>{Array.isArray(o.items)&&o.items.length&&(o.items=Ht(o.items,12))}),Qd(s,n),s}function Eo(t){const n=bo(t);return n?n>=12?["md:col-span-12","lg:col-span-12"]:[`md:col-span-${n}`,`lg:col-span-${n}`]:[]}const Vd={class:"text-lg font-semibold text-gray-900"},ep=["innerHTML"],tp={key:0,class:"grid grid-cols-12 gap-4"},np={key:0,class:"mb-4 pb-2 border-b border-gray-200"},sp={class:"text-lg font-semibold text-gray-900"},op=["innerHTML"],dt=e.defineComponent({__name:"CardItem",props:{items:{},type:{},col:{},data:{},html:{},title:{},hideTitle:{type:Boolean},styling:{},name:{},label:{},component:{},slot:{},id:{},className:{},style:{}},setup(t){const n=t,s=e.computed(()=>{if(!n.col)return{};const f=Math.max(1,Math.min(12,Number(n.col)));return{[`md:col-span-${f}`]:!0,[`lg:col-span-${f}`]:!0}}),o=e.computed(()=>Ht(n.items));function r(f){const u=["col-span-12"],m=Eo(f.col);return m.length&&u.push(...m),u}function l(f){return je[f]||f}function i(f,u){if(!f||typeof u!="string"||!u)return{found:!1,value:void 0};const m=u.split(".");let h=f;for(const v of m){if(h==null||typeof h!="object"&&!Array.isArray(h))return{found:!1,value:void 0};if(!(v in h))return{found:!1,value:void 0};h=h[v]}return{found:!0,value:h}}const a=function(f={}){const u={...f};return Object.entries(u).forEach(([m,h])=>{if(m!=="props"&&typeof h=="string"){const v=i(n.data,h);v.found&&(u[m]=v.value)}}),f.props&&typeof f.props=="object"&&Object.entries(f.props).forEach(([m,h])=>{if(typeof h=="string"){const v=i(n.data,h);u[m]=v.found?v.value:h}else u[m]=h}),delete u.props,u},c=e.computed(()=>{const f={};return n.col&&(f.col=n.col),f});return(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[s.value,f.styling?.classItem],"w-full bg-gray-50 rounded-lg p-4 col-span-12"])},[!f.hideTitle&&f.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mb-4 pb-2 border-b border-gray-200",f.styling?.classItemTitle])},[e.createElementVNode("h3",Vd,e.toDisplayString(f.title),1)],2)):e.createCommentVNode("",!0),f.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:f.html,class:"text-gray-900 leading-relaxed"},null,8,ep)):f.type?.includes("tabs")?(e.openBlock(),e.createBlock(pt,{key:2,view:f.type,panels:f.items,data:f.data,styling:f.styling},null,8,["view","panels","data","styling"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[o.value.length?(e.openBlock(),e.createElementBlock("div",tp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(m,h)=>(e.openBlock(),e.createElementBlock("div",{key:m.name||m.component||h,class:e.normalizeClass(r(m))},[m.title||m.label?(e.openBlock(),e.createElementBlock("div",np,[e.createElementVNode("h3",sp,e.toDisplayString(m.title||m.label),1)])):e.createCommentVNode("",!0),m.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:m.html,class:"text-gray-900 leading-relaxed"},null,8,op)):m.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(m.component)),e.mergeProps({key:2,ref_for:!0},{geom:f.data.geom,id:f.data.id,...c.value,...a(m),data:f.data},{class:"w-full"}),null,16)):e.renderSlot(f.$slots,"default",{key:3})],2))),128))])):e.createCommentVNode("",!0)],64))],2))}}),rp={class:"grid grid-cols-12 gap-[20px]"},ip={key:0,class:"col-span-4"},lp=["innerHTML"],ap=["onClick"],cp=["innerHTML"],dp={key:1,class:"flex w-full"},pp={class:"flex flex-col w-56 border-r border-gray-200 bg-gray-50 relative"},fp=["onClick"],mp={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 transition-all duration-300"},up={class:"flex-1 p-4"},hp=["innerHTML"],gp={class:"grid grid-cols-12 gap-4"},yp={key:3,class:"w-full h-full"},pt=e.defineComponent({__name:"Card",props:{panels:{default:()=>[]},data:{default:()=>({})},view:{default:"plain"},styling:{},classWrapper:{default:""},classPanel:{},normalizeTabs:{type:Boolean,default:!0},backgroundClass:{},tabContentWrapperClass:{},tabPanelClass:{},id:{},className:{},style:{}},setup(t){const n=t;function s(){const y=typeof window<"u"?window:globalThis,$="__vsCardAnonymousCounter__",b=y[$]??0;return y[$]=b+1,b===0?"tab":`tab${b}`}const o=e.ref(0),r=e.ref([]);let l=!1;const i=e.ref(n.id??s());e.watch(()=>n.id,y=>{y&&(i.value=y)});const a=new Map,c=e.computed(()=>n.view==="tabs"||n.view==="vertical-tabs");e.provide("vsCardTabsContext",c);function f(y,$){const b=$?.path;return b?(a.has(b)||a.set(b,e.defineAsyncComponent(()=>import(b))),a.get(b)):typeof y=="string"&&je[y]?je[y]:$?.component&&je[$.component]?je[$.component]:$?.name&&je[$.name]?je[$.name]:y}function u(y){return y.forEach($=>{$.type&&($.view=$.type)}),r.value=y.filter($=>$.type==="pin"),y.filter($=>$.type!=="pin")}const m=e.computed(()=>{let y;return n.panels&&n.panels.length>0?y=n.normalizeTabs?u(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(y=n.data.filter(b=>b.type.includes("tabs"))[0]?.items),Ht(y,12)}),h=e.computed(()=>i.value),v=e.computed(()=>{let y;return n.panels&&n.panels.length>0?y=n.normalizeTabs?u(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(y=n.data),Ht(y,12)}),x=e.computed(()=>({[`view-${n.view}`]:!0}));function _(y,$){if(!y||typeof $!="string"||!$)return{found:!1,value:void 0};const b=$.split(".");let D=y;for(const J of b){if(D==null||typeof D!="object"&&!Array.isArray(D))return{found:!1,value:void 0};if(!(J in D))return{found:!1,value:void 0};D=D[J]}return{found:!0,value:D}}const N=y=>{const $={...y};return Object.entries($).forEach(([b,D])=>{if(b!=="props"&&typeof D=="string"){const J=_(n.data,D);J.found&&($[b]=J.value)}}),y.props&&typeof y.props=="object"&&Object.entries(y.props).forEach(([b,D])=>{if(typeof D=="string"){const J=_(n.data,D);$[b]=J.found?J.value:D}else $[b]=D}),delete $.props,n.data&&($.data=n.data),$};function C(y){const $=["col-span-12"],b=Eo(y.col);return b.length&&$.push(...b),$}const I=e.ref([]),B=e.ref([]),T=e.ref([]);function S(y,$){y&&y instanceof HTMLElement&&(I.value[$]=y)}function W(){B.value=I.value.map(y=>y.offsetWidth),T.value=I.value.map(y=>y.offsetLeft)}function ee(){if(typeof window>"u")return null;const y=h.value;if(!y)return null;const b=new URL(window.location.href).searchParams.get(y);if(b===null)return null;const D=Number.parseInt(b,10);return Number.isNaN(D)?null:D}function O(y){if(typeof window>"u")return;const $=h.value;if(!$)return;const b=new URL(window.location.href);y<=0?b.searchParams.delete($):b.searchParams.set($,String(y));const D=window.history.state??{};window.history.replaceState(D,document.title,b)}function A(){if(l)return;const y=ee();if(y===null||!m.value.length)return;const $=Math.min(Math.max(y,0),m.value.length-1);$!==y&&O($),$!==o.value&&(o.value=$),l=!0}function z(){l=!1,A()}let R=null;return e.onMounted(()=>{e.nextTick(()=>{A(),W()}),typeof window<"u"&&window.addEventListener("popstate",z),R=new ResizeObserver(()=>W()),R.observe(document.body)}),e.onBeforeUnmount(()=>{R?.disconnect(),typeof window<"u"&&window.removeEventListener("popstate",z)}),e.watch(o,y=>{e.nextTick(()=>{W()}),O(y)}),e.watch(m,()=>{l=!1,A()}),(y,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(y.classWrapper||x.value)},[e.createElementVNode("div",rp,[r.value.length!==0?(e.openBlock(),e.createElementBlock("div",ip,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value[0].items,(b,D)=>(e.openBlock(),e.createElementBlock("div",{key:b.name||D,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 m-1 mb-3"},[b.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:b.html,class:"text-gray-900 leading-relaxed"},null,8,lp)):b.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(b.component,b)),e.mergeProps({key:1,ref_for:!0},b.component==="Card"?b:N(b),{id:y.data.id,class:["w-full h-full",y.styling?.classItem]}),null,16,["id","class"])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.value.length!==0?"col-span-8":"col-span-12")},[y.view==="tabs"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["overflow-hidden w-full",y.styling?.classTabWrapper])},[e.createElementVNode("div",{class:e.normalizeClass(["flex border-b border-gray-200 bg-gray-50 relative gap-4 my-6",y.styling?.classTabHeader])},[B.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute bottom-0 h-[2px] bg-blue-600 transition-all duration-300",style:e.normalizeStyle({width:B.value[o.value]+"px",left:T.value[o.value]+"px"})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(b,D)=>(e.openBlock(),e.createElementBlock("button",{key:b.name||D,ref_for:!0,ref:J=>S(J,D),onClick:J=>o.value=D,class:e.normalizeClass(["px-1 py-2 text-sm font-medium transition-colors",o.value===D?"text-blue-600 border-blue-600 border-b-2 ":"text-gray-600 hover:text-gray-800"])},e.toDisplayString(b.title||b.label||b.name||`Tab ${D+1}`),11,ap))),128))],2),e.createElementVNode("div",{class:e.normalizeClass([y.styling?.classTabContent,"p-1"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(b,D)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:b.name||D,class:e.normalizeClass(["transition-all duration-300 ease-in-out",o.value===D?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",y.classPanel||"w-full border-gray-100"])},[b.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:b.html,class:"text-gray-900 leading-relaxed"},null,8,cp)):y.$slots[`tab-${D}`]?e.renderSlot(y.$slots,`tab-${D}`,{key:1,item:b,data:y.data}):b.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(dt),e.mergeProps({key:2,ref_for:!0},N(b),{items:b.items,"hide-title":!0,class:["w-full h-full",y.styling?.classItem],styling:y.styling}),null,16,["items","class","styling"])):b.component||b.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(b.component||b.name,b)),e.mergeProps({key:3,ref_for:!0},b.component==="Card"?b:N(b),{styling:y.styling,id:y.data.id,class:["w-full h-full",y.styling?.classItem]}),null,16,["styling","id","class"])):e.renderSlot(y.$slots,b.slot||`tab-${D}`,{key:4,item:b,data:y.data})],2)),[[e.vShow,o.value===D]])),128))],2)],2)):y.view==="vertical-tabs"?(e.openBlock(),e.createElementBlock("div",dp,[e.createElementVNode("div",pp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(b,D)=>(e.openBlock(),e.createElementBlock("button",{key:b.name||D,onClick:J=>o.value=D,class:e.normalizeClass(["relative px-1 py-4 text-sm font-medium text-left transition-colors duration-300",o.value===D?"text-blue-600 bg-white":"text-gray-600 hover:text-gray-800 hover:bg-gray-100"])},[e.createTextVNode(e.toDisplayString(b.title||b.label||b.name||`Tab ${D+1}`)+" ",1),o.value===D?(e.openBlock(),e.createElementBlock("span",mp,$[0]||($[0]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"remixicon text-blue-600 rounded-full bg-white shadow scale-90 opacity-100 transition ease-out"},[e.createElementVNode("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})],-1)]))):e.createCommentVNode("",!0)],10,fp))),128))]),e.createElementVNode("div",up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(b,D)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:b.name||D,class:e.normalizeClass(["transition-all duration-300 ease-in-out",o.value===D?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",y.classPanel||"w-full border-gray-100 py-2"])},[b.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:b.html,class:"text-gray-900 leading-relaxed"},null,8,hp)):y.$slots[`tab-${D}`]?e.renderSlot(y.$slots,`tab-${D}`,{key:1,item:b,data:y.data}):b.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(dt),e.mergeProps({key:2,ref_for:!0},N(b),{items:b.items,"hide-title":!0,class:["w-full h-full",y.styling?.classItem],styling:y.styling}),null,16,["items","class","styling"])):b.component||b.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(b.component||b.name,b)),e.mergeProps({key:3,ref_for:!0},b.component==="Card"?b:N(b),{id:y.data.id,class:["w-full h-full",y.styling?.classItem]}),null,16,["id","class"])):e.renderSlot(y.$slots,b.slot||`tab-${D}`,{key:4,item:b,data:y.data})],2)),[[e.vShow,o.value===D]])),128))])])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(y.styling?.classPlain||"p-1 w-full")},[e.createElementVNode("div",gp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(b,D)=>(e.openBlock(),e.createElementBlock("div",{key:b.name||b.component||D,class:e.normalizeClass(C(b))},[y.$slots[`panel-${D}`]?e.renderSlot(y.$slots,`panel-${D}`,{key:0,item:b,data:y.data}):b.items||b.html?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(dt),e.mergeProps({key:1,ref_for:!0},N(b),{items:b.items||[],class:["w-full h-full",y.styling?.classItem],styling:y.styling}),null,16,["items","class","styling"])):b.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(b.component,b)),e.mergeProps({key:2,ref_for:!0},N(b),{class:["w-full h-full",[y.styling?.classItem]],styling:y.styling}),null,16,["class","styling"])):(e.openBlock(),e.createElementBlock("div",yp,[e.renderSlot(y.$slots,b.slot||`panel-${D}`,{item:b,data:y.data})]))],2))),128))])],2))],2)])],2))}}),vp=["onClick"],No=Ie(e.defineComponent({__name:"CopyNotification",setup(t,{expose:n}){const s=e.ref([]);let o=1;const r=()=>{if(s.value.length>=10){const a=s.value[0];clearTimeout(a.timer),s.value.shift()}const i={id:o++,timer:setTimeout(()=>{l(i.id)},1500)};s.value.push(i)},l=i=>{const a=s.value.findIndex(c=>c.id===i);if(a!==-1){const c=s.value[a];clearTimeout(c.timer),s.value.splice(a,1)}};return n({addNotification:r}),e.onUnmounted(()=>{s.value.forEach(i=>{clearTimeout(i.timer)})}),(i,a)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.TransitionGroup,{name:"notification",tag:"div",class:"fixed top-4 right-4 z-50 space-y-2"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id,class:"bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"},[e.createVNode(e.unref(Lo),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),a[0]||(a[0]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("p",{class:"font-medium text-sm"},"Ссылка скопирована!"),e.createElementVNode("p",{class:"text-xs text-green-100 opacity-90"},"Файл добавлен в буфер обмена")],-1)),e.createElementVNode("button",{onClick:f=>l(c.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(tn),{class:"h-4 w-4"})],8,vp)]))),128))]),_:1})]))}}),[["__scopeId","data-v-d1ac6329"]]);pt.install=function(t){t.component("vs-widget-file",vt),t.component("vs-widget-comments",gt),t.component("vs-widget-history",yt),t.component("vs-widget-gallery",bt),t.component("vs-widget-map",kt),t.component("vs-group-interface",jt),t.component("CommentsWidget",gt),t.component("HistoryWidget",yt),t.component("GalleryWidget",bt),t.component("FilesWidget",vt),t.component("MapWidget",kt),t.component("Card",pt),t.component("CardItem",dt),t.component("DescriptionListWidget",sn),t.component("CopyNotification",No),t.component("GroupInterfaceWidget",jt)},te.Card=pt,te.CardItem=dt,te.CommentsWidget=gt,te.CopyNotification=No,te.DescriptionListWidget=sn,te.FilesWidget=vt,te.GalleryWidget=bt,te.GroupInterfaceWidget=jt,te.HistoryWidget=yt,te.MapWidget=kt,te.TableWidget=vo,te.default=pt,Object.defineProperties(te,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
151
|
+
**/const ro=Symbol(process.env.NODE_ENV!=="production"?"vModelRadio":""),io=Symbol(process.env.NODE_ENV!=="production"?"vModelCheckbox":""),lo=Symbol(process.env.NODE_ENV!=="production"?"vModelText":""),ao=Symbol(process.env.NODE_ENV!=="production"?"vModelSelect":""),Hn=Symbol(process.env.NODE_ENV!=="production"?"vModelDynamic":""),co=Symbol(process.env.NODE_ENV!=="production"?"vOnModifiersGuard":""),po=Symbol(process.env.NODE_ENV!=="production"?"vOnKeysGuard":""),fo=Symbol(process.env.NODE_ENV!=="production"?"vShow":""),Un=Symbol(process.env.NODE_ENV!=="production"?"Transition":""),mo=Symbol(process.env.NODE_ENV!=="production"?"TransitionGroup":"");Wl({[ro]:"vModelRadio",[io]:"vModelCheckbox",[lo]:"vModelText",[ao]:"vModelSelect",[Hn]:"vModelDynamic",[co]:"withModifiers",[po]:"withKeys",[fo]:"vShow",[Un]:"Transition",[mo]:"TransitionGroup"});let Ye;function Ec(t,n=!1){return Ye||(Ye=document.createElement("div")),n?(Ye.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,Ye.children[0].getAttribute("foo")):(Ye.innerHTML=t,Ye.textContent)}const Nc={parseMode:"html",isVoidTag:Fl,isNativeTag:t=>Ml(t)||Pl(t)||Rl(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:Ec,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return Un;if(t==="TransitionGroup"||t==="transition-group")return mo},getNamespace(t,n,s){let o=n?n.ns:s;if(n&&o===2)if(n.tag==="annotation-xml"){if(t==="svg")return 1;n.props.some(r=>r.type===6&&r.name==="encoding"&&r.value!=null&&(r.value.content==="text/html"||r.value.content==="application/xhtml+xml"))&&(o=0)}else/^m(?:[ions]|text)$/.test(n.tag)&&t!=="mglyph"&&t!=="malignmark"&&(o=0);else n&&o===1&&(n.tag==="foreignObject"||n.tag==="desc"||n.tag==="title")&&(o=0);if(o===0){if(t==="svg")return 1;if(t==="math")return 2}return o}},wc=t=>{t.type===1&&t.props.forEach((n,s)=>{n.type===6&&n.name==="style"&&n.value&&(t.props[s]={type:7,name:"bind",arg:R("style",!0,n.loc),exp:xc(n.value.content,n.loc),modifiers:[],loc:n.loc})})},xc=(t,n)=>{const s=Dl(t);return R(JSON.stringify(s),!1,n,3)};function ve(t,n){return G(t,n,process.env.NODE_ENV!=="production"?_c:void 0)}const _c={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},Cc=(t,n,s)=>{const{exp:o,loc:r}=t;return o||s.onError(ve(53,r)),n.children.length&&(s.onError(ve(54,r)),n.children.length=0),{props:[Q(R("innerHTML",!0,r),o||R("",!0))]}},Sc=(t,n,s)=>{const{exp:o,loc:r}=t;return o||s.onError(ve(55,r)),n.children.length&&(s.onError(ve(56,r)),n.children.length=0),{props:[Q(R("textContent",!0),o?he(o,s)>0?o:ne(s.helperString(St),[o],r):R("",!0))]}},Bc=(t,n,s)=>{const o=no(t,n,s);if(!o.props.length||n.tagType===1)return o;t.arg&&s.onError(ve(58,t.arg.loc));function r(){const a=de(n,"bind");a&&Oe(a.arg,"value")&&s.onError(ve(60,a.loc))}const{tag:l}=n,i=s.isCustomElement(l);if(l==="input"||l==="textarea"||l==="select"||i){let a=lo,c=!1;if(l==="input"||i){const f=at(n,"type");if(f){if(f.type===7)a=Hn;else if(f.value)switch(f.value.content){case"radio":a=ro;break;case"checkbox":a=io;break;case"file":c=!0,s.onError(ve(59,t.loc));break;default:process.env.NODE_ENV!=="production"&&r();break}}else oa(n)?a=Hn:process.env.NODE_ENV!=="production"&&r()}else l==="select"?a=ao:process.env.NODE_ENV!=="production"&&r();c||(o.needRuntime=s.helper(a))}else s.onError(ve(57,t.loc));return o.props=o.props.filter(a=>!(a.key.type===4&&a.key.content==="modelValue")),o},Tc=Ne("passive,once,capture"),$c=Ne("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Dc=Ne("left,right"),uo=Ne("onkeyup,onkeydown,onkeypress"),Oc=(t,n,s,o)=>{const r=[],l=[],i=[];for(let a=0;a<n.length;a++){const c=n[a].content;c==="native"&&Ze("COMPILER_V_ON_NATIVE",s,o)||Tc(c)?i.push(c):Dc(c)?ce(t)?uo(t.content.toLowerCase())?r.push(c):l.push(c):(r.push(c),l.push(c)):$c(c)?l.push(c):r.push(c)}return{keyModifiers:r,nonKeyModifiers:l,eventOptionModifiers:i}},ho=(t,n)=>ce(t)&&t.content.toLowerCase()==="onclick"?R(n,!0):t.type!==4?ye(["(",t,`) === "onClick" ? "${n}" : (`,t,")"]):t,Ac=(t,n,s)=>eo(t,n,s,o=>{const{modifiers:r}=t;if(!r.length)return o;let{key:l,value:i}=o.props[0];const{keyModifiers:a,nonKeyModifiers:c,eventOptionModifiers:f}=Oc(l,r,s,t.loc);if(c.includes("right")&&(l=ho(l,"onContextmenu")),c.includes("middle")&&(l=ho(l,"onMouseup")),c.length&&(i=ne(s.helper(co),[i,JSON.stringify(c)])),a.length&&(!ce(l)||uo(l.content.toLowerCase()))&&(i=ne(s.helper(po),[i,JSON.stringify(a)])),f.length){const u=f.map(cn).join("");l=ce(l)?R(`${l.content}${u}`,!0):ye(["(",l,`) + "${u}"`])}return{props:[Q(l,i)]}}),Lc=(t,n,s)=>{const{exp:o,loc:r}=t;return o||s.onError(ve(61,r)),{props:[],needRuntime:s.helper(fo)}},Ic=(t,n)=>{if(t.type===1&&t.tagType===1&&n.isBuiltInComponent(t.tag)===Un)return()=>{if(!t.children.length)return;go(t)&&n.onError(ve(62,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}));const o=t.children[0];if(o.type===1)for(const r of o.props)r.type===7&&r.name==="show"&&t.props.push({type:6,name:"persisted",nameLoc:t.loc,value:void 0,loc:t.loc})}};function go(t){const n=t.children=t.children.filter(o=>o.type!==3&&!(o.type===2&&!o.content.trim())),s=n[0];return n.length!==1||s.type===11||s.type===9&&s.branches.some(go)}const Mc=(t,n)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&(process.env.NODE_ENV!=="production"&&n.onError(ve(63,t.loc)),n.removeNode())};function Pc(t,n){return t==="template"?!0:t in yo?yo[t].has(n):n in vo?vo[n].has(t):!(t in bo&&bo[t].has(n)||n in ko&&ko[n].has(t))}const Xe=new Set(["h1","h2","h3","h4","h5","h6"]),He=new Set([]),yo={head:new Set(["base","basefront","bgsound","link","meta","title","noscript","noframes","style","script","template"]),optgroup:new Set(["option"]),select:new Set(["optgroup","option","hr"]),table:new Set(["caption","colgroup","tbody","tfoot","thead"]),tr:new Set(["td","th"]),colgroup:new Set(["col"]),tbody:new Set(["tr"]),thead:new Set(["tr"]),tfoot:new Set(["tr"]),script:He,iframe:He,option:He,textarea:He,style:He,title:He},vo={html:He,body:new Set(["html"]),head:new Set(["html"]),td:new Set(["tr"]),colgroup:new Set(["table"]),caption:new Set(["table"]),tbody:new Set(["table"]),tfoot:new Set(["table"]),col:new Set(["colgroup"]),th:new Set(["tr"]),thead:new Set(["table"]),tr:new Set(["tbody","thead","tfoot"]),dd:new Set(["dl","div"]),dt:new Set(["dl","div"]),figcaption:new Set(["figure"]),summary:new Set(["details"]),area:new Set(["map"])},bo={p:new Set(["address","article","aside","blockquote","center","details","dialog","dir","div","dl","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","menu","ol","p","pre","section","table","ul"]),svg:new Set(["b","blockquote","br","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","hr","i","img","li","menu","meta","ol","p","pre","ruby","s","small","span","strong","sub","sup","table","u","ul","var"])},ko={a:new Set(["a"]),button:new Set(["button"]),dd:new Set(["dd","dt"]),dt:new Set(["dd","dt"]),form:new Set(["form"]),li:new Set(["li"]),h1:Xe,h2:Xe,h3:Xe,h4:Xe,h5:Xe,h6:Xe},Rc=(t,n)=>{if(t.type===1&&t.tagType===0&&n.parent&&n.parent.type===1&&n.parent.tagType===0&&!Pc(n.parent.tag,t.tag)){const s=new SyntaxError(`<${t.tag}> cannot be child of <${n.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`);s.loc=t.loc,n.onWarn(s)}},Fc=[wc,...process.env.NODE_ENV!=="production"?[Ic,Rc]:[]],jc={cloak:kc,html:Cc,text:Sc,model:Bc,on:Ac,show:Lc};function zc(t,n={}){return bc(t,Be({},Nc,n,{nodeTransforms:[Mc,...Fc,...n.nodeTransforms||[]],directiveTransforms:Be({},jc,n.directiveTransforms||{}),transformHoist:null}))}function Hc(t,n={}){const s=t.trim().startsWith("<")?t:`<span>${t}</span>`,{code:o}=zc(s,{mode:"function"}),r=new Function("Vue",`${o}; return render;`)(Bo);return e.defineComponent({name:"DynamicFromString",props:n.props??{},emits:n.emits??[],setup(){return n.setup?.()??{}},render:r})}const qn={};function Uc(t){return qn[t]||(qn[t]=Hc(t,{props:{row:{type:Object,default:void 0},value:{type:null,default:void 0},data:{type:Object,default:void 0},column:{type:Object,default:void 0}}})),qn[t]}const qc={class:"mt-4 flex flex-wrap items-center justify-between gap-3 text-sm text-gray-600"},Wc={class:"flex items-center gap-2"},Kc=["disabled"],Gc={class:"text-sm"},Jc=["disabled"],Zc=e.defineComponent({__name:"TablePagination",props:{currentPage:{},totalPages:{},label:{}},setup(t){const n=t,s=e.computed(()=>n.currentPage<=1),o=e.computed(()=>n.currentPage>=n.totalPages);return(r,l)=>(e.openBlock(),e.createElementBlock("div",qc,[e.createElementVNode("div",null,e.toDisplayString(r.label),1),e.createElementVNode("div",Wc,[e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:s.value,onClick:l[0]||(l[0]=i=>r.$emit("previous"))}," Назад ",8,Kc),e.createElementVNode("span",Gc,"Сторінка "+e.toDisplayString(r.currentPage)+" з "+e.toDisplayString(r.totalPages),1),e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:o.value,onClick:l[1]||(l[1]=i=>r.$emit("next"))}," Далі ",8,Jc)])]))}}),Yc={class:"relative inline-flex"},Xc=["aria-label"],Qc={class:"px-3 pb-2"},Vc={class:"px-3 pb-3 max-h-64 overflow-y-auto"},ed=["onClick"],td={class:"truncate"},nd={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},sd="inline-flex items-center justify-center size-8 rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",od=e.defineComponent({__name:"TableColumnSettings",props:{columns:{}},emits:["update:columns"],setup(t,{emit:n}){const s=t,o=n,r=e.useAttrs(),l=e.ref(!1),i=e.ref(""),a=e.ref([...s.columns]),c=e.ref(null),f=e.ref(null),u=e.ref(null),m=e.ref({top:0,left:0}),h=e.computed(()=>{if(!i.value)return a.value;const B=i.value.toLowerCase();return a.value.filter($=>v($).toLowerCase().includes(B))});e.watch(()=>s.columns,B=>{if(!B){a.value=[];return}const $=JSON.stringify(B),S=JSON.stringify(a.value);$!==S&&(a.value=[...B])},{deep:!0}),e.watch(a,B=>{o("update:columns",B)},{deep:!0});function v(B){return B.ua||B.label||B.name||"Колонка"}function x(B){const $=!B.hidden;$&&a.value.filter(S=>!S.hidden).length<=1||(B.hidden=$)}function _(){l.value=!l.value,l.value&&e.nextTick(()=>{u.value?.focus(),N()})}function N(){if(!c.value)return;const B=c.value.getBoundingClientRect();m.value={top:B.bottom+window.scrollY+6,left:B.left+window.scrollX-200}}function C(B){if(!l.value)return;const $=B.target;$&&(f.value?.contains($)||c.value?.contains($)||(l.value=!1))}function A(B){B.key==="Escape"&&(l.value=!1)}return e.onMounted(()=>{document.addEventListener("click",C,!0),document.addEventListener("keydown",A)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",C,!0),document.removeEventListener("keydown",A)}),(B,$)=>(e.openBlock(),e.createElementBlock("div",Yc,[e.createElementVNode("button",{ref_key:"buttonRef",ref:c,type:"button",onClick:_,class:e.normalizeClass([sd,e.unref(r).class]),"aria-label":e.unref(r)["aria-label"]??"Налаштування колонок",title:"Налаштування колонок"},$[2]||($[2]=[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="icon icon-tabler icons-tabler-outline icon-tabler-columns" height="18" width="18" aria-hidden="true"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6h5.5"></path><path d="M4 10h5.5"></path><path d="M4 14h5.5"></path><path d="M4 18h5.5"></path><path d="M14.5 6h5.5"></path><path d="M14.5 10h5.5"></path><path d="M14.5 14h5.5"></path><path d="M14.5 18h5.5"></path></svg>',1)]),10,Xc),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:f,class:"fixed z-50 w-64 bg-white rounded-xl shadow-lg border border-gray-200 dark:bg-neutral-900 dark:border-neutral-700",style:e.normalizeStyle({top:`${m.value.top}px`,left:`${m.value.left}px`})},[$[5]||($[5]=e.createElementVNode("div",{class:"flex items-center justify-between h-12 px-4 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Налаштування колонок ",-1)),e.createElementVNode("div",Qc,[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:u,"onUpdate:modelValue":$[0]||($[0]=S=>i.value=S),type:"text",class:"w-full rounded-md border border-gray-200 px-3 py-2 text-sm text-gray-800 placeholder:text-gray-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200",placeholder:"Пошук колонок"},null,512),[[e.vModelText,i.value]])]),e.createElementVNode("div",Vc,[$[4]||($[4]=e.createElementVNode("p",{class:"px-1 pb-2 text-xs text-gray-500 uppercase tracking-wide"},"Виберіть колонки",-1)),e.createElementVNode("ul",{class:"space-y-1",onClick:$[1]||($[1]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,S=>(e.openBlock(),e.createElementBlock("li",{key:S.name,class:"flex items-center justify-between rounded-lg px-3 py-2 text-sm text-gray-800 hover:bg-gray-100 dark:text-neutral-200 dark:hover:bg-neutral-800 cursor-pointer",onClick:q=>x(S)},[e.createElementVNode("span",td,e.toDisplayString(v(S)),1),e.createElementVNode("span",{class:e.normalizeClass(["flex items-center justify-center size-4 rounded border border-gray-300 text-white",S.hidden?"bg-white text-transparent":"bg-blue-600 border-blue-600"])},[S.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",nd,$[3]||($[3]=[e.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])))],2)],8,ed))),128))])])],4)):e.createCommentVNode("",!0)]))]))}}),rd={class:"flex flex-col gap-4 mb-[15px]"},id={class:"flex flex-wrap items-center gap-4"},ld={class:"relative"},ad={class:"ml-auto flex items-center gap-2"},cd={class:"overflow-x-auto"},dd={class:"min-w-full relative divide-y-2 divide-gray-200 bg-white min-w-full overflow-auto divide-y-2 divide-gray-200 bg-white text-[12px] text-gray-600"},pd={class:"text-left font-medium text-gray-700"},fd={key:0,class:"py-2 pr-4 min-w-[80px] max-w-[120px] text-right"},md={class:"divide-y divide-gray-200"},ud=["href"],hd={key:2},gd={key:3},yd={key:0,class:"py-2 pr-4 text-right"},vd=["data-action-key"],bd=["onClick"],kd=["onClick"],Ed={key:0,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"},Nd={key:1,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"},wd={key:2,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"},xd={key:3,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"},_d={key:0},Cd=["colspan"],Eo=e.defineComponent({__name:"TableWidget",props:{name:{},label:{},component:{},path:{},slot:{},col:{},width:{},html:{},title:{},type:{},token:{},count:{},props:{},items:{}},setup(t){const n=e.getCurrentInstance(),s=e.ref([]),o=e.ref([]),r=new Map,l=t,i=e.ref([]),a=e.ref(""),c=e.ref(""),f=e.ref(""),u=e.ref(1),m=e.ref(10),h=e.ref(0),v=e.ref(0),x=e.ref("id"),_=e.ref("");let N=null,C=0;const A=e.ref(null);async function B(){const E=u.value,w=++C,p=new URLSearchParams,d=f.value.trim();d&&p.set("search",d),p.set("page",String(E)),p.set("limit",String(m.value));const k=`/api/data/${l.token}${p.toString()?`?${p.toString()}`:""}`;let g;try{const H=await fetch(k);if(!H.ok)throw new Error(`Request failed with status ${H.status}`);g=await H.json()}catch(H){w===C&&(s.value=[],v.value=0,h.value=0),console.error("Failed to load table data",H);return}if(w!==C)return;s.value=Array.isArray(g?.rows)?g.rows:[],o.value=y(g?.columns||[]),i.value=Array.isArray(g?.actions)?g.actions:[],a.value=g?.form,c.value=g?.addToken,x.value=typeof g?.pk=="string"&&g.pk?g.pk:x.value,typeof g?.form=="string"&&g.form&&(_.value=g.form.replace(/\.form$/,".table")),Ee();const O=Number(g?.total??g?.count??g?.totalCount),M=Number(g?.filtered??g?.filteredCount);h.value=Number.isFinite(O)&&O>0?O:s.value.length,v.value=Number.isFinite(M)&&M>0?M:Math.max(s.value.length,h.value);const j=Math.max(1,Math.ceil((v.value||s.value.length||1)/m.value));let P=E;typeof g?.page=="number"&&g.page>0&&(P=g.page),P>j&&(P=j),P<1&&(P=1);const K=P!==E;if(u.value=P,K&&v.value>0)return B()}const{$notify:$,$confirm:S,$form:q}=n?.appContext?.config?.globalProperties||{};function V(){if(et.emitter?.emit){et.emitter.emit("updateCard");return}if(typeof window<"u"&&typeof window.location?.reload=="function"){window.location.reload();return}B()}async function I(E){typeof q=="function"&&(await q({token:E.token}),V())}async function L(){typeof q=="function"&&(await q({token:c.value}),V())}function z(E){S({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const w=await fetch(`/api/table/${E.token}`,{method:"DELETE"});if(!w.ok){const{error:p}=await w.json();$({title:"Помилка",type:"warning",message:p});return}$({title:"Видаленно",message:"Успішно видалено"}),await B()}})}e.onMounted(async()=>{await B(),et.emitter?.on?.("updateCard",B)});function F(E){return typeof E?.format=="string"?E.format.toLowerCase():""}function y(E){const w=new Map;o.value.forEach(d=>{d?.name&&w.set(d.name,!!d.hidden)});const p=E.map(d=>{const k=w.has(d.name)?w.get(d.name):!!d.hidden;return{...d,hidden:k}});return p.length&&!p.some(d=>!d.hidden)&&(p[0].hidden=!1),p}const T=e.computed(()=>{const E=o.value.filter(w=>!w.hidden);return E.length?E:o.value}),b=e.computed(()=>{const E=[],w=new Set;for(const p of i.value){if(typeof p=="string"){if(p==="view"){const d="row:view";w.has(d)||(E.push({key:d,type:"view",label:"Переглянути",scope:"row",handler:Qn}),w.add(d));continue}if(p==="edit"){const d="row:edit";w.has(d)||(E.push({key:d,type:"edit",label:"Редагувати",scope:"row",handler:Yn}),w.add(d));continue}if(p==="delete"||p==="del"){const d="row:delete";w.has(d)||(E.push({key:d,type:"delete",label:"Видалити",scope:"row",handler:Xn,variant:"danger"}),w.add(d));continue}if(p==="add"){const d="toolbar:add";w.has(d)||(E.push({key:d,type:"add",label:"Додати",scope:"toolbar"}),w.add(d))}continue}if(p&&typeof p=="object"){const d=String(p.name??p.type??"action"),k=String(p.label??p.title??d),g=p.scope==="toolbar"?"toolbar":"row",O=`${g}:${d}`;if(w.has(O))continue;w.add(O),E.push({key:O,type:d,label:k,scope:g,handler:g==="row"?M=>Ve(p,M):void 0,variant:p.variant==="danger"?"danger":"default",original:p})}}return E}),D=e.computed(()=>b.value.filter(E=>E.scope==="row"&&typeof E.handler=="function")),Z=e.computed(()=>b.value.filter(E=>E.scope==="toolbar")),ae=e.computed(()=>D.value.length>0),Le=e.computed(()=>Z.value.some(E=>E.type==="add")),Ce=e.computed(()=>s.value),be=e.computed(()=>{const E=v.value||Ce.value.length,w=Math.ceil(E/m.value);return w>0?w:1}),ke=e.computed(()=>{const E=Ce.value.length,w=v.value||E,p=h.value||w;return`Показано ${E} з ${w} (усього ${p})`});function Se(){u.value<be.value&&(u.value+=1,B())}function Wn(){u.value>1&&(u.value-=1,B())}e.watch(o,E=>{E?.length&&(E.some(w=>!w.hidden)||(E[0].hidden=!1))},{deep:!0});function Kn(){N&&clearTimeout(N),Ee(),N=setTimeout(()=>{u.value=1,B()},300)}function Ie(E){const w=x.value||"id",p=E?.token??E?.[w]??E?.id;return p?String(p):""}function Gt(E){const w=T.value[E],p=["py-2",...ut(w)];E===0&&p.push("pl-4");const d=E===T.value.length-1&&!ae.value;return p.push(d?"pr-4":"pr-5"),p.join(" ")}function Qe(E,w){const p=["py-2",...ut(w)];F(w)==="badge"&&p.push("center"),E===0&&p.push("pl-4");const d=E===T.value.length-1&&!ae.value;return p.push(d?"pr-4":"pr-5"),p.join(" ")}function ut(E){const w=[],p=O=>{if(O==null||O==="")return;const M=Number(O);return Number.isFinite(M)&&M>0?`${M}px`:String(O).replace(/\s+/g,"")},d=p(E?.width),k=p(E?.minWidth),g=p(E?.maxWidth);return d?(w.push(`min-w-[${d}]`,`max-w-[${d}]`),w):(w.push(`min-w-[${k??"100px"}]`),w.push(`max-w-[${g??"350px"}]`),w)}function Jt(E){if(!D.value.length)return!1;const w=x.value||"id";return!!(E?.token||E?.[w]||E?.id)}function Gn(E){return A.value===Ie(E)}function Jn(E){const w=Ie(E);w&&(A.value=A.value===w?null:w)}function Zn(E,w){const p=Ie(E);if(p){if(w){r.set(p,w);return}r.delete(p)}}function Zt(E){const w=Ie(E),p=r.get(w);if(!p)return{};const d=p.getBoundingClientRect();return{top:`${d.bottom+window.scrollY+8}px`,left:`${d.right+window.scrollX-200}px`,width:"auto"}}function Ee(){A.value=null}function Yn(E){Ee(),I(E)}function Xn(E){Ee(),z(E)}async function Ve(E,w){Ee();const p=x.value||"id",d=E.isId?w?.[p]??w?.id:w?.token??w?.[p]??w?.id;if(!d){console.warn("Cannot execute action without identifier",E);return}if(E.form&&typeof q=="function"){const k=await gt(E.form,d),g={form:E.form,token:k?.token??w?.token??d,schema:k?.schema,mode:k?.mode??"edit"};console.log("formConfig",k),k?.data!==void 0&&(g.defaultValue=k.data);try{await q(g),V()}catch(O){console.error("Failed to execute form action",O)}return}if(typeof E.api=="string"&&E.api){const k=ht(E.api,d);window.location.href=k;return}w?.token&&typeof q=="function"&&(await q({token:w.token}),V())}function ht(E,w){return`${E.endsWith("/")?E:`${E}/`}${w}`}async function gt(E,w){const p=`/api/form/${E}/${w}`;try{const d=await fetch(p);if(!d.ok)throw new Error(`Request failed with status ${d.status}`);return await d.json()}catch(d){console.error("Failed to load form config",d),typeof $=="function"&&$({title:"Помилка",type:"warning",message:"Не вдалося отримати дані форми."});return}}function Qn(E){Ee();const w=_.value||(a.value?String(a.value).replace(/\.form$/,".table"):""),p=x.value||"id",d=E?.[p]??E?.id??E?.token;if(w&&d){const k=`/card/${w}/${d}`;window.location.href=k;return}if(E?.token&&typeof q=="function"){q({token:E.token,readonly:!0,mode:"view"});return}E?.token&&I(E)}function Yt(E){if(!A.value)return;const w=E.target;if(!w)return;const p=w.closest("[data-action-key]");p&&p.getAttribute("data-action-key")===A.value||Ee()}e.onMounted(()=>{document.addEventListener("click",Yt,!0)}),e.onBeforeUnmount(()=>{N&&clearTimeout(N),document.removeEventListener("click",Yt,!0),et.emitter?.off?.("updateCard",B)});function yt(E,w){const d=E?.[`${w.name}_text`];if(Array.isArray(d))return d.length?d.join(", "):"-";if(d!=null&&d!=="")return d;const k=E?.[w.name];return Array.isArray(k)?k.length?k.join(", "):"-":k??"-"}function vt(E,w){const d=E?.[`${w.name}_data`];if(d&&typeof d=="object")return{text:d.text??d.label??d.name??d.title??"-",color:d.color,textColor:d.textColor};const k=E?.[`${w.name}_text`]??E?.[w.name];return{text:(Array.isArray(k)?k.join(", "):k)??"-"}}function Vn(E,w){const p=vt(E,w);return p.color?{backgroundColor:p.color,color:p.textColor??"#ffffff"}:{}}function Xt(E,w){const p=F(w);if(p==="badge")return vt(E,w).text;if(p==="select")return yt(E,w);if(p==="slot")return"-";if(p==="text")return E?.[w.name]??"-";const d=E?.[`${w.name}_data`];return d!=null&&typeof d!="object"?d:E?.[`${w.name}_text`]??E?.[w.name]??"-"}return(E,w)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",rd,[e.createElementVNode("div",id,[e.createElementVNode("div",ld,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":w[0]||(w[0]=p=>f.value=p),type:"text",class:"w-52 rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Пошук",onInput:Kn},null,544),[[e.vModelText,f.value]])]),e.createElementVNode("div",ad,[e.createVNode(od,{columns:o.value,"onUpdate:columns":w[1]||(w[1]=p=>o.value=p)},null,8,["columns"]),Le.value&&c.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:L,class:"inline-flex size-8 items-center justify-center rounded-lg bg-blue-500 text-white shadow-sm transition-colors hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",title:"Додати запис","aria-label":"Додати запис"},w[3]||(w[3]=[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("path",{d:"M5 12h14"}),e.createElementVNode("path",{d:"M12 5v14"})],-1)]))):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",cd,[e.createElementVNode("table",dd,[e.createElementVNode("thead",pd,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(p,d)=>(e.openBlock(),e.createElementBlock("th",{key:p.name,class:e.normalizeClass(Gt(d))},e.toDisplayString(p.ua),3))),128)),ae.value?(e.openBlock(),e.createElementBlock("th",fd," Дії ")):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",md,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,p=>(e.openBlock(),e.createElementBlock("tr",{class:"bg-white odd:bg-gray-50",key:p.id??JSON.stringify(p)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(d,k)=>(e.openBlock(),e.createElementBlock("td",{key:d.name,class:e.normalizeClass([Qe(k,d),"truncate"])},[d.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:d.link.replace("{{id}}",p.id),class:"font-medium cursor-pointer text-start text-wrap text-cyan-800 decoration-2 focus:outline-none focus:underline hover:text-cyan-700 hover:underline"},e.toDisplayString(Xt(p,d)),9,ud)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[F(d)==="slot"&&d.slot?.content?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Uc)(d.slot.content)),{key:0,data:p,row:p,column:d,value:p?.[d.name]},null,8,["data","row","column","value"])):F(d)==="badge"?(e.openBlock(),e.createElementBlock("span",{key:1,class:"items-center px-2 py-1 rounded-full text-xs font-semibold text-center justify-center flex",style:e.normalizeStyle(Vn(p,d))},e.toDisplayString(vt(p,d).text),5)):F(d)==="select"?(e.openBlock(),e.createElementBlock("span",hd,e.toDisplayString(yt(p,d)),1)):(e.openBlock(),e.createElementBlock("span",gd,e.toDisplayString(Xt(p,d)),1))],64))],2))),128)),ae.value?(e.openBlock(),e.createElementBlock("td",yd,[Jt(p)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative inline-flex","data-action-key":Ie(p),ref_for:!0,ref:d=>Zn(p,d)},[e.createElementVNode("button",{type:"button",class:"inline-flex size-7 items-center justify-center rounded-md border border-gray-200 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",onClick:e.withModifiers(d=>Jn(p),["stop"])},w[4]||(w[4]=[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:"1"}),e.createElementVNode("circle",{cx:"12",cy:"5",r:"1"}),e.createElementVNode("circle",{cx:"12",cy:"19",r:"1"})],-1)]),8,bd),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[Gn(p)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed z-50 w-40 overflow-hidden rounded-lg border border-gray-200 bg-white py-1 shadow-lg",style:e.normalizeStyle(Zt(p)),onClick:w[2]||(w[2]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,d=>(e.openBlock(),e.createElementBlock("button",{key:d.type,type:"button",class:e.normalizeClass(["flex w-full items-center gap-2 px-4 py-2 text-sm transition-colors",d.variant==="danger"?"text-red-600 hover:bg-red-50":"text-gray-700 hover:bg-gray-50"]),onClick:k=>d.handler?.(p)},[d.type==="view"?(e.openBlock(),e.createElementBlock("svg",Ed,w[5]||(w[5]=[e.createElementVNode("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)]))):d.type==="edit"?(e.openBlock(),e.createElementBlock("svg",Nd,w[6]||(w[6]=[e.createElementVNode("path",{d:"M18 2a2.828 2.828 0 1 1 4 4L7 21l-4 1 1-4Z"},null,-1)]))):d.type==="delete"?(e.openBlock(),e.createElementBlock("svg",wd,w[7]||(w[7]=[e.createElementVNode("path",{d:"M3 6h18"},null,-1),e.createElementVNode("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"},null,-1),e.createElementVNode("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"},null,-1),e.createElementVNode("line",{x1:"10",x2:"10",y1:"11",y2:"17"},null,-1),e.createElementVNode("line",{x1:"14",x2:"14",y1:"11",y2:"17"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",xd,w[8]||(w[8]=[e.createElementVNode("path",{d:"M12 8v8"},null,-1),e.createElementVNode("path",{d:"M8 12h8"},null,-1)]))),e.createTextVNode(" "+e.toDisplayString(d.label),1)],10,kd))),128))],4)):e.createCommentVNode("",!0)]))],8,vd)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),128)),Ce.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",_d,[e.createElementVNode("td",{colspan:T.value.length+(ae.value?1:0),class:"py-6 text-center text-gray-500"}," Немає записів для відображення ",8,Cd)]))])])]),e.createVNode(Zc,{"current-page":u.value,"total-pages":be.value,label:ke.value,onPrevious:Wn,onNext:Se},null,8,["current-page","total-pages","label"])]))}}),Sd={class:"p-[20px]"},Bd={class:"flex gap-[6px] mb-5"},Td={class:"vs-form-text relative bg-white rounded-lg flex-grow"},$d={class:"grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5 grid-cols-6"},Dd={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},Od={class:"space-y-8"},Ad={key:0},Ld={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Id=["onClick"],Md={class:"md:col-span-2"},Pd={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Rd={class:"text-sm text-gray-500 dark:text-neutral-500"},Fd={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},jd=["checked","onChange"],zd={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Hd={class:"md:col-span-2"},Ud={class:"font-semibold text-gray-800 dark:text-neutral-200"},qd=["onClick"],Wd={class:"md:col-span-2"},Kd={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Gd={class:"text-sm text-gray-500 dark:text-neutral-500"},Jd={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},Zd=["checked","onChange"],Wt=e.defineComponent({__name:"GroupInterfaceWidget",props:{data:{},id:{}},setup(t){const n=t,s=e.ref(""),o=["view","add","edit","del"],r=e.ref({});e.onMounted(async()=>{const _=await(await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`)).json();_.routes&&_.routes.forEach(N=>{r.value[N.path]=new Set(N.actions)})});const l=(x,_)=>r.value[x]?.has(_)??!1,i=(x,_)=>{r.value[x]||(r.value[x]=new Set),r.value[x].has(_)?r.value[x].delete(_):r.value[x].add(_)},a=(x,_)=>{x.forEach(N=>{N.path&&(r.value[N.path]||(r.value[N.path]=new Set),r.value[N.path].has(_)?r.value[N.path].delete(_):r.value[N.path].add(_))})},c=e.computed(()=>Object.entries(r.value).map(([x,_])=>({path:x,actions:Array.from(_)})).filter(x=>x.actions.length)),f=async()=>{await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({routes:c.value})}),et.notify({title:"Success!",message:"Permissions saved."})},u=()=>{r.value={}},m=x=>{if(!s.value.trim())return x;const _=s.value.toLowerCase();return x.filter(N=>N.ua.toLowerCase().includes(_)||N.path&&N.path.toLowerCase().includes(_))},h=e.computed(()=>m(n.data.routers.filter(x=>!x.menu))),v=e.computed(()=>n.data.routers.filter(x=>x.menu).map(x=>({...x,menu:m(x.menu||[])})).filter(x=>x.menu&&x.menu.length>0));return(x,_)=>(e.openBlock(),e.createElementBlock("div",Sd,[e.createElementVNode("div",Bd,[e.createElementVNode("div",Td,[_[1]||(_[1]=e.createElementVNode("i",{class:"absolute bottom-2/4 translate-y-2/4 text-gray-500 cursor-pointer ti"},null,-1)),e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:"Пошук","onUpdate:modelValue":_[0]||(_[0]=N=>s.value=N),class:"bg-white h-[38px] 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:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,512),[[e.vModelText,s.value]])]),e.createElementVNode("button",{onClick:u,class:"inline-flex items-center px-3 py-2 text-sm font-medium duration-300 bg-white border rounded-lg gap-x-2 hover:bg-gray-100"}," Скинути всі "),e.createElementVNode("button",{onClick:f,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"}," Зберегти ")]),e.createElementVNode("div",$d,[_[2]||(_[2]=e.createElementVNode("div",{class:"self-center col-span-2"},[e.createElementVNode("h2",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Групи")],-1)),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(N,C)=>e.createElementVNode("div",{class:"col-span-1 text-center",key:C},[e.createElementVNode("h3",Dd,e.toDisplayString(N),1)])),64))]),e.createElementVNode("div",Od,[h.value.length?(e.openBlock(),e.createElementBlock("div",Ad,[e.createElementVNode("ul",Ld,[_[3]||(_[3]=e.createElementVNode("li",{class:"md:col-span-2"},[e.createElementVNode("h3",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Без категорії")],-1)),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(N,C)=>e.createElementVNode("li",{key:C,class:"md:block md:col-span-1 md:text-center"},[e.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:A=>a(h.value,o[C])}," Toggle all ",8,Id)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(N,C)=>(e.openBlock(),e.createElementBlock("ul",{key:"uncat-"+C,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",Md,[e.createElementVNode("p",Pd,e.toDisplayString(N.ua),1),e.createElementVNode("p",Rd,e.toDisplayString(N.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(A,B)=>e.createElementVNode("li",{key:B,class:"col-span-1"},[e.createElementVNode("div",Fd,[e.createElementVNode("input",{type:"checkbox",checked:l(N.path,A),onChange:$=>i(N.path,A),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,jd)])])),64))]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(N,C)=>(e.openBlock(),e.createElementBlock("div",{key:C,class:"space-y-5"},[e.createElementVNode("ul",zd,[e.createElementVNode("li",Hd,[e.createElementVNode("h3",Ud,e.toDisplayString(N.ua),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(A,B)=>e.createElementVNode("li",{key:B,class:"md:block md:col-span-1 md:text-center"},[e.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:$=>a(N.menu,o[B])}," Toggle all ",8,qd)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.menu,(A,B)=>(e.openBlock(),e.createElementBlock("ul",{key:B,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",Wd,[e.createElementVNode("p",Kd,e.toDisplayString(A.ua),1),e.createElementVNode("p",Gd,e.toDisplayString(A.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,($,S)=>e.createElementVNode("li",{key:S,class:"col-span-1"},[e.createElementVNode("div",Jd,[e.createElementVNode("input",{type:"checkbox",checked:l(A.path,$),onChange:q=>i(A.path,$),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,Zd)])])),64))]))),128))]))),128))])]))}}),Ue={"vs-widget-map":xt,"vs-widget-comments":kt,"vs-widget-history":Et,"vs-widget-gallery":wt,"vs-widget-file":Nt,"vs-widget-list":sn,"vs-widget-table":Eo,"vs-group-interface":Wt};function No(t){if(t==null)return null;const n=Number(t);return Number.isFinite(n)?Math.max(1,Math.min(12,Math.floor(n))):null}function wo(t){const n={...t};return Array.isArray(t.items)&&(n.items=t.items.map(s=>wo(s))),n}function Yd(t,n=12){if(!t.length)return;const s=[],o=[];t.forEach(c=>{const f=No(c.col);f?(c.col=f,s.push({item:c,span:f})):o.push(c)});const r=s.reduce((c,f)=>c+f.span,0);let l=n-r;if(o.length===0)return;l<=0&&(l=n);const i=Math.max(1,Math.floor(l/o.length));let a=Math.max(0,l-i*o.length);o.forEach(c=>{let f=i;a>0&&(f+=1,a-=1),c.col=Math.max(1,Math.min(12,f))})}function Kt(t,n=12){if(!Array.isArray(t)||!t.length)return[];const s=t.map(o=>wo(o));return s.forEach(o=>{Array.isArray(o.items)&&o.items.length&&(o.items=Kt(o.items,12))}),Yd(s,n),s}function xo(t){const n=No(t);return n?n>=12?["md:col-span-12","lg:col-span-12"]:[`md:col-span-${n}`,`lg:col-span-${n}`]:[]}const Xd={class:"text-lg font-semibold text-gray-900"},Qd=["innerHTML"],Vd={key:0,class:"grid grid-cols-12 gap-4"},ep={key:0,class:"mb-4 pb-2 border-b border-gray-200"},tp={class:"text-lg font-semibold text-gray-900"},np=["innerHTML"],ft=e.defineComponent({__name:"CardItem",props:{items:{},type:{},col:{},data:{},html:{},title:{},hideTitle:{type:Boolean},styling:{},name:{},label:{},component:{},slot:{},id:{},className:{},style:{}},setup(t){const n=t,s=e.computed(()=>{if(!n.col)return{};const f=Math.max(1,Math.min(12,Number(n.col)));return{[`md:col-span-${f}`]:!0,[`lg:col-span-${f}`]:!0}}),o=e.computed(()=>Kt(n.items));function r(f){const u=["col-span-12"],m=xo(f.col);return m.length&&u.push(...m),u}function l(f){return Ue[f]||f}function i(f,u){if(!f||typeof u!="string"||!u)return{found:!1,value:void 0};const m=u.split(".");let h=f;for(const v of m){if(h==null||typeof h!="object"&&!Array.isArray(h))return{found:!1,value:void 0};if(!(v in h))return{found:!1,value:void 0};h=h[v]}return{found:!0,value:h}}const a=function(f={}){const u={...f};return Object.entries(u).forEach(([m,h])=>{if(m!=="props"&&typeof h=="string"){const v=i(n.data,h);v.found&&(u[m]=v.value)}}),f.props&&typeof f.props=="object"&&Object.entries(f.props).forEach(([m,h])=>{if(typeof h=="string"){const v=i(n.data,h);u[m]=v.found?v.value:h}else u[m]=h}),delete u.props,u},c=e.computed(()=>{const f={};return n.col&&(f.col=n.col),f});return(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[s.value,f.styling?.classItem],"w-full bg-gray-50 rounded-lg p-4 col-span-12"])},[!f.hideTitle&&f.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mb-4 pb-2 border-b border-gray-200",f.styling?.classItemTitle])},[e.createElementVNode("h3",Xd,e.toDisplayString(f.title),1)],2)):e.createCommentVNode("",!0),f.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:f.html,class:"text-gray-900 leading-relaxed"},null,8,Qd)):f.type?.includes("tabs")?(e.openBlock(),e.createBlock(mt,{key:2,view:f.type,panels:f.items,data:f.data,styling:f.styling},null,8,["view","panels","data","styling"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[o.value.length?(e.openBlock(),e.createElementBlock("div",Vd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(m,h)=>(e.openBlock(),e.createElementBlock("div",{key:m.name||m.component||h,class:e.normalizeClass(r(m))},[m.title||m.label?(e.openBlock(),e.createElementBlock("div",ep,[e.createElementVNode("h3",tp,e.toDisplayString(m.title||m.label),1)])):e.createCommentVNode("",!0),m.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:m.html,class:"text-gray-900 leading-relaxed"},null,8,np)):m.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(m.component)),e.mergeProps({key:2,ref_for:!0},{geom:f.data.geom,id:f.data.id,...c.value,...a(m),data:f.data},{class:"w-full"}),null,16)):e.renderSlot(f.$slots,"default",{key:3})],2))),128))])):e.createCommentVNode("",!0)],64))],2))}}),sp={class:"grid grid-cols-12 gap-[20px]"},op={key:0,class:"col-span-4"},rp=["innerHTML"],ip=["onClick"],lp=["innerHTML"],ap={key:1,class:"flex w-full"},cp={class:"flex flex-col w-56 border-r border-gray-200 bg-gray-50 relative"},dp=["onClick"],pp={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 transition-all duration-300"},fp={class:"flex-1 p-4"},mp=["innerHTML"],up={class:"grid grid-cols-12 gap-4"},hp={key:3,class:"w-full h-full"},mt=e.defineComponent({__name:"Card",props:{panels:{default:()=>[]},data:{default:()=>({})},view:{default:"plain"},styling:{},classWrapper:{default:""},classPanel:{},normalizeTabs:{type:Boolean,default:!0},backgroundClass:{},tabContentWrapperClass:{},tabPanelClass:{},id:{},className:{},style:{}},setup(t){const n=t;function s(){const y=typeof window<"u"?window:globalThis,T="__vsCardAnonymousCounter__",b=y[T]??0;return y[T]=b+1,b===0?"tab":`tab${b}`}const o=e.ref(0),r=e.ref([]);let l=!1;const i=e.ref(n.id??s());e.watch(()=>n.id,y=>{y&&(i.value=y)});const a=new Map,c=e.computed(()=>n.view==="tabs"||n.view==="vertical-tabs");e.provide("vsCardTabsContext",c);function f(y,T){const b=T?.path;return b?(a.has(b)||a.set(b,e.defineAsyncComponent(()=>import(b))),a.get(b)):typeof y=="string"&&Ue[y]?Ue[y]:T?.component&&Ue[T.component]?Ue[T.component]:T?.name&&Ue[T.name]?Ue[T.name]:y}function u(y){return y.forEach(T=>{T.type&&(T.view=T.type)}),r.value=y.filter(T=>T.type==="pin"),y.filter(T=>T.type!=="pin")}const m=e.computed(()=>{let y;return n.panels&&n.panels.length>0?y=n.normalizeTabs?u(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(y=n.data.filter(b=>b.type.includes("tabs"))[0]?.items),Kt(y,12)}),h=e.computed(()=>i.value),v=e.computed(()=>{let y;return n.panels&&n.panels.length>0?y=n.normalizeTabs?u(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(y=n.data),Kt(y,12)}),x=e.computed(()=>({[`view-${n.view}`]:!0}));function _(y,T){if(!y||typeof T!="string"||!T)return{found:!1,value:void 0};const b=T.split(".");let D=y;for(const Z of b){if(D==null||typeof D!="object"&&!Array.isArray(D))return{found:!1,value:void 0};if(!(Z in D))return{found:!1,value:void 0};D=D[Z]}return{found:!0,value:D}}const N=y=>{const T={...y};return Object.entries(T).forEach(([b,D])=>{if(b!=="props"&&typeof D=="string"){const Z=_(n.data,D);Z.found&&(T[b]=Z.value)}}),y.props&&typeof y.props=="object"&&Object.entries(y.props).forEach(([b,D])=>{if(typeof D=="string"){const Z=_(n.data,D);T[b]=Z.found?Z.value:D}else T[b]=D}),delete T.props,n.data&&(T.data=n.data),T};function C(y){const T=["col-span-12"],b=xo(y.col);return b.length&&T.push(...b),T}const A=e.ref([]),B=e.ref([]),$=e.ref([]);function S(y,T){y&&y instanceof HTMLElement&&(A.value[T]=y)}function q(){B.value=A.value.map(y=>y.offsetWidth),$.value=A.value.map(y=>y.offsetLeft)}function V(){if(typeof window>"u")return null;const y=h.value;if(!y)return null;const b=new URL(window.location.href).searchParams.get(y);if(b===null)return null;const D=Number.parseInt(b,10);return Number.isNaN(D)?null:D}function I(y){if(typeof window>"u")return;const T=h.value;if(!T)return;const b=new URL(window.location.href);y<=0?b.searchParams.delete(T):b.searchParams.set(T,String(y));const D=window.history.state??{};window.history.replaceState(D,document.title,b)}function L(){if(l)return;const y=V();if(y===null||!m.value.length)return;const T=Math.min(Math.max(y,0),m.value.length-1);T!==y&&I(T),T!==o.value&&(o.value=T),l=!0}function z(){l=!1,L()}let F=null;return e.onMounted(()=>{e.nextTick(()=>{L(),q()}),typeof window<"u"&&window.addEventListener("popstate",z),F=new ResizeObserver(()=>q()),F.observe(document.body)}),e.onBeforeUnmount(()=>{F?.disconnect(),typeof window<"u"&&window.removeEventListener("popstate",z)}),e.watch(o,y=>{e.nextTick(()=>{q()}),I(y)}),e.watch(m,()=>{l=!1,L()}),(y,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(y.classWrapper||x.value)},[e.createElementVNode("div",sp,[r.value.length!==0?(e.openBlock(),e.createElementBlock("div",op,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value[0].items,(b,D)=>(e.openBlock(),e.createElementBlock("div",{key:b.name||D,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 m-1 mb-3"},[b.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:b.html,class:"text-gray-900 leading-relaxed"},null,8,rp)):b.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(b.component,b)),e.mergeProps({key:1,ref_for:!0},b.component==="Card"?b:N(b),{id:y.data.id,class:["w-full h-full",y.styling?.classItem]}),null,16,["id","class"])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.value.length!==0?"col-span-8":"col-span-12")},[y.view==="tabs"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["overflow-hidden w-full",y.styling?.classTabWrapper])},[e.createElementVNode("div",{class:e.normalizeClass(["flex border-b border-gray-200 bg-gray-50 relative gap-4 my-6",y.styling?.classTabHeader])},[B.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute bottom-0 h-[2px] bg-blue-600 transition-all duration-300",style:e.normalizeStyle({width:B.value[o.value]+"px",left:$.value[o.value]+"px"})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(b,D)=>(e.openBlock(),e.createElementBlock("button",{key:b.name||D,ref_for:!0,ref:Z=>S(Z,D),onClick:Z=>o.value=D,class:e.normalizeClass(["px-1 py-2 text-sm font-medium transition-colors",o.value===D?"text-blue-600 border-blue-600 border-b-2 ":"text-gray-600 hover:text-gray-800"])},e.toDisplayString(b.title||b.label||b.name||`Tab ${D+1}`),11,ip))),128))],2),e.createElementVNode("div",{class:e.normalizeClass([y.styling?.classTabContent,"p-1"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(b,D)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:b.name||D,class:e.normalizeClass(["transition-all duration-300 ease-in-out",o.value===D?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",y.classPanel||"w-full border-gray-100"])},[b.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:b.html,class:"text-gray-900 leading-relaxed"},null,8,lp)):y.$slots[`tab-${D}`]?e.renderSlot(y.$slots,`tab-${D}`,{key:1,item:b,data:y.data}):b.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ft),e.mergeProps({key:2,ref_for:!0},N(b),{items:b.items,"hide-title":!0,class:["w-full h-full",y.styling?.classItem],styling:y.styling}),null,16,["items","class","styling"])):b.component||b.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(b.component||b.name,b)),e.mergeProps({key:3,ref_for:!0},b.component==="Card"?b:N(b),{styling:y.styling,id:y.data.id,class:["w-full h-full",y.styling?.classItem]}),null,16,["styling","id","class"])):e.renderSlot(y.$slots,b.slot||`tab-${D}`,{key:4,item:b,data:y.data})],2)),[[e.vShow,o.value===D]])),128))],2)],2)):y.view==="vertical-tabs"?(e.openBlock(),e.createElementBlock("div",ap,[e.createElementVNode("div",cp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(b,D)=>(e.openBlock(),e.createElementBlock("button",{key:b.name||D,onClick:Z=>o.value=D,class:e.normalizeClass(["relative px-1 py-4 text-sm font-medium text-left transition-colors duration-300",o.value===D?"text-blue-600 bg-white":"text-gray-600 hover:text-gray-800 hover:bg-gray-100"])},[e.createTextVNode(e.toDisplayString(b.title||b.label||b.name||`Tab ${D+1}`)+" ",1),o.value===D?(e.openBlock(),e.createElementBlock("span",pp,T[0]||(T[0]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"remixicon text-blue-600 rounded-full bg-white shadow scale-90 opacity-100 transition ease-out"},[e.createElementVNode("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})],-1)]))):e.createCommentVNode("",!0)],10,dp))),128))]),e.createElementVNode("div",fp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(b,D)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:b.name||D,class:e.normalizeClass(["transition-all duration-300 ease-in-out",o.value===D?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",y.classPanel||"w-full border-gray-100 py-2"])},[b.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:b.html,class:"text-gray-900 leading-relaxed"},null,8,mp)):y.$slots[`tab-${D}`]?e.renderSlot(y.$slots,`tab-${D}`,{key:1,item:b,data:y.data}):b.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ft),e.mergeProps({key:2,ref_for:!0},N(b),{items:b.items,"hide-title":!0,class:["w-full h-full",y.styling?.classItem],styling:y.styling}),null,16,["items","class","styling"])):b.component||b.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(b.component||b.name,b)),e.mergeProps({key:3,ref_for:!0},b.component==="Card"?b:N(b),{id:y.data.id,class:["w-full h-full",y.styling?.classItem]}),null,16,["id","class"])):e.renderSlot(y.$slots,b.slot||`tab-${D}`,{key:4,item:b,data:y.data})],2)),[[e.vShow,o.value===D]])),128))])])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(y.styling?.classPlain||"p-1 w-full")},[e.createElementVNode("div",up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(b,D)=>(e.openBlock(),e.createElementBlock("div",{key:b.name||b.component||D,class:e.normalizeClass(C(b))},[y.$slots[`panel-${D}`]?e.renderSlot(y.$slots,`panel-${D}`,{key:0,item:b,data:y.data}):b.items||b.html?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ft),e.mergeProps({key:1,ref_for:!0},N(b),{items:b.items||[],class:["w-full h-full",y.styling?.classItem],styling:y.styling}),null,16,["items","class","styling"])):b.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(b.component,b)),e.mergeProps({key:2,ref_for:!0},N(b),{class:["w-full h-full",[y.styling?.classItem]],styling:y.styling}),null,16,["class","styling"])):(e.openBlock(),e.createElementBlock("div",hp,[e.renderSlot(y.$slots,b.slot||`panel-${D}`,{item:b,data:y.data})]))],2))),128))])],2))],2)])],2))}}),gp=["onClick"],_o=Me(e.defineComponent({__name:"CopyNotification",setup(t,{expose:n}){const s=e.ref([]);let o=1;const r=()=>{if(s.value.length>=10){const a=s.value[0];clearTimeout(a.timer),s.value.shift()}const i={id:o++,timer:setTimeout(()=>{l(i.id)},1500)};s.value.push(i)},l=i=>{const a=s.value.findIndex(c=>c.id===i);if(a!==-1){const c=s.value[a];clearTimeout(c.timer),s.value.splice(a,1)}};return n({addNotification:r}),e.onUnmounted(()=>{s.value.forEach(i=>{clearTimeout(i.timer)})}),(i,a)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.TransitionGroup,{name:"notification",tag:"div",class:"fixed top-4 right-4 z-50 space-y-2"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id,class:"bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"},[e.createVNode(e.unref(Io),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),a[0]||(a[0]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("p",{class:"font-medium text-sm"},"Ссылка скопирована!"),e.createElementVNode("p",{class:"text-xs text-green-100 opacity-90"},"Файл добавлен в буфер обмена")],-1)),e.createElementVNode("button",{onClick:f=>l(c.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(tn),{class:"h-4 w-4"})],8,gp)]))),128))]),_:1})]))}}),[["__scopeId","data-v-d1ac6329"]]);mt.install=function(t){t.component("vs-widget-file",Nt),t.component("vs-widget-comments",kt),t.component("vs-widget-history",Et),t.component("vs-widget-gallery",wt),t.component("vs-widget-map",xt),t.component("vs-group-interface",Wt),t.component("CommentsWidget",kt),t.component("HistoryWidget",Et),t.component("GalleryWidget",wt),t.component("FilesWidget",Nt),t.component("MapWidget",xt),t.component("Card",mt),t.component("CardItem",ft),t.component("DescriptionListWidget",sn),t.component("CopyNotification",_o),t.component("GroupInterfaceWidget",Wt)},te.Card=mt,te.CardItem=ft,te.CommentsWidget=kt,te.CopyNotification=_o,te.DescriptionListWidget=sn,te.FilesWidget=Nt,te.GalleryWidget=wt,te.GroupInterfaceWidget=Wt,te.HistoryWidget=Et,te.MapWidget=xt,te.TableWidget=Eo,te.default=mt,Object.defineProperties(te,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|