@opengis/widgets 0.0.39 → 0.0.41
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/README.md +91 -91
- package/dist/index.css +1 -1
- package/dist/index.js +2531 -2692
- package/dist/index.umd.cjs +9 -151
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/widgets/files/FileHeader.vue.d.ts +4 -1
- package/dist/widgets/files/FileHeader.vue.d.ts.map +1 -1
- package/dist/widgets/files/FilesWidget.vue.d.ts +1 -0
- package/dist/widgets/files/FilesWidget.vue.d.ts.map +1 -1
- package/package.json +58 -58
package/dist/index.umd.cjs
CHANGED
|
@@ -1,151 +1,9 @@
|
|
|
1
|
-
(function(V,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):(V=typeof globalThis<"u"?globalThis:V||self,e(V.WidgetLib={},V.Vue,V.OpenGISCore))})(this,(function(V,e,We){"use strict";function Rs(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const Ps=Rs(e);/**
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var Et={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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Hs=({size:t,strokeWidth:n=2,absoluteStrokeWidth:o,color:s,iconNode:r,name:l,class:i,...a},{slots:c})=>e.h("svg",{...Et,width:t||Et.width,height:t||Et.height,stroke:s||Et.stroke,"stroke-width":o?Number(n)*24/Number(t):n,class:js("lucide",...l?[`lucide-${lo(zs(l))}-icon`,`lucide-${lo(l)}`]:["lucide-icon"]),...a},[...r.map(p=>e.h(...p)),...c.default?[c.default()]:[]]);/**
|
|
17
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const Y=(t,n)=>(o,{slots:s})=>e.h(Hs,{...o,iconNode:n,name:t},s);/**
|
|
22
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const Us=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const qs=Y("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
32
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const Ws=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const ao=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const Ks=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const Ke=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const Gs=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const Js=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const Zs=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const Ys=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const co=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const Xs=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const po=Y("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
87
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const Qs=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const fo=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const Vs=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const er=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const on=Y("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
|
|
112
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const tr=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const sn=Y("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
122
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const nr=Y("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
|
-
* @license lucide-vue-next v0.535.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const rn=Y("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),or={class:"border-t pt-3 mt-4"},sr={class:"flex gap-2"},rr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},ir={class:"flex-1 space-y-2"},lr={class:"flex justify-between items-center"},ar={class:"flex gap-2"},cr=["disabled"],mo=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(t,{emit:n}){const o=e.useModel(t,"isReply"),s=e.ref(""),r=n,l=()=>{s.value.trim()&&(r("sendComment",s.value),s.value="")},i=a=>{(a.ctrlKey||a.metaKey)&&a.key==="Enter"&&(a.preventDefault(),l())};return(a,c)=>(e.openBlock(),e.createElementBlock("div",or,[e.createElementVNode("div",sr,[e.createElementVNode("span",rr,[e.createVNode(e.unref(sn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",ir,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=p=>s.value=p),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,s.value]]),e.createElementVNode("div",lr,[c[4]||(c[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",ar,[o.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:c[1]||(c[1]=p=>o.value=!1)},[e.createVNode(e.unref(rn),{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:!s.value.trim(),onClick:l},[e.createVNode(e.unref(fo),{class:"h-3 w-3 mr-1"}),c[3]||(c[3]=e.createTextVNode(" Send ",-1))],8,cr)])])])])]))}}),dr={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"},pr=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 o=n,s=e.useModel(t,"showMoreOptions"),r=e.ref(),l=e.ref(!0),i=async p=>{s.value&&r.value&&!r.value.contains(p.target)&&!l.value&&(s.value=!1),l.value=!1},a=()=>{s.value=!1,o("edit")},c=()=>{s.value=!1,o("delete")};return e.onMounted(()=>{document.addEventListener("click",i)}),e.onUnmounted(()=>{document.removeEventListener("click",i)}),(p,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",dr,[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(er),{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(on),{class:"h-3 w-3 mr-2"}),u[1]||(u[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),fr={class:"space-y-2"},mr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},ur={class:"flex-1 min-w-0 space-y-1 relative"},hr={class:"flex items-center gap-2"},gr={class:"font-medium text-xs"},yr={class:"text-xs text-gray-500"},vr={key:0,class:"text-xs text-gray-700 leading-relaxed"},br={class:"flex justify-between text-xs"},kr={class:"flex items-center gap-2"},Er={key:0,class:"flex gap-2"},wr=["disabled"],Nr={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},xr=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(t,{emit:n}){const o=n,s=t,r=e.ref(s.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),p=e.ref(!1),u=e.ref(!1),f=w=>{const C=new Date,M=Math.floor((C.getTime()-w.getTime())/(1e3*60*60));return M<1?`${Math.floor((C.getTime()-w.getTime())/6e4)}m`:M<24?`${M}h`:`${Math.floor(M/24)}d`},h=()=>{u.value=!u.value,u.value?o("like",s.comment.id,"add"):o("like",s.comment.id,"delete")},k=()=>{o("edit",s.comment.id,r.value),p.value=!1},_=(w,C)=>{o("like",w,C)},x=(w,C)=>{o("edit",w,C)};return(w,C)=>{const M=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",fr,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",p.value?"bg-gray-50":""])},[e.createElementVNode("span",mr,[e.createVNode(e.unref(sn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",ur,[e.createElementVNode("div",hr,[e.createElementVNode("span",gr,e.toDisplayString(w.comment?.author),1),e.createElementVNode("span",yr,e.toDisplayString(f(w.comment?.createdAt)),1)]),p.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":C[0]||(C[0]=B=>r.value=B),class:e.normalizeClass(p.value?i.value:l.value)},null,2)),[[e.vModelText,r.value]]):(e.openBlock(),e.createElementBlock("p",vr,e.toDisplayString(w.comment?.text),1)),e.createElementVNode("div",br,[e.createElementVNode("div",kr,[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(Zs),{class:e.normalizeClass(["h-3 w-3",u.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(w.comment?.likes),1)],2),w.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(Qs),{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(Ks),{class:"h-3 w-3"})])]),p.value?(e.openBlock(),e.createElementBlock("div",Er,[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=>p.value=!1)},[e.createVNode(e.unref(rn),{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=>k())},[e.createVNode(e.unref(fo),{class:"h-3 w-3 mr-1"}),C[12]||(C[12]=e.createTextVNode(" Send ",-1))],8,wr)])):e.createCommentVNode("",!0)])]),a.value?(e.openBlock(),e.createBlock(pr,{key:0,showMoreOptions:a.value,"onUpdate:showMoreOptions":C[6]||(C[6]=B=>a.value=B),onEdit:C[7]||(C[7]=B=>p.value=!0),onDelete:C[8]||(C[8]=B=>w.$emit("delete",w.comment?.id)),comment:w.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),w.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Nr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.comment?.replies,B=>(e.openBlock(),e.createBlock(M,{key:B.id,comment:B,isInside:!0,onDelete:$=>w.$emit("delete",B.id),onLike:_,onEdit:x},null,8,["comment","onDelete"]))),128)),c.value&&!w.isInside?(e.openBlock(),e.createBlock(mo,{key:0,onSendComment:C[9]||(C[9]=B=>w.$emit("reply",w.comment?.id,B)),isReply:c.value,"onUpdate:isReply":C[10]||(C[10]=B=>c.value=B)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),_r=["id"],Cr={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},wt=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 o=t,s=n,r=e.ref(o.comments??[]);async function l(){if(!o.id)return;const f=await fetch(`/api/widget/comment/${o.id}`).then(h=>h.json());r.value=f.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 f=>{o.onAddComment?o.onAddComment(f):o.id&&(await fetch(`/api/widget/comment/${o.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:f})}),await l()),s("add",f)},a=(f,h)=>{o?.onLike?.(f,h),s("like",f,h)},c=(f,h)=>{o.onReply?.(f,h),s("reply",f,h)},p=async(f,h)=>{o.onEdit?o.onEdit(f,h):o.id&&(await fetch(`/api/widget/comment/${o.id}/${f}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:h})}),await l()),s("edit",f,h)},u=async f=>{o.onDelete?o.onDelete(f):o.id&&(await fetch(`/api/widget/comment/${o.id}/${f}`,{method:"DELETE"}),await l()),s("delete",f)};return(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",f.className]),id:f.id,style:e.normalizeStyle(f.style)},[f.title?(e.openBlock(),e.createElementBlock("h3",Cr,e.toDisplayString(f.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([f.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:f.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,k=>(e.openBlock(),e.createBlock(xr,{key:k.id,comment:k,onReply:c,onLike:a,onDelete:h[0]||(h[0]=_=>u(_)),onEdit:p},null,8,["comment"]))),128))],6),e.createVNode(mo,{onSendComment:h[1]||(h[1]=k=>i(k))})],14,_r))}}),uo=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:Ke}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:Vs}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:tr}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:Ys}]]),Sr={class:"mx-auto font-sans"},Br={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Tr={class:"relative"},$r={class:"space-y-3"},Dr={class:"flex-1 min-w-0 pb-2"},Lr={class:"flex items-center gap-1.5 mb-1 mt-0.5"},Or={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Ar={class:"font-medium text-xs"},Ir={class:"text-xs text-gray-500"},Mr={class:"space-y-1"},Rr={class:"text-xs text-gray-700"},Pr={class:"capitalize mr-1"},Fr={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"},zr={key:0,class:"flex items-center gap-1 text-xs"},jr={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},Hr={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},Nt=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(t){const n=t,o=e.ref(Array.isArray(n.data)?n.data:[]);o.value.length===0&&n.id&&s();async function s(){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}),o.value=l.rows}return(r,l)=>(e.openBlock(),e.createElementBlock("div",Sr,[r.title?(e.openBlock(),e.createElementBlock("h3",Br,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",Tr,[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",$r,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.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(uo).get(i?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(uo).get(i?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",Dr,[e.createElementVNode("div",Lr,[e.createElementVNode("span",Or,[e.createVNode(e.unref(sn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",Ar,e.toDisplayString(i?.userName),1),e.createElementVNode("span",Ir,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",Mr,[e.createElementVNode("div",Rr,[e.createElementVNode("span",Pr,e.toDisplayString(i?.action),1),i?.entityId?(e.openBlock(),e.createElementBlock("span",Fr,e.toDisplayString(i?.entityId),1)):e.createCommentVNode("",!0)]),i?.changes?.[i?.entityId]?(e.openBlock(),e.createElementBlock("div",zr,[i?.changes?.[i?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",jr,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(qs),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",Hr,e.toDisplayString(i?.changes?.[i?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),Ur={key:0,class:"text-xl font-semibold"},qr={class:"flex gap-1"},Wr={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"},Kr=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(t){const n=e.useModel(t,"modelValue"),o={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",s.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[s.title?(e.openBlock(),e.createElementBlock("h3",Ur,e.toDisplayString(s.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",qr,[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"?o.active:o.inactive]),onClick:r[0]||(r[0]=l=>n.value="list")},[e.createVNode(e.unref(Xs),{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"?o.active:o.inactive]),onClick:r[1]||(r[1]=l=>n.value="grid")},[e.createVNode(e.unref(Js),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:r[2]||(r[2]=l=>s.$emit("onAddFile",l))},null,32),e.createElementVNode("div",Wr,[e.createVNode(e.unref(po),{class:"h-4 w-4"}),r[3]||(r[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),ln={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:Ke,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:Gs,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:nr,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:Ke,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:Us,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:co,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:co,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:Ke,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:Ke,label:"PPT"}};function ho(t,n="en"){const o={month:"short",day:"numeric"};return new Intl.DateTimeFormat(n,o).format(t)}function go(t){if(t===0)return"0 B";const n=1024,o=["B","KB","MB","GB","TB"],s=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,s)).toFixed(1))} ${o[s]}`}const Gr={class:"space-y-0.5"},Jr=["onClick"],Zr=["onClick"],Yr={class:"flex items-center gap-2"},Xr={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},Qr={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},Vr={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},ei={class:"flex items-center gap-1"},ti=["onClick"],ni=["onClick"],oi=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Gr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,s=>(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:s.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",s),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(ln)[s?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ln)[s?.ext]?.icon||e.unref(ln).pdf.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:r=>n.$emit("openLightbox",s)},[e.createElementVNode("div",Yr,[e.createElementVNode("span",Xr,e.toDisplayString(s?.uploaded_name||s?.name),1)])],8,Zr),e.createElementVNode("div",Qr,e.toDisplayString(e.unref(go)(s.size)),1),e.createElementVNode("div",Vr,e.toDisplayString(e.unref(ho)(s.createdAt)),1),e.createElementVNode("div",ei,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",s),["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(ao),{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 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,s?.file_id),["stop"])},[e.createVNode(e.unref(on),{class:"h-3 w-3"})],8,ni)])],8,Jr))),128))]))}}),si={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},ri=["onClick"],ii={class:"space-y-2"},li={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},ai=["src"],ci={class:"space-y-1"},di=["title"],pi={class:"text-xs text-gray-500 text-left"},fi={class:"absolute top-2 right-1 flex items-center gap-1"},mi=["onClick"],ui=["onClick"],hi=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",s),["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",ii,[e.createElementVNode("div",li,[s.ext==="png"||s.ext==="jpg"||s.ext==="jpeg"||s.ext==="gif"||s.ext==="svg"||s.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${s?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,ai)):(e.openBlock(),e.createBlock(e.unref(Ke),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",ci,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:s.uploaded_name||s.name},e.toDisplayString(s.uploaded_name||s.name),9,di),e.createElementVNode("p",pi,e.toDisplayString(e.unref(ho)(s.createdAt))+", "+e.toDisplayString(e.unref(go)(s.size)),1)])]),e.createElementVNode("div",fi,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",s),["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(ao),{class:"h-3 w-3"})],8,mi),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,s?.file_id),["stop"])},[e.createVNode(e.unref(on),{class:"h-3 w-3"})],8,ui)])],8,ri))),128))]))}}),gi={class:"mx-auto font-sans"},yi={key:1},xt=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const o=t,s=e.ref(!1),r=e.ref(null),l=e.ref(!1),i=e.ref(0),a=e.ref(o.files??[]),c=n;a.value.length===0&&C();const p=($,S)=>{r.value=S,s.value=!0},u=()=>{r.value&&(_(r.value),r.value=null,s.value=!1)},f=e.computed(()=>Array.isArray(a.value)?a.value.map($=>$?.file_path):[]),h=$=>{const S=f.value.findIndex(H=>H===$.file_path);S!==-1&&(l.value=!0,i.value=S)},k=$=>{o.onAddFile?o.onAddFile($):M($),c("add",$)},_=$=>{o.onDelete?o.onDelete($):B($),c("delete",$)},x=$=>{const S=document.createElement("a");S.setAttribute("download",$?.uploaded_name||$?.name),S.href=$?.file_path||$?.path,S.click()},w=e.ref("list");async function C(){if(!o.id)return;const $=await fetch(`/api/widget/file/${o.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 M=async $=>{if(!(!$.target||!$.target.files||$.target.files.length===0))try{await Promise.all(Array.from($.target.files).map(async S=>{const H=new FormData;H.append("file",S);const K=`/api/widget/file/${o.id}`,I=await fetch(K,{method:"POST",body:H});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/${o.id}/${$}`,{method:"DELETE"}),await C()}catch(S){console.error(S)}};return($,S)=>{const H=e.resolveComponent("MessageBox"),K=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",gi,[e.createVNode(Kr,{modelValue:w.value,"onUpdate:modelValue":S[0]||(S[0]=I=>w.value=I),title:o.title,onOnAddFile:S[1]||(S[1]=I=>k(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"})},[w.value==="list"?(e.openBlock(),e.createBlock(oi,{key:0,onDelete:p,onDownload:x,onOpenLightbox:S[2]||(S[2]=I=>h(I)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0),w.value==="grid"?(e.openBlock(),e.createBlock(hi,{key:1,onDelete:p,onDownload:x,onOpenLightbox:S[3]||(S[3]=I=>h(I)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",yi,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(H,{modelValue:s.value,"onUpdate:modelValue":S[4]||(S[4]=I=>s.value=I),onConfirm:u,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode(K,{modelValue:l.value,"onUpdate:modelValue":S[5]||(S[5]=I=>l.value=I),images:f.value,"start-index":i.value},null,8,["modelValue","images","start-index"])],64)}}}),vi={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},bi=["onClick"],ki={key:0,rel:"noreferrer",class:"relative block h-full w-full"},Ei=["src"],wi={key:0,class:"thumb-cover"},Ni=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 o=n,s=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 p=i.value.findIndex(u=>u===c.file_path);p!==-1&&(s.value=!0,r.value=p)};return(c,p)=>{const u=e.resolveComponent("Lightbox");return c.items?.length>=1?(e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.items,(f,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(k=>a(f),["stop"])},[h<5?(e.openBlock(),e.createElementBlock("div",ki,[e.createElementVNode("img",{src:`/file/resize?filepath=${f?.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,Ei),h===4&&c.items?.length>5?(e.openBlock(),e.createElementBlock("div",wi," +"+e.toDisplayString(c.items?.length-5),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,bi))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Math.max(0,5-c.items.length),f=>(e.openBlock(),e.createElementBlock("div",{key:"empty-"+f,class:e.normalizeClass(["h-full w-full image"+(c.items.length+f-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),e.createVNode(u,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=f=>s.value=f),images:i.value,"start-index":r.value,delete:"true",download:"true",onDelete:p[1]||(p[1]=f=>o("delete",f))},null,8,["modelValue","images","start-index"])])):e.createCommentVNode("",!0)}}}),xi={key:0,class:"text-xl font-semibold"},_i={class:"flex gap-1"},Ci={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"},Si=e.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(t){return(n,o)=>(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",xi,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",_i,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:o[0]||(o[0]=s=>n.$emit("onAddImage",s))},null,32),e.createElementVNode("div",Ci,[e.createVNode(e.unref(po),{class:"h-4 w-4"}),o[1]||(o[1]=e.createTextVNode(" Додати зображення ",-1))])])])],2))}}),Bi={class:"w-full mx-auto font-sans",ref:"containerRef"},Ti={key:1},_t=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const o=t,s=e.ref(o.items??[]),r=n;s.value.length===0&&c();const l=u=>{o.onAddImage?o.onAddImage(u):a(u),r("add",u)},i=u=>{const f=s.value.find(h=>h.file_path===u)?.file_id;f&&(o.onDelete?o.onDelete(f):p(f))},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 f=>{const h=new FormData;h.append("file",f);const k=`/api/widget/file/${o.id}`,_=await fetch(k,{method:"POST",body:h});if(!_.ok)throw new Error(`HTTP error! status: ${_.status}`);return f})),await c()}catch(f){console.error("Помилка при завантаженні файлів:",f)}};async function c(){if(!o.id)return;const u=await fetch(`/api/widget/file/${o.id}`).then(f=>f.json());s.value=u.rows}const p=async u=>{try{await fetch(`/api/widget/file/${o.id}/${u}`,{method:"DELETE"}),await c()}catch(f){console.error(f)}};return(u,f)=>(e.openBlock(),e.createElementBlock("div",Bi,[e.createVNode(Si,{title:u.title,onOnAddImage:f[0]||(f[0]=h=>l(h))},null,8,["title"]),s.value.length>0?(e.openBlock(),e.createBlock(Ni,{key:0,items:s.value,onDelete:f[1]||(f[1]=h=>i(h))},null,8,["items"])):(e.openBlock(),e.createElementBlock("div",Ti,f[2]||(f[2]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])))],512))}}),$i={class:"text-value"},Di={class:"text-sm text-gray-900"},Li=e.defineComponent({__name:"TextValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=n.item.value;return typeof s=="boolean"?s?"Так":"Ні":s==null?"—":String(s)});return(s,r)=>(e.openBlock(),e.createElementBlock("div",$i,[e.createElementVNode("span",Di,e.toDisplayString(o.value),1)]))}}),Me=(t,n)=>{const o=t.__vccOpts||t;for(const[s,r]of n)o[s]=r;return o},Oi=Me(Li,[["__scopeId","data-v-34a76c89"]]),Ai={class:"link-value"},Ii=["href"],Mi=Me(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=String(n.item.value);try{const r=new URL(s);return r.hostname+r.pathname}catch{return s}});return(s,r)=>(e.openBlock(),e.createElementBlock("div",Ai,[e.createElementVNode("a",{href:String(s.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(o.value)+" ",1),r[0]||(r[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,Ii)]))}}),[["__scopeId","data-v-932f028c"]]),Ri={class:"date-value"},Pi={class:"text-sm text-gray-900"},Fi=Me(e.defineComponent({__name:"DateValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=n.item.value;if(s instanceof Date)return s.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof s=="string"){const r=new Date(s);if(!isNaN(r.getTime()))return r.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(s)});return(s,r)=>(e.openBlock(),e.createElementBlock("div",Ri,[e.createElementVNode("span",Pi,e.toDisplayString(o.value),1)]))}}),[["__scopeId","data-v-cd4df08e"]]),zi={class:"status-value"},ji={key:0,class:"mr-1"},Hi=Me(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(t){const n=t,o=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"}}),s=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",zi,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",o.value])},[s.value?(e.openBlock(),e.createElementBlock("span",ji,[e.createElementVNode("i",{class:e.normalizeClass(s.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(r.item.value)),1)],2)]))}}),[["__scopeId","data-v-aea1f529"]]),Ui={class:"custom-value"},qi={class:"text-sm text-gray-900"},Wi=Me(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Ui,[e.renderSlot(n.$slots,"default",{item:n.item,value:n.item.value},()=>[e.createElementVNode("span",qi,e.toDisplayString(String(n.item.value)),1)],!0)]))}}),[["__scopeId","data-v-12c8b3f3"]]),Ki=["id"],Gi={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Ji={key:1,class:"overflow-x-auto"},Zi={class:"min-w-full divide-y divide-gray-200"},Yi={class:"bg-white divide-y divide-gray-200"},Xi={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},Qi={class:"flex items-center gap-2"},Vi=["title"],el={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},tl={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},nl={class:"flex items-start gap-3"},ol={key:0,class:"flex-shrink-0"},sl={class:"flex-1 min-w-0"},rl={class:"flex items-center gap-2 mb-2"},il={class:"text-sm font-medium text-gray-900"},ll=["title"],al={key:3,class:"overflow-x-auto"},cl={class:"min-w-full divide-y divide-gray-200"},dl={class:"bg-white divide-y divide-gray-200"},pl={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},fl={class:"flex items-center gap-2"},ml=["title"],ul={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},an=Me(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(t){const n=o=>{switch(o.type){case"link":return Mi;case"date":return Fi;case"status":return Hi;case"custom":return Wi;default:return Oi}};return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",o.className]),id:o.id,style:e.normalizeStyle(o.style)},[o.title?(e.openBlock(),e.createElementBlock("h3",Gi,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),o.view==="table"?(e.openBlock(),e.createElementBlock("div",Ji,[e.createElementVNode("table",Zi,[e.createElementVNode("tbody",Yi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",Xi,[e.createElementVNode("div",Qi,[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},s[0]||(s[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,Vi)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",el,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])])):o.view==="grid"?(e.openBlock(),e.createElementBlock("div",tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.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",nl,[r.icon?(e.openBlock(),e.createElementBlock("div",ol,[e.createElementVNode("i",{class:e.normalizeClass([r.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",sl,[e.createElementVNode("div",rl,[e.createElementVNode("h4",il,e.toDisplayString(r.label),1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:r.tooltip},s[1]||(s[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,ll)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",al,[e.createElementVNode("table",cl,[e.createElementVNode("tbody",dl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",pl,[e.createElementVNode("div",fl,[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},s[2]||(s[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,ml)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",ul,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])]))],14,Ki))}}),[["__scopeId","data-v-106790ef"]]),hl={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 yo(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 gl={key:0,class:"absolute inset-0 z-[600] flex items-center justify-center pointer-events-none bg-black/20"},yl={class:"bg-black/70 text-white text-xs sm:text-sm px-4 py-2 rounded-md shadow"},vl={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"},bl={class:"space-y-0.5"},kl={class:"text-gray-500"},El={class:"text-gray-900 text-right break-all"},wl={key:2,class:"absolute bottom-3 left-3 z-[400] bg-white/90 border border-gray-200 rounded-md shadow px-3 py-2 text-[11px] sm:text-xs space-y-1 max-w-[220px]"},Nl={class:"leading-tight"},xl={key:4,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer max-w-[400px]"},_l={class:"flex items-center justify-between p-2 border-b"},Cl={class:"p-2 border-b"},Sl={class:"flex items-center"},Bl=["value"],Tl={class:"ml-2"},$l={class:"p-2"},Dl={class:"flex items-center"},Ll=["checked","onChange"],Ol={class:"ml-2"},Ct=e.defineComponent({__name:"MapWidget",props:{pattern:{},geom:{},id:{},katottg:{},tms:{},layers:{},title:{},height:{},bounds:{},legend:{},ctrlZoom:{type:Boolean}},setup(t){function n(y){let v=y?.parent??null;for(;v;){const d=v.props?.view;if(d==="tabs"||d==="vertical-tabs")return!0;v=v.parent??null}return!1}const o=t,s=e.getCurrentInstance(),r=e.inject("vsCardTabsContext",!1),l=e.computed(()=>(typeof r=="boolean"?r:r.value)?!0:n(s)),i=s?.appContext.config.globalProperties?.$settings??{},a=(()=>{const y=Array.isArray(i.center)?i.center:[],v=Number(y[0]),d=Number(y[1]);return Number.isFinite(v)&&Number.isFinite(d)?[v,d]:[50,30]})(),c=s?.uid??Math.floor(Math.random()*1e4),p=e.ref(null);let u,f,h,k;const _=ke(),x=e.ref(Object.keys(_)[0]),w=`base-layer-${c}`;let C;const M=e.ref(!0),B=e.ref(!1),$=e.ref(!1),S=e.ref(!1),H=e.ref("Використовуйте Ctrl + колесо миші для зміни масштабу");let K=null;const I=e.ref([]),A=e.reactive({}),F=e.ref([]),z=e.computed(()=>F.value.map(y=>A[y]).filter(Boolean)),E=e.ref(null),T=e.computed(()=>E.value?.entries??[]),N=e.computed(()=>{if(!E.value)return;const y=12,v=E.value.point.x+y,d=E.value.point.y+y;return{left:`${v}px`,top:`${d}px`}}),D=e.computed(()=>Array.isArray(o.legend)?o.legend.map((y,v)=>{const d=typeof y?.color=="string"?y.color.trim():"",m=typeof y?.label=="string"?y.label.trim():"";return!d||!m?null:{color:d,label:m,key:`${m}-${v}`}}).filter(y=>!!y):[]),J=e.computed(()=>{if(B.value)return"fixed inset-0 w-screen h-screen z-[9999] bg-white";const y=["relative","h-full"];return o.height||y.push("min-h-[300px]"),o.title&&!l.value&&y.push("pb-[3.25rem]"),y.join(" ")}),le=e.computed(()=>B.value||o.height==null?void 0:{height:typeof o.height=="number"?`${o.height}px`:String(o.height)}),Ie=e.computed(()=>{const y=["w-full","h-full"];return!o.height&&!B.value&&y.push("min-h-[300px]"),y.join(" ")});async function Se(){const y=m=>{if(!Array.from(document.styleSheets??[]).some(b=>b?.href?.includes(m))){const b=document.createElement("link");b.rel="stylesheet",b.href=m,document.head.appendChild(b)}};y("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),y("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css");const v=m=>new Promise((g,b)=>{if(Array.from(document.scripts??[]).some(P=>P.src===m))return g();const R=document.createElement("script");R.src=m,R.async=!0,R.onload=()=>g(),R.onerror=P=>b(P),document.body.appendChild(R)});return await v("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").catch(()=>{}),await v("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js").catch(()=>{}),await v("https://unpkg.com/leaflet.vectorgrid@1.3.0/dist/Leaflet.VectorGrid.bundled.js").catch(()=>{}),window.L}function ke(){const y=v=>v.map((d,m)=>{const g=typeof d?.key=="string"&&d.key?d.key:`b${m}`,b=Ne(d?.url);return b?{...d,key:g,url:b}:null}).filter(d=>!!d).reduce((d,m)=>({...d,[m.key]:m}),{});return Array.isArray(i?.basemaps)&&i.basemaps.length?y(i.basemaps):y([{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 Ne(y){if(typeof y!="string"||!y.trim())return"";const v=y.trim();if(/^https?:\/\//i.test(v))return v;const d=window.location?.origin??"",m=v.replace(/^\/+/,"");return d?`${d}/${m}`:`/${m}`}function xe(y,v){return y?.id!=null?String(y.id):y?.url?`${y.url}-${v}`:`layer-${v}`}function Xn(y){if(!y||typeof y!="object")return;const v={},d=O=>{if(typeof O=="string"){const L=O.trim().replace(/,+$/,"");return L?/^-?\d+(\.\d+)?$/.test(L)?Number(L):L:void 0}return O},m=()=>(v.colorSet||(v.colorSet={}),v.colorSet),g=(O,L)=>{if(O==null||typeof L!="string")return;const R=L.trim().replace(/,+$/,"");R&&(m()[String(O)]=R)},b=O=>{const L=["color","fill","hex","valueColor","value_color"].map(P=>O[P]).find(P=>typeof P=="string"&&P.trim());if(!L)return!1;const R=["value","key","id","code","status"].map(P=>O[P]).find(P=>P!=null&&P!=="");return R==null?!1:(g(R,L),!0)};return Object.entries(y).forEach(([O,L])=>{if(O==="colorSet"&&L!=null){Array.isArray(L)?L.forEach(P=>{P&&(typeof P=="object"&&b(P)||typeof P=="object"&&Object.entries(P).forEach(([he,ge])=>g(he,typeof ge=="string"?ge:void 0)))}):typeof L=="object"&&(b(L)||Object.entries(L).forEach(([P,he])=>g(P,typeof he=="string"?he:void 0)));return}const R=d(L);if(R!==void 0){if(O==="border"){typeof R=="number"&&v.width==null?v.width=R:typeof R=="string"&&v.stroke==null&&(v.stroke=R);return}v[O]=R}}),v.colorSet&&!Object.keys(v.colorSet).length&&delete v.colorSet,Object.keys(v).length?v:void 0}function Qn(){if(Array.isArray(o.layers)&&o.layers.length)return o.layers.map((v,d)=>{if(!v)return null;const m=xe(v,d),g=v.url||(o.pattern&&m?o.pattern.replace("{{id}}",String(v.id??m)):"");return g?{...v,id:m,url:g,name:v.name||`Шар ${d+1}`,style:Xn(v.style)}:null}).filter(v=>!!v?.url);const y=Array.isArray(o.tms)?o.tms:o.tms?.split(",");return y?y.map((v,d)=>{if(!v)return null;const m=typeof v=="string"?v.trim():`${v}`;if(!m)return null;const g=`legacy-${d}`,b=o.pattern?o.pattern.replace("{{id}}",m):m;return{id:g,name:`Шар ${d+1}`,url:b,visible:!0}}).filter(v=>!!v?.url):[]}function ut(y){const v=(y?.url??"").trim();if(!v)return"";if(/^https?:\/\//i.test(v))return v;const d=window.location?.origin??"",m=v.replace(/^\/+/,"");return`${d}/${m}`}function Zt(y){const v=y.style??{};return d=>{const m=v.colorAttr,g=v.colorSet??{},b=typeof m=="string"?g?.[d?.[m]]??v.color??"#3388ff":v.color??"#3388ff",O=v.stroke??b;return{weight:v.width??1,color:O,opacity:v.opacity??1,fill:v.type?v.type!=="polyline":!0,fillColor:b,fillOpacity:v.opacity??.5}}}function Yt(y,v){if(!u||!v?.latlng||y.popup===!1)return;const d=u.latLngToContainerPoint(v.latlng),m=ht(v),g=Xt(y,m);if(!g.length){et(y.id);return}E.value={layerId:y.id,title:m?.name??y.name,properties:m,entries:g,point:{x:d.x,y:d.y}}}function et(y){y&&E.value?.layerId!==y||(E.value=null)}function ht(y){return y?.layer?.properties||y?.layer?.feature?.properties||y?.properties||y?.data||{}}function Xt(y,v={}){const d=m=>m==null||m===""?"—":typeof m=="object"?JSON.stringify(m):String(m);return y.popup&&Array.isArray(y.popup)&&y.popup.length?y.popup.map(m=>({label:m.label||m.field,value:d(v?.[m.field])})):Object.entries(v).map(([m,g])=>({label:m,value:d(g)}))}function Vn(y,v){if(!u||y.popup===!1||!v?.latlng)return;const d=ht(v),m=Xt(y,d);if(!m.length)return;const g=['<div class="map-popup">'];g.push('<div class="map-popup__body">'),m.forEach(b=>{g.push(`<div class="map-popup__row"><span class="map-popup__label">${b.label}: </span><span class="map-popup__value">${b.value}</span></div>`)}),g.push("</div></div>"),k.popup({maxWidth:360}).setLatLng(v.latlng).setContent(g.join("")).openOn(u)}e.onMounted(async()=>{k=await Se(),k.drawLocal={...hl};const y=typeof i?.zoom=="number"&&Number.isFinite(i.zoom)?i.zoom:10;u=k.map(p.value,{zoomControl:!1}).setView(a,y),k.control.zoom({position:"bottomright"}).addTo(u),C=k.tileLayer(_[x.value].url,{maxZoom:19}).addTo(u),f=new k.FeatureGroup().addTo(u),vt(),qe(),o.ctrlZoom&&(K=kt());const v=yo(o.geom);if(v){const d=[];k.geoJSON(v).eachLayer(m=>d.push(m)),d.length&&f.addLayer(d[0]),bt()}if(p.value){const d=new ResizeObserver(()=>{u&&u.invalidateSize()});d.observe(p.value),e.onBeforeUnmount(()=>{d.disconnect()})}});function eo(){if(!f)return;f.clearLayers();const y=yo(o.geom);if(!y)return;const v=[];k.geoJSON(y).eachLayer(d=>v.push(d)),v.length&&(v.forEach(d=>f.addLayer(d)),bt())}e.onBeforeUnmount(()=>{K?.(),no(),h&&u?.hasLayer(h)&&u.removeLayer(h)});function Be(y){const v=(y?.service??"").toLowerCase();if(v)return v;const d=(y?.url??"").toLowerCase();return/\.(mvt|pbf|vtile|vmt)(\?|$)/.test(d)?"vtile":/service=wms|request=getmap|\/(wms|ows)(\?|$)/.test(d)?"wms":""}function Qt(y){const v=Be(y),d=ut(y),g={opacity:y?.style?.opacity??1,...y.options??{}},b=!!(y?.style&&Object.keys(y.style).length),O=y.sourceLayer||y.layer||y.service_layer||y.service_key||y.map_key||y.dataset?.layer||y.id;if(v==="vtile"){const L=k?.vectorGrid;if(L?.protobuf&&(b||!k?.maplibreGL)){const R=L.protobuf(d,{interactive:!0,maxNativeZoom:y.maxzoom??19,vectorTileLayerStyles:{[O??"default"]:Zt(y),default:Zt(y)}});return R.on?.("mouseover",P=>Yt(y,P)),R.on?.("mousemove",P=>Yt(y,P)),R.on?.("mouseout",()=>et(y.id)),R.on?.("click",P=>Vn(y,P)),R}if(!b&&k?.maplibreGL&&window?.maplibregl){const R=d;return k.maplibreGL({style:R,interactive:!1,pane:"overlayPane"})}}if(v==="wms"&&k?.tileLayer?.wms){const L={...y.params??{}};return O&&!L.layers&&(L.layers=O),L.format==null&&(L.format="image/png"),L.transparent==null&&(L.transparent=!0),k.tileLayer.wms(d,{...L,...g})}return k.tileLayer(d,g)}function gt(y){const v=("bounds"in y?y.bounds:void 0)??o.bounds??I.value;if(!Array.isArray(v)||!v.length||!k)return null;const m={color:y.style?.stroke??y.style?.color??"#2563eb",weight:y.style?.width??2,interactive:!1,opacity:y.style?.opacity??.8,dashArray:"4 4"},g=Array.isArray(y.bounds)&&y.bounds.length?y.bounds:v,b=to(g);if(!b.length||!k.polyline)return null;const O=b.map(L=>{if(!L.length)return L;const R=L[0],P=L[L.length-1];return R&&P&&(!P.equals||!P.equals(R))?[...L,R]:L});return k.polyline(O,m)}function to(y){const v=g=>{if(!Array.isArray(g)||g.length<2)return null;const[b,O]=g;return!Number.isFinite(Number(O))||!Number.isFinite(Number(b))?null:k.latLng(Number(O),Number(b))},d=g=>Array.isArray(g)&&g.length>=2&&g.every(b=>Number.isFinite(Number(b))),m=g=>Array.isArray(g)?g.map(v).filter(Boolean):[];if(!Array.isArray(y))return[];if(y.length&&d(y[0])){const g=y.map(v).filter(Boolean);return g.length?[g]:[]}if(y.length&&Array.isArray(y[0])){if(d(y[0][0]))return y.map(b=>m(b)).filter(b=>b.length);if(Array.isArray(y[0][0])&&d(y[0][0][0]))return y.flatMap(b=>Array.isArray(b)?b.map(O=>m(O)).filter(O=>O.length):[]).filter(b=>b.length)}return[]}function no(){Object.values(A).forEach(y=>{y.layer&&u?.hasLayer(y.layer)&&u.removeLayer(y.layer),y.boundsLayer&&u?.hasLayer(y.boundsLayer)&&u.removeLayer(y.boundsLayer),y.layer=null,y.boundsLayer=null}),et()}function qe(){if(!u)return;h&&u.hasLayer(h)&&u.removeLayer(h);const y=gt({id:"global-bounds",bounds:o.bounds,style:{}});y?(h=y,h.addTo(u)):h=null}function yt(){u&&F.value.forEach(y=>{const v=A[y];v&&(v.visible?(v.layer||(v.layer=Qt(v.config)),v.boundsLayer||(v.boundsLayer=gt(v.config)),v.layer&&!u.hasLayer(v.layer)&&v.layer.addTo(u),v.boundsLayer&&!u.hasLayer(v.boundsLayer)&&v.boundsLayer.addTo(u)):(v.layer&&u.hasLayer(v.layer)&&u.removeLayer(v.layer),v.boundsLayer&&u.hasLayer(v.boundsLayer)&&u.removeLayer(v.boundsLayer)))})}function vt(){const y=Qn(),v=[],d=new Set;y.forEach((m,g)=>{const b=xe(m,g);v.push(b),d.add(b);const O=A[b];O&&O.config.url!==m.url&&(O.layer&&u?.hasLayer(O.layer)&&u.removeLayer(O.layer),O.layer=null);const L=O?.visible??m.visible??!1;A[b]={id:b,config:{...m,id:b},visible:L,layer:O?.layer??null,boundsLayer:O?.boundsLayer??null}}),Object.keys(A).forEach(m=>{if(!d.has(m)){const g=A[m];g?.layer&&u?.hasLayer(g.layer)&&u.removeLayer(g.layer),delete A[m]}}),F.value=v,u&&yt()}function oo(y,v){const d=typeof v=="boolean"?v:v.target?.checked;if(d==null)return;const m=A[y];m&&(m.visible=d,m.visible?(m.layer||(m.layer=Qt(m.config)),m.boundsLayer||(m.boundsLayer=gt(m.config)),m.layer&&!u.hasLayer(m.layer)&&m.layer.addTo(u),m.boundsLayer&&!u.hasLayer(m.boundsLayer)&&m.boundsLayer.addTo(u)):(m.layer&&u.hasLayer(m.layer)&&(u.removeLayer(m.layer),et(y)),m.boundsLayer&&u.hasLayer(m.boundsLayer)&&u.removeLayer(m.boundsLayer)))}function so(y){Vt(y),x.value=y}function Vt(y){if(!u||!_[y])return;C&&C.removeFrom(u);const v=_[y];C=k.tileLayer(v.url,v.options||{}).addTo(u),C.bringToBack()}function en(){!u||!f||M.value&&!u.hasLayer(f)&&f.addTo(u)}function ro(){so(x.value)}function io(){M.value?f.addTo(u):f.removeFrom(u)}function tn(){B.value=!B.value}function bt(y=30){const v=f.getLayers();if(!v.length)return;const m=k.featureGroup(v).getBounds();m&&m.isValid()&&u.fitBounds(m,{padding:[y,y],maxZoom:16})}function kt(){if(!u||!p.value)return null;u.scrollWheelZoom.disable(),H.value="Використовуйте Ctrl + колесо миші для зміни масштабу";let y;const v=(m=1500)=>{S.value=!0,y&&clearTimeout(y),y=window.setTimeout(()=>S.value=!1,m)},d=m=>{if(!(m.ctrlKey||m.metaKey||m.shiftKey)){v(),u.scrollWheelZoom.disable();return}m.preventDefault(),m.stopPropagation(),u.scrollWheelZoom.enable(),S.value=!1,y&&clearTimeout(y),y=window.setTimeout(()=>u.scrollWheelZoom.disable(),200)};return p.value.addEventListener("wheel",d,{passive:!1}),()=>{u.scrollWheelZoom.enable(),p.value?.removeEventListener("wheel",d),y&&clearTimeout(y),S.value=!1}}return e.watch(B,async()=>{await e.nextTick(),requestAnimationFrame(()=>{u?.invalidateSize(!0),Vt(x.value),en(),yt(),h&&!u?.hasLayer(h)&&h.addTo(u)})}),e.watch(()=>o.layers,()=>vt(),{deep:!0}),e.watch(()=>[o.tms,o.pattern],()=>{o.layers?.length||vt()}),e.watch(()=>o.bounds,()=>qe(),{deep:!0}),e.watch(()=>o.geom,()=>eo(),{deep:!0}),e.watch(()=>o.katottg,async y=>{if(I.value=[],!y){qe();return}try{const v=await fetch(`https://data.gki.com.ua/api-user/atu/${y}`);if(!v?.ok)return;const m=(await v.json())?.geometry?.coordinates;Array.isArray(m)&&m.length&&(I.value=m)}catch(v){console.error("Failed to fetch KATOTTG bounds",v)}finally{qe(),yt()}},{immediate:!0}),(y,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(J.value),style:e.normalizeStyle(le.value)},[e.createElementVNode("div",{ref_key:"mapContainer",ref:p,class:e.normalizeClass(Ie.value)},null,2),S.value?(e.openBlock(),e.createElementBlock("div",gl,[e.createElementVNode("div",yl,e.toDisplayString(H.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(N.value)},[e.createElementVNode("div",vl,[e.createElementVNode("dl",bl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,d=>(e.openBlock(),e.createElementBlock("div",{key:`${d.label}-${d.value}`,class:"flex justify-between gap-2"},[e.createElementVNode("dt",kl,e.toDisplayString(d.label),1),e.createElementVNode("dd",El,e.toDisplayString(d.value),1)]))),128))])])],4)):e.createCommentVNode("",!0),D.value.length?(e.openBlock(),e.createElementBlock("div",wl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.key,class:"flex items-center gap-2 text-gray-800"},[e.createElementVNode("span",{class:"w-3.5 h-3.5 rounded-[2px] border border-black/10 shrink-0",style:e.normalizeStyle({backgroundColor:d.color})},null,4),e.createElementVNode("span",Nl,e.toDisplayString(d.label),1)]))),128))])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:3,onClick:v[0]||(v[0]=d=>$.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",xl,[e.createElementVNode("div",_l,[v[5]||(v[5]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:v[1]||(v[1]=d=>$.value=!1),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4"},v[4]||(v[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",Cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_),(d,m)=>(e.openBlock(),e.createElementBlock("div",{key:`base-${m}`},[e.createElementVNode("label",Sl,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:w,value:m,"onUpdate:modelValue":v[2]||(v[2]=g=>x.value=g),onChange:ro},null,40,Bl),[[e.vModelRadio,x.value]]),e.createElementVNode("span",Tl,e.toDisplayString(d.name||m),1)])]))),128))]),e.createElementVNode("div",$l,[e.createElementVNode("label",Dl,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":v[3]||(v[3]=d=>M.value=d),onChange:io},null,544),[[e.vModelCheckbox,M.value]]),v[6]||(v[6]=e.createElementVNode("span",{class:"ml-2"},"Геометрія/Межі",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,d=>(e.openBlock(),e.createElementBlock("label",{class:"flex items-center",key:d.id},[e.createElementVNode("input",{type:"checkbox",checked:d.visible,onChange:m=>oo(d.id,m)},null,40,Ll),e.createElementVNode("span",Ol,e.toDisplayString(d.config.name||d.id),1)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"absolute z-[500] bg-white p-2 border rounded-lg cursor-pointer fullscreen-button bottom-[100px] right-[7px]",onClick:tn,"aria-label":"Toggle fullscreen"},v[7]||(v[7]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 8V4h4M20 8V4h-4M4 16v4h4m12-4v4h-4"})],-1)]))],6))}});/**
|
|
132
|
-
* @vue/shared v3.5.18
|
|
133
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
134
|
-
* @license MIT
|
|
135
|
-
**//*! #__NO_SIDE_EFFECTS__ */function Ee(t){const n=Object.create(null);for(const o of t.split(","))n[o]=1;return o=>o in n}const Al=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const cn=()=>{},St=()=>!1,dn=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Te=Object.assign,we=Array.isArray,te=t=>typeof t=="string",pn=t=>typeof t=="symbol",Il=t=>t!==null&&typeof t=="object",vo=Ee(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ml=Ee("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),fn=t=>{const n=Object.create(null);return o=>n[o]||(n[o]=t(o))},Rl=/-(\w)/g,$e=fn(t=>t.replace(Rl,(n,o)=>o?o.toUpperCase():"")),mn=fn(t=>t.charAt(0).toUpperCase()+t.slice(1)),Pl=fn(t=>t?`on${mn(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"},Fl={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},zl=/;(?![^(]*\))/g,jl=/:([^]+)/,Hl=/\/\*[^]*?\*\//g;function Ul(t){const n={};return t.replace(Hl,"").split(zl).forEach(o=>{if(o){const s=o.split(jl);s.length>1&&(n[s[0].trim()]=s[1].trim())}}),n}const ql="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",Wl="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",Kl="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",Gl="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Jl=Ee(ql),Zl=Ee(Wl),Yl=Ee(Kl),Xl=Ee(Gl);/**
|
|
136
|
-
* @vue/compiler-core v3.5.18
|
|
137
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
138
|
-
* @license MIT
|
|
139
|
-
**/const nt=Symbol(process.env.NODE_ENV!=="production"?"Fragment":""),ot=Symbol(process.env.NODE_ENV!=="production"?"Teleport":""),un=Symbol(process.env.NODE_ENV!=="production"?"Suspense":""),Bt=Symbol(process.env.NODE_ENV!=="production"?"KeepAlive":""),bo=Symbol(process.env.NODE_ENV!=="production"?"BaseTransition":""),Re=Symbol(process.env.NODE_ENV!=="production"?"openBlock":""),ko=Symbol(process.env.NODE_ENV!=="production"?"createBlock":""),Eo=Symbol(process.env.NODE_ENV!=="production"?"createElementBlock":""),hn=Symbol(process.env.NODE_ENV!=="production"?"createVNode":""),gn=Symbol(process.env.NODE_ENV!=="production"?"createElementVNode":""),st=Symbol(process.env.NODE_ENV!=="production"?"createCommentVNode":""),yn=Symbol(process.env.NODE_ENV!=="production"?"createTextVNode":""),wo=Symbol(process.env.NODE_ENV!=="production"?"createStaticVNode":""),vn=Symbol(process.env.NODE_ENV!=="production"?"resolveComponent":""),bn=Symbol(process.env.NODE_ENV!=="production"?"resolveDynamicComponent":""),kn=Symbol(process.env.NODE_ENV!=="production"?"resolveDirective":""),En=Symbol(process.env.NODE_ENV!=="production"?"resolveFilter":""),wn=Symbol(process.env.NODE_ENV!=="production"?"withDirectives":""),Nn=Symbol(process.env.NODE_ENV!=="production"?"renderList":""),No=Symbol(process.env.NODE_ENV!=="production"?"renderSlot":""),xo=Symbol(process.env.NODE_ENV!=="production"?"createSlots":""),Tt=Symbol(process.env.NODE_ENV!=="production"?"toDisplayString":""),$t=Symbol(process.env.NODE_ENV!=="production"?"mergeProps":""),xn=Symbol(process.env.NODE_ENV!=="production"?"normalizeClass":""),_n=Symbol(process.env.NODE_ENV!=="production"?"normalizeStyle":""),rt=Symbol(process.env.NODE_ENV!=="production"?"normalizeProps":""),it=Symbol(process.env.NODE_ENV!=="production"?"guardReactiveProps":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"toHandlers":""),Sn=Symbol(process.env.NODE_ENV!=="production"?"camelize":""),Ql=Symbol(process.env.NODE_ENV!=="production"?"capitalize":""),Bn=Symbol(process.env.NODE_ENV!=="production"?"toHandlerKey":""),Dt=Symbol(process.env.NODE_ENV!=="production"?"setBlockTracking":""),Vl=Symbol(process.env.NODE_ENV!=="production"?"pushScopeId":""),ea=Symbol(process.env.NODE_ENV!=="production"?"popScopeId":""),Tn=Symbol(process.env.NODE_ENV!=="production"?"withCtx":""),ta=Symbol(process.env.NODE_ENV!=="production"?"unref":""),na=Symbol(process.env.NODE_ENV!=="production"?"isRef":""),$n=Symbol(process.env.NODE_ENV!=="production"?"withMemo":""),_o=Symbol(process.env.NODE_ENV!=="production"?"isMemoSame":""),Ge={[nt]:"Fragment",[ot]:"Teleport",[un]:"Suspense",[Bt]:"KeepAlive",[bo]:"BaseTransition",[Re]:"openBlock",[ko]:"createBlock",[Eo]:"createElementBlock",[hn]:"createVNode",[gn]:"createElementVNode",[st]:"createCommentVNode",[yn]:"createTextVNode",[wo]:"createStaticVNode",[vn]:"resolveComponent",[bn]:"resolveDynamicComponent",[kn]:"resolveDirective",[En]:"resolveFilter",[wn]:"withDirectives",[Nn]:"renderList",[No]:"renderSlot",[xo]:"createSlots",[Tt]:"toDisplayString",[$t]:"mergeProps",[xn]:"normalizeClass",[_n]:"normalizeStyle",[rt]:"normalizeProps",[it]:"guardReactiveProps",[Cn]:"toHandlers",[Sn]:"camelize",[Ql]:"capitalize",[Bn]:"toHandlerKey",[Dt]:"setBlockTracking",[Vl]:"pushScopeId",[ea]:"popScopeId",[Tn]:"withCtx",[ta]:"unref",[na]:"isRef",[$n]:"withMemo",[_o]:"isMemoSame"};function oa(t){Object.getOwnPropertySymbols(t).forEach(n=>{Ge[n]=t[n]})}const fe={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function sa(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 lt(t,n,o,s,r,l,i,a=!1,c=!1,p=!1,u=fe){return t&&(a?(t.helper(Re),t.helper(Ye(t.inSSR,p))):t.helper(Ze(t.inSSR,p)),i&&t.helper(wn)),{type:13,tag:n,props:o,children:s,patchFlag:r,dynamicProps:l,directives:i,isBlock:a,disableTracking:c,isComponent:p,loc:u}}function Pe(t,n=fe){return{type:17,loc:n,elements:t}}function ye(t,n=fe){return{type:15,loc:n,properties:t}}function X(t,n){return{type:16,loc:fe,key:te(t)?j(t,!0):t,value:n}}function j(t,n=!1,o=fe,s=0){return{type:4,loc:o,content:t,isStatic:n,constType:n?3:s}}function ve(t,n=fe){return{type:8,loc:n,children:t}}function ee(t,n=[],o=fe){return{type:14,loc:o,callee:t,arguments:n}}function Je(t,n=void 0,o=!1,s=!1,r=fe){return{type:18,params:t,returns:n,newline:o,isSlot:s,loc:r}}function Dn(t,n,o,s=!0){return{type:19,test:t,consequent:n,alternate:o,newline:s,loc:fe}}function ra(t,n,o=!1,s=!1){return{type:20,index:t,value:n,needPauseTracking:o,inVOnce:s,needArraySpread:!1,loc:fe}}function ia(t){return{type:21,body:t,loc:fe}}function Ze(t,n){return t||n?hn:gn}function Ye(t,n){return t||n?ko:Eo}function Ln(t,{helper:n,removeHelper:o,inSSR:s}){t.isBlock||(t.isBlock=!0,o(Ze(s,t.isComponent)),n(Re),n(Ye(s,t.isComponent)))}const Co=new Uint8Array([123,123]),So=new Uint8Array([125,125]);function Bo(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 De(t){return t===47||t===62||me(t)}function Lt(t){const n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}const ne={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 la{constructor(n,o){this.stack=n,this.cbs=o,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=Co,this.delimiterClose=So,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=Co,this.delimiterClose=So}getPos(n){let o=1,s=n+1;for(let r=this.newlines.length-1;r>=0;r--){const l=this.newlines[r];if(n>l){o=r+2,s=n-l;break}}return{column:s,line:o,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 o=this.index+1-this.delimiterOpen.length;o>this.sectionStart&&this.cbs.ontext(this.sectionStart,o),this.state=3,this.sectionStart=o}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 o=this.sequenceIndex===this.currentSequence.length;if(!(o?De(n):(n|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!o){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 o=this.index-this.currentSequence.length;if(this.sectionStart<o){const s=this.index;this.index=o,this.cbs.ontext(this.sectionStart,o),this.index=s}this.sectionStart=o+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===ne.TitleEnd||this.currentSequence===ne.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===ne.Cdata[this.sequenceIndex]?++this.sequenceIndex===ne.Cdata.length&&(this.state=28,this.currentSequence=ne.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 o=this.buffer.charCodeAt(this.index);if(o===10&&this.newlines.push(this.index),o===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===ne.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,o){this.enterRCDATA(n,o),this.state=31}enterRCDATA(n,o){this.inRCDATA=!0,this.currentSequence=n,this.sequenceIndex=o}stateBeforeTagName(n){n===33?(this.state=22,this.sectionStart=this.index+1):n===63?(this.state=24,this.sectionStart=this.index+1):Bo(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){De(n)&&this.handleTagName(n)}stateInSFCRootTagName(n){if(De(n)){const o=this.buffer.slice(this.sectionStart,this.index);o!=="template"&&this.enterRCDATA(Lt("</"+o),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=Bo(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||De(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||De(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||De(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||De(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||De(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,o){(n===o||this.fastForwardTo(o))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(o===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=ne.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===ne.ScriptEnd[3]?this.startSpecial(ne.ScriptEnd,4):n===ne.StyleEnd[3]?this.startSpecial(ne.StyleEnd,4):(this.state=6,this.stateInTagName(n))}stateBeforeSpecialT(n){n===ne.TitleEnd[3]?this.startSpecial(ne.TitleEnd,4):n===ne.TextareaEnd[3]?this.startSpecial(ne.TextareaEnd,4):(this.state=6,this.stateInTagName(n))}startEntity(){}stateInEntity(){}parse(n){for(this.buffer=n;this.index<this.buffer.length;){const o=this.buffer.charCodeAt(this.index);switch(o===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(o);break}case 2:{this.stateInterpolationOpen(o);break}case 3:{this.stateInterpolation(o);break}case 4:{this.stateInterpolationClose(o);break}case 31:{this.stateSpecialStartSequence(o);break}case 32:{this.stateInRCDATA(o);break}case 26:{this.stateCDATASequence(o);break}case 19:{this.stateInAttrValueDoubleQuotes(o);break}case 12:{this.stateInAttrName(o);break}case 13:{this.stateInDirName(o);break}case 14:{this.stateInDirArg(o);break}case 15:{this.stateInDynamicDirArg(o);break}case 16:{this.stateInDirModifier(o);break}case 28:{this.stateInCommentLike(o);break}case 27:{this.stateInSpecialComment(o);break}case 11:{this.stateBeforeAttrName(o);break}case 6:{this.stateInTagName(o);break}case 34:{this.stateInSFCRootTagName(o);break}case 9:{this.stateInClosingTagName(o);break}case 5:{this.stateBeforeTagName(o);break}case 17:{this.stateAfterAttrName(o);break}case 20:{this.stateInAttrValueSingleQuotes(o);break}case 18:{this.stateBeforeAttrValue(o);break}case 8:{this.stateBeforeClosingTagName(o);break}case 10:{this.stateAfterClosingTagName(o);break}case 29:{this.stateBeforeSpecialS(o);break}case 30:{this.stateBeforeSpecialT(o);break}case 21:{this.stateInAttrValueNoQuotes(o);break}case 7:{this.stateInSelfClosingTag(o);break}case 23:{this.stateInDeclaration(o);break}case 22:{this.stateBeforeDeclaration(o);break}case 25:{this.stateBeforeComment(o);break}case 24:{this.stateInProcessingInstruction(o);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===ne.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,o){}}const aa={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 On(t,{compatConfig:n}){const o=n&&n[t];return t==="MODE"?o||3:o}function Le(t,n){const o=On("MODE",n),s=On(t,n);return o===3?s===!0:s!==!1}function Xe(t,n,o,...s){const r=Le(t,n);return process.env.NODE_ENV!=="production"&&r&&Ot(t,n,o,...s),r}function Ot(t,n,o,...s){if(On(t,n)==="suppress-warning")return;const{message:l,link:i}=aa[t],a=`(deprecation ${t}) ${typeof l=="function"?l(...s):l}${i?`
|
|
140
|
-
Details: ${i}`:""}`,c=new SyntaxError(a);c.code=t,o&&(c.loc=o),n.onWarn(c)}function An(t){throw t}function To(t){process.env.NODE_ENV!=="production"&&console.warn(`[Vue warn] ${t.message}`)}function W(t,n,o,s){const r=process.env.NODE_ENV!=="production"?(o||ca)[t]+(s||""):`https://vuejs.org/error-reference/#compiler-${t}`,l=new SyntaxError(String(r));return l.code=t,l.loc=n,l}const ca={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:""},ae=t=>t.type===4&&t.isStatic;function $o(t){switch(t){case"Teleport":case"teleport":return ot;case"Suspense":case"suspense":return un;case"KeepAlive":case"keep-alive":return Bt;case"BaseTransition":case"base-transition":return bo}}const da=/^$|^\d|[^\$\w\xA0-\uFFFF]/,In=t=>!da.test(t),pa=/[A-Za-z_$\xA0-\uFFFF]/,fa=/[\.\?\w$\xA0-\uFFFF]/,ma=/\s+[.[]\s*|\s*[.[]\s+/g,Do=t=>t.type===4?t.content:t.loc.source,Lo=t=>{const n=Do(t).trim().replace(ma,a=>a.trim());let o=0,s=[],r=0,l=0,i=null;for(let a=0;a<n.length;a++){const c=n.charAt(a);switch(o){case 0:if(c==="[")s.push(o),o=1,r++;else if(c==="(")s.push(o),o=2,l++;else if(!(a===0?pa:fa).test(c))return!1;break;case 1:c==="'"||c==='"'||c==="`"?(s.push(o),o=3,i=c):c==="["?r++:c==="]"&&(--r||(o=s.pop()));break;case 2:if(c==="'"||c==='"'||c==="`")s.push(o),o=3,i=c;else if(c==="(")l++;else if(c===")"){if(a===n.length-1)return!1;--l||(o=s.pop())}break;case 3:c===i&&(o=s.pop(),i=null);break}}return!r&&!l},ua=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,ha=t=>ua.test(Do(t));function Oo(t,n){if(!t)throw new Error(n||"unexpected compiler condition")}function ce(t,n,o=!1){for(let s=0;s<t.props.length;s++){const r=t.props[s];if(r.type===7&&(o||r.exp)&&(te(n)?r.name===n:n.test(r.name)))return r}}function at(t,n,o=!1,s=!1){for(let r=0;r<t.props.length;r++){const l=t.props[r];if(l.type===6){if(o)continue;if(l.name===n&&(l.value||s))return l}else if(l.name==="bind"&&(l.exp||s)&&Oe(l.arg,n))return l}}function Oe(t,n){return!!(t&&ae(t)&&t.content===n)}function ga(t){return t.props.some(n=>n.type===7&&n.name==="bind"&&(!n.arg||n.arg.type!==4||!n.arg.isStatic))}function Mn(t){return t.type===5||t.type===2}function Ao(t){return t.type===7&&t.name==="pre"}function ya(t){return t.type===7&&t.name==="slot"}function At(t){return t.type===1&&t.tagType===3}function It(t){return t.type===1&&t.tagType===2}const va=new Set([rt,it]);function Io(t,n=[]){if(t&&!te(t)&&t.type===14){const o=t.callee;if(!te(o)&&va.has(o))return Io(t.arguments[0],n.concat(t))}return[t,n]}function Mt(t,n,o){let s,r=t.type===13?t.props:t.arguments[2],l=[],i;if(r&&!te(r)&&r.type===14){const a=Io(r);r=a[0],l=a[1],i=l[l.length-1]}if(r==null||te(r))s=ye([n]);else if(r.type===14){const a=r.arguments[0];!te(a)&&a.type===15?Mo(n,a)||a.properties.unshift(n):r.callee===Cn?s=ee(o.helper($t),[ye([n]),r]):r.arguments.unshift(ye([n])),!s&&(s=r)}else r.type===15?(Mo(n,r)||r.properties.unshift(n),s=r):(s=ee(o.helper($t),[ye([n]),r]),i&&i.callee===it&&(i=l[l.length-2]));t.type===13?i?i.arguments[0]=s:t.props=s:i?i.arguments[0]=s:t.arguments[2]=s}function Mo(t,n){let o=!1;if(t.key.type===4){const s=t.key.content;o=n.properties.some(r=>r.key.type===4&&r.key.content===s)}return o}function ct(t,n){return`_${n}_${t.replace(/[^\w]/g,(o,s)=>o==="-"?"_":t.charCodeAt(s).toString())}`}function ba(t){return t.type===14&&t.callee===$n?t.arguments[1].returns:t}const ka=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Ro={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:St,isPreTag:St,isIgnoreNewlineTag:St,isCustomElement:St,onError:An,onWarn:To,comments:process.env.NODE_ENV!=="production",prefixIdentifiers:!1};let q=Ro,dt=null,_e="",se=null,U=null,de="",Ce=-1,Fe=-1,Rn=0,Ae=!1,Pn=null;const Z=[],G=new la(Z,{onerr:pe,ontext(t,n){Rt(oe(t,n),t,n)},ontextentity(t,n,o){Rt(t,n,o)},oninterpolation(t,n){if(Ae)return Rt(oe(t,n),t,n);let o=t+G.delimiterOpen.length,s=n-G.delimiterClose.length;for(;me(_e.charCodeAt(o));)o++;for(;me(_e.charCodeAt(s-1));)s--;let r=oe(o,s);r.includes("&")&&(r=q.decodeEntities(r,!1)),Fn({type:5,content:Ft(r,!1,Q(o,s)),loc:Q(t,n)})},onopentagname(t,n){const o=oe(t,n);se={type:1,tag:o,ns:q.getNamespace(o,Z[0],q.ns),tagType:0,props:[],children:[],loc:Q(t-1,n),codegenNode:void 0}},onopentagend(t){Fo(t)},onclosetag(t,n){const o=oe(t,n);if(!q.isVoidTag(o)){let s=!1;for(let r=0;r<Z.length;r++)if(Z[r].tag.toLowerCase()===o.toLowerCase()){s=!0,r>0&&pe(24,Z[0].loc.start.offset);for(let i=0;i<=r;i++){const a=Z.shift();Pt(a,n,i<r)}break}s||pe(23,zo(t,60))}},onselfclosingtag(t){const n=se.tag;se.isSelfClosing=!0,Fo(t),Z[0]&&Z[0].tag===n&&Pt(Z.shift(),t)},onattribname(t,n){U={type:6,name:oe(t,n),nameLoc:Q(t,n),value:void 0,loc:Q(t)}},ondirname(t,n){const o=oe(t,n),s=o==="."||o===":"?"bind":o==="@"?"on":o==="#"?"slot":o.slice(2);if(!Ae&&s===""&&pe(26,t),Ae||s==="")U={type:6,name:o,nameLoc:Q(t,n),value:void 0,loc:Q(t)};else if(U={type:7,name:s,rawName:o,exp:void 0,arg:void 0,modifiers:o==="."?[j("prop")]:[],loc:Q(t)},s==="pre"){Ae=G.inVPre=!0,Pn=se;const r=se.props;for(let l=0;l<r.length;l++)r[l].type===7&&(r[l]=Da(r[l]))}},ondirarg(t,n){if(t===n)return;const o=oe(t,n);if(Ae&&!Ao(U))U.name+=o,ze(U.nameLoc,n);else{const s=o[0]!=="[";U.arg=Ft(s?o:o.slice(1,-1),s,Q(t,n),s?3:0)}},ondirmodifier(t,n){const o=oe(t,n);if(Ae&&!Ao(U))U.name+="."+o,ze(U.nameLoc,n);else if(U.name==="slot"){const s=U.arg;s&&(s.content+="."+o,ze(s.loc,n))}else{const s=j(o,!0,Q(t,n));U.modifiers.push(s)}},onattribdata(t,n){de+=oe(t,n),Ce<0&&(Ce=t),Fe=n},onattribentity(t,n,o){de+=t,Ce<0&&(Ce=n),Fe=o},onattribnameend(t){const n=U.loc.start.offset,o=oe(n,t);U.type===7&&(U.rawName=o),se.props.some(s=>(s.type===7?s.rawName:s.name)===o)&&pe(2,n)},onattribend(t,n){if(se&&U){if(ze(U.loc,n),t!==0)if(de.includes("&")&&(de=q.decodeEntities(de,!0)),U.type===6)U.name==="class"&&(de=Uo(de).trim()),t===1&&!de&&pe(13,n),U.value={type:2,content:de,loc:t===1?Q(Ce,Fe):Q(Ce-1,Fe+1)},G.inSFCRoot&&se.tag==="template"&&U.name==="lang"&&de&&de!=="html"&&G.enterRCDATA(Lt("</template"),0);else{let o=0;U.exp=Ft(de,!1,Q(Ce,Fe),0,o),U.name==="for"&&(U.forParseResult=wa(U.exp));let s=-1;U.name==="bind"&&(s=U.modifiers.findIndex(r=>r.content==="sync"))>-1&&Xe("COMPILER_V_BIND_SYNC",q,U.loc,U.arg.loc.source)&&(U.name="model",U.modifiers.splice(s,1))}(U.type!==7||U.name!=="pre")&&se.props.push(U)}de="",Ce=Fe=-1},oncomment(t,n){q.comments&&Fn({type:3,content:oe(t,n),loc:Q(t-4,n+3)})},onend(){const t=_e.length;if(process.env.NODE_ENV!=="production"&&G.state!==1)switch(G.state){case 5:case 8:pe(5,t);break;case 3:case 4:pe(25,G.sectionStart);break;case 28:G.currentSequence===ne.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<Z.length;n++)Pt(Z[n],t-1),pe(24,Z[n].loc.start.offset)},oncdata(t,n){Z[0].ns!==0?Rt(oe(t,n),t,n):pe(1,t-9)},onprocessinginstruction(t){(Z[0]?Z[0].ns:q.ns)===0&&pe(21,t-1)}}),Po=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Ea=/^\(|\)$/g;function wa(t){const n=t.loc,o=t.content,s=o.match(ka);if(!s)return;const[,r,l]=s,i=(f,h,k=!1)=>{const _=n.start.offset+h,x=_+f.length;return Ft(f,!1,Q(_,x),0,k?1:0)},a={source:i(l.trim(),o.indexOf(l,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(Ea,"").trim();const p=r.indexOf(c),u=c.match(Po);if(u){c=c.replace(Po,"").trim();const f=u[1].trim();let h;if(f&&(h=o.indexOf(f,p+c.length),a.key=i(f,h,!0)),u[2]){const k=u[2].trim();k&&(a.index=i(k,o.indexOf(k,a.key?h+f.length:p+c.length),!0))}}return c&&(a.value=i(c,p,!0)),a}function oe(t,n){return _e.slice(t,n)}function Fo(t){G.inSFCRoot&&(se.innerLoc=Q(t+1,t+1)),Fn(se);const{tag:n,ns:o}=se;o===0&&q.isPreTag(n)&&Rn++,q.isVoidTag(n)?Pt(se,t):(Z.unshift(se),(o===1||o===2)&&(G.inXML=!0)),se=null}function Rt(t,n,o){{const l=Z[0]&&Z[0].tag;l!=="script"&&l!=="style"&&t.includes("&")&&(t=q.decodeEntities(t,!1))}const s=Z[0]||dt,r=s.children[s.children.length-1];r&&r.type===2?(r.content+=t,ze(r.loc,o)):s.children.push({type:2,content:t,loc:Q(n,o)})}function Pt(t,n,o=!1){o?ze(t.loc,zo(n,60)):ze(t.loc,Na(n,62)+1),G.inSFCRoot&&(t.children.length?t.innerLoc.end=Te({},t.children[t.children.length-1].loc.end):t.innerLoc.end=Te({},t.innerLoc.start),t.innerLoc.source=oe(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:s,ns:r,children:l}=t;if(Ae||(s==="slot"?t.tagType=2:jo(t)?t.tagType=3:_a(t)&&(t.tagType=1)),G.inRCDATA||(t.children=Ho(l)),r===0&&q.isIgnoreNewlineTag(s)){const i=l[0];i&&i.type===2&&(i.content=i.content.replace(/^\r?\n/,""))}r===0&&q.isPreTag(s)&&Rn--,Pn===t&&(Ae=G.inVPre=!1,Pn=null),G.inXML&&(Z[0]?Z[0].ns:q.ns)===0&&(G.inXML=!1);{const i=t.props;if(process.env.NODE_ENV!=="production"&&Le("COMPILER_V_IF_V_FOR_PRECEDENCE",q)){let c=!1,p=!1;for(let u=0;u<i.length;u++){const f=i[u];if(f.type===7&&(f.name==="if"?c=!0:f.name==="for"&&(p=!0)),c&&p){Ot("COMPILER_V_IF_V_FOR_PRECEDENCE",q,t.loc);break}}}if(!G.inSFCRoot&&Le("COMPILER_NATIVE_TEMPLATE",q)&&t.tag==="template"&&!jo(t)){process.env.NODE_ENV!=="production"&&Ot("COMPILER_NATIVE_TEMPLATE",q,t.loc);const c=Z[0]||dt,p=c.children.indexOf(t);c.children.splice(p,1,...t.children)}const a=i.find(c=>c.type===6&&c.name==="inline-template");a&&Xe("COMPILER_INLINE_TEMPLATE",q,a.loc)&&t.children.length&&(a.value={type:2,content:oe(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function Na(t,n){let o=t;for(;_e.charCodeAt(o)!==n&&o<_e.length-1;)o++;return o}function zo(t,n){let o=t;for(;_e.charCodeAt(o)!==n&&o>=0;)o--;return o}const xa=new Set(["if","else","else-if","for","slot"]);function jo({tag:t,props:n}){if(t==="template"){for(let o=0;o<n.length;o++)if(n[o].type===7&&xa.has(n[o].name))return!0}return!1}function _a({tag:t,props:n}){if(q.isCustomElement(t))return!1;if(t==="component"||Ca(t.charCodeAt(0))||$o(t)||q.isBuiltInComponent&&q.isBuiltInComponent(t)||q.isNativeTag&&!q.isNativeTag(t))return!0;for(let o=0;o<n.length;o++){const s=n[o];if(s.type===6){if(s.name==="is"&&s.value){if(s.value.content.startsWith("vue:"))return!0;if(Xe("COMPILER_IS_ON_ELEMENT",q,s.loc))return!0}}else if(s.name==="bind"&&Oe(s.arg,"is")&&Xe("COMPILER_IS_ON_ELEMENT",q,s.loc))return!0}return!1}function Ca(t){return t>64&&t<91}const Sa=/\r\n/g;function Ho(t){const n=q.whitespace!=="preserve";let o=!1;for(let s=0;s<t.length;s++){const r=t[s];if(r.type===2)if(Rn)r.content=r.content.replace(Sa,`
|
|
142
|
-
`);else if(Ba(r.content)){const l=t[s-1]&&t[s-1].type,i=t[s+1]&&t[s+1].type;!l||!i||n&&(l===3&&(i===3||i===1)||l===1&&(i===3||i===1&&Ta(r.content)))?(o=!0,t[s]=null):r.content=" "}else n&&(r.content=Uo(r.content))}return o?t.filter(Boolean):t}function Ba(t){for(let n=0;n<t.length;n++)if(!me(t.charCodeAt(n)))return!1;return!0}function Ta(t){for(let n=0;n<t.length;n++){const o=t.charCodeAt(n);if(o===10||o===13)return!0}return!1}function Uo(t){let n="",o=!1;for(let s=0;s<t.length;s++)me(t.charCodeAt(s))?o||(n+=" ",o=!0):(n+=t[s],o=!1);return n}function Fn(t){(Z[0]||dt).children.push(t)}function Q(t,n){return{start:G.getPos(t),end:n==null?n:G.getPos(n),source:n==null?n:oe(t,n)}}function $a(t){return Q(t.start.offset,t.end.offset)}function ze(t,n){t.end=G.getPos(n),t.source=oe(t.start.offset,n)}function Da(t){const n={type:6,name:t.rawName,nameLoc:Q(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const o=t.exp.loc;o.end.offset<t.loc.end.offset&&(o.start.offset--,o.start.column--,o.end.offset++,o.end.column++),n.value={type:2,content:t.exp.content,loc:o}}return n}function Ft(t,n=!1,o,s=0,r=0){return j(t,n,o,s)}function pe(t,n,o){q.onError(W(t,Q(n,n),void 0,o))}function La(){G.reset(),se=null,U=null,de="",Ce=-1,Fe=-1,Z.length=0}function Oa(t,n){if(La(),_e=t,q=Te({},Ro),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.");G.mode=q.parseMode==="html"?1:q.parseMode==="sfc"?2:0,G.inXML=q.ns===1||q.ns===2;const o=n&&n.delimiters;o&&(G.delimiterOpen=Lt(o[0]),G.delimiterClose=Lt(o[1]));const s=dt=sa([],t);return G.parse(_e),s.loc=Q(0,t.length),s.children=Ho(s.children),dt=null,s}function Aa(t,n){zt(t,void 0,n,!!qo(t))}function qo(t){const n=t.children.filter(o=>o.type!==3);return n.length===1&&n[0].type===1&&!It(n[0])?n[0]:null}function zt(t,n,o,s=!1,r=!1){const{children:l}=t,i=[];for(let f=0;f<l.length;f++){const h=l[f];if(h.type===1&&h.tagType===0){const k=s?0:ue(h,o);if(k>0){if(k>=2){h.codegenNode.patchFlag=-1,i.push(h);continue}}else{const _=h.codegenNode;if(_.type===13){const x=_.patchFlag;if((x===void 0||x===512||x===1)&&Ko(h,o)>=2){const w=Go(h);w&&(_.props=o.hoist(w))}_.dynamicProps&&(_.dynamicProps=o.hoist(_.dynamicProps))}}}else if(h.type===12&&(s?0:ue(h,o))>=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 k=h.tagType===1;k&&o.scopes.vSlot++,zt(h,t,o,!1,r),k&&o.scopes.vSlot--}else if(h.type===11)zt(h,t,o,h.children.length===1,!0);else if(h.type===9)for(let k=0;k<h.branches.length;k++)zt(h.branches[k],t,o,h.branches[k].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=p(Pe(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 f=u(t.codegenNode,"default");f&&(c.push(o.cached.length),f.returns=p(Pe(f.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 f=ce(t,"slot",!0),h=f&&f.arg&&u(n.codegenNode,f.arg);h&&(c.push(o.cached.length),h.returns=p(Pe(h.returns)),a=!0)}}if(!a)for(const f of i)c.push(o.cached.length),f.codegenNode=o.cache(f.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(X("__",j(JSON.stringify(c),!1)));function p(f){const h=o.cache(f);return r&&o.hmr&&(h.needArraySpread=!0),h}function u(f,h){if(f.children&&!we(f.children)&&f.children.type===15){const k=f.children.properties.find(_=>_.key===h||_.key.content===h);return k&&k.value}}i.length&&o.transformHoist&&o.transformHoist(l,o,t)}function ue(t,n){const{constantCache:o}=n;switch(t.type){case 1:if(t.tagType!==0)return 0;const s=o.get(t);if(s!==void 0)return s;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=Ko(t,n);if(a===0)return o.set(t,0),0;a<i&&(i=a);for(let c=0;c<t.children.length;c++){const p=ue(t.children[c],n);if(p===0)return o.set(t,0),0;p<i&&(i=p)}if(i>1)for(let c=0;c<t.props.length;c++){const p=t.props[c];if(p.type===7&&p.name==="bind"&&p.exp){const u=ue(p.exp,n);if(u===0)return o.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 o.set(t,0),0;n.removeHelper(Re),n.removeHelper(Ye(n.inSSR,r.isComponent)),r.isBlock=!1,n.helper(Ze(n.inSSR,r.isComponent))}return o.set(t,i),i}else return o.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(te(a)||pn(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 Ia=new Set([xn,_n,rt,it]);function Wo(t,n){if(t.type===14&&!te(t.callee)&&Ia.has(t.callee)){const o=t.arguments[0];if(o.type===4)return ue(o,n);if(o.type===14)return Wo(o,n)}return 0}function Ko(t,n){let o=3;const s=Go(t);if(s&&s.type===15){const{properties:r}=s;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<o&&(o=c);let p;if(a.type===4?p=ue(a,n):a.type===14?p=Wo(a,n):p=0,p===0)return p;p<o&&(o=p)}}return o}function Go(t){const n=t.codegenNode;if(n.type===13)return n.props}function Ma(t,{filename:n="",prefixIdentifiers:o=!1,hoistStatic:s=!1,hmr:r=!1,cacheHandlers:l=!1,nodeTransforms:i=[],directiveTransforms:a={},transformHoist:c=null,isBuiltInComponent:p=cn,isCustomElement:u=cn,expressionPlugins:f=[],scopeId:h=null,slotted:k=!0,ssr:_=!1,inSSR:x=!1,ssrCssVars:w="",bindingMetadata:C=Al,inline:M=!1,isTS:B=!1,onError:$=An,onWarn:S=To,compatConfig:H}){const K=n.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),I={filename:n,selfName:K&&mn($e(K[1])),prefixIdentifiers:o,hoistStatic:s,hmr:r,cacheHandlers:l,nodeTransforms:i,directiveTransforms:a,transformHoist:c,isBuiltInComponent:p,isCustomElement:u,expressionPlugins:f,scopeId:h,slotted:k,ssr:_,inSSR:x,ssrCssVars:w,bindingMetadata:C,inline:M,isTS:B,onError:$,onWarn:S,compatConfig:H,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 F=I.helpers.get(A)||0;return I.helpers.set(A,F+1),A},removeHelper(A){const F=I.helpers.get(A);if(F){const z=F-1;z?I.helpers.set(A,z):I.helpers.delete(A)}},helperString(A){return`_${Ge[I.helper(A)]}`},replaceNode(A){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=A},removeNode(A){if(process.env.NODE_ENV!=="production"&&!I.parent)throw new Error("Cannot remove root node.");const F=I.parent.children,z=A?F.indexOf(A):I.currentNode?I.childIndex:-1;if(process.env.NODE_ENV!=="production"&&z<0)throw new Error("node being removed is not a child of current parent");!A||A===I.currentNode?(I.currentNode=null,I.onNodeRemoved()):I.childIndex>z&&(I.childIndex--,I.onNodeRemoved()),I.parent.children.splice(z,1)},onNodeRemoved:cn,addIdentifiers(A){},removeIdentifiers(A){},hoist(A){te(A)&&(A=j(A)),I.hoists.push(A);const F=j(`_hoisted_${I.hoists.length}`,!1,A.loc,2);return F.hoisted=A,F},cache(A,F=!1,z=!1){const E=ra(I.cached.length,A,F,z);return I.cached.push(E),E}};return I.filters=new Set,I}function Ra(t,n){const o=Ma(t,n);jt(t,o),n.hoistStatic&&Aa(t,o),n.ssr||Pa(t,o),t.helpers=new Set([...o.helpers.keys()]),t.components=[...o.components],t.directives=[...o.directives],t.imports=o.imports,t.hoists=o.hoists,t.temps=o.temps,t.cached=o.cached,t.transformed=!0,t.filters=[...o.filters]}function Pa(t,n){const{helper:o}=n,{children:s}=t;if(s.length===1){const r=qo(t);if(r&&r.codegenNode){const l=r.codegenNode;l.type===13&&Ln(l,n),t.codegenNode=l}else t.codegenNode=s[0]}else if(s.length>1){let r=64;process.env.NODE_ENV!=="production"&&s.filter(l=>l.type!==3).length===1&&(r|=2048),t.codegenNode=lt(n,o(nt),void 0,t.children,r,void 0,void 0,!0,void 0,!1)}}function Fa(t,n){let o=0;const s=()=>{o--};for(;o<t.children.length;o++){const r=t.children[o];te(r)||(n.grandParent=n.parent,n.parent=t,n.childIndex=o,n.onNodeRemoved=s,jt(r,n))}}function jt(t,n){n.currentNode=t;const{nodeTransforms:o}=n,s=[];for(let l=0;l<o.length;l++){const i=o[l](t,n);if(i&&(we(i)?s.push(...i):s.push(i)),n.currentNode)t=n.currentNode;else return}switch(t.type){case 3:n.ssr||n.helper(st);break;case 5:n.ssr||n.helper(Tt);break;case 9:for(let l=0;l<t.branches.length;l++)jt(t.branches[l],n);break;case 10:case 11:case 1:case 0:Fa(t,n);break}n.currentNode=t;let r=s.length;for(;r--;)s[r]()}function Jo(t,n){const o=te(t)?s=>s===t:s=>t.test(s);return(s,r)=>{if(s.type===1){const{props:l}=s;if(s.tagType===3&&l.some(ya))return;const i=[];for(let a=0;a<l.length;a++){const c=l[a];if(c.type===7&&o(c.name)){l.splice(a,1),a--;const p=n(s,c,r);p&&i.push(p)}}return i}}}const Ht="/*@__PURE__*/",Zo=t=>`${Ge[t]}: _${Ge[t]}`;function za(t,{mode:n="function",prefixIdentifiers:o=n==="module",sourceMap:s=!1,filename:r="template.vue.html",scopeId:l=null,optimizeImports:i=!1,runtimeGlobalName:a="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:p="vue/server-renderer",ssr:u=!1,isTS:f=!1,inSSR:h=!1}){const k={mode:n,prefixIdentifiers:o,sourceMap:s,filename:r,scopeId:l,optimizeImports:i,runtimeGlobalName:a,runtimeModuleName:c,ssrRuntimeModuleName:p,ssr:u,isTS:f,inSSR:h,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(x){return`_${Ge[x]}`},push(x,w=-2,C){k.code+=x},indent(){_(++k.indentLevel)},deindent(x=!1){x?--k.indentLevel:_(--k.indentLevel)},newline(){_(k.indentLevel)}};function _(x){k.push(`
|
|
143
|
-
`+" ".repeat(x),0)}return k}function ja(t,n={}){const o=za(t,n);n.onContextCreated&&n.onContextCreated(o);const{mode:s,push:r,prefixIdentifiers:l,indent:i,deindent:a,newline:c,scopeId:p,ssr:u}=o,f=Array.from(t.helpers),h=f.length>0,k=!l&&s!=="module";Ha(t,o);const x=u?"ssrRender":"render",C=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(r(`function ${x}(${C}) {`),i(),k&&(r("with (_ctx) {"),i(),h&&(r(`const { ${f.map(Zo).join(", ")} } = _Vue
|
|
144
|
-
`,-1),c())),t.components.length&&(zn(t.components,"component",o),(t.directives.length||t.temps>0)&&c()),t.directives.length&&(zn(t.directives,"directive",o),t.temps>0&&c()),t.filters&&t.filters.length&&(c(),zn(t.filters,"filter",o),c()),t.temps>0){r("let ");for(let M=0;M<t.temps;M++)r(`${M>0?", ":""}_temp${M}`)}return(t.components.length||t.directives.length||t.temps)&&(r(`
|
|
145
|
-
`,0),c()),u||r("return "),t.codegenNode?re(t.codegenNode,o):r("null"),k&&(a(),r("}")),a(),r("}"),{ast:t,code:o.code,preamble:"",map:o.map?o.map.toJSON():void 0}}function Ha(t,n){const{ssr:o,prefixIdentifiers:s,push:r,newline:l,runtimeModuleName:i,runtimeGlobalName:a,ssrRuntimeModuleName:c}=n,p=a,u=Array.from(t.helpers);if(u.length>0&&(r(`const _Vue = ${p}
|
|
146
|
-
`,-1),t.hoists.length)){const f=[hn,gn,st,yn,wo].filter(h=>u.includes(h)).map(Zo).join(", ");r(`const { ${f} } = _Vue
|
|
147
|
-
`,-1)}Ua(t.hoists,n),l(),r("return ")}function zn(t,n,{helper:o,push:s,newline:r,isTS:l}){const i=o(n==="filter"?En:n==="component"?vn:kn);for(let a=0;a<t.length;a++){let c=t[a];const p=c.endsWith("__self");p&&(c=c.slice(0,-6)),s(`const ${ct(c,n)} = ${i}(${JSON.stringify(c)}${p?", true":""})${l?"!":""}`),a<t.length-1&&r()}}function Ua(t,n){if(!t.length)return;n.pure=!0;const{push:o,newline:s}=n;s();for(let r=0;r<t.length;r++){const l=t[r];l&&(o(`const _hoisted_${r+1} = `),re(l,n),s())}n.pure=!1}function qa(t){return te(t)||t.type===4||t.type===2||t.type===5||t.type===8}function jn(t,n){const o=t.length>3||process.env.NODE_ENV!=="production"&&t.some(s=>we(s)||!qa(s));n.push("["),o&&n.indent(),pt(t,n,o),o&&n.deindent(),n.push("]")}function pt(t,n,o=!1,s=!0){const{push:r,newline:l}=n;for(let i=0;i<t.length;i++){const a=t[i];te(a)?r(a,-3):we(a)?jn(a,n):re(a,n),i<t.length-1&&(o?(s&&r(","),l()):s&&r(", "))}}function re(t,n){if(te(t)){n.push(t,-3);return}if(pn(t)){n.push(n.helper(t));return}switch(t.type){case 1:case 9:case 11:process.env.NODE_ENV!=="production"&&Oo(t.codegenNode!=null,"Codegen node is missing for element/if/for node. Apply appropriate transforms first."),re(t.codegenNode,n);break;case 2:Wa(t,n);break;case 4:Yo(t,n);break;case 5:Ka(t,n);break;case 12:re(t.codegenNode,n);break;case 8:Xo(t,n);break;case 3:Ja(t,n);break;case 13:Za(t,n);break;case 14:Xa(t,n);break;case 15:Qa(t,n);break;case 17:Va(t,n);break;case 18:ec(t,n);break;case 19:tc(t,n);break;case 20:nc(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 Oo(!1,`unhandled codegen node type: ${t.type}`),t}}function Wa(t,n){n.push(JSON.stringify(t.content),-3,t)}function Yo(t,n){const{content:o,isStatic:s}=t;n.push(s?JSON.stringify(o):o,-3,t)}function Ka(t,n){const{push:o,helper:s,pure:r}=n;r&&o(Ht),o(`${s(Tt)}(`),re(t.content,n),o(")")}function Xo(t,n){for(let o=0;o<t.children.length;o++){const s=t.children[o];te(s)?n.push(s,-3):re(s,n)}}function Ga(t,n){const{push:o}=n;if(t.type===8)o("["),Xo(t,n),o("]");else if(t.isStatic){const s=In(t.content)?t.content:JSON.stringify(t.content);o(s,-2,t)}else o(`[${t.content}]`,-3,t)}function Ja(t,n){const{push:o,helper:s,pure:r}=n;r&&o(Ht),o(`${s(st)}(${JSON.stringify(t.content)})`,-3,t)}function Za(t,n){const{push:o,helper:s,pure:r}=n,{tag:l,props:i,children:a,patchFlag:c,dynamicProps:p,directives:u,isBlock:f,disableTracking:h,isComponent:k}=t;let _;if(c)if(process.env.NODE_ENV!=="production")if(c<0)_=c+` /* ${tt[c]} */`;else{const w=Object.keys(tt).map(Number).filter(C=>C>0&&c&C).map(C=>tt[C]).join(", ");_=c+` /* ${w} */`}else _=String(c);u&&o(s(wn)+"("),f&&o(`(${s(Re)}(${h?"true":""}), `),r&&o(Ht);const x=f?Ye(n.inSSR,k):Ze(n.inSSR,k);o(s(x)+"(",-2,t),pt(Ya([l,i,a,_,p]),n),o(")"),f&&o(")"),u&&(o(", "),re(u,n),o(")"))}function Ya(t){let n=t.length;for(;n--&&t[n]==null;);return t.slice(0,n+1).map(o=>o||"null")}function Xa(t,n){const{push:o,helper:s,pure:r}=n,l=te(t.callee)?t.callee:s(t.callee);r&&o(Ht),o(l+"(",-2,t),pt(t.arguments,n),o(")")}function Qa(t,n){const{push:o,indent:s,deindent:r,newline:l}=n,{properties:i}=t;if(!i.length){o("{}",-2,t);return}const a=i.length>1||process.env.NODE_ENV!=="production"&&i.some(c=>c.value.type!==4);o(a?"{":"{ "),a&&s();for(let c=0;c<i.length;c++){const{key:p,value:u}=i[c];Ga(p,n),o(": "),re(u,n),c<i.length-1&&(o(","),l())}a&&r(),o(a?"}":" }")}function Va(t,n){jn(t.elements,n)}function ec(t,n){const{push:o,indent:s,deindent:r}=n,{params:l,returns:i,body:a,newline:c,isSlot:p}=t;p&&o(`_${Ge[Tn]}(`),o("(",-2,t),we(l)?pt(l,n):l&&re(l,n),o(") => "),(c||a)&&(o("{"),s()),i?(c&&o("return "),we(i)?jn(i,n):re(i,n)):a&&re(a,n),(c||a)&&(r(),o("}")),p&&(t.isNonScopedSlot&&o(", undefined, true"),o(")"))}function tc(t,n){const{test:o,consequent:s,alternate:r,newline:l}=t,{push:i,indent:a,deindent:c,newline:p}=n;if(o.type===4){const f=!In(o.content);f&&i("("),Yo(o,n),f&&i(")")}else i("("),re(o,n),i(")");l&&a(),n.indentLevel++,l||i(" "),i("? "),re(s,n),n.indentLevel--,l&&p(),l||i(" "),i(": ");const u=r.type===19;u||n.indentLevel++,re(r,n),u||n.indentLevel--,l&&c(!0)}function nc(t,n){const{push:o,helper:s,indent:r,deindent:l,newline:i}=n,{needPauseTracking:a,needArraySpread:c}=t;c&&o("[...("),o(`_cache[${t.index}] || (`),a&&(r(),o(`${s(Dt)}(-1`),t.inVOnce&&o(", true"),o("),"),i(),o("(")),o(`_cache[${t.index}] = `),re(t.value,n),a&&(o(`).cacheIndex = ${t.index},`),i(),o(`${s(Dt)}(1),`),i(),o(`_cache[${t.index}]`),l()),o(")"),c&&o(")]")}const oc=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"),sc=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function je(t,n,o=!1,s=!1){const r=t.content;if(r.trim())try{new Function(s?` ${r} `:`return ${o?`(${r}) => {}`:`(${r})`}`)}catch(l){let i=l.message;const a=r.replace(sc,"").match(oc);a&&(i=`avoid using JavaScript keyword as property name: "${a[0]}"`),n.onError(W(45,t.loc,void 0,i))}}const rc=(t,n)=>{if(t.type===5)t.content=Hn(t.content,n);else if(t.type===1){const o=ce(t,"memo");for(let s=0;s<t.props.length;s++){const r=t.props[s];if(r.type===7&&r.name!=="for"){const l=r.exp,i=r.arg;l&&l.type===4&&!(r.name==="on"&&i)&&!(o&&i&&i.type===4&&i.content==="key")&&(r.exp=Hn(l,n,r.name==="slot")),i&&i.type===4&&!i.isStatic&&(r.arg=Hn(i,n))}}}};function Hn(t,n,o=!1,s=!1,r=Object.create(n.identifiers)){return process.env.NODE_ENV!=="production"&&je(t,n,o,s),t}const ic=Jo(/^(if|else|else-if)$/,(t,n,o)=>lc(t,n,o,(s,r,l)=>{const i=o.parent.children;let a=i.indexOf(s),c=0;for(;a-->=0;){const p=i[a];p&&p.type===9&&(c+=p.branches.length)}return()=>{if(l)s.codegenNode=Vo(r,c,o);else{const p=cc(s.codegenNode);p.alternate=Vo(r,c+s.branches.length-1,o)}}}));function lc(t,n,o,s){if(n.name!=="else"&&(!n.exp||!n.exp.content.trim())){const r=n.exp?n.exp.loc:t.loc;o.onError(W(28,n.loc)),n.exp=j("true",!1,r)}if(process.env.NODE_ENV!=="production"&&n.exp&&je(n.exp,o),n.name==="if"){const r=Qo(t,n),l={type:9,loc:$a(t.loc),branches:[r]};if(o.replaceNode(l),s)return s(l,r,!0)}else{const r=o.parent.children,l=[];let i=r.indexOf(t);for(;i-->=-1;){const a=r[i];if(a&&a.type===3){o.removeNode(a),process.env.NODE_ENV!=="production"&&l.unshift(a);continue}if(a&&a.type===2&&!a.content.trim().length){o.removeNode(a);continue}if(a&&a.type===9){n.name==="else-if"&&a.branches[a.branches.length-1].condition===void 0&&o.onError(W(30,t.loc)),o.removeNode();const c=Qo(t,n);if(process.env.NODE_ENV!=="production"&&l.length&&!(o.parent&&o.parent.type===1&&(o.parent.tag==="transition"||o.parent.tag==="Transition"))&&(c.children=[...l,...c.children]),process.env.NODE_ENV!=="production"){const u=c.userKey;u&&a.branches.forEach(({userKey:f})=>{ac(f,u)&&o.onError(W(29,c.userKey.loc))})}a.branches.push(c);const p=s&&s(a,c,!1);jt(c,o),p&&p(),o.currentNode=null}else o.onError(W(30,t.loc));break}}}function Qo(t,n){const o=t.tagType===3;return{type:10,loc:t.loc,condition:n.name==="else"?void 0:n.exp,children:o&&!ce(t,"for")?t.children:[t],userKey:at(t,"key"),isTemplateIf:o}}function Vo(t,n,o){return t.condition?Dn(t.condition,es(t,n,o),ee(o.helper(st),[process.env.NODE_ENV!=="production"?'"v-if"':'""',"true"])):es(t,n,o)}function es(t,n,o){const{helper:s}=o,r=X("key",j(`${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 Mt(c,r,o),c}else{let c=64;return process.env.NODE_ENV!=="production"&&!t.isTemplateIf&&l.filter(p=>p.type!==3).length===1&&(c|=2048),lt(o,s(nt),ye([r]),l,c,void 0,void 0,!0,!1,!1,t.loc)}else{const c=i.codegenNode,p=ba(c);return p.type===13&&Ln(p,o),Mt(p,r,o),c}}function ac(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 o=t.exp,s=n.exp;if(o.type!==s.type||o.type!==4||o.isStatic!==s.isStatic||o.content!==s.content)return!1}return!0}function cc(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 dc=(t,n,o)=>{const{modifiers:s,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 o.onError(W(52,l.loc)),{props:[X(l,j("",!0,r))]};ts(t),i=t.exp}return l.type!==4?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=l.content?`${l.content} || ""`:'""'),s.some(a=>a.content==="camel")&&(l.type===4?l.isStatic?l.content=$e(l.content):l.content=`${o.helperString(Sn)}(${l.content})`:(l.children.unshift(`${o.helperString(Sn)}(`),l.children.push(")"))),o.inSSR||(s.some(a=>a.content==="prop")&&ns(l,"."),s.some(a=>a.content==="attr")&&ns(l,"^")),{props:[X(l,i)]}},ts=(t,n)=>{const o=t.arg,s=$e(o.content);t.exp=j(s,!1,o.loc)},ns=(t,n)=>{t.type===4?t.isStatic?t.content=n+t.content:t.content=`\`${n}\${${t.content}}\``:(t.children.unshift(`'${n}' + (`),t.children.push(")"))},pc=Jo("for",(t,n,o)=>{const{helper:s,removeHelper:r}=o;return fc(t,n,o,l=>{const i=ee(s(Nn),[l.source]),a=At(t),c=ce(t,"memo"),p=at(t,"key",!1,!0);p&&p.type===7&&!p.exp&&ts(p);let f=p&&(p.type===6?p.value?j(p.value.content,!0):void 0:p.exp);const h=p&&f?X("key",f):null,k=l.source.type===4&&l.source.constType>0,_=k?64:p?128:256;return l.codegenNode=lt(o,s(nt),void 0,i,_,void 0,void 0,!0,!k,!1,t.loc),()=>{let x;const{children:w}=l;process.env.NODE_ENV!=="production"&&a&&t.children.some(B=>{if(B.type===1){const $=at(B,"key");if($)return o.onError(W(33,$.loc)),!0}});const C=w.length!==1||w[0].type!==1,M=It(t)?t:a&&t.children.length===1&&It(t.children[0])?t.children[0]:null;if(M?(x=M.codegenNode,a&&h&&Mt(x,h,o)):C?x=lt(o,s(nt),h?ye([h]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(x=w[0].codegenNode,a&&h&&Mt(x,h,o),x.isBlock!==!k&&(x.isBlock?(r(Re),r(Ye(o.inSSR,x.isComponent))):r(Ze(o.inSSR,x.isComponent))),x.isBlock=!k,x.isBlock?(s(Re),s(Ye(o.inSSR,x.isComponent))):s(Ze(o.inSSR,x.isComponent))),c){const B=Je(Un(l.parseResult,[j("_cached")]));B.body=ia([ve(["const _memo = (",c.exp,")"]),ve(["if (_cached",...f?[" && _cached.key === ",f]:[],` && ${o.helperString(_o)}(_cached, _memo)) return _cached`]),ve(["const _item = ",x]),j("_item.memo = _memo"),j("return _item")]),i.arguments.push(B,j("_cache"),j(String(o.cached.length))),o.cached.push(null)}else i.arguments.push(Je(Un(l.parseResult),x,!0))}})});function fc(t,n,o,s){if(!n.exp){o.onError(W(31,n.loc));return}const r=n.forParseResult;if(!r){o.onError(W(32,n.loc));return}os(r,o);const{addIdentifiers:l,removeIdentifiers:i,scopes:a}=o,{source:c,value:p,key:u,index:f}=r,h={type:11,loc:n.loc,source:c,valueAlias:p,keyAlias:u,objectIndexAlias:f,parseResult:r,children:At(t)?t.children:[t]};o.replaceNode(h),a.vFor++;const k=s&&s(h);return()=>{a.vFor--,k&&k()}}function os(t,n){t.finalized||(process.env.NODE_ENV!=="production"&&(je(t.source,n),t.key&&je(t.key,n,!0),t.index&&je(t.index,n,!0),t.value&&je(t.value,n,!0)),t.finalized=!0)}function Un({value:t,key:n,index:o},s=[]){return mc([t,n,o,...s])}function mc(t){let n=t.length;for(;n--&&!t[n];);return t.slice(0,n+1).map((o,s)=>o||j("_".repeat(s+1),!1))}const ss=j("undefined",!1),uc=(t,n)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const o=ce(t,"slot");if(o)return o.exp,n.scopes.vSlot++,()=>{n.scopes.vSlot--}}},hc=(t,n,o,s)=>Je(t,o,!1,!0,o.length?o[0].loc:s);function gc(t,n,o=hc){n.helper(Tn);const{children:s,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:w,exp:C}=c;w&&!ae(w)&&(a=!0),l.push(X(w||j("default",!0),o(C,void 0,s,r)))}let p=!1,u=!1;const f=[],h=new Set;let k=0;for(let w=0;w<s.length;w++){const C=s[w];let M;if(!At(C)||!(M=ce(C,"slot",!0))){C.type!==3&&f.push(C);continue}if(c){n.onError(W(37,M.loc));break}p=!0;const{children:B,loc:$}=C,{arg:S=j("default",!0),exp:H,loc:K}=M;let I;ae(S)?I=S?S.content:"default":a=!0;const A=ce(C,"for"),F=o(H,A,B,$);let z,E;if(z=ce(C,"if"))a=!0,i.push(Dn(z.exp,Ut(S,F,k++),ss));else if(E=ce(C,/^else(-if)?$/,!0)){let T=w,N;for(;T--&&(N=s[T],!(N.type!==3&&qn(N))););if(N&&At(N)&&ce(N,/^(else-)?if$/)){let D=i[i.length-1];for(;D.alternate.type===19;)D=D.alternate;D.alternate=E.exp?Dn(E.exp,Ut(S,F,k++),ss):Ut(S,F,k++)}else n.onError(W(30,E.loc))}else if(A){a=!0;const T=A.forParseResult;T?(os(T,n),i.push(ee(n.helper(Nn),[T.source,Je(Un(T),Ut(S,F),!0)]))):n.onError(W(32,A.loc))}else{if(I){if(h.has(I)){n.onError(W(38,K));continue}h.add(I),I==="default"&&(u=!0)}l.push(X(S,F))}}if(!c){const w=(C,M)=>{const B=o(C,void 0,M,r);return n.compatConfig&&(B.isNonScopedSlot=!0),X("default",B)};p?f.length&&f.some(C=>qn(C))&&(u?n.onError(W(39,f[0].loc)):l.push(w(void 0,f))):l.push(w(void 0,s))}const _=a?2:qt(t.children)?3:1;let x=ye(l.concat(X("_",j(_+(process.env.NODE_ENV!=="production"?` /* ${Fl[_]} */`:""),!1))),r);return i.length&&(x=ee(n.helper(xo),[x,Pe(i)])),{slots:x,hasDynamicSlots:a}}function Ut(t,n,o){const s=[X("name",t),X("fn",n)];return o!=null&&s.push(X("key",j(String(o),!0))),ye(s)}function qt(t){for(let n=0;n<t.length;n++){const o=t[n];switch(o.type){case 1:if(o.tagType===2||qt(o.children))return!0;break;case 9:if(qt(o.branches))return!0;break;case 10:case 11:if(qt(o.children))return!0;break}}return!1}function qn(t){return t.type!==2&&t.type!==12?!0:t.type===2?!!t.content.trim():qn(t.content)}const rs=new WeakMap,yc=(t,n)=>function(){if(t=n.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:s,props:r}=t,l=t.tagType===1;let i=l?vc(t,n):`"${s}"`;const a=Il(i)&&i.callee===bn;let c,p,u=0,f,h,k,_=a||i===ot||i===un||!l&&(s==="svg"||s==="foreignObject"||s==="math");if(r.length>0){const x=is(t,n,void 0,l,a);c=x.props,u=x.patchFlag,h=x.dynamicPropNames;const w=x.directives;k=w&&w.length?Pe(w.map(C=>kc(C,n))):void 0,x.shouldUseBlock&&(_=!0)}if(t.children.length>0)if(i===Bt&&(_=!0,u|=1024,process.env.NODE_ENV!=="production"&&t.children.length>1&&n.onError(W(46,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}))),l&&i!==ot&&i!==Bt){const{slots:w,hasDynamicSlots:C}=gc(t,n);p=w,C&&(u|=1024)}else if(t.children.length===1&&i!==ot){const w=t.children[0],C=w.type,M=C===5||C===8;M&&ue(w,n)===0&&(u|=1),M||C===2?p=w:p=t.children}else p=t.children;h&&h.length&&(f=Ec(h)),t.codegenNode=lt(n,i,c,p,u===0?void 0:u,f,k,!!_,!1,l,t.loc)};function vc(t,n,o=!1){let{tag:s}=t;const r=Wn(s),l=at(t,"is",!1,!0);if(l)if(r||Le("COMPILER_IS_ON_ELEMENT",n)){let a;if(l.type===6?a=l.value&&j(l.value.content,!0):(a=l.exp,a||(a=j("is",!1,l.arg.loc))),a)return ee(n.helper(bn),[a])}else l.type===6&&l.value.content.startsWith("vue:")&&(s=l.value.content.slice(4));const i=$o(s)||n.isBuiltInComponent(s);return i?(o||n.helper(i),i):(n.helper(vn),n.components.add(s),ct(s,"component"))}function is(t,n,o=t.props,s,r,l=!1){const{tag:i,loc:a,children:c}=t;let p=[];const u=[],f=[],h=c.length>0;let k=!1,_=0,x=!1,w=!1,C=!1,M=!1,B=!1,$=!1;const S=[],H=F=>{p.length&&(u.push(ye(ls(p),a)),p=[]),F&&u.push(F)},K=()=>{n.scopes.vFor>0&&p.push(X(j("ref_for",!0),j("true")))},I=({key:F,value:z})=>{if(ae(F)){const E=F.content,T=dn(E);if(T&&(!s||r)&&E.toLowerCase()!=="onclick"&&E!=="onUpdate:modelValue"&&!vo(E)&&(M=!0),T&&vo(E)&&($=!0),T&&z.type===14&&(z=z.arguments[0]),z.type===20||(z.type===4||z.type===8)&&ue(z,n)>0)return;E==="ref"?x=!0:E==="class"?w=!0:E==="style"?C=!0:E!=="key"&&!S.includes(E)&&S.push(E),s&&(E==="class"||E==="style")&&!S.includes(E)&&S.push(E)}else B=!0};for(let F=0;F<o.length;F++){const z=o[F];if(z.type===6){const{loc:E,name:T,nameLoc:N,value:D}=z;let J=!0;if(T==="ref"&&(x=!0,K()),T==="is"&&(Wn(i)||D&&D.content.startsWith("vue:")||Le("COMPILER_IS_ON_ELEMENT",n)))continue;p.push(X(j(T,!0,N),j(D?D.content:"",J,D?D.loc:E)))}else{const{name:E,arg:T,exp:N,loc:D,modifiers:J}=z,le=E==="bind",Ie=E==="on";if(E==="slot"){s||n.onError(W(40,D));continue}if(E==="once"||E==="memo"||E==="is"||le&&Oe(T,"is")&&(Wn(i)||Le("COMPILER_IS_ON_ELEMENT",n))||Ie&&l)continue;if((le&&Oe(T,"key")||Ie&&h&&Oe(T,"vue:before-update"))&&(k=!0),le&&Oe(T,"ref")&&K(),!T&&(le||Ie)){if(B=!0,N)if(le){if(H(),process.env.NODE_ENV!=="production"&&u.some(Ne=>Ne.type===15?Ne.properties.some(({key:xe})=>xe.type!==4||!xe.isStatic?!0:xe.content!=="class"&&xe.content!=="style"&&!dn(xe.content)):!0)&&Xe("COMPILER_V_BIND_OBJECT_ORDER",n,D),Le("COMPILER_V_BIND_OBJECT_ORDER",n)){u.unshift(N);continue}K(),H(),u.push(N)}else H({type:14,loc:D,callee:n.helper(Cn),arguments:s?[N]:[N,"true"]});else n.onError(W(le?34:35,D));continue}le&&J.some(ke=>ke.content==="prop")&&(_|=32);const Se=n.directiveTransforms[E];if(Se){const{props:ke,needRuntime:Ne}=Se(z,t,n);!l&&ke.forEach(I),Ie&&T&&!ae(T)?H(ye(ke,a)):p.push(...ke),Ne&&(f.push(z),pn(Ne)&&rs.set(z,Ne))}else Ml(E)||(f.push(z),h&&(k=!0))}}let A;if(u.length?(H(),u.length>1?A=ee(n.helper($t),u,a):A=u[0]):p.length&&(A=ye(ls(p),a)),B?_|=16:(w&&!s&&(_|=2),C&&!s&&(_|=4),S.length&&(_|=8),M&&(_|=32)),!k&&(_===0||_===32)&&(x||$||f.length>0)&&(_|=512),!n.inSSR&&A)switch(A.type){case 15:let F=-1,z=-1,E=!1;for(let D=0;D<A.properties.length;D++){const J=A.properties[D].key;ae(J)?J.content==="class"?F=D:J.content==="style"&&(z=D):J.isHandlerKey||(E=!0)}const T=A.properties[F],N=A.properties[z];E?A=ee(n.helper(rt),[A]):(T&&!ae(T.value)&&(T.value=ee(n.helper(xn),[T.value])),N&&(C||N.value.type===4&&N.value.content.trim()[0]==="["||N.value.type===17)&&(N.value=ee(n.helper(_n),[N.value])));break;case 14:break;default:A=ee(n.helper(rt),[ee(n.helper(it),[A])]);break}return{props:A,directives:f,patchFlag:_,dynamicPropNames:S,shouldUseBlock:k}}function ls(t){const n=new Map,o=[];for(let s=0;s<t.length;s++){const r=t[s];if(r.key.type===8||!r.key.isStatic){o.push(r);continue}const l=r.key.content,i=n.get(l);i?(l==="style"||l==="class"||dn(l))&&bc(i,r):(n.set(l,r),o.push(r))}return o}function bc(t,n){t.value.type===17?t.value.elements.push(n.value):t.value=Pe([t.value,n.value],t.loc)}function kc(t,n){const o=[],s=rs.get(t);s?o.push(n.helperString(s)):(n.helper(kn),n.directives.add(t.name),o.push(ct(t.name,"directive")));const{loc:r}=t;if(t.exp&&o.push(t.exp),t.arg&&(t.exp||o.push("void 0"),o.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||o.push("void 0"),o.push("void 0"));const l=j("true",!1,r);o.push(ye(t.modifiers.map(i=>X(i,l)),r))}return Pe(o,t.loc)}function Ec(t){let n="[";for(let o=0,s=t.length;o<s;o++)n+=JSON.stringify(t[o]),o<s-1&&(n+=", ");return n+"]"}function Wn(t){return t==="component"||t==="Component"}const wc=(t,n)=>{if(It(t)){const{children:o,loc:s}=t,{slotName:r,slotProps:l}=Nc(t,n),i=[n.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let a=2;l&&(i[2]=l,a=3),o.length&&(i[3]=Je([],o,!1,!1,s),a=4),n.scopeId&&!n.slotted&&(a=5),i.splice(a),t.codegenNode=ee(n.helper(No),i,s)}};function Nc(t,n){let o='"default"',s;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"?o=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)o=i.exp;else if(i.arg&&i.arg.type===4){const a=$e(i.arg.content);o=i.exp=j(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}=is(t,n,r,!1,!1);s=l,i.length&&n.onError(W(36,i[0].loc))}return{slotName:o,slotProps:s}}const as=(t,n,o,s)=>{const{loc:r,modifiers:l,arg:i}=t;!t.exp&&!l.length&&o.onError(W(35,r));let a;if(i.type===4)if(i.isStatic){let f=i.content;process.env.NODE_ENV!=="production"&&f.startsWith("vnode")&&o.onError(W(51,i.loc)),f.startsWith("vue:")&&(f=`vnode-${f.slice(4)}`);const h=n.tagType!==0||f.startsWith("vnode")||!/[A-Z]/.test(f)?Pl($e(f)):`on:${f}`;a=j(h,!0,i.loc)}else a=ve([`${o.helperString(Bn)}(`,i,")"]);else a=i,a.children.unshift(`${o.helperString(Bn)}(`),a.children.push(")");let c=t.exp;c&&!c.content.trim()&&(c=void 0);let p=o.cacheHandlers&&!c&&!o.inVOnce;if(c){const f=Lo(c),h=!(f||ha(c)),k=c.content.includes(";");process.env.NODE_ENV!=="production"&&je(c,o,!1,k),(h||p&&f)&&(c=ve([`${h?"$event":"(...args)"} => ${k?"{":"("}`,c,k?"}":")"]))}let u={props:[X(a,c||j("() => {}",!1,r))]};return s&&(u=s(u)),p&&(u.props[0].value=o.cache(u.props[0].value)),u.props.forEach(f=>f.key.isHandlerKey=!0),u},xc=(t,n)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const o=t.children;let s,r=!1;for(let l=0;l<o.length;l++){const i=o[l];if(Mn(i)){r=!0;for(let a=l+1;a<o.length;a++){const c=o[a];if(Mn(c))s||(s=o[l]=ve([i],i.loc)),s.children.push(" + ",c),o.splice(a,1),a--;else{s=void 0;break}}}}if(!(!r||o.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<o.length;l++){const i=o[l];if(Mn(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"?` /* ${tt[1]} */`:"")),o[l]={type:12,content:i,loc:i.loc,codegenNode:ee(n.helper(yn),a)}}}}},cs=new WeakSet,_c=(t,n)=>{if(t.type===1&&ce(t,"once",!0))return cs.has(t)||n.inVOnce||n.inSSR?void 0:(cs.add(t),n.inVOnce=!0,n.helper(Dt),()=>{n.inVOnce=!1;const o=n.currentNode;o.codegenNode&&(o.codegenNode=n.cache(o.codegenNode,!0,!0))})},ds=(t,n,o)=>{const{exp:s,arg:r}=t;if(!s)return o.onError(W(41,t.loc)),Wt();const l=s.loc.source.trim(),i=s.type===4?s.content:l,a=o.bindingMetadata[l];if(a==="props"||a==="props-aliased")return o.onError(W(44,s.loc)),Wt();if(!i.trim()||!Lo(s))return o.onError(W(42,s.loc)),Wt();const c=r||j("modelValue",!0),p=r?ae(r)?`onUpdate:${$e(r.content)}`:ve(['"onUpdate:" + ',r]):"onUpdate:modelValue";let u;const f=o.isTS?"($event: any)":"$event";u=ve([`${f} => ((`,s,") = $event)"]);const h=[X(c,t.exp),X(p,u)];if(t.modifiers.length&&n.tagType===1){const k=t.modifiers.map(x=>x.content).map(x=>(In(x)?x:JSON.stringify(x))+": true").join(", "),_=r?ae(r)?`${r.content}Modifiers`:ve([r,' + "Modifiers"']):"modelModifiers";h.push(X(_,j(`{ ${k} }`,!1,t.loc,2)))}return Wt(h)};function Wt(t=[]){return{props:t}}const Cc=/[\w).+\-_$\]]/,Sc=(t,n)=>{Le("COMPILER_FILTERS",n)&&(t.type===5?Kt(t.content,n):t.type===1&&t.props.forEach(o=>{o.type===7&&o.name!=="for"&&o.exp&&Kt(o.exp,n)}))};function Kt(t,n){if(t.type===4)ps(t,n);else for(let o=0;o<t.children.length;o++){const s=t.children[o];typeof s=="object"&&(s.type===4?ps(s,n):s.type===8?Kt(t,n):s.type===5&&Kt(s.content,n))}}function ps(t,n){const o=t.content;let s=!1,r=!1,l=!1,i=!1,a=0,c=0,p=0,u=0,f,h,k,_,x=[];for(k=0;k<o.length;k++)if(h=f,f=o.charCodeAt(k),s)f===39&&h!==92&&(s=!1);else if(r)f===34&&h!==92&&(r=!1);else if(l)f===96&&h!==92&&(l=!1);else if(i)f===47&&h!==92&&(i=!1);else if(f===124&&o.charCodeAt(k+1)!==124&&o.charCodeAt(k-1)!==124&&!a&&!c&&!p)_===void 0?(u=k+1,_=o.slice(0,k).trim()):w();else{switch(f){case 34:r=!0;break;case 39:s=!0;break;case 96:l=!0;break;case 40:p++;break;case 41:p--;break;case 91:c++;break;case 93:c--;break;case 123:a++;break;case 125:a--;break}if(f===47){let C=k-1,M;for(;C>=0&&(M=o.charAt(C),M===" ");C--);(!M||!Cc.test(M))&&(i=!0)}}_===void 0?_=o.slice(0,k).trim():u!==0&&w();function w(){x.push(o.slice(u,k).trim()),u=k+1}if(x.length){for(process.env.NODE_ENV!=="production"&&Ot("COMPILER_FILTERS",n,t.loc),k=0;k<x.length;k++)_=Bc(_,x[k],n);t.content=_,t.ast=void 0}}function Bc(t,n,o){o.helper(En);const s=n.indexOf("(");if(s<0)return o.filters.add(n),`${ct(n,"filter")}(${t})`;{const r=n.slice(0,s),l=n.slice(s+1);return o.filters.add(r),`${ct(r,"filter")}(${t}${l!==")"?","+l:l}`}}const fs=new WeakSet,Tc=(t,n)=>{if(t.type===1){const o=ce(t,"memo");return!o||fs.has(t)?void 0:(fs.add(t),()=>{const s=t.codegenNode||n.currentNode.codegenNode;s&&s.type===13&&(t.tagType!==1&&Ln(s,n),t.codegenNode=ee(n.helper($n),[o.exp,Je(void 0,s),"_cache",String(n.cached.length)]),n.cached.push(null))})}};function $c(t){return[[_c,ic,Tc,pc,Sc,...process.env.NODE_ENV!=="production"?[rc]:[],wc,yc,uc,xc],{on:as,bind:dc,model:ds}]}function Dc(t,n={}){const o=n.onError||An,s=n.mode==="module";n.prefixIdentifiers===!0?o(W(47)):s&&o(W(48));const r=!1;n.cacheHandlers&&o(W(49)),n.scopeId&&!s&&o(W(50));const l=Te({},n,{prefixIdentifiers:r}),i=te(t)?Oa(t,l):t,[a,c]=$c();return Ra(i,Te({},l,{nodeTransforms:[...a,...n.nodeTransforms||[]],directiveTransforms:Te({},c,n.directiveTransforms||{})})),ja(i,l)}const Lc=()=>({props:[]});/**
|
|
148
|
-
* @vue/compiler-dom v3.5.18
|
|
149
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
150
|
-
* @license MIT
|
|
151
|
-
**/const ms=Symbol(process.env.NODE_ENV!=="production"?"vModelRadio":""),us=Symbol(process.env.NODE_ENV!=="production"?"vModelCheckbox":""),hs=Symbol(process.env.NODE_ENV!=="production"?"vModelText":""),gs=Symbol(process.env.NODE_ENV!=="production"?"vModelSelect":""),Kn=Symbol(process.env.NODE_ENV!=="production"?"vModelDynamic":""),ys=Symbol(process.env.NODE_ENV!=="production"?"vOnModifiersGuard":""),vs=Symbol(process.env.NODE_ENV!=="production"?"vOnKeysGuard":""),bs=Symbol(process.env.NODE_ENV!=="production"?"vShow":""),Gn=Symbol(process.env.NODE_ENV!=="production"?"Transition":""),ks=Symbol(process.env.NODE_ENV!=="production"?"TransitionGroup":"");oa({[ms]:"vModelRadio",[us]:"vModelCheckbox",[hs]:"vModelText",[gs]:"vModelSelect",[Kn]:"vModelDynamic",[ys]:"withModifiers",[vs]:"withKeys",[bs]:"vShow",[Gn]:"Transition",[ks]:"TransitionGroup"});let Qe;function Oc(t,n=!1){return Qe||(Qe=document.createElement("div")),n?(Qe.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,Qe.children[0].getAttribute("foo")):(Qe.innerHTML=t,Qe.textContent)}const Ac={parseMode:"html",isVoidTag:Xl,isNativeTag:t=>Jl(t)||Zl(t)||Yl(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:Oc,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return Gn;if(t==="TransitionGroup"||t==="transition-group")return ks},getNamespace(t,n,o){let s=n?n.ns:o;if(n&&s===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"))&&(s=0)}else/^m(?:[ions]|text)$/.test(n.tag)&&t!=="mglyph"&&t!=="malignmark"&&(s=0);else n&&s===1&&(n.tag==="foreignObject"||n.tag==="desc"||n.tag==="title")&&(s=0);if(s===0){if(t==="svg")return 1;if(t==="math")return 2}return s}},Ic=t=>{t.type===1&&t.props.forEach((n,o)=>{n.type===6&&n.name==="style"&&n.value&&(t.props[o]={type:7,name:"bind",arg:j("style",!0,n.loc),exp:Mc(n.value.content,n.loc),modifiers:[],loc:n.loc})})},Mc=(t,n)=>{const o=Ul(t);return j(JSON.stringify(o),!1,n,3)};function be(t,n){return W(t,n,process.env.NODE_ENV!=="production"?Rc:void 0)}const Rc={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."},Pc=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(be(53,r)),n.children.length&&(o.onError(be(54,r)),n.children.length=0),{props:[X(j("innerHTML",!0,r),s||j("",!0))]}},Fc=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(be(55,r)),n.children.length&&(o.onError(be(56,r)),n.children.length=0),{props:[X(j("textContent",!0),s?ue(s,o)>0?s:ee(o.helperString(Tt),[s],r):j("",!0))]}},zc=(t,n,o)=>{const s=ds(t,n,o);if(!s.props.length||n.tagType===1)return s;t.arg&&o.onError(be(58,t.arg.loc));function r(){const a=ce(n,"bind");a&&Oe(a.arg,"value")&&o.onError(be(60,a.loc))}const{tag:l}=n,i=o.isCustomElement(l);if(l==="input"||l==="textarea"||l==="select"||i){let a=hs,c=!1;if(l==="input"||i){const p=at(n,"type");if(p){if(p.type===7)a=Kn;else if(p.value)switch(p.value.content){case"radio":a=ms;break;case"checkbox":a=us;break;case"file":c=!0,o.onError(be(59,t.loc));break;default:process.env.NODE_ENV!=="production"&&r();break}}else ga(n)?a=Kn:process.env.NODE_ENV!=="production"&&r()}else l==="select"?a=gs:process.env.NODE_ENV!=="production"&&r();c||(s.needRuntime=o.helper(a))}else o.onError(be(57,t.loc));return s.props=s.props.filter(a=>!(a.key.type===4&&a.key.content==="modelValue")),s},jc=Ee("passive,once,capture"),Hc=Ee("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Uc=Ee("left,right"),Es=Ee("onkeyup,onkeydown,onkeypress"),qc=(t,n,o,s)=>{const r=[],l=[],i=[];for(let a=0;a<n.length;a++){const c=n[a].content;c==="native"&&Xe("COMPILER_V_ON_NATIVE",o,s)||jc(c)?i.push(c):Uc(c)?ae(t)?Es(t.content.toLowerCase())?r.push(c):l.push(c):(r.push(c),l.push(c)):Hc(c)?l.push(c):r.push(c)}return{keyModifiers:r,nonKeyModifiers:l,eventOptionModifiers:i}},ws=(t,n)=>ae(t)&&t.content.toLowerCase()==="onclick"?j(n,!0):t.type!==4?ve(["(",t,`) === "onClick" ? "${n}" : (`,t,")"]):t,Wc=(t,n,o)=>as(t,n,o,s=>{const{modifiers:r}=t;if(!r.length)return s;let{key:l,value:i}=s.props[0];const{keyModifiers:a,nonKeyModifiers:c,eventOptionModifiers:p}=qc(l,r,o,t.loc);if(c.includes("right")&&(l=ws(l,"onContextmenu")),c.includes("middle")&&(l=ws(l,"onMouseup")),c.length&&(i=ee(o.helper(ys),[i,JSON.stringify(c)])),a.length&&(!ae(l)||Es(l.content.toLowerCase()))&&(i=ee(o.helper(vs),[i,JSON.stringify(a)])),p.length){const u=p.map(mn).join("");l=ae(l)?j(`${l.content}${u}`,!0):ve(["(",l,`) + "${u}"`])}return{props:[X(l,i)]}}),Kc=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(be(61,r)),{props:[],needRuntime:o.helper(bs)}},Gc=(t,n)=>{if(t.type===1&&t.tagType===1&&n.isBuiltInComponent(t.tag)===Gn)return()=>{if(!t.children.length)return;Ns(t)&&n.onError(be(62,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}));const s=t.children[0];if(s.type===1)for(const r of s.props)r.type===7&&r.name==="show"&&t.props.push({type:6,name:"persisted",nameLoc:t.loc,value:void 0,loc:t.loc})}};function Ns(t){const n=t.children=t.children.filter(s=>s.type!==3&&!(s.type===2&&!s.content.trim())),o=n[0];return n.length!==1||o.type===11||o.type===9&&o.branches.some(Ns)}const Jc=(t,n)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&(process.env.NODE_ENV!=="production"&&n.onError(be(63,t.loc)),n.removeNode())};function Zc(t,n){return t==="template"?!0:t in xs?xs[t].has(n):n in _s?_s[n].has(t):!(t in Cs&&Cs[t].has(n)||n in Ss&&Ss[n].has(t))}const Ve=new Set(["h1","h2","h3","h4","h5","h6"]),He=new Set([]),xs={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},_s={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"])},Cs={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"])},Ss={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:Ve,h2:Ve,h3:Ve,h4:Ve,h5:Ve,h6:Ve},Yc=(t,n)=>{if(t.type===1&&t.tagType===0&&n.parent&&n.parent.type===1&&n.parent.tagType===0&&!Zc(n.parent.tag,t.tag)){const o=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.`);o.loc=t.loc,n.onWarn(o)}},Xc=[Ic,...process.env.NODE_ENV!=="production"?[Gc,Yc]:[]],Qc={cloak:Lc,html:Pc,text:Fc,model:zc,on:Wc,show:Kc};function Vc(t,n={}){return Dc(t,Te({},Ac,n,{nodeTransforms:[Jc,...Xc,...n.nodeTransforms||[]],directiveTransforms:Te({},Qc,n.directiveTransforms||{}),transformHoist:null}))}function ed(t,n={}){const o=t.trim().startsWith("<")?t:`<span>${t}</span>`,{code:s}=Vc(o,{mode:"function"}),r=new Function("Vue",`${s}; return render;`)(Ps);return e.defineComponent({name:"DynamicFromString",props:n.props??{},emits:n.emits??[],setup(){return n.setup?.()??{}},render:r})}const Jn={};function td(t){return Jn[t]||(Jn[t]=ed(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}}})),Jn[t]}const nd={class:"mt-4 flex flex-wrap items-center justify-between gap-3 text-sm text-gray-600"},od={class:"flex items-center gap-2"},sd=["disabled"],rd={class:"text-sm"},id=["disabled"],ld=e.defineComponent({__name:"TablePagination",props:{currentPage:{},totalPages:{},label:{}},setup(t){const n=t,o=e.computed(()=>n.currentPage<=1),s=e.computed(()=>n.currentPage>=n.totalPages);return(r,l)=>(e.openBlock(),e.createElementBlock("div",nd,[e.createElementVNode("div",null,e.toDisplayString(r.label),1),e.createElementVNode("div",od,[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[0]||(l[0]=i=>r.$emit("previous"))}," Назад ",8,sd),e.createElementVNode("span",rd,"Сторінка "+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:s.value,onClick:l[1]||(l[1]=i=>r.$emit("next"))}," Далі ",8,id)])]))}}),ad={class:"relative inline-flex"},cd=["aria-label"],dd={class:"px-3 pb-2"},pd={class:"px-3 pb-3 max-h-64 overflow-y-auto"},fd=["onClick"],md={class:"truncate"},ud={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"},hd="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",gd=e.defineComponent({__name:"TableColumnSettings",props:{columns:{}},emits:["update:columns"],setup(t,{emit:n}){const o=t,s=n,r=e.useAttrs(),l=e.ref(!1),i=e.ref(""),a=e.ref([...o.columns]),c=e.ref(null),p=e.ref(null),u=e.ref(null),f=e.ref({top:0,left:0}),h=e.computed(()=>{if(!i.value)return a.value;const B=i.value.toLowerCase();return a.value.filter($=>k($).toLowerCase().includes(B))});e.watch(()=>o.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=>{s("update:columns",B)},{deep:!0});function k(B){return B.ua||B.label||B.name||"Колонка"}function _(B){const $=!B.hidden;$&&a.value.filter(S=>!S.hidden).length<=1||(B.hidden=$)}function x(){l.value=!l.value,l.value&&e.nextTick(()=>{u.value?.focus(),w()})}function w(){if(!c.value)return;const B=c.value.getBoundingClientRect();f.value={top:B.bottom+window.scrollY+6,left:B.left+window.scrollX-200}}function C(B){if(!l.value)return;const $=B.target;$&&(p.value?.contains($)||c.value?.contains($)||(l.value=!1))}function M(B){B.key==="Escape"&&(l.value=!1)}return e.onMounted(()=>{document.addEventListener("click",C,!0),document.addEventListener("keydown",M)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",C,!0),document.removeEventListener("keydown",M)}),(B,$)=>(e.openBlock(),e.createElementBlock("div",ad,[e.createElementVNode("button",{ref_key:"buttonRef",ref:c,type:"button",onClick:x,class:e.normalizeClass([hd,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,cd),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:p,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:`${f.value.top}px`,left:`${f.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",dd,[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",pd,[$[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:H=>_(S)},[e.createElementVNode("span",md,e.toDisplayString(k(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",ud,$[3]||($[3]=[e.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])))],2)],8,fd))),128))])])],4)):e.createCommentVNode("",!0)]))]))}}),yd=["data-action-key"],vd=["onClick"],bd={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"},kd={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"},Ed={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"},wd={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"},Nd=e.defineComponent({__name:"RowActionsButton",props:{row:{},actions:{},isOpen:{type:Boolean},actionKey:{}},emits:["toggle"],setup(t,{emit:n}){const o=t,s=n,r=e.ref(null),l=e.computed(()=>!!o.actions?.length),i=e.ref({scrollX:0,scrollY:0,width:0,height:0}),a=e.ref(!1);function c(){s("toggle")}function p(_){_.handler?.(o.row)}const u=e.computed(()=>{if(!o.isOpen)return{};const _=r.value;if(!_)return{};const x=_.getBoundingClientRect(),w=8,C=160,$=(o.actions?.length??0)*36+w*2,S=i.value.height||(typeof window<"u"?window.innerHeight:0),H=i.value.width||(typeof window<"u"?window.innerWidth:0),K=i.value.scrollX||(typeof window<"u"?window.scrollX:0),I=i.value.scrollY||(typeof window<"u"?window.scrollY:0);let A=x.bottom+I+w,F=x.right+K-C;const z=K+H-C-w;return F>z&&(F=z),F<K+w&&(F=K+w),A+$>I+S-w&&(A=x.top+I-$-w),A<I+w&&(A=I+w),{top:`${A}px`,left:`${F}px`,width:"auto"}});function f(){typeof window>"u"||(i.value={scrollX:window.scrollX,scrollY:window.scrollY,width:window.innerWidth,height:window.innerHeight})}function h(){typeof window>"u"||a.value||(a.value=!0,f(),window.addEventListener("scroll",f,{passive:!0}),window.addEventListener("resize",f))}function k(){typeof window>"u"||!a.value||(a.value=!1,window.removeEventListener("scroll",f),window.removeEventListener("resize",f))}return e.watch(()=>o.isOpen,_=>{_?h():k()},{immediate:!0}),e.onMounted(()=>{o.isOpen&&h()}),e.onBeforeUnmount(()=>{k()}),(_,x)=>l.value&&_.actionKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative inline-flex","data-action-key":_.actionKey,ref_key:"anchorRef",ref:r},[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(c,["stop"])},x[1]||(x[1]=[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)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[_.isOpen?(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(u.value),onClick:x[0]||(x[0]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.actions,w=>(e.openBlock(),e.createElementBlock("button",{key:w.type,type:"button",class:e.normalizeClass(["flex w-full items-center gap-2 px-4 py-2 text-sm transition-colors",w.variant==="danger"?"text-red-600 hover:bg-red-50":"text-gray-700 hover:bg-gray-50"]),onClick:C=>p(w)},[e.renderSlot(_.$slots,"icon",{action:w},()=>[w.type==="view"?(e.openBlock(),e.createElementBlock("svg",bd,x[2]||(x[2]=[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)]))):w.type==="edit"?(e.openBlock(),e.createElementBlock("svg",kd,x[3]||(x[3]=[e.createElementVNode("path",{d:"M18 2a2.828 2.828 0 1 1 4 4L7 21l-4 1 1-4Z"},null,-1)]))):w.type==="delete"?(e.openBlock(),e.createElementBlock("svg",Ed,x[4]||(x[4]=[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",wd,x[5]||(x[5]=[e.createElementVNode("path",{d:"M12 8v8"},null,-1),e.createElementVNode("path",{d:"M8 12h8"},null,-1)])))]),e.createTextVNode(" "+e.toDisplayString(w.label),1)],10,vd))),128))],4)):e.createCommentVNode("",!0)]))],8,yd)):e.createCommentVNode("",!0)}}),Bs=typeof window<"u",Ts=typeof document<"u";function xd(t){if(!Ts)throw new Error("Tooltip requires document to be defined");const n=document.createElement("div");return n.className="fixed z-[9999] p-2 bg-gray-900 text-white text-xs rounded-lg shadow-lg pointer-events-none transition-opacity duration-150",n.style.opacity="0",n.style.visibility="hidden",n.style.maxWidth="240px",n.style.whiteSpace="normal",n.style.wordBreak="break-word",document.body.appendChild(n),n}function $s(t){if(!t)return null;if(typeof t=="string"){const o=t.trim();return o?{text:o,wrap:!0}:null}const n=typeof t.text=="string"&&t.text.trim()?t.text.trim():void 0;return n?{text:n,wrap:t.wrap!==!1}:null}function Zn(t,n){if(!Ts||!Bs)return;const o=xd(n.wrap),s={options:n,tooltipEl:o,show:r=>{if(!s.options.text||!Bs)return;o.textContent=s.options.text;const i=(r.currentTarget??t).getBoundingClientRect(),a=o.getBoundingClientRect(),c=window.innerWidth-a.width-12,p=Math.max(12,Math.min(i.left,c));o.style.left=`${p}px`,o.style.top=`${i.bottom+4}px`,o.style.opacity="1",o.style.visibility="visible"},hide:()=>{o.style.opacity="0",o.style.visibility="hidden"}};t.addEventListener("mouseenter",s.show),t.addEventListener("mouseleave",s.hide),t.addEventListener("focus",s.show),t.addEventListener("blur",s.hide),t.__tooltipState__=s}function Yn(t){const n=t.__tooltipState__;n&&(t.removeEventListener("mouseenter",n.show),t.removeEventListener("mouseleave",n.hide),t.removeEventListener("focus",n.show),t.removeEventListener("blur",n.hide),n.tooltipEl.remove(),delete t.__tooltipState__)}const _d={mounted(t,n){const o=$s(n.value);o&&Zn(t,o)},updated(t,n){const o=$s(n.value),s=t;if(!o){Yn(s);return}const r=s.__tooltipState__;if(!r){Zn(s,o);return}if(r.options.wrap!==o.wrap){Yn(s),Zn(s,o);return}r.options=o},unmounted(t){Yn(t)}},Cd={class:"flex flex-col gap-4 mb-[15px]"},Sd={class:"flex flex-wrap items-center gap-4"},Bd={class:"relative"},Td={class:"ml-auto flex items-center gap-2"},$d={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"},Ld={class:"text-left font-medium text-gray-700"},Od={key:0,class:"py-2 pr-4 min-w-[80px] max-w-[120px] text-right"},Ad={class:"divide-y divide-gray-200"},Id=["href"],Md={key:2},Rd={key:3},Pd={key:0,class:"py-2 pr-4 text-right"},Fd={key:0},zd={key:0},jd=["colspan"],Ds=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(),o=e.ref([]),s=e.ref([]),r=_d,l=t,i=e.ref([]),a=e.ref(""),c=e.ref(""),p=e.ref(""),u=e.ref(1),f=e.ref(10),h=e.ref(0),k=e.ref(0),_=e.ref("id"),x=e.ref("");let w=null,C=0;const M=e.ref(null);async function B(){const d=u.value,m=++C,g=new URLSearchParams,b=p.value.trim();b&&g.set("search",b),g.set("page",String(d)),g.set("limit",String(f.value));const O=`/api/data/${l.token}${g.toString()?`?${g.toString()}`:""}`;let L;try{const ie=await fetch(O);if(!ie.ok)throw new Error(`Request failed with status ${ie.status}`);L=await ie.json()}catch(ie){m===C&&(o.value=[],k.value=0,h.value=0),console.error("Failed to load table data",ie);return}if(m!==C)return;o.value=Array.isArray(L?.rows)?L.rows:[],s.value=E(L?.columns||[]),i.value=Array.isArray(L?.actions)?L.actions:[],a.value=L?.form,c.value=L?.addToken,_.value=typeof L?.pk=="string"&&L.pk?L.pk:_.value,typeof L?.form=="string"&&L.form&&(x.value=L.form.replace(/\.form$/,".table")),Be();const R=Number(L?.total??L?.count??L?.totalCount),P=Number(L?.filtered??L?.filteredCount);h.value=Number.isFinite(R)&&R>0?R:o.value.length,k.value=Number.isFinite(P)&&P>0?P:Math.max(o.value.length,h.value);const he=Math.max(1,Math.ceil((k.value||o.value.length||1)/f.value));let ge=d;typeof L?.page=="number"&&L.page>0&&(ge=L.page),ge>he&&(ge=he),ge<1&&(ge=1);const nn=ge!==d;if(u.value=ge,nn&&k.value>0)return B()}const{$notify:$,$confirm:S,$form:H}=n?.appContext?.config?.globalProperties||{};function K(){if(We.emitter?.emit){We.emitter.emit("updateCard");return}if(typeof window<"u"&&typeof window.location?.reload=="function"){window.location.reload();return}B()}async function I(d){typeof H=="function"&&(await H({token:d.token}),K())}async function A(){typeof H=="function"&&(await H({token:c.value}),K())}function F(d){S({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const m=await fetch(`/api/table/${d.token}`,{method:"DELETE"});if(!m.ok){const{error:g}=await m.json();$({title:"Помилка",type:"warning",message:g});return}$({title:"Видаленно",message:"Успішно видалено"}),await B()}})}e.onMounted(async()=>{await B(),We.emitter?.on?.("updateCard",B)}),e.onBeforeUnmount(()=>{We.emitter?.off?.("updateCard",B)});function z(d){return typeof d?.format=="string"?d.format.toLowerCase():""}function E(d){const m=new Map;s.value.forEach(b=>{b?.name&&m.set(b.name,!!b.hidden)});const g=d.map(b=>{const O=m.has(b.name)?m.get(b.name):!!b.hidden;return{...b,hidden:O}});return g.length&&!g.some(b=>!b.hidden)&&(g[0].hidden=!1),g}const T=e.computed(()=>{const d=s.value.filter(m=>!m.hidden);return d.length?d:s.value}),N=e.computed(()=>{const d=[],m=new Set;for(const g of i.value){if(typeof g=="string"){if(g==="view"){const b="row:view";m.has(b)||(d.push({key:b,type:"view",label:"Переглянути",scope:"row",handler:io}),m.add(b));continue}if(g==="edit"){const b="row:edit";m.has(b)||(d.push({key:b,type:"edit",label:"Редагувати",scope:"row",handler:gt}),m.add(b));continue}if(g==="delete"||g==="del"){const b="row:delete";m.has(b)||(d.push({key:b,type:"delete",label:"Видалити",scope:"row",handler:to,variant:"danger"}),m.add(b));continue}if(g==="add"){const b="toolbar:add";m.has(b)||(d.push({key:b,type:"add",label:"Додати",scope:"toolbar"}),m.add(b))}continue}if(g&&typeof g=="object"){const b=String(g.name??g.type??"action"),O=String(g.label??g.title??b),L=g.scope==="toolbar"?"toolbar":"row",R=`${L}:${b}`;if(m.has(R))continue;m.add(R),d.push({key:R,type:b,label:O,scope:L,handler:L==="row"?P=>no(g,P):void 0,variant:g.variant==="danger"?"danger":"default",original:g})}}return d}),D=e.computed(()=>N.value.filter(d=>d.scope==="row"&&typeof d.handler=="function")),J=e.computed(()=>N.value.filter(d=>d.scope==="toolbar")),le=e.computed(()=>D.value.length>0),Ie=e.computed(()=>J.value.some(d=>d.type==="add")),Se=e.computed(()=>o.value),ke=e.computed(()=>{const d=k.value||Se.value.length,m=Math.ceil(d/f.value);return m>0?m:1}),Ne=e.computed(()=>{const d=Se.value.length,m=k.value||d,g=h.value||m;return`Показано ${d} з ${m} (усього ${g})`});function xe(){u.value<ke.value&&(u.value+=1,B())}function Xn(){u.value>1&&(u.value-=1,B())}e.watch(s,d=>{d?.length&&(d.some(m=>!m.hidden)||(d[0].hidden=!1))},{deep:!0});function Qn(){w&&clearTimeout(w),Be(),w=setTimeout(()=>{u.value=1,B()},300)}function ut(d){const m=_.value||"id",g=d?.token??d?.[m]??d?.id;return g?String(g):""}function Zt(d){const m=T.value[d],g=["py-2",...ht(m)];d===0&&g.push("pl-4");const b=d===T.value.length-1&&!le.value;return g.push(b?"pr-4":"pr-5"),g.join(" ")}function Yt(d,m){const g=["py-2",...ht(m)];z(m)==="badge"&&g.push("center"),et(m)==="wrap"?g.push("whitespace-normal","break-words"):g.push("truncate"),d===0&&g.push("pl-4");const b=d===T.value.length-1&&!le.value;return g.push(b?"pr-4":"pr-5"),g.join(" ")}function et(d){return(typeof d?.overflow=="string"?d.overflow.toLowerCase():"")==="wrap"?"wrap":"clip"}function ht(d){const m=[],g=R=>{if(R==null||R==="")return;const P=Number(R);return Number.isFinite(P)&&P>0?`${P}px`:String(R).replace(/\s+/g,"")},b=g(d?.width),O=g(d?.minWidth),L=g(d?.maxWidth);return b?(m.push(`min-w-[${b}]`,`max-w-[${b}]`),m):(m.push(`min-w-[${O??"100px"}]`),m.push(`max-w-[${L??"350px"}]`),m)}function Xt(d){if(!D.value.length)return!1;const m=_.value||"id";return!!(d?.token||d?.[m]||d?.id)}function Vn(d){return M.value===ut(d)}function eo(d){const m=ut(d);m&&(M.value=M.value===m?null:m)}function Be(){M.value=null}function Qt(d,m){const g=m?.tooltip;if(!g)return;const b=v(d,m);let O,L=m?.tooltipWrap!==!1;if(typeof g=="string"){const R=g.trim();if(!R)return;const P=R.toLowerCase();if(["true","1","yes"].includes(P))O=typeof b=="string"?b:String(b??"");else{if(["false","0","no"].includes(P))return;O=R}}else g===!0?O=b:typeof g=="object"&&(typeof g.text=="string"&&(O=g.text.trim()),typeof g.wrap=="boolean"&&(L=g.wrap!==!1));if(!O){if(b==null||b==="")return;O=String(b)}if(O.trim())return L?{text:O,wrap:!0}:O}function gt(d){Be(),I(d)}function to(d){Be(),F(d)}async function no(d,m){Be();const g=_.value||"id",b=d.isId?m?.[g]??m?.id:m?.token??m?.[g]??m?.id;if(!b){console.warn("Cannot execute action without identifier",d);return}if(d.form&&typeof d.api=="string"&&d.api&&typeof H=="function"){await so(d,m,b);return}if(d.form&&typeof H=="function"){const O=await yt(d.form,b),L={form:d.form,token:O?.token??m?.token??b,schema:O?.schema,mode:O?.mode??"edit"};O?.data!==void 0&&(L.defaultValue=O.data);try{await H(L),K()}catch(R){console.error("Failed to execute form action",R)}return}if(typeof d.api=="string"&&d.api){const O=qe(d.api,b);window.location.href=O;return}m?.token&&typeof H=="function"&&(await H({token:m.token}),K())}function qe(d,m){return`${d.endsWith("/")?d:`${d}/`}${m}`}async function yt(d,m){const g=`/api/form/${d}/${m}`;try{const b=await fetch(g);if(!b.ok)throw new Error(`Request failed with status ${b.status}`);return await b.json()}catch(b){console.error("Failed to load form config",b),$({title:"Помилка",type:"warning",message:"Не вдалося отримати дані форми."});return}}async function vt(d){const m=`/api/template/form/${d}`;try{const g=await fetch(m);if(!g.ok)throw new Error(`Request failed with status ${g.status}`);return(await g.json())?.schema}catch(g){console.error("Failed to load form template",g);return}}function oo(d){if(d!=null){if(d?.data!==void 0)return d.data;if(d?.defaultValue!==void 0)return d.defaultValue;if(d?.values!==void 0)return d.values;if(typeof d=="object"&&!Array.isArray(d)){const{schema:m,token:g,mode:b,message:O,successMessage:L,...R}=d;if(Object.keys(R).length)return R}}}async function so(d,m,g){const b=qe(d.api,g),O=(typeof d.method=="string"?d.method:"PUT").toUpperCase();let L;try{const ie=await fetch(b);if(!ie.ok)throw new Error(`Request failed with status ${ie.status}`);L=await ie.json()}catch(ie){console.error("Failed to load action data",ie),en("Не вдалося отримати дані форми.");return}const R=typeof d.form=="string"?d.form.replace(/\.table$/,".form"):void 0,P=L?.schema??(R?await vt(R):void 0),he={mode:L?.mode??"edit"};R&&(he.form=R),P&&(he.schema=P);const ge=oo(L);ge!==void 0&&(he.defaultValue=ge);const nn=await H(he);if(nn)try{const ie=await fetch(b,{method:O,headers:{"Content-Type":"application/json"},body:JSON.stringify(nn)});if(!ie.ok){const Ms=await Vt(ie),Lp=Ms?.error??Ms?.message??"Не вдалося зберегти дані.";throw new Error(Lp)}ro(`Дані успішно ${he.value==="add"?"збережено":"оновлено"}`),K()}catch(ie){console.error("Failed to submit action data",ie),en("Не вдалося зберегти дані.")}}async function Vt(d){try{return await d.json()}catch{return}}function en(d){$({title:"Помилка",type:"error",message:d})}function ro(d){$({title:"Успіх",type:"success",message:d})}function io(d){Be();const m=x.value||(a.value?String(a.value).replace(/\.form$/,".table"):""),g=_.value||"id",b=d?.[g]??d?.id??d?.token;if(m&&b){const O=`/card/${m}/${b}`;window.location.href=O;return}if(d?.token&&typeof H=="function"){H({token:d.token,readonly:!0,mode:"view"});return}d?.token&&I(d)}function tn(d){if(!M.value)return;const m=d.target;if(!m)return;const g=m.closest("[data-action-key]");g&&g.getAttribute("data-action-key")===M.value||Be()}e.onMounted(()=>{document.addEventListener("click",tn,!0)}),e.onBeforeUnmount(()=>{w&&clearTimeout(w),document.removeEventListener("click",tn,!0),We.emitter?.off?.("updateCard",B)});function bt(d,m){const b=d?.[`${m.name}_text`];if(Array.isArray(b))return b.length?b.join(", "):"-";if(b!=null&&b!=="")return b;const O=d?.[m.name];return Array.isArray(O)?O.length?O.join(", "):"-":O??"-"}function kt(d,m){const b=d?.[`${m.name}_data`];if(b&&typeof b=="object")return{text:b.text??b.label??b.name??b.title??"-",color:b.color,textColor:b.textColor};const O=d?.[`${m.name}_text`]??d?.[m.name];return{text:(Array.isArray(O)?O.join(", "):O)??"-"}}function y(d,m){const g=kt(d,m);return g.color?{backgroundColor:g.color,color:g.textColor??"#ffffff"}:{}}function v(d,m){const g=z(m);if(g==="badge")return kt(d,m).text;if(g==="select")return bt(d,m);if(g==="slot")return"-";if(g==="text")return d?.[m.name]??"-";const b=d?.[`${m.name}_data`];return b!=null&&typeof b!="object"?b:d?.[`${m.name}_text`]??d?.[m.name]??"-"}return(d,m)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Cd,[e.createElementVNode("div",Sd,[e.createElementVNode("div",Bd,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":m[0]||(m[0]=g=>p.value=g),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:Qn},null,544),[[e.vModelText,p.value]])]),e.createElementVNode("div",Td,[e.createVNode(gd,{columns:s.value,"onUpdate:columns":m[1]||(m[1]=g=>s.value=g)},null,8,["columns"]),Ie.value&&c.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:A,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":"Додати запис"},m[2]||(m[2]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M5 12h14"}),e.createElementVNode("path",{d:"M12 5v14"})],-1)]))):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",$d,[e.createElementVNode("table",Dd,[e.createElementVNode("thead",Ld,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(g,b)=>(e.openBlock(),e.createElementBlock("th",{key:g.name,class:e.normalizeClass(Zt(b))},e.toDisplayString(g.ua),3))),128)),le.value?(e.openBlock(),e.createElementBlock("th",Od," Дії ")):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",Ad,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,g=>(e.openBlock(),e.createElementBlock("tr",{class:"bg-white odd:bg-gray-50",key:g.id??JSON.stringify(g)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(b,O)=>e.withDirectives((e.openBlock(),e.createElementBlock("td",{key:b.name,class:e.normalizeClass(Yt(O,b))},[b.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:b.link.replace("{{id}}",g.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(v(g,b)),9,Id)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[z(b)==="slot"&&b.slot?.content?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(td)(b.slot.content)),{key:0,data:g,row:g,column:b,value:g?.[b.name]},null,8,["data","row","column","value"])):z(b)==="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(y(g,b))},e.toDisplayString(kt(g,b).text),5)):z(b)==="select"?(e.openBlock(),e.createElementBlock("span",Md,e.toDisplayString(bt(g,b)),1)):(e.openBlock(),e.createElementBlock("span",Rd,e.toDisplayString(v(g,b)),1))],64))],2)),[[e.unref(r),Qt(g,b)]])),128)),le.value?(e.openBlock(),e.createElementBlock("td",Pd,[Xt(g)?(e.openBlock(),e.createElementBlock("div",Fd,[e.createVNode(Nd,{row:g,actions:D.value,"is-open":Vn(g),"action-key":ut(g),onToggle:b=>eo(g)},null,8,["row","actions","is-open","action-key","onToggle"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),128)),Se.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",zd,[e.createElementVNode("td",{colspan:T.value.length+(le.value?1:0),class:"py-6 text-center text-gray-500"}," Немає записів для відображення ",8,jd)]))])])]),e.createVNode(ld,{"current-page":u.value,"total-pages":ke.value,label:Ne.value,onPrevious:Xn,onNext:xe},null,8,["current-page","total-pages","label"])]))}}),Hd={class:"p-[20px]"},Ud={class:"flex gap-[6px] mb-5"},qd={class:"vs-form-text relative bg-white rounded-lg flex-grow"},Wd={class:"grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5 grid-cols-6"},Kd={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},Gd={class:"space-y-8"},Jd={key:0},Zd={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Yd=["onClick"],Xd={class:"md:col-span-2"},Qd={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Vd={class:"text-sm text-gray-500 dark:text-neutral-500"},ep={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},tp=["checked","onChange"],np={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},op={class:"md:col-span-2"},sp={class:"font-semibold text-gray-800 dark:text-neutral-200"},rp=["onClick"],ip={class:"md:col-span-2"},lp={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},ap={class:"text-sm text-gray-500 dark:text-neutral-500"},cp={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},dp=["checked","onChange"],Gt=e.defineComponent({__name:"GroupInterfaceWidget",props:{data:{},id:{}},setup(t){const n=t,o=e.ref(""),s=["view","add","edit","del"],r=e.ref({});e.onMounted(async()=>{const x=await(await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`)).json();x.routes&&x.routes.forEach(w=>{r.value[w.path]=new Set(w.actions)})});const l=(_,x)=>r.value[_]?.has(x)??!1,i=(_,x)=>{r.value[_]||(r.value[_]=new Set),r.value[_].has(x)?r.value[_].delete(x):r.value[_].add(x)},a=(_,x)=>{_.forEach(w=>{w.path&&(r.value[w.path]||(r.value[w.path]=new Set),r.value[w.path].has(x)?r.value[w.path].delete(x):r.value[w.path].add(x))})},c=e.computed(()=>Object.entries(r.value).map(([_,x])=>({path:_,actions:Array.from(x)})).filter(_=>_.actions.length)),p=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})}),We.notify({title:"Success!",message:"Permissions saved."})},u=()=>{r.value={}},f=_=>{if(!o.value.trim())return _;const x=o.value.toLowerCase();return _.filter(w=>w.ua.toLowerCase().includes(x)||w.path&&w.path.toLowerCase().includes(x))},h=e.computed(()=>f(n.data.routers.filter(_=>!_.menu))),k=e.computed(()=>n.data.routers.filter(_=>_.menu).map(_=>({..._,menu:f(_.menu||[])})).filter(_=>_.menu&&_.menu.length>0));return(_,x)=>(e.openBlock(),e.createElementBlock("div",Hd,[e.createElementVNode("div",Ud,[e.createElementVNode("div",qd,[x[1]||(x[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":x[0]||(x[0]=w=>o.value=w),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,o.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:p,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",Wd,[x[2]||(x[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(s,(w,C)=>e.createElementVNode("div",{class:"col-span-1 text-center",key:C},[e.createElementVNode("h3",Kd,e.toDisplayString(w),1)])),64))]),e.createElementVNode("div",Gd,[h.value.length?(e.openBlock(),e.createElementBlock("div",Jd,[e.createElementVNode("ul",Zd,[x[3]||(x[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(s,(w,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:M=>a(h.value,s[C])}," Toggle all ",8,Yd)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(w,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",Xd,[e.createElementVNode("p",Qd,e.toDisplayString(w.ua),1),e.createElementVNode("p",Vd,e.toDisplayString(w.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(M,B)=>e.createElementVNode("li",{key:B,class:"col-span-1"},[e.createElementVNode("div",ep,[e.createElementVNode("input",{type:"checkbox",checked:l(w.path,M),onChange:$=>i(w.path,M),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,tp)])])),64))]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(w,C)=>(e.openBlock(),e.createElementBlock("div",{key:C,class:"space-y-5"},[e.createElementVNode("ul",np,[e.createElementVNode("li",op,[e.createElementVNode("h3",sp,e.toDisplayString(w.ua),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(M,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(w.menu,s[B])}," Toggle all ",8,rp)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.menu,(M,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",ip,[e.createElementVNode("p",lp,e.toDisplayString(M.ua),1),e.createElementVNode("p",ap,e.toDisplayString(M.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,($,S)=>e.createElementVNode("li",{key:S,class:"col-span-1"},[e.createElementVNode("div",cp,[e.createElementVNode("input",{type:"checkbox",checked:l(M.path,$),onChange:H=>i(M.path,$),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,dp)])])),64))]))),128))]))),128))])]))}}),Ue={"vs-widget-map":Ct,"vs-widget-comments":wt,"vs-widget-history":Nt,"vs-widget-gallery":_t,"vs-widget-file":xt,"vs-widget-list":an,"vs-widget-table":Ds,"vs-group-interface":Gt};function Ls(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 Os(t){const n={...t};return Array.isArray(t.items)&&(n.items=t.items.map(o=>Os(o))),n}function pp(t,n=12){if(!t.length)return;const o=[],s=[];t.forEach(c=>{const p=Ls(c.col);p?(c.col=p,o.push({item:c,span:p})):s.push(c)});const r=o.reduce((c,p)=>c+p.span,0);let l=n-r;if(s.length===0)return;l<=0&&(l=n);const i=Math.max(1,Math.floor(l/s.length));let a=Math.max(0,l-i*s.length);s.forEach(c=>{let p=i;a>0&&(p+=1,a-=1),c.col=Math.max(1,Math.min(12,p))})}function Jt(t,n=12){if(!Array.isArray(t)||!t.length)return[];const o=t.map(s=>Os(s));return o.forEach(s=>{Array.isArray(s.items)&&s.items.length&&(s.items=Jt(s.items,12))}),pp(o,n),o}function As(t){const n=Ls(t);return n?n>=12?["md:col-span-12","lg:col-span-12"]:[`md:col-span-${n}`,`lg:col-span-${n}`]:[]}const fp={class:"text-lg font-semibold text-gray-900"},mp=["innerHTML"],up={key:0,class:"grid grid-cols-12 gap-4"},hp={key:0,class:"mb-4 pb-2 border-b border-gray-200"},gp={class:"text-lg font-semibold text-gray-900"},yp=["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,o=e.computed(()=>{if(!n.col)return{};const p=Math.max(1,Math.min(12,Number(n.col)));return{[`md:col-span-${p}`]:!0,[`lg:col-span-${p}`]:!0}}),s=e.computed(()=>Jt(n.items));function r(p){const u=["col-span-12"],f=As(p.col);return f.length&&u.push(...f),u}function l(p){return Ue[p]||p}function i(p,u){if(!p||typeof u!="string"||!u)return{found:!1,value:void 0};const f=u.split(".");let h=p;for(const k of f){if(h==null||typeof h!="object"&&!Array.isArray(h))return{found:!1,value:void 0};if(!(k in h))return{found:!1,value:void 0};h=h[k]}return{found:!0,value:h}}const a=function(p={}){const u={...p};return Object.entries(u).forEach(([f,h])=>{if(f!=="props"&&typeof h=="string"){const k=i(n.data,h);k.found&&(u[f]=k.value)}}),p.props&&typeof p.props=="object"&&Object.entries(p.props).forEach(([f,h])=>{if(typeof h=="string"){const k=i(n.data,h);u[f]=k.found?k.value:h}else u[f]=h}),delete u.props,u},c=e.computed(()=>{const p={};return n.col&&(p.col=n.col),p});return(p,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[o.value,p.styling?.classItem],"w-full bg-gray-50 rounded-lg p-4 col-span-12"])},[!p.hideTitle&&p.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mb-4 pb-2 border-b border-gray-200",p.styling?.classItemTitle])},[e.createElementVNode("h3",fp,e.toDisplayString(p.title),1)],2)):e.createCommentVNode("",!0),p.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:p.html,class:"text-gray-900 leading-relaxed"},null,8,mp)):p.type?.includes("tabs")?(e.openBlock(),e.createBlock(mt,{key:2,view:p.type,panels:p.items,data:p.data,styling:p.styling},null,8,["view","panels","data","styling"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[s.value.length?(e.openBlock(),e.createElementBlock("div",up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.name||f.component||h,class:e.normalizeClass(r(f))},[f.title||f.label?(e.openBlock(),e.createElementBlock("div",hp,[e.createElementVNode("h3",gp,e.toDisplayString(f.title||f.label),1)])):e.createCommentVNode("",!0),f.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:f.html,class:"text-gray-900 leading-relaxed"},null,8,yp)):f.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(f.component)),e.mergeProps({key:2,ref_for:!0},{geom:p.data.geom,id:p.data.id,...c.value,...a(f),data:p.data},{class:"w-full"}),null,16)):e.renderSlot(p.$slots,"default",{key:3})],2))),128))])):e.createCommentVNode("",!0)],64))],2))}}),vp={class:"grid grid-cols-12 gap-[20px]"},bp={key:0,class:"col-span-4"},kp=["innerHTML"],Ep=["onClick"],wp=["innerHTML"],Np={key:1,class:"flex w-full"},xp={class:"flex flex-col w-56 border-r border-gray-200 bg-gray-50 relative"},_p=["onClick"],Cp={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 transition-all duration-300"},Sp={class:"flex-1 p-4"},Bp=["innerHTML"],Tp={class:"grid grid-cols-12 gap-4"},$p={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 o(){const E=typeof window<"u"?window:globalThis,T="__vsCardAnonymousCounter__",N=E[T]??0;return E[T]=N+1,N===0?"tab":`tab${N}`}const s=e.ref(0),r=e.ref([]);let l=!1;const i=e.ref(n.id??o());e.watch(()=>n.id,E=>{E&&(i.value=E)});const a=new Map,c=e.computed(()=>n.view==="tabs"||n.view==="vertical-tabs");e.provide("vsCardTabsContext",c);function p(E,T){const N=T?.path;return N?(a.has(N)||a.set(N,e.defineAsyncComponent(()=>import(N))),a.get(N)):typeof E=="string"&&Ue[E]?Ue[E]:T?.component&&Ue[T.component]?Ue[T.component]:T?.name&&Ue[T.name]?Ue[T.name]:E}function u(E){return E.forEach(T=>{T.type&&(T.view=T.type)}),r.value=E.filter(T=>T.type==="pin"),E.filter(T=>T.type!=="pin")}const f=e.computed(()=>{let E;return n.panels&&n.panels.length>0?E=n.normalizeTabs?u(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(E=n.data.filter(N=>N.type.includes("tabs"))[0]?.items),Jt(E,12)}),h=e.computed(()=>i.value),k=e.computed(()=>{let E;return n.panels&&n.panels.length>0?E=n.normalizeTabs?u(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(E=n.data),Jt(E,12)}),_=e.computed(()=>({[`view-${n.view}`]:!0}));function x(E,T){if(!E||typeof T!="string"||!T)return{found:!1,value:void 0};const N=T.split(".");let D=E;for(const J of N){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 w=E=>{const T={...E};return Object.entries(T).forEach(([N,D])=>{if(N!=="props"&&typeof D=="string"){const J=x(n.data,D);J.found&&(T[N]=J.value)}}),E.props&&typeof E.props=="object"&&Object.entries(E.props).forEach(([N,D])=>{if(typeof D=="string"){const J=x(n.data,D);T[N]=J.found?J.value:D}else T[N]=D}),delete T.props,n.data&&(T.data=n.data),T};function C(E){const T=["col-span-12"],N=As(E.col);return N.length&&T.push(...N),T}const M=e.ref([]),B=e.ref([]),$=e.ref([]);function S(E,T){E&&E instanceof HTMLElement&&(M.value[T]=E)}function H(){B.value=M.value.map(E=>E.offsetWidth),$.value=M.value.map(E=>E.offsetLeft)}function K(){if(typeof window>"u")return null;const E=h.value;if(!E)return null;const N=new URL(window.location.href).searchParams.get(E);if(N===null)return null;const D=Number.parseInt(N,10);return Number.isNaN(D)?null:D}function I(E){if(typeof window>"u")return;const T=h.value;if(!T)return;const N=new URL(window.location.href);E<=0?N.searchParams.delete(T):N.searchParams.set(T,String(E));const D=window.history.state??{};window.history.replaceState(D,document.title,N)}function A(){if(l)return;const E=K();if(E===null||!f.value.length)return;const T=Math.min(Math.max(E,0),f.value.length-1);T!==E&&I(T),T!==s.value&&(s.value=T),l=!0}function F(){l=!1,A()}let z=null;return e.onMounted(()=>{e.nextTick(()=>{A(),H()}),typeof window<"u"&&window.addEventListener("popstate",F),z=new ResizeObserver(()=>H()),z.observe(document.body)}),e.onBeforeUnmount(()=>{z?.disconnect(),typeof window<"u"&&window.removeEventListener("popstate",F)}),e.watch(s,E=>{e.nextTick(()=>{H()}),I(E)}),e.watch(f,()=>{l=!1,A()}),(E,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(E.classWrapper||_.value)},[e.createElementVNode("div",vp,[r.value.length!==0?(e.openBlock(),e.createElementBlock("div",bp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value[0].items,(N,D)=>(e.openBlock(),e.createElementBlock("div",{key:N.name||D,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 m-1 mb-3"},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,kp)):N.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component,N)),e.mergeProps({key:1,ref_for:!0},N.component==="Card"?N:w(N),{id:E.data.id,class:["w-full h-full",E.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")},[E.view==="tabs"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["overflow-hidden w-full",E.styling?.classTabWrapper])},[e.createElementVNode("div",{class:e.normalizeClass(["flex border-b border-gray-200 bg-gray-50 relative gap-4 my-6",E.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[s.value]+"px",left:$.value[s.value]+"px"})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,D)=>(e.openBlock(),e.createElementBlock("button",{key:N.name||D,ref_for:!0,ref:J=>S(J,D),onClick:J=>s.value=D,class:e.normalizeClass(["px-1 py-2 text-sm font-medium transition-colors",s.value===D?"text-blue-600 border-blue-600 border-b-2 ":"text-gray-600 hover:text-gray-800"])},e.toDisplayString(N.title||N.label||N.name||`Tab ${D+1}`),11,Ep))),128))],2),e.createElementVNode("div",{class:e.normalizeClass([E.styling?.classTabContent,"p-1"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,D)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:N.name||D,class:e.normalizeClass(["transition-all duration-300 ease-in-out",s.value===D?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",E.classPanel||"w-full border-gray-100"])},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,wp)):E.$slots[`tab-${D}`]?e.renderSlot(E.$slots,`tab-${D}`,{key:1,item:N,data:E.data}):N.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ft),e.mergeProps({key:2,ref_for:!0},w(N),{items:N.items,"hide-title":!0,class:["w-full h-full",E.styling?.classItem],styling:E.styling}),null,16,["items","class","styling"])):N.component||N.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component||N.name,N)),e.mergeProps({key:3,ref_for:!0},N.component==="Card"?N:w(N),{styling:E.styling,id:E.data.id,class:["w-full h-full",E.styling?.classItem]}),null,16,["styling","id","class"])):e.renderSlot(E.$slots,N.slot||`tab-${D}`,{key:4,item:N,data:E.data})],2)),[[e.vShow,s.value===D]])),128))],2)],2)):E.view==="vertical-tabs"?(e.openBlock(),e.createElementBlock("div",Np,[e.createElementVNode("div",xp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,D)=>(e.openBlock(),e.createElementBlock("button",{key:N.name||D,onClick:J=>s.value=D,class:e.normalizeClass(["relative px-1 py-4 text-sm font-medium text-left transition-colors duration-300",s.value===D?"text-blue-600 bg-white":"text-gray-600 hover:text-gray-800 hover:bg-gray-100"])},[e.createTextVNode(e.toDisplayString(N.title||N.label||N.name||`Tab ${D+1}`)+" ",1),s.value===D?(e.openBlock(),e.createElementBlock("span",Cp,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,_p))),128))]),e.createElementVNode("div",Sp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,D)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:N.name||D,class:e.normalizeClass(["transition-all duration-300 ease-in-out",s.value===D?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",E.classPanel||"w-full border-gray-100 py-2"])},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,Bp)):E.$slots[`tab-${D}`]?e.renderSlot(E.$slots,`tab-${D}`,{key:1,item:N,data:E.data}):N.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ft),e.mergeProps({key:2,ref_for:!0},w(N),{items:N.items,"hide-title":!0,class:["w-full h-full",E.styling?.classItem],styling:E.styling}),null,16,["items","class","styling"])):N.component||N.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component||N.name,N)),e.mergeProps({key:3,ref_for:!0},N.component==="Card"?N:w(N),{id:E.data.id,class:["w-full h-full",E.styling?.classItem]}),null,16,["id","class"])):e.renderSlot(E.$slots,N.slot||`tab-${D}`,{key:4,item:N,data:E.data})],2)),[[e.vShow,s.value===D]])),128))])])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(E.styling?.classPlain||"p-1 w-full")},[e.createElementVNode("div",Tp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(N,D)=>(e.openBlock(),e.createElementBlock("div",{key:N.name||N.component||D,class:e.normalizeClass(C(N))},[E.$slots[`panel-${D}`]?e.renderSlot(E.$slots,`panel-${D}`,{key:0,item:N,data:E.data}):N.items||N.html?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ft),e.mergeProps({key:1,ref_for:!0},w(N),{items:N.items||[],class:["w-full h-full",E.styling?.classItem],styling:E.styling}),null,16,["items","class","styling"])):N.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component,N)),e.mergeProps({key:2,ref_for:!0},w(N),{class:["w-full h-full",[E.styling?.classItem]],styling:E.styling}),null,16,["class","styling"])):(e.openBlock(),e.createElementBlock("div",$p,[e.renderSlot(E.$slots,N.slot||`panel-${D}`,{item:N,data:E.data})]))],2))),128))])],2))],2)])],2))}}),Dp=["onClick"],Is=Me(e.defineComponent({__name:"CopyNotification",setup(t,{expose:n}){const o=e.ref([]);let s=1;const r=()=>{if(o.value.length>=10){const a=o.value[0];clearTimeout(a.timer),o.value.shift()}const i={id:s++,timer:setTimeout(()=>{l(i.id)},1500)};o.value.push(i)},l=i=>{const a=o.value.findIndex(c=>c.id===i);if(a!==-1){const c=o.value[a];clearTimeout(c.timer),o.value.splice(a,1)}};return n({addNotification:r}),e.onUnmounted(()=>{o.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(o.value,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id,class:"bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"},[e.createVNode(e.unref(Ws),{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:p=>l(c.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(rn),{class:"h-4 w-4"})],8,Dp)]))),128))]),_:1})]))}}),[["__scopeId","data-v-d1ac6329"]]);mt.install=function(t){t.component("vs-widget-file",xt),t.component("vs-widget-comments",wt),t.component("vs-widget-history",Nt),t.component("vs-widget-gallery",_t),t.component("vs-widget-map",Ct),t.component("vs-group-interface",Gt),t.component("CommentsWidget",wt),t.component("HistoryWidget",Nt),t.component("GalleryWidget",_t),t.component("FilesWidget",xt),t.component("MapWidget",Ct),t.component("Card",mt),t.component("CardItem",ft),t.component("DescriptionListWidget",an),t.component("CopyNotification",Is),t.component("GroupInterfaceWidget",Gt)},V.Card=mt,V.CardItem=ft,V.CommentsWidget=wt,V.CopyNotification=Is,V.DescriptionListWidget=an,V.FilesWidget=xt,V.GalleryWidget=_t,V.GroupInterfaceWidget=Gt,V.HistoryWidget=Nt,V.MapWidget=Ct,V.TableWidget=Ds,V.default=mt,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(V,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@opengis/core")):typeof define=="function"&&define.amd?define(["exports","vue","@opengis/core"],t):(V=typeof globalThis<"u"?globalThis:V||self,t(V.WidgetLib={},V.Vue,V.OpenGISCore))})(this,(function(V,t,We){"use strict";function Fs(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return n.default=e,Object.freeze(n)}const js=Fs(t);const ao=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zs=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,o,s)=>s?s.toUpperCase():o.toLowerCase()),Hs=e=>{const n=zs(e);return n.charAt(0).toUpperCase()+n.slice(1)},Us=(...e)=>e.filter((n,o,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===o).join(" ").trim();var xt={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"};const qs=({size:e,strokeWidth:n=2,absoluteStrokeWidth:o,color:s,iconNode:r,name:l,class:i,...a},{slots:c})=>t.h("svg",{...xt,width:e||xt.width,height:e||xt.height,stroke:s||xt.stroke,"stroke-width":o?Number(n)*24/Number(e):n,class:Us("lucide",...l?[`lucide-${ao(Hs(l))}-icon`,`lucide-${ao(l)}`]:["lucide-icon"]),...a},[...r.map(u=>t.h(...u)),...c.default?[c.default()]:[]]);const Y=(e,n)=>(o,{slots:s})=>t.h(qs,{...o,iconNode:n,name:e},s);const Ws=Y("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"}]]);const Ks=Y("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const Gs=Y("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"}]]);const co=Y("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"}]]);const Js=Y("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"}]]);const Ke=Y("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"}]]);const Zs=Y("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"}]]);const Ys=Y("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"}]]);const Xs=Y("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"}]]);const Qs=Y("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"}]]);const po=Y("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"}]]);const Vs=Y("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"}]]);const fo=Y("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const er=Y("reply",[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]);const mo=Y("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"}]]);const tr=Y("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"}]]);const nr=Y("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"}]]);const on=Y("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const or=Y("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"}]]);const sn=Y("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);const sr=Y("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"}]]);const rn=Y("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),rr={class:"border-t pt-3 mt-4"},ir={class:"flex gap-2"},lr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},ar={class:"flex-1 space-y-2"},cr={class:"flex justify-between items-center"},dr={class:"flex gap-2"},pr=["disabled"],uo=t.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:t.mergeModels(["sendComment"],["update:isReply"]),setup(e,{emit:n}){const o=t.useModel(e,"isReply"),s=t.ref(""),r=n,l=()=>{s.value.trim()&&(r("sendComment",s.value),s.value="")},i=a=>{(a.ctrlKey||a.metaKey)&&a.key==="Enter"&&(a.preventDefault(),l())};return(a,c)=>(t.openBlock(),t.createElementBlock("div",rr,[t.createElementVNode("div",ir,[t.createElementVNode("span",lr,[t.createVNode(t.unref(sn),{class:"h-3 w-3 text-gray-500"})]),t.createElementVNode("div",ar,[t.withDirectives(t.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),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),[[t.vModelText,s.value]]),t.createElementVNode("div",cr,[c[4]||(c[4]=t.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),t.createElementVNode("div",dr,[o.value?(t.openBlock(),t.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]=u=>o.value=!1)},[t.createVNode(t.unref(rn),{class:"h-3 w-3"}),c[2]||(c[2]=t.createTextVNode(" Cancel ",-1))])):t.createCommentVNode("",!0),t.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:!s.value.trim(),onClick:l},[t.createVNode(t.unref(mo),{class:"h-3 w-3 mr-1"}),c[3]||(c[3]=t.createTextVNode(" Send ",-1))],8,pr)])])])])]))}}),fr={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"},mr=t.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:t.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(e,{emit:n}){const o=n,s=t.useModel(e,"showMoreOptions"),r=t.ref(),l=t.ref(!0),i=async u=>{s.value&&r.value&&!r.value.contains(u.target)&&!l.value&&(s.value=!1),l.value=!1},a=()=>{s.value=!1,o("edit")},c=()=>{s.value=!1,o("delete")};return t.onMounted(()=>{document.addEventListener("click",i)}),t.onUnmounted(()=>{document.removeEventListener("click",i)}),(u,p)=>(t.openBlock(),t.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:r},[t.createElementVNode("div",fr,[t.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},[t.createVNode(t.unref(nr),{class:"h-3 w-3 mr-2"}),p[0]||(p[0]=t.createTextVNode(" Edit ",-1))]),t.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},[t.createVNode(t.unref(on),{class:"h-3 w-3 mr-2"}),p[1]||(p[1]=t.createTextVNode(" Delete ",-1))])])],512))}}),ur={class:"space-y-2"},hr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},gr={class:"flex-1 min-w-0 space-y-1 relative"},yr={class:"flex items-center gap-2"},vr={class:"font-medium text-xs"},br={class:"text-xs text-gray-500"},kr={key:0,class:"text-xs text-gray-700 leading-relaxed"},Er={class:"flex justify-between text-xs"},xr={class:"flex items-center gap-2"},wr={key:0,class:"flex gap-2"},Nr=["disabled"],Cr={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},Sr=t.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(e,{emit:n}){const o=n,s=e,r=t.ref(s.comment.text),l=t.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),i=t.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=t.ref(!1),c=t.ref(!1),u=t.ref(!1),p=t.ref(!1),f=w=>{const S=new Date,I=Math.floor((S.getTime()-w.getTime())/(1e3*60*60));return I<1?`${Math.floor((S.getTime()-w.getTime())/6e4)}m`:I<24?`${I}h`:`${Math.floor(I/24)}d`},b=()=>{p.value=!p.value,p.value?o("like",s.comment.id,"add"):o("like",s.comment.id,"delete")},k=()=>{o("edit",s.comment.id,r.value),u.value=!1},E=(w,S)=>{o("like",w,S)},N=(w,S)=>{o("edit",w,S)};return(w,S)=>{const I=t.resolveComponent("CommentItem",!0);return t.openBlock(),t.createElementBlock("div",ur,[t.createElementVNode("div",{class:t.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",u.value?"bg-gray-50":""])},[t.createElementVNode("span",hr,[t.createVNode(t.unref(sn),{class:"h-3 w-3 text-gray-500"})]),t.createElementVNode("div",gr,[t.createElementVNode("div",yr,[t.createElementVNode("span",vr,t.toDisplayString(e.comment?.author),1),t.createElementVNode("span",br,t.toDisplayString(f(e.comment?.createdAt)),1)]),u.value?t.withDirectives((t.openBlock(),t.createElementBlock("textarea",{key:1,"onUpdate:modelValue":S[0]||(S[0]=B=>r.value=B),class:t.normalizeClass(u.value?i.value:l.value)},null,2)),[[t.vModelText,r.value]]):(t.openBlock(),t.createElementBlock("p",kr,t.toDisplayString(e.comment?.text),1)),t.createElementVNode("div",Er,[t.createElementVNode("div",xr,[t.createElementVNode("button",{class:t.normalizeClass(["flex items-center gap-1",p.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:S[1]||(S[1]=B=>b())},[t.createVNode(t.unref(Xs),{class:t.normalizeClass(["h-3 w-3",p.value?"fill-blue-600":""])},null,8,["class"]),t.createTextVNode(" "+t.toDisplayString(e.comment?.likes),1)],2),e.isInside?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:0,class:"text-gray-500 hover:text-blue-600 transition-colors",onClick:S[2]||(S[2]=B=>c.value=!0)},[t.createVNode(t.unref(er),{class:"h-3 w-3"})])),t.createElementVNode("button",{class:"text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",type:"button",onClick:S[3]||(S[3]=B=>a.value=!0)},[t.createVNode(t.unref(Js),{class:"h-3 w-3"})])]),u.value?(t.openBlock(),t.createElementBlock("div",wr,[t.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:S[4]||(S[4]=B=>u.value=!1)},[t.createVNode(t.unref(rn),{class:"h-3 w-3"}),S[11]||(S[11]=t.createTextVNode(" Cancel ",-1))]),t.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:S[5]||(S[5]=B=>k())},[t.createVNode(t.unref(mo),{class:"h-3 w-3 mr-1"}),S[12]||(S[12]=t.createTextVNode(" Send ",-1))],8,Nr)])):t.createCommentVNode("",!0)])]),a.value?(t.openBlock(),t.createBlock(mr,{key:0,showMoreOptions:a.value,"onUpdate:showMoreOptions":S[6]||(S[6]=B=>a.value=B),onEdit:S[7]||(S[7]=B=>u.value=!0),onDelete:S[8]||(S[8]=B=>w.$emit("delete",e.comment?.id)),comment:e.comment},null,8,["showMoreOptions","comment"])):t.createCommentVNode("",!0)],2),e.isInside?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Cr,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.comment?.replies,B=>(t.openBlock(),t.createBlock(I,{key:B.id,comment:B,isInside:!0,onDelete:L=>w.$emit("delete",B.id),onLike:E,onEdit:N},null,8,["comment","onDelete"]))),128)),c.value&&!e.isInside?(t.openBlock(),t.createBlock(uo,{key:0,onSendComment:S[9]||(S[9]=B=>w.$emit("reply",e.comment?.id,B)),isReply:c.value,"onUpdate:isReply":S[10]||(S[10]=B=>c.value=B)},null,8,["isReply"])):t.createCommentVNode("",!0)]))])}}}),_r=["id"],Br={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},wt=t.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(e,{emit:n}){const o=e,s=n,r=t.ref(o.comments??[]);async function l(){if(!o.id)return;const f=await fetch(`/api/widget/comment/${o.id}`).then(b=>b.json());r.value=f.rows.map(b=>({id:b.communication_id,author:b.username,text:b.body,createdAt:new Date(b.cdate)}))}r.value.length===0&&l();const i=async f=>{o.onAddComment?o.onAddComment(f):o.id&&(await fetch(`/api/widget/comment/${o.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:f})}),await l()),s("add",f)},a=(f,b)=>{o?.onLike?.(f,b),s("like",f,b)},c=(f,b)=>{o.onReply?.(f,b),s("reply",f,b)},u=async(f,b)=>{o.onEdit?o.onEdit(f,b):o.id&&(await fetch(`/api/widget/comment/${o.id}/${f}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:b})}),await l()),s("edit",f,b)},p=async f=>{o.onDelete?o.onDelete(f):o.id&&(await fetch(`/api/widget/comment/${o.id}/${f}`,{method:"DELETE"}),await l()),s("delete",f)};return(f,b)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["mx-auto font-sans",e.className]),id:e.id,style:t.normalizeStyle(e.style)},[e.title?(t.openBlock(),t.createElementBlock("h3",Br,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass([e.maxHeight?"overflow-y-auto":"","space-y-3"]),style:t.normalizeStyle({maxHeight:e.maxHeight+"px"})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value,k=>(t.openBlock(),t.createBlock(Sr,{key:k.id,comment:k,onReply:c,onLike:a,onDelete:b[0]||(b[0]=E=>p(E)),onEdit:u},null,8,["comment"]))),128))],6),t.createVNode(uo,{onSendComment:b[1]||(b[1]=k=>i(k))})],14,_r))}}),ho=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:Ke}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:tr}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:or}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:Qs}]]),Tr={class:"mx-auto font-sans"},$r={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Dr={class:"relative"},Lr={class:"space-y-3"},Or={class:"flex-1 min-w-0 pb-2"},Ar={class:"flex items-center gap-1.5 mb-1 mt-0.5"},Ir={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Mr={class:"font-medium text-xs"},Rr={class:"text-xs text-gray-500"},Pr={class:"space-y-1"},Fr={class:"text-xs text-gray-700"},jr={class:"capitalize mr-1"},zr={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"},Hr={key:0,class:"flex items-center gap-1 text-xs"},Ur={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},qr={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},Nt=t.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(e){const n=e,o=t.ref(Array.isArray(n.data)?n.data:[]);o.value.length===0&&n.id&&s();async function s(){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}),o.value=l.rows}return(r,l)=>(t.openBlock(),t.createElementBlock("div",Tr,[e.title?(t.openBlock(),t.createElementBlock("h3",$r,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.maxHeight?"overflow-y-auto":""),style:t.normalizeStyle({maxHeight:e.maxHeight+"px"})},[t.createElementVNode("div",Dr,[l[0]||(l[0]=t.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),t.createElementVNode("div",Lr,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,i=>(t.openBlock(),t.createElementBlock("div",{class:"relative flex items-start gap-2",key:i?.id},[t.createElementVNode("div",{class:t.normalizeClass(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${t.unref(ho).get(i?.entityType)?.color}`)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(ho).get(i?.entityType)?.icon),{class:"h-3 w-3"}))],2),t.createElementVNode("div",Or,[t.createElementVNode("div",Ar,[t.createElementVNode("span",Ir,[t.createVNode(t.unref(sn),{class:"h-3 w-3 text-gray-500"})]),t.createElementVNode("span",Mr,t.toDisplayString(i?.userName),1),t.createElementVNode("span",Rr,t.toDisplayString(i?.timestamp.toLocaleDateString("ua-UA",{day:"2-digit",month:"2-digit",year:"numeric"}))+" "+t.toDisplayString(i?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),t.createElementVNode("div",Pr,[t.createElementVNode("div",Fr,[t.createElementVNode("span",jr,t.toDisplayString(i?.action),1),i?.entityId?(t.openBlock(),t.createElementBlock("span",zr,t.toDisplayString(i?.entityId),1)):t.createCommentVNode("",!0)]),i?.changes?.[i?.entityId]?(t.openBlock(),t.createElementBlock("div",Hr,[i?.changes?.[i?.entityId]?.old?(t.openBlock(),t.createElementBlock("span",Ur,t.toDisplayString(i?.changes?.[i?.entityId]?.old),1)):t.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.old&&i?.changes?.[i?.entityId]?.new?(t.openBlock(),t.createBlock(t.unref(Ks),{key:1,class:"h-2 w-2 text-gray-400"})):t.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.new?(t.openBlock(),t.createElementBlock("span",qr,t.toDisplayString(i?.changes?.[i?.entityId]?.new),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),Wr={key:0,class:"text-xl font-semibold"},Kr={class:"flex gap-1"},Gr={key:0},Jr={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"},Zr=t.defineComponent({__name:"FileHeader",props:t.mergeModels({editable:{type:Boolean,default:!0},title:{}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["onAddFile"],["update:modelValue"]),setup(e){const n=t.useModel(e,"modelValue"),o={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(s,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",e.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[e.title?(t.openBlock(),t.createElementBlock("h3",Wr,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),t.createElementVNode("div",Kr,[t.createElementVNode("button",{class:t.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"?o.active:o.inactive]),onClick:r[0]||(r[0]=l=>n.value="list")},[t.createVNode(t.unref(Vs),{class:"h-4 w-4"})],2),t.createElementVNode("button",{class:t.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"?o.active:o.inactive]),onClick:r[1]||(r[1]=l=>n.value="grid")},[t.createVNode(t.unref(Ys),{class:"h-4 w-4"})],2),e.editable?(t.openBlock(),t.createElementBlock("label",Gr,[t.createElementVNode("input",{type:"file",class:"hidden",onChange:r[2]||(r[2]=l=>s.$emit("onAddFile",l))},null,32),t.createElementVNode("div",Jr,[t.createVNode(t.unref(fo),{class:"h-4 w-4"}),r[3]||(r[3]=t.createTextVNode(" Додати файл ",-1))])])):t.createCommentVNode("",!0)])],2))}}),ln={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:Ke,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:Zs,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:sr,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:Ke,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:Ws,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:po,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:po,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:Ke,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:Ke,label:"PPT"}};function go(e,n="en"){const o={month:"short",day:"numeric"};return new Intl.DateTimeFormat(n,o).format(e)}function yo(e){if(e===0)return"0 B";const n=1024,o=["B","KB","MB","GB","TB"],s=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/Math.pow(n,s)).toFixed(1))} ${o[s]}`}const Yr={class:"space-y-0.5"},Xr=["onClick"],Qr=["onClick"],Vr={class:"flex items-center gap-2"},ei={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},ti={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},ni={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},oi={class:"flex items-center gap-1"},si=["onClick"],ri=["onClick"],ii=t.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("div",Yr,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.files,s=>(t.openBlock(),t.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:s.id,onClick:t.withModifiers(r=>n.$emit("openLightbox",s),["stop"])},[t.createElementVNode("div",{class:t.normalizeClass(["p-1 rounded",t.unref(ln)[s?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(ln)[s?.ext]?.icon||t.unref(ln).pdf.icon),{class:"h-3 w-3"}))],2),t.createElementVNode("div",{class:"flex-1 min-w-0",onClick:r=>n.$emit("openLightbox",s)},[t.createElementVNode("div",Vr,[t.createElementVNode("span",ei,t.toDisplayString(s?.uploaded_name||s?.name),1)])],8,Qr),t.createElementVNode("div",ti,t.toDisplayString(t.unref(yo)(s.size)),1),t.createElementVNode("div",ni,t.toDisplayString(t.unref(go)(s.createdAt)),1),t.createElementVNode("div",oi,[t.createElementVNode("button",{onClick:t.withModifiers(r=>n.$emit("download",s),["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"},[t.createVNode(t.unref(co),{class:"h-3 w-3"})],8,si),t.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:t.withModifiers(r=>n.$emit("delete",r,s?.file_id),["stop"])},[t.createVNode(t.unref(on),{class:"h-3 w-3"})],8,ri)])],8,Xr))),128))]))}}),li={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},ai=["onClick"],ci={class:"space-y-2"},di={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},pi=["src"],fi={class:"space-y-1"},mi=["title"],ui={class:"text-xs text-gray-500 text-left"},hi={class:"absolute top-2 right-1 flex items-center gap-1"},gi=["onClick"],yi=["onClick"],vi=t.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("div",li,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.files,s=>(t.openBlock(),t.createElementBlock("div",{key:s.id,onClick:t.withModifiers(r=>n.$emit("openLightbox",s),["stop"]),class:"group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"},[t.createElementVNode("div",ci,[t.createElementVNode("div",di,[s.ext==="png"||s.ext==="jpg"||s.ext==="jpeg"||s.ext==="gif"||s.ext==="svg"||s.ext==="webp"?(t.openBlock(),t.createElementBlock("img",{key:0,src:`/file/resize?filepath=${s?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,pi)):(t.openBlock(),t.createBlock(t.unref(Ke),{key:1,class:"h-10 w-10 text-gray-500"}))]),t.createElementVNode("div",fi,[t.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:s.uploaded_name||s.name},t.toDisplayString(s.uploaded_name||s.name),9,mi),t.createElementVNode("p",ui,t.toDisplayString(t.unref(go)(s.createdAt))+", "+t.toDisplayString(t.unref(yo)(s.size)),1)])]),t.createElementVNode("div",hi,[t.createElementVNode("button",{onClick:t.withModifiers(r=>n.$emit("download",s),["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"},[t.createVNode(t.unref(co),{class:"h-3 w-3"})],8,gi),t.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:t.withModifiers(r=>n.$emit("delete",r,s?.file_id),["stop"])},[t.createVNode(t.unref(on),{class:"h-3 w-3"})],8,yi)])],8,ai))),128))]))}}),bi={class:"mx-auto font-sans"},ki={key:1},Ct=t.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},editable:{type:Boolean,default:!0},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(e,{emit:n}){const o=e,s=t.ref(!1),r=t.ref(null),l=t.ref(!1),i=t.ref(0),a=t.ref(o.files??[]),c=n;a.value.length===0&&S();const u=(L,_)=>{r.value=_,s.value=!0},p=()=>{r.value&&(E(r.value),r.value=null,s.value=!1)},f=t.computed(()=>Array.isArray(a.value)?a.value.map(L=>L?.file_path):[]),b=L=>{const _=f.value.findIndex(H=>H===L.file_path);_!==-1&&(l.value=!0,i.value=_)},k=L=>{o.onAddFile?o.onAddFile(L):I(L),c("add",L)},E=L=>{o.onDelete?o.onDelete(L):B(L),c("delete",L)},N=L=>{const _=document.createElement("a");_.setAttribute("download",L?.uploaded_name||L?.name),_.href=L?.file_path||L?.path,_.click()},w=t.ref("list");async function S(){if(!o.id)return;const L=await fetch(`/api/widget/file/${o.id}`).then(_=>_.json());L.rows.forEach(_=>{_.timestamp=new Date(_.cdate),_.id=_.entity_id,_.entityType=_.entity_type,_.entityId=_.entity_id,_.entityType=_.entity_type,_.action=_.change_type,_.userId=_.change_user_id,_.userName=_.username,_.timestamp=new Date(_.cdate),_.description=_.username,_.status=_.username}),a.value=L.rows}const I=async L=>{if(!(!L.target||!L.target.files||L.target.files.length===0))try{await Promise.all(Array.from(L.target.files).map(async _=>{const H=new FormData;H.append("file",_);const K=`/api/widget/file/${o.id}`,M=await fetch(K,{method:"POST",body:H});if(!M.ok)throw new Error(`HTTP error! status: ${M.status}`);return _})),await S()}catch(_){console.error("Помилка при завантаженні файлів:",_)}},B=async L=>{try{await fetch(`/api/widget/file/${o.id}/${L}`,{method:"DELETE"}),await S()}catch(_){console.error(_)}};return(L,_)=>{const H=t.resolveComponent("MessageBox"),K=t.resolveComponent("Lightbox");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",bi,[t.createVNode(Zr,{modelValue:w.value,"onUpdate:modelValue":_[0]||(_[0]=M=>w.value=M),title:o.title,onOnAddFile:_[1]||(_[1]=M=>k(M)),editable:o.editable},null,8,["modelValue","title","editable"]),a.value.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.maxHeight?"overflow-y-auto":""),style:t.normalizeStyle({maxHeight:e.maxHeight+"px"})},[w.value==="list"?(t.openBlock(),t.createBlock(ii,{key:0,onDelete:u,onDownload:N,onOpenLightbox:_[2]||(_[2]=M=>b(M)),files:a.value},null,8,["files"])):t.createCommentVNode("",!0),w.value==="grid"?(t.openBlock(),t.createBlock(vi,{key:1,onDelete:u,onDownload:N,onOpenLightbox:_[3]||(_[3]=M=>b(M)),files:a.value},null,8,["files"])):t.createCommentVNode("",!0)],6)):(t.openBlock(),t.createElementBlock("div",ki,[..._[6]||(_[6]=[t.createElementVNode("div",{class:"flex items-center justify-center h-full"},[t.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])]))]),t.createVNode(H,{modelValue:s.value,"onUpdate:modelValue":_[4]||(_[4]=M=>s.value=M),onConfirm:p,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),t.createVNode(K,{modelValue:l.value,"onUpdate:modelValue":_[5]||(_[5]=M=>l.value=M),images:f.value,"start-index":i.value},null,8,["modelValue","images","start-index"])],64)}}}),Ei={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},xi=["onClick"],wi={key:0,rel:"noreferrer",class:"relative block h-full w-full"},Ni=["src"],Ci={key:0,class:"thumb-cover"},Si=t.defineComponent({__name:"GalleryContent",props:{title:{},items:{},columns:{},maxHeight:{},onAddImage:{type:Function},onDelete:{type:Function},id:{},className:{},style:{}},emits:["delete"],setup(e,{emit:n}){const o=n,s=t.ref(!1),r=t.ref(0),l=e,i=t.computed(()=>Array.isArray(l.items)?l.items.map(c=>c?.file_path):[]),a=c=>{const u=i.value.findIndex(p=>p===c.file_path);u!==-1&&(s.value=!0,r.value=u)};return(c,u)=>{const p=t.resolveComponent("Lightbox");return e.items?.length>=1?(t.openBlock(),t.createElementBlock("div",Ei,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(f,b)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["h-full w-full image"+b,"cursor-pointer bg-teal-500 rounded-[3px]"]),key:b,onClick:t.withModifiers(k=>a(f),["stop"])},[b<5?(t.openBlock(),t.createElementBlock("div",wi,[t.createElementVNode("img",{src:`/file/resize?filepath=${f?.file_path}&w=500`,alt:"alt",height:"auto",width:"100%",class:t.normalizeClass(["object-cover h-full w-full bg-gray-200 rounded-[3px]",b===0?"max-h-[411px]":"max-h-[calc((411px-3px)/2)]"])},null,10,Ni),b===4&&e.items?.length>5?(t.openBlock(),t.createElementBlock("div",Ci," +"+t.toDisplayString(e.items?.length-5),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],10,xi))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Math.max(0,5-e.items.length),f=>(t.openBlock(),t.createElementBlock("div",{key:"empty-"+f,class:t.normalizeClass(["h-full w-full image"+(e.items.length+f-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),t.createVNode(p,{modelValue:s.value,"onUpdate:modelValue":u[0]||(u[0]=f=>s.value=f),images:i.value,"start-index":r.value,delete:"true",download:"true",onDelete:u[1]||(u[1]=f=>o("delete",f))},null,8,["modelValue","images","start-index"])])):t.createCommentVNode("",!0)}}}),_i={key:0,class:"text-xl font-semibold"},Bi={class:"flex gap-1"},Ti={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"},$i=t.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",e.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[e.title?(t.openBlock(),t.createElementBlock("h3",_i,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),t.createElementVNode("div",Bi,[t.createElementVNode("label",null,[t.createElementVNode("input",{type:"file",class:"hidden",onChange:o[0]||(o[0]=s=>n.$emit("onAddImage",s))},null,32),t.createElementVNode("div",Ti,[t.createVNode(t.unref(fo),{class:"h-4 w-4"}),o[1]||(o[1]=t.createTextVNode(" Додати зображення ",-1))])])])],2))}}),Di={class:"w-full mx-auto font-sans",ref:"containerRef"},Li={key:1},St=t.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(e,{emit:n}){const o=e,s=t.ref(o.items??[]),r=n;s.value.length===0&&c();const l=p=>{o.onAddImage?o.onAddImage(p):a(p),r("add",p)},i=p=>{const f=s.value.find(b=>b.file_path===p)?.file_id;f&&(o.onDelete?o.onDelete(f):u(f))},a=async p=>{if(!(!p.target||!p.target.files||p.target.files.length===0))try{await Promise.all(Array.from(p.target.files).map(async f=>{const b=new FormData;b.append("file",f);const k=`/api/widget/file/${o.id}`,E=await fetch(k,{method:"POST",body:b});if(!E.ok)throw new Error(`HTTP error! status: ${E.status}`);return f})),await c()}catch(f){console.error("Помилка при завантаженні файлів:",f)}};async function c(){if(!o.id)return;const p=await fetch(`/api/widget/file/${o.id}`).then(f=>f.json());s.value=p.rows}const u=async p=>{try{await fetch(`/api/widget/file/${o.id}/${p}`,{method:"DELETE"}),await c()}catch(f){console.error(f)}};return(p,f)=>(t.openBlock(),t.createElementBlock("div",Di,[t.createVNode($i,{title:e.title,onOnAddImage:f[0]||(f[0]=b=>l(b))},null,8,["title"]),s.value.length>0?(t.openBlock(),t.createBlock(Si,{key:0,items:s.value,onDelete:f[1]||(f[1]=b=>i(b))},null,8,["items"])):(t.openBlock(),t.createElementBlock("div",Li,[...f[2]||(f[2]=[t.createElementVNode("div",{class:"flex items-center justify-center h-full"},[t.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])]))],512))}}),Oi={class:"text-value"},Ai={class:"text-sm text-gray-900"},Ii=t.defineComponent({__name:"TextValue",props:{item:{}},setup(e){const n=e,o=t.computed(()=>{const s=n.item.value;return typeof s=="boolean"?s?"Так":"Ні":s==null?"—":String(s)});return(s,r)=>(t.openBlock(),t.createElementBlock("div",Oi,[t.createElementVNode("span",Ai,t.toDisplayString(o.value),1)]))}}),Me=(e,n)=>{const o=e.__vccOpts||e;for(const[s,r]of n)o[s]=r;return o},Mi=Me(Ii,[["__scopeId","data-v-c14550b7"]]),Ri={class:"link-value"},Pi=["href"],Fi=Me(t.defineComponent({__name:"LinkValue",props:{item:{}},setup(e){const n=e,o=t.computed(()=>{const s=String(n.item.value);try{const r=new URL(s);return r.hostname+r.pathname}catch{return s}});return(s,r)=>(t.openBlock(),t.createElementBlock("div",Ri,[t.createElementVNode("a",{href:String(e.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[t.createTextVNode(t.toDisplayString(o.value)+" ",1),r[0]||(r[0]=t.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,Pi)]))}}),[["__scopeId","data-v-e6eb07a6"]]),ji={class:"date-value"},zi={class:"text-sm text-gray-900"},Hi=Me(t.defineComponent({__name:"DateValue",props:{item:{}},setup(e){const n=e,o=t.computed(()=>{const s=n.item.value;if(s instanceof Date)return s.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof s=="string"){const r=new Date(s);if(!isNaN(r.getTime()))return r.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(s)});return(s,r)=>(t.openBlock(),t.createElementBlock("div",ji,[t.createElementVNode("span",zi,t.toDisplayString(o.value),1)]))}}),[["__scopeId","data-v-b9600618"]]),Ui={class:"status-value"},qi={key:0,class:"mr-1"},Wi=Me(t.defineComponent({__name:"StatusValue",props:{item:{}},setup(e){const n=e,o=t.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"}}),s=t.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)=>(t.openBlock(),t.createElementBlock("div",Ui,[t.createElementVNode("span",{class:t.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",o.value])},[s.value?(t.openBlock(),t.createElementBlock("span",qi,[t.createElementVNode("i",{class:t.normalizeClass(s.value)},null,2)])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(String(e.item.value)),1)],2)]))}}),[["__scopeId","data-v-c72e0b01"]]),Ki={class:"custom-value"},Gi={class:"text-sm text-gray-900"},Ji=Me(t.defineComponent({__name:"CustomValue",props:{item:{}},setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("div",Ki,[t.renderSlot(n.$slots,"default",{item:e.item,value:e.item.value},()=>[t.createElementVNode("span",Gi,t.toDisplayString(String(e.item.value)),1)],!0)]))}}),[["__scopeId","data-v-11a73810"]]),Zi=["id"],Yi={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Xi={key:1,class:"overflow-x-auto"},Qi={class:"min-w-full divide-y divide-gray-200"},Vi={class:"bg-white divide-y divide-gray-200"},el={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},tl={class:"flex items-center gap-2"},nl=["title"],ol={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},sl={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},rl={class:"flex items-start gap-3"},il={key:0,class:"flex-shrink-0"},ll={class:"flex-1 min-w-0"},al={class:"flex items-center gap-2 mb-2"},cl={class:"text-sm font-medium text-gray-900"},dl=["title"],pl={key:3,class:"overflow-x-auto"},fl={class:"min-w-full divide-y divide-gray-200"},ml={class:"bg-white divide-y divide-gray-200"},ul={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},hl={class:"flex items-center gap-2"},gl=["title"],yl={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},an=Me(t.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(e){const n=o=>{switch(o.type){case"link":return Fi;case"date":return Hi;case"status":return Wi;case"custom":return Ji;default:return Mi}};return(o,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["description-list-widget",e.className]),id:e.id,style:t.normalizeStyle(e.style)},[e.title?(t.openBlock(),t.createElementBlock("h3",Yi,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.view==="table"?(t.openBlock(),t.createElementBlock("div",Xi,[t.createElementVNode("table",Qi,[t.createElementVNode("tbody",Vi,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,r=>(t.openBlock(),t.createElementBlock("tr",{key:r.id||r.label},[t.createElementVNode("td",el,[t.createElementVNode("div",tl,[r.icon?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass([r.icon,"text-gray-500"])},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(r.label)+" ",1),r.tooltip?(t.openBlock(),t.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},[...s[0]||(s[0]=[t.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)])],8,nl)):t.createCommentVNode("",!0)])]),t.createElementVNode("td",ol,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])])):e.view==="grid"?(t.openBlock(),t.createElementBlock("div",sl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,r=>(t.openBlock(),t.createElementBlock("div",{key:r.id||r.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[t.createElementVNode("div",rl,[r.icon?(t.openBlock(),t.createElementBlock("div",il,[t.createElementVNode("i",{class:t.normalizeClass([r.icon,"text-gray-500 text-lg"])},null,2)])):t.createCommentVNode("",!0),t.createElementVNode("div",ll,[t.createElementVNode("div",al,[t.createElementVNode("h4",cl,t.toDisplayString(r.label),1),r.tooltip?(t.openBlock(),t.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:r.tooltip},[...s[1]||(s[1]=[t.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)])],8,dl)):t.createCommentVNode("",!0)]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])])]))),128))])):(t.openBlock(),t.createElementBlock("div",pl,[t.createElementVNode("table",fl,[t.createElementVNode("tbody",ml,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,r=>(t.openBlock(),t.createElementBlock("tr",{key:r.id||r.label},[t.createElementVNode("td",ul,[t.createElementVNode("div",hl,[r.icon?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass([r.icon,"text-gray-500"])},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(r.label)+" ",1),r.tooltip?(t.openBlock(),t.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},[...s[2]||(s[2]=[t.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)])],8,gl)):t.createCommentVNode("",!0)])]),t.createElementVNode("td",yl,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])]))],14,Zi))}}),[["__scopeId","data-v-36d43e50"]]),vl={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 vo(e){return e?e.type==="FeatureCollection"||e.type==="Feature"?e:e.geom?{type:"Feature",geometry:{type:e.geom.type,coordinates:e.geom.coordinates},properties:{}}:e.type&&e.coordinates?{type:"Feature",geometry:e,properties:{}}:null:null}const bl={key:0,class:"absolute inset-0 z-[600] flex items-center justify-center pointer-events-none bg-black/20"},kl={class:"bg-black/70 text-white text-xs sm:text-sm px-4 py-2 rounded-md shadow"},El={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"},xl={class:"space-y-0.5"},wl={class:"text-gray-500"},Nl={class:"text-gray-900 text-right break-all"},Cl={key:2,class:"absolute bottom-3 left-3 z-[400] bg-white/90 border border-gray-200 rounded-md shadow px-3 py-2 text-[11px] sm:text-xs space-y-1 max-w-[220px]"},Sl={class:"leading-tight"},_l={key:4,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer max-w-[400px]"},Bl={class:"flex items-center justify-between p-2 border-b"},Tl={class:"p-2 border-b"},$l={class:"flex items-center"},Dl=["value"],Ll={class:"ml-2"},Ol={class:"p-2"},Al={class:"flex items-center"},Il=["checked","onChange"],Ml={class:"ml-2"},_t=t.defineComponent({__name:"MapWidget",props:{pattern:{},geom:{},id:{},katottg:{},tms:{},layers:{},title:{},height:{},bounds:{},legend:{},ctrlZoom:{type:Boolean}},setup(e){function n(g){let y=g?.parent??null;for(;y;){const d=y.props?.view;if(d==="tabs"||d==="vertical-tabs")return!0;y=y.parent??null}return!1}const o=e,s=t.getCurrentInstance(),r=t.inject("vsCardTabsContext",!1),l=t.computed(()=>(typeof r=="boolean"?r:r.value)?!0:n(s)),i=s?.appContext.config.globalProperties?.$settings??{},a=(()=>{const g=Array.isArray(i.center)?i.center:[],y=Number(g[0]),d=Number(g[1]);return Number.isFinite(y)&&Number.isFinite(d)?[y,d]:[50,30]})(),c=s?.uid??Math.floor(Math.random()*1e4),u=t.ref(null);let p,f,b,k;const E=ke(),N=t.ref(Object.keys(E)[0]),w=`base-layer-${c}`;let S;const I=t.ref(!0),B=t.ref(!1),L=t.ref(!1),_=t.ref(!1),H=t.ref("Використовуйте Ctrl + колесо миші для зміни масштабу");let K=null;const M=t.ref([]),A=t.reactive({}),F=t.ref([]),j=t.computed(()=>F.value.map(g=>A[g]).filter(Boolean)),C=t.ref(null),T=t.computed(()=>C.value?.entries??[]),x=t.computed(()=>{if(!C.value)return;const g=12,y=C.value.point.x+g,d=C.value.point.y+g;return{left:`${y}px`,top:`${d}px`}}),$=t.computed(()=>Array.isArray(o.legend)?o.legend.map((g,y)=>{const d=typeof g?.color=="string"?g.color.trim():"",m=typeof g?.label=="string"?g.label.trim():"";return!d||!m?null:{color:d,label:m,key:`${m}-${y}`}}).filter(g=>!!g):[]),J=t.computed(()=>{if(B.value)return"fixed inset-0 w-screen h-screen z-[9999] bg-white";const g=["relative","h-full"];return o.height||g.push("min-h-[300px]"),o.title&&!l.value&&g.push("pb-[3.25rem]"),g.join(" ")}),le=t.computed(()=>B.value||o.height==null?void 0:{height:typeof o.height=="number"?`${o.height}px`:String(o.height)}),Ie=t.computed(()=>{const g=["w-full","h-full"];return!o.height&&!B.value&&g.push("min-h-[300px]"),g.join(" ")});async function _e(){const g=m=>{if(!Array.from(document.styleSheets??[]).some(v=>v?.href?.includes(m))){const v=document.createElement("link");v.rel="stylesheet",v.href=m,document.head.appendChild(v)}};g("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),g("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css");const y=m=>new Promise((h,v)=>{if(Array.from(document.scripts??[]).some(P=>P.src===m))return h();const R=document.createElement("script");R.src=m,R.async=!0,R.onload=()=>h(),R.onerror=P=>v(P),document.body.appendChild(R)});return await y("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").catch(()=>{}),await y("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js").catch(()=>{}),await y("https://unpkg.com/leaflet.vectorgrid@1.3.0/dist/Leaflet.VectorGrid.bundled.js").catch(()=>{}),window.L}function ke(){const g=y=>y.map((d,m)=>{const h=typeof d?.key=="string"&&d.key?d.key:`b${m}`,v=xe(d?.url);return v?{...d,key:h,url:v}:null}).filter(d=>!!d).reduce((d,m)=>({...d,[m.key]:m}),{});return Array.isArray(i?.basemaps)&&i.basemaps.length?g(i.basemaps):g([{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(g){if(typeof g!="string"||!g.trim())return"";const y=g.trim();if(/^https?:\/\//i.test(y))return y;const d=window.location?.origin??"",m=y.replace(/^\/+/,"");return d?`${d}/${m}`:`/${m}`}function we(g,y){return g?.id!=null?String(g.id):g?.url?`${g.url}-${y}`:`layer-${y}`}function Qn(g){if(!g||typeof g!="object")return;const y={},d=O=>{if(typeof O=="string"){const D=O.trim().replace(/,+$/,"");return D?/^-?\d+(\.\d+)?$/.test(D)?Number(D):D:void 0}return O},m=()=>(y.colorSet||(y.colorSet={}),y.colorSet),h=(O,D)=>{if(O==null||typeof D!="string")return;const R=D.trim().replace(/,+$/,"");R&&(m()[String(O)]=R)},v=O=>{const D=["color","fill","hex","valueColor","value_color"].map(P=>O[P]).find(P=>typeof P=="string"&&P.trim());if(!D)return!1;const R=["value","key","id","code","status"].map(P=>O[P]).find(P=>P!=null&&P!=="");return R==null?!1:(h(R,D),!0)};return Object.entries(g).forEach(([O,D])=>{if(O==="colorSet"&&D!=null){Array.isArray(D)?D.forEach(P=>{P&&(typeof P=="object"&&v(P)||typeof P=="object"&&Object.entries(P).forEach(([he,ge])=>h(he,typeof ge=="string"?ge:void 0)))}):typeof D=="object"&&(v(D)||Object.entries(D).forEach(([P,he])=>h(P,typeof he=="string"?he:void 0)));return}const R=d(D);if(R!==void 0){if(O==="border"){typeof R=="number"&&y.width==null?y.width=R:typeof R=="string"&&y.stroke==null&&(y.stroke=R);return}y[O]=R}}),y.colorSet&&!Object.keys(y.colorSet).length&&delete y.colorSet,Object.keys(y).length?y:void 0}function Vn(){if(Array.isArray(o.layers)&&o.layers.length)return o.layers.map((y,d)=>{if(!y)return null;const m=we(y,d),h=y.url||(o.pattern&&m?o.pattern.replace("{{id}}",String(y.id??m)):"");return h?{...y,id:m,url:h,name:y.name||`Шар ${d+1}`,style:Qn(y.style)}:null}).filter(y=>!!y?.url);const g=Array.isArray(o.tms)?o.tms:o.tms?.split(",");return g?g.map((y,d)=>{if(!y)return null;const m=typeof y=="string"?y.trim():`${y}`;if(!m)return null;const h=`legacy-${d}`,v=o.pattern?o.pattern.replace("{{id}}",m):m;return{id:h,name:`Шар ${d+1}`,url:v,visible:!0}}).filter(y=>!!y?.url):[]}function ht(g){const y=(g?.url??"").trim();if(!y)return"";if(/^https?:\/\//i.test(y))return y;const d=window.location?.origin??"",m=y.replace(/^\/+/,"");return`${d}/${m}`}function Zt(g){const y=g.style??{};return d=>{const m=y.colorAttr,h=y.colorSet??{},v=typeof m=="string"?h?.[d?.[m]]??y.color??"#3388ff":y.color??"#3388ff",O=y.stroke??v;return{weight:y.width??1,color:O,opacity:y.opacity??1,fill:y.type?y.type!=="polyline":!0,fillColor:v,fillOpacity:y.opacity??.5}}}function Yt(g,y){if(!p||!y?.latlng||g.popup===!1)return;const d=p.latLngToContainerPoint(y.latlng),m=gt(y),h=Xt(g,m);if(!h.length){et(g.id);return}C.value={layerId:g.id,title:m?.name??g.name,properties:m,entries:h,point:{x:d.x,y:d.y}}}function et(g){g&&C.value?.layerId!==g||(C.value=null)}function gt(g){return g?.layer?.properties||g?.layer?.feature?.properties||g?.properties||g?.data||{}}function Xt(g,y={}){const d=m=>m==null||m===""?"—":typeof m=="object"?JSON.stringify(m):String(m);return g.popup&&Array.isArray(g.popup)&&g.popup.length?g.popup.map(m=>({label:m.label||m.field,value:d(y?.[m.field])})):Object.entries(y).map(([m,h])=>({label:m,value:d(h)}))}function eo(g,y){if(!p||g.popup===!1||!y?.latlng)return;const d=gt(y),m=Xt(g,d);if(!m.length)return;const h=['<div class="map-popup">'];h.push('<div class="map-popup__body">'),m.forEach(v=>{h.push(`<div class="map-popup__row"><span class="map-popup__label">${v.label}: </span><span class="map-popup__value">${v.value}</span></div>`)}),h.push("</div></div>"),k.popup({maxWidth:360}).setLatLng(y.latlng).setContent(h.join("")).openOn(p)}t.onMounted(async()=>{k=await _e(),k.drawLocal={...vl};const g=typeof i?.zoom=="number"&&Number.isFinite(i.zoom)?i.zoom:10;p=k.map(u.value,{zoomControl:!1}).setView(a,g),k.control.zoom({position:"bottomright"}).addTo(p),S=k.tileLayer(E[N.value].url,{maxZoom:19}).addTo(p),f=new k.FeatureGroup().addTo(p),bt(),qe(),o.ctrlZoom&&(K=Et());const y=vo(o.geom);if(y){const d=[];k.geoJSON(y).eachLayer(m=>d.push(m)),d.length&&f.addLayer(d[0]),kt()}if(u.value){const d=new ResizeObserver(()=>{p&&p.invalidateSize()});d.observe(u.value),t.onBeforeUnmount(()=>{d.disconnect()})}});function to(){if(!f)return;f.clearLayers();const g=vo(o.geom);if(!g)return;const y=[];k.geoJSON(g).eachLayer(d=>y.push(d)),y.length&&(y.forEach(d=>f.addLayer(d)),kt())}t.onBeforeUnmount(()=>{K?.(),oo(),b&&p?.hasLayer(b)&&p.removeLayer(b)});function Be(g){const y=(g?.service??"").toLowerCase();if(y)return y;const d=(g?.url??"").toLowerCase();return/\.(mvt|pbf|vtile|vmt)(\?|$)/.test(d)?"vtile":/service=wms|request=getmap|\/(wms|ows)(\?|$)/.test(d)?"wms":""}function Qt(g){const y=Be(g),d=ht(g),h={opacity:g?.style?.opacity??1,...g.options??{}},v=!!(g?.style&&Object.keys(g.style).length),O=g.sourceLayer||g.layer||g.service_layer||g.service_key||g.map_key||g.dataset?.layer||g.id;if(y==="vtile"){const D=k?.vectorGrid;if(D?.protobuf&&(v||!k?.maplibreGL)){const R=D.protobuf(d,{interactive:!0,maxNativeZoom:g.maxzoom??19,vectorTileLayerStyles:{[O??"default"]:Zt(g),default:Zt(g)}});return R.on?.("mouseover",P=>Yt(g,P)),R.on?.("mousemove",P=>Yt(g,P)),R.on?.("mouseout",()=>et(g.id)),R.on?.("click",P=>eo(g,P)),R}if(!v&&k?.maplibreGL&&window?.maplibregl){const R=d;return k.maplibreGL({style:R,interactive:!1,pane:"overlayPane"})}}if(y==="wms"&&k?.tileLayer?.wms){const D={...g.params??{}};return O&&!D.layers&&(D.layers=O),D.format==null&&(D.format="image/png"),D.transparent==null&&(D.transparent=!0),k.tileLayer.wms(d,{...D,...h})}return k.tileLayer(d,h)}function yt(g){const y=("bounds"in g?g.bounds:void 0)??o.bounds??M.value;if(!Array.isArray(y)||!y.length||!k)return null;const m={color:g.style?.stroke??g.style?.color??"#2563eb",weight:g.style?.width??2,interactive:!1,opacity:g.style?.opacity??.8,dashArray:"4 4"},h=Array.isArray(g.bounds)&&g.bounds.length?g.bounds:y,v=no(h);if(!v.length||!k.polyline)return null;const O=v.map(D=>{if(!D.length)return D;const R=D[0],P=D[D.length-1];return R&&P&&(!P.equals||!P.equals(R))?[...D,R]:D});return k.polyline(O,m)}function no(g){const y=h=>{if(!Array.isArray(h)||h.length<2)return null;const[v,O]=h;return!Number.isFinite(Number(O))||!Number.isFinite(Number(v))?null:k.latLng(Number(O),Number(v))},d=h=>Array.isArray(h)&&h.length>=2&&h.every(v=>Number.isFinite(Number(v))),m=h=>Array.isArray(h)?h.map(y).filter(Boolean):[];if(!Array.isArray(g))return[];if(g.length&&d(g[0])){const h=g.map(y).filter(Boolean);return h.length?[h]:[]}if(g.length&&Array.isArray(g[0])){if(d(g[0][0]))return g.map(v=>m(v)).filter(v=>v.length);if(Array.isArray(g[0][0])&&d(g[0][0][0]))return g.flatMap(v=>Array.isArray(v)?v.map(O=>m(O)).filter(O=>O.length):[]).filter(v=>v.length)}return[]}function oo(){Object.values(A).forEach(g=>{g.layer&&p?.hasLayer(g.layer)&&p.removeLayer(g.layer),g.boundsLayer&&p?.hasLayer(g.boundsLayer)&&p.removeLayer(g.boundsLayer),g.layer=null,g.boundsLayer=null}),et()}function qe(){if(!p)return;b&&p.hasLayer(b)&&p.removeLayer(b);const g=yt({id:"global-bounds",bounds:o.bounds,style:{}});g?(b=g,b.addTo(p)):b=null}function vt(){p&&F.value.forEach(g=>{const y=A[g];y&&(y.visible?(y.layer||(y.layer=Qt(y.config)),y.boundsLayer||(y.boundsLayer=yt(y.config)),y.layer&&!p.hasLayer(y.layer)&&y.layer.addTo(p),y.boundsLayer&&!p.hasLayer(y.boundsLayer)&&y.boundsLayer.addTo(p)):(y.layer&&p.hasLayer(y.layer)&&p.removeLayer(y.layer),y.boundsLayer&&p.hasLayer(y.boundsLayer)&&p.removeLayer(y.boundsLayer)))})}function bt(){const g=Vn(),y=[],d=new Set;g.forEach((m,h)=>{const v=we(m,h);y.push(v),d.add(v);const O=A[v];O&&O.config.url!==m.url&&(O.layer&&p?.hasLayer(O.layer)&&p.removeLayer(O.layer),O.layer=null);const D=O?.visible??m.visible??!1;A[v]={id:v,config:{...m,id:v},visible:D,layer:O?.layer??null,boundsLayer:O?.boundsLayer??null}}),Object.keys(A).forEach(m=>{if(!d.has(m)){const h=A[m];h?.layer&&p?.hasLayer(h.layer)&&p.removeLayer(h.layer),delete A[m]}}),F.value=y,p&&vt()}function so(g,y){const d=typeof y=="boolean"?y:y.target?.checked;if(d==null)return;const m=A[g];m&&(m.visible=d,m.visible?(m.layer||(m.layer=Qt(m.config)),m.boundsLayer||(m.boundsLayer=yt(m.config)),m.layer&&!p.hasLayer(m.layer)&&m.layer.addTo(p),m.boundsLayer&&!p.hasLayer(m.boundsLayer)&&m.boundsLayer.addTo(p)):(m.layer&&p.hasLayer(m.layer)&&(p.removeLayer(m.layer),et(g)),m.boundsLayer&&p.hasLayer(m.boundsLayer)&&p.removeLayer(m.boundsLayer)))}function ro(g){Vt(g),N.value=g}function Vt(g){if(!p||!E[g])return;S&&S.removeFrom(p);const y=E[g];S=k.tileLayer(y.url,y.options||{}).addTo(p),S.bringToBack()}function en(){!p||!f||I.value&&!p.hasLayer(f)&&f.addTo(p)}function io(){ro(N.value)}function lo(){I.value?f.addTo(p):f.removeFrom(p)}function tn(){B.value=!B.value}function kt(g=30){const y=f.getLayers();if(!y.length)return;const m=k.featureGroup(y).getBounds();m&&m.isValid()&&p.fitBounds(m,{padding:[g,g],maxZoom:16})}function Et(){if(!p||!u.value)return null;p.scrollWheelZoom.disable(),H.value="Використовуйте Ctrl + колесо миші для зміни масштабу";let g;const y=(m=1500)=>{_.value=!0,g&&clearTimeout(g),g=window.setTimeout(()=>_.value=!1,m)},d=m=>{if(!(m.ctrlKey||m.metaKey||m.shiftKey)){y(),p.scrollWheelZoom.disable();return}m.preventDefault(),m.stopPropagation(),p.scrollWheelZoom.enable(),_.value=!1,g&&clearTimeout(g),g=window.setTimeout(()=>p.scrollWheelZoom.disable(),200)};return u.value.addEventListener("wheel",d,{passive:!1}),()=>{p.scrollWheelZoom.enable(),u.value?.removeEventListener("wheel",d),g&&clearTimeout(g),_.value=!1}}return t.watch(B,async()=>{await t.nextTick(),requestAnimationFrame(()=>{p?.invalidateSize(!0),Vt(N.value),en(),vt(),b&&!p?.hasLayer(b)&&b.addTo(p)})}),t.watch(()=>o.layers,()=>bt(),{deep:!0}),t.watch(()=>[o.tms,o.pattern],()=>{o.layers?.length||bt()}),t.watch(()=>o.bounds,()=>qe(),{deep:!0}),t.watch(()=>o.geom,()=>to(),{deep:!0}),t.watch(()=>o.katottg,async g=>{if(M.value=[],!g){qe();return}try{const y=await fetch(`https://data.gki.com.ua/api-user/atu/${g}`);if(!y?.ok)return;const m=(await y.json())?.geometry?.coordinates;Array.isArray(m)&&m.length&&(M.value=m)}catch(y){console.error("Failed to fetch KATOTTG bounds",y)}finally{qe(),vt()}},{immediate:!0}),(g,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(J.value),style:t.normalizeStyle(le.value)},[t.createElementVNode("div",{ref_key:"mapContainer",ref:u,class:t.normalizeClass(Ie.value)},null,2),_.value?(t.openBlock(),t.createElementBlock("div",bl,[t.createElementVNode("div",kl,t.toDisplayString(H.value),1)])):t.createCommentVNode("",!0),T.value.length?(t.openBlock(),t.createElementBlock("div",{key:1,class:"absolute z-[550] pointer-events-none",style:t.normalizeStyle(x.value)},[t.createElementVNode("div",El,[t.createElementVNode("dl",xl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(T.value,d=>(t.openBlock(),t.createElementBlock("div",{key:`${d.label}-${d.value}`,class:"flex justify-between gap-2"},[t.createElementVNode("dt",wl,t.toDisplayString(d.label),1),t.createElementVNode("dd",Nl,t.toDisplayString(d.value),1)]))),128))])])],4)):t.createCommentVNode("",!0),$.value.length?(t.openBlock(),t.createElementBlock("div",Cl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,d=>(t.openBlock(),t.createElementBlock("div",{key:d.key,class:"flex items-center gap-2 text-gray-800"},[t.createElementVNode("span",{class:"w-3.5 h-3.5 rounded-[2px] border border-black/10 shrink-0",style:t.normalizeStyle({backgroundColor:d.color})},null,4),t.createElementVNode("span",Sl,t.toDisplayString(d.label),1)]))),128))])):t.createCommentVNode("",!0),L.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,onClick:y[0]||(y[0]=d=>L.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer layers-button"}," Шари ")),L.value?(t.openBlock(),t.createElementBlock("div",_l,[t.createElementVNode("div",Bl,[y[5]||(y[5]=t.createElementVNode("div",null,"Шари",-1)),(t.openBlock(),t.createElementBlock("svg",{onClick:y[1]||(y[1]=d=>L.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"},[...y[4]||(y[4]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),t.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])]))]),t.createElementVNode("div",Tl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(E),(d,m)=>(t.openBlock(),t.createElementBlock("div",{key:`base-${m}`},[t.createElementVNode("label",$l,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:w,value:m,"onUpdate:modelValue":y[2]||(y[2]=h=>N.value=h),onChange:io},null,40,Dl),[[t.vModelRadio,N.value]]),t.createElementVNode("span",Ll,t.toDisplayString(d.name||m),1)])]))),128))]),t.createElementVNode("div",Ol,[t.createElementVNode("label",Al,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":y[3]||(y[3]=d=>I.value=d),onChange:lo},null,544),[[t.vModelCheckbox,I.value]]),y[6]||(y[6]=t.createElementVNode("span",{class:"ml-2"},"Геометрія/Межі",-1))]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(j.value,d=>(t.openBlock(),t.createElementBlock("label",{class:"flex items-center",key:d.id},[t.createElementVNode("input",{type:"checkbox",checked:d.visible,onChange:m=>so(d.id,m)},null,40,Il),t.createElementVNode("span",Ml,t.toDisplayString(d.config.name||d.id),1)]))),128))])])):t.createCommentVNode("",!0),t.createElementVNode("button",{type:"button",class:"absolute z-[500] bg-white p-2 border rounded-lg cursor-pointer fullscreen-button bottom-[100px] right-[7px]",onClick:tn,"aria-label":"Toggle fullscreen"},[...y[7]||(y[7]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"w-5 h-5"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 8V4h4M20 8V4h-4M4 16v4h4m12-4v4h-4"})],-1)])])],6))}});function Ee(e){const n=Object.create(null);for(const o of e.split(","))n[o]=1;return o=>o in n}const Rl=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const cn=()=>{},Bt=()=>!1,dn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Te=Object.assign,Ne=Array.isArray,te=e=>typeof e=="string",pn=e=>typeof e=="symbol",Pl=e=>e!==null&&typeof e=="object",bo=Ee(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Fl=Ee("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),fn=e=>{const n=Object.create(null);return(o=>n[o]||(n[o]=e(o)))},jl=/-\w/g,$e=fn(e=>e.replace(jl,n=>n.slice(1).toUpperCase())),mn=fn(e=>e.charAt(0).toUpperCase()+e.slice(1)),zl=fn(e=>e?`on${mn(e)}`:""),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"},Hl={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},Ul=/;(?![^(]*\))/g,ql=/:([^]+)/,Wl=/\/\*[^]*?\*\//g;function Kl(e){const n={};return e.replace(Wl,"").split(Ul).forEach(o=>{if(o){const s=o.split(ql);s.length>1&&(n[s[0].trim()]=s[1].trim())}}),n}const Gl="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",Jl="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",Zl="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",Yl="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Xl=Ee(Gl),Ql=Ee(Jl),Vl=Ee(Zl),ea=Ee(Yl);const nt=Symbol(process.env.NODE_ENV!=="production"?"Fragment":""),ot=Symbol(process.env.NODE_ENV!=="production"?"Teleport":""),un=Symbol(process.env.NODE_ENV!=="production"?"Suspense":""),Tt=Symbol(process.env.NODE_ENV!=="production"?"KeepAlive":""),ko=Symbol(process.env.NODE_ENV!=="production"?"BaseTransition":""),Re=Symbol(process.env.NODE_ENV!=="production"?"openBlock":""),Eo=Symbol(process.env.NODE_ENV!=="production"?"createBlock":""),xo=Symbol(process.env.NODE_ENV!=="production"?"createElementBlock":""),hn=Symbol(process.env.NODE_ENV!=="production"?"createVNode":""),gn=Symbol(process.env.NODE_ENV!=="production"?"createElementVNode":""),st=Symbol(process.env.NODE_ENV!=="production"?"createCommentVNode":""),yn=Symbol(process.env.NODE_ENV!=="production"?"createTextVNode":""),wo=Symbol(process.env.NODE_ENV!=="production"?"createStaticVNode":""),vn=Symbol(process.env.NODE_ENV!=="production"?"resolveComponent":""),bn=Symbol(process.env.NODE_ENV!=="production"?"resolveDynamicComponent":""),kn=Symbol(process.env.NODE_ENV!=="production"?"resolveDirective":""),En=Symbol(process.env.NODE_ENV!=="production"?"resolveFilter":""),xn=Symbol(process.env.NODE_ENV!=="production"?"withDirectives":""),wn=Symbol(process.env.NODE_ENV!=="production"?"renderList":""),No=Symbol(process.env.NODE_ENV!=="production"?"renderSlot":""),Co=Symbol(process.env.NODE_ENV!=="production"?"createSlots":""),$t=Symbol(process.env.NODE_ENV!=="production"?"toDisplayString":""),Dt=Symbol(process.env.NODE_ENV!=="production"?"mergeProps":""),Nn=Symbol(process.env.NODE_ENV!=="production"?"normalizeClass":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"normalizeStyle":""),rt=Symbol(process.env.NODE_ENV!=="production"?"normalizeProps":""),it=Symbol(process.env.NODE_ENV!=="production"?"guardReactiveProps":""),Sn=Symbol(process.env.NODE_ENV!=="production"?"toHandlers":""),_n=Symbol(process.env.NODE_ENV!=="production"?"camelize":""),ta=Symbol(process.env.NODE_ENV!=="production"?"capitalize":""),Bn=Symbol(process.env.NODE_ENV!=="production"?"toHandlerKey":""),Lt=Symbol(process.env.NODE_ENV!=="production"?"setBlockTracking":""),na=Symbol(process.env.NODE_ENV!=="production"?"pushScopeId":""),oa=Symbol(process.env.NODE_ENV!=="production"?"popScopeId":""),Tn=Symbol(process.env.NODE_ENV!=="production"?"withCtx":""),sa=Symbol(process.env.NODE_ENV!=="production"?"unref":""),ra=Symbol(process.env.NODE_ENV!=="production"?"isRef":""),$n=Symbol(process.env.NODE_ENV!=="production"?"withMemo":""),So=Symbol(process.env.NODE_ENV!=="production"?"isMemoSame":""),Ge={[nt]:"Fragment",[ot]:"Teleport",[un]:"Suspense",[Tt]:"KeepAlive",[ko]:"BaseTransition",[Re]:"openBlock",[Eo]:"createBlock",[xo]:"createElementBlock",[hn]:"createVNode",[gn]:"createElementVNode",[st]:"createCommentVNode",[yn]:"createTextVNode",[wo]:"createStaticVNode",[vn]:"resolveComponent",[bn]:"resolveDynamicComponent",[kn]:"resolveDirective",[En]:"resolveFilter",[xn]:"withDirectives",[wn]:"renderList",[No]:"renderSlot",[Co]:"createSlots",[$t]:"toDisplayString",[Dt]:"mergeProps",[Nn]:"normalizeClass",[Cn]:"normalizeStyle",[rt]:"normalizeProps",[it]:"guardReactiveProps",[Sn]:"toHandlers",[_n]:"camelize",[ta]:"capitalize",[Bn]:"toHandlerKey",[Lt]:"setBlockTracking",[na]:"pushScopeId",[oa]:"popScopeId",[Tn]:"withCtx",[sa]:"unref",[ra]:"isRef",[$n]:"withMemo",[So]:"isMemoSame"};function ia(e){Object.getOwnPropertySymbols(e).forEach(n=>{Ge[n]=e[n]})}const fe={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function la(e,n=""){return{type:0,source:n,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:fe}}function lt(e,n,o,s,r,l,i,a=!1,c=!1,u=!1,p=fe){return e&&(a?(e.helper(Re),e.helper(Ye(e.inSSR,u))):e.helper(Ze(e.inSSR,u)),i&&e.helper(xn)),{type:13,tag:n,props:o,children:s,patchFlag:r,dynamicProps:l,directives:i,isBlock:a,disableTracking:c,isComponent:u,loc:p}}function Pe(e,n=fe){return{type:17,loc:n,elements:e}}function ye(e,n=fe){return{type:15,loc:n,properties:e}}function Q(e,n){return{type:16,loc:fe,key:te(e)?z(e,!0):e,value:n}}function z(e,n=!1,o=fe,s=0){return{type:4,loc:o,content:e,isStatic:n,constType:n?3:s}}function ve(e,n=fe){return{type:8,loc:n,children:e}}function ee(e,n=[],o=fe){return{type:14,loc:o,callee:e,arguments:n}}function Je(e,n=void 0,o=!1,s=!1,r=fe){return{type:18,params:e,returns:n,newline:o,isSlot:s,loc:r}}function Dn(e,n,o,s=!0){return{type:19,test:e,consequent:n,alternate:o,newline:s,loc:fe}}function aa(e,n,o=!1,s=!1){return{type:20,index:e,value:n,needPauseTracking:o,inVOnce:s,needArraySpread:!1,loc:fe}}function ca(e){return{type:21,body:e,loc:fe}}function Ze(e,n){return e||n?hn:gn}function Ye(e,n){return e||n?Eo:xo}function Ln(e,{helper:n,removeHelper:o,inSSR:s}){e.isBlock||(e.isBlock=!0,o(Ze(s,e.isComponent)),n(Re),n(Ye(s,e.isComponent)))}const _o=new Uint8Array([123,123]),Bo=new Uint8Array([125,125]);function To(e){return e>=97&&e<=122||e>=65&&e<=90}function me(e){return e===32||e===10||e===9||e===12||e===13}function De(e){return e===47||e===62||me(e)}function Ot(e){const n=new Uint8Array(e.length);for(let o=0;o<e.length;o++)n[o]=e.charCodeAt(o);return n}const ne={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 da{constructor(n,o){this.stack=n,this.cbs=o,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=_o,this.delimiterClose=Bo,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=_o,this.delimiterClose=Bo}getPos(n){let o=1,s=n+1;const r=this.newlines.length;let l=-1;if(r>100){let i=-1,a=r;for(;i+1<a;){const c=i+a>>>1;this.newlines[c]<n?i=c:a=c}l=i}else for(let i=r-1;i>=0;i--)if(n>this.newlines[i]){l=i;break}return l>=0&&(o=l+2,s=n-this.newlines[l]),{column:s,line:o,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 o=this.index+1-this.delimiterOpen.length;o>this.sectionStart&&this.cbs.ontext(this.sectionStart,o),this.state=3,this.sectionStart=o}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 o=this.sequenceIndex===this.currentSequence.length;if(!(o?De(n):(n|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!o){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 o=this.index-this.currentSequence.length;if(this.sectionStart<o){const s=this.index;this.index=o,this.cbs.ontext(this.sectionStart,o),this.index=s}this.sectionStart=o+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===ne.TitleEnd||this.currentSequence===ne.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===ne.Cdata[this.sequenceIndex]?++this.sequenceIndex===ne.Cdata.length&&(this.state=28,this.currentSequence=ne.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 o=this.buffer.charCodeAt(this.index);if(o===10&&this.newlines.push(this.index),o===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===ne.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,o){this.enterRCDATA(n,o),this.state=31}enterRCDATA(n,o){this.inRCDATA=!0,this.currentSequence=n,this.sequenceIndex=o}stateBeforeTagName(n){n===33?(this.state=22,this.sectionStart=this.index+1):n===63?(this.state=24,this.sectionStart=this.index+1):To(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){De(n)&&this.handleTagName(n)}stateInSFCRootTagName(n){if(De(n)){const o=this.buffer.slice(this.sectionStart,this.index);o!=="template"&&this.enterRCDATA(Ot("</"+o),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=To(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||De(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||De(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||De(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||De(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||De(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,o){(n===o||this.fastForwardTo(o))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(o===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=ne.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===ne.ScriptEnd[3]?this.startSpecial(ne.ScriptEnd,4):n===ne.StyleEnd[3]?this.startSpecial(ne.StyleEnd,4):(this.state=6,this.stateInTagName(n))}stateBeforeSpecialT(n){n===ne.TitleEnd[3]?this.startSpecial(ne.TitleEnd,4):n===ne.TextareaEnd[3]?this.startSpecial(ne.TextareaEnd,4):(this.state=6,this.stateInTagName(n))}startEntity(){}stateInEntity(){}parse(n){for(this.buffer=n;this.index<this.buffer.length;){const o=this.buffer.charCodeAt(this.index);switch(o===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(o);break}case 2:{this.stateInterpolationOpen(o);break}case 3:{this.stateInterpolation(o);break}case 4:{this.stateInterpolationClose(o);break}case 31:{this.stateSpecialStartSequence(o);break}case 32:{this.stateInRCDATA(o);break}case 26:{this.stateCDATASequence(o);break}case 19:{this.stateInAttrValueDoubleQuotes(o);break}case 12:{this.stateInAttrName(o);break}case 13:{this.stateInDirName(o);break}case 14:{this.stateInDirArg(o);break}case 15:{this.stateInDynamicDirArg(o);break}case 16:{this.stateInDirModifier(o);break}case 28:{this.stateInCommentLike(o);break}case 27:{this.stateInSpecialComment(o);break}case 11:{this.stateBeforeAttrName(o);break}case 6:{this.stateInTagName(o);break}case 34:{this.stateInSFCRootTagName(o);break}case 9:{this.stateInClosingTagName(o);break}case 5:{this.stateBeforeTagName(o);break}case 17:{this.stateAfterAttrName(o);break}case 20:{this.stateInAttrValueSingleQuotes(o);break}case 18:{this.stateBeforeAttrValue(o);break}case 8:{this.stateBeforeClosingTagName(o);break}case 10:{this.stateAfterClosingTagName(o);break}case 29:{this.stateBeforeSpecialS(o);break}case 30:{this.stateBeforeSpecialT(o);break}case 21:{this.stateInAttrValueNoQuotes(o);break}case 7:{this.stateInSelfClosingTag(o);break}case 23:{this.stateInDeclaration(o);break}case 22:{this.stateBeforeDeclaration(o);break}case 25:{this.stateBeforeComment(o);break}case 24:{this.stateInProcessingInstruction(o);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===ne.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,o){}}const pa={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:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,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 On(e,{compatConfig:n}){const o=n&&n[e];return e==="MODE"?o||3:o}function Le(e,n){const o=On("MODE",n),s=On(e,n);return o===3?s===!0:s!==!1}function Xe(e,n,o,...s){const r=Le(e,n);return process.env.NODE_ENV!=="production"&&r&&At(e,n,o,...s),r}function At(e,n,o,...s){if(On(e,n)==="suppress-warning")return;const{message:l,link:i}=pa[e],a=`(deprecation ${e}) ${typeof l=="function"?l(...s):l}${i?`
|
|
2
|
+
Details: ${i}`:""}`,c=new SyntaxError(a);c.code=e,o&&(c.loc=o),n.onWarn(c)}function An(e){throw e}function $o(e){process.env.NODE_ENV!=="production"&&console.warn(`[Vue warn] ${e.message}`)}function W(e,n,o,s){const r=process.env.NODE_ENV!=="production"?(o||fa)[e]+(s||""):`https://vuejs.org/error-reference/#compiler-${e}`,l=new SyntaxError(String(r));return l.code=e,l.loc=n,l}const fa={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.",53:"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.
|
|
3
|
+
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"v-model cannot be used on a const binding because it is not writable.",46:"Error parsing JavaScript expression: ",47:"<KeepAlive> expects exactly one child component.",52:"@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.",48:'"prefixIdentifiers" option is not supported in this build of compiler.',49:"ES module mode is not supported in this build of compiler.",50:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',51:'"scopeId" option is only supported in module mode.',54:""},ae=e=>e.type===4&&e.isStatic;function Do(e){switch(e){case"Teleport":case"teleport":return ot;case"Suspense":case"suspense":return un;case"KeepAlive":case"keep-alive":return Tt;case"BaseTransition":case"base-transition":return ko}}const ma=/^$|^\d|[^\$\w\xA0-\uFFFF]/,In=e=>!ma.test(e),Lo=/[A-Za-z_$\xA0-\uFFFF]/,ua=/[\.\?\w$\xA0-\uFFFF]/,ha=/\s+[.[]\s*|\s*[.[]\s+/g,Oo=e=>e.type===4?e.content:e.loc.source,Ao=e=>{const n=Oo(e).trim().replace(ha,a=>a.trim());let o=0,s=[],r=0,l=0,i=null;for(let a=0;a<n.length;a++){const c=n.charAt(a);switch(o){case 0:if(c==="[")s.push(o),o=1,r++;else if(c==="(")s.push(o),o=2,l++;else if(!(a===0?Lo:ua).test(c))return!1;break;case 1:c==="'"||c==='"'||c==="`"?(s.push(o),o=3,i=c):c==="["?r++:c==="]"&&(--r||(o=s.pop()));break;case 2:if(c==="'"||c==='"'||c==="`")s.push(o),o=3,i=c;else if(c==="(")l++;else if(c===")"){if(a===n.length-1)return!1;--l||(o=s.pop())}break;case 3:c===i&&(o=s.pop(),i=null);break}}return!r&&!l},ga=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,ya=e=>ga.test(Oo(e));function Io(e,n){if(!e)throw new Error(n||"unexpected compiler condition")}function ce(e,n,o=!1){for(let s=0;s<e.props.length;s++){const r=e.props[s];if(r.type===7&&(o||r.exp)&&(te(n)?r.name===n:n.test(r.name)))return r}}function at(e,n,o=!1,s=!1){for(let r=0;r<e.props.length;r++){const l=e.props[r];if(l.type===6){if(o)continue;if(l.name===n&&(l.value||s))return l}else if(l.name==="bind"&&(l.exp||s)&&Oe(l.arg,n))return l}}function Oe(e,n){return!!(e&&ae(e)&&e.content===n)}function va(e){return e.props.some(n=>n.type===7&&n.name==="bind"&&(!n.arg||n.arg.type!==4||!n.arg.isStatic))}function Mn(e){return e.type===5||e.type===2}function Mo(e){return e.type===7&&e.name==="pre"}function ba(e){return e.type===7&&e.name==="slot"}function It(e){return e.type===1&&e.tagType===3}function Mt(e){return e.type===1&&e.tagType===2}const ka=new Set([rt,it]);function Ro(e,n=[]){if(e&&!te(e)&&e.type===14){const o=e.callee;if(!te(o)&&ka.has(o))return Ro(e.arguments[0],n.concat(e))}return[e,n]}function Rt(e,n,o){let s,r=e.type===13?e.props:e.arguments[2],l=[],i;if(r&&!te(r)&&r.type===14){const a=Ro(r);r=a[0],l=a[1],i=l[l.length-1]}if(r==null||te(r))s=ye([n]);else if(r.type===14){const a=r.arguments[0];!te(a)&&a.type===15?Po(n,a)||a.properties.unshift(n):r.callee===Sn?s=ee(o.helper(Dt),[ye([n]),r]):r.arguments.unshift(ye([n])),!s&&(s=r)}else r.type===15?(Po(n,r)||r.properties.unshift(n),s=r):(s=ee(o.helper(Dt),[ye([n]),r]),i&&i.callee===it&&(i=l[l.length-2]));e.type===13?i?i.arguments[0]=s:e.props=s:i?i.arguments[0]=s:e.arguments[2]=s}function Po(e,n){let o=!1;if(e.key.type===4){const s=e.key.content;o=n.properties.some(r=>r.key.type===4&&r.key.content===s)}return o}function ct(e,n){return`_${n}_${e.replace(/[^\w]/g,(o,s)=>o==="-"?"_":e.charCodeAt(s).toString())}`}function Ea(e){return e.type===14&&e.callee===$n?e.arguments[1].returns:e}const xa=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function Fo(e){for(let n=0;n<e.length;n++)if(!me(e.charCodeAt(n)))return!1;return!0}function Rn(e){return e.type===2&&Fo(e.content)||e.type===12&&Rn(e.content)}function Pn(e){return e.type===3||Rn(e)}const jo={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:Bt,isPreTag:Bt,isIgnoreNewlineTag:Bt,isCustomElement:Bt,onError:An,onWarn:$o,comments:process.env.NODE_ENV!=="production",prefixIdentifiers:!1};let q=jo,dt=null,Ce="",se=null,U=null,de="",Se=-1,Fe=-1,Fn=0,Ae=!1,jn=null;const Z=[],G=new da(Z,{onerr:pe,ontext(e,n){Pt(oe(e,n),e,n)},ontextentity(e,n,o){Pt(e,n,o)},oninterpolation(e,n){if(Ae)return Pt(oe(e,n),e,n);let o=e+G.delimiterOpen.length,s=n-G.delimiterClose.length;for(;me(Ce.charCodeAt(o));)o++;for(;me(Ce.charCodeAt(s-1));)s--;let r=oe(o,s);r.includes("&")&&(r=q.decodeEntities(r,!1)),zn({type:5,content:jt(r,!1,X(o,s)),loc:X(e,n)})},onopentagname(e,n){const o=oe(e,n);se={type:1,tag:o,ns:q.getNamespace(o,Z[0],q.ns),tagType:0,props:[],children:[],loc:X(e-1,n),codegenNode:void 0}},onopentagend(e){Ho(e)},onclosetag(e,n){const o=oe(e,n);if(!q.isVoidTag(o)){let s=!1;for(let r=0;r<Z.length;r++)if(Z[r].tag.toLowerCase()===o.toLowerCase()){s=!0,r>0&&pe(24,Z[0].loc.start.offset);for(let i=0;i<=r;i++){const a=Z.shift();Ft(a,n,i<r)}break}s||pe(23,Uo(e,60))}},onselfclosingtag(e){const n=se.tag;se.isSelfClosing=!0,Ho(e),Z[0]&&Z[0].tag===n&&Ft(Z.shift(),e)},onattribname(e,n){U={type:6,name:oe(e,n),nameLoc:X(e,n),value:void 0,loc:X(e)}},ondirname(e,n){const o=oe(e,n),s=o==="."||o===":"?"bind":o==="@"?"on":o==="#"?"slot":o.slice(2);if(!Ae&&s===""&&pe(26,e),Ae||s==="")U={type:6,name:o,nameLoc:X(e,n),value:void 0,loc:X(e)};else if(U={type:7,name:s,rawName:o,exp:void 0,arg:void 0,modifiers:o==="."?[z("prop")]:[],loc:X(e)},s==="pre"){Ae=G.inVPre=!0,jn=se;const r=se.props;for(let l=0;l<r.length;l++)r[l].type===7&&(r[l]=La(r[l]))}},ondirarg(e,n){if(e===n)return;const o=oe(e,n);if(Ae&&!Mo(U))U.name+=o,je(U.nameLoc,n);else{const s=o[0]!=="[";U.arg=jt(s?o:o.slice(1,-1),s,X(e,n),s?3:0)}},ondirmodifier(e,n){const o=oe(e,n);if(Ae&&!Mo(U))U.name+="."+o,je(U.nameLoc,n);else if(U.name==="slot"){const s=U.arg;s&&(s.content+="."+o,je(s.loc,n))}else{const s=z(o,!0,X(e,n));U.modifiers.push(s)}},onattribdata(e,n){de+=oe(e,n),Se<0&&(Se=e),Fe=n},onattribentity(e,n,o){de+=e,Se<0&&(Se=n),Fe=o},onattribnameend(e){const n=U.loc.start.offset,o=oe(n,e);U.type===7&&(U.rawName=o),se.props.some(s=>(s.type===7?s.rawName:s.name)===o)&&pe(2,n)},onattribend(e,n){if(se&&U){if(je(U.loc,n),e!==0)if(de.includes("&")&&(de=q.decodeEntities(de,!0)),U.type===6)U.name==="class"&&(de=Ko(de).trim()),e===1&&!de&&pe(13,n),U.value={type:2,content:de,loc:e===1?X(Se,Fe):X(Se-1,Fe+1)},G.inSFCRoot&&se.tag==="template"&&U.name==="lang"&&de&&de!=="html"&&G.enterRCDATA(Ot("</template"),0);else{let o=0;U.exp=jt(de,!1,X(Se,Fe),0,o),U.name==="for"&&(U.forParseResult=Na(U.exp));let s=-1;U.name==="bind"&&(s=U.modifiers.findIndex(r=>r.content==="sync"))>-1&&Xe("COMPILER_V_BIND_SYNC",q,U.loc,U.arg.loc.source)&&(U.name="model",U.modifiers.splice(s,1))}(U.type!==7||U.name!=="pre")&&se.props.push(U)}de="",Se=Fe=-1},oncomment(e,n){q.comments&&zn({type:3,content:oe(e,n),loc:X(e-4,n+3)})},onend(){const e=Ce.length;if(process.env.NODE_ENV!=="production"&&G.state!==1)switch(G.state){case 5:case 8:pe(5,e);break;case 3:case 4:pe(25,G.sectionStart);break;case 28:G.currentSequence===ne.CdataEnd?pe(6,e):pe(7,e);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,e);break}for(let n=0;n<Z.length;n++)Ft(Z[n],e-1),pe(24,Z[n].loc.start.offset)},oncdata(e,n){Z[0].ns!==0?Pt(oe(e,n),e,n):pe(1,e-9)},onprocessinginstruction(e){(Z[0]?Z[0].ns:q.ns)===0&&pe(21,e-1)}}),zo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,wa=/^\(|\)$/g;function Na(e){const n=e.loc,o=e.content,s=o.match(xa);if(!s)return;const[,r,l]=s,i=(f,b,k=!1)=>{const E=n.start.offset+b,N=E+f.length;return jt(f,!1,X(E,N),0,k?1:0)},a={source:i(l.trim(),o.indexOf(l,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(wa,"").trim();const u=r.indexOf(c),p=c.match(zo);if(p){c=c.replace(zo,"").trim();const f=p[1].trim();let b;if(f&&(b=o.indexOf(f,u+c.length),a.key=i(f,b,!0)),p[2]){const k=p[2].trim();k&&(a.index=i(k,o.indexOf(k,a.key?b+f.length:u+c.length),!0))}}return c&&(a.value=i(c,u,!0)),a}function oe(e,n){return Ce.slice(e,n)}function Ho(e){G.inSFCRoot&&(se.innerLoc=X(e+1,e+1)),zn(se);const{tag:n,ns:o}=se;o===0&&q.isPreTag(n)&&Fn++,q.isVoidTag(n)?Ft(se,e):(Z.unshift(se),(o===1||o===2)&&(G.inXML=!0)),se=null}function Pt(e,n,o){{const l=Z[0]&&Z[0].tag;l!=="script"&&l!=="style"&&e.includes("&")&&(e=q.decodeEntities(e,!1))}const s=Z[0]||dt,r=s.children[s.children.length-1];r&&r.type===2?(r.content+=e,je(r.loc,o)):s.children.push({type:2,content:e,loc:X(n,o)})}function Ft(e,n,o=!1){o?je(e.loc,Uo(n,60)):je(e.loc,Ca(n,62)+1),G.inSFCRoot&&(e.children.length?e.innerLoc.end=Te({},e.children[e.children.length-1].loc.end):e.innerLoc.end=Te({},e.innerLoc.start),e.innerLoc.source=oe(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:s,ns:r,children:l}=e;if(Ae||(s==="slot"?e.tagType=2:qo(e)?e.tagType=3:_a(e)&&(e.tagType=1)),G.inRCDATA||(e.children=Wo(l)),r===0&&q.isIgnoreNewlineTag(s)){const i=l[0];i&&i.type===2&&(i.content=i.content.replace(/^\r?\n/,""))}r===0&&q.isPreTag(s)&&Fn--,jn===e&&(Ae=G.inVPre=!1,jn=null),G.inXML&&(Z[0]?Z[0].ns:q.ns)===0&&(G.inXML=!1);{const i=e.props;if(process.env.NODE_ENV!=="production"&&Le("COMPILER_V_IF_V_FOR_PRECEDENCE",q)){let c=!1,u=!1;for(let p=0;p<i.length;p++){const f=i[p];if(f.type===7&&(f.name==="if"?c=!0:f.name==="for"&&(u=!0)),c&&u){At("COMPILER_V_IF_V_FOR_PRECEDENCE",q,e.loc);break}}}if(!G.inSFCRoot&&Le("COMPILER_NATIVE_TEMPLATE",q)&&e.tag==="template"&&!qo(e)){process.env.NODE_ENV!=="production"&&At("COMPILER_NATIVE_TEMPLATE",q,e.loc);const c=Z[0]||dt,u=c.children.indexOf(e);c.children.splice(u,1,...e.children)}const a=i.find(c=>c.type===6&&c.name==="inline-template");a&&Xe("COMPILER_INLINE_TEMPLATE",q,a.loc)&&e.children.length&&(a.value={type:2,content:oe(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:a.loc})}}function Ca(e,n){let o=e;for(;Ce.charCodeAt(o)!==n&&o<Ce.length-1;)o++;return o}function Uo(e,n){let o=e;for(;Ce.charCodeAt(o)!==n&&o>=0;)o--;return o}const Sa=new Set(["if","else","else-if","for","slot"]);function qo({tag:e,props:n}){if(e==="template"){for(let o=0;o<n.length;o++)if(n[o].type===7&&Sa.has(n[o].name))return!0}return!1}function _a({tag:e,props:n}){if(q.isCustomElement(e))return!1;if(e==="component"||Ba(e.charCodeAt(0))||Do(e)||q.isBuiltInComponent&&q.isBuiltInComponent(e)||q.isNativeTag&&!q.isNativeTag(e))return!0;for(let o=0;o<n.length;o++){const s=n[o];if(s.type===6){if(s.name==="is"&&s.value){if(s.value.content.startsWith("vue:"))return!0;if(Xe("COMPILER_IS_ON_ELEMENT",q,s.loc))return!0}}else if(s.name==="bind"&&Oe(s.arg,"is")&&Xe("COMPILER_IS_ON_ELEMENT",q,s.loc))return!0}return!1}function Ba(e){return e>64&&e<91}const Ta=/\r\n/g;function Wo(e){const n=q.whitespace!=="preserve";let o=!1;for(let s=0;s<e.length;s++){const r=e[s];if(r.type===2)if(Fn)r.content=r.content.replace(Ta,`
|
|
4
|
+
`);else if(Fo(r.content)){const l=e[s-1]&&e[s-1].type,i=e[s+1]&&e[s+1].type;!l||!i||n&&(l===3&&(i===3||i===1)||l===1&&(i===3||i===1&&$a(r.content)))?(o=!0,e[s]=null):r.content=" "}else n&&(r.content=Ko(r.content))}return o?e.filter(Boolean):e}function $a(e){for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);if(o===10||o===13)return!0}return!1}function Ko(e){let n="",o=!1;for(let s=0;s<e.length;s++)me(e.charCodeAt(s))?o||(n+=" ",o=!0):(n+=e[s],o=!1);return n}function zn(e){(Z[0]||dt).children.push(e)}function X(e,n){return{start:G.getPos(e),end:n==null?n:G.getPos(n),source:n==null?n:oe(e,n)}}function Da(e){return X(e.start.offset,e.end.offset)}function je(e,n){e.end=G.getPos(n),e.source=oe(e.start.offset,n)}function La(e){const n={type:6,name:e.rawName,nameLoc:X(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const o=e.exp.loc;o.end.offset<e.loc.end.offset&&(o.start.offset--,o.start.column--,o.end.offset++,o.end.column++),n.value={type:2,content:e.exp.content,loc:o}}return n}function jt(e,n=!1,o,s=0,r=0){return z(e,n,o,s)}function pe(e,n,o){q.onError(W(e,X(n,n),void 0,o))}function Oa(){G.reset(),se=null,U=null,de="",Se=-1,Fe=-1,Z.length=0}function Aa(e,n){if(Oa(),Ce=e,q=Te({},jo),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.");G.mode=q.parseMode==="html"?1:q.parseMode==="sfc"?2:0,G.inXML=q.ns===1||q.ns===2;const o=n&&n.delimiters;o&&(G.delimiterOpen=Ot(o[0]),G.delimiterClose=Ot(o[1]));const s=dt=la([],e);return G.parse(Ce),s.loc=X(0,e.length),s.children=Wo(s.children),dt=null,s}function Ia(e,n){zt(e,void 0,n,!!Go(e))}function Go(e){const n=e.children.filter(o=>o.type!==3);return n.length===1&&n[0].type===1&&!Mt(n[0])?n[0]:null}function zt(e,n,o,s=!1,r=!1){const{children:l}=e,i=[];for(let p=0;p<l.length;p++){const f=l[p];if(f.type===1&&f.tagType===0){const b=s?0:ue(f,o);if(b>0){if(b>=2){f.codegenNode.patchFlag=-1,i.push(f);continue}}else{const k=f.codegenNode;if(k.type===13){const E=k.patchFlag;if((E===void 0||E===512||E===1)&&Zo(f,o)>=2){const N=Yo(f);N&&(k.props=o.hoist(N))}k.dynamicProps&&(k.dynamicProps=o.hoist(k.dynamicProps))}}}else if(f.type===12&&(s?0:ue(f,o))>=2){f.codegenNode.type===14&&f.codegenNode.arguments.length>0&&f.codegenNode.arguments.push(-1+(process.env.NODE_ENV!=="production"?` /* ${tt[-1]} */`:"")),i.push(f);continue}if(f.type===1){const b=f.tagType===1;b&&o.scopes.vSlot++,zt(f,e,o,!1,r),b&&o.scopes.vSlot--}else if(f.type===11)zt(f,e,o,f.children.length===1,!0);else if(f.type===9)for(let b=0;b<f.branches.length;b++)zt(f.branches[b],e,o,f.branches[b].children.length===1,r)}let a=!1;if(i.length===l.length&&e.type===1){if(e.tagType===0&&e.codegenNode&&e.codegenNode.type===13&&Ne(e.codegenNode.children))e.codegenNode.children=c(Pe(e.codegenNode.children)),a=!0;else if(e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!Ne(e.codegenNode.children)&&e.codegenNode.children.type===15){const p=u(e.codegenNode,"default");p&&(p.returns=c(Pe(p.returns)),a=!0)}else if(e.tagType===3&&n&&n.type===1&&n.tagType===1&&n.codegenNode&&n.codegenNode.type===13&&n.codegenNode.children&&!Ne(n.codegenNode.children)&&n.codegenNode.children.type===15){const p=ce(e,"slot",!0),f=p&&p.arg&&u(n.codegenNode,p.arg);f&&(f.returns=c(Pe(f.returns)),a=!0)}}if(!a)for(const p of i)p.codegenNode=o.cache(p.codegenNode);function c(p){const f=o.cache(p);return f.needArraySpread=!0,f}function u(p,f){if(p.children&&!Ne(p.children)&&p.children.type===15){const b=p.children.properties.find(k=>k.key===f||k.key.content===f);return b&&b.value}}i.length&&o.transformHoist&&o.transformHoist(l,o,e)}function ue(e,n){const{constantCache:o}=n;switch(e.type){case 1:if(e.tagType!==0)return 0;const s=o.get(e);if(s!==void 0)return s;const r=e.codegenNode;if(r.type!==13||r.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject"&&e.tag!=="math")return 0;if(r.patchFlag===void 0){let i=3;const a=Zo(e,n);if(a===0)return o.set(e,0),0;a<i&&(i=a);for(let c=0;c<e.children.length;c++){const u=ue(e.children[c],n);if(u===0)return o.set(e,0),0;u<i&&(i=u)}if(i>1)for(let c=0;c<e.props.length;c++){const u=e.props[c];if(u.type===7&&u.name==="bind"&&u.exp){const p=ue(u.exp,n);if(p===0)return o.set(e,0),0;p<i&&(i=p)}}if(r.isBlock){for(let c=0;c<e.props.length;c++)if(e.props[c].type===7)return o.set(e,0),0;n.removeHelper(Re),n.removeHelper(Ye(n.inSSR,r.isComponent)),r.isBlock=!1,n.helper(Ze(n.inSSR,r.isComponent))}return o.set(e,i),i}else return o.set(e,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return ue(e.content,n);case 4:return e.constType;case 8:let l=3;for(let i=0;i<e.children.length;i++){const a=e.children[i];if(te(a)||pn(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 Ma=new Set([Nn,Cn,rt,it]);function Jo(e,n){if(e.type===14&&!te(e.callee)&&Ma.has(e.callee)){const o=e.arguments[0];if(o.type===4)return ue(o,n);if(o.type===14)return Jo(o,n)}return 0}function Zo(e,n){let o=3;const s=Yo(e);if(s&&s.type===15){const{properties:r}=s;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<o&&(o=c);let u;if(a.type===4?u=ue(a,n):a.type===14?u=Jo(a,n):u=0,u===0)return u;u<o&&(o=u)}}return o}function Yo(e){const n=e.codegenNode;if(n.type===13)return n.props}function Ra(e,{filename:n="",prefixIdentifiers:o=!1,hoistStatic:s=!1,hmr:r=!1,cacheHandlers:l=!1,nodeTransforms:i=[],directiveTransforms:a={},transformHoist:c=null,isBuiltInComponent:u=cn,isCustomElement:p=cn,expressionPlugins:f=[],scopeId:b=null,slotted:k=!0,ssr:E=!1,inSSR:N=!1,ssrCssVars:w="",bindingMetadata:S=Rl,inline:I=!1,isTS:B=!1,onError:L=An,onWarn:_=$o,compatConfig:H}){const K=n.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),M={filename:n,selfName:K&&mn($e(K[1])),prefixIdentifiers:o,hoistStatic:s,hmr:r,cacheHandlers:l,nodeTransforms:i,directiveTransforms:a,transformHoist:c,isBuiltInComponent:u,isCustomElement:p,expressionPlugins:f,scopeId:b,slotted:k,ssr:E,inSSR:N,ssrCssVars:w,bindingMetadata:S,inline:I,isTS:B,onError:L,onWarn:_,compatConfig:H,root:e,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:e,childIndex:0,inVOnce:!1,helper(A){const F=M.helpers.get(A)||0;return M.helpers.set(A,F+1),A},removeHelper(A){const F=M.helpers.get(A);if(F){const j=F-1;j?M.helpers.set(A,j):M.helpers.delete(A)}},helperString(A){return`_${Ge[M.helper(A)]}`},replaceNode(A){if(process.env.NODE_ENV!=="production"){if(!M.currentNode)throw new Error("Node being replaced is already removed.");if(!M.parent)throw new Error("Cannot replace root node.")}M.parent.children[M.childIndex]=M.currentNode=A},removeNode(A){if(process.env.NODE_ENV!=="production"&&!M.parent)throw new Error("Cannot remove root node.");const F=M.parent.children,j=A?F.indexOf(A):M.currentNode?M.childIndex:-1;if(process.env.NODE_ENV!=="production"&&j<0)throw new Error("node being removed is not a child of current parent");!A||A===M.currentNode?(M.currentNode=null,M.onNodeRemoved()):M.childIndex>j&&(M.childIndex--,M.onNodeRemoved()),M.parent.children.splice(j,1)},onNodeRemoved:cn,addIdentifiers(A){},removeIdentifiers(A){},hoist(A){te(A)&&(A=z(A)),M.hoists.push(A);const F=z(`_hoisted_${M.hoists.length}`,!1,A.loc,2);return F.hoisted=A,F},cache(A,F=!1,j=!1){const C=aa(M.cached.length,A,F,j);return M.cached.push(C),C}};return M.filters=new Set,M}function Pa(e,n){const o=Ra(e,n);Ht(e,o),n.hoistStatic&&Ia(e,o),n.ssr||Fa(e,o),e.helpers=new Set([...o.helpers.keys()]),e.components=[...o.components],e.directives=[...o.directives],e.imports=o.imports,e.hoists=o.hoists,e.temps=o.temps,e.cached=o.cached,e.transformed=!0,e.filters=[...o.filters]}function Fa(e,n){const{helper:o}=n,{children:s}=e;if(s.length===1){const r=Go(e);if(r&&r.codegenNode){const l=r.codegenNode;l.type===13&&Ln(l,n),e.codegenNode=l}else e.codegenNode=s[0]}else if(s.length>1){let r=64;process.env.NODE_ENV!=="production"&&s.filter(l=>l.type!==3).length===1&&(r|=2048),e.codegenNode=lt(n,o(nt),void 0,e.children,r,void 0,void 0,!0,void 0,!1)}}function ja(e,n){let o=0;const s=()=>{o--};for(;o<e.children.length;o++){const r=e.children[o];te(r)||(n.grandParent=n.parent,n.parent=e,n.childIndex=o,n.onNodeRemoved=s,Ht(r,n))}}function Ht(e,n){n.currentNode=e;const{nodeTransforms:o}=n,s=[];for(let l=0;l<o.length;l++){const i=o[l](e,n);if(i&&(Ne(i)?s.push(...i):s.push(i)),n.currentNode)e=n.currentNode;else return}switch(e.type){case 3:n.ssr||n.helper(st);break;case 5:n.ssr||n.helper($t);break;case 9:for(let l=0;l<e.branches.length;l++)Ht(e.branches[l],n);break;case 10:case 11:case 1:case 0:ja(e,n);break}n.currentNode=e;let r=s.length;for(;r--;)s[r]()}function Xo(e,n){const o=te(e)?s=>s===e:s=>e.test(s);return(s,r)=>{if(s.type===1){const{props:l}=s;if(s.tagType===3&&l.some(ba))return;const i=[];for(let a=0;a<l.length;a++){const c=l[a];if(c.type===7&&o(c.name)){l.splice(a,1),a--;const u=n(s,c,r);u&&i.push(u)}}return i}}}const Ut="/*@__PURE__*/",Qo=e=>`${Ge[e]}: _${Ge[e]}`;function za(e,{mode:n="function",prefixIdentifiers:o=n==="module",sourceMap:s=!1,filename:r="template.vue.html",scopeId:l=null,optimizeImports:i=!1,runtimeGlobalName:a="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:u="vue/server-renderer",ssr:p=!1,isTS:f=!1,inSSR:b=!1}){const k={mode:n,prefixIdentifiers:o,sourceMap:s,filename:r,scopeId:l,optimizeImports:i,runtimeGlobalName:a,runtimeModuleName:c,ssrRuntimeModuleName:u,ssr:p,isTS:f,inSSR:b,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(N){return`_${Ge[N]}`},push(N,w=-2,S){k.code+=N},indent(){E(++k.indentLevel)},deindent(N=!1){N?--k.indentLevel:E(--k.indentLevel)},newline(){E(k.indentLevel)}};function E(N){k.push(`
|
|
5
|
+
`+" ".repeat(N),0)}return k}function Ha(e,n={}){const o=za(e,n);n.onContextCreated&&n.onContextCreated(o);const{mode:s,push:r,prefixIdentifiers:l,indent:i,deindent:a,newline:c,scopeId:u,ssr:p}=o,f=Array.from(e.helpers),b=f.length>0,k=!l&&s!=="module";Ua(e,o);const N=p?"ssrRender":"render",S=(p?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(r(`function ${N}(${S}) {`),i(),k&&(r("with (_ctx) {"),i(),b&&(r(`const { ${f.map(Qo).join(", ")} } = _Vue
|
|
6
|
+
`,-1),c())),e.components.length&&(Hn(e.components,"component",o),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Hn(e.directives,"directive",o),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Hn(e.filters,"filter",o),c()),e.temps>0){r("let ");for(let I=0;I<e.temps;I++)r(`${I>0?", ":""}_temp${I}`)}return(e.components.length||e.directives.length||e.temps)&&(r(`
|
|
7
|
+
`,0),c()),p||r("return "),e.codegenNode?re(e.codegenNode,o):r("null"),k&&(a(),r("}")),a(),r("}"),{ast:e,code:o.code,preamble:"",map:o.map?o.map.toJSON():void 0}}function Ua(e,n){const{ssr:o,prefixIdentifiers:s,push:r,newline:l,runtimeModuleName:i,runtimeGlobalName:a,ssrRuntimeModuleName:c}=n,u=a,p=Array.from(e.helpers);if(p.length>0&&(r(`const _Vue = ${u}
|
|
8
|
+
`,-1),e.hoists.length)){const f=[hn,gn,st,yn,wo].filter(b=>p.includes(b)).map(Qo).join(", ");r(`const { ${f} } = _Vue
|
|
9
|
+
`,-1)}qa(e.hoists,n),l(),r("return ")}function Hn(e,n,{helper:o,push:s,newline:r,isTS:l}){const i=o(n==="filter"?En:n==="component"?vn:kn);for(let a=0;a<e.length;a++){let c=e[a];const u=c.endsWith("__self");u&&(c=c.slice(0,-6)),s(`const ${ct(c,n)} = ${i}(${JSON.stringify(c)}${u?", true":""})${l?"!":""}`),a<e.length-1&&r()}}function qa(e,n){if(!e.length)return;n.pure=!0;const{push:o,newline:s}=n;s();for(let r=0;r<e.length;r++){const l=e[r];l&&(o(`const _hoisted_${r+1} = `),re(l,n),s())}n.pure=!1}function Wa(e){return te(e)||e.type===4||e.type===2||e.type===5||e.type===8}function Un(e,n){const o=e.length>3||process.env.NODE_ENV!=="production"&&e.some(s=>Ne(s)||!Wa(s));n.push("["),o&&n.indent(),pt(e,n,o),o&&n.deindent(),n.push("]")}function pt(e,n,o=!1,s=!0){const{push:r,newline:l}=n;for(let i=0;i<e.length;i++){const a=e[i];te(a)?r(a,-3):Ne(a)?Un(a,n):re(a,n),i<e.length-1&&(o?(s&&r(","),l()):s&&r(", "))}}function re(e,n){if(te(e)){n.push(e,-3);return}if(pn(e)){n.push(n.helper(e));return}switch(e.type){case 1:case 9:case 11:process.env.NODE_ENV!=="production"&&Io(e.codegenNode!=null,"Codegen node is missing for element/if/for node. Apply appropriate transforms first."),re(e.codegenNode,n);break;case 2:Ka(e,n);break;case 4:Vo(e,n);break;case 5:Ga(e,n);break;case 12:re(e.codegenNode,n);break;case 8:es(e,n);break;case 3:Za(e,n);break;case 13:Ya(e,n);break;case 14:Qa(e,n);break;case 15:Va(e,n);break;case 17:ec(e,n);break;case 18:tc(e,n);break;case 19:nc(e,n);break;case 20:oc(e,n);break;case 21:pt(e.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 Io(!1,`unhandled codegen node type: ${e.type}`),e}}function Ka(e,n){n.push(JSON.stringify(e.content),-3,e)}function Vo(e,n){const{content:o,isStatic:s}=e;n.push(s?JSON.stringify(o):o,-3,e)}function Ga(e,n){const{push:o,helper:s,pure:r}=n;r&&o(Ut),o(`${s($t)}(`),re(e.content,n),o(")")}function es(e,n){for(let o=0;o<e.children.length;o++){const s=e.children[o];te(s)?n.push(s,-3):re(s,n)}}function Ja(e,n){const{push:o}=n;if(e.type===8)o("["),es(e,n),o("]");else if(e.isStatic){const s=In(e.content)?e.content:JSON.stringify(e.content);o(s,-2,e)}else o(`[${e.content}]`,-3,e)}function Za(e,n){const{push:o,helper:s,pure:r}=n;r&&o(Ut),o(`${s(st)}(${JSON.stringify(e.content)})`,-3,e)}function Ya(e,n){const{push:o,helper:s,pure:r}=n,{tag:l,props:i,children:a,patchFlag:c,dynamicProps:u,directives:p,isBlock:f,disableTracking:b,isComponent:k}=e;let E;if(c)if(process.env.NODE_ENV!=="production")if(c<0)E=c+` /* ${tt[c]} */`;else{const w=Object.keys(tt).map(Number).filter(S=>S>0&&c&S).map(S=>tt[S]).join(", ");E=c+` /* ${w} */`}else E=String(c);p&&o(s(xn)+"("),f&&o(`(${s(Re)}(${b?"true":""}), `),r&&o(Ut);const N=f?Ye(n.inSSR,k):Ze(n.inSSR,k);o(s(N)+"(",-2,e),pt(Xa([l,i,a,E,u]),n),o(")"),f&&o(")"),p&&(o(", "),re(p,n),o(")"))}function Xa(e){let n=e.length;for(;n--&&e[n]==null;);return e.slice(0,n+1).map(o=>o||"null")}function Qa(e,n){const{push:o,helper:s,pure:r}=n,l=te(e.callee)?e.callee:s(e.callee);r&&o(Ut),o(l+"(",-2,e),pt(e.arguments,n),o(")")}function Va(e,n){const{push:o,indent:s,deindent:r,newline:l}=n,{properties:i}=e;if(!i.length){o("{}",-2,e);return}const a=i.length>1||process.env.NODE_ENV!=="production"&&i.some(c=>c.value.type!==4);o(a?"{":"{ "),a&&s();for(let c=0;c<i.length;c++){const{key:u,value:p}=i[c];Ja(u,n),o(": "),re(p,n),c<i.length-1&&(o(","),l())}a&&r(),o(a?"}":" }")}function ec(e,n){Un(e.elements,n)}function tc(e,n){const{push:o,indent:s,deindent:r}=n,{params:l,returns:i,body:a,newline:c,isSlot:u}=e;u&&o(`_${Ge[Tn]}(`),o("(",-2,e),Ne(l)?pt(l,n):l&&re(l,n),o(") => "),(c||a)&&(o("{"),s()),i?(c&&o("return "),Ne(i)?Un(i,n):re(i,n)):a&&re(a,n),(c||a)&&(r(),o("}")),u&&(e.isNonScopedSlot&&o(", undefined, true"),o(")"))}function nc(e,n){const{test:o,consequent:s,alternate:r,newline:l}=e,{push:i,indent:a,deindent:c,newline:u}=n;if(o.type===4){const f=!In(o.content);f&&i("("),Vo(o,n),f&&i(")")}else i("("),re(o,n),i(")");l&&a(),n.indentLevel++,l||i(" "),i("? "),re(s,n),n.indentLevel--,l&&u(),l||i(" "),i(": ");const p=r.type===19;p||n.indentLevel++,re(r,n),p||n.indentLevel--,l&&c(!0)}function oc(e,n){const{push:o,helper:s,indent:r,deindent:l,newline:i}=n,{needPauseTracking:a,needArraySpread:c}=e;c&&o("[...("),o(`_cache[${e.index}] || (`),a&&(r(),o(`${s(Lt)}(-1`),e.inVOnce&&o(", true"),o("),"),i(),o("(")),o(`_cache[${e.index}] = `),re(e.value,n),a&&(o(`).cacheIndex = ${e.index},`),i(),o(`${s(Lt)}(1),`),i(),o(`_cache[${e.index}]`),l()),o(")"),c&&o(")]")}const sc=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"),rc=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function ze(e,n,o=!1,s=!1){const r=e.content;if(r.trim())try{new Function(s?` ${r} `:`return ${o?`(${r}) => {}`:`(${r})`}`)}catch(l){let i=l.message;const a=r.replace(rc,"").match(sc);a&&(i=`avoid using JavaScript keyword as property name: "${a[0]}"`),n.onError(W(46,e.loc,void 0,i))}}const ic=(e,n)=>{if(e.type===5)e.content=qn(e.content,n);else if(e.type===1){const o=ce(e,"memo");for(let s=0;s<e.props.length;s++){const r=e.props[s];if(r.type===7&&r.name!=="for"){const l=r.exp,i=r.arg;l&&l.type===4&&!(r.name==="on"&&i)&&!(o&&i&&i.type===4&&i.content==="key")&&(r.exp=qn(l,n,r.name==="slot")),i&&i.type===4&&!i.isStatic&&(r.arg=qn(i,n))}}}};function qn(e,n,o=!1,s=!1,r=Object.create(n.identifiers)){return process.env.NODE_ENV!=="production"&&ze(e,n,o,s),e}const lc=Xo(/^(?:if|else|else-if)$/,(e,n,o)=>ac(e,n,o,(s,r,l)=>{const i=o.parent.children;let a=i.indexOf(s),c=0;for(;a-->=0;){const u=i[a];u&&u.type===9&&(c+=u.branches.length)}return()=>{if(l)s.codegenNode=ns(r,c,o);else{const u=dc(s.codegenNode);u.alternate=ns(r,c+s.branches.length-1,o)}}}));function ac(e,n,o,s){if(n.name!=="else"&&(!n.exp||!n.exp.content.trim())){const r=n.exp?n.exp.loc:e.loc;o.onError(W(28,n.loc)),n.exp=z("true",!1,r)}if(process.env.NODE_ENV!=="production"&&n.exp&&ze(n.exp,o),n.name==="if"){const r=ts(e,n),l={type:9,loc:Da(e.loc),branches:[r]};if(o.replaceNode(l),s)return s(l,r,!0)}else{const r=o.parent.children,l=[];let i=r.indexOf(e);for(;i-->=-1;){const a=r[i];if(a&&Pn(a)){o.removeNode(a),process.env.NODE_ENV!=="production"&&a.type===3&&l.unshift(a);continue}if(a&&a.type===9){(n.name==="else-if"||n.name==="else")&&a.branches[a.branches.length-1].condition===void 0&&o.onError(W(30,e.loc)),o.removeNode();const c=ts(e,n);if(process.env.NODE_ENV!=="production"&&l.length&&!(o.parent&&o.parent.type===1&&(o.parent.tag==="transition"||o.parent.tag==="Transition"))&&(c.children=[...l,...c.children]),process.env.NODE_ENV!=="production"){const p=c.userKey;p&&a.branches.forEach(({userKey:f})=>{cc(f,p)&&o.onError(W(29,c.userKey.loc))})}a.branches.push(c);const u=s&&s(a,c,!1);Ht(c,o),u&&u(),o.currentNode=null}else o.onError(W(30,e.loc));break}}}function ts(e,n){const o=e.tagType===3;return{type:10,loc:e.loc,condition:n.name==="else"?void 0:n.exp,children:o&&!ce(e,"for")?e.children:[e],userKey:at(e,"key"),isTemplateIf:o}}function ns(e,n,o){return e.condition?Dn(e.condition,os(e,n,o),ee(o.helper(st),[process.env.NODE_ENV!=="production"?'"v-if"':'""',"true"])):os(e,n,o)}function os(e,n,o){const{helper:s}=o,r=Q("key",z(`${n}`,!1,fe,2)),{children:l}=e,i=l[0];if(l.length!==1||i.type!==1)if(l.length===1&&i.type===11){const c=i.codegenNode;return Rt(c,r,o),c}else{let c=64;return process.env.NODE_ENV!=="production"&&!e.isTemplateIf&&l.filter(u=>u.type!==3).length===1&&(c|=2048),lt(o,s(nt),ye([r]),l,c,void 0,void 0,!0,!1,!1,e.loc)}else{const c=i.codegenNode,u=Ea(c);return u.type===13&&Ln(u,o),Rt(u,r,o),c}}function cc(e,n){if(!e||e.type!==n.type)return!1;if(e.type===6){if(e.value.content!==n.value.content)return!1}else{const o=e.exp,s=n.exp;if(o.type!==s.type||o.type!==4||o.isStatic!==s.isStatic||o.content!==s.content)return!1}return!0}function dc(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}const pc=Xo("for",(e,n,o)=>{const{helper:s,removeHelper:r}=o;return fc(e,n,o,l=>{const i=ee(s(wn),[l.source]),a=It(e),c=ce(e,"memo"),u=at(e,"key",!1,!0);u&&u.type;let p=u&&(u.type===6?u.value?z(u.value.content,!0):void 0:u.exp);const f=u&&p?Q("key",p):null,b=l.source.type===4&&l.source.constType>0,k=b?64:u?128:256;return l.codegenNode=lt(o,s(nt),void 0,i,k,void 0,void 0,!0,!b,!1,e.loc),()=>{let E;const{children:N}=l;process.env.NODE_ENV!=="production"&&a&&e.children.some(I=>{if(I.type===1){const B=at(I,"key");if(B)return o.onError(W(33,B.loc)),!0}});const w=N.length!==1||N[0].type!==1,S=Mt(e)?e:a&&e.children.length===1&&Mt(e.children[0])?e.children[0]:null;if(S?(E=S.codegenNode,a&&f&&Rt(E,f,o)):w?E=lt(o,s(nt),f?ye([f]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(E=N[0].codegenNode,a&&f&&Rt(E,f,o),E.isBlock!==!b&&(E.isBlock?(r(Re),r(Ye(o.inSSR,E.isComponent))):r(Ze(o.inSSR,E.isComponent))),E.isBlock=!b,E.isBlock?(s(Re),s(Ye(o.inSSR,E.isComponent))):s(Ze(o.inSSR,E.isComponent))),c){const I=Je(Wn(l.parseResult,[z("_cached")]));I.body=ca([ve(["const _memo = (",c.exp,")"]),ve(["if (_cached",...p?[" && _cached.key === ",p]:[],` && ${o.helperString(So)}(_cached, _memo)) return _cached`]),ve(["const _item = ",E]),z("_item.memo = _memo"),z("return _item")]),i.arguments.push(I,z("_cache"),z(String(o.cached.length))),o.cached.push(null)}else i.arguments.push(Je(Wn(l.parseResult),E,!0))}})});function fc(e,n,o,s){if(!n.exp){o.onError(W(31,n.loc));return}const r=n.forParseResult;if(!r){o.onError(W(32,n.loc));return}ss(r,o);const{addIdentifiers:l,removeIdentifiers:i,scopes:a}=o,{source:c,value:u,key:p,index:f}=r,b={type:11,loc:n.loc,source:c,valueAlias:u,keyAlias:p,objectIndexAlias:f,parseResult:r,children:It(e)?e.children:[e]};o.replaceNode(b),a.vFor++;const k=s&&s(b);return()=>{a.vFor--,k&&k()}}function ss(e,n){e.finalized||(process.env.NODE_ENV!=="production"&&(ze(e.source,n),e.key&&ze(e.key,n,!0),e.index&&ze(e.index,n,!0),e.value&&ze(e.value,n,!0)),e.finalized=!0)}function Wn({value:e,key:n,index:o},s=[]){return mc([e,n,o,...s])}function mc(e){let n=e.length;for(;n--&&!e[n];);return e.slice(0,n+1).map((o,s)=>o||z("_".repeat(s+1),!1))}const rs=z("undefined",!1),uc=(e,n)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const o=ce(e,"slot");if(o)return o.exp,n.scopes.vSlot++,()=>{n.scopes.vSlot--}}},hc=(e,n,o,s)=>Je(e,o,!1,!0,o.length?o[0].loc:s);function gc(e,n,o=hc){n.helper(Tn);const{children:s,loc:r}=e,l=[],i=[];let a=n.scopes.vSlot>0||n.scopes.vFor>0;const c=ce(e,"slot",!0);if(c){const{arg:w,exp:S}=c;w&&!ae(w)&&(a=!0),l.push(Q(w||z("default",!0),o(S,void 0,s,r)))}let u=!1,p=!1;const f=[],b=new Set;let k=0;for(let w=0;w<s.length;w++){const S=s[w];let I;if(!It(S)||!(I=ce(S,"slot",!0))){S.type!==3&&f.push(S);continue}if(c){n.onError(W(37,I.loc));break}u=!0;const{children:B,loc:L}=S,{arg:_=z("default",!0),exp:H,loc:K}=I;let M;ae(_)?M=_?_.content:"default":a=!0;const A=ce(S,"for"),F=o(H,A,B,L);let j,C;if(j=ce(S,"if"))a=!0,i.push(Dn(j.exp,qt(_,F,k++),rs));else if(C=ce(S,/^else(?:-if)?$/,!0)){let T=w,x;for(;T--&&(x=s[T],!!Pn(x)););if(x&&It(x)&&ce(x,/^(?:else-)?if$/)){let $=i[i.length-1];for(;$.alternate.type===19;)$=$.alternate;$.alternate=C.exp?Dn(C.exp,qt(_,F,k++),rs):qt(_,F,k++)}else n.onError(W(30,C.loc))}else if(A){a=!0;const T=A.forParseResult;T?(ss(T,n),i.push(ee(n.helper(wn),[T.source,Je(Wn(T),qt(_,F),!0)]))):n.onError(W(32,A.loc))}else{if(M){if(b.has(M)){n.onError(W(38,K));continue}b.add(M),M==="default"&&(p=!0)}l.push(Q(_,F))}}if(!c){const w=(S,I)=>{const B=o(S,void 0,I,r);return n.compatConfig&&(B.isNonScopedSlot=!0),Q("default",B)};u?f.length&&!f.every(Rn)&&(p?n.onError(W(39,f[0].loc)):l.push(w(void 0,f))):l.push(w(void 0,s))}const E=a?2:Wt(e.children)?3:1;let N=ye(l.concat(Q("_",z(E+(process.env.NODE_ENV!=="production"?` /* ${Hl[E]} */`:""),!1))),r);return i.length&&(N=ee(n.helper(Co),[N,Pe(i)])),{slots:N,hasDynamicSlots:a}}function qt(e,n,o){const s=[Q("name",e),Q("fn",n)];return o!=null&&s.push(Q("key",z(String(o),!0))),ye(s)}function Wt(e){for(let n=0;n<e.length;n++){const o=e[n];switch(o.type){case 1:if(o.tagType===2||Wt(o.children))return!0;break;case 9:if(Wt(o.branches))return!0;break;case 10:case 11:if(Wt(o.children))return!0;break}}return!1}const is=new WeakMap,yc=(e,n)=>function(){if(e=n.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:s,props:r}=e,l=e.tagType===1;let i=l?vc(e,n):`"${s}"`;const a=Pl(i)&&i.callee===bn;let c,u,p=0,f,b,k,E=a||i===ot||i===un||!l&&(s==="svg"||s==="foreignObject"||s==="math");if(r.length>0){const N=ls(e,n,void 0,l,a);c=N.props,p=N.patchFlag,b=N.dynamicPropNames;const w=N.directives;k=w&&w.length?Pe(w.map(S=>kc(S,n))):void 0,N.shouldUseBlock&&(E=!0)}if(e.children.length>0)if(i===Tt&&(E=!0,p|=1024,process.env.NODE_ENV!=="production"&&e.children.length>1&&n.onError(W(47,{start:e.children[0].loc.start,end:e.children[e.children.length-1].loc.end,source:""}))),l&&i!==ot&&i!==Tt){const{slots:w,hasDynamicSlots:S}=gc(e,n);u=w,S&&(p|=1024)}else if(e.children.length===1&&i!==ot){const w=e.children[0],S=w.type,I=S===5||S===8;I&&ue(w,n)===0&&(p|=1),I||S===2?u=w:u=e.children}else u=e.children;b&&b.length&&(f=Ec(b)),e.codegenNode=lt(n,i,c,u,p===0?void 0:p,f,k,!!E,!1,l,e.loc)};function vc(e,n,o=!1){let{tag:s}=e;const r=Kn(s),l=at(e,"is",!1,!0);if(l)if(r||Le("COMPILER_IS_ON_ELEMENT",n)){let a;if(l.type===6?a=l.value&&z(l.value.content,!0):(a=l.exp,a||(a=z("is",!1,l.arg.loc))),a)return ee(n.helper(bn),[a])}else l.type===6&&l.value.content.startsWith("vue:")&&(s=l.value.content.slice(4));const i=Do(s)||n.isBuiltInComponent(s);return i?(o||n.helper(i),i):(n.helper(vn),n.components.add(s),ct(s,"component"))}function ls(e,n,o=e.props,s,r,l=!1){const{tag:i,loc:a,children:c}=e;let u=[];const p=[],f=[],b=c.length>0;let k=!1,E=0,N=!1,w=!1,S=!1,I=!1,B=!1,L=!1;const _=[],H=F=>{u.length&&(p.push(ye(as(u),a)),u=[]),F&&p.push(F)},K=()=>{n.scopes.vFor>0&&u.push(Q(z("ref_for",!0),z("true")))},M=({key:F,value:j})=>{if(ae(F)){const C=F.content,T=dn(C);if(T&&(!s||r)&&C.toLowerCase()!=="onclick"&&C!=="onUpdate:modelValue"&&!bo(C)&&(I=!0),T&&bo(C)&&(L=!0),T&&j.type===14&&(j=j.arguments[0]),j.type===20||(j.type===4||j.type===8)&&ue(j,n)>0)return;C==="ref"?N=!0:C==="class"?w=!0:C==="style"?S=!0:C!=="key"&&!_.includes(C)&&_.push(C),s&&(C==="class"||C==="style")&&!_.includes(C)&&_.push(C)}else B=!0};for(let F=0;F<o.length;F++){const j=o[F];if(j.type===6){const{loc:C,name:T,nameLoc:x,value:$}=j;let J=!0;if(T==="ref"&&(N=!0,K()),T==="is"&&(Kn(i)||$&&$.content.startsWith("vue:")||Le("COMPILER_IS_ON_ELEMENT",n)))continue;u.push(Q(z(T,!0,x),z($?$.content:"",J,$?$.loc:C)))}else{const{name:C,arg:T,exp:x,loc:$,modifiers:J}=j,le=C==="bind",Ie=C==="on";if(C==="slot"){s||n.onError(W(40,$));continue}if(C==="once"||C==="memo"||C==="is"||le&&Oe(T,"is")&&(Kn(i)||Le("COMPILER_IS_ON_ELEMENT",n))||Ie&&l)continue;if((le&&Oe(T,"key")||Ie&&b&&Oe(T,"vue:before-update"))&&(k=!0),le&&Oe(T,"ref")&&K(),!T&&(le||Ie)){if(B=!0,x)if(le){if(H(),process.env.NODE_ENV!=="production"&&p.some(xe=>xe.type===15?xe.properties.some(({key:we})=>we.type!==4||!we.isStatic?!0:we.content!=="class"&&we.content!=="style"&&!dn(we.content)):!0)&&Xe("COMPILER_V_BIND_OBJECT_ORDER",n,$),Le("COMPILER_V_BIND_OBJECT_ORDER",n)){p.unshift(x);continue}K(),H(),p.push(x)}else H({type:14,loc:$,callee:n.helper(Sn),arguments:s?[x]:[x,"true"]});else n.onError(W(le?34:35,$));continue}le&&J.some(ke=>ke.content==="prop")&&(E|=32);const _e=n.directiveTransforms[C];if(_e){const{props:ke,needRuntime:xe}=_e(j,e,n);!l&&ke.forEach(M),Ie&&T&&!ae(T)?H(ye(ke,a)):u.push(...ke),xe&&(f.push(j),pn(xe)&&is.set(j,xe))}else Fl(C)||(f.push(j),b&&(k=!0))}}let A;if(p.length?(H(),p.length>1?A=ee(n.helper(Dt),p,a):A=p[0]):u.length&&(A=ye(as(u),a)),B?E|=16:(w&&!s&&(E|=2),S&&!s&&(E|=4),_.length&&(E|=8),I&&(E|=32)),!k&&(E===0||E===32)&&(N||L||f.length>0)&&(E|=512),!n.inSSR&&A)switch(A.type){case 15:let F=-1,j=-1,C=!1;for(let $=0;$<A.properties.length;$++){const J=A.properties[$].key;ae(J)?J.content==="class"?F=$:J.content==="style"&&(j=$):J.isHandlerKey||(C=!0)}const T=A.properties[F],x=A.properties[j];C?A=ee(n.helper(rt),[A]):(T&&!ae(T.value)&&(T.value=ee(n.helper(Nn),[T.value])),x&&(S||x.value.type===4&&x.value.content.trim()[0]==="["||x.value.type===17)&&(x.value=ee(n.helper(Cn),[x.value])));break;case 14:break;default:A=ee(n.helper(rt),[ee(n.helper(it),[A])]);break}return{props:A,directives:f,patchFlag:E,dynamicPropNames:_,shouldUseBlock:k}}function as(e){const n=new Map,o=[];for(let s=0;s<e.length;s++){const r=e[s];if(r.key.type===8||!r.key.isStatic){o.push(r);continue}const l=r.key.content,i=n.get(l);i?(l==="style"||l==="class"||dn(l))&&bc(i,r):(n.set(l,r),o.push(r))}return o}function bc(e,n){e.value.type===17?e.value.elements.push(n.value):e.value=Pe([e.value,n.value],e.loc)}function kc(e,n){const o=[],s=is.get(e);s?o.push(n.helperString(s)):(n.helper(kn),n.directives.add(e.name),o.push(ct(e.name,"directive")));const{loc:r}=e;if(e.exp&&o.push(e.exp),e.arg&&(e.exp||o.push("void 0"),o.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||o.push("void 0"),o.push("void 0"));const l=z("true",!1,r);o.push(ye(e.modifiers.map(i=>Q(i,l)),r))}return Pe(o,e.loc)}function Ec(e){let n="[";for(let o=0,s=e.length;o<s;o++)n+=JSON.stringify(e[o]),o<s-1&&(n+=", ");return n+"]"}function Kn(e){return e==="component"||e==="Component"}const xc=(e,n)=>{if(Mt(e)){const{children:o,loc:s}=e,{slotName:r,slotProps:l}=wc(e,n),i=[n.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let a=2;l&&(i[2]=l,a=3),o.length&&(i[3]=Je([],o,!1,!1,s),a=4),n.scopeId&&!n.slotted&&(a=5),i.splice(a),e.codegenNode=ee(n.helper(No),i,s)}};function wc(e,n){let o='"default"',s;const r=[];for(let l=0;l<e.props.length;l++){const i=e.props[l];if(i.type===6)i.value&&(i.name==="name"?o=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)o=i.exp;else if(i.arg&&i.arg.type===4){const a=$e(i.arg.content);o=i.exp=z(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}=ls(e,n,r,!1,!1);s=l,i.length&&n.onError(W(36,i[0].loc))}return{slotName:o,slotProps:s}}const cs=(e,n,o,s)=>{const{loc:r,modifiers:l,arg:i}=e;!e.exp&&!l.length&&o.onError(W(35,r));let a;if(i.type===4)if(i.isStatic){let f=i.content;process.env.NODE_ENV!=="production"&&f.startsWith("vnode")&&o.onError(W(52,i.loc)),f.startsWith("vue:")&&(f=`vnode-${f.slice(4)}`);const b=n.tagType!==0||f.startsWith("vnode")||!/[A-Z]/.test(f)?zl($e(f)):`on:${f}`;a=z(b,!0,i.loc)}else a=ve([`${o.helperString(Bn)}(`,i,")"]);else a=i,a.children.unshift(`${o.helperString(Bn)}(`),a.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let u=o.cacheHandlers&&!c&&!o.inVOnce;if(c){const f=Ao(c),b=!(f||ya(c)),k=c.content.includes(";");process.env.NODE_ENV!=="production"&&ze(c,o,!1,k),(b||u&&f)&&(c=ve([`${b?"$event":"(...args)"} => ${k?"{":"("}`,c,k?"}":")"]))}let p={props:[Q(a,c||z("() => {}",!1,r))]};return s&&(p=s(p)),u&&(p.props[0].value=o.cache(p.props[0].value)),p.props.forEach(f=>f.key.isHandlerKey=!0),p},Nc=(e,n,o)=>{const{modifiers:s,loc:r}=e,l=e.arg;let{exp:i}=e;return i&&i.type===4&&!i.content.trim()&&(i=void 0),l.type!==4?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=l.content?`${l.content} || ""`:'""'),s.some(a=>a.content==="camel")&&(l.type===4?l.isStatic?l.content=$e(l.content):l.content=`${o.helperString(_n)}(${l.content})`:(l.children.unshift(`${o.helperString(_n)}(`),l.children.push(")"))),o.inSSR||(s.some(a=>a.content==="prop")&&ds(l,"."),s.some(a=>a.content==="attr")&&ds(l,"^")),{props:[Q(l,i)]}},ds=(e,n)=>{e.type===4?e.isStatic?e.content=n+e.content:e.content=`\`${n}\${${e.content}}\``:(e.children.unshift(`'${n}' + (`),e.children.push(")"))},Cc=(e,n)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const o=e.children;let s,r=!1;for(let l=0;l<o.length;l++){const i=o[l];if(Mn(i)){r=!0;for(let a=l+1;a<o.length;a++){const c=o[a];if(Mn(c))s||(s=o[l]=ve([i],i.loc)),s.children.push(" + ",c),o.splice(a,1),a--;else{s=void 0;break}}}}if(!(!r||o.length===1&&(e.type===0||e.type===1&&e.tagType===0&&!e.props.find(l=>l.type===7&&!n.directiveTransforms[l.name])&&e.tag!=="template")))for(let l=0;l<o.length;l++){const i=o[l];if(Mn(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"?` /* ${tt[1]} */`:"")),o[l]={type:12,content:i,loc:i.loc,codegenNode:ee(n.helper(yn),a)}}}}},ps=new WeakSet,Sc=(e,n)=>{if(e.type===1&&ce(e,"once",!0))return ps.has(e)||n.inVOnce||n.inSSR?void 0:(ps.add(e),n.inVOnce=!0,n.helper(Lt),()=>{n.inVOnce=!1;const o=n.currentNode;o.codegenNode&&(o.codegenNode=n.cache(o.codegenNode,!0,!0))})},fs=(e,n,o)=>{const{exp:s,arg:r}=e;if(!s)return o.onError(W(41,e.loc)),ft();const l=s.loc.source.trim(),i=s.type===4?s.content:l,a=o.bindingMetadata[l];if(a==="props"||a==="props-aliased")return o.onError(W(44,s.loc)),ft();if(a==="literal-const"||a==="setup-const")return o.onError(W(45,s.loc)),ft();if(!i.trim()||!Ao(s))return o.onError(W(42,s.loc)),ft();const c=r||z("modelValue",!0),u=r?ae(r)?`onUpdate:${$e(r.content)}`:ve(['"onUpdate:" + ',r]):"onUpdate:modelValue";let p;const f=o.isTS?"($event: any)":"$event";p=ve([`${f} => ((`,s,") = $event)"]);const b=[Q(c,e.exp),Q(u,p)];if(e.modifiers.length&&n.tagType===1){const k=e.modifiers.map(N=>N.content).map(N=>(In(N)?N:JSON.stringify(N))+": true").join(", "),E=r?ae(r)?`${r.content}Modifiers`:ve([r,' + "Modifiers"']):"modelModifiers";b.push(Q(E,z(`{ ${k} }`,!1,e.loc,2)))}return ft(b)};function ft(e=[]){return{props:e}}const _c=/[\w).+\-_$\]]/,Bc=(e,n)=>{Le("COMPILER_FILTERS",n)&&(e.type===5?Kt(e.content,n):e.type===1&&e.props.forEach(o=>{o.type===7&&o.name!=="for"&&o.exp&&Kt(o.exp,n)}))};function Kt(e,n){if(e.type===4)ms(e,n);else for(let o=0;o<e.children.length;o++){const s=e.children[o];typeof s=="object"&&(s.type===4?ms(s,n):s.type===8?Kt(e,n):s.type===5&&Kt(s.content,n))}}function ms(e,n){const o=e.content;let s=!1,r=!1,l=!1,i=!1,a=0,c=0,u=0,p=0,f,b,k,E,N=[];for(k=0;k<o.length;k++)if(b=f,f=o.charCodeAt(k),s)f===39&&b!==92&&(s=!1);else if(r)f===34&&b!==92&&(r=!1);else if(l)f===96&&b!==92&&(l=!1);else if(i)f===47&&b!==92&&(i=!1);else if(f===124&&o.charCodeAt(k+1)!==124&&o.charCodeAt(k-1)!==124&&!a&&!c&&!u)E===void 0?(p=k+1,E=o.slice(0,k).trim()):w();else{switch(f){case 34:r=!0;break;case 39:s=!0;break;case 96:l=!0;break;case 40:u++;break;case 41:u--;break;case 91:c++;break;case 93:c--;break;case 123:a++;break;case 125:a--;break}if(f===47){let S=k-1,I;for(;S>=0&&(I=o.charAt(S),I===" ");S--);(!I||!_c.test(I))&&(i=!0)}}E===void 0?E=o.slice(0,k).trim():p!==0&&w();function w(){N.push(o.slice(p,k).trim()),p=k+1}if(N.length){for(process.env.NODE_ENV!=="production"&&At("COMPILER_FILTERS",n,e.loc),k=0;k<N.length;k++)E=Tc(E,N[k],n);e.content=E,e.ast=void 0}}function Tc(e,n,o){o.helper(En);const s=n.indexOf("(");if(s<0)return o.filters.add(n),`${ct(n,"filter")}(${e})`;{const r=n.slice(0,s),l=n.slice(s+1);return o.filters.add(r),`${ct(r,"filter")}(${e}${l!==")"?","+l:l}`}}const us=new WeakSet,$c=(e,n)=>{if(e.type===1){const o=ce(e,"memo");return!o||us.has(e)||n.inSSR?void 0:(us.add(e),()=>{const s=e.codegenNode||n.currentNode.codegenNode;s&&s.type===13&&(e.tagType!==1&&Ln(s,n),e.codegenNode=ee(n.helper($n),[o.exp,Je(void 0,s),"_cache",String(n.cached.length)]),n.cached.push(null))})}},Dc=(e,n)=>{if(e.type===1){for(const o of e.props)if(o.type===7&&o.name==="bind"&&(!o.exp||o.exp.type===4&&!o.exp.content.trim())&&o.arg){const s=o.arg;if(s.type!==4||!s.isStatic)n.onError(W(53,s.loc)),o.exp=z("",!0,s.loc);else{const r=$e(s.content);(Lo.test(r[0])||r[0]==="-")&&(o.exp=z(r,!1,s.loc))}}}};function Lc(e){return[[Dc,Sc,lc,$c,pc,Bc,...process.env.NODE_ENV!=="production"?[ic]:[],xc,yc,uc,Cc],{on:cs,bind:Nc,model:fs}]}function Oc(e,n={}){const o=n.onError||An,s=n.mode==="module";n.prefixIdentifiers===!0?o(W(48)):s&&o(W(49));const r=!1;n.cacheHandlers&&o(W(50)),n.scopeId&&!s&&o(W(51));const l=Te({},n,{prefixIdentifiers:r}),i=te(e)?Aa(e,l):e,[a,c]=Lc();return Pa(i,Te({},l,{nodeTransforms:[...a,...n.nodeTransforms||[]],directiveTransforms:Te({},c,n.directiveTransforms||{})})),Ha(i,l)}const Ac=()=>({props:[]});const hs=Symbol(process.env.NODE_ENV!=="production"?"vModelRadio":""),gs=Symbol(process.env.NODE_ENV!=="production"?"vModelCheckbox":""),ys=Symbol(process.env.NODE_ENV!=="production"?"vModelText":""),vs=Symbol(process.env.NODE_ENV!=="production"?"vModelSelect":""),Gn=Symbol(process.env.NODE_ENV!=="production"?"vModelDynamic":""),bs=Symbol(process.env.NODE_ENV!=="production"?"vOnModifiersGuard":""),ks=Symbol(process.env.NODE_ENV!=="production"?"vOnKeysGuard":""),Es=Symbol(process.env.NODE_ENV!=="production"?"vShow":""),Jn=Symbol(process.env.NODE_ENV!=="production"?"Transition":""),xs=Symbol(process.env.NODE_ENV!=="production"?"TransitionGroup":"");ia({[hs]:"vModelRadio",[gs]:"vModelCheckbox",[ys]:"vModelText",[vs]:"vModelSelect",[Gn]:"vModelDynamic",[bs]:"withModifiers",[ks]:"withKeys",[Es]:"vShow",[Jn]:"Transition",[xs]:"TransitionGroup"});let Qe;function Ic(e,n=!1){return Qe||(Qe=document.createElement("div")),n?(Qe.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Qe.children[0].getAttribute("foo")):(Qe.innerHTML=e,Qe.textContent)}const Mc={parseMode:"html",isVoidTag:ea,isNativeTag:e=>Xl(e)||Ql(e)||Vl(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:Ic,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return Jn;if(e==="TransitionGroup"||e==="transition-group")return xs},getNamespace(e,n,o){let s=n?n.ns:o;if(n&&s===2)if(n.tag==="annotation-xml"){if(e==="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"))&&(s=0)}else/^m(?:[ions]|text)$/.test(n.tag)&&e!=="mglyph"&&e!=="malignmark"&&(s=0);else n&&s===1&&(n.tag==="foreignObject"||n.tag==="desc"||n.tag==="title")&&(s=0);if(s===0){if(e==="svg")return 1;if(e==="math")return 2}return s}},Rc=e=>{e.type===1&&e.props.forEach((n,o)=>{n.type===6&&n.name==="style"&&n.value&&(e.props[o]={type:7,name:"bind",arg:z("style",!0,n.loc),exp:Pc(n.value.content,n.loc),modifiers:[],loc:n.loc})})},Pc=(e,n)=>{const o=Kl(e);return z(JSON.stringify(o),!1,n,3)};function be(e,n){return W(e,n,process.env.NODE_ENV!=="production"?Fc:void 0)}const Fc={54:"v-html is missing expression.",55:"v-html will override element children.",56:"v-text is missing expression.",57:"v-text will override element children.",58:"v-model can only be used on <input>, <textarea> and <select> elements.",59:"v-model argument is not supported on plain elements.",60:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",61:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",62:"v-show is missing expression.",63:"<Transition> expects exactly one child element or component.",64:"Tags with side effect (<script> and <style>) are ignored in client component templates."},jc=(e,n,o)=>{const{exp:s,loc:r}=e;return s||o.onError(be(54,r)),n.children.length&&(o.onError(be(55,r)),n.children.length=0),{props:[Q(z("innerHTML",!0,r),s||z("",!0))]}},zc=(e,n,o)=>{const{exp:s,loc:r}=e;return s||o.onError(be(56,r)),n.children.length&&(o.onError(be(57,r)),n.children.length=0),{props:[Q(z("textContent",!0),s?ue(s,o)>0?s:ee(o.helperString($t),[s],r):z("",!0))]}},Hc=(e,n,o)=>{const s=fs(e,n,o);if(!s.props.length||n.tagType===1)return s;e.arg&&o.onError(be(59,e.arg.loc));function r(){const a=ce(n,"bind");a&&Oe(a.arg,"value")&&o.onError(be(61,a.loc))}const{tag:l}=n,i=o.isCustomElement(l);if(l==="input"||l==="textarea"||l==="select"||i){let a=ys,c=!1;if(l==="input"||i){const u=at(n,"type");if(u){if(u.type===7)a=Gn;else if(u.value)switch(u.value.content){case"radio":a=hs;break;case"checkbox":a=gs;break;case"file":c=!0,o.onError(be(60,e.loc));break;default:process.env.NODE_ENV!=="production"&&r();break}}else va(n)?a=Gn:process.env.NODE_ENV!=="production"&&r()}else l==="select"?a=vs:process.env.NODE_ENV!=="production"&&r();c||(s.needRuntime=o.helper(a))}else o.onError(be(58,e.loc));return s.props=s.props.filter(a=>!(a.key.type===4&&a.key.content==="modelValue")),s},Uc=Ee("passive,once,capture"),qc=Ee("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Wc=Ee("left,right"),ws=Ee("onkeyup,onkeydown,onkeypress"),Kc=(e,n,o,s)=>{const r=[],l=[],i=[];for(let a=0;a<n.length;a++){const c=n[a].content;c==="native"&&Xe("COMPILER_V_ON_NATIVE",o,s)||Uc(c)?i.push(c):Wc(c)?ae(e)?ws(e.content.toLowerCase())?r.push(c):l.push(c):(r.push(c),l.push(c)):qc(c)?l.push(c):r.push(c)}return{keyModifiers:r,nonKeyModifiers:l,eventOptionModifiers:i}},Ns=(e,n)=>ae(e)&&e.content.toLowerCase()==="onclick"?z(n,!0):e.type!==4?ve(["(",e,`) === "onClick" ? "${n}" : (`,e,")"]):e,Gc=(e,n,o)=>cs(e,n,o,s=>{const{modifiers:r}=e;if(!r.length)return s;let{key:l,value:i}=s.props[0];const{keyModifiers:a,nonKeyModifiers:c,eventOptionModifiers:u}=Kc(l,r,o,e.loc);if(c.includes("right")&&(l=Ns(l,"onContextmenu")),c.includes("middle")&&(l=Ns(l,"onMouseup")),c.length&&(i=ee(o.helper(bs),[i,JSON.stringify(c)])),a.length&&(!ae(l)||ws(l.content.toLowerCase()))&&(i=ee(o.helper(ks),[i,JSON.stringify(a)])),u.length){const p=u.map(mn).join("");l=ae(l)?z(`${l.content}${p}`,!0):ve(["(",l,`) + "${p}"`])}return{props:[Q(l,i)]}}),Jc=(e,n,o)=>{const{exp:s,loc:r}=e;return s||o.onError(be(62,r)),{props:[],needRuntime:o.helper(Es)}},Zc=(e,n)=>{if(e.type===1&&e.tagType===1&&n.isBuiltInComponent(e.tag)===Jn)return()=>{if(!e.children.length)return;Cs(e)&&n.onError(be(63,{start:e.children[0].loc.start,end:e.children[e.children.length-1].loc.end,source:""}));const s=e.children[0];if(s.type===1)for(const r of s.props)r.type===7&&r.name==="show"&&e.props.push({type:6,name:"persisted",nameLoc:e.loc,value:void 0,loc:e.loc})}};function Cs(e){const n=e.children=e.children.filter(s=>!Pn(s)),o=n[0];return n.length!==1||o.type===11||o.type===9&&o.branches.some(Cs)}const Yc=(e,n)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&(process.env.NODE_ENV!=="production"&&n.onError(be(64,e.loc)),n.removeNode())};function Xc(e,n){return e==="template"?!0:e in Ss?Ss[e].has(n):n in _s?_s[n].has(e):!(e in Bs&&Bs[e].has(n)||n in Ts&&Ts[n].has(e))}const Ve=new Set(["h1","h2","h3","h4","h5","h6"]),He=new Set([]),Ss={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},_s={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"])},Bs={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"])},Ts={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:Ve,h2:Ve,h3:Ve,h4:Ve,h5:Ve,h6:Ve},Qc=(e,n)=>{if(e.type===1&&e.tagType===0&&n.parent&&n.parent.type===1&&n.parent.tagType===0&&!Xc(n.parent.tag,e.tag)){const o=new SyntaxError(`<${e.tag}> cannot be child of <${n.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`);o.loc=e.loc,n.onWarn(o)}},Vc=[Rc,...process.env.NODE_ENV!=="production"?[Zc,Qc]:[]],ed={cloak:Ac,html:jc,text:zc,model:Hc,on:Gc,show:Jc};function td(e,n={}){return Oc(e,Te({},Mc,n,{nodeTransforms:[Yc,...Vc,...n.nodeTransforms||[]],directiveTransforms:Te({},ed,n.directiveTransforms||{}),transformHoist:null}))}function nd(e,n={}){const o=e.trim().startsWith("<")?e:`<span>${e}</span>`,{code:s}=td(o,{mode:"function"}),r=new Function("Vue",`${s}; return render;`)(js);return t.defineComponent({name:"DynamicFromString",props:n.props??{},emits:n.emits??[],setup(){return n.setup?.()??{}},render:r})}const Zn={};function od(e){return Zn[e]||(Zn[e]=nd(e,{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}}})),Zn[e]}const sd={class:"mt-4 flex flex-wrap items-center justify-between gap-3 text-sm text-gray-600"},rd={class:"flex items-center gap-2"},id=["disabled"],ld={class:"text-sm"},ad=["disabled"],cd=t.defineComponent({__name:"TablePagination",props:{currentPage:{},totalPages:{},label:{}},setup(e){const n=e,o=t.computed(()=>n.currentPage<=1),s=t.computed(()=>n.currentPage>=n.totalPages);return(r,l)=>(t.openBlock(),t.createElementBlock("div",sd,[t.createElementVNode("div",null,t.toDisplayString(e.label),1),t.createElementVNode("div",rd,[t.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[0]||(l[0]=i=>r.$emit("previous"))}," Назад ",8,id),t.createElementVNode("span",ld,"Сторінка "+t.toDisplayString(e.currentPage)+" з "+t.toDisplayString(e.totalPages),1),t.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[1]||(l[1]=i=>r.$emit("next"))}," Далі ",8,ad)])]))}}),dd={class:"relative inline-flex"},pd=["aria-label"],fd={class:"px-3 pb-2"},md={class:"px-3 pb-3 max-h-64 overflow-y-auto"},ud=["onClick"],hd={class:"truncate"},gd={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"},yd="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",vd=t.defineComponent({__name:"TableColumnSettings",props:{columns:{}},emits:["update:columns"],setup(e,{emit:n}){const o=e,s=n,r=t.useAttrs(),l=t.ref(!1),i=t.ref(""),a=t.ref([...o.columns]),c=t.ref(null),u=t.ref(null),p=t.ref(null),f=t.ref({top:0,left:0}),b=t.computed(()=>{if(!i.value)return a.value;const B=i.value.toLowerCase();return a.value.filter(L=>k(L).toLowerCase().includes(B))});t.watch(()=>o.columns,B=>{if(!B){a.value=[];return}const L=JSON.stringify(B),_=JSON.stringify(a.value);L!==_&&(a.value=[...B])},{deep:!0}),t.watch(a,B=>{s("update:columns",B)},{deep:!0});function k(B){return B.ua||B.label||B.name||"Колонка"}function E(B){const L=!B.hidden;L&&a.value.filter(_=>!_.hidden).length<=1||(B.hidden=L)}function N(){l.value=!l.value,l.value&&t.nextTick(()=>{p.value?.focus(),w()})}function w(){if(!c.value)return;const B=c.value.getBoundingClientRect();f.value={top:B.bottom+window.scrollY+6,left:B.left+window.scrollX-200}}function S(B){if(!l.value)return;const L=B.target;L&&(u.value?.contains(L)||c.value?.contains(L)||(l.value=!1))}function I(B){B.key==="Escape"&&(l.value=!1)}return t.onMounted(()=>{document.addEventListener("click",S,!0),document.addEventListener("keydown",I)}),t.onBeforeUnmount(()=>{document.removeEventListener("click",S,!0),document.removeEventListener("keydown",I)}),(B,L)=>(t.openBlock(),t.createElementBlock("div",dd,[t.createElementVNode("button",{ref_key:"buttonRef",ref:c,type:"button",onClick:N,class:t.normalizeClass([yd,t.unref(r).class]),"aria-label":t.unref(r)["aria-label"]??"Налаштування колонок",title:"Налаштування колонок"},[...L[2]||(L[2]=[t.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,pd),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[l.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"modalRef",ref:u,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:t.normalizeStyle({top:`${f.value.top}px`,left:`${f.value.left}px`})},[L[5]||(L[5]=t.createElementVNode("div",{class:"flex items-center justify-between h-12 px-4 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Налаштування колонок ",-1)),t.createElementVNode("div",fd,[t.withDirectives(t.createElementVNode("input",{ref_key:"searchInput",ref:p,"onUpdate:modelValue":L[0]||(L[0]=_=>i.value=_),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),[[t.vModelText,i.value]])]),t.createElementVNode("div",md,[L[4]||(L[4]=t.createElementVNode("p",{class:"px-1 pb-2 text-xs text-gray-500 uppercase tracking-wide"},"Виберіть колонки",-1)),t.createElementVNode("ul",{class:"space-y-1",onClick:L[1]||(L[1]=t.withModifiers(()=>{},["stop"]))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,_=>(t.openBlock(),t.createElementBlock("li",{key:_.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:H=>E(_)},[t.createElementVNode("span",hd,t.toDisplayString(k(_)),1),t.createElementVNode("span",{class:t.normalizeClass(["flex items-center justify-center size-4 rounded border border-gray-300 text-white",_.hidden?"bg-white text-transparent":"bg-blue-600 border-blue-600"])},[_.hidden?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("svg",gd,[...L[3]||(L[3]=[t.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])]))],2)],8,ud))),128))])])],4)):t.createCommentVNode("",!0)]))]))}}),bd=["data-action-key"],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"},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"},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"},Nd={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"},Cd=t.defineComponent({__name:"RowActionsButton",props:{row:{},actions:{},isOpen:{type:Boolean},actionKey:{}},emits:["toggle"],setup(e,{emit:n}){const o=e,s=n,r=t.ref(null),l=t.computed(()=>!!o.actions?.length),i=t.ref({scrollX:0,scrollY:0,width:0,height:0}),a=t.ref(!1);function c(){s("toggle")}function u(E){E.handler?.(o.row)}const p=t.computed(()=>{if(!o.isOpen)return{};const E=r.value;if(!E)return{};const N=E.getBoundingClientRect(),w=8,S=160,L=(o.actions?.length??0)*36+w*2,_=i.value.height||(typeof window<"u"?window.innerHeight:0),H=i.value.width||(typeof window<"u"?window.innerWidth:0),K=i.value.scrollX||(typeof window<"u"?window.scrollX:0),M=i.value.scrollY||(typeof window<"u"?window.scrollY:0);let A=N.bottom+M+w,F=N.right+K-S;const j=K+H-S-w;return F>j&&(F=j),F<K+w&&(F=K+w),A+L>M+_-w&&(A=N.top+M-L-w),A<M+w&&(A=M+w),{top:`${A}px`,left:`${F}px`,width:"auto"}});function f(){typeof window>"u"||(i.value={scrollX:window.scrollX,scrollY:window.scrollY,width:window.innerWidth,height:window.innerHeight})}function b(){typeof window>"u"||a.value||(a.value=!0,f(),window.addEventListener("scroll",f,{passive:!0}),window.addEventListener("resize",f))}function k(){typeof window>"u"||!a.value||(a.value=!1,window.removeEventListener("scroll",f),window.removeEventListener("resize",f))}return t.watch(()=>o.isOpen,E=>{E?b():k()},{immediate:!0}),t.onMounted(()=>{o.isOpen&&b()}),t.onBeforeUnmount(()=>{k()}),(E,N)=>l.value&&e.actionKey?(t.openBlock(),t.createElementBlock("div",{key:0,class:"relative inline-flex","data-action-key":e.actionKey,ref_key:"anchorRef",ref:r},[t.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:t.withModifiers(c,["stop"])},[...N[1]||(N[1]=[t.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"},[t.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),t.createElementVNode("circle",{cx:"12",cy:"5",r:"1"}),t.createElementVNode("circle",{cx:"12",cy:"19",r:"1"})],-1)])]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.isOpen?(t.openBlock(),t.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:t.normalizeStyle(p.value),onClick:N[0]||(N[0]=t.withModifiers(()=>{},["stop"]))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.actions,w=>(t.openBlock(),t.createElementBlock("button",{key:w.type,type:"button",class:t.normalizeClass(["flex w-full items-center gap-2 px-4 py-2 text-sm transition-colors",w.variant==="danger"?"text-red-600 hover:bg-red-50":"text-gray-700 hover:bg-gray-50"]),onClick:S=>u(w)},[t.renderSlot(E.$slots,"icon",{action:w},()=>[w.type==="view"?(t.openBlock(),t.createElementBlock("svg",Ed,[...N[2]||(N[2]=[t.createElementVNode("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"},null,-1),t.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)])])):w.type==="edit"?(t.openBlock(),t.createElementBlock("svg",xd,[...N[3]||(N[3]=[t.createElementVNode("path",{d:"M18 2a2.828 2.828 0 1 1 4 4L7 21l-4 1 1-4Z"},null,-1)])])):w.type==="delete"?(t.openBlock(),t.createElementBlock("svg",wd,[...N[4]||(N[4]=[t.createElementVNode("path",{d:"M3 6h18"},null,-1),t.createElementVNode("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"},null,-1),t.createElementVNode("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"},null,-1),t.createElementVNode("line",{x1:"10",x2:"10",y1:"11",y2:"17"},null,-1),t.createElementVNode("line",{x1:"14",x2:"14",y1:"11",y2:"17"},null,-1)])])):(t.openBlock(),t.createElementBlock("svg",Nd,[...N[5]||(N[5]=[t.createElementVNode("path",{d:"M12 8v8"},null,-1),t.createElementVNode("path",{d:"M8 12h8"},null,-1)])]))]),t.createTextVNode(" "+t.toDisplayString(w.label),1)],10,kd))),128))],4)):t.createCommentVNode("",!0)]))],8,bd)):t.createCommentVNode("",!0)}}),$s=typeof window<"u",Ds=typeof document<"u";function Sd(e){if(!Ds)throw new Error("Tooltip requires document to be defined");const n=document.createElement("div");return n.className="fixed z-[9999] p-2 bg-gray-900 text-white text-xs rounded-lg shadow-lg pointer-events-none transition-opacity duration-150",n.style.opacity="0",n.style.visibility="hidden",n.style.maxWidth="240px",n.style.whiteSpace="normal",n.style.wordBreak="break-word",document.body.appendChild(n),n}function Ls(e){if(!e)return null;if(typeof e=="string"){const o=e.trim();return o?{text:o,wrap:!0}:null}const n=typeof e.text=="string"&&e.text.trim()?e.text.trim():void 0;return n?{text:n,wrap:e.wrap!==!1}:null}function Yn(e,n){if(!Ds||!$s)return;const o=Sd(n.wrap),s={options:n,tooltipEl:o,show:r=>{if(!s.options.text||!$s)return;o.textContent=s.options.text;const i=(r.currentTarget??e).getBoundingClientRect(),a=o.getBoundingClientRect(),c=window.innerWidth-a.width-12,u=Math.max(12,Math.min(i.left,c));o.style.left=`${u}px`,o.style.top=`${i.bottom+4}px`,o.style.opacity="1",o.style.visibility="visible"},hide:()=>{o.style.opacity="0",o.style.visibility="hidden"}};e.addEventListener("mouseenter",s.show),e.addEventListener("mouseleave",s.hide),e.addEventListener("focus",s.show),e.addEventListener("blur",s.hide),e.__tooltipState__=s}function Xn(e){const n=e.__tooltipState__;n&&(e.removeEventListener("mouseenter",n.show),e.removeEventListener("mouseleave",n.hide),e.removeEventListener("focus",n.show),e.removeEventListener("blur",n.hide),n.tooltipEl.remove(),delete e.__tooltipState__)}const _d={mounted(e,n){const o=Ls(n.value);o&&Yn(e,o)},updated(e,n){const o=Ls(n.value),s=e;if(!o){Xn(s);return}const r=s.__tooltipState__;if(!r){Yn(s,o);return}if(r.options.wrap!==o.wrap){Xn(s),Yn(s,o);return}r.options=o},unmounted(e){Xn(e)}},Bd={class:"flex flex-col gap-4 mb-[15px]"},Td={class:"flex flex-wrap items-center gap-4"},$d={class:"relative"},Dd={class:"ml-auto flex items-center gap-2"},Ld={class:"overflow-x-auto"},Od={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"},Ad={class:"text-left font-medium text-gray-700"},Id={key:0,class:"py-2 pr-4 min-w-[80px] max-w-[120px] text-right"},Md={class:"divide-y divide-gray-200"},Rd=["href"],Pd={key:2},Fd={key:3},jd={key:0,class:"py-2 pr-4 text-right"},zd={key:0},Hd={key:0},Ud=["colspan"],Os=t.defineComponent({__name:"TableWidget",props:{name:{},label:{},component:{},path:{},slot:{},col:{},width:{},html:{},title:{},type:{},token:{},count:{},props:{},items:{}},setup(e){const n=t.getCurrentInstance(),o=t.ref([]),s=t.ref([]),r=_d,l=e,i=t.ref([]),a=t.ref(""),c=t.ref(""),u=t.ref(""),p=t.ref(1),f=t.ref(10),b=t.ref(0),k=t.ref(0),E=t.ref("id"),N=t.ref("");let w=null,S=0;const I=t.ref(null);async function B(){const d=p.value,m=++S,h=new URLSearchParams,v=u.value.trim();v&&h.set("search",v),h.set("page",String(d)),h.set("limit",String(f.value));const O=`/api/data/${l.token}${h.toString()?`?${h.toString()}`:""}`;let D;try{const ie=await fetch(O);if(!ie.ok)throw new Error(`Request failed with status ${ie.status}`);D=await ie.json()}catch(ie){m===S&&(o.value=[],k.value=0,b.value=0),console.error("Failed to load table data",ie);return}if(m!==S)return;o.value=Array.isArray(D?.rows)?D.rows:[],s.value=C(D?.columns||[]),i.value=Array.isArray(D?.actions)?D.actions:[],a.value=D?.form,c.value=D?.addToken,E.value=typeof D?.pk=="string"&&D.pk?D.pk:E.value,typeof D?.form=="string"&&D.form&&(N.value=D.form.replace(/\.form$/,".table")),Be();const R=Number(D?.total??D?.count??D?.totalCount),P=Number(D?.filtered??D?.filteredCount);b.value=Number.isFinite(R)&&R>0?R:o.value.length,k.value=Number.isFinite(P)&&P>0?P:Math.max(o.value.length,b.value);const he=Math.max(1,Math.ceil((k.value||o.value.length||1)/f.value));let ge=d;typeof D?.page=="number"&&D.page>0&&(ge=D.page),ge>he&&(ge=he),ge<1&&(ge=1);const nn=ge!==d;if(p.value=ge,nn&&k.value>0)return B()}const{$notify:L,$confirm:_,$form:H}=n?.appContext?.config?.globalProperties||{};function K(){if(We.emitter?.emit){We.emitter.emit("updateCard");return}if(typeof window<"u"&&typeof window.location?.reload=="function"){window.location.reload();return}B()}async function M(d){typeof H=="function"&&(await H({token:d.token}),K())}async function A(){typeof H=="function"&&(await H({token:c.value}),K())}function F(d){_({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const m=await fetch(`/api/table/${d.token}`,{method:"DELETE"});if(!m.ok){const{error:h}=await m.json();L({title:"Помилка",type:"warning",message:h});return}L({title:"Видаленно",message:"Успішно видалено"}),await B()}})}t.onMounted(async()=>{await B(),We.emitter?.on?.("updateCard",B)}),t.onBeforeUnmount(()=>{We.emitter?.off?.("updateCard",B)});function j(d){return typeof d?.format=="string"?d.format.toLowerCase():""}function C(d){const m=new Map;s.value.forEach(v=>{v?.name&&m.set(v.name,!!v.hidden)});const h=d.map(v=>{const O=m.has(v.name)?m.get(v.name):!!v.hidden;return{...v,hidden:O}});return h.length&&!h.some(v=>!v.hidden)&&(h[0].hidden=!1),h}const T=t.computed(()=>{const d=s.value.filter(m=>!m.hidden);return d.length?d:s.value}),x=t.computed(()=>{const d=[],m=new Set;for(const h of i.value){if(typeof h=="string"){if(h==="view"){const v="row:view";m.has(v)||(d.push({key:v,type:"view",label:"Переглянути",scope:"row",handler:lo}),m.add(v));continue}if(h==="edit"){const v="row:edit";m.has(v)||(d.push({key:v,type:"edit",label:"Редагувати",scope:"row",handler:yt}),m.add(v));continue}if(h==="delete"||h==="del"){const v="row:delete";m.has(v)||(d.push({key:v,type:"delete",label:"Видалити",scope:"row",handler:no,variant:"danger"}),m.add(v));continue}if(h==="add"){const v="toolbar:add";m.has(v)||(d.push({key:v,type:"add",label:"Додати",scope:"toolbar"}),m.add(v))}continue}if(h&&typeof h=="object"){const v=String(h.name??h.type??"action"),O=String(h.label??h.title??v),D=h.scope==="toolbar"?"toolbar":"row",R=`${D}:${v}`;if(m.has(R))continue;m.add(R),d.push({key:R,type:v,label:O,scope:D,handler:D==="row"?P=>oo(h,P):void 0,variant:h.variant==="danger"?"danger":"default",original:h})}}return d}),$=t.computed(()=>x.value.filter(d=>d.scope==="row"&&typeof d.handler=="function")),J=t.computed(()=>x.value.filter(d=>d.scope==="toolbar")),le=t.computed(()=>$.value.length>0),Ie=t.computed(()=>J.value.some(d=>d.type==="add")),_e=t.computed(()=>o.value),ke=t.computed(()=>{const d=k.value||_e.value.length,m=Math.ceil(d/f.value);return m>0?m:1}),xe=t.computed(()=>{const d=_e.value.length,m=k.value||d,h=b.value||m;return`Показано ${d} з ${m} (усього ${h})`});function we(){p.value<ke.value&&(p.value+=1,B())}function Qn(){p.value>1&&(p.value-=1,B())}t.watch(s,d=>{d?.length&&(d.some(m=>!m.hidden)||(d[0].hidden=!1))},{deep:!0});function Vn(){w&&clearTimeout(w),Be(),w=setTimeout(()=>{p.value=1,B()},300)}function ht(d){const m=E.value||"id",h=d?.token??d?.[m]??d?.id;return h?String(h):""}function Zt(d){const m=T.value[d],h=["py-2",...gt(m)];d===0&&h.push("pl-4");const v=d===T.value.length-1&&!le.value;return h.push(v?"pr-4":"pr-5"),h.join(" ")}function Yt(d,m){const h=["py-2",...gt(m)];j(m)==="badge"&&h.push("center"),et(m)==="wrap"?h.push("whitespace-normal","break-words"):h.push("truncate"),d===0&&h.push("pl-4");const v=d===T.value.length-1&&!le.value;return h.push(v?"pr-4":"pr-5"),h.join(" ")}function et(d){return(typeof d?.overflow=="string"?d.overflow.toLowerCase():"")==="wrap"?"wrap":"clip"}function gt(d){const m=[],h=R=>{if(R==null||R==="")return;const P=Number(R);return Number.isFinite(P)&&P>0?`${P}px`:String(R).replace(/\s+/g,"")},v=h(d?.width),O=h(d?.minWidth),D=h(d?.maxWidth);return v?(m.push(`min-w-[${v}]`,`max-w-[${v}]`),m):(m.push(`min-w-[${O??"100px"}]`),m.push(`max-w-[${D??"350px"}]`),m)}function Xt(d){if(!$.value.length)return!1;const m=E.value||"id";return!!(d?.token||d?.[m]||d?.id)}function eo(d){return I.value===ht(d)}function to(d){const m=ht(d);m&&(I.value=I.value===m?null:m)}function Be(){I.value=null}function Qt(d,m){const h=m?.tooltip;if(!h)return;const v=y(d,m);let O,D=m?.tooltipWrap!==!1;if(typeof h=="string"){const R=h.trim();if(!R)return;const P=R.toLowerCase();if(["true","1","yes"].includes(P))O=typeof v=="string"?v:String(v??"");else{if(["false","0","no"].includes(P))return;O=R}}else h===!0?O=v:typeof h=="object"&&(typeof h.text=="string"&&(O=h.text.trim()),typeof h.wrap=="boolean"&&(D=h.wrap!==!1));if(!O){if(v==null||v==="")return;O=String(v)}if(O.trim())return D?{text:O,wrap:!0}:O}function yt(d){Be(),M(d)}function no(d){Be(),F(d)}async function oo(d,m){Be();const h=E.value||"id",v=d.isId?m?.[h]??m?.id:m?.token??m?.[h]??m?.id;if(!v){console.warn("Cannot execute action without identifier",d);return}if(d.form&&typeof d.api=="string"&&d.api&&typeof H=="function"){await ro(d,m,v);return}if(d.form&&typeof H=="function"){const O=await vt(d.form,v),D={form:d.form,token:O?.token??m?.token??v,schema:O?.schema,mode:O?.mode??"edit"};O?.data!==void 0&&(D.defaultValue=O.data);try{await H(D),K()}catch(R){console.error("Failed to execute form action",R)}return}if(typeof d.api=="string"&&d.api){const O=qe(d.api,v);window.location.href=O;return}m?.token&&typeof H=="function"&&(await H({token:m.token}),K())}function qe(d,m){return`${d.endsWith("/")?d:`${d}/`}${m}`}async function vt(d,m){const h=`/api/form/${d}/${m}`;try{const v=await fetch(h);if(!v.ok)throw new Error(`Request failed with status ${v.status}`);return await v.json()}catch(v){console.error("Failed to load form config",v),L({title:"Помилка",type:"warning",message:"Не вдалося отримати дані форми."});return}}async function bt(d){const m=`/api/template/form/${d}`;try{const h=await fetch(m);if(!h.ok)throw new Error(`Request failed with status ${h.status}`);return(await h.json())?.schema}catch(h){console.error("Failed to load form template",h);return}}function so(d){if(d!=null){if(d?.data!==void 0)return d.data;if(d?.defaultValue!==void 0)return d.defaultValue;if(d?.values!==void 0)return d.values;if(typeof d=="object"&&!Array.isArray(d)){const{schema:m,token:h,mode:v,message:O,successMessage:D,...R}=d;if(Object.keys(R).length)return R}}}async function ro(d,m,h){const v=qe(d.api,h),O=(typeof d.method=="string"?d.method:"PUT").toUpperCase();let D;try{const ie=await fetch(v);if(!ie.ok)throw new Error(`Request failed with status ${ie.status}`);D=await ie.json()}catch(ie){console.error("Failed to load action data",ie),en("Не вдалося отримати дані форми.");return}const R=typeof d.form=="string"?d.form.replace(/\.table$/,".form"):void 0,P=D?.schema??(R?await bt(R):void 0),he={mode:D?.mode??"edit"};R&&(he.form=R),P&&(he.schema=P);const ge=so(D);ge!==void 0&&(he.defaultValue=ge);const nn=await H(he);if(nn)try{const ie=await fetch(v,{method:O,headers:{"Content-Type":"application/json"},body:JSON.stringify(nn)});if(!ie.ok){const Ps=await Vt(ie),Ap=Ps?.error??Ps?.message??"Не вдалося зберегти дані.";throw new Error(Ap)}io(`Дані успішно ${he.value==="add"?"збережено":"оновлено"}`),K()}catch(ie){console.error("Failed to submit action data",ie),en("Не вдалося зберегти дані.")}}async function Vt(d){try{return await d.json()}catch{return}}function en(d){L({title:"Помилка",type:"error",message:d})}function io(d){L({title:"Успіх",type:"success",message:d})}function lo(d){Be();const m=N.value||(a.value?String(a.value).replace(/\.form$/,".table"):""),h=E.value||"id",v=d?.[h]??d?.id??d?.token;if(m&&v){const O=`/card/${m}/${v}`;window.location.href=O;return}if(d?.token&&typeof H=="function"){H({token:d.token,readonly:!0,mode:"view"});return}d?.token&&M(d)}function tn(d){if(!I.value)return;const m=d.target;if(!m)return;const h=m.closest("[data-action-key]");h&&h.getAttribute("data-action-key")===I.value||Be()}t.onMounted(()=>{document.addEventListener("click",tn,!0)}),t.onBeforeUnmount(()=>{w&&clearTimeout(w),document.removeEventListener("click",tn,!0),We.emitter?.off?.("updateCard",B)});function kt(d,m){const v=d?.[`${m.name}_text`];if(Array.isArray(v))return v.length?v.join(", "):"-";if(v!=null&&v!=="")return v;const O=d?.[m.name];return Array.isArray(O)?O.length?O.join(", "):"-":O??"-"}function Et(d,m){const v=d?.[`${m.name}_data`];if(v&&typeof v=="object")return{text:v.text??v.label??v.name??v.title??"-",color:v.color,textColor:v.textColor};const O=d?.[`${m.name}_text`]??d?.[m.name];return{text:(Array.isArray(O)?O.join(", "):O)??"-"}}function g(d,m){const h=Et(d,m);return h.color?{backgroundColor:h.color,color:h.textColor??"#ffffff"}:{}}function y(d,m){const h=j(m);if(h==="badge")return Et(d,m).text;if(h==="select")return kt(d,m);if(h==="slot")return"-";if(h==="text")return d?.[m.name]??"-";const v=d?.[`${m.name}_data`];return v!=null&&typeof v!="object"?v:d?.[`${m.name}_text`]??d?.[m.name]??"-"}return(d,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Bd,[t.createElementVNode("div",Td,[t.createElementVNode("div",$d,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":m[0]||(m[0]=h=>u.value=h),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:Vn},null,544),[[t.vModelText,u.value]])]),t.createElementVNode("div",Dd,[t.createVNode(vd,{columns:s.value,"onUpdate:columns":m[1]||(m[1]=h=>s.value=h)},null,8,["columns"]),Ie.value&&c.value?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",onClick:A,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":"Додати запис"},[...m[2]||(m[2]=[t.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"},[t.createElementVNode("path",{d:"M5 12h14"}),t.createElementVNode("path",{d:"M12 5v14"})],-1)])])):t.createCommentVNode("",!0)])])]),t.createElementVNode("div",Ld,[t.createElementVNode("table",Od,[t.createElementVNode("thead",Ad,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(T.value,(h,v)=>(t.openBlock(),t.createElementBlock("th",{key:h.name,class:t.normalizeClass(Zt(v))},t.toDisplayString(h.ua),3))),128)),le.value?(t.openBlock(),t.createElementBlock("th",Id," Дії ")):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",Md,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_e.value,h=>(t.openBlock(),t.createElementBlock("tr",{class:"bg-white odd:bg-gray-50",key:h.id??JSON.stringify(h)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(T.value,(v,O)=>t.withDirectives((t.openBlock(),t.createElementBlock("td",{key:v.name,class:t.normalizeClass(Yt(O,v))},[v.link?(t.openBlock(),t.createElementBlock("a",{key:0,href:v.link.replace("{{id}}",h.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"},t.toDisplayString(y(h,v)),9,Rd)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[j(v)==="slot"&&v.slot?.content?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(od)(v.slot.content)),{key:0,data:h,row:h,column:v,value:h?.[v.name]},null,8,["data","row","column","value"])):j(v)==="badge"?(t.openBlock(),t.createElementBlock("span",{key:1,class:"items-center px-2 py-1 rounded-full text-xs font-semibold text-center justify-center flex",style:t.normalizeStyle(g(h,v))},t.toDisplayString(Et(h,v).text),5)):j(v)==="select"?(t.openBlock(),t.createElementBlock("span",Pd,t.toDisplayString(kt(h,v)),1)):(t.openBlock(),t.createElementBlock("span",Fd,t.toDisplayString(y(h,v)),1))],64))],2)),[[t.unref(r),Qt(h,v)]])),128)),le.value?(t.openBlock(),t.createElementBlock("td",jd,[Xt(h)?(t.openBlock(),t.createElementBlock("div",zd,[t.createVNode(Cd,{row:h,actions:$.value,"is-open":eo(h),"action-key":ht(h),onToggle:v=>to(h)},null,8,["row","actions","is-open","action-key","onToggle"])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)]))),128)),_e.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",Hd,[t.createElementVNode("td",{colspan:T.value.length+(le.value?1:0),class:"py-6 text-center text-gray-500"}," Немає записів для відображення ",8,Ud)]))])])]),t.createVNode(cd,{"current-page":p.value,"total-pages":ke.value,label:xe.value,onPrevious:Qn,onNext:we},null,8,["current-page","total-pages","label"])]))}}),qd={class:"p-[20px]"},Wd={class:"flex gap-[6px] mb-5"},Kd={class:"vs-form-text relative bg-white rounded-lg flex-grow"},Gd={class:"grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5 grid-cols-6"},Jd={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},Zd={class:"space-y-8"},Yd={key:0},Xd={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Qd=["onClick"],Vd={class:"md:col-span-2"},ep={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},tp={class:"text-sm text-gray-500 dark:text-neutral-500"},np={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},op=["checked","onChange"],sp={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},rp={class:"md:col-span-2"},ip={class:"font-semibold text-gray-800 dark:text-neutral-200"},lp=["onClick"],ap={class:"md:col-span-2"},cp={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},dp={class:"text-sm text-gray-500 dark:text-neutral-500"},pp={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},fp=["checked","onChange"],Gt=t.defineComponent({__name:"GroupInterfaceWidget",props:{data:{},id:{}},setup(e){const n=e,o=t.ref(""),s=["view","add","edit","del"],r=t.ref({});t.onMounted(async()=>{const N=await(await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`)).json();N.routes&&N.routes.forEach(w=>{r.value[w.path]=new Set(w.actions)})});const l=(E,N)=>r.value[E]?.has(N)??!1,i=(E,N)=>{r.value[E]||(r.value[E]=new Set),r.value[E].has(N)?r.value[E].delete(N):r.value[E].add(N)},a=(E,N)=>{E.forEach(w=>{w.path&&(r.value[w.path]||(r.value[w.path]=new Set),r.value[w.path].has(N)?r.value[w.path].delete(N):r.value[w.path].add(N))})},c=t.computed(()=>Object.entries(r.value).map(([E,N])=>({path:E,actions:Array.from(N)})).filter(E=>E.actions.length)),u=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})}),We.notify({title:"Success!",message:"Permissions saved."})},p=()=>{r.value={}},f=E=>{if(!o.value.trim())return E;const N=o.value.toLowerCase();return E.filter(w=>w.ua.toLowerCase().includes(N)||w.path&&w.path.toLowerCase().includes(N))},b=t.computed(()=>f(n.data.routers.filter(E=>!E.menu))),k=t.computed(()=>n.data.routers.filter(E=>E.menu).map(E=>({...E,menu:f(E.menu||[])})).filter(E=>E.menu&&E.menu.length>0));return(E,N)=>(t.openBlock(),t.createElementBlock("div",qd,[t.createElementVNode("div",Wd,[t.createElementVNode("div",Kd,[N[1]||(N[1]=t.createElementVNode("i",{class:"absolute bottom-2/4 translate-y-2/4 text-gray-500 cursor-pointer ti"},null,-1)),t.withDirectives(t.createElementVNode("input",{type:"text",placeholder:"Пошук","onUpdate:modelValue":N[0]||(N[0]=w=>o.value=w),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),[[t.vModelText,o.value]])]),t.createElementVNode("button",{onClick:p,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"}," Скинути всі "),t.createElementVNode("button",{onClick:u,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"}," Зберегти ")]),t.createElementVNode("div",Gd,[N[2]||(N[2]=t.createElementVNode("div",{class:"self-center col-span-2"},[t.createElementVNode("h2",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Групи")],-1)),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(s,(w,S)=>t.createElementVNode("div",{class:"col-span-1 text-center",key:S},[t.createElementVNode("h3",Jd,t.toDisplayString(w),1)])),64))]),t.createElementVNode("div",Zd,[b.value.length?(t.openBlock(),t.createElementBlock("div",Yd,[t.createElementVNode("ul",Xd,[N[3]||(N[3]=t.createElementVNode("li",{class:"md:col-span-2"},[t.createElementVNode("h3",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Без категорії")],-1)),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(s,(w,S)=>t.createElementVNode("li",{key:S,class:"md:block md:col-span-1 md:text-center"},[t.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:I=>a(b.value,s[S])}," Toggle all ",8,Qd)])),64))]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,(w,S)=>(t.openBlock(),t.createElementBlock("ul",{key:"uncat-"+S,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[t.createElementVNode("li",Vd,[t.createElementVNode("p",ep,t.toDisplayString(w.ua),1),t.createElementVNode("p",tp,t.toDisplayString(w.path),1)]),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(s,(I,B)=>t.createElementVNode("li",{key:B,class:"col-span-1"},[t.createElementVNode("div",np,[t.createElementVNode("input",{type:"checkbox",checked:l(w.path,I),onChange:L=>i(w.path,I),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,op)])])),64))]))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,(w,S)=>(t.openBlock(),t.createElementBlock("div",{key:S,class:"space-y-5"},[t.createElementVNode("ul",sp,[t.createElementVNode("li",rp,[t.createElementVNode("h3",ip,t.toDisplayString(w.ua),1)]),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(s,(I,B)=>t.createElementVNode("li",{key:B,class:"md:block md:col-span-1 md:text-center"},[t.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:L=>a(w.menu,s[B])}," Toggle all ",8,lp)])),64))]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.menu,(I,B)=>(t.openBlock(),t.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"},[t.createElementVNode("li",ap,[t.createElementVNode("p",cp,t.toDisplayString(I.ua),1),t.createElementVNode("p",dp,t.toDisplayString(I.path),1)]),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(s,(L,_)=>t.createElementVNode("li",{key:_,class:"col-span-1"},[t.createElementVNode("div",pp,[t.createElementVNode("input",{type:"checkbox",checked:l(I.path,L),onChange:H=>i(I.path,L),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,fp)])])),64))]))),128))]))),128))])]))}}),Ue={"vs-widget-map":_t,"vs-widget-comments":wt,"vs-widget-history":Nt,"vs-widget-gallery":St,"vs-widget-file":Ct,"vs-widget-list":an,"vs-widget-table":Os,"vs-group-interface":Gt};function As(e){if(e==null)return null;const n=Number(e);return Number.isFinite(n)?Math.max(1,Math.min(12,Math.floor(n))):null}function Is(e){const n={...e};return Array.isArray(e.items)&&(n.items=e.items.map(o=>Is(o))),n}function mp(e,n=12){if(!e.length)return;const o=[],s=[];e.forEach(c=>{const u=As(c.col);u?(c.col=u,o.push({item:c,span:u})):s.push(c)});const r=o.reduce((c,u)=>c+u.span,0);let l=n-r;if(s.length===0)return;l<=0&&(l=n);const i=Math.max(1,Math.floor(l/s.length));let a=Math.max(0,l-i*s.length);s.forEach(c=>{let u=i;a>0&&(u+=1,a-=1),c.col=Math.max(1,Math.min(12,u))})}function Jt(e,n=12){if(!Array.isArray(e)||!e.length)return[];const o=e.map(s=>Is(s));return o.forEach(s=>{Array.isArray(s.items)&&s.items.length&&(s.items=Jt(s.items,12))}),mp(o,n),o}function Ms(e){const n=As(e);return n?n>=12?["md:col-span-12","lg:col-span-12"]:[`md:col-span-${n}`,`lg:col-span-${n}`]:[]}const up={class:"text-lg font-semibold text-gray-900"},hp=["innerHTML"],gp={key:0,class:"grid grid-cols-12 gap-4"},yp={key:0,class:"mb-4 pb-2 border-b border-gray-200"},vp={class:"text-lg font-semibold text-gray-900"},bp=["innerHTML"],mt=t.defineComponent({__name:"CardItem",props:{items:{},type:{},col:{},data:{},html:{},title:{},hideTitle:{type:Boolean},styling:{},name:{},label:{},component:{},slot:{},id:{},className:{},style:{}},setup(e){const n=e,o=t.computed(()=>{if(!n.col)return{};const u=Math.max(1,Math.min(12,Number(n.col)));return{[`md:col-span-${u}`]:!0,[`lg:col-span-${u}`]:!0}}),s=t.computed(()=>Jt(n.items));function r(u){const p=["col-span-12"],f=Ms(u.col);return f.length&&p.push(...f),p}function l(u){return Ue[u]||u}function i(u,p){if(!u||typeof p!="string"||!p)return{found:!1,value:void 0};const f=p.split(".");let b=u;for(const k of f){if(b==null||typeof b!="object"&&!Array.isArray(b))return{found:!1,value:void 0};if(!(k in b))return{found:!1,value:void 0};b=b[k]}return{found:!0,value:b}}const a=function(u={}){const p={...u};return Object.entries(p).forEach(([f,b])=>{if(f!=="props"&&typeof b=="string"){const k=i(n.data,b);k.found&&(p[f]=k.value)}}),u.props&&typeof u.props=="object"&&Object.entries(u.props).forEach(([f,b])=>{if(typeof b=="string"){const k=i(n.data,b);p[f]=k.found?k.value:b}else p[f]=b}),delete p.props,p},c=t.computed(()=>{const u={};return n.col&&(u.col=n.col),u});return(u,p)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([[o.value,e.styling?.classItem],"w-full bg-gray-50 rounded-lg p-4 col-span-12"])},[!e.hideTitle&&e.title?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["mb-4 pb-2 border-b border-gray-200",e.styling?.classItemTitle])},[t.createElementVNode("h3",up,t.toDisplayString(e.title),1)],2)):t.createCommentVNode("",!0),e.html?(t.openBlock(),t.createElementBlock("div",{key:1,innerHTML:e.html,class:"text-gray-900 leading-relaxed"},null,8,hp)):e.type?.includes("tabs")?(t.openBlock(),t.createBlock(ut,{key:2,view:e.type,panels:e.items,data:e.data,styling:e.styling},null,8,["view","panels","data","styling"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[s.value.length?(t.openBlock(),t.createElementBlock("div",gp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(f,b)=>(t.openBlock(),t.createElementBlock("div",{key:f.name||f.component||b,class:t.normalizeClass(r(f))},[f.title||f.label?(t.openBlock(),t.createElementBlock("div",yp,[t.createElementVNode("h3",vp,t.toDisplayString(f.title||f.label),1)])):t.createCommentVNode("",!0),f.html?(t.openBlock(),t.createElementBlock("div",{key:1,innerHTML:f.html,class:"text-gray-900 leading-relaxed"},null,8,bp)):f.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l(f.component)),t.mergeProps({key:2,ref_for:!0},{geom:e.data.geom,id:e.data.id,...c.value,...a(f),data:e.data},{class:"w-full"}),null,16)):t.renderSlot(u.$slots,"default",{key:3})],2))),128))])):t.createCommentVNode("",!0)],64))],2))}}),kp={class:"grid grid-cols-12 gap-[20px]"},Ep={key:0,class:"col-span-4"},xp=["innerHTML"],wp=["onClick"],Np=["innerHTML"],Cp={key:1,class:"flex w-full"},Sp={class:"flex flex-col w-56 border-r border-gray-200 bg-gray-50 relative"},_p=["onClick"],Bp={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 transition-all duration-300"},Tp={class:"flex-1 p-4"},$p=["innerHTML"],Dp={class:"grid grid-cols-12 gap-4"},Lp={key:3,class:"w-full h-full"},ut=t.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(e){const n=e;function o(){const C=typeof window<"u"?window:globalThis,T="__vsCardAnonymousCounter__",x=C[T]??0;return C[T]=x+1,x===0?"tab":`tab${x}`}const s=t.ref(0),r=t.ref([]);let l=!1;const i=t.ref(n.id??o());t.watch(()=>n.id,C=>{C&&(i.value=C)});const a=new Map,c=t.computed(()=>n.view==="tabs"||n.view==="vertical-tabs");t.provide("vsCardTabsContext",c);function u(C,T){const x=T?.path;return x?(a.has(x)||a.set(x,t.defineAsyncComponent(()=>import(x))),a.get(x)):typeof C=="string"&&Ue[C]?Ue[C]:T?.component&&Ue[T.component]?Ue[T.component]:T?.name&&Ue[T.name]?Ue[T.name]:C}function p(C){return C.forEach(T=>{T.type&&(T.view=T.type)}),r.value=C.filter(T=>T.type==="pin"),C.filter(T=>T.type!=="pin")}const f=t.computed(()=>{let C;return n.panels&&n.panels.length>0?C=n.normalizeTabs?p(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(C=n.data.filter(x=>x.type.includes("tabs"))[0]?.items),Jt(C,12)}),b=t.computed(()=>i.value),k=t.computed(()=>{let C;return n.panels&&n.panels.length>0?C=n.normalizeTabs?p(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(C=n.data),Jt(C,12)}),E=t.computed(()=>({[`view-${n.view}`]:!0}));function N(C,T){if(!C||typeof T!="string"||!T)return{found:!1,value:void 0};const x=T.split(".");let $=C;for(const J of x){if($==null||typeof $!="object"&&!Array.isArray($))return{found:!1,value:void 0};if(!(J in $))return{found:!1,value:void 0};$=$[J]}return{found:!0,value:$}}const w=C=>{const T={...C};return Object.entries(T).forEach(([x,$])=>{if(x!=="props"&&typeof $=="string"){const J=N(n.data,$);J.found&&(T[x]=J.value)}}),C.props&&typeof C.props=="object"&&Object.entries(C.props).forEach(([x,$])=>{if(typeof $=="string"){const J=N(n.data,$);T[x]=J.found?J.value:$}else T[x]=$}),delete T.props,n.data&&(T.data=n.data),T};function S(C){const T=["col-span-12"],x=Ms(C.col);return x.length&&T.push(...x),T}const I=t.ref([]),B=t.ref([]),L=t.ref([]);function _(C,T){C&&C instanceof HTMLElement&&(I.value[T]=C)}function H(){B.value=I.value.map(C=>C.offsetWidth),L.value=I.value.map(C=>C.offsetLeft)}function K(){if(typeof window>"u")return null;const C=b.value;if(!C)return null;const x=new URL(window.location.href).searchParams.get(C);if(x===null)return null;const $=Number.parseInt(x,10);return Number.isNaN($)?null:$}function M(C){if(typeof window>"u")return;const T=b.value;if(!T)return;const x=new URL(window.location.href);C<=0?x.searchParams.delete(T):x.searchParams.set(T,String(C));const $=window.history.state??{};window.history.replaceState($,document.title,x)}function A(){if(l)return;const C=K();if(C===null||!f.value.length)return;const T=Math.min(Math.max(C,0),f.value.length-1);T!==C&&M(T),T!==s.value&&(s.value=T),l=!0}function F(){l=!1,A()}let j=null;return t.onMounted(()=>{t.nextTick(()=>{A(),H()}),typeof window<"u"&&window.addEventListener("popstate",F),j=new ResizeObserver(()=>H()),j.observe(document.body)}),t.onBeforeUnmount(()=>{j?.disconnect(),typeof window<"u"&&window.removeEventListener("popstate",F)}),t.watch(s,C=>{t.nextTick(()=>{H()}),M(C)}),t.watch(f,()=>{l=!1,A()}),(C,T)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classWrapper||E.value)},[t.createElementVNode("div",kp,[r.value.length!==0?(t.openBlock(),t.createElementBlock("div",Ep,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value[0].items,(x,$)=>(t.openBlock(),t.createElementBlock("div",{key:x.name||$,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 m-1 mb-3"},[x.html?(t.openBlock(),t.createElementBlock("div",{key:0,innerHTML:x.html,class:"text-gray-900 leading-relaxed"},null,8,xp)):x.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(x.component,x)),t.mergeProps({key:1,ref_for:!0},x.component==="Card"?x:w(x),{id:e.data.id,class:["w-full h-full",e.styling?.classItem]}),null,16,["id","class"])):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(r.value.length!==0?"col-span-8":"col-span-12")},[e.view==="tabs"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["overflow-hidden w-full",e.styling?.classTabWrapper])},[t.createElementVNode("div",{class:t.normalizeClass(["flex border-b border-gray-200 bg-gray-50 relative gap-4 my-6",e.styling?.classTabHeader])},[B.value.length?(t.openBlock(),t.createElementBlock("div",{key:0,class:"absolute bottom-0 h-[2px] bg-blue-600 transition-all duration-300",style:t.normalizeStyle({width:B.value[s.value]+"px",left:L.value[s.value]+"px"})},null,4)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.value,(x,$)=>(t.openBlock(),t.createElementBlock("button",{key:x.name||$,ref_for:!0,ref:J=>_(J,$),onClick:J=>s.value=$,class:t.normalizeClass(["px-1 py-2 text-sm font-medium transition-colors",s.value===$?"text-blue-600 border-blue-600 border-b-2 ":"text-gray-600 hover:text-gray-800"])},t.toDisplayString(x.title||x.label||x.name||`Tab ${$+1}`),11,wp))),128))],2),t.createElementVNode("div",{class:t.normalizeClass([e.styling?.classTabContent,"p-1"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.value,(x,$)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:x.name||$,class:t.normalizeClass(["transition-all duration-300 ease-in-out",s.value===$?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",e.classPanel||"w-full border-gray-100"])},[x.html?(t.openBlock(),t.createElementBlock("div",{key:0,innerHTML:x.html,class:"text-gray-900 leading-relaxed"},null,8,Np)):C.$slots[`tab-${$}`]?t.renderSlot(C.$slots,`tab-${$}`,{key:1,item:x,data:e.data}):x.items?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(mt),t.mergeProps({key:2,ref_for:!0},w(x),{items:x.items,"hide-title":!0,class:["w-full h-full",e.styling?.classItem],styling:e.styling}),null,16,["items","class","styling"])):x.component||x.name?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(x.component||x.name,x)),t.mergeProps({key:3,ref_for:!0},x.component==="Card"?x:w(x),{styling:e.styling,id:e.data.id,class:["w-full h-full",e.styling?.classItem]}),null,16,["styling","id","class"])):t.renderSlot(C.$slots,x.slot||`tab-${$}`,{key:4,item:x,data:e.data})],2)),[[t.vShow,s.value===$]])),128))],2)],2)):e.view==="vertical-tabs"?(t.openBlock(),t.createElementBlock("div",Cp,[t.createElementVNode("div",Sp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.value,(x,$)=>(t.openBlock(),t.createElementBlock("button",{key:x.name||$,onClick:J=>s.value=$,class:t.normalizeClass(["relative px-1 py-4 text-sm font-medium text-left transition-colors duration-300",s.value===$?"text-blue-600 bg-white":"text-gray-600 hover:text-gray-800 hover:bg-gray-100"])},[t.createTextVNode(t.toDisplayString(x.title||x.label||x.name||`Tab ${$+1}`)+" ",1),s.value===$?(t.openBlock(),t.createElementBlock("span",Bp,[...T[0]||(T[0]=[t.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"},[t.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)])])):t.createCommentVNode("",!0)],10,_p))),128))]),t.createElementVNode("div",Tp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.value,(x,$)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:x.name||$,class:t.normalizeClass(["transition-all duration-300 ease-in-out",s.value===$?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",e.classPanel||"w-full border-gray-100 py-2"])},[x.html?(t.openBlock(),t.createElementBlock("div",{key:0,innerHTML:x.html,class:"text-gray-900 leading-relaxed"},null,8,$p)):C.$slots[`tab-${$}`]?t.renderSlot(C.$slots,`tab-${$}`,{key:1,item:x,data:e.data}):x.items?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(mt),t.mergeProps({key:2,ref_for:!0},w(x),{items:x.items,"hide-title":!0,class:["w-full h-full",e.styling?.classItem],styling:e.styling}),null,16,["items","class","styling"])):x.component||x.name?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(x.component||x.name,x)),t.mergeProps({key:3,ref_for:!0},x.component==="Card"?x:w(x),{id:e.data.id,class:["w-full h-full",e.styling?.classItem]}),null,16,["id","class"])):t.renderSlot(C.$slots,x.slot||`tab-${$}`,{key:4,item:x,data:e.data})],2)),[[t.vShow,s.value===$]])),128))])])):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.styling?.classPlain||"p-1 w-full")},[t.createElementVNode("div",Dp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,(x,$)=>(t.openBlock(),t.createElementBlock("div",{key:x.name||x.component||$,class:t.normalizeClass(S(x))},[C.$slots[`panel-${$}`]?t.renderSlot(C.$slots,`panel-${$}`,{key:0,item:x,data:e.data}):x.items||x.html?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(mt),t.mergeProps({key:1,ref_for:!0},w(x),{items:x.items||[],class:["w-full h-full",e.styling?.classItem],styling:e.styling}),null,16,["items","class","styling"])):x.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(x.component,x)),t.mergeProps({key:2,ref_for:!0},w(x),{class:["w-full h-full",[e.styling?.classItem]],styling:e.styling}),null,16,["class","styling"])):(t.openBlock(),t.createElementBlock("div",Lp,[t.renderSlot(C.$slots,x.slot||`panel-${$}`,{item:x,data:e.data})]))],2))),128))])],2))],2)])],2))}}),Op=["onClick"],Rs=Me(t.defineComponent({__name:"CopyNotification",setup(e,{expose:n}){const o=t.ref([]);let s=1;const r=()=>{if(o.value.length>=10){const a=o.value[0];clearTimeout(a.timer),o.value.shift()}const i={id:s++,timer:setTimeout(()=>{l(i.id)},1500)};o.value.push(i)},l=i=>{const a=o.value.findIndex(c=>c.id===i);if(a!==-1){const c=o.value[a];clearTimeout(c.timer),o.value.splice(a,1)}};return n({addNotification:r}),t.onUnmounted(()=>{o.value.forEach(i=>{clearTimeout(i.timer)})}),(i,a)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.TransitionGroup,{name:"notification",tag:"div",class:"fixed top-4 right-4 z-50 space-y-2"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,c=>(t.openBlock(),t.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"},[t.createVNode(t.unref(Gs),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),a[0]||(a[0]=t.createElementVNode("div",{class:"flex-1"},[t.createElementVNode("p",{class:"font-medium text-sm"},"Ссылка скопирована!"),t.createElementVNode("p",{class:"text-xs text-green-100 opacity-90"},"Файл добавлен в буфер обмена")],-1)),t.createElementVNode("button",{onClick:u=>l(c.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[t.createVNode(t.unref(rn),{class:"h-4 w-4"})],8,Op)]))),128))]),_:1})]))}}),[["__scopeId","data-v-55903525"]]);ut.install=function(e){e.component("vs-widget-file",Ct),e.component("vs-widget-comments",wt),e.component("vs-widget-history",Nt),e.component("vs-widget-gallery",St),e.component("vs-widget-map",_t),e.component("vs-group-interface",Gt),e.component("CommentsWidget",wt),e.component("HistoryWidget",Nt),e.component("GalleryWidget",St),e.component("FilesWidget",Ct),e.component("MapWidget",_t),e.component("Card",ut),e.component("CardItem",mt),e.component("DescriptionListWidget",an),e.component("CopyNotification",Rs),e.component("GroupInterfaceWidget",Gt)},V.Card=ut,V.CardItem=mt,V.CommentsWidget=wt,V.CopyNotification=Rs,V.DescriptionListWidget=an,V.FilesWidget=Ct,V.GalleryWidget=St,V.GroupInterfaceWidget=Gt,V.HistoryWidget=Nt,V.MapWidget=_t,V.TableWidget=Os,V.default=ut,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|