@opengis/form 0.0.192 → 0.0.194-npm
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-DqCGQjZs.js → index-DGAgz5vJ.js} +788 -788
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +18 -18
- package/dist/src/components/inputs/richtext/vs-input-richtext.vue.d.ts.map +1 -1
- package/dist/src/playground/ai-api-config.d.ts +6 -0
- package/dist/src/playground/ai-api-config.d.ts.map +1 -0
- package/dist/src/playground/ai-schema-openrouter.d.ts +3 -0
- package/dist/src/playground/ai-schema-openrouter.d.ts.map +1 -0
- package/dist/src/playground/playground-schema-prompt.vue.d.ts +7 -0
- package/dist/src/playground/playground-schema-prompt.vue.d.ts.map +1 -0
- package/dist/{vs-richtext-3VVnH57S.js → vs-richtext-BS4M0Znk.js} +486 -465
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ge, ref as D, createElementBlock as v, openBlock as u, Fragment as Ae, createElementVNode as d, createBlock as xe, renderSlot as ft, createVNode as G, unref as
|
|
1
|
+
import { defineComponent as ge, ref as D, createElementBlock as v, openBlock as u, Fragment as Ae, createElementVNode as d, createBlock as xe, renderSlot as ft, createVNode as G, unref as q, Teleport as Kt, createCommentVNode as K, normalizeStyle as Oe, toDisplayString as ce, computed as y, inject as dt, mergeProps as Jt, createTextVNode as nt, normalizeProps as Ml, guardReactiveProps as Ll, onMounted as lt, onUnmounted as fn, normalizeClass as ie, mergeModels as Ue, useModel as Ke, withDirectives as Re, vModelText as at, useAttrs as $a, vModelCheckbox as Sa, resolveDynamicComponent as _t, withCtx as ut, withModifiers as Ee, onBeforeUnmount as It, watch as ve, vModelRadio as Ca, renderList as Be, reactive as Al, getCurrentInstance as Zn, resolveComponent as vt, createSlots as Ma, nextTick as et, watchEffect as Vl, vShow as Pt, Transition as Jn, isRef as Yn, defineAsyncComponent as Mo, createStaticVNode as Dl, useSlots as Lo, withKeys as Ao, toRef as Vo, provide as En } from "vue";
|
|
2
2
|
import { Info as ln, Check as La, Mail as Do, Phone as Io, ChevronRight as To, ChevronLeft as Eo, ChevronDown as pn, ChevronUp as Fo, X as Ct, Clock3 as Po, CalendarDays as Oo, Table as Bo, FileCode as Ro, FileText as Gn, FileArchive as No, Plus as Ot, Trash2 as on, Eye as Aa, Download as Il, Upload as Va, Search as Qn, GripVertical as cn, Pencil as jo, Circle as zo, MapPin as Da, Ruler as Ia, Minimize as Uo, Maximize as Ho, ZoomIn as Wo, LoaderCircle as Ta, Copy as qo } from "lucide-vue-next";
|
|
3
3
|
import { notify as Te, VsModal as el, modal as Ko } from "@opengis/core";
|
|
4
4
|
function kl(e, t, n) {
|
|
@@ -38,7 +38,7 @@ const Ea = /* @__PURE__ */ ge({
|
|
|
38
38
|
onMouseleave: a
|
|
39
39
|
}, [
|
|
40
40
|
ft(i.$slots, "default", {}, () => [
|
|
41
|
-
G(
|
|
41
|
+
G(q(ln), { class: "h-4 w-4 text-gray-400 cursor-help" })
|
|
42
42
|
])
|
|
43
43
|
], 32),
|
|
44
44
|
(u(), xe(Kt, { to: "body" }, [
|
|
@@ -87,10 +87,10 @@ const Ea = /* @__PURE__ */ ge({
|
|
|
87
87
|
}, c = y(() => {
|
|
88
88
|
const f = t.item?.__autoMeta;
|
|
89
89
|
if (!f || f?.source !== "parent-auto" || !f?.parentField) return "";
|
|
90
|
-
const
|
|
91
|
-
return `${r[
|
|
90
|
+
const _ = String(t.item?.__locale || "uk"), x = String(f.parentField), w = i?.value?.[x], b = w?.[`label:${_}`] || (_ !== "uk" ? w?.[_] : void 0) || w?.label || w?.ua || w?.en || x;
|
|
91
|
+
return `${r[_] || r.uk}: ${b}`;
|
|
92
92
|
});
|
|
93
|
-
return (f,
|
|
93
|
+
return (f, _) => (u(), v("div", Zo, [
|
|
94
94
|
l.value ? (u(), v("div", Jo, [
|
|
95
95
|
d("span", Qo, ce(n.value), 1),
|
|
96
96
|
o.value ? (u(), v("span", er, "*")) : K("", !0),
|
|
@@ -136,30 +136,30 @@ const Ea = /* @__PURE__ */ ge({
|
|
|
136
136
|
}, i = y(() => {
|
|
137
137
|
const w = t.item?.__autoMeta;
|
|
138
138
|
if (!w || w?.source !== "parent-auto" || !w?.parentField) return "";
|
|
139
|
-
const b = String(t.item?.__locale || "uk"), m = String(w.parentField),
|
|
139
|
+
const b = String(t.item?.__locale || "uk"), m = String(w.parentField), k = o?.value?.[m], g = k?.[`label:${b}`] || (b !== "uk" ? k?.[b] : void 0) || k?.label || k?.ua || k?.en || m;
|
|
140
140
|
return `${a[b] || a.uk}: ${g}`;
|
|
141
141
|
}), r = y(() => t.columns ?? { container: 12, label: 3 }), c = y(() => {
|
|
142
142
|
const { container: w, label: b } = r.value;
|
|
143
143
|
return !w || w <= 0 ? 0 : Math.min(Math.max(b ?? 0, 0), w) / w;
|
|
144
|
-
}), f = y(() => t.item?.type === "html" || c.value <= 0 ? !1 : !!n.value),
|
|
144
|
+
}), f = y(() => t.item?.type === "html" || c.value <= 0 ? !1 : !!n.value), _ = y(() => {
|
|
145
145
|
if (!f.value) return {};
|
|
146
146
|
const w = `${c.value * 100}%`;
|
|
147
147
|
return { flexBasis: w, maxWidth: w };
|
|
148
|
-
}),
|
|
148
|
+
}), x = y(() => {
|
|
149
149
|
const { container: w, label: b } = r.value;
|
|
150
150
|
if (!w || w <= 0) return {};
|
|
151
151
|
if (t.item?.type === "html") return { flexBasis: "100%", maxWidth: "100%" };
|
|
152
152
|
if (!f.value) return { flexBasis: "100%", maxWidth: "100%" };
|
|
153
153
|
const m = Math.max(w - Math.max(b ?? 0, 0), 0) / w;
|
|
154
154
|
if (!m) return {};
|
|
155
|
-
const
|
|
156
|
-
return { flexBasis:
|
|
155
|
+
const k = `${m * 100}%`;
|
|
156
|
+
return { flexBasis: k, maxWidth: k };
|
|
157
157
|
});
|
|
158
158
|
return (w, b) => (u(), v("div", ar, [
|
|
159
159
|
f.value ? (u(), v("span", {
|
|
160
160
|
key: 0,
|
|
161
161
|
class: "text-sm text-gray-900 font-medium flex shrink-0 items-center gap-1",
|
|
162
|
-
style: Oe(
|
|
162
|
+
style: Oe(_.value)
|
|
163
163
|
}, [
|
|
164
164
|
nt(ce(n.value) + " ", 1),
|
|
165
165
|
w.item?.rules?.includes("required") && n.value ? (u(), v("span", or, "*")) : K("", !0),
|
|
@@ -171,7 +171,7 @@ const Ea = /* @__PURE__ */ ge({
|
|
|
171
171
|
], 4)) : K("", !0),
|
|
172
172
|
d("div", {
|
|
173
173
|
class: "flex-1 min-w-0",
|
|
174
|
-
style: Oe(
|
|
174
|
+
style: Oe(x.value)
|
|
175
175
|
}, [
|
|
176
176
|
ft(w.$slots, "default", Ml(Ll(w.$attrs)))
|
|
177
177
|
], 4),
|
|
@@ -271,7 +271,7 @@ const Ea = /* @__PURE__ */ ge({
|
|
|
271
271
|
inline: cr,
|
|
272
272
|
settings: hr
|
|
273
273
|
};
|
|
274
|
-
function
|
|
274
|
+
function wt(e) {
|
|
275
275
|
return {
|
|
276
276
|
inputClass: y(() => {
|
|
277
277
|
const n = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${e?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
|
|
@@ -297,13 +297,13 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
297
297
|
}),
|
|
298
298
|
emits: ["update:modelValue"],
|
|
299
299
|
setup(e) {
|
|
300
|
-
const t = e, { inputClass: n } =
|
|
300
|
+
const t = e, { inputClass: n } = wt(t.style), l = Ke(e, "modelValue"), o = y(() => !!t.disabled), a = y(() => t.placeholder ?? "");
|
|
301
301
|
return (i, r) => Re((u(), v("input", {
|
|
302
302
|
type: "password",
|
|
303
303
|
"onUpdate:modelValue": r[0] || (r[0] = (c) => l.value = c),
|
|
304
304
|
placeholder: a.value,
|
|
305
305
|
disabled: o.value,
|
|
306
|
-
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [
|
|
306
|
+
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(n), { "!border-red-600": i.error }]]),
|
|
307
307
|
style: {
|
|
308
308
|
border: "1px solid #CFD9E0"
|
|
309
309
|
}
|
|
@@ -329,19 +329,19 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
329
329
|
}),
|
|
330
330
|
emits: ["update:modelValue"],
|
|
331
331
|
setup(e) {
|
|
332
|
-
const t = e, { inputClass: n } =
|
|
332
|
+
const t = e, { inputClass: n } = wt(t.style), l = Ke(e, "modelValue"), o = y(() => !!t.disabled), a = y(() => t.placeholder ?? ""), i = y(() => t.maxlength ?? void 0), r = y(() => t.minlength ?? void 0);
|
|
333
333
|
function c() {
|
|
334
334
|
typeof l.value == "string" && (l.value = l.value.trim());
|
|
335
335
|
}
|
|
336
|
-
return (f,
|
|
336
|
+
return (f, _) => Re((u(), v("input", {
|
|
337
337
|
type: "text",
|
|
338
|
-
"onUpdate:modelValue":
|
|
338
|
+
"onUpdate:modelValue": _[0] || (_[0] = (x) => l.value = x),
|
|
339
339
|
placeholder: a.value,
|
|
340
340
|
disabled: o.value,
|
|
341
341
|
maxlength: i.value,
|
|
342
342
|
minlength: r.value,
|
|
343
343
|
onBlur: c,
|
|
344
|
-
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [f.customClass,
|
|
344
|
+
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [f.customClass, q(n), { "!border-red-600": f.error }]]),
|
|
345
345
|
style: { border: "1px solid #CFD9E0" }
|
|
346
346
|
}, null, 42, kr)), [
|
|
347
347
|
[at, l.value]
|
|
@@ -380,22 +380,22 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
380
380
|
}),
|
|
381
381
|
emits: ["update:modelValue"],
|
|
382
382
|
setup(e) {
|
|
383
|
-
const t = e, { inputClass: n } =
|
|
384
|
-
if (
|
|
385
|
-
const
|
|
383
|
+
const t = e, { inputClass: n } = wt(t.style), l = $a(), o = Ke(e, "modelValue"), a = y(() => !!t.disabled), i = (_) => {
|
|
384
|
+
if (_ == null || _ === "") return;
|
|
385
|
+
const x = typeof _ == "string" ? _.trim().replace(",", ".") : _, w = Number(x);
|
|
386
386
|
return Number.isFinite(w) ? w : void 0;
|
|
387
387
|
}, r = y(() => i(t.min ?? l.min)), c = y(() => i(t.max ?? l.max)), f = y(() => {
|
|
388
388
|
if (t.step !== void 0 && t.step !== null && t.step !== "") return t.step;
|
|
389
|
-
const
|
|
390
|
-
return typeof
|
|
389
|
+
const _ = l.step;
|
|
390
|
+
return typeof _ == "number" || typeof _ == "string" ? _ : "any";
|
|
391
391
|
});
|
|
392
|
-
return (
|
|
392
|
+
return (_, x) => Re((u(), v("input", {
|
|
393
393
|
type: "number",
|
|
394
394
|
step: f.value,
|
|
395
|
-
"onUpdate:modelValue":
|
|
395
|
+
"onUpdate:modelValue": x[0] || (x[0] = (w) => o.value = w),
|
|
396
396
|
placeholder: e.placeholder,
|
|
397
397
|
disabled: a.value,
|
|
398
|
-
class: ie(["py-1.5 px-3 block w-full bg-white", [
|
|
398
|
+
class: ie(["py-1.5 px-3 block w-full bg-white", [q(n)]]),
|
|
399
399
|
style: {
|
|
400
400
|
border: "1px solid #CFD9E0"
|
|
401
401
|
},
|
|
@@ -434,7 +434,7 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
434
434
|
const n = t, l = e, o = y({
|
|
435
435
|
get: () => l.modelValue,
|
|
436
436
|
set: (b) => n("update:modelValue", b)
|
|
437
|
-
}), a = y(() => !!l.disabled), i = y(() => Sn(l.option)), r = y(() => Cn(l.option)), c = y(() => Qt(l.option)), f = y(() => !!(c.value && !i.value && !r.value)),
|
|
437
|
+
}), a = y(() => !!l.disabled), i = y(() => Sn(l.option)), r = y(() => Cn(l.option)), c = y(() => Qt(l.option)), f = y(() => !!(c.value && !i.value && !r.value)), _ = y(() => !!(i.value && c.value)), x = y(() => c.value ? { color: c.value } : void 0), w = y(() => {
|
|
438
438
|
if (!(!i.value || !c.value))
|
|
439
439
|
return {
|
|
440
440
|
backgroundColor: c.value,
|
|
@@ -452,7 +452,7 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
452
452
|
Re(d("input", {
|
|
453
453
|
type: "checkbox",
|
|
454
454
|
value: b.value,
|
|
455
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
455
|
+
"onUpdate:modelValue": m[0] || (m[0] = (k) => o.value = k),
|
|
456
456
|
class: ie(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed": a.value }]),
|
|
457
457
|
id: b.id,
|
|
458
458
|
disabled: a.value
|
|
@@ -466,7 +466,7 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
466
466
|
d("div", {
|
|
467
467
|
class: ie(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [o.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", b.error ? "border-red-600" : ""]])
|
|
468
468
|
}, [
|
|
469
|
-
G(
|
|
469
|
+
G(q(La), { class: "h-4 w-4" })
|
|
470
470
|
], 2),
|
|
471
471
|
b.html ? (u(), v("div", {
|
|
472
472
|
key: 0,
|
|
@@ -478,7 +478,7 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
478
478
|
class: "inline-flex h-3 w-3 rounded-full border border-gray-200",
|
|
479
479
|
style: Oe({ background: c.value })
|
|
480
480
|
}, null, 4)) : K("", !0),
|
|
481
|
-
|
|
481
|
+
_.value ? (u(), v("span", {
|
|
482
482
|
key: 1,
|
|
483
483
|
class: "inline-block h-4 w-4",
|
|
484
484
|
style: Oe(w.value)
|
|
@@ -492,7 +492,7 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
492
492
|
}, null, 8, Vr)) : r.value ? (u(), xe(_t(r.value), {
|
|
493
493
|
key: 3,
|
|
494
494
|
class: "h-4 w-4",
|
|
495
|
-
style: Oe(
|
|
495
|
+
style: Oe(x.value)
|
|
496
496
|
}, null, 8, ["style"])) : K("", !0),
|
|
497
497
|
ft(b.$slots, "default", {}, () => [
|
|
498
498
|
nt(ce(b.label), 1)
|
|
@@ -525,18 +525,18 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
525
525
|
setup(e, { emit: t }) {
|
|
526
526
|
const n = e, l = t, o = y({
|
|
527
527
|
get: () => n.modelValue,
|
|
528
|
-
set: (
|
|
529
|
-
l("update:modelValue",
|
|
528
|
+
set: (k) => {
|
|
529
|
+
l("update:modelValue", k);
|
|
530
530
|
}
|
|
531
531
|
}), a = y(() => Array.isArray(o.value) ? o.value.includes(n.value) : o.value === !0 || o.value === n.value), i = y(() => n.style?.size === "xs" ? "p-1.5 text-xs" : n.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs"), r = y(() => ({
|
|
532
532
|
...n.option ?? {},
|
|
533
533
|
icon: n.option?.icon ?? n.icon,
|
|
534
534
|
imgUrl: n.option?.imgUrl ?? n.imgUrl,
|
|
535
535
|
color: n.option?.color
|
|
536
|
-
})), c = y(() => Sn(r.value)), f = y(() => Cn(r.value)),
|
|
537
|
-
if (!(!c.value || !
|
|
536
|
+
})), c = y(() => Sn(r.value)), f = y(() => Cn(r.value)), _ = y(() => Qt(r.value)), x = y(() => !!(_.value && !c.value && !f.value)), w = y(() => !!(c.value && _.value)), b = y(() => _.value ? { color: _.value } : void 0), m = y(() => {
|
|
537
|
+
if (!(!c.value || !_.value))
|
|
538
538
|
return {
|
|
539
|
-
backgroundColor:
|
|
539
|
+
backgroundColor: _.value,
|
|
540
540
|
WebkitMaskImage: `url(${c.value})`,
|
|
541
541
|
maskImage: `url(${c.value})`,
|
|
542
542
|
WebkitMaskRepeat: "no-repeat",
|
|
@@ -547,28 +547,28 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
547
547
|
maskPosition: "center"
|
|
548
548
|
};
|
|
549
549
|
});
|
|
550
|
-
return (
|
|
550
|
+
return (k, g) => (u(), v("label", {
|
|
551
551
|
class: ie(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [i.value, a.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
|
|
552
552
|
}, [
|
|
553
553
|
Re(d("input", {
|
|
554
554
|
type: "checkbox",
|
|
555
555
|
class: "hidden",
|
|
556
|
-
name:
|
|
557
|
-
value:
|
|
556
|
+
name: k.id,
|
|
557
|
+
value: k.value,
|
|
558
558
|
"onUpdate:modelValue": g[0] || (g[0] = (M) => o.value = M),
|
|
559
|
-
disabled:
|
|
559
|
+
disabled: k.disabled
|
|
560
560
|
}, null, 8, Ir), [
|
|
561
561
|
[Sa, o.value]
|
|
562
562
|
]),
|
|
563
|
-
|
|
563
|
+
k.html ? (u(), v("span", {
|
|
564
564
|
key: 0,
|
|
565
565
|
class: "w-full",
|
|
566
|
-
innerHTML:
|
|
566
|
+
innerHTML: k.html
|
|
567
567
|
}, null, 8, Tr)) : (u(), v("span", Er, [
|
|
568
|
-
|
|
568
|
+
x.value ? (u(), v("span", {
|
|
569
569
|
key: 0,
|
|
570
570
|
class: "inline-flex h-3 w-3 rounded-full border border-gray-200",
|
|
571
|
-
style: Oe({ background:
|
|
571
|
+
style: Oe({ background: _.value })
|
|
572
572
|
}, null, 4)) : K("", !0),
|
|
573
573
|
w.value ? (u(), v("span", {
|
|
574
574
|
key: 1,
|
|
@@ -587,8 +587,8 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
587
587
|
style: Oe(b.value)
|
|
588
588
|
}, null, 8, ["style"])) : K("", !0)
|
|
589
589
|
])) : K("", !0),
|
|
590
|
-
ft(
|
|
591
|
-
nt(ce(
|
|
590
|
+
ft(k.$slots, "default", {}, () => [
|
|
591
|
+
nt(ce(k.label), 1)
|
|
592
592
|
])
|
|
593
593
|
]))
|
|
594
594
|
], 2));
|
|
@@ -622,7 +622,7 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
622
622
|
}
|
|
623
623
|
}), i = D(`vs-checkbox-${n.view || "default"}`);
|
|
624
624
|
return (r, c) => (u(), v("div", Br, [
|
|
625
|
-
(u(), xe(_t(i.value === "vs-checkbox-buttons" ?
|
|
625
|
+
(u(), xe(_t(i.value === "vs-checkbox-buttons" ? q(Or) : q(Dr)), {
|
|
626
626
|
value: r.value,
|
|
627
627
|
label: r.label,
|
|
628
628
|
html: r.labelHtml,
|
|
@@ -688,7 +688,7 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
688
688
|
onClick: o[1] || (o[1] = Ee(() => {
|
|
689
689
|
}, ["prevent"]))
|
|
690
690
|
}, [
|
|
691
|
-
G(
|
|
691
|
+
G(q(ln), { class: "h-4 w-4 text-gray-500" })
|
|
692
692
|
], 8, jr)) : K("", !0)
|
|
693
693
|
])) : (u(), v("button", {
|
|
694
694
|
key: 1,
|
|
@@ -745,22 +745,22 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
745
745
|
}),
|
|
746
746
|
emits: ["update:modelValue"],
|
|
747
747
|
setup(e) {
|
|
748
|
-
const t = e, { inputClass: n } =
|
|
748
|
+
const t = e, { inputClass: n } = wt(t.style), l = Ke(e, "modelValue"), o = D(null);
|
|
749
749
|
let a = null;
|
|
750
750
|
function i(r) {
|
|
751
751
|
const c = r == null ? "" : String(r), f = {
|
|
752
752
|
9: /[0-9]/,
|
|
753
753
|
A: /[a-zA-Z]/,
|
|
754
754
|
"*": /[a-zA-Z0-9]/
|
|
755
|
-
},
|
|
756
|
-
let
|
|
755
|
+
}, _ = /* @__PURE__ */ new Set();
|
|
756
|
+
let x = !1;
|
|
757
757
|
for (let b = 0; b < c.length; b += 1) {
|
|
758
758
|
const m = c[b];
|
|
759
|
-
m === "{" ?
|
|
759
|
+
m === "{" ? x = !0 : m === "}" ? x = !1 : x && _.add(m);
|
|
760
760
|
}
|
|
761
761
|
const w = {};
|
|
762
762
|
return Object.keys(f).forEach((b) => {
|
|
763
|
-
|
|
763
|
+
_.has(b) || (w[b] = f[b]);
|
|
764
764
|
}), {
|
|
765
765
|
mask: c,
|
|
766
766
|
definitions: w,
|
|
@@ -792,7 +792,7 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
792
792
|
placeholder: r.placeholder,
|
|
793
793
|
disabled: r.disabled,
|
|
794
794
|
name: r.name,
|
|
795
|
-
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [
|
|
795
|
+
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(n)]]),
|
|
796
796
|
style: {
|
|
797
797
|
border: "1px solid #CFD9E0"
|
|
798
798
|
}
|
|
@@ -816,17 +816,17 @@ const wr = ["placeholder", "disabled"], xr = /* @__PURE__ */ ge({
|
|
|
816
816
|
}),
|
|
817
817
|
emits: ["update:modelValue"],
|
|
818
818
|
setup(e) {
|
|
819
|
-
const t = e, { inputClass: n } =
|
|
819
|
+
const t = e, { inputClass: n } = wt(t.style), l = Ke(e, "modelValue");
|
|
820
820
|
return (o, a) => (u(), v("div", Wr, [
|
|
821
821
|
d("div", qr, [
|
|
822
|
-
G(
|
|
822
|
+
G(q(Do), { class: "h-4 w-4 stroke-gray-500 transition-all" })
|
|
823
823
|
]),
|
|
824
824
|
Re(d("input", {
|
|
825
825
|
type: "email",
|
|
826
826
|
"onUpdate:modelValue": a[0] || (a[0] = (i) => l.value = i),
|
|
827
827
|
placeholder: o.placeholder,
|
|
828
828
|
disabled: o.disabled,
|
|
829
|
-
class: ie(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [
|
|
829
|
+
class: ie(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(n), { "!border-red-600": o.error }]]),
|
|
830
830
|
style: {
|
|
831
831
|
border: "1px solid #CFD9E0"
|
|
832
832
|
}
|
|
@@ -873,70 +873,70 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
873
873
|
}),
|
|
874
874
|
emits: ["update:modelValue"],
|
|
875
875
|
setup(e) {
|
|
876
|
-
const t = e, n = y(() => `^\\+[1-9]\\d{${(Zt(t.mask || Wt) || Zt(Wt)) - 1}}$`), { inputClass: l } =
|
|
876
|
+
const t = e, n = y(() => `^\\+[1-9]\\d{${(Zt(t.mask || Wt) || Zt(Wt)) - 1}}$`), { inputClass: l } = wt(t.style), o = Ke(e, "modelValue"), a = D(null);
|
|
877
877
|
let i = null;
|
|
878
|
-
function r(
|
|
879
|
-
const
|
|
878
|
+
function r(_) {
|
|
879
|
+
const x = {
|
|
880
880
|
9: /[0-9]/,
|
|
881
881
|
A: /[a-zA-Z]/,
|
|
882
882
|
"*": /[a-zA-Z0-9]/
|
|
883
883
|
}, w = /* @__PURE__ */ new Set();
|
|
884
884
|
let b = !1;
|
|
885
|
-
for (let
|
|
886
|
-
const g =
|
|
885
|
+
for (let k = 0; k < _.length; k += 1) {
|
|
886
|
+
const g = _[k];
|
|
887
887
|
g === "{" ? b = !0 : g === "}" ? b = !1 : b && w.add(g);
|
|
888
888
|
}
|
|
889
889
|
const m = {};
|
|
890
|
-
return Object.keys(
|
|
891
|
-
w.has(
|
|
890
|
+
return Object.keys(x).forEach((k) => {
|
|
891
|
+
w.has(k) || (m[k] = x[k]);
|
|
892
892
|
}), {
|
|
893
|
-
mask:
|
|
893
|
+
mask: _,
|
|
894
894
|
definitions: m,
|
|
895
895
|
lazy: !1,
|
|
896
896
|
disabled: t.disabled
|
|
897
897
|
};
|
|
898
898
|
}
|
|
899
|
-
function c(
|
|
900
|
-
if (
|
|
901
|
-
const
|
|
902
|
-
return
|
|
899
|
+
function c(_) {
|
|
900
|
+
if (_ == null || _ === "") return "";
|
|
901
|
+
const x = String(_).trim();
|
|
902
|
+
return x ? x.replace(/\D/g, "") : "";
|
|
903
903
|
}
|
|
904
904
|
function f() {
|
|
905
905
|
if (!i) return;
|
|
906
|
-
const
|
|
907
|
-
o.value =
|
|
906
|
+
const _ = i.unmaskedValue ?? "";
|
|
907
|
+
o.value = _ ? `+${_}` : "";
|
|
908
908
|
}
|
|
909
909
|
return lt(async () => {
|
|
910
910
|
if (!a.value) return;
|
|
911
|
-
const { default:
|
|
912
|
-
i =
|
|
911
|
+
const { default: _ } = await import("./index-W-qQIppj.js"), x = r(t.mask || "");
|
|
912
|
+
i = _(a.value, x), i.on("accept", f), i.on("complete", f);
|
|
913
913
|
const w = c(o.value);
|
|
914
914
|
i.unmaskedValue = w;
|
|
915
915
|
}), It(() => {
|
|
916
916
|
i?.destroy(), i = null;
|
|
917
|
-
}), ve(() => t.mask, (
|
|
918
|
-
i && i.updateOptions(r(
|
|
919
|
-
}), ve(() => t.disabled, (
|
|
920
|
-
i && i.updateOptions({ disabled:
|
|
921
|
-
}), ve(o, (
|
|
917
|
+
}), ve(() => t.mask, (_) => {
|
|
918
|
+
i && i.updateOptions(r(_ || ""));
|
|
919
|
+
}), ve(() => t.disabled, (_) => {
|
|
920
|
+
i && i.updateOptions({ disabled: _ });
|
|
921
|
+
}), ve(o, (_) => {
|
|
922
922
|
if (!i) return;
|
|
923
|
-
const
|
|
924
|
-
i.unmaskedValue !==
|
|
925
|
-
}), (
|
|
923
|
+
const x = c(_);
|
|
924
|
+
i.unmaskedValue !== x && (i.unmaskedValue = x);
|
|
925
|
+
}), (_, x) => (u(), v("div", Yr, [
|
|
926
926
|
d("div", Gr, [
|
|
927
|
-
G(
|
|
927
|
+
G(q(Io), { class: "h-4 w-4 stroke-gray-500 transition-all" })
|
|
928
928
|
]),
|
|
929
929
|
d("input", {
|
|
930
930
|
ref_key: "inputEl",
|
|
931
931
|
ref: a,
|
|
932
932
|
type: "tel",
|
|
933
|
-
name:
|
|
934
|
-
placeholder:
|
|
935
|
-
disabled:
|
|
933
|
+
name: _.name,
|
|
934
|
+
placeholder: _.placeholder,
|
|
935
|
+
disabled: _.disabled,
|
|
936
936
|
pattern: n.value,
|
|
937
937
|
title: "Міжнародний номер (E.164), наприклад +380XXXXXXXXX",
|
|
938
938
|
autocomplete: "tel",
|
|
939
|
-
class: ie(["!pl-10 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [
|
|
939
|
+
class: ie(["!pl-10 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(l), { "!border-red-600": _.error }]]),
|
|
940
940
|
style: {
|
|
941
941
|
border: "1px solid #CFD9E0"
|
|
942
942
|
}
|
|
@@ -968,7 +968,7 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
968
968
|
}),
|
|
969
969
|
emits: ["update:modelValue"],
|
|
970
970
|
setup(e) {
|
|
971
|
-
const t = e, n = Ke(e, "modelValue"), l = y(() => !!t.disabled), o = y(() => Sn(t.option)), a = y(() => Cn(t.option)), i = y(() => Qt(t.option)), r = y(() => !!(i.value && !o.value && !a.value)), c = y(() => !!(o.value && i.value)), f = y(() => i.value ? { color: i.value } : void 0),
|
|
971
|
+
const t = e, n = Ke(e, "modelValue"), l = y(() => !!t.disabled), o = y(() => Sn(t.option)), a = y(() => Cn(t.option)), i = y(() => Qt(t.option)), r = y(() => !!(i.value && !o.value && !a.value)), c = y(() => !!(o.value && i.value)), f = y(() => i.value ? { color: i.value } : void 0), _ = y(() => {
|
|
972
972
|
if (!(!o.value || !i.value))
|
|
973
973
|
return {
|
|
974
974
|
backgroundColor: i.value,
|
|
@@ -982,7 +982,7 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
982
982
|
maskPosition: "center"
|
|
983
983
|
};
|
|
984
984
|
});
|
|
985
|
-
return (
|
|
985
|
+
return (x, w) => (u(), v("label", {
|
|
986
986
|
class: ie(["flex items-center gap-0", [t.customClass, l.value ? "cursor-not-allowed opacity-60" : ""]])
|
|
987
987
|
}, [
|
|
988
988
|
Re(d("input", {
|
|
@@ -1018,7 +1018,7 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
1018
1018
|
c.value ? (u(), v("span", {
|
|
1019
1019
|
key: 1,
|
|
1020
1020
|
class: "inline-block h-4 w-4",
|
|
1021
|
-
style: Oe(
|
|
1021
|
+
style: Oe(_.value)
|
|
1022
1022
|
}, null, 4)) : o.value ? (u(), v("img", {
|
|
1023
1023
|
key: 2,
|
|
1024
1024
|
class: "block",
|
|
@@ -1060,7 +1060,7 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
1060
1060
|
}),
|
|
1061
1061
|
emits: ["update:modelValue"],
|
|
1062
1062
|
setup(e) {
|
|
1063
|
-
const t = e, n = Ke(e, "modelValue"), l = y(() => !!t.disabled), o = y(() => Sn(t.option)), a = y(() => Cn(t.option)), i = y(() => Qt(t.option)), r = y(() => !!(i.value && !o.value && !a.value)), c = y(() => !!(o.value && i.value)), f = y(() => i.value ? { color: i.value } : void 0),
|
|
1063
|
+
const t = e, n = Ke(e, "modelValue"), l = y(() => !!t.disabled), o = y(() => Sn(t.option)), a = y(() => Cn(t.option)), i = y(() => Qt(t.option)), r = y(() => !!(i.value && !o.value && !a.value)), c = y(() => !!(o.value && i.value)), f = y(() => i.value ? { color: i.value } : void 0), _ = y(() => {
|
|
1064
1064
|
if (!(!o.value || !i.value))
|
|
1065
1065
|
return {
|
|
1066
1066
|
backgroundColor: i.value,
|
|
@@ -1074,7 +1074,7 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
1074
1074
|
maskPosition: "center"
|
|
1075
1075
|
};
|
|
1076
1076
|
});
|
|
1077
|
-
return (
|
|
1077
|
+
return (x, w) => (u(), v("label", {
|
|
1078
1078
|
class: ie(["flex h-full w-full items-center border rounded-lg px-2 py-1", [
|
|
1079
1079
|
n.value == t.value ? `ring-2 ring-ring ring-${t.style?.primaryColor || "blue"}-500` : "",
|
|
1080
1080
|
t.customClass,
|
|
@@ -1103,7 +1103,7 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
1103
1103
|
c.value ? (u(), v("span", {
|
|
1104
1104
|
key: 1,
|
|
1105
1105
|
class: "inline-block h-4 w-4",
|
|
1106
|
-
style: Oe(
|
|
1106
|
+
style: Oe(_.value)
|
|
1107
1107
|
}, null, 4)) : o.value ? (u(), v("img", {
|
|
1108
1108
|
key: 2,
|
|
1109
1109
|
class: "block",
|
|
@@ -1230,26 +1230,26 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
1230
1230
|
return {
|
|
1231
1231
|
flex: "0 0 calc(50% - 5px)"
|
|
1232
1232
|
};
|
|
1233
|
-
}),
|
|
1233
|
+
}), _ = dt("values", null), { optionsList: x, loadOptions: w } = nl({
|
|
1234
1234
|
props: t,
|
|
1235
|
-
formValues:
|
|
1235
|
+
formValues: _
|
|
1236
1236
|
});
|
|
1237
1237
|
return lt(async () => {
|
|
1238
1238
|
await w();
|
|
1239
1239
|
}), (b, m) => (u(), v("div", {
|
|
1240
1240
|
class: ie(c.value)
|
|
1241
1241
|
}, [
|
|
1242
|
-
(u(!0), v(Ae, null, Be(
|
|
1243
|
-
key:
|
|
1242
|
+
(u(!0), v(Ae, null, Be(q(x), (k) => (u(), v("div", {
|
|
1243
|
+
key: k?.id,
|
|
1244
1244
|
class: ie(["flex items-stretch", b.position === "horizontal" ? t.customClass : ""]),
|
|
1245
1245
|
style: Oe(f.value)
|
|
1246
1246
|
}, [
|
|
1247
1247
|
(u(), xe(_t(l.value), Jt({
|
|
1248
|
-
text: r(
|
|
1249
|
-
html: a.value ? i(
|
|
1250
|
-
option:
|
|
1251
|
-
value:
|
|
1252
|
-
checked: n.value?.toString?.() ===
|
|
1248
|
+
text: r(k),
|
|
1249
|
+
html: a.value ? i(k) : "",
|
|
1250
|
+
option: k,
|
|
1251
|
+
value: k.id.toString(),
|
|
1252
|
+
checked: n.value?.toString?.() === k.id?.toString?.(),
|
|
1253
1253
|
"custom-class": b.position === "horizontal" ? "" : t.customClass,
|
|
1254
1254
|
modelValue: n.value,
|
|
1255
1255
|
"onUpdate:modelValue": m[0] || (m[0] = (g) => n.value = g)
|
|
@@ -1298,7 +1298,7 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
1298
1298
|
options: n.options
|
|
1299
1299
|
},
|
|
1300
1300
|
formValues: a
|
|
1301
|
-
}), c = y(() => i.value), f = (C) => C?.value || C?.id || C?.text || C,
|
|
1301
|
+
}), c = y(() => i.value), f = (C) => C?.value || C?.id || C?.text || C, _ = y(() => n.slot ?? n?.optionTemplate ?? ""), x = y(() => tl(_.value)), w = (C) => ll(C, _.value), b = (C) => al(C, _.value), m = (C) => `lg:col-span-${C || 12}`, k = y(() => [
|
|
1302
1302
|
n.position === "vertical" ? "flex flex-col" : "",
|
|
1303
1303
|
n.colSpan ? "grid" : "flex justify-start"
|
|
1304
1304
|
]), g = (C) => C == null || C === "" ? null : typeof C == "string" || typeof C == "number" ? C : String(C), M = y(() => {
|
|
@@ -1383,7 +1383,7 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
1383
1383
|
}, [
|
|
1384
1384
|
A.label ? (u(), v("span", vs, ce(A.label), 1)) : K("", !0),
|
|
1385
1385
|
d("div", {
|
|
1386
|
-
class: ie(["p-0 w-full gap-[12px]",
|
|
1386
|
+
class: ie(["p-0 w-full gap-[12px]", k.value])
|
|
1387
1387
|
}, [
|
|
1388
1388
|
(u(!0), v(Ae, null, Be(A.options, (U) => (u(), xe(_l, {
|
|
1389
1389
|
modelValue: o[f(U)],
|
|
@@ -1392,7 +1392,7 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
1392
1392
|
class: ie(m(C.colSpan)),
|
|
1393
1393
|
disabled: n.disabled || U.disabled,
|
|
1394
1394
|
label: b(U),
|
|
1395
|
-
labelHtml:
|
|
1395
|
+
labelHtml: x.value ? w(U) : "",
|
|
1396
1396
|
key: `${A.key}-${f(U)}`,
|
|
1397
1397
|
icon: U?.icon,
|
|
1398
1398
|
imgUrl: U?.imgUrl,
|
|
@@ -1403,7 +1403,7 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
1403
1403
|
]))), 128))
|
|
1404
1404
|
])) : (u(), v("div", {
|
|
1405
1405
|
key: 0,
|
|
1406
|
-
class: ie(["p-0 w-full gap-[10px]",
|
|
1406
|
+
class: ie(["p-0 w-full gap-[10px]", k.value])
|
|
1407
1407
|
}, [
|
|
1408
1408
|
(u(!0), v(Ae, null, Be(c.value, (A) => (u(), xe(_l, {
|
|
1409
1409
|
modelValue: o[f(A)],
|
|
@@ -1412,7 +1412,7 @@ const Yr = { class: "relative w-full bg-white rounded-lg" }, Gr = { class: "abso
|
|
|
1412
1412
|
class: ie(m(C.colSpan)),
|
|
1413
1413
|
disabled: n.disabled || A.disabled,
|
|
1414
1414
|
label: b(A),
|
|
1415
|
-
labelHtml:
|
|
1415
|
+
labelHtml: x.value ? w(A) : "",
|
|
1416
1416
|
key: f(A),
|
|
1417
1417
|
icon: A?.icon,
|
|
1418
1418
|
imgUrl: A?.imgUrl,
|
|
@@ -1584,7 +1584,7 @@ function ca(e, t) {
|
|
|
1584
1584
|
return gt(r) ? r : null;
|
|
1585
1585
|
}
|
|
1586
1586
|
case "dd.MM.yyyy HH:mm": {
|
|
1587
|
-
const [, o, a, i, r, c, f] = l,
|
|
1587
|
+
const [, o, a, i, r, c, f] = l, _ = new Date(
|
|
1588
1588
|
Number(i),
|
|
1589
1589
|
Number(a) - 1,
|
|
1590
1590
|
Number(o),
|
|
@@ -1592,7 +1592,7 @@ function ca(e, t) {
|
|
|
1592
1592
|
Number(c),
|
|
1593
1593
|
Number(f || 0)
|
|
1594
1594
|
);
|
|
1595
|
-
return gt(
|
|
1595
|
+
return gt(_) ? _ : null;
|
|
1596
1596
|
}
|
|
1597
1597
|
case "HH:mm": {
|
|
1598
1598
|
const [, o, a, i] = l, r = /* @__PURE__ */ new Date();
|
|
@@ -1805,20 +1805,20 @@ const rl = /* @__PURE__ */ Xe(Ns, [["render", Ks]]), Ys = ge({
|
|
|
1805
1805
|
}
|
|
1806
1806
|
},
|
|
1807
1807
|
setup(e, { emit: t }) {
|
|
1808
|
-
const n = y(() => $s(e.pageDate)), l = y(() => Ss(e.pageDate)), o = (
|
|
1808
|
+
const n = y(() => $s(e.pageDate)), l = y(() => Ss(e.pageDate)), o = (x, w, b) => !w && !b ? !0 : !(w && At(x) < At(w) || b && At(x) > At(b)), a = y(() => Ls({
|
|
1809
1809
|
start: n.value,
|
|
1810
1810
|
end: l.value
|
|
1811
1811
|
}).map(
|
|
1812
|
-
(
|
|
1813
|
-
value:
|
|
1814
|
-
key: String(At(
|
|
1815
|
-
display: At(
|
|
1816
|
-
selected: !!e.selected && At(
|
|
1817
|
-
disabled: !o(
|
|
1812
|
+
(x) => ({
|
|
1813
|
+
value: x,
|
|
1814
|
+
key: String(At(x)),
|
|
1815
|
+
display: At(x),
|
|
1816
|
+
selected: !!e.selected && At(x) === At(e.selected),
|
|
1817
|
+
disabled: !o(x, e.lowerLimit, e.upperLimit)
|
|
1818
1818
|
})
|
|
1819
1819
|
)), i = y(() => {
|
|
1820
|
-
const
|
|
1821
|
-
return `${
|
|
1820
|
+
const x = At(n.value), w = At(l.value);
|
|
1821
|
+
return `${x} - ${w}`;
|
|
1822
1822
|
}), r = y(
|
|
1823
1823
|
() => e.lowerLimit && (Fn(e.lowerLimit) === Fn(e.pageDate) || _n(e.pageDate, e.lowerLimit))
|
|
1824
1824
|
), c = y(
|
|
@@ -2014,7 +2014,7 @@ const Qs = /* @__PURE__ */ Xe(Zs, [["render", Js]]), ei = ge({
|
|
|
2014
2014
|
return Array.from({ length: 7 }).map((V, A) => M[(g + A) % 7]);
|
|
2015
2015
|
const C = n.value(e.weekdayFormat);
|
|
2016
2016
|
return Array.from(Array(7)).map((V, A) => (g + A) % 7).map((V) => Vs(/* @__PURE__ */ new Date(), V, e.weekStartsOn)).map(C);
|
|
2017
|
-
}), f = (g, M, C, V) => V?.dates?.some((A) => Kn(g, A)) || V?.predicate?.(g) ? !1 : !M && !C ? !0 : !(M && _n(g, an(M)) || C && $n(g, Mn(C))),
|
|
2017
|
+
}), f = (g, M, C, V) => V?.dates?.some((A) => Kn(g, A)) || V?.predicate?.(g) ? !1 : !M && !C ? !0 : !(M && _n(g, an(M)) || C && $n(g, Mn(C))), _ = y(() => {
|
|
2018
2018
|
const g = /* @__PURE__ */ new Date(), M = n.value(e.format);
|
|
2019
2019
|
return Cs(i.value).map(
|
|
2020
2020
|
(C) => ({
|
|
@@ -2031,15 +2031,15 @@ const Qs = /* @__PURE__ */ Xe(Zs, [["render", Js]]), ei = ge({
|
|
|
2031
2031
|
key: n.value("yyyy-MM-dd")(C)
|
|
2032
2032
|
})
|
|
2033
2033
|
);
|
|
2034
|
-
}),
|
|
2034
|
+
}), x = y(() => n.value(e.headingFormat)(e.pageDate)), w = y(
|
|
2035
2035
|
() => e.lowerLimit && ($l(e.lowerLimit, e.pageDate) || _n(e.pageDate, e.lowerLimit))
|
|
2036
2036
|
), b = y(
|
|
2037
2037
|
() => e.upperLimit && ($l(e.upperLimit, e.pageDate) || $n(e.pageDate, e.upperLimit))
|
|
2038
2038
|
);
|
|
2039
2039
|
return {
|
|
2040
2040
|
weekDays: c,
|
|
2041
|
-
days:
|
|
2042
|
-
heading:
|
|
2041
|
+
days: _,
|
|
2042
|
+
heading: x,
|
|
2043
2043
|
leftDisabled: w,
|
|
2044
2044
|
rightDisabled: b,
|
|
2045
2045
|
previousPage: () => t("update:pageDate", _s(e.pageDate)),
|
|
@@ -2120,29 +2120,29 @@ const ni = /* @__PURE__ */ Xe(ei, [["render", ti]]), li = ge({
|
|
|
2120
2120
|
ve(
|
|
2121
2121
|
() => e.selected,
|
|
2122
2122
|
(b) => {
|
|
2123
|
-
let m = 0,
|
|
2124
|
-
b && (m = b.getHours(),
|
|
2123
|
+
let m = 0, k = 0;
|
|
2124
|
+
b && (m = b.getHours(), k = b.getMinutes()), l.value = m, o.value = k;
|
|
2125
2125
|
}
|
|
2126
2126
|
);
|
|
2127
2127
|
const a = (b, m) => {
|
|
2128
|
-
const
|
|
2128
|
+
const k = Fs(new Date(n.value.getTime()), {
|
|
2129
2129
|
hours: b,
|
|
2130
2130
|
minutes: m,
|
|
2131
2131
|
seconds: 0
|
|
2132
2132
|
});
|
|
2133
|
-
k
|
|
2134
|
-
}, i = (b, m) => b < 0 ? m : b > m ? 0 : b, r = () => a(i(l.value + 1, 23), o.value), c = () => a(i(l.value - 1, 23), o.value), f = () => a(l.value, i(o.value + 1, 59)),
|
|
2133
|
+
x(k) && (l.value = b, o.value = m, t("select", k));
|
|
2134
|
+
}, i = (b, m) => b < 0 ? m : b > m ? 0 : b, r = () => a(i(l.value + 1, 23), o.value), c = () => a(i(l.value - 1, 23), o.value), f = () => a(l.value, i(o.value + 1, 59)), _ = () => a(l.value, i(o.value - 1, 59)), x = (b) => !(e.disabledTime?.dates?.some(
|
|
2135
2135
|
(m) => ja(b, m) && Ds(b, m)
|
|
2136
2136
|
) || e.disabledTime?.predicate?.(b));
|
|
2137
2137
|
return {
|
|
2138
2138
|
hours: l,
|
|
2139
2139
|
minutes: o,
|
|
2140
2140
|
padStartZero: (b) => `0${b}`.substr(-2),
|
|
2141
|
-
isEnabled:
|
|
2141
|
+
isEnabled: x,
|
|
2142
2142
|
incrementHours: r,
|
|
2143
2143
|
decrementHours: c,
|
|
2144
2144
|
incrementMinutes: f,
|
|
2145
|
-
decrementMinutes:
|
|
2145
|
+
decrementMinutes: _
|
|
2146
2146
|
};
|
|
2147
2147
|
}
|
|
2148
2148
|
}), ai = {
|
|
@@ -2422,25 +2422,25 @@ const gi = /* @__PURE__ */ Xe(li, [["render", vi]]), On = ["time", "day", "month
|
|
|
2422
2422
|
},
|
|
2423
2423
|
setup(e, { emit: t }) {
|
|
2424
2424
|
const n = D("none"), l = D(e.startingViewDate), o = D(null), a = D(null), i = D(null), r = D({}), c = D(!1), f = D(!1);
|
|
2425
|
-
let
|
|
2426
|
-
const
|
|
2425
|
+
let _ = null;
|
|
2426
|
+
const x = D(""), w = (ue) => {
|
|
2427
2427
|
const oe = ue.replace(/[a-zA-Z]/g, "0");
|
|
2428
2428
|
return /0/.test(oe) ? oe : "";
|
|
2429
2429
|
}, b = y(() => w(e.inputFormat));
|
|
2430
|
-
let m = null,
|
|
2430
|
+
let m = null, k = null;
|
|
2431
2431
|
const g = () => {
|
|
2432
2432
|
m?.destroy(), m = null;
|
|
2433
2433
|
}, M = async () => {
|
|
2434
|
-
if (!
|
|
2434
|
+
if (!k) {
|
|
2435
2435
|
const { default: ue } = await import("./index-W-qQIppj.js");
|
|
2436
|
-
|
|
2436
|
+
k = ue;
|
|
2437
2437
|
}
|
|
2438
|
-
return
|
|
2438
|
+
return k;
|
|
2439
2439
|
}, C = () => {
|
|
2440
|
-
m && m.value !==
|
|
2440
|
+
m && m.value !== x.value && (m.value = x.value ?? "");
|
|
2441
2441
|
}, V = (ue) => {
|
|
2442
2442
|
const oe = ue && gt(ue) ? wn(ue, e.inputFormat) : "";
|
|
2443
|
-
|
|
2443
|
+
x.value !== oe && (x.value = oe), C();
|
|
2444
2444
|
}, A = async () => {
|
|
2445
2445
|
if (g(), !a.value || !b.value) return;
|
|
2446
2446
|
m = (await M())(a.value, {
|
|
@@ -2474,7 +2474,7 @@ const gi = /* @__PURE__ */ Xe(li, [["render", vi]]), On = ["time", "day", "month
|
|
|
2474
2474
|
const U = y(() => n.value !== "none"), Z = y(() => e.startingView === "time" && e.minimumView === "time"), F = y(() => e.startingView === "day" && e.minimumView === "time"), j = (ue) => {
|
|
2475
2475
|
e.disabled || (U.value || (l.value = e.modelValue || yi(e.lowerLimit, e.upperLimit, l.value), t("opened")), n.value = ue, et(() => Je()));
|
|
2476
2476
|
}, B = () => {
|
|
2477
|
-
U.value && (
|
|
2477
|
+
U.value && (_ !== null && (cancelAnimationFrame(_), _ = null), n.value = "none", t("closed"));
|
|
2478
2478
|
}, P = (ue = "none") => {
|
|
2479
2479
|
ue === "none" ? B() : j(ue);
|
|
2480
2480
|
};
|
|
@@ -2507,14 +2507,14 @@ const gi = /* @__PURE__ */ Xe(li, [["render", vi]]), On = ["time", "day", "month
|
|
|
2507
2507
|
f.value = !1, e.typeable && ne({ closeOnSuccess: !1, revertOnInvalid: !0 });
|
|
2508
2508
|
}, T = (ue) => {
|
|
2509
2509
|
const oe = ue.target;
|
|
2510
|
-
if (
|
|
2511
|
-
const Le = ca(
|
|
2512
|
-
Le &&
|
|
2510
|
+
if (x.value = oe?.value ?? "", !e.typeable) return;
|
|
2511
|
+
const Le = ca(x.value, e.inputFormat);
|
|
2512
|
+
Le && x.value === wn(Le, e.inputFormat) && (l.value = Le);
|
|
2513
2513
|
}, ne = ({
|
|
2514
2514
|
closeOnSuccess: ue,
|
|
2515
2515
|
revertOnInvalid: oe
|
|
2516
2516
|
}) => {
|
|
2517
|
-
const Le = a.value?.value ??
|
|
2517
|
+
const Le = a.value?.value ?? x.value, Pe = ca(Le, e.inputFormat);
|
|
2518
2518
|
return !!Pe && Le === wn(Pe, e.inputFormat) && Pe ? (l.value = Pe, V(Pe), t("update:modelValue", Pe), ue && B(), !0) : (V(e.modelValue), !1);
|
|
2519
2519
|
}, R = (ue) => {
|
|
2520
2520
|
const oe = ue.keyCode ? ue.keyCode : ue.which, Le = oe === 27, Pe = oe === 13;
|
|
@@ -2528,12 +2528,12 @@ const gi = /* @__PURE__ */ Xe(li, [["render", vi]]), On = ["time", "day", "month
|
|
|
2528
2528
|
return ue < oe ? e.minimumView : e.startingView;
|
|
2529
2529
|
}), be = y(() => e.weekDayNames?.length === 7 ? e.weekDayNames : void 0), se = () => e.startingView === "time" && e.minimumView === "time" ? null : j("day"), Me = () => {
|
|
2530
2530
|
if (!a.value || !i.value) return;
|
|
2531
|
-
const ue = 4, oe = 8, Le = a.value.getBoundingClientRect(), Pe = i.value.getBoundingClientRect(), ct = i.value.firstElementChild?.getBoundingClientRect(),
|
|
2531
|
+
const ue = 4, oe = 8, Le = a.value.getBoundingClientRect(), Pe = i.value.getBoundingClientRect(), ct = i.value.firstElementChild?.getBoundingClientRect(), W = window.innerWidth, le = window.innerHeight, ae = window.scrollX || window.pageXOffset, we = window.scrollY || window.pageYOffset, Ce = Math.max(160, le - oe * 2), Ne = Math.min(Pe.height || 0, Ce), We = le - Le.bottom - ue - oe, qe = Le.top - ue - oe, z = We < Ne && qe > We;
|
|
2532
2532
|
let $ = z ? Le.top - ue - Ne : Le.bottom + ue;
|
|
2533
2533
|
$ = Math.max(oe, Math.min($, le - oe - Ne));
|
|
2534
2534
|
const L = ct?.width || Pe.width || 268;
|
|
2535
2535
|
let O = Le.left;
|
|
2536
|
-
O + L >
|
|
2536
|
+
O + L > W - oe && (O = W - oe - L), O < oe && (O = oe);
|
|
2537
2537
|
const me = z ? Math.max(120, Le.top - ue - oe) : Math.max(120, le - Le.bottom - ue - oe);
|
|
2538
2538
|
r.value = {
|
|
2539
2539
|
position: "absolute",
|
|
@@ -2548,8 +2548,8 @@ const gi = /* @__PURE__ */ Xe(li, [["render", vi]]), On = ["time", "day", "month
|
|
|
2548
2548
|
const oe = [];
|
|
2549
2549
|
let Le = ue.parentElement;
|
|
2550
2550
|
for (; Le; ) {
|
|
2551
|
-
const Pe = window.getComputedStyle(Le), Ye = Pe.overflowY, ct = Pe.overflowX,
|
|
2552
|
-
(
|
|
2551
|
+
const Pe = window.getComputedStyle(Le), Ye = Pe.overflowY, ct = Pe.overflowX, W = ["auto", "scroll", "hidden", "clip"].includes(Ye), le = ["auto", "scroll", "hidden", "clip"].includes(ct);
|
|
2552
|
+
(W || le) && oe.push(Le), Le = Le.parentElement;
|
|
2553
2553
|
}
|
|
2554
2554
|
return oe;
|
|
2555
2555
|
}, He = () => {
|
|
@@ -2571,14 +2571,14 @@ const gi = /* @__PURE__ */ Xe(li, [["render", vi]]), On = ["time", "day", "month
|
|
|
2571
2571
|
U.value && et(() => Je());
|
|
2572
2572
|
});
|
|
2573
2573
|
const Je = () => {
|
|
2574
|
-
Me(),
|
|
2575
|
-
Me(),
|
|
2574
|
+
Me(), _ !== null && cancelAnimationFrame(_), _ = requestAnimationFrame(() => {
|
|
2575
|
+
Me(), _ = null;
|
|
2576
2576
|
});
|
|
2577
2577
|
};
|
|
2578
2578
|
lt(() => {
|
|
2579
2579
|
window.addEventListener("resize", Ze), window.addEventListener("scroll", Ze, !0), document.addEventListener("pointerdown", ze, !0);
|
|
2580
2580
|
}), It(() => {
|
|
2581
|
-
|
|
2581
|
+
_ !== null && (cancelAnimationFrame(_), _ = null), window.removeEventListener("resize", Ze), window.removeEventListener("scroll", Ze, !0), document.removeEventListener("pointerdown", ze, !0);
|
|
2582
2582
|
});
|
|
2583
2583
|
const ze = (ue) => {
|
|
2584
2584
|
if (n.value === "none") return;
|
|
@@ -2592,7 +2592,7 @@ const gi = /* @__PURE__ */ Xe(li, [["render", vi]]), On = ["time", "day", "month
|
|
|
2592
2592
|
blur: ye,
|
|
2593
2593
|
focus: ke,
|
|
2594
2594
|
click: Y,
|
|
2595
|
-
input:
|
|
2595
|
+
input: x,
|
|
2596
2596
|
inputRef: a,
|
|
2597
2597
|
pageDate: l,
|
|
2598
2598
|
renderView: P,
|
|
@@ -2621,7 +2621,7 @@ const gi = /* @__PURE__ */ Xe(li, [["render", vi]]), On = ["time", "day", "month
|
|
|
2621
2621
|
class: "relative"
|
|
2622
2622
|
}, wi = { class: "p-datepicker p-component p-inputwrapper relative" }, xi = ["readonly", "value", "placeholder", "disabled", "tabindex"], ki = { class: "p-datepicker-input-icon-container absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none text-slate-400" }, _i = { class: "absolute right-8 top-1/2 -translate-y-1/2" };
|
|
2623
2623
|
function $i(e, t, n, l, o, a) {
|
|
2624
|
-
const i = vt("Clock3"), r = vt("CalendarDays"), c = vt("X"), f = vt("year-picker"),
|
|
2624
|
+
const i = vt("Clock3"), r = vt("CalendarDays"), c = vt("X"), f = vt("year-picker"), _ = vt("month-picker"), x = vt("time-picker"), w = vt("day-picker");
|
|
2625
2625
|
return u(), v("div", bi, [
|
|
2626
2626
|
d("div", wi, [
|
|
2627
2627
|
d("input", Jt({
|
|
@@ -2679,7 +2679,7 @@ function $i(e, t, n, l, o, a) {
|
|
|
2679
2679
|
}, null, 8, ["pageDate", "selected", "lowerLimit", "upperLimit", "onSelect"]), [
|
|
2680
2680
|
[Pt, e.viewShown === "year"]
|
|
2681
2681
|
]),
|
|
2682
|
-
Re(G(
|
|
2682
|
+
Re(G(_, {
|
|
2683
2683
|
pageDate: e.pageDate,
|
|
2684
2684
|
"onUpdate:pageDate": t[7] || (t[7] = (b) => e.updatePageDate("month", b)),
|
|
2685
2685
|
selected: e.modelValue,
|
|
@@ -2712,7 +2712,7 @@ function $i(e, t, n, l, o, a) {
|
|
|
2712
2712
|
e.isDateTimeMode ? {
|
|
2713
2713
|
name: "after-calendar",
|
|
2714
2714
|
fn: ut(() => [
|
|
2715
|
-
G(
|
|
2715
|
+
G(x, {
|
|
2716
2716
|
embedded: !0,
|
|
2717
2717
|
pageDate: e.pageDate,
|
|
2718
2718
|
visible: e.viewShown === "day" && e.isDateTimeMode,
|
|
@@ -2727,7 +2727,7 @@ function $i(e, t, n, l, o, a) {
|
|
|
2727
2727
|
]), 1032, ["pageDate", "selected", "weekStartsOn", "lowerLimit", "upperLimit", "headingFormat", "disabledDates", "weekdayFormat", "allow-outside-interval", "format", "custom-weekdays", "onSelect", "onToday", "onClear"]), [
|
|
2728
2728
|
[Pt, e.viewShown === "day"]
|
|
2729
2729
|
]),
|
|
2730
|
-
Re(G(
|
|
2730
|
+
Re(G(x, {
|
|
2731
2731
|
pageDate: e.pageDate,
|
|
2732
2732
|
visible: e.viewShown === "time",
|
|
2733
2733
|
selected: e.modelValue,
|
|
@@ -2768,7 +2768,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
2768
2768
|
},
|
|
2769
2769
|
emits: ["update:modelValue"],
|
|
2770
2770
|
setup(e, { emit: t }) {
|
|
2771
|
-
const n = e, l = t, { inputClass: o } =
|
|
2771
|
+
const n = e, l = t, { inputClass: o } = wt(n.style), a = Zn(), i = y(() => n.mode ? n.mode : n.time ? "datetime" : "date"), r = y(() => [
|
|
2772
2772
|
"py-1.5 px-3 block w-full placeholder:text-[#767f8f] bg-white",
|
|
2773
2773
|
o.value,
|
|
2774
2774
|
n.customClass,
|
|
@@ -2779,9 +2779,9 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
2779
2779
|
i.value
|
|
2780
2780
|
) || void 0,
|
|
2781
2781
|
set: (T) => l("update:modelValue", B(T, i.value))
|
|
2782
|
-
}),
|
|
2782
|
+
}), _ = ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"], x = y(() => {
|
|
2783
2783
|
if (n.dayNames?.length)
|
|
2784
|
-
return n.dayNames.length === 7 ? n.dayNames :
|
|
2784
|
+
return n.dayNames.length === 7 ? n.dayNames : _;
|
|
2785
2785
|
}), w = y(() => {
|
|
2786
2786
|
const T = n.weekStart, ne = typeof T == "string" ? Number(T) : T;
|
|
2787
2787
|
return ne === void 0 || Number.isNaN(ne) ? 1 : Math.min(6, Math.max(0, ne));
|
|
@@ -2805,7 +2805,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
2805
2805
|
default:
|
|
2806
2806
|
return { startingView: "day", minimumView: "day" };
|
|
2807
2807
|
}
|
|
2808
|
-
}),
|
|
2808
|
+
}), k = {
|
|
2809
2809
|
date: "dd.MM.yyyy",
|
|
2810
2810
|
datetime: "dd.MM.yyyy HH:mm",
|
|
2811
2811
|
month: "MM.yyyy",
|
|
@@ -2839,7 +2839,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
2839
2839
|
return T ? T.replaceAll("dd", "__DAY2__").replaceAll("d", "__DAY1__").replaceAll("mm", "__MONTH2__").replaceAll("m", "__MONTH1__").replaceAll("yy", "__YEAR2__").replaceAll("y", "__YEAR1__").replaceAll("__DAY2__", "dd").replaceAll("__DAY1__", "d").replaceAll("__MONTH2__", "MM").replaceAll("__MONTH1__", "M").replaceAll("__YEAR2__", "yy").replaceAll("__YEAR1__", "yyyy") : "";
|
|
2840
2840
|
}
|
|
2841
2841
|
const V = y(() => {
|
|
2842
|
-
const T =
|
|
2842
|
+
const T = k[i.value] || "dd.MM.yyyy";
|
|
2843
2843
|
if (i.value === "time") return T;
|
|
2844
2844
|
const ne = n.dateFormat || M();
|
|
2845
2845
|
if (!ne) return T;
|
|
@@ -2975,7 +2975,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
2975
2975
|
disabled: n.disabled,
|
|
2976
2976
|
clearable: n.clearable,
|
|
2977
2977
|
typeable: n.editable,
|
|
2978
|
-
"week-day-names":
|
|
2978
|
+
"week-day-names": x.value,
|
|
2979
2979
|
"week-starts-on": w.value,
|
|
2980
2980
|
"starting-view": m.value.startingView,
|
|
2981
2981
|
"minimum-view": m.value.minimumView,
|
|
@@ -3012,7 +3012,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3012
3012
|
method: "POST",
|
|
3013
3013
|
body: n
|
|
3014
3014
|
}
|
|
3015
|
-
).then((
|
|
3015
|
+
).then((x) => x.json()))?.result;
|
|
3016
3016
|
} catch (n) {
|
|
3017
3017
|
return Te({
|
|
3018
3018
|
type: "error",
|
|
@@ -3082,10 +3082,10 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3082
3082
|
}),
|
|
3083
3083
|
emits: /* @__PURE__ */ Ue(["click"], ["update:value", "update:item"]),
|
|
3084
3084
|
setup(e, { emit: t }) {
|
|
3085
|
-
const n = Ke(e, "value"), l = Ke(e, "item"), o = t, a = e, i = y(() => a.action), r = y(() => l.value ? typeof l.value == "string" ? l.value : l.value.file_path : ""), c = y(() => a.disabled ? "opacity-50 cursor-not-allowed" : a.isUploading ? "cursor-default text-blue-500" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"), f = (b) => typeof b == "string" ? b : b?.file_path || "",
|
|
3085
|
+
const n = Ke(e, "value"), l = Ke(e, "item"), o = t, a = e, i = y(() => a.action), r = y(() => l.value ? typeof l.value == "string" ? l.value : l.value.file_path : ""), c = y(() => a.disabled ? "opacity-50 cursor-not-allowed" : a.isUploading ? "cursor-default text-blue-500" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"), f = (b) => typeof b == "string" ? b : b?.file_path || "", _ = () => {
|
|
3086
3086
|
const b = r.value;
|
|
3087
3087
|
Vi(b), a.multiple && Array.isArray(n.value) ? n.value = n.value.filter((m) => f(m) !== b) : n.value = "";
|
|
3088
|
-
},
|
|
3088
|
+
}, x = () => {
|
|
3089
3089
|
r.value && window.open(r.value, "_blank");
|
|
3090
3090
|
}, w = () => {
|
|
3091
3091
|
a.disabled || a.isUploading || o("click");
|
|
@@ -3099,7 +3099,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3099
3099
|
b.isUploading ? (u(), v("div", Ei, [
|
|
3100
3100
|
m[2] || (m[2] = d("div", { class: "loader" }, null, -1)),
|
|
3101
3101
|
d("span", null, ce(b.progressPercent) + "%", 1)
|
|
3102
|
-
])) : (u(), xe(
|
|
3102
|
+
])) : (u(), xe(q(Ot), {
|
|
3103
3103
|
key: 1,
|
|
3104
3104
|
class: "h-4 w-4"
|
|
3105
3105
|
}))
|
|
@@ -3108,33 +3108,33 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3108
3108
|
title: r.value,
|
|
3109
3109
|
class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file"
|
|
3110
3110
|
}, [
|
|
3111
|
-
(u(), xe(_t(
|
|
3111
|
+
(u(), xe(_t(q(Ii)(r.value)), {
|
|
3112
3112
|
src: r.value,
|
|
3113
3113
|
alt: "file",
|
|
3114
3114
|
class: "w-full h-full object-cover cursor-pointer",
|
|
3115
|
-
onClick: m[0] || (m[0] = (
|
|
3115
|
+
onClick: m[0] || (m[0] = (k) => q(fa)(r.value))
|
|
3116
3116
|
}, null, 8, ["src"])),
|
|
3117
3117
|
d("div", Pi, [
|
|
3118
3118
|
d("button", {
|
|
3119
3119
|
type: "button",
|
|
3120
|
-
onClick:
|
|
3120
|
+
onClick: _,
|
|
3121
3121
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
|
|
3122
3122
|
}, [
|
|
3123
|
-
G(
|
|
3123
|
+
G(q(on), { class: "w-4 h-4" })
|
|
3124
3124
|
]),
|
|
3125
3125
|
d("button", {
|
|
3126
3126
|
type: "button",
|
|
3127
|
-
onClick:
|
|
3127
|
+
onClick: x,
|
|
3128
3128
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-emerald-600"
|
|
3129
3129
|
}, [
|
|
3130
|
-
G(
|
|
3130
|
+
G(q(Aa), { class: "w-4 h-4" })
|
|
3131
3131
|
]),
|
|
3132
3132
|
d("button", {
|
|
3133
3133
|
type: "button",
|
|
3134
|
-
onClick: m[1] || (m[1] = (
|
|
3134
|
+
onClick: m[1] || (m[1] = (k) => q(fa)(r.value)),
|
|
3135
3135
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
|
|
3136
3136
|
}, [
|
|
3137
|
-
G(
|
|
3137
|
+
G(q(Il), { class: "w-4 h-4" })
|
|
3138
3138
|
])
|
|
3139
3139
|
])
|
|
3140
3140
|
], 8, Fi));
|
|
@@ -3162,12 +3162,12 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3162
3162
|
if (!a) return;
|
|
3163
3163
|
const [i, r] = a.split("="), c = i?.trim(), f = r?.trim();
|
|
3164
3164
|
if (!c || !f) return;
|
|
3165
|
-
const
|
|
3166
|
-
if (
|
|
3165
|
+
const _ = o[f];
|
|
3166
|
+
if (_ == null || _ === "") {
|
|
3167
3167
|
l.push(f);
|
|
3168
3168
|
return;
|
|
3169
3169
|
}
|
|
3170
|
-
n[c] =
|
|
3170
|
+
n[c] = _;
|
|
3171
3171
|
}), l.length ? (Te({
|
|
3172
3172
|
type: "warning",
|
|
3173
3173
|
title: "Заповніть поля",
|
|
@@ -3201,7 +3201,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3201
3201
|
}),
|
|
3202
3202
|
emits: /* @__PURE__ */ Ue(["change"], ["update:modelValue"]),
|
|
3203
3203
|
setup(e, { emit: t }) {
|
|
3204
|
-
const n = e, l = Ke(e, "modelValue"), o = t, a = D(null), i = D(!1), r = D([]), c = dt("values"), f = y(() => qa(l.value, !!n.multiple)),
|
|
3204
|
+
const n = e, l = Ke(e, "modelValue"), o = t, a = D(null), i = D(!1), r = D([]), c = dt("values"), f = y(() => qa(l.value, !!n.multiple)), _ = y(() => Ka(l.value, !!n.multiple)), x = y(() => za(n.format)), w = y(() => Wa(n.customParams, c)), b = (U) => {
|
|
3205
3205
|
Te({
|
|
3206
3206
|
type: "error",
|
|
3207
3207
|
title: "Помилка завантаження",
|
|
@@ -3210,7 +3210,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3210
3210
|
});
|
|
3211
3211
|
}, m = () => {
|
|
3212
3212
|
n.disabled || i.value || w.value.ok && a.value?.click();
|
|
3213
|
-
},
|
|
3213
|
+
}, k = async (U) => {
|
|
3214
3214
|
const Z = {
|
|
3215
3215
|
api: n.api,
|
|
3216
3216
|
customParams: Object.keys(w.value.params).length ? w.value.params : void 0
|
|
@@ -3237,7 +3237,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3237
3237
|
a.value && (a.value.value = "");
|
|
3238
3238
|
return;
|
|
3239
3239
|
}
|
|
3240
|
-
if (F.filter((B) => !Ha(B,
|
|
3240
|
+
if (F.filter((B) => !Ha(B, x.value)).length > 0) {
|
|
3241
3241
|
a.value && (a.value.value = "");
|
|
3242
3242
|
return;
|
|
3243
3243
|
}
|
|
@@ -3248,7 +3248,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3248
3248
|
F.map(async (te, J) => {
|
|
3249
3249
|
const ee = r.value[J];
|
|
3250
3250
|
ee.status = "uploading", ee.progressPercent = 0;
|
|
3251
|
-
const Y = await
|
|
3251
|
+
const Y = await k(te);
|
|
3252
3252
|
return Y ? (ee.status = "done", ee.path = Y, ee.uploaded = ee.size, ee.progressPercent = 100) : (ee.status = "error", ee.error = "Помилка при завантаженні"), Y;
|
|
3253
3253
|
})
|
|
3254
3254
|
), pe = Q.filter((te) => !!te);
|
|
@@ -3261,7 +3261,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3261
3261
|
l.value = [...X, ...Se], o("change", l.value);
|
|
3262
3262
|
return;
|
|
3263
3263
|
}
|
|
3264
|
-
const B = F[0], P = await
|
|
3264
|
+
const B = F[0], P = await k(B);
|
|
3265
3265
|
if (!P) {
|
|
3266
3266
|
b();
|
|
3267
3267
|
return;
|
|
@@ -3284,9 +3284,9 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3284
3284
|
onChange: A,
|
|
3285
3285
|
disabled: i.value || U.disabled
|
|
3286
3286
|
}, null, 40, Ri),
|
|
3287
|
-
|
|
3287
|
+
_.value ? (u(), xe(Vt, {
|
|
3288
3288
|
key: 0,
|
|
3289
|
-
item:
|
|
3289
|
+
item: _.value,
|
|
3290
3290
|
value: l.value,
|
|
3291
3291
|
"onUpdate:value": Z[0] || (Z[0] = (F) => l.value = F)
|
|
3292
3292
|
}, null, 8, ["item", "value"])) : K("", !0),
|
|
@@ -3358,10 +3358,10 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3358
3358
|
}),
|
|
3359
3359
|
emits: ["update:modelValue"],
|
|
3360
3360
|
setup(e) {
|
|
3361
|
-
const t = e, n = Ke(e, "modelValue"), l = D(null), o = D(!1), a = D(""), i = D([]), r = dt("values"), c = y(() => !!t.multiple), f = y(() => za(t.format)),
|
|
3361
|
+
const t = e, n = Ke(e, "modelValue"), l = D(null), o = D(!1), a = D(""), i = D([]), r = dt("values"), c = y(() => !!t.multiple), f = y(() => za(t.format)), _ = y(() => {
|
|
3362
3362
|
if (f.value.length)
|
|
3363
3363
|
return f.value.map((j) => `.${j}`).join(",");
|
|
3364
|
-
}),
|
|
3364
|
+
}), x = y(() => qa(n.value, c.value)), w = y(() => Ka(n.value, c.value)), b = y(() => Wa(t.customParams, r)), m = y(() => i.value.filter((j) => j.status !== "done")), k = y(() => c.value ? null : m.value[0] || null), g = y(() => {
|
|
3365
3365
|
const j = m.value, B = j.reduce((Q, pe) => Q + pe.size, 0);
|
|
3366
3366
|
if (!B) return 0;
|
|
3367
3367
|
const P = j.reduce((Q, pe) => Q + Math.min(pe.uploaded, pe.size), 0);
|
|
@@ -3469,11 +3469,11 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3469
3469
|
type: "file",
|
|
3470
3470
|
class: "hidden",
|
|
3471
3471
|
multiple: c.value,
|
|
3472
|
-
accept:
|
|
3472
|
+
accept: _.value,
|
|
3473
3473
|
disabled: o.value || t.disabled,
|
|
3474
3474
|
onChange: F
|
|
3475
3475
|
}, null, 40, Ui),
|
|
3476
|
-
c.value ? (u(!0), v(Ae, { key: 0 }, Be(
|
|
3476
|
+
c.value ? (u(!0), v(Ae, { key: 0 }, Be(x.value, (P, Q) => (u(), xe(Vt, {
|
|
3477
3477
|
key: `${Q}-${V(P)}`,
|
|
3478
3478
|
multiple: !0,
|
|
3479
3479
|
item: P,
|
|
@@ -3492,13 +3492,13 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3492
3492
|
disabled: !0,
|
|
3493
3493
|
"progress-percent": P.progressPercent,
|
|
3494
3494
|
title: P.file.name
|
|
3495
|
-
}, null, 8, ["progress-percent", "title"]))), 128)) :
|
|
3495
|
+
}, null, 8, ["progress-percent", "title"]))), 128)) : k.value ? (u(), xe(Vt, {
|
|
3496
3496
|
key: 3,
|
|
3497
3497
|
action: "",
|
|
3498
3498
|
"is-uploading": !0,
|
|
3499
3499
|
disabled: !0,
|
|
3500
|
-
"progress-percent":
|
|
3501
|
-
title:
|
|
3500
|
+
"progress-percent": k.value.progressPercent,
|
|
3501
|
+
title: k.value.file.name
|
|
3502
3502
|
}, null, 8, ["progress-percent", "title"])) : K("", !0),
|
|
3503
3503
|
G(Vt, {
|
|
3504
3504
|
action: "",
|
|
@@ -3537,7 +3537,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3537
3537
|
}
|
|
3538
3538
|
return (o, a) => (u(), v(Ae, null, [
|
|
3539
3539
|
d("div", Wi, [
|
|
3540
|
-
G(
|
|
3540
|
+
G(q(Gn), { class: "icon icon-tabler icons-tabler-outline icon-tabler-file h-4 w-4" })
|
|
3541
3541
|
]),
|
|
3542
3542
|
d("div", qi, [
|
|
3543
3543
|
d("p", Ki, ce(o.item?.uploaded_name), 1),
|
|
@@ -3575,26 +3575,26 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3575
3575
|
emits: ["update", "openModal", "openLightbox"],
|
|
3576
3576
|
setup(e, { emit: t }) {
|
|
3577
3577
|
const n = e, l = t;
|
|
3578
|
-
function o(
|
|
3579
|
-
return ["pdf", "json"].includes(
|
|
3578
|
+
function o(x) {
|
|
3579
|
+
return ["pdf", "json"].includes(x.ext);
|
|
3580
3580
|
}
|
|
3581
|
-
function a(
|
|
3582
|
-
return ["ppt", "pptx", "doc", "docx", "xls", "xlsx"].includes(
|
|
3581
|
+
function a(x) {
|
|
3582
|
+
return ["ppt", "pptx", "doc", "docx", "xls", "xlsx"].includes(x.ext);
|
|
3583
3583
|
}
|
|
3584
|
-
function i(
|
|
3584
|
+
function i(x) {
|
|
3585
3585
|
const w = document.createElement("a");
|
|
3586
|
-
w.setAttribute("download",
|
|
3586
|
+
w.setAttribute("download", x?.uploaded_name), w.href = x?.file_path, w.click();
|
|
3587
3587
|
}
|
|
3588
|
-
function r(
|
|
3589
|
-
|
|
3588
|
+
function r(x) {
|
|
3589
|
+
x?.file_path && window.open(x.file_path, "_blank");
|
|
3590
3590
|
}
|
|
3591
3591
|
async function c() {
|
|
3592
3592
|
try {
|
|
3593
3593
|
await fetch(
|
|
3594
3594
|
`${n.prefix}/widget/file/${n.item.entity_id}/${n.item.file_id}`
|
|
3595
3595
|
), l("update");
|
|
3596
|
-
} catch (
|
|
3597
|
-
console.error(
|
|
3596
|
+
} catch (x) {
|
|
3597
|
+
console.error(x);
|
|
3598
3598
|
}
|
|
3599
3599
|
}
|
|
3600
3600
|
function f() {
|
|
@@ -3607,46 +3607,46 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3607
3607
|
updateListOnConfirm: !0
|
|
3608
3608
|
});
|
|
3609
3609
|
}
|
|
3610
|
-
function x
|
|
3611
|
-
(n.item.ext === "jpg" || n.item.ext === "png") && l("openLightbox", { item: n.item, index:
|
|
3610
|
+
function _(x) {
|
|
3611
|
+
(n.item.ext === "jpg" || n.item.ext === "png") && l("openLightbox", { item: n.item, index: x });
|
|
3612
3612
|
}
|
|
3613
|
-
return (
|
|
3614
|
-
|
|
3613
|
+
return (x, w) => (u(), v("div", Zi, [
|
|
3614
|
+
x.item.ext === "jpg" || x.item.ext === "png" ? (u(), v("div", Ji, [
|
|
3615
3615
|
d("div", {
|
|
3616
3616
|
class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
|
|
3617
|
-
onClick: w[0] || (w[0] = (b) => x
|
|
3617
|
+
onClick: w[0] || (w[0] = (b) => _(x.index))
|
|
3618
3618
|
}, [
|
|
3619
|
-
G(Bn, { item:
|
|
3619
|
+
G(Bn, { item: x.item }, null, 8, ["item"])
|
|
3620
3620
|
])
|
|
3621
|
-
])) : o(
|
|
3622
|
-
G(Bn, { item:
|
|
3623
|
-
])) : a(
|
|
3621
|
+
])) : o(x.item) ? (u(), v("div", Qi, [
|
|
3622
|
+
G(Bn, { item: x.item }, null, 8, ["item"])
|
|
3623
|
+
])) : a(x.item) ? (u(), v("div", eu, [
|
|
3624
3624
|
d("a", {
|
|
3625
|
-
href: `/api/file-preview?id=${
|
|
3625
|
+
href: `/api/file-preview?id=${x.item.file_id}`,
|
|
3626
3626
|
target: "_blank",
|
|
3627
3627
|
class: "flex gap-x-3 w-full items-center"
|
|
3628
3628
|
}, [
|
|
3629
|
-
G(Bn, { item:
|
|
3629
|
+
G(Bn, { item: x.item }, null, 8, ["item"])
|
|
3630
3630
|
], 8, tu)
|
|
3631
3631
|
])) : (u(), v("div", nu, [
|
|
3632
|
-
G(Bn, { item:
|
|
3632
|
+
G(Bn, { item: x.item }, null, 8, ["item"])
|
|
3633
3633
|
])),
|
|
3634
3634
|
d("div", lu, [
|
|
3635
3635
|
d("div", au, [
|
|
3636
3636
|
d("div", ou, [
|
|
3637
3637
|
d("button", {
|
|
3638
3638
|
class: "inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
|
3639
|
-
onClick: w[1] || (w[1] = (b) => r(
|
|
3639
|
+
onClick: w[1] || (w[1] = (b) => r(x.item))
|
|
3640
3640
|
}, [
|
|
3641
|
-
G(
|
|
3641
|
+
G(q(Aa), { class: "h-4 w-4" })
|
|
3642
3642
|
])
|
|
3643
3643
|
]),
|
|
3644
3644
|
d("div", ru, [
|
|
3645
3645
|
d("button", {
|
|
3646
3646
|
class: "inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
|
3647
|
-
onClick: w[2] || (w[2] = (b) => i(
|
|
3647
|
+
onClick: w[2] || (w[2] = (b) => i(x.item))
|
|
3648
3648
|
}, [
|
|
3649
|
-
G(
|
|
3649
|
+
G(q(Il), { class: "h-4 w-4" })
|
|
3650
3650
|
])
|
|
3651
3651
|
]),
|
|
3652
3652
|
w[4] || (w[4] = d("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
|
|
@@ -3656,7 +3656,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3656
3656
|
class: "size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",
|
|
3657
3657
|
onClick: w[3] || (w[3] = (b) => f())
|
|
3658
3658
|
}, [
|
|
3659
|
-
G(
|
|
3659
|
+
G(q(on), { class: "h-4 w-4" })
|
|
3660
3660
|
])
|
|
3661
3661
|
])
|
|
3662
3662
|
])
|
|
@@ -3686,13 +3686,13 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3686
3686
|
},
|
|
3687
3687
|
emits: ["update"],
|
|
3688
3688
|
setup(e, { emit: t }) {
|
|
3689
|
-
const n = e, l = dt("form"), o = y(() => l.value.formId), a = D(!1), i = D(0), r = t, c = D(!1), f = D({}),
|
|
3689
|
+
const n = e, l = dt("form"), o = y(() => l.value.formId), a = D(!1), i = D(0), r = t, c = D(!1), f = D({}), _ = D([]), x = D(""), w = y(() => Array.isArray(_.value) ? _.value.filter((V) => V.ext === "jpg" || V.ext === "png").map((V) => V?.file_path) : []), b = y(() => x.value === "" ? _.value : _.value.filter((V) => V?.uploaded_name?.includes(x.value))), m = (V) => {
|
|
3690
3690
|
const A = w.value.findIndex((U) => U === V.item.file_path);
|
|
3691
3691
|
A !== -1 && (a.value = !0, i.value = A);
|
|
3692
|
-
},
|
|
3692
|
+
}, k = async () => {
|
|
3693
3693
|
try {
|
|
3694
3694
|
const V = await fetch(`${n.prefix}/widget/file/${o.value}`).then((A) => A.json());
|
|
3695
|
-
|
|
3695
|
+
_.value = V?.rows;
|
|
3696
3696
|
} catch (V) {
|
|
3697
3697
|
console.error(V);
|
|
3698
3698
|
}
|
|
@@ -3716,26 +3716,26 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3716
3716
|
}), console.error(Z), null;
|
|
3717
3717
|
}
|
|
3718
3718
|
})
|
|
3719
|
-
), await
|
|
3719
|
+
), await k();
|
|
3720
3720
|
}, M = (V) => {
|
|
3721
3721
|
const A = { ...V };
|
|
3722
3722
|
return V.cancel || (A.cancel = () => {
|
|
3723
3723
|
c.value = !1;
|
|
3724
3724
|
}), V.updateListOnConfirm && (A.confirm = async () => {
|
|
3725
|
-
await V.confirm(), c.value = !1,
|
|
3725
|
+
await V.confirm(), c.value = !1, k();
|
|
3726
3726
|
}), A;
|
|
3727
3727
|
}, C = (V) => {
|
|
3728
3728
|
f.value = M(V), c.value = !0;
|
|
3729
3729
|
};
|
|
3730
3730
|
return ve(o, (V) => {
|
|
3731
|
-
V &&
|
|
3731
|
+
V && k();
|
|
3732
3732
|
}), lt(() => {
|
|
3733
|
-
o.value &&
|
|
3733
|
+
o.value && k();
|
|
3734
3734
|
}), (V, A) => {
|
|
3735
3735
|
const U = vt("Lightbox"), Z = vt("MessageBox");
|
|
3736
3736
|
return u(), v("div", uu, [
|
|
3737
3737
|
d("div", du, [
|
|
3738
|
-
d("h2", cu, " Файлів: " + ce(
|
|
3738
|
+
d("h2", cu, " Файлів: " + ce(_.value?.length), 1),
|
|
3739
3739
|
d("div", fu, [
|
|
3740
3740
|
d("label", null, [
|
|
3741
3741
|
d("input", {
|
|
@@ -3744,26 +3744,26 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3744
3744
|
onChange: A[0] || (A[0] = (F) => g(F))
|
|
3745
3745
|
}, null, 32),
|
|
3746
3746
|
d("div", pu, [
|
|
3747
|
-
G(
|
|
3747
|
+
G(q(Va), { class: "h-4 w-4" })
|
|
3748
3748
|
])
|
|
3749
3749
|
])
|
|
3750
3750
|
])
|
|
3751
3751
|
]),
|
|
3752
|
-
|
|
3752
|
+
_.value?.length > 4 ? (u(), v("div", mu, [
|
|
3753
3753
|
d("div", null, [
|
|
3754
3754
|
d("div", vu, [
|
|
3755
3755
|
d("div", gu, [
|
|
3756
|
-
G(
|
|
3756
|
+
G(q(Qn), { class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400" })
|
|
3757
3757
|
]),
|
|
3758
3758
|
Re(d("input", {
|
|
3759
3759
|
type: "text",
|
|
3760
|
-
"onUpdate:modelValue": A[1] || (A[1] = (F) =>
|
|
3760
|
+
"onUpdate:modelValue": A[1] || (A[1] = (F) => x.value = F),
|
|
3761
3761
|
class: "py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",
|
|
3762
3762
|
placeholder: "Введіть назву файлу"
|
|
3763
3763
|
}, null, 512), [
|
|
3764
3764
|
[
|
|
3765
3765
|
at,
|
|
3766
|
-
|
|
3766
|
+
x.value,
|
|
3767
3767
|
void 0,
|
|
3768
3768
|
{ trim: !0 }
|
|
3769
3769
|
]
|
|
@@ -3771,7 +3771,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3771
3771
|
])
|
|
3772
3772
|
])
|
|
3773
3773
|
])) : K("", !0),
|
|
3774
|
-
|
|
3774
|
+
_.value?.length ? (u(), v("div", yu, [
|
|
3775
3775
|
(u(!0), v(Ae, null, Be(b.value, (F, j) => (u(), xe(iu, {
|
|
3776
3776
|
key: j,
|
|
3777
3777
|
prefix: V.prefix,
|
|
@@ -3873,7 +3873,7 @@ const Si = /* @__PURE__ */ Xe(hi, [["render", $i]]), Ci = /* @__PURE__ */ ge({
|
|
|
3873
3873
|
onClick: o[0] || (o[0] = (a) => n.value = !n.value),
|
|
3874
3874
|
class: "flex items-center gap-2"
|
|
3875
3875
|
}, [
|
|
3876
|
-
G(
|
|
3876
|
+
G(q(pn), {
|
|
3877
3877
|
class: ie(["h-4 w-4 duration-300", [n.value ? "-rotate-180" : ""]])
|
|
3878
3878
|
}, null, 8, ["class"]),
|
|
3879
3879
|
d("span", Su, ce(e.title), 1)
|
|
@@ -4015,9 +4015,9 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4015
4015
|
}, { ref_for: !0 }, f, {
|
|
4016
4016
|
item: f,
|
|
4017
4017
|
modelValue: i.value[f.name],
|
|
4018
|
-
"onUpdate:modelValue": (
|
|
4018
|
+
"onUpdate:modelValue": (_) => i.value[f.name] = _,
|
|
4019
4019
|
style: e.style,
|
|
4020
|
-
error:
|
|
4020
|
+
error: q(l)?.errors?.[f.name]
|
|
4021
4021
|
}), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
|
|
4022
4022
|
]),
|
|
4023
4023
|
_: 1
|
|
@@ -4031,17 +4031,17 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4031
4031
|
modelValue: o,
|
|
4032
4032
|
onCreated: a
|
|
4033
4033
|
}) => {
|
|
4034
|
-
const i = D(!1), r = D({}), c = D([]), f = D(null),
|
|
4034
|
+
const i = D(!1), r = D({}), c = D([]), f = D(null), _ = y(() => e.add?.title || "Додати"), x = y(() => e.add?.token || e.add?.model || ""), w = y(() => e.add?.pk || "id");
|
|
4035
4035
|
return {
|
|
4036
4036
|
isOpenAdd: i,
|
|
4037
4037
|
addData: r,
|
|
4038
4038
|
addSchema: c,
|
|
4039
4039
|
addForm: f,
|
|
4040
|
-
addTitle:
|
|
4040
|
+
addTitle: _,
|
|
4041
4041
|
addOption: async () => {
|
|
4042
|
-
if (!(!
|
|
4042
|
+
if (!(!x.value || f?.value.validate()))
|
|
4043
4043
|
try {
|
|
4044
|
-
const g = e.add?.api ?? `/api/table/${
|
|
4044
|
+
const g = e.add?.api ?? `/api/table/${x.value}`, M = await fetch(g, {
|
|
4045
4045
|
method: "POST",
|
|
4046
4046
|
headers: { "Content-Type": "application/json" },
|
|
4047
4047
|
body: JSON.stringify(r.value)
|
|
@@ -4075,8 +4075,8 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4075
4075
|
},
|
|
4076
4076
|
onAddValue: async () => {
|
|
4077
4077
|
if (!e.add) return null;
|
|
4078
|
-
const
|
|
4079
|
-
return c.value =
|
|
4078
|
+
const k = await fetch(`/api/template/form/${e.add.form}`).then((g) => g.json());
|
|
4079
|
+
return c.value = k.schema, r.value = {}, i.value = !0, null;
|
|
4080
4080
|
}
|
|
4081
4081
|
};
|
|
4082
4082
|
}, qu = ["aria-expanded", "data-focus"], Ku = { class: "vs-input-select__value-area relative flex flex-1 items-center gap-1 py-0.5 pl-1 pr-0 overflow-hidden h-full min-w-0" }, Yu = {
|
|
@@ -4189,7 +4189,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4189
4189
|
class: "flex items-center rounded-sm px-1 box-border text-[#172b4d] hover:bg-[rgb(255,189,173)] hover:text-[rgb(222,53,11)] flex-shrink-0",
|
|
4190
4190
|
onClick: Ee((c) => a.onRemoveSelected(r.id), ["stop"])
|
|
4191
4191
|
}, [
|
|
4192
|
-
G(
|
|
4192
|
+
G(q(Ct), {
|
|
4193
4193
|
"aria-hidden": "true",
|
|
4194
4194
|
focusable: "false",
|
|
4195
4195
|
class: "inline-block h-4 w-4"
|
|
@@ -4284,7 +4284,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4284
4284
|
["stop"]
|
|
4285
4285
|
))
|
|
4286
4286
|
}, [
|
|
4287
|
-
G(
|
|
4287
|
+
G(q(Ct), { class: "h-4 w-4" })
|
|
4288
4288
|
], 8, id)) : K("", !0),
|
|
4289
4289
|
a.showClear ? (u(), v("div", ud)) : K("", !0),
|
|
4290
4290
|
d("button", {
|
|
@@ -4299,7 +4299,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4299
4299
|
)),
|
|
4300
4300
|
title: a.isOpen ? "Закрити список" : "Відкрити список"
|
|
4301
4301
|
}, [
|
|
4302
|
-
G(
|
|
4302
|
+
G(q(pn), { class: "h-4 w-4" })
|
|
4303
4303
|
], 8, dd)
|
|
4304
4304
|
])
|
|
4305
4305
|
], 42, qu));
|
|
@@ -4417,20 +4417,20 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4417
4417
|
emits: ["change", "update:modelValue", "value-selected"],
|
|
4418
4418
|
setup(e, { emit: t }) {
|
|
4419
4419
|
const n = e, l = t, o = y(() => n.multiple), a = y(() => n.disabled), i = y(() => n.search);
|
|
4420
|
-
|
|
4420
|
+
wt(n.style);
|
|
4421
4421
|
const r = y({
|
|
4422
4422
|
get: () => n.modelValue,
|
|
4423
4423
|
set: (N) => l("update:modelValue", N)
|
|
4424
4424
|
});
|
|
4425
4425
|
!r.value && n.defaultValue && (r.value = n.defaultValue);
|
|
4426
|
-
const c = D(null), f = D(null),
|
|
4426
|
+
const c = D(null), f = D(null), _ = D(null), x = D(null), w = D(!1), b = D(!1), m = D(null), k = D(-1), g = D([]), M = D(""), C = D(null), V = (N) => {
|
|
4427
4427
|
f.value = N;
|
|
4428
4428
|
}, A = (N) => {
|
|
4429
4429
|
C.value = N;
|
|
4430
4430
|
}, U = (N) => {
|
|
4431
|
-
k.value = N;
|
|
4432
|
-
}, Z = (N) => {
|
|
4433
4431
|
x.value = N;
|
|
4432
|
+
}, Z = (N) => {
|
|
4433
|
+
_.value = N;
|
|
4434
4434
|
}, F = (N, re) => {
|
|
4435
4435
|
g.value[re] = N;
|
|
4436
4436
|
}, j = D({}), B = D([]), P = y(() => {
|
|
@@ -4458,11 +4458,11 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4458
4458
|
if (!ee) return !1;
|
|
4459
4459
|
const je = ee.value?.[N] ?? {}, ot = (rt, kt, Tt) => {
|
|
4460
4460
|
if (!kt.length) return rt;
|
|
4461
|
-
const [$t, ...
|
|
4462
|
-
if (!
|
|
4461
|
+
const [$t, ...bt] = kt, yt = { ...rt };
|
|
4462
|
+
if (!bt.length)
|
|
4463
4463
|
return yt[$t] = Tt, yt;
|
|
4464
4464
|
const gn = typeof rt[$t] == "object" && rt[$t] !== null ? rt[$t] : {};
|
|
4465
|
-
return yt[$t] = ot(gn,
|
|
4465
|
+
return yt[$t] = ot(gn, bt, Tt), yt;
|
|
4466
4466
|
}, it = ot(je, re, $e);
|
|
4467
4467
|
return ee.value = {
|
|
4468
4468
|
...ee.value || {},
|
|
@@ -4536,7 +4536,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4536
4536
|
if (N == null || N === "") return null;
|
|
4537
4537
|
const re = Ve.value?.find(($e) => $e?.id?.toString() === String(N));
|
|
4538
4538
|
return re || Je(N);
|
|
4539
|
-
},
|
|
4539
|
+
}, W = async (N) => {
|
|
4540
4540
|
const re = new Set(Ve.value.map((je) => je.id?.toString())), $e = N.filter((je) => !re.has(je?.toString()));
|
|
4541
4541
|
$e.length && await $e.reduce(async (je, ot) => {
|
|
4542
4542
|
await je;
|
|
@@ -4545,7 +4545,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4545
4545
|
}, Promise.resolve());
|
|
4546
4546
|
}, le = () => {
|
|
4547
4547
|
if (!te.value.length) {
|
|
4548
|
-
|
|
4548
|
+
k.value = -1;
|
|
4549
4549
|
return;
|
|
4550
4550
|
}
|
|
4551
4551
|
let N = 0;
|
|
@@ -4553,8 +4553,8 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4553
4553
|
const re = m.value.id?.toString(), $e = te.value.findIndex((je) => je.id?.toString() === re);
|
|
4554
4554
|
$e >= 0 && (N = $e);
|
|
4555
4555
|
}
|
|
4556
|
-
|
|
4557
|
-
O(g.value[N],
|
|
4556
|
+
k.value = N, et(() => {
|
|
4557
|
+
O(g.value[N], _.value);
|
|
4558
4558
|
});
|
|
4559
4559
|
}, ae = async () => {
|
|
4560
4560
|
a.value || (w.value = !0, await et(() => {
|
|
@@ -4563,7 +4563,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4563
4563
|
De(), C.value?.focus();
|
|
4564
4564
|
}), le());
|
|
4565
4565
|
}, we = () => {
|
|
4566
|
-
w.value = !1,
|
|
4566
|
+
w.value = !1, k.value = -1, et(() => {
|
|
4567
4567
|
C.value?.blur();
|
|
4568
4568
|
});
|
|
4569
4569
|
}, Ce = async (N) => {
|
|
@@ -4592,7 +4592,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4592
4592
|
});
|
|
4593
4593
|
}, $ = (N, re = "manual") => {
|
|
4594
4594
|
o.value ? (X(N.id) || (B.value = [...B.value, N.id], r.value = [...B.value], l("change", r.value), z(N)), M.value = "", et(() => {
|
|
4595
|
-
C.value?.focus(),
|
|
4595
|
+
C.value?.focus(), k.value = Math.min(k.value, te.value.length - 1);
|
|
4596
4596
|
}), Ie(null)) : (m.value = N, r.value = N.id, l("change", r.value), z(N), M.value = "", we(), Ie(N), re === "parent-auto" && Me({
|
|
4597
4597
|
source: re,
|
|
4598
4598
|
parentField: n.parent ?? null,
|
|
@@ -4625,10 +4625,10 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4625
4625
|
}, De = () => {
|
|
4626
4626
|
if (!f.value) return;
|
|
4627
4627
|
const N = f.value.getBoundingClientRect(), re = window.innerHeight || document.documentElement.clientHeight, $e = window.innerWidth || document.documentElement.clientWidth, je = 8, ot = 8, it = n.maxHeight || 300, rt = re - N.bottom - ot - je, kt = N.top - ot - je, Tt = rt >= kt, $t = Math.max($e - je * 2, 0);
|
|
4628
|
-
let { width:
|
|
4629
|
-
$t > 0 &&
|
|
4628
|
+
let { width: bt } = N;
|
|
4629
|
+
$t > 0 && bt > $t && (bt = $t);
|
|
4630
4630
|
let { left: yt } = N;
|
|
4631
|
-
yt +
|
|
4631
|
+
yt + bt + je > $e && (yt = $e - bt - je), yt = Math.max(yt, je);
|
|
4632
4632
|
const gn = Math.min(
|
|
4633
4633
|
it,
|
|
4634
4634
|
Math.max(Tt ? rt : kt, 50)
|
|
@@ -4636,7 +4636,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4636
4636
|
j.value = {
|
|
4637
4637
|
position: "fixed",
|
|
4638
4638
|
left: `${yt}px`,
|
|
4639
|
-
width: `${
|
|
4639
|
+
width: `${bt}px`,
|
|
4640
4640
|
maxHeight: `${gn}px`,
|
|
4641
4641
|
transform: Tt ? "none" : "translateY(-100%)",
|
|
4642
4642
|
top: Tt ? `${N.bottom + ot}px` : `${N.top - ot}px`
|
|
@@ -4647,25 +4647,25 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4647
4647
|
if (!w.value) return;
|
|
4648
4648
|
const { key: re } = N;
|
|
4649
4649
|
if (re === "ArrowDown")
|
|
4650
|
-
N.preventDefault(),
|
|
4650
|
+
N.preventDefault(), k.value + 1 < te.value.length && (k.value += 1, O(g.value[k.value], _.value));
|
|
4651
4651
|
else if (re === "ArrowUp")
|
|
4652
|
-
N.preventDefault(),
|
|
4652
|
+
N.preventDefault(), k.value > 0 && (k.value -= 1, O(g.value[k.value], _.value));
|
|
4653
4653
|
else if (re === "Enter") {
|
|
4654
4654
|
N.preventDefault();
|
|
4655
|
-
const $e = te.value[
|
|
4655
|
+
const $e = te.value[k.value];
|
|
4656
4656
|
$e && $($e), C.value?.blur();
|
|
4657
|
-
} else re === "Escape" ? (N.preventDefault(), we()) : re === "Backspace" ? o.value && M.value === "" && B.value.length && (B.value = B.value.slice(0, -1), r.value = [...B.value], l("change", r.value)) : re === "Home" ? (
|
|
4657
|
+
} else re === "Escape" ? (N.preventDefault(), we()) : re === "Backspace" ? o.value && M.value === "" && B.value.length && (B.value = B.value.slice(0, -1), r.value = [...B.value], l("change", r.value)) : re === "Home" ? (k.value = 0, O(g.value[0], _.value)) : re === "End" ? (k.value = te.value.length - 1, O(g.value[k.value], _.value)) : re === "Tab" && we();
|
|
4658
4658
|
}, pt = () => {
|
|
4659
4659
|
a.value || (b.value = !0);
|
|
4660
|
-
},
|
|
4660
|
+
}, ht = () => {
|
|
4661
4661
|
b.value = !1, M.value = "";
|
|
4662
4662
|
}, xt = (N) => {
|
|
4663
4663
|
N.key === "Escape" && w.value && we();
|
|
4664
4664
|
}, E = (N) => {
|
|
4665
4665
|
const re = N.target;
|
|
4666
|
-
c.value?.contains(re) ||
|
|
4666
|
+
c.value?.contains(re) || x.value?.contains(re) || we();
|
|
4667
4667
|
}, he = (N) => {
|
|
4668
|
-
w.value &&
|
|
4668
|
+
w.value && _.value && !_.value.contains(N.target) && De();
|
|
4669
4669
|
}, mt = () => {
|
|
4670
4670
|
w.value && De();
|
|
4671
4671
|
}, Bt = () => {
|
|
@@ -4673,7 +4673,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4673
4673
|
};
|
|
4674
4674
|
async function Lt() {
|
|
4675
4675
|
if (o.value)
|
|
4676
|
-
Array.isArray(r.value) ? B.value = [...r.value] : (B.value = r.value == null ? [] : [r.value], r.value = [...B.value]), n.data && B.value.length && (await
|
|
4676
|
+
Array.isArray(r.value) ? B.value = [...r.value] : (B.value = r.value == null ? [] : [r.value], r.value = [...B.value]), n.data && B.value.length && (await W(B.value), await et());
|
|
4677
4677
|
else {
|
|
4678
4678
|
if (Array.isArray(r.value)) {
|
|
4679
4679
|
const N = r.value[0] ?? null;
|
|
@@ -4732,11 +4732,11 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4732
4732
|
N && $(N, "parent-auto");
|
|
4733
4733
|
}
|
|
4734
4734
|
}), (N, re) => (u(), v(Ae, null, [
|
|
4735
|
-
G(
|
|
4736
|
-
visible:
|
|
4735
|
+
G(q(el), {
|
|
4736
|
+
visible: q(st),
|
|
4737
4737
|
"onUpdate:visible": re[2] || (re[2] = ($e) => Yn(st) ? st.value = $e : null),
|
|
4738
4738
|
class: "z-[1000]",
|
|
4739
|
-
title:
|
|
4739
|
+
title: q(Gt),
|
|
4740
4740
|
teleport: N.teleport
|
|
4741
4741
|
}, {
|
|
4742
4742
|
footer: ut(({ handleClose: $e }) => [
|
|
@@ -4750,14 +4750,14 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4750
4750
|
type: "button",
|
|
4751
4751
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700",
|
|
4752
4752
|
onClick: re[1] || (re[1] = //@ts-ignore
|
|
4753
|
-
(...je) =>
|
|
4753
|
+
(...je) => q(Ln) && q(Ln)(...je))
|
|
4754
4754
|
}, " Додати ")
|
|
4755
4755
|
])
|
|
4756
4756
|
]),
|
|
4757
4757
|
default: ut(() => [
|
|
4758
4758
|
G(qt, {
|
|
4759
|
-
schema:
|
|
4760
|
-
modelValue:
|
|
4759
|
+
schema: q(rn),
|
|
4760
|
+
modelValue: q(Yt),
|
|
4761
4761
|
"onUpdate:modelValue": re[0] || (re[0] = ($e) => Yn(Yt) ? Yt.value = $e : null),
|
|
4762
4762
|
ref_key: "addForm",
|
|
4763
4763
|
ref: sn
|
|
@@ -4813,7 +4813,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4813
4813
|
"on-control-keydown": Qe,
|
|
4814
4814
|
"on-control-click": Ne,
|
|
4815
4815
|
"on-input-focus": pt,
|
|
4816
|
-
"on-input-blur":
|
|
4816
|
+
"on-input-blur": ht,
|
|
4817
4817
|
"on-input-keydown": Ge,
|
|
4818
4818
|
"on-remove-selected": qe,
|
|
4819
4819
|
"on-clear-selected": We,
|
|
@@ -4823,7 +4823,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4823
4823
|
"is-open": w.value,
|
|
4824
4824
|
"dropdown-style": j.value,
|
|
4825
4825
|
"filtered-options-list": te.value,
|
|
4826
|
-
"selected-nav-index":
|
|
4826
|
+
"selected-nav-index": k.value,
|
|
4827
4827
|
"option-template": Y.value,
|
|
4828
4828
|
"icon-wrapper-class": ma,
|
|
4829
4829
|
"set-dropdown-ref": U,
|
|
@@ -4841,12 +4841,12 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4841
4841
|
n.add ? (u(), v("button", {
|
|
4842
4842
|
key: 0,
|
|
4843
4843
|
onClick: re[4] || (re[4] = //@ts-ignore
|
|
4844
|
-
(...$e) =>
|
|
4844
|
+
(...$e) => q(An) && q(An)(...$e)),
|
|
4845
4845
|
class: "bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",
|
|
4846
4846
|
disabled: a.value,
|
|
4847
4847
|
type: "button"
|
|
4848
4848
|
}, [
|
|
4849
|
-
G(
|
|
4849
|
+
G(q(Ot), { class: "h-4 w-4" }),
|
|
4850
4850
|
re[8] || (re[8] = d("span", null, "Додати", -1))
|
|
4851
4851
|
], 8, bd)) : K("", !0)
|
|
4852
4852
|
], 512)
|
|
@@ -4891,13 +4891,13 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4891
4891
|
emits: ["change", "update:modelValue", "value-selected"],
|
|
4892
4892
|
setup(e, { emit: t }) {
|
|
4893
4893
|
const n = e, l = t;
|
|
4894
|
-
|
|
4894
|
+
wt(n.style);
|
|
4895
4895
|
const o = y({
|
|
4896
4896
|
get: () => Array.isArray(n.modelValue) ? n.modelValue[0] ?? null : n.modelValue ?? null,
|
|
4897
4897
|
set: (se) => l("update:modelValue", se)
|
|
4898
4898
|
});
|
|
4899
4899
|
o.value == null && n.defaultValue != null && (o.value = n.defaultValue);
|
|
4900
|
-
const a = dt("values"), i = dt("field-props"), r = y(() => !!n.disabled), c = D(null), f = D(!1),
|
|
4900
|
+
const a = dt("values"), i = dt("field-props"), r = y(() => !!n.disabled), c = D(null), f = D(!1), _ = D(null), x = D(null), w = D(null), b = D({}), m = `vs-input-inline-select-${Nl()}`, k = y(() => n.placeholder || "Оберіть значення"), g = y(() => U(c.value) || n.placeholder || "Оберіть значення"), M = y(() => n.slot ?? ""), C = y(() => tl(M.value)), V = y(() => n.teleport || "body"), A = /^#(?:[\da-fA-F]{3}|[\da-fA-F]{6}|[\da-fA-F]{8})$/, U = (se) => al(se, M.value), Z = (se) => !!(!C.value && Qt(se)), F = y(() => {
|
|
4901
4901
|
const se = Qt(c.value).trim();
|
|
4902
4902
|
return se ? A.test(se) ? `bg-[${se}] border-[${se}]` : `bg-${se.toLowerCase()}-500 border-${se.toLowerCase()}-500` : "";
|
|
4903
4903
|
}), {
|
|
@@ -4935,8 +4935,8 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4935
4935
|
ze.length && Se(Je, ze, He ?? null) || Me && (Me[Je] = He ?? null);
|
|
4936
4936
|
});
|
|
4937
4937
|
}, te = (se) => o.value?.toString?.() === se?.toString?.(), J = () => {
|
|
4938
|
-
if (!
|
|
4939
|
-
const se =
|
|
4938
|
+
if (!x.value || typeof window > "u") return;
|
|
4939
|
+
const se = x.value.getBoundingClientRect(), Me = 8, Ie = 8, Ve = window.innerHeight || document.documentElement.clientHeight, He = window.innerWidth || document.documentElement.clientWidth, Ze = w.value?.offsetHeight || 260, Je = Math.max(se.width, 176), ze = Math.max(He - Me * 2, 120), ue = Math.min(Je, ze);
|
|
4940
4940
|
let oe = se.left;
|
|
4941
4941
|
oe + ue + Me > He && (oe = He - ue - Me), oe = Math.max(oe, Me);
|
|
4942
4942
|
const Le = Ve - se.bottom - Ie - Me, Pe = se.top - Ie - Me, Ye = Le < Math.min(Ze, 260) && Pe > Le, ct = Math.max(120, Math.min(320, Ye ? Pe : Le));
|
|
@@ -4985,7 +4985,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
4985
4985
|
c.value = se, o.value = se.id, l("change", se.id), ne(se), X(se), ye();
|
|
4986
4986
|
}, fe = (se) => {
|
|
4987
4987
|
const Me = se.target;
|
|
4988
|
-
|
|
4988
|
+
_.value?.contains(Me) || w.value?.contains(Me) || ye();
|
|
4989
4989
|
}, be = () => {
|
|
4990
4990
|
f.value && J();
|
|
4991
4991
|
};
|
|
@@ -5002,13 +5002,13 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
5002
5002
|
}), (se, Me) => (u(), v("div", {
|
|
5003
5003
|
class: "relative inline-flex w-full max-w-full",
|
|
5004
5004
|
ref_key: "rootRef",
|
|
5005
|
-
ref:
|
|
5005
|
+
ref: _,
|
|
5006
5006
|
onClick: Me[0] || (Me[0] = Ee(() => {
|
|
5007
5007
|
}, ["stop"]))
|
|
5008
5008
|
}, [
|
|
5009
5009
|
d("button", {
|
|
5010
5010
|
ref_key: "triggerRef",
|
|
5011
|
-
ref:
|
|
5011
|
+
ref: x,
|
|
5012
5012
|
type: "button",
|
|
5013
5013
|
disabled: r.value,
|
|
5014
5014
|
"aria-expanded": f.value ? "true" : "false",
|
|
@@ -5033,12 +5033,12 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
5033
5033
|
}, [
|
|
5034
5034
|
d("div", $d, [
|
|
5035
5035
|
d("span", Sd, [
|
|
5036
|
-
d("span", Cd, ce(
|
|
5036
|
+
d("span", Cd, ce(k.value), 1)
|
|
5037
5037
|
])
|
|
5038
5038
|
]),
|
|
5039
5039
|
d("div", Md, [
|
|
5040
5040
|
d("div", Ld, [
|
|
5041
|
-
(u(!0), v(Ae, null, Be(
|
|
5041
|
+
(u(!0), v(Ae, null, Be(q(j), (Ie) => (u(), v("label", {
|
|
5042
5042
|
key: Ie.id,
|
|
5043
5043
|
class: "py-1.5 px-3 group flex items-center gap-x-3 rounded-lg cursor-pointer text-[13px] text-gray-800 hover:bg-gray-100",
|
|
5044
5044
|
onClick: Ee((Ve) => R(Ie), ["prevent"])
|
|
@@ -5058,12 +5058,12 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
5058
5058
|
}, null, 4)) : (u(), v("span", Id))
|
|
5059
5059
|
]),
|
|
5060
5060
|
d("span", Td, ce(U(Ie)), 1),
|
|
5061
|
-
G(
|
|
5061
|
+
G(q(La), {
|
|
5062
5062
|
class: ie(["shrink-0 size-3.5 ms-auto transition-opacity", te(Ie.id) ? "opacity-100" : "opacity-0"])
|
|
5063
5063
|
}, null, 8, ["class"])
|
|
5064
5064
|
], 8, Ad))), 128))
|
|
5065
5065
|
]),
|
|
5066
|
-
|
|
5066
|
+
q(j).length ? K("", !0) : (u(), v("p", Ed, "Немає варіантів"))
|
|
5067
5067
|
])
|
|
5068
5068
|
], 4)) : K("", !0)
|
|
5069
5069
|
], 8, ["to"]))
|
|
@@ -5087,7 +5087,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
5087
5087
|
}),
|
|
5088
5088
|
emits: ["update:modelValue"],
|
|
5089
5089
|
setup(e) {
|
|
5090
|
-
const t = e, { inputClass: n } =
|
|
5090
|
+
const t = e, { inputClass: n } = wt(t.style), l = Ke(e, "modelValue"), o = y(() => !!t.disabled), a = y(() => t.placeholder ?? "");
|
|
5091
5091
|
function i() {
|
|
5092
5092
|
typeof l.value == "string" && (l.value = l.value.trim());
|
|
5093
5093
|
}
|
|
@@ -5097,7 +5097,7 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
5097
5097
|
disabled: o.value,
|
|
5098
5098
|
row: "2",
|
|
5099
5099
|
onBlur: i,
|
|
5100
|
-
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [
|
|
5100
|
+
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [q(n)]]),
|
|
5101
5101
|
style: {
|
|
5102
5102
|
border: "1px solid #CFD9E0"
|
|
5103
5103
|
}
|
|
@@ -5125,20 +5125,20 @@ const Wu = /* @__PURE__ */ ge({
|
|
|
5125
5125
|
}),
|
|
5126
5126
|
emits: ["update:modelValue"],
|
|
5127
5127
|
setup(e) {
|
|
5128
|
-
const t = Mo(() => import("./vs-richtext-
|
|
5128
|
+
const t = Mo(() => import("./vs-richtext-BS4M0Znk.js")), n = e, l = Ke(e, "modelValue"), o = y(() => !!n.disabled), a = y(() => n.placeholder ?? ""), i = y(() => ({
|
|
5129
5129
|
height: n.richtextProps.height || "300px",
|
|
5130
5130
|
format: n.format,
|
|
5131
5131
|
...n.richtextProps
|
|
5132
5132
|
}));
|
|
5133
|
-
return (
|
|
5134
|
-
class: ie(["!h-full",
|
|
5135
|
-
style: Oe(
|
|
5133
|
+
return (r, c) => (u(), v("div", {
|
|
5134
|
+
class: ie(["!h-full overflow-hidden rounded-md border border-solid border-stone-200 disabled:opacity-50 disabled:cursor-not-allowed", r.customClass]),
|
|
5135
|
+
style: Oe(o.value ? { pointerEvents: "none", opacity: 0.6 } : {})
|
|
5136
5136
|
}, [
|
|
5137
|
-
G(
|
|
5138
|
-
modelValue:
|
|
5139
|
-
"onUpdate:modelValue":
|
|
5140
|
-
placeholder:
|
|
5141
|
-
},
|
|
5137
|
+
G(q(t), Jt({
|
|
5138
|
+
modelValue: l.value,
|
|
5139
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => l.value = f),
|
|
5140
|
+
placeholder: a.value
|
|
5141
|
+
}, i.value), null, 16, ["modelValue", "placeholder"])
|
|
5142
5142
|
], 6));
|
|
5143
5143
|
}
|
|
5144
5144
|
}), Bd = {}, Rd = {
|
|
@@ -5196,77 +5196,77 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5196
5196
|
}),
|
|
5197
5197
|
emits: ["update:modelValue"],
|
|
5198
5198
|
setup(e) {
|
|
5199
|
-
const t = e, n = Lo(), l = (
|
|
5200
|
-
const
|
|
5199
|
+
const t = e, n = Lo(), l = (W) => t.actions === void 0 ? !0 : t.actions.includes(W), o = ["search", "import", "export", "add"], a = y(() => o.some((W) => l(W))), i = Ke(e, "modelValue"), r = D({}), c = D(""), f = D(null), _ = D("asc"), x = y(() => {
|
|
5200
|
+
const W = i.value ?? [], le = c.value ? W.filter((Ce) => w.value?.some((Ne) => {
|
|
5201
5201
|
const We = Ne.key || Ne.name;
|
|
5202
5202
|
if (!We) return !1;
|
|
5203
5203
|
const qe = Ce[We];
|
|
5204
5204
|
return qe ? Array.isArray(qe) ? qe.join(", ").toLowerCase().includes(c.value.toLowerCase()) : String(qe).toLowerCase().includes(c.value.toLowerCase()) : !1;
|
|
5205
|
-
})) :
|
|
5205
|
+
})) : W;
|
|
5206
5206
|
if (!f.value) return le;
|
|
5207
5207
|
const ae = f.value, we = [...le].sort((Ce, Ne) => {
|
|
5208
5208
|
const We = He(Ce?.[ae]), qe = He(Ne?.[ae]);
|
|
5209
5209
|
return typeof We == "number" && typeof qe == "number" ? We - qe : String(We).localeCompare(String(qe));
|
|
5210
5210
|
});
|
|
5211
|
-
return
|
|
5212
|
-
}), w = y(() => (t.colModel ?? []).filter((
|
|
5213
|
-
function g(
|
|
5214
|
-
return
|
|
5211
|
+
return _.value === "asc" ? we : we.reverse();
|
|
5212
|
+
}), w = y(() => (t.colModel ?? []).filter((W) => !W.tableHidden)), b = D(null), m = D(null), k = D(null);
|
|
5213
|
+
function g(W) {
|
|
5214
|
+
return W.pointerType === "touch" || W.pointerType === "pen";
|
|
5215
5215
|
}
|
|
5216
|
-
function M(
|
|
5217
|
-
const we = document.elementFromPoint(
|
|
5216
|
+
function M(W, le) {
|
|
5217
|
+
const we = document.elementFromPoint(W, le)?.closest?.("[data-row-index]") ?? null;
|
|
5218
5218
|
if (!we) return null;
|
|
5219
5219
|
const Ce = we.getAttribute("data-row-index");
|
|
5220
5220
|
if (Ce == null) return null;
|
|
5221
5221
|
const Ne = Number.parseInt(Ce, 10);
|
|
5222
5222
|
return Number.isNaN(Ne) ? null : Ne;
|
|
5223
5223
|
}
|
|
5224
|
-
function C(
|
|
5225
|
-
g(
|
|
5224
|
+
function C(W, le) {
|
|
5225
|
+
g(W) && (W.preventDefault(), W.currentTarget.setPointerCapture(W.pointerId), b.value = le, m.value = le);
|
|
5226
5226
|
}
|
|
5227
|
-
function V(
|
|
5228
|
-
if (b.value === null || !g(
|
|
5229
|
-
|
|
5230
|
-
const le = M(
|
|
5227
|
+
function V(W) {
|
|
5228
|
+
if (b.value === null || !g(W)) return;
|
|
5229
|
+
W.preventDefault();
|
|
5230
|
+
const le = M(W.clientX, W.clientY);
|
|
5231
5231
|
le !== null && (m.value = le);
|
|
5232
5232
|
}
|
|
5233
|
-
function A(
|
|
5234
|
-
if (b.value === null || !g(
|
|
5235
|
-
|
|
5236
|
-
const le = M(
|
|
5233
|
+
function A(W) {
|
|
5234
|
+
if (b.value === null || !g(W)) return;
|
|
5235
|
+
W.preventDefault();
|
|
5236
|
+
const le = M(W.clientX, W.clientY);
|
|
5237
5237
|
j(le ?? b.value);
|
|
5238
5238
|
try {
|
|
5239
|
-
|
|
5239
|
+
W.currentTarget.releasePointerCapture(W.pointerId);
|
|
5240
5240
|
} catch {
|
|
5241
5241
|
}
|
|
5242
5242
|
}
|
|
5243
|
-
function U(
|
|
5244
|
-
if (g(
|
|
5243
|
+
function U(W) {
|
|
5244
|
+
if (g(W)) {
|
|
5245
5245
|
b.value = null, m.value = null;
|
|
5246
5246
|
try {
|
|
5247
|
-
|
|
5247
|
+
W.currentTarget.releasePointerCapture(W.pointerId);
|
|
5248
5248
|
} catch {
|
|
5249
5249
|
}
|
|
5250
5250
|
}
|
|
5251
5251
|
}
|
|
5252
|
-
const Z = (
|
|
5253
|
-
b.value =
|
|
5254
|
-
}, F = (
|
|
5255
|
-
m.value =
|
|
5256
|
-
}, j = (
|
|
5257
|
-
if (b.value === null || b.value ===
|
|
5252
|
+
const Z = (W) => {
|
|
5253
|
+
b.value = W;
|
|
5254
|
+
}, F = (W) => {
|
|
5255
|
+
m.value = W;
|
|
5256
|
+
}, j = (W) => {
|
|
5257
|
+
if (b.value === null || b.value === W) {
|
|
5258
5258
|
b.value = null, m.value = null;
|
|
5259
5259
|
return;
|
|
5260
5260
|
}
|
|
5261
5261
|
const le = [...i.value], [ae] = le.splice(b.value, 1);
|
|
5262
|
-
le.splice(
|
|
5262
|
+
le.splice(W, 0, ae), i.value = le, b.value = null, m.value = null;
|
|
5263
5263
|
}, B = () => {
|
|
5264
|
-
|
|
5265
|
-
}, P = (
|
|
5266
|
-
const le = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], ae =
|
|
5264
|
+
k.value && k.value.click();
|
|
5265
|
+
}, P = (W) => {
|
|
5266
|
+
const le = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], ae = W.toLowerCase();
|
|
5267
5267
|
return le.some((we) => ae.endsWith(we));
|
|
5268
|
-
}, Q = (
|
|
5269
|
-
const ae =
|
|
5268
|
+
}, Q = (W) => {
|
|
5269
|
+
const ae = W.target.files?.[0];
|
|
5270
5270
|
if (!ae) return;
|
|
5271
5271
|
const we = new FileReader();
|
|
5272
5272
|
we.onload = (Ce) => {
|
|
@@ -5281,7 +5281,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5281
5281
|
}
|
|
5282
5282
|
}, we.readAsText(ae);
|
|
5283
5283
|
}, pe = () => {
|
|
5284
|
-
const
|
|
5284
|
+
const W = JSON.stringify(i.value, null, 2), le = new Blob([W], { type: "application/json" }), ae = URL.createObjectURL(le), we = document.createElement("a");
|
|
5285
5285
|
we.href = ae, we.download = "data.json", we.click(), URL.revokeObjectURL(ae);
|
|
5286
5286
|
}, Se = /* @__PURE__ */ new Set([
|
|
5287
5287
|
"autocomplete",
|
|
@@ -5289,13 +5289,13 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5289
5289
|
"radio",
|
|
5290
5290
|
"checkbox",
|
|
5291
5291
|
"combobox"
|
|
5292
|
-
]), X = /* @__PURE__ */ new Map(), te = (
|
|
5293
|
-
const ae = `/api/suggest/${
|
|
5292
|
+
]), X = /* @__PURE__ */ new Map(), te = (W, le) => {
|
|
5293
|
+
const ae = `/api/suggest/${W}`, we = ae.includes("?") ? "&" : "?", Ce = le ? `&val=${le}` : "";
|
|
5294
5294
|
return `${ae}${we}json=1${Ce}`;
|
|
5295
|
-
}, J = (
|
|
5295
|
+
}, J = (W) => W == null || W === "" ? null : typeof W == "object" ? W?.id !== void 0 && W.id !== null && W.id !== "" ? W.id : null : W, ee = (W) => {
|
|
5296
5296
|
const le = /* @__PURE__ */ new Set();
|
|
5297
5297
|
return Array.isArray(i.value) && i.value.forEach((ae) => {
|
|
5298
|
-
const we = ae?.[
|
|
5298
|
+
const we = ae?.[W];
|
|
5299
5299
|
if (we == null || we === "") return;
|
|
5300
5300
|
if (Array.isArray(we)) {
|
|
5301
5301
|
we.forEach((Ne) => {
|
|
@@ -5309,8 +5309,8 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5309
5309
|
}), le;
|
|
5310
5310
|
}, Y = async () => {
|
|
5311
5311
|
if (!t.colModel?.length) return;
|
|
5312
|
-
const
|
|
5313
|
-
|
|
5312
|
+
const W = t.colModel.filter((le) => le.data && Se.has(le.type?.toLowerCase() || ""));
|
|
5313
|
+
W.length && await Promise.all(W.map(async (le) => {
|
|
5314
5314
|
const ae = le.key || le.name;
|
|
5315
5315
|
if (!ae) return;
|
|
5316
5316
|
const we = ee(ae), Ce = Array.from(we).map((qe) => String(qe)).sort(), Ne = Ce.join(",");
|
|
@@ -5334,48 +5334,48 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5334
5334
|
);
|
|
5335
5335
|
const ke = D(""), ye = D(!1);
|
|
5336
5336
|
let T = "edit", ne = 0;
|
|
5337
|
-
const R = (
|
|
5337
|
+
const R = (W) => (W?.format || W?.type || "").toString().toLowerCase(), fe = y(() => (t.colModel?.filter((le) => R(le) !== "slot") ?? []).map((le) => {
|
|
5338
5338
|
const ae = le.key || le.name;
|
|
5339
5339
|
return ae ? { ...le, name: ae, key: ae } : le;
|
|
5340
|
-
})), be = D({}), se = D({}), Me = (
|
|
5340
|
+
})), be = D({}), se = D({}), Me = (W) => typeof W != "string" ? !1 : !!n[W], Ie = (W, le) => le ? le.split(".").reduce((ae, we) => ae == null ? ae : ae[we.trim()], W) : W, Ve = (W, le) => typeof W != "string" ? "" : W.replace(/{{\s*([^}]+)\s*}}/g, (ae, we) => {
|
|
5341
5341
|
const Ce = Ie(le, we.trim());
|
|
5342
5342
|
return Ce ?? "";
|
|
5343
|
-
}), He = (
|
|
5344
|
-
if (
|
|
5345
|
-
if (typeof
|
|
5346
|
-
if (typeof
|
|
5347
|
-
if (typeof
|
|
5348
|
-
if (Array.isArray(
|
|
5349
|
-
return
|
|
5350
|
-
if (typeof
|
|
5351
|
-
if (
|
|
5352
|
-
if (
|
|
5353
|
-
if (
|
|
5354
|
-
}
|
|
5355
|
-
return String(
|
|
5356
|
-
}, Ze = (
|
|
5357
|
-
const le =
|
|
5343
|
+
}), He = (W) => {
|
|
5344
|
+
if (W == null || W === "") return "";
|
|
5345
|
+
if (typeof W == "number") return W;
|
|
5346
|
+
if (typeof W == "boolean") return W ? 1 : 0;
|
|
5347
|
+
if (typeof W == "string") return W.toLowerCase();
|
|
5348
|
+
if (Array.isArray(W))
|
|
5349
|
+
return W.map((le) => He(le)).join(", ");
|
|
5350
|
+
if (typeof W == "object") {
|
|
5351
|
+
if (W.text !== void 0) return String(W.text).toLowerCase();
|
|
5352
|
+
if (W.label !== void 0) return String(W.label).toLowerCase();
|
|
5353
|
+
if (W.id !== void 0) return String(W.id).toLowerCase();
|
|
5354
|
+
}
|
|
5355
|
+
return String(W).toLowerCase();
|
|
5356
|
+
}, Ze = (W) => {
|
|
5357
|
+
const le = W.key || W.name;
|
|
5358
5358
|
if (le) {
|
|
5359
5359
|
if (f.value === le) {
|
|
5360
|
-
|
|
5360
|
+
_.value = _.value === "asc" ? "desc" : "asc";
|
|
5361
5361
|
return;
|
|
5362
5362
|
}
|
|
5363
|
-
f.value = le,
|
|
5363
|
+
f.value = le, _.value = "asc";
|
|
5364
5364
|
}
|
|
5365
5365
|
};
|
|
5366
5366
|
async function Je() {
|
|
5367
5367
|
ke.value = "Додати", ye.value = !0, T = "add", be.value = {};
|
|
5368
5368
|
}
|
|
5369
|
-
function ze(
|
|
5370
|
-
if (!
|
|
5369
|
+
function ze(W, le) {
|
|
5370
|
+
if (!W?.length) return null;
|
|
5371
5371
|
const ae = typeof le == "object" ? le?.id : le;
|
|
5372
|
-
return ae == null || ae === "" ? null :
|
|
5372
|
+
return ae == null || ae === "" ? null : W.find((we) => we?.id?.toString() === ae.toString())?.text ?? null;
|
|
5373
5373
|
}
|
|
5374
|
-
function ue(
|
|
5375
|
-
return
|
|
5374
|
+
function ue(W) {
|
|
5375
|
+
return W == null || W === "" ? "-" : Array.isArray(W) ? W.map((le) => typeof le == "object" ? le?.text ?? le?.id ?? "-" : le).join(", ") : typeof W == "object" ? W?.text ?? W?.id ?? "-" : W;
|
|
5376
5376
|
}
|
|
5377
|
-
function oe(
|
|
5378
|
-
const ae = le.key || le.name, we =
|
|
5377
|
+
function oe(W, le) {
|
|
5378
|
+
const ae = le.key || le.name, we = W?.[ae], Ce = r.value[ae];
|
|
5379
5379
|
if (!we) return "-";
|
|
5380
5380
|
if (Array.isArray(we)) {
|
|
5381
5381
|
const We = we.map((qe) => ze(Ce, qe)).filter(Boolean);
|
|
@@ -5384,28 +5384,28 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5384
5384
|
const Ne = ze(Ce, we);
|
|
5385
5385
|
return Ne || ue(we);
|
|
5386
5386
|
}
|
|
5387
|
-
async function Le(
|
|
5388
|
-
ke.value = "Редагувати", ye.value = !0, T = "edit", ne = le, be.value = { ...
|
|
5387
|
+
async function Le(W, le) {
|
|
5388
|
+
ke.value = "Редагувати", ye.value = !0, T = "edit", ne = le, be.value = { ...W };
|
|
5389
5389
|
}
|
|
5390
5390
|
function Pe() {
|
|
5391
|
-
const
|
|
5392
|
-
if (
|
|
5393
|
-
Te({ type: "warning", title: "Помилка валідації", message: Object.entries(
|
|
5391
|
+
const W = se.value.validate();
|
|
5392
|
+
if (W) {
|
|
5393
|
+
Te({ type: "warning", title: "Помилка валідації", message: Object.entries(W).map(([le, ae]) => `${le}: ${ae}`).join(`
|
|
5394
5394
|
`) });
|
|
5395
5395
|
return;
|
|
5396
5396
|
}
|
|
5397
5397
|
T === "add" ? Array.isArray(i.value) ? i.value = [...i.value, be.value] : i.value = [be.value] : i.value = i.value.map((le, ae) => ae === ne ? be.value : le), ye.value = !1;
|
|
5398
5398
|
}
|
|
5399
|
-
function Ye(
|
|
5400
|
-
i.value = i.value.filter((le, ae) => ae !==
|
|
5399
|
+
function Ye(W) {
|
|
5400
|
+
i.value = i.value.filter((le, ae) => ae !== W);
|
|
5401
5401
|
}
|
|
5402
5402
|
function ct() {
|
|
5403
5403
|
ye.value = !1;
|
|
5404
5404
|
}
|
|
5405
|
-
return (
|
|
5405
|
+
return (W, le) => (u(), v("div", zd, [
|
|
5406
5406
|
a.value ? (u(), v("div", Ud, [
|
|
5407
5407
|
l("search") ? (u(), v("div", Hd, [
|
|
5408
|
-
G(
|
|
5408
|
+
G(q(Qn), { class: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400" }),
|
|
5409
5409
|
Re(d("input", {
|
|
5410
5410
|
type: "text",
|
|
5411
5411
|
"onUpdate:modelValue": le[0] || (le[0] = (ae) => c.value = ae),
|
|
@@ -5419,7 +5419,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5419
5419
|
l("import") ? (u(), v("input", {
|
|
5420
5420
|
key: 0,
|
|
5421
5421
|
ref_key: "fileInput",
|
|
5422
|
-
ref:
|
|
5422
|
+
ref: k,
|
|
5423
5423
|
onChange: Q,
|
|
5424
5424
|
class: "hidden",
|
|
5425
5425
|
accept: ".json",
|
|
@@ -5431,7 +5431,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5431
5431
|
onClick: B,
|
|
5432
5432
|
class: "inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:bg-gray-50 transition-colors"
|
|
5433
5433
|
}, [
|
|
5434
|
-
G(
|
|
5434
|
+
G(q(Va), { class: "h-4 w-4 text-gray-700" }),
|
|
5435
5435
|
le[4] || (le[4] = nt(" Імпорт ", -1))
|
|
5436
5436
|
])) : K("", !0),
|
|
5437
5437
|
l("export") ? (u(), v("button", {
|
|
@@ -5440,7 +5440,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5440
5440
|
onClick: pe,
|
|
5441
5441
|
class: "inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:bg-gray-50 transition-colors"
|
|
5442
5442
|
}, [
|
|
5443
|
-
G(
|
|
5443
|
+
G(q(Il), { class: "h-4 w-4 text-gray-700" }),
|
|
5444
5444
|
le[5] || (le[5] = nt(" Експорт ", -1))
|
|
5445
5445
|
])) : K("", !0),
|
|
5446
5446
|
l("add") ? (u(), v("button", {
|
|
@@ -5449,7 +5449,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5449
5449
|
type: "button",
|
|
5450
5450
|
class: "inline-flex items-center gap-2 rounded-md bg-blue-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-600 transition-colors"
|
|
5451
5451
|
}, [
|
|
5452
|
-
G(
|
|
5452
|
+
G(q(Ot), { class: "h-4 w-4 text-white" }),
|
|
5453
5453
|
le[6] || (le[6] = nt(" Додати ", -1))
|
|
5454
5454
|
])) : K("", !0)
|
|
5455
5455
|
])
|
|
@@ -5459,7 +5459,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5459
5459
|
d("thead", Yd, [
|
|
5460
5460
|
d("tr", Gd, [
|
|
5461
5461
|
d("th", Xd, [
|
|
5462
|
-
G(
|
|
5462
|
+
G(q(cn), { class: "mx-auto h-4 w-4 text-gray-400" })
|
|
5463
5463
|
]),
|
|
5464
5464
|
(u(!0), v(Ae, null, Be(w.value, (ae) => (u(), v("th", {
|
|
5465
5465
|
key: ae.key,
|
|
@@ -5471,7 +5471,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5471
5471
|
class: "flex items-center gap-1 text-xs font-semibold text-gray-700 hover:text-gray-900 transition-colors"
|
|
5472
5472
|
}, [
|
|
5473
5473
|
d("span", null, ce(ae.ua || ae.label), 1),
|
|
5474
|
-
f.value === (ae.key || ae.name) ? (u(), v("span", Jd, ce(
|
|
5474
|
+
f.value === (ae.key || ae.name) ? (u(), v("span", Jd, ce(_.value === "asc" ? "▲" : "▼"), 1)) : K("", !0)
|
|
5475
5475
|
], 8, Zd)
|
|
5476
5476
|
]))), 128)),
|
|
5477
5477
|
le[7] || (le[7] = d("th", { class: "px-4 py-3 text-left text-xs font-semibold text-gray-900 text-center w-[1%] whitespace-nowrap" }, " Дії ", -1))
|
|
@@ -5480,7 +5480,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5480
5480
|
d("tbody", {
|
|
5481
5481
|
class: ie(["divide-y divide-gray-200", { "[&_tr:last-child]:border-0": !m.value }])
|
|
5482
5482
|
}, [
|
|
5483
|
-
|
|
5483
|
+
x.value.length === 0 ? (u(), v("td", Qd, [
|
|
5484
5484
|
d("div", ec, [
|
|
5485
5485
|
d("div", tc, [
|
|
5486
5486
|
G(jd, { class: "w-48 mx-auto" }),
|
|
@@ -5491,7 +5491,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5491
5491
|
])
|
|
5492
5492
|
])
|
|
5493
5493
|
])) : K("", !0),
|
|
5494
|
-
(u(!0), v(Ae, null, Be(
|
|
5494
|
+
(u(!0), v(Ae, null, Be(x.value, (ae, we) => (u(), v("tr", {
|
|
5495
5495
|
key: ae.id,
|
|
5496
5496
|
"data-row-index": we,
|
|
5497
5497
|
class: ie(["border-b transition-colors hover:bg-gray-50 cursor-move text-sm text-gray-700", {
|
|
@@ -5511,7 +5511,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5511
5511
|
onPointercancel: U
|
|
5512
5512
|
}, [
|
|
5513
5513
|
d("div", ac, [
|
|
5514
|
-
G(
|
|
5514
|
+
G(q(cn), { class: "mx-auto h-4 w-4 text-slate-400 dark:text-slate-500" })
|
|
5515
5515
|
])
|
|
5516
5516
|
], 40, lc),
|
|
5517
5517
|
(u(!0), v(Ae, null, Be(w.value, (Ce) => (u(), v("td", {
|
|
@@ -5519,7 +5519,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5519
5519
|
class: "px-4 py-3 align-middle"
|
|
5520
5520
|
}, [
|
|
5521
5521
|
R(Ce) === "slot" ? (u(), v(Ae, { key: 0 }, [
|
|
5522
|
-
Me(Ce.slot) ? ft(
|
|
5522
|
+
Me(Ce.slot) ? ft(W.$slots, Ce.slot, {
|
|
5523
5523
|
key: 0,
|
|
5524
5524
|
row: ae,
|
|
5525
5525
|
value: ae[Ce.key],
|
|
@@ -5539,7 +5539,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5539
5539
|
class: "rounded-md max-w-[45px] h-[45px] object-cover"
|
|
5540
5540
|
}, null, 8, ic)
|
|
5541
5541
|
])) : (u(), v("div", uc, [
|
|
5542
|
-
G(
|
|
5542
|
+
G(q(Gn), { class: "h-4 w-4 min-w-4" })
|
|
5543
5543
|
]))
|
|
5544
5544
|
])) : R(Ce) === "color" ? (u(), v("div", dc, [
|
|
5545
5545
|
d("span", {
|
|
@@ -5555,13 +5555,13 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5555
5555
|
onClick: (Ce) => Le(ae, we),
|
|
5556
5556
|
class: "p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded transition-colors"
|
|
5557
5557
|
}, [
|
|
5558
|
-
G(
|
|
5558
|
+
G(q(jo), { class: "h-4 w-4" })
|
|
5559
5559
|
], 8, mc),
|
|
5560
5560
|
d("button", {
|
|
5561
5561
|
onClick: (Ce) => Ye(we),
|
|
5562
5562
|
class: "p-1.5 text-gray-600 hover:text-red-600 hover:bg-red-50 rounded transition-colors"
|
|
5563
5563
|
}, [
|
|
5564
|
-
G(
|
|
5564
|
+
G(q(on), { class: "h-4 w-4" })
|
|
5565
5565
|
], 8, vc)
|
|
5566
5566
|
])
|
|
5567
5567
|
])
|
|
@@ -5569,7 +5569,7 @@ const jd = /* @__PURE__ */ Xe(Bd, [["render", Nd]]), zd = { class: "bg-white rou
|
|
|
5569
5569
|
], 2)
|
|
5570
5570
|
])
|
|
5571
5571
|
]),
|
|
5572
|
-
G(
|
|
5572
|
+
G(q(el), {
|
|
5573
5573
|
visible: ye.value,
|
|
5574
5574
|
title: ke.value,
|
|
5575
5575
|
size: "lg",
|
|
@@ -5719,7 +5719,7 @@ const Tc = ["title", "aria-expanded"], Ec = ["src"], Fc = { class: "map-layers__
|
|
|
5719
5719
|
},
|
|
5720
5720
|
emits: ["onLayerChange", "onOverlayToggle", "onVectorOverlayToggle"],
|
|
5721
5721
|
setup(e, { emit: t }) {
|
|
5722
|
-
const n = e, l = t, o = 10 * Rn, a = 400 * Rn, i = 400 * Rn, r = 320 * Rn, c = D(null), f = D(null),
|
|
5722
|
+
const n = e, l = t, o = 10 * Rn, a = 400 * Rn, i = 400 * Rn, r = 320 * Rn, c = D(null), f = D(null), _ = D(null), x = D(!1), w = D({}), b = y(() => Object.keys(n.basemaps || {}).length > 0), m = y(() => Object.keys(n.tileOverlays || {}).length > 0), k = y(() => n.vectorOverlays ?? []), g = y(() => k.value.length > 0), M = y(
|
|
5723
5723
|
() => b.value || m.value || g.value
|
|
5724
5724
|
), C = y(() => n.basemaps?.[n.activeBaseKey]?.name || n.activeBaseKey || "Шари"), V = y(() => U(n.basemaps)), A = y(() => U(n.tileOverlays || {}));
|
|
5725
5725
|
function U(Y) {
|
|
@@ -5758,10 +5758,10 @@ const Tc = ["title", "aria-expanded"], Ec = ["src"], Fc = { class: "map-layers__
|
|
|
5758
5758
|
};
|
|
5759
5759
|
}
|
|
5760
5760
|
async function Q() {
|
|
5761
|
-
|
|
5761
|
+
x.value = !x.value, x.value && (await et(), P());
|
|
5762
5762
|
}
|
|
5763
5763
|
function pe() {
|
|
5764
|
-
|
|
5764
|
+
x.value = !1;
|
|
5765
5765
|
}
|
|
5766
5766
|
function Se(Y) {
|
|
5767
5767
|
Y !== n.activeBaseKey && l("onLayerChange", Y);
|
|
@@ -5773,14 +5773,14 @@ const Tc = ["title", "aria-expanded"], Ec = ["src"], Fc = { class: "map-layers__
|
|
|
5773
5773
|
n.disabled || l("onVectorOverlayToggle", Y);
|
|
5774
5774
|
}
|
|
5775
5775
|
function J(Y) {
|
|
5776
|
-
if (!
|
|
5776
|
+
if (!x.value) return;
|
|
5777
5777
|
const ke = Y.target;
|
|
5778
|
-
c.value?.contains(ke) ||
|
|
5778
|
+
c.value?.contains(ke) || _.value?.contains(ke) || pe();
|
|
5779
5779
|
}
|
|
5780
5780
|
function ee(Y) {
|
|
5781
5781
|
Y.key === "Escape" && pe();
|
|
5782
5782
|
}
|
|
5783
|
-
return ve(
|
|
5783
|
+
return ve(x, async (Y) => {
|
|
5784
5784
|
Y && (await et(), P());
|
|
5785
5785
|
}), lt(() => {
|
|
5786
5786
|
document.addEventListener("click", J), document.addEventListener("keydown", ee), window.addEventListener("resize", P), window.addEventListener("scroll", P, !0);
|
|
@@ -5799,7 +5799,7 @@ const Tc = ["title", "aria-expanded"], Ec = ["src"], Fc = { class: "map-layers__
|
|
|
5799
5799
|
class: "map-layers__trigger",
|
|
5800
5800
|
title: C.value,
|
|
5801
5801
|
"aria-haspopup": "dialog",
|
|
5802
|
-
"aria-expanded":
|
|
5802
|
+
"aria-expanded": x.value,
|
|
5803
5803
|
onClick: Ee(Q, ["stop"])
|
|
5804
5804
|
}, [
|
|
5805
5805
|
j.value ? (u(), v("img", {
|
|
@@ -5812,10 +5812,10 @@ const Tc = ["title", "aria-expanded"], Ec = ["src"], Fc = { class: "map-layers__
|
|
|
5812
5812
|
(u(), xe(Kt, { to: "body" }, [
|
|
5813
5813
|
G(Jn, { name: "map-layers-panel" }, {
|
|
5814
5814
|
default: ut(() => [
|
|
5815
|
-
|
|
5815
|
+
x.value ? (u(), v("div", {
|
|
5816
5816
|
key: 0,
|
|
5817
5817
|
ref_key: "panelRef",
|
|
5818
|
-
ref:
|
|
5818
|
+
ref: _,
|
|
5819
5819
|
class: "map-layers__panel",
|
|
5820
5820
|
style: Oe(w.value),
|
|
5821
5821
|
role: "dialog",
|
|
@@ -5829,7 +5829,7 @@ const Tc = ["title", "aria-expanded"], Ec = ["src"], Fc = { class: "map-layers__
|
|
|
5829
5829
|
"aria-label": "Закрити",
|
|
5830
5830
|
onClick: pe
|
|
5831
5831
|
}, [
|
|
5832
|
-
G(
|
|
5832
|
+
G(q(Ct), { class: "map-layers__close-icon" })
|
|
5833
5833
|
])
|
|
5834
5834
|
]),
|
|
5835
5835
|
d("div", Pc, [
|
|
@@ -5877,7 +5877,7 @@ const Tc = ["title", "aria-expanded"], Ec = ["src"], Fc = { class: "map-layers__
|
|
|
5877
5877
|
g.value ? (u(), v("section", Gc, [
|
|
5878
5878
|
ke[3] || (ke[3] = d("h4", { class: "map-layers__section-title" }, "Дані", -1)),
|
|
5879
5879
|
d("div", Xc, [
|
|
5880
|
-
(u(!0), v(Ae, null, Be(
|
|
5880
|
+
(u(!0), v(Ae, null, Be(k.value, (ye) => (u(), v("label", {
|
|
5881
5881
|
key: ye.id,
|
|
5882
5882
|
class: "map-layers__vector-item"
|
|
5883
5883
|
}, [
|
|
@@ -5924,15 +5924,15 @@ function tf(e, t, n) {
|
|
|
5924
5924
|
]
|
|
5925
5925
|
};
|
|
5926
5926
|
const o = [], a = [];
|
|
5927
|
-
if (l.forEach((f,
|
|
5928
|
-
const
|
|
5927
|
+
if (l.forEach((f, _) => {
|
|
5928
|
+
const x = _ + 1, w = t === "decimal" ? nf(f, x, n) : Za(f, x, n);
|
|
5929
5929
|
if (!w.ok) {
|
|
5930
5930
|
o.push(...w.errors);
|
|
5931
5931
|
return;
|
|
5932
5932
|
}
|
|
5933
5933
|
const b = a[a.length - 1];
|
|
5934
5934
|
if (b && ba(b, w.point)) {
|
|
5935
|
-
o.push({ line:
|
|
5935
|
+
o.push({ line: x, message: "Послідовні точки не повинні дублюватися." });
|
|
5936
5936
|
return;
|
|
5937
5937
|
}
|
|
5938
5938
|
a.push(w.point);
|
|
@@ -6041,8 +6041,8 @@ function ha(e, t, n) {
|
|
|
6041
6041
|
return { ok: !1, error: { line: t, message: "Хвилини повинні бути в діапазоні 0..59." } };
|
|
6042
6042
|
if (a < 0 || a > 60)
|
|
6043
6043
|
return { ok: !1, error: { line: t, message: "Секунди повинні бути в діапазоні 0..60." } };
|
|
6044
|
-
const f = Math.abs(l),
|
|
6045
|
-
if (f >
|
|
6044
|
+
const f = Math.abs(l), _ = n === "lat" ? 90 : 180;
|
|
6045
|
+
if (f > _)
|
|
6046
6046
|
return {
|
|
6047
6047
|
ok: !1,
|
|
6048
6048
|
error: {
|
|
@@ -6050,7 +6050,7 @@ function ha(e, t, n) {
|
|
|
6050
6050
|
message: n === "lat" ? "Градуси широти повинні бути в діапазоні 0..90." : "Градуси довготи повинні бути в діапазоні 0..180."
|
|
6051
6051
|
}
|
|
6052
6052
|
};
|
|
6053
|
-
if (f ===
|
|
6053
|
+
if (f === _ && (o !== 0 || a !== 0))
|
|
6054
6054
|
return {
|
|
6055
6055
|
ok: !1,
|
|
6056
6056
|
error: {
|
|
@@ -6058,8 +6058,8 @@ function ha(e, t, n) {
|
|
|
6058
6058
|
message: n === "lat" ? "Для 90° широти хвилини й секунди мають бути 0." : "Для 180° довготи хвилини й секунди мають бути 0."
|
|
6059
6059
|
}
|
|
6060
6060
|
};
|
|
6061
|
-
const
|
|
6062
|
-
return { ok: !0, value: i === "S" || i === "W" ? -
|
|
6061
|
+
const x = f + o / 60 + a / 3600;
|
|
6062
|
+
return { ok: !0, value: i === "S" || i === "W" ? -x : x };
|
|
6063
6063
|
}
|
|
6064
6064
|
function af(e) {
|
|
6065
6065
|
return `${e[0].toFixed(12)}:${e[1].toFixed(12)}`;
|
|
@@ -6162,18 +6162,18 @@ const sf = ["title"], uf = {
|
|
|
6162
6162
|
const L = i(), O = L?.map?.cadastreSuggest ?? L?.map?.parcelSuggest ?? L?.map?.parcelSearch;
|
|
6163
6163
|
if (typeof O == "string" && O.trim()) return O.trim();
|
|
6164
6164
|
}
|
|
6165
|
-
const
|
|
6165
|
+
const _ = !!c(), x = !!r(), w = y(() => {
|
|
6166
6166
|
const z = ["nominatim", "xy", "parcel"];
|
|
6167
|
-
return
|
|
6167
|
+
return _ && z.unshift("address"), x ? z : z.filter(($) => $ !== "nominatim");
|
|
6168
6168
|
}), b = y(() => {
|
|
6169
6169
|
const z = w.value, $ = l.config?.tools?.filter((L) => z.includes(L));
|
|
6170
6170
|
return $ && $.length ? $ : z;
|
|
6171
|
-
}), m = y(() => l.config?.placeholder?.trim() || "Пошук…"),
|
|
6171
|
+
}), m = y(() => l.config?.placeholder?.trim() || "Пошук…"), k = D(b.value[0]);
|
|
6172
6172
|
ve(b, (z) => {
|
|
6173
|
-
z.includes(
|
|
6173
|
+
z.includes(k.value) || (k.value = z[0]);
|
|
6174
6174
|
});
|
|
6175
6175
|
const g = D(""), M = D(!1), C = D(null), V = D(null), A = D(null), U = D(null), Z = D([]), F = D(null), j = D(!1), B = D([]), P = y(
|
|
6176
|
-
() => (
|
|
6176
|
+
() => (k.value === "address" || k.value === "nominatim") && j.value
|
|
6177
6177
|
), Q = y(() => l.config?.addressDebounceMs ?? 1e3);
|
|
6178
6178
|
let pe = null;
|
|
6179
6179
|
const Se = D(!1), X = y(() => g.value.trim().length > 0 ? Z.value : B.value), te = y(() => g.value.trim().length ? `Знайдено ${Z.value.length}` : "Історія пошуку"), J = y(
|
|
@@ -6215,14 +6215,14 @@ const sf = ["title"], uf = {
|
|
|
6215
6215
|
function R() {
|
|
6216
6216
|
pe && (clearTimeout(pe), pe = null);
|
|
6217
6217
|
}
|
|
6218
|
-
ve(
|
|
6218
|
+
ve(k, () => {
|
|
6219
6219
|
g.value = "", M.value = !1, Z.value = [], j.value = !1, R(), Se.value = !1;
|
|
6220
6220
|
}), ve(P, (z) => {
|
|
6221
6221
|
z ? et(() => {
|
|
6222
6222
|
T();
|
|
6223
6223
|
}) : ye.display = "none";
|
|
6224
6224
|
}), ve(g, (z) => {
|
|
6225
|
-
if (
|
|
6225
|
+
if (k.value !== "address" && k.value !== "nominatim") {
|
|
6226
6226
|
Z.value = [], R();
|
|
6227
6227
|
return;
|
|
6228
6228
|
}
|
|
@@ -6249,7 +6249,7 @@ const sf = ["title"], uf = {
|
|
|
6249
6249
|
M.value && fe(z.target), M.value = !M.value;
|
|
6250
6250
|
}
|
|
6251
6251
|
function se(z, $) {
|
|
6252
|
-
fe($?.target),
|
|
6252
|
+
fe($?.target), k.value = z;
|
|
6253
6253
|
}
|
|
6254
6254
|
function Me() {
|
|
6255
6255
|
g.value = "", Z.value = [], j.value = !1, Se.value = !1;
|
|
@@ -6300,9 +6300,9 @@ const sf = ["title"], uf = {
|
|
|
6300
6300
|
const me = O.slice(0, 2).map(Number);
|
|
6301
6301
|
if (!me.every((E) => Number.isFinite(E))) return null;
|
|
6302
6302
|
let [De, Qe] = me, Ge = De, pt = Qe;
|
|
6303
|
-
const
|
|
6304
|
-
if (!
|
|
6305
|
-
if (
|
|
6303
|
+
const ht = (E) => Math.abs(E) <= 90, xt = (E) => Math.abs(E) <= 180;
|
|
6304
|
+
if (!ht(Ge) || !xt(pt))
|
|
6305
|
+
if (ht(pt) && xt(Ge))
|
|
6306
6306
|
Ge = Qe, pt = De;
|
|
6307
6307
|
else
|
|
6308
6308
|
return null;
|
|
@@ -6382,7 +6382,7 @@ const sf = ["title"], uf = {
|
|
|
6382
6382
|
return $;
|
|
6383
6383
|
}
|
|
6384
6384
|
}
|
|
6385
|
-
async function
|
|
6385
|
+
async function W(z) {
|
|
6386
6386
|
const $ = ct(z);
|
|
6387
6387
|
if (!$) return [];
|
|
6388
6388
|
const L = await fetch($);
|
|
@@ -6401,7 +6401,7 @@ const sf = ["title"], uf = {
|
|
|
6401
6401
|
return ze(me);
|
|
6402
6402
|
}
|
|
6403
6403
|
async function ae(z) {
|
|
6404
|
-
if (Z.value = [], R(),
|
|
6404
|
+
if (Z.value = [], R(), k.value === "address") {
|
|
6405
6405
|
if (!c()) {
|
|
6406
6406
|
Te({
|
|
6407
6407
|
type: "warning",
|
|
@@ -6410,7 +6410,7 @@ const sf = ["title"], uf = {
|
|
|
6410
6410
|
});
|
|
6411
6411
|
return;
|
|
6412
6412
|
}
|
|
6413
|
-
const O = await
|
|
6413
|
+
const O = await W(z);
|
|
6414
6414
|
if (!O.length) {
|
|
6415
6415
|
Te({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
|
|
6416
6416
|
return;
|
|
@@ -6437,7 +6437,7 @@ const sf = ["title"], uf = {
|
|
|
6437
6437
|
});
|
|
6438
6438
|
}
|
|
6439
6439
|
function Ce() {
|
|
6440
|
-
|
|
6440
|
+
k.value !== "address" && k.value !== "nominatim" || (j.value = !0, et(() => {
|
|
6441
6441
|
T();
|
|
6442
6442
|
}));
|
|
6443
6443
|
}
|
|
@@ -6455,7 +6455,7 @@ const sf = ["title"], uf = {
|
|
|
6455
6455
|
async function qe() {
|
|
6456
6456
|
const z = g.value.trim();
|
|
6457
6457
|
if (z) {
|
|
6458
|
-
if (
|
|
6458
|
+
if (k.value === "xy") {
|
|
6459
6459
|
const $ = Ze(z);
|
|
6460
6460
|
if (!$) {
|
|
6461
6461
|
Te({
|
|
@@ -6468,7 +6468,7 @@ const sf = ["title"], uf = {
|
|
|
6468
6468
|
We($);
|
|
6469
6469
|
return;
|
|
6470
6470
|
}
|
|
6471
|
-
if (
|
|
6471
|
+
if (k.value === "address" || k.value === "nominatim") {
|
|
6472
6472
|
try {
|
|
6473
6473
|
await ae(z);
|
|
6474
6474
|
} catch ($) {
|
|
@@ -6529,11 +6529,11 @@ const sf = ["title"], uf = {
|
|
|
6529
6529
|
ref_key: "selectedToolLabelRef",
|
|
6530
6530
|
ref: V,
|
|
6531
6531
|
class: "block w-full truncate",
|
|
6532
|
-
title: Ve(
|
|
6532
|
+
title: Ve(k.value)
|
|
6533
6533
|
}, [
|
|
6534
|
-
nt(ce(Ve(
|
|
6534
|
+
nt(ce(Ve(k.value)), 1)
|
|
6535
6535
|
], 8, sf)), [
|
|
6536
|
-
[n, He(
|
|
6536
|
+
[n, He(k.value)]
|
|
6537
6537
|
]),
|
|
6538
6538
|
(u(), v("svg", {
|
|
6539
6539
|
class: ie(["w-4 h-4 text-gray-500 transition-transform", { "rotate-180": M.value }]),
|
|
@@ -6569,7 +6569,7 @@ const sf = ["title"], uf = {
|
|
|
6569
6569
|
ref: U,
|
|
6570
6570
|
class: "relative flex-1 min-w-[140px]"
|
|
6571
6571
|
}, [
|
|
6572
|
-
|
|
6572
|
+
k.value === "parcel" ? (u(), xe(Fl, {
|
|
6573
6573
|
key: 0,
|
|
6574
6574
|
modelValue: g.value,
|
|
6575
6575
|
"onUpdate:modelValue": $[0] || ($[0] = (L) => g.value = L),
|
|
@@ -6672,7 +6672,7 @@ const sf = ["title"], uf = {
|
|
|
6672
6672
|
__name: "AddCoordinates",
|
|
6673
6673
|
emits: ["submit", "cancel"],
|
|
6674
6674
|
setup(e, { emit: t }) {
|
|
6675
|
-
const n = t, l = D(null), o = D(null), a = (c, f,
|
|
6675
|
+
const n = t, l = D(null), o = D(null), a = (c, f, _) => Math.min(Math.max(c, f), _), i = () => {
|
|
6676
6676
|
if (l.value === null || o.value === null || !Number.isFinite(l.value) || !Number.isFinite(o.value))
|
|
6677
6677
|
return;
|
|
6678
6678
|
const c = a(l.value, -90, 90), f = a(o.value, -180, 180);
|
|
@@ -6684,7 +6684,7 @@ const sf = ["title"], uf = {
|
|
|
6684
6684
|
f[2] || (f[2] = d("p", { class: "text-xs text-gray-600 mb-1" }, "Додати точку за координатами:", -1)),
|
|
6685
6685
|
d("div", Sf, [
|
|
6686
6686
|
Re(d("input", {
|
|
6687
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
6687
|
+
"onUpdate:modelValue": f[0] || (f[0] = (_) => l.value = _),
|
|
6688
6688
|
type: "number",
|
|
6689
6689
|
step: "0.0001",
|
|
6690
6690
|
class: "w-full px-2 py-1 text-xs border border-gray-300 rounded focus:outline-none focus:border-blue-500",
|
|
@@ -6698,7 +6698,7 @@ const sf = ["title"], uf = {
|
|
|
6698
6698
|
]
|
|
6699
6699
|
]),
|
|
6700
6700
|
Re(d("input", {
|
|
6701
|
-
"onUpdate:modelValue": f[1] || (f[1] = (
|
|
6701
|
+
"onUpdate:modelValue": f[1] || (f[1] = (_) => o.value = _),
|
|
6702
6702
|
type: "number",
|
|
6703
6703
|
step: "0.0001",
|
|
6704
6704
|
class: "w-full px-2 py-1 text-xs border border-gray-300 rounded focus:outline-none focus:border-blue-500",
|
|
@@ -6734,7 +6734,7 @@ const sf = ["title"], uf = {
|
|
|
6734
6734
|
class: "flex-1 px-2 py-1.5 bg-blue-500 hover:bg-blue-600 text-white text-xs font-medium rounded transition-colors duration-150 flex items-center justify-center gap-1",
|
|
6735
6735
|
onClick: n[0] || (n[0] = (l) => t.$emit("click"))
|
|
6736
6736
|
}, [
|
|
6737
|
-
G(
|
|
6737
|
+
G(q(Ot), {
|
|
6738
6738
|
size: 12,
|
|
6739
6739
|
"stroke-width": 2
|
|
6740
6740
|
}),
|
|
@@ -6749,7 +6749,7 @@ const sf = ["title"], uf = {
|
|
|
6749
6749
|
class: "w-full px-2 py-1.5 bg-rose-500 hover:bg-rose-600 text-white text-xs font-medium rounded transition-colors duration-150 flex items-center justify-center gap-1",
|
|
6750
6750
|
onClick: n[0] || (n[0] = (l) => t.$emit("click"))
|
|
6751
6751
|
}, [
|
|
6752
|
-
G(
|
|
6752
|
+
G(q(on), {
|
|
6753
6753
|
size: 12,
|
|
6754
6754
|
"stroke-width": 2
|
|
6755
6755
|
}),
|
|
@@ -6764,7 +6764,7 @@ const sf = ["title"], uf = {
|
|
|
6764
6764
|
class: "flex-1 px-2 py-1.5 bg-emerald-500 hover:bg-emerald-600 text-white text-xs font-medium rounded transition-colors duration-150 flex items-center justify-center gap-1",
|
|
6765
6765
|
onClick: n[0] || (n[0] = (l) => t.$emit("click"))
|
|
6766
6766
|
}, [
|
|
6767
|
-
G(
|
|
6767
|
+
G(q(zo), {
|
|
6768
6768
|
size: 12,
|
|
6769
6769
|
"stroke-width": 2
|
|
6770
6770
|
}),
|
|
@@ -6808,16 +6808,16 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
6808
6808
|
);
|
|
6809
6809
|
const c = (w, b, m) => Math.min(Math.max(w, b), m), f = () => {
|
|
6810
6810
|
a.value = !0;
|
|
6811
|
-
},
|
|
6811
|
+
}, _ = () => {
|
|
6812
6812
|
if (!Number.isFinite(i.value) || !Number.isFinite(r.value))
|
|
6813
6813
|
return;
|
|
6814
6814
|
const w = c(i.value, -90, 90), b = c(r.value, -180, 180);
|
|
6815
6815
|
l("update", { id: n.id, coords: { lat: w, lng: b } }), a.value = !1;
|
|
6816
|
-
},
|
|
6816
|
+
}, x = () => {
|
|
6817
6817
|
l("delete", n.id);
|
|
6818
6818
|
};
|
|
6819
6819
|
return (w, b) => (u(), v("div", Df, [
|
|
6820
|
-
G(
|
|
6820
|
+
G(q(Da), {
|
|
6821
6821
|
size: 12,
|
|
6822
6822
|
"stroke-width": 2,
|
|
6823
6823
|
class: "text-gray-400 flex-shrink-0"
|
|
@@ -6858,7 +6858,7 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
6858
6858
|
d("button", {
|
|
6859
6859
|
class: "px-1.5 py-0.5 bg-emerald-500 text-white rounded hover:bg-emerald-600 text-xs",
|
|
6860
6860
|
type: "button",
|
|
6861
|
-
onClick:
|
|
6861
|
+
onClick: _
|
|
6862
6862
|
}, " ✓ ")
|
|
6863
6863
|
])) : (u(), v("span", Tf, ce(o.value), 1)),
|
|
6864
6864
|
a.value ? K("", !0) : (u(), v("button", {
|
|
@@ -6870,7 +6870,7 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
6870
6870
|
d("button", {
|
|
6871
6871
|
class: "text-rose-500 hover:text-rose-600 px-0.5",
|
|
6872
6872
|
type: "button",
|
|
6873
|
-
onClick:
|
|
6873
|
+
onClick: x
|
|
6874
6874
|
}, " ✕ ")
|
|
6875
6875
|
]));
|
|
6876
6876
|
}
|
|
@@ -6921,8 +6921,8 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
6921
6921
|
{ id: "m2", label: "м²" }
|
|
6922
6922
|
], a = () => {
|
|
6923
6923
|
n.value = !n.value;
|
|
6924
|
-
}, i = (m,
|
|
6925
|
-
const g = (B) => B * Math.PI / 180, M = g(
|
|
6924
|
+
}, i = (m, k) => {
|
|
6925
|
+
const g = (B) => B * Math.PI / 180, M = g(k.lat - m.lat), C = g(k.lng - m.lng), V = g(m.lat), A = g(k.lat), U = Math.sin(M / 2), Z = Math.sin(C / 2);
|
|
6926
6926
|
return 6371e3 * (2 * Math.asin(
|
|
6927
6927
|
Math.sqrt(
|
|
6928
6928
|
U * U + Math.cos(V) * Math.cos(A) * Z * Z
|
|
@@ -6931,8 +6931,8 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
6931
6931
|
}, r = y(() => {
|
|
6932
6932
|
if (t.points.length < 2) return 0;
|
|
6933
6933
|
let m = 0;
|
|
6934
|
-
for (let
|
|
6935
|
-
m += i(t.points[
|
|
6934
|
+
for (let k = 1; k < t.points.length; k += 1)
|
|
6935
|
+
m += i(t.points[k - 1].coords, t.points[k].coords);
|
|
6936
6936
|
return t.isShapeClosed && t.points.length >= 2 && (m += i(
|
|
6937
6937
|
t.points[t.points.length - 1].coords,
|
|
6938
6938
|
t.points[0].coords
|
|
@@ -6940,9 +6940,9 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
6940
6940
|
}), c = y(() => r.value >= 1e3 ? `${tn(r.value / 1e3)} км` : `${tn(r.value)} м`);
|
|
6941
6941
|
function f(m) {
|
|
6942
6942
|
if (m.length < 3) return 0;
|
|
6943
|
-
const
|
|
6944
|
-
const U = (V -
|
|
6945
|
-
return { x: (A - g) * 111320 * Math.cos(
|
|
6943
|
+
const k = m[0].lat, g = m[0].lng, M = (V, A) => {
|
|
6944
|
+
const U = (V - k) * 110574;
|
|
6945
|
+
return { x: (A - g) * 111320 * Math.cos(k * Math.PI / 180), y: U };
|
|
6946
6946
|
};
|
|
6947
6947
|
let C = 0;
|
|
6948
6948
|
for (let V = 0; V < m.length; V++) {
|
|
@@ -6951,12 +6951,12 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
6951
6951
|
}
|
|
6952
6952
|
return Math.abs(C) * 0.5;
|
|
6953
6953
|
}
|
|
6954
|
-
const
|
|
6954
|
+
const _ = y(() => {
|
|
6955
6955
|
if (!t.isShapeClosed || t.points.length < 3) return 0;
|
|
6956
|
-
const m = t.points.map((
|
|
6956
|
+
const m = t.points.map((k) => k.coords);
|
|
6957
6957
|
return f(m);
|
|
6958
|
-
}),
|
|
6959
|
-
const m =
|
|
6958
|
+
}), x = y(() => _.value > 0), w = y(() => {
|
|
6959
|
+
const m = _.value;
|
|
6960
6960
|
if (m === 0) return "—";
|
|
6961
6961
|
if (l.value === "km2") {
|
|
6962
6962
|
const g = m / 1e6;
|
|
@@ -6966,8 +6966,8 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
6966
6966
|
const g = m / 1e4;
|
|
6967
6967
|
return `${tn(g)} га`;
|
|
6968
6968
|
}
|
|
6969
|
-
const
|
|
6970
|
-
return `${tn(
|
|
6969
|
+
const k = m >= 1 ? Math.round(m) : m;
|
|
6970
|
+
return `${tn(k)} м²`;
|
|
6971
6971
|
}), b = y(() => {
|
|
6972
6972
|
const m = t.points.length;
|
|
6973
6973
|
return m === 1 ? "1 точка" : m >= 2 && m <= 4 ? `${m} точки` : `${m} точок`;
|
|
@@ -6977,26 +6977,26 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
6977
6977
|
() => {
|
|
6978
6978
|
t.points.length === 0 && (n.value = !1);
|
|
6979
6979
|
}
|
|
6980
|
-
), (m,
|
|
6980
|
+
), (m, k) => (u(), v("div", Ff, [
|
|
6981
6981
|
d("button", Pf, [
|
|
6982
6982
|
d("span", Of, [
|
|
6983
|
-
G(
|
|
6983
|
+
G(q(ln), {
|
|
6984
6984
|
size: 12,
|
|
6985
6985
|
"stroke-width": 2.5
|
|
6986
6986
|
})
|
|
6987
6987
|
]),
|
|
6988
|
-
|
|
6988
|
+
k[1] || (k[1] = d("span", { class: "text-xs font-medium text-gray-600 flex-1" }, "Загальна відстань", -1)),
|
|
6989
6989
|
d("span", Bf, ce(c.value), 1)
|
|
6990
6990
|
]),
|
|
6991
6991
|
d("div", Rf, [
|
|
6992
6992
|
d("button", Nf, [
|
|
6993
6993
|
d("span", jf, [
|
|
6994
|
-
G(
|
|
6994
|
+
G(q(ln), {
|
|
6995
6995
|
size: 12,
|
|
6996
6996
|
"stroke-width": 2.5
|
|
6997
6997
|
})
|
|
6998
6998
|
]),
|
|
6999
|
-
|
|
6999
|
+
k[2] || (k[2] = d("span", { class: "text-xs font-medium text-gray-600 flex-1" }, "Площа", -1)),
|
|
7000
7000
|
d("div", zf, [
|
|
7001
7001
|
(u(), v(Ae, null, Be(o, (g, M) => d("button", {
|
|
7002
7002
|
key: g.id,
|
|
@@ -7012,12 +7012,12 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7012
7012
|
])
|
|
7013
7013
|
]),
|
|
7014
7014
|
d("div", Hf, [
|
|
7015
|
-
|
|
7015
|
+
x.value ? (u(), v("span", Wf, ce(w.value), 1)) : (u(), v("span", qf, "—"))
|
|
7016
7016
|
])
|
|
7017
7017
|
]),
|
|
7018
7018
|
d("div", Kf, [
|
|
7019
7019
|
d("span", Yf, [
|
|
7020
|
-
G(
|
|
7020
|
+
G(q(ln), {
|
|
7021
7021
|
size: 12,
|
|
7022
7022
|
"stroke-width": 2.5
|
|
7023
7023
|
})
|
|
@@ -7035,7 +7035,7 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7035
7035
|
id: g.id,
|
|
7036
7036
|
index: M + 1,
|
|
7037
7037
|
coords: g.coords,
|
|
7038
|
-
onUpdate:
|
|
7038
|
+
onUpdate: k[0] || (k[0] = (C) => m.$emit("update-point", C)),
|
|
7039
7039
|
onDelete: (C) => m.$emit("delete-point", g.id)
|
|
7040
7040
|
}, null, 8, ["id", "index", "coords", "onDelete"]))), 128))
|
|
7041
7041
|
])) : K("", !0)
|
|
@@ -7046,7 +7046,7 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7046
7046
|
setup(e) {
|
|
7047
7047
|
return (t, n) => (u(), v("div", Jf, [
|
|
7048
7048
|
d("div", Qf, [
|
|
7049
|
-
G(
|
|
7049
|
+
G(q(ln), {
|
|
7050
7050
|
size: 16,
|
|
7051
7051
|
"stroke-width": 2,
|
|
7052
7052
|
class: "text-blue-600 flex-shrink-0 mt-0.5"
|
|
@@ -7067,10 +7067,10 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7067
7067
|
setup(e) {
|
|
7068
7068
|
const t = e;
|
|
7069
7069
|
function n(a, i) {
|
|
7070
|
-
const r = (b) => b * Math.PI / 180, c = r(i.lat - a.lat), f = r(i.lng - a.lng),
|
|
7070
|
+
const r = (b) => b * Math.PI / 180, c = r(i.lat - a.lat), f = r(i.lng - a.lng), _ = r(a.lat), x = r(i.lat);
|
|
7071
7071
|
return 6371e3 * (2 * Math.asin(
|
|
7072
7072
|
Math.sqrt(
|
|
7073
|
-
Math.sin(c / 2) ** 2 + Math.cos(
|
|
7073
|
+
Math.sin(c / 2) ** 2 + Math.cos(_) * Math.cos(x) * Math.sin(f / 2) ** 2
|
|
7074
7074
|
)
|
|
7075
7075
|
));
|
|
7076
7076
|
}
|
|
@@ -7130,16 +7130,16 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7130
7130
|
lt(() => {
|
|
7131
7131
|
l("tab-change", c.value);
|
|
7132
7132
|
});
|
|
7133
|
-
const
|
|
7133
|
+
const _ = y(
|
|
7134
7134
|
() => o.value.length >= 3 && !r.value
|
|
7135
7135
|
);
|
|
7136
|
-
let
|
|
7136
|
+
let x = 1;
|
|
7137
7137
|
const w = () => o.value.map((P) => ({ id: P.id, coords: { ...P.coords } })), b = () => {
|
|
7138
7138
|
o.value.length < 3 && r.value && (r.value = !1, l("shape-closed-change", !1)), l("points-change", w());
|
|
7139
7139
|
}, m = () => {
|
|
7140
|
-
const P =
|
|
7141
|
-
return
|
|
7142
|
-
},
|
|
7140
|
+
const P = x;
|
|
7141
|
+
return x += 1, P;
|
|
7142
|
+
}, k = (P) => {
|
|
7143
7143
|
o.value = [
|
|
7144
7144
|
...o.value,
|
|
7145
7145
|
{ id: m(), coords: { lat: P.lat, lng: P.lng } }
|
|
@@ -7163,23 +7163,23 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7163
7163
|
}, U = () => {
|
|
7164
7164
|
i.value = !0, l("add-request");
|
|
7165
7165
|
}, Z = (P) => {
|
|
7166
|
-
|
|
7166
|
+
k(P), i.value = !1;
|
|
7167
7167
|
}, F = () => {
|
|
7168
7168
|
i.value = !1;
|
|
7169
7169
|
}, j = () => {
|
|
7170
|
-
|
|
7170
|
+
_.value && (r.value = !0, l("complete"), l("shape-closed-change", !0));
|
|
7171
7171
|
}, B = () => {
|
|
7172
7172
|
C(), i.value = !1, l("close");
|
|
7173
7173
|
};
|
|
7174
7174
|
return t({
|
|
7175
|
-
addPoint:
|
|
7175
|
+
addPoint: k,
|
|
7176
7176
|
clearPoints: C
|
|
7177
7177
|
}), (P, Q) => (u(), v("div", rp, [
|
|
7178
7178
|
d("div", sp, [
|
|
7179
7179
|
d("div", ip, [
|
|
7180
7180
|
d("div", up, [
|
|
7181
7181
|
d("div", dp, [
|
|
7182
|
-
G(
|
|
7182
|
+
G(q(Ia), {
|
|
7183
7183
|
size: 14,
|
|
7184
7184
|
"stroke-width": 2,
|
|
7185
7185
|
class: "text-white"
|
|
@@ -7192,7 +7192,7 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7192
7192
|
"aria-label": "Закрити",
|
|
7193
7193
|
onClick: B
|
|
7194
7194
|
}, [
|
|
7195
|
-
G(
|
|
7195
|
+
G(q(Ct), {
|
|
7196
7196
|
size: 14,
|
|
7197
7197
|
"stroke-width": 2,
|
|
7198
7198
|
class: "text-white"
|
|
@@ -7238,7 +7238,7 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7238
7238
|
key: 0,
|
|
7239
7239
|
onClick: U
|
|
7240
7240
|
})),
|
|
7241
|
-
|
|
7241
|
+
_.value ? (u(), xe(Af, {
|
|
7242
7242
|
key: 1,
|
|
7243
7243
|
onClick: j
|
|
7244
7244
|
})) : K("", !0)
|
|
@@ -7265,8 +7265,8 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7265
7265
|
labelMode: {}
|
|
7266
7266
|
},
|
|
7267
7267
|
setup(e) {
|
|
7268
|
-
function t(m,
|
|
7269
|
-
const g = (Z) => Z * Math.PI / 180, M = g(
|
|
7268
|
+
function t(m, k) {
|
|
7269
|
+
const g = (Z) => Z * Math.PI / 180, M = g(k.lat - m.lat), C = g(k.lng - m.lng), V = g(m.lat), A = g(k.lat);
|
|
7270
7270
|
return 6371e3 * (2 * Math.asin(
|
|
7271
7271
|
Math.sqrt(
|
|
7272
7272
|
Math.sin(M / 2) ** 2 + Math.cos(V) * Math.cos(A) * Math.sin(C / 2) ** 2
|
|
@@ -7280,13 +7280,13 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7280
7280
|
function o() {
|
|
7281
7281
|
return { type: "FeatureCollection", features: [] };
|
|
7282
7282
|
}
|
|
7283
|
-
function a(m,
|
|
7283
|
+
function a(m, k, g) {
|
|
7284
7284
|
const M = g ?? "general", C = [];
|
|
7285
7285
|
let V = 0;
|
|
7286
7286
|
C.push(0);
|
|
7287
7287
|
for (let A = 1; A < m.length; A++)
|
|
7288
7288
|
V += t(m[A - 1].coords, m[A].coords), C.push(V);
|
|
7289
|
-
return
|
|
7289
|
+
return k && m.length >= 2 && (V += t(m[m.length - 1].coords, m[0].coords)), {
|
|
7290
7290
|
type: "FeatureCollection",
|
|
7291
7291
|
features: m.map((A, U) => {
|
|
7292
7292
|
const Z = M === "general" ? U === 0 ? "0" : n(C[U]) : U === 0 ? "0" : n(
|
|
@@ -7303,11 +7303,11 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7303
7303
|
})
|
|
7304
7304
|
};
|
|
7305
7305
|
}
|
|
7306
|
-
function i(m,
|
|
7306
|
+
function i(m, k) {
|
|
7307
7307
|
if (m.length < 2) return o();
|
|
7308
7308
|
const g = [];
|
|
7309
7309
|
for (let M = 0; M < m.length; M++) {
|
|
7310
|
-
const C = M === m.length - 1 &&
|
|
7310
|
+
const C = M === m.length - 1 && k ? 0 : M + 1;
|
|
7311
7311
|
if (C >= m.length) break;
|
|
7312
7312
|
const V = m[M].coords, A = m[C].coords, U = t(V, A);
|
|
7313
7313
|
g.push({
|
|
@@ -7324,10 +7324,10 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7324
7324
|
}
|
|
7325
7325
|
return { type: "FeatureCollection", features: g };
|
|
7326
7326
|
}
|
|
7327
|
-
function r(m,
|
|
7327
|
+
function r(m, k) {
|
|
7328
7328
|
if (m.length < 2) return o();
|
|
7329
7329
|
const g = m.map((M) => [M.coords.lng, M.coords.lat]);
|
|
7330
|
-
return
|
|
7330
|
+
return k && g.push(g[0]), {
|
|
7331
7331
|
type: "FeatureCollection",
|
|
7332
7332
|
features: [
|
|
7333
7333
|
{
|
|
@@ -7340,20 +7340,20 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7340
7340
|
}
|
|
7341
7341
|
function c(m) {
|
|
7342
7342
|
if (m.length < 3) return o();
|
|
7343
|
-
const
|
|
7344
|
-
return
|
|
7343
|
+
const k = m.map((g) => [g.coords.lng, g.coords.lat]);
|
|
7344
|
+
return k.push(k[0]), {
|
|
7345
7345
|
type: "FeatureCollection",
|
|
7346
7346
|
features: [
|
|
7347
7347
|
{
|
|
7348
7348
|
type: "Feature",
|
|
7349
|
-
geometry: { type: "Polygon", coordinates: [
|
|
7349
|
+
geometry: { type: "Polygon", coordinates: [k] },
|
|
7350
7350
|
properties: {}
|
|
7351
7351
|
}
|
|
7352
7352
|
]
|
|
7353
7353
|
};
|
|
7354
7354
|
}
|
|
7355
7355
|
let f = !1;
|
|
7356
|
-
function
|
|
7356
|
+
function _(m) {
|
|
7357
7357
|
m.getSource(St) || (m.addSource(St, {
|
|
7358
7358
|
type: "geojson",
|
|
7359
7359
|
data: o()
|
|
@@ -7424,7 +7424,7 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7424
7424
|
}
|
|
7425
7425
|
})), f = !0;
|
|
7426
7426
|
}
|
|
7427
|
-
function
|
|
7427
|
+
function x(m) {
|
|
7428
7428
|
if (m) {
|
|
7429
7429
|
try {
|
|
7430
7430
|
m.getLayer(`${Ut}-layer`) && m.removeLayer(`${Ut}-layer`), m.getSource(Ut) && m.removeSource(Ut), m.getLayer(`${zt}-layer`) && m.removeLayer(`${zt}-layer`), m.getSource(zt) && m.removeSource(zt), m.getLayer(`${Ht}-labels`) && m.removeLayer(`${Ht}-labels`), m.getSource(Ht) && m.removeSource(Ht), m.getLayer(`${St}-labels`) && m.removeLayer(`${St}-labels`), m.getLayer(`${St}-circle`) && m.removeLayer(`${St}-circle`), m.getSource(St) && m.removeSource(St);
|
|
@@ -7435,8 +7435,8 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7435
7435
|
}
|
|
7436
7436
|
function w(m) {
|
|
7437
7437
|
if (!m) return;
|
|
7438
|
-
const
|
|
7439
|
-
|
|
7438
|
+
const k = m.getSource(St), g = m.getSource(zt), M = m.getSource(Ut), C = m.getSource(Ht), V = l.points, A = l.labelMode ?? "general";
|
|
7439
|
+
k && k.setData(
|
|
7440
7440
|
a(V, l.isShapeClosed, A)
|
|
7441
7441
|
), g && g.setData(r(V, l.isShapeClosed)), M && M.setData(c(V)), C && C.setData(
|
|
7442
7442
|
A === "topoint" ? i(V, l.isShapeClosed) : o()
|
|
@@ -7444,7 +7444,7 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7444
7444
|
}
|
|
7445
7445
|
function b() {
|
|
7446
7446
|
const m = l.map;
|
|
7447
|
-
m && (f ||
|
|
7447
|
+
m && (f || _(m), w(m));
|
|
7448
7448
|
}
|
|
7449
7449
|
return ve(
|
|
7450
7450
|
() => [l.points, l.isShapeClosed, l.labelMode],
|
|
@@ -7455,8 +7455,8 @@ const Df = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
7455
7455
|
() => b(),
|
|
7456
7456
|
{ immediate: !0 }
|
|
7457
7457
|
), It(() => {
|
|
7458
|
-
|
|
7459
|
-
}), (m,
|
|
7458
|
+
x(l.map);
|
|
7459
|
+
}), (m, k) => null;
|
|
7460
7460
|
}
|
|
7461
7461
|
});
|
|
7462
7462
|
function hp(e = {}) {
|
|
@@ -7473,10 +7473,10 @@ function hp(e = {}) {
|
|
|
7473
7473
|
function f(b) {
|
|
7474
7474
|
o.value = b;
|
|
7475
7475
|
}
|
|
7476
|
-
function
|
|
7476
|
+
function _(b) {
|
|
7477
7477
|
l.value = b;
|
|
7478
7478
|
}
|
|
7479
|
-
function
|
|
7479
|
+
function x(b) {
|
|
7480
7480
|
t.value && a.value?.addPoint({ lat: b.lat, lng: b.lng });
|
|
7481
7481
|
}
|
|
7482
7482
|
const w = y(() => n.value.length > 0);
|
|
@@ -7491,8 +7491,8 @@ function hp(e = {}) {
|
|
|
7491
7491
|
closeRuler: r,
|
|
7492
7492
|
onRulerPointsChange: c,
|
|
7493
7493
|
onRulerTabChange: f,
|
|
7494
|
-
onRulerShapeClosedChange:
|
|
7495
|
-
handleRulerMapClick:
|
|
7494
|
+
onRulerShapeClosedChange: _,
|
|
7495
|
+
handleRulerMapClick: x
|
|
7496
7496
|
};
|
|
7497
7497
|
}
|
|
7498
7498
|
const jl = "vs-safe-raster", xn = new ArrayBuffer(0);
|
|
@@ -7615,14 +7615,14 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
7615
7615
|
const n = e, l = t, o = $a(), a = typeof document < "u" && document.querySelector("#modal") ? "#modal" : "body", i = y(() => {
|
|
7616
7616
|
const s = o?.multiple, p = o?.multi, h = (S) => S === "" || S === !0 || S === "true" || S === 1 || S === "1";
|
|
7617
7617
|
return !!n.multi || !!n.multiple || h(p) || h(s);
|
|
7618
|
-
}), r = y(() => !!n.disabled), c = D(!1), f = D(null),
|
|
7618
|
+
}), r = y(() => !!n.disabled), c = D(!1), f = D(null), _ = D(0), x = D(""), w = D(null), b = D([]), m = D(null), k = D(null), g = hp({
|
|
7619
7619
|
onActivate() {
|
|
7620
7620
|
if (he)
|
|
7621
7621
|
try {
|
|
7622
7622
|
he.changeMode("simple_select", { featureIds: [] });
|
|
7623
7623
|
} catch {
|
|
7624
7624
|
}
|
|
7625
|
-
|
|
7625
|
+
x.value = "";
|
|
7626
7626
|
},
|
|
7627
7627
|
onDeactivate() {
|
|
7628
7628
|
}
|
|
@@ -7739,7 +7739,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
7739
7739
|
let ze = !1, ue = !1;
|
|
7740
7740
|
const oe = Al({}), Le = D([]), Pe = y(
|
|
7741
7741
|
() => Le.value.map((s) => oe[s]).filter(Boolean)
|
|
7742
|
-
), Ye = D(null), ct = y(() => Ye.value?.entries ?? []),
|
|
7742
|
+
), Ye = D(null), ct = y(() => Ye.value?.entries ?? []), W = y(() => {
|
|
7743
7743
|
if (Ye.value)
|
|
7744
7744
|
return {
|
|
7745
7745
|
left: `${Ye.value.point.x + 12}px`,
|
|
@@ -7897,7 +7897,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
7897
7897
|
]
|
|
7898
7898
|
};
|
|
7899
7899
|
}
|
|
7900
|
-
let
|
|
7900
|
+
let ht = null, xt = null, E = null, he = null, mt = [], Bt = null, Lt = null, st = null, Yt = !1, rn = !1, sn = !1, Gt = null;
|
|
7901
7901
|
function Ln() {
|
|
7902
7902
|
return {
|
|
7903
7903
|
onSetup() {
|
|
@@ -8204,7 +8204,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
8204
8204
|
}), [S];
|
|
8205
8205
|
}
|
|
8206
8206
|
function kt() {
|
|
8207
|
-
return sn ||
|
|
8207
|
+
return sn || x.value === "marker" || x.value === "polyline" || x.value === "polygon" || x.value === "rectangle";
|
|
8208
8208
|
}
|
|
8209
8209
|
function Tt(s, p) {
|
|
8210
8210
|
if (!E) return;
|
|
@@ -8247,7 +8247,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
8247
8247
|
E.getLayer(S) && E.setLayoutProperty(S, "visibility", h);
|
|
8248
8248
|
}), Et();
|
|
8249
8249
|
}
|
|
8250
|
-
function
|
|
8250
|
+
function bt(s) {
|
|
8251
8251
|
if (!E) return;
|
|
8252
8252
|
it(s), s.renderToken = (s.renderToken ?? 0) + 1;
|
|
8253
8253
|
const p = s.renderToken, h = s.config, S = vn(h);
|
|
@@ -8468,12 +8468,12 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
8468
8468
|
E.setStyle(pt(p)), E.once("style.load", () => {
|
|
8469
8469
|
if (E && (S && Number.isFinite(I) && E.jumpTo({ center: [S.lng, S.lat], zoom: I }), yt(), Ul(), Le.value.forEach((de) => {
|
|
8470
8470
|
const _e = oe[de];
|
|
8471
|
-
_e &&
|
|
8471
|
+
_e && bt(_e);
|
|
8472
8472
|
}), Et(), H?.features?.length && he))
|
|
8473
8473
|
try {
|
|
8474
|
-
H.features.forEach((de) => he.add(de)),
|
|
8474
|
+
H.features.forEach((de) => he.add(de)), _.value = H.features.length;
|
|
8475
8475
|
} catch {
|
|
8476
|
-
|
|
8476
|
+
_.value = 0;
|
|
8477
8477
|
}
|
|
8478
8478
|
});
|
|
8479
8479
|
}
|
|
@@ -8626,7 +8626,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
8626
8626
|
Xt(), Rt();
|
|
8627
8627
|
}
|
|
8628
8628
|
function uo(s) {
|
|
8629
|
-
if (!E || !he || r.value || g.isRulerActive.value ||
|
|
8629
|
+
if (!E || !he || r.value || g.isRulerActive.value || x.value !== "edit") return;
|
|
8630
8630
|
const p = s?.point;
|
|
8631
8631
|
if (!p) return;
|
|
8632
8632
|
const h = [
|
|
@@ -8760,11 +8760,11 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
8760
8760
|
}
|
|
8761
8761
|
function ml() {
|
|
8762
8762
|
if (!he) {
|
|
8763
|
-
|
|
8763
|
+
_.value = 0;
|
|
8764
8764
|
return;
|
|
8765
8765
|
}
|
|
8766
8766
|
const s = he.getAll();
|
|
8767
|
-
|
|
8767
|
+
_.value = s?.features?.length ?? 0;
|
|
8768
8768
|
}
|
|
8769
8769
|
function hn() {
|
|
8770
8770
|
if (!he) return null;
|
|
@@ -8781,7 +8781,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
8781
8781
|
function Xt() {
|
|
8782
8782
|
if (!he) return;
|
|
8783
8783
|
const s = he.getAll();
|
|
8784
|
-
if (
|
|
8784
|
+
if (_.value = s?.features?.length ?? 0, !s?.features?.length) {
|
|
8785
8785
|
mt = [], b.value = [], Bt = null, st = null, w.value = null, ze || (Lt = "__null__", l("update:modelValue", null));
|
|
8786
8786
|
return;
|
|
8787
8787
|
}
|
|
@@ -8821,18 +8821,18 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
8821
8821
|
he.changeMode("simple_select", { featureIds: [] });
|
|
8822
8822
|
} catch {
|
|
8823
8823
|
}
|
|
8824
|
-
|
|
8824
|
+
x.value = "";
|
|
8825
8825
|
}
|
|
8826
8826
|
}
|
|
8827
8827
|
function Tn(s) {
|
|
8828
8828
|
if (r.value || !he) return;
|
|
8829
|
-
g.isRulerActive.value && g.closeRuler(), sn = !0, un(),
|
|
8829
|
+
g.isRulerActive.value && g.closeRuler(), sn = !0, un(), x.value = s;
|
|
8830
8830
|
const p = s === "marker" ? "draw_point" : s === "polyline" ? "draw_line_string" : s === "rectangle" ? "draw_rectangle" : "draw_polygon";
|
|
8831
8831
|
i.value || (ze = !0, Dn(), ze = !1);
|
|
8832
8832
|
try {
|
|
8833
8833
|
he.changeMode(p);
|
|
8834
8834
|
} catch {
|
|
8835
|
-
|
|
8835
|
+
x.value = "";
|
|
8836
8836
|
} finally {
|
|
8837
8837
|
requestAnimationFrame(() => {
|
|
8838
8838
|
sn = !1;
|
|
@@ -8844,9 +8844,9 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
8844
8844
|
const h = s || hn();
|
|
8845
8845
|
if (h)
|
|
8846
8846
|
try {
|
|
8847
|
-
he.changeMode("direct_select", { featureId: h }), st = h, cl(st),
|
|
8847
|
+
he.changeMode("direct_select", { featureId: h }), st = h, cl(st), x.value = "edit";
|
|
8848
8848
|
} catch {
|
|
8849
|
-
|
|
8849
|
+
x.value = "";
|
|
8850
8850
|
}
|
|
8851
8851
|
}
|
|
8852
8852
|
function mo(s) {
|
|
@@ -8873,9 +8873,9 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
8873
8873
|
r.value || !Bt || Ql(Bt);
|
|
8874
8874
|
}
|
|
8875
8875
|
function yo(s) {
|
|
8876
|
-
if (!E || !
|
|
8876
|
+
if (!E || !ht) return;
|
|
8877
8877
|
const p = [s[1], s[0]];
|
|
8878
|
-
Gt || (Gt = new
|
|
8878
|
+
Gt || (Gt = new ht.Marker({ color: "#2563eb" })), Gt.setLngLat(p).addTo(E), E.easeTo({ center: p, zoom: 13, duration: 250 });
|
|
8879
8879
|
}
|
|
8880
8880
|
function ho() {
|
|
8881
8881
|
r.value || be.value?.click();
|
|
@@ -8976,15 +8976,15 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
8976
8976
|
lt(async () => {
|
|
8977
8977
|
if (window.addEventListener("click", ea, !0), !f.value) return;
|
|
8978
8978
|
const s = await Ge();
|
|
8979
|
-
|
|
8979
|
+
ht = s.maplibregl, xt = s.MapboxDraw;
|
|
8980
8980
|
const p = Vn();
|
|
8981
|
-
p && (E = new
|
|
8981
|
+
p && (E = new ht.Map({
|
|
8982
8982
|
container: f.value,
|
|
8983
8983
|
style: pt(p),
|
|
8984
8984
|
center: [J.value[0], J.value[1]],
|
|
8985
8985
|
zoom: ee.value,
|
|
8986
8986
|
attributionControl: !1
|
|
8987
|
-
}), m.value = E, E.addControl(new
|
|
8987
|
+
}), m.value = E, E.addControl(new ht.NavigationControl({ showCompass: !0 }), "bottom-right"), E.on("error", (h) => {
|
|
8988
8988
|
const S = h?.error?.message ?? h?.message ?? "";
|
|
8989
8989
|
Sp(S);
|
|
8990
8990
|
}), E.on("load", () => {
|
|
@@ -9006,10 +9006,10 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9006
9006
|
if (g.isRulerActive.value) {
|
|
9007
9007
|
const I = h?.lngLat;
|
|
9008
9008
|
if (!I) return;
|
|
9009
|
-
|
|
9009
|
+
k.value?.addPoint?.({ lat: I.lat, lng: I.lng });
|
|
9010
9010
|
return;
|
|
9011
9011
|
}
|
|
9012
|
-
if (!he || r.value ||
|
|
9012
|
+
if (!he || r.value || x.value !== "edit") return;
|
|
9013
9013
|
const S = so(h?.point);
|
|
9014
9014
|
!S || S === st || requestAnimationFrame(() => {
|
|
9015
9015
|
!he || r.value || Rt(S);
|
|
@@ -9033,26 +9033,26 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9033
9033
|
Xt();
|
|
9034
9034
|
return;
|
|
9035
9035
|
}
|
|
9036
|
-
if (rn = !0, po(), rn = !1,
|
|
9036
|
+
if (rn = !0, po(), rn = !1, x.value === "edit") {
|
|
9037
9037
|
const H = hn(), de = H ? Yl(H) : he?.getAll?.()?.features?.[0];
|
|
9038
9038
|
if (de?.id)
|
|
9039
9039
|
try {
|
|
9040
9040
|
he.changeMode("direct_select", { featureId: de.id }), st = String(de.id);
|
|
9041
9041
|
} catch {
|
|
9042
|
-
|
|
9042
|
+
x.value = "";
|
|
9043
9043
|
}
|
|
9044
9044
|
}
|
|
9045
9045
|
return;
|
|
9046
9046
|
}
|
|
9047
9047
|
Xt();
|
|
9048
9048
|
}), E.on("draw.delete", () => {
|
|
9049
|
-
ue || Yt || g.isRulerActive.value ||
|
|
9049
|
+
ue || Yt || g.isRulerActive.value || x.value === "marker" || x.value === "polyline" || x.value === "polygon" || x.value === "rectangle" || (Xt(), he?.getAll?.()?.features?.length || (st = null), x.value = "", un());
|
|
9050
9050
|
}), E.on("draw.selectionchange", (h) => {
|
|
9051
|
-
if (!he || rn || g.isRulerActive.value ||
|
|
9051
|
+
if (!he || rn || g.isRulerActive.value || x.value === "marker" || x.value === "polyline" || x.value === "polygon" || x.value === "rectangle")
|
|
9052
9052
|
return;
|
|
9053
9053
|
const S = h?.features?.[0]?.id !== void 0 && h?.features?.[0]?.id !== null ? String(h.features[0].id) : null;
|
|
9054
9054
|
if (!r.value && S) {
|
|
9055
|
-
if (
|
|
9055
|
+
if (x.value === "edit" && st === S) return;
|
|
9056
9056
|
requestAnimationFrame(() => {
|
|
9057
9057
|
!he || r.value || Rt(S);
|
|
9058
9058
|
});
|
|
@@ -9060,7 +9060,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9060
9060
|
}
|
|
9061
9061
|
const I = he.getSelectedIds?.(), H = Array.isArray(I) && I.length > 0 ? String(I[0]) : null;
|
|
9062
9062
|
if (!r.value && H) {
|
|
9063
|
-
if (
|
|
9063
|
+
if (x.value === "edit" && st === H) return;
|
|
9064
9064
|
requestAnimationFrame(() => {
|
|
9065
9065
|
!he || r.value || Rt(H);
|
|
9066
9066
|
});
|
|
@@ -9078,7 +9078,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9078
9078
|
}
|
|
9079
9079
|
yt(), Ul(), Le.value.forEach((h) => {
|
|
9080
9080
|
const S = oe[h];
|
|
9081
|
-
S &&
|
|
9081
|
+
S && bt(S);
|
|
9082
9082
|
}), Et(), ne();
|
|
9083
9083
|
}
|
|
9084
9084
|
}), E.on("contextmenu", uo), E.on("moveend", R), E.on("zoomend", () => {
|
|
@@ -9131,7 +9131,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9131
9131
|
H && E && it(H), delete oe[I];
|
|
9132
9132
|
}), Le.value = h, E && (Le.value.forEach((I) => {
|
|
9133
9133
|
const H = oe[I];
|
|
9134
|
-
H &&
|
|
9134
|
+
H && bt(H);
|
|
9135
9135
|
}), Et());
|
|
9136
9136
|
},
|
|
9137
9137
|
{ immediate: !0, deep: !0 }
|
|
@@ -9140,7 +9140,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9140
9140
|
() => {
|
|
9141
9141
|
E && (yt(), Le.value.forEach((s) => {
|
|
9142
9142
|
const p = oe[s];
|
|
9143
|
-
p &&
|
|
9143
|
+
p && bt(p);
|
|
9144
9144
|
}), Et());
|
|
9145
9145
|
},
|
|
9146
9146
|
{ deep: !0 }
|
|
@@ -9150,7 +9150,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9150
9150
|
if (Me.value = [], !s) {
|
|
9151
9151
|
E && (yt(), Le.value.forEach((p) => {
|
|
9152
9152
|
const h = oe[p];
|
|
9153
|
-
h &&
|
|
9153
|
+
h && bt(h);
|
|
9154
9154
|
}), Et());
|
|
9155
9155
|
return;
|
|
9156
9156
|
}
|
|
@@ -9165,7 +9165,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9165
9165
|
if (!E) return;
|
|
9166
9166
|
yt(), Le.value.forEach((p) => {
|
|
9167
9167
|
const h = oe[p];
|
|
9168
|
-
h &&
|
|
9168
|
+
h && bt(h);
|
|
9169
9169
|
}), Et();
|
|
9170
9170
|
}
|
|
9171
9171
|
},
|
|
@@ -9193,7 +9193,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9193
9193
|
{ deep: !0 }
|
|
9194
9194
|
), ve(r, (s) => {
|
|
9195
9195
|
s && un();
|
|
9196
|
-
}), ve(
|
|
9196
|
+
}), ve(_, (s) => {
|
|
9197
9197
|
if (s > 0) {
|
|
9198
9198
|
r.value || Rt();
|
|
9199
9199
|
return;
|
|
@@ -9259,7 +9259,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9259
9259
|
disabled: r.value
|
|
9260
9260
|
}, [
|
|
9261
9261
|
p[8] || (p[8] = nt(" Імпорт ", -1)),
|
|
9262
|
-
G(
|
|
9262
|
+
G(q(pn), {
|
|
9263
9263
|
class: ie(["h-3.5 w-3.5 shrink-0 transition-transform", { "rotate-180": Ie.value }])
|
|
9264
9264
|
}, null, 8, ["class"])
|
|
9265
9265
|
], 8, Vp),
|
|
@@ -9282,7 +9282,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9282
9282
|
type: "button",
|
|
9283
9283
|
class: "vs-map-action-btn",
|
|
9284
9284
|
onClick: Co,
|
|
9285
|
-
disabled: r.value ||
|
|
9285
|
+
disabled: r.value || _.value === 0
|
|
9286
9286
|
}, " Експорт ", 8, Ip)) : K("", !0)
|
|
9287
9287
|
]),
|
|
9288
9288
|
d("input", {
|
|
@@ -9296,12 +9296,12 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9296
9296
|
}, null, 40, Tp)
|
|
9297
9297
|
])) : K("", !0)
|
|
9298
9298
|
])) : K("", !0),
|
|
9299
|
-
G(
|
|
9299
|
+
G(q(el), {
|
|
9300
9300
|
visible: Ve.value,
|
|
9301
9301
|
"onUpdate:visible": p[1] || (p[1] = (h) => Ve.value = h),
|
|
9302
9302
|
title: "Імпорт координат полігону",
|
|
9303
9303
|
size: "lg",
|
|
9304
|
-
teleport:
|
|
9304
|
+
teleport: q(a)
|
|
9305
9305
|
}, {
|
|
9306
9306
|
default: ut(() => [
|
|
9307
9307
|
G(qt, {
|
|
@@ -9330,16 +9330,16 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9330
9330
|
O.value ? (u(), v(Ae, { key: 0 }, [
|
|
9331
9331
|
ae.value.point ? (u(), v("button", {
|
|
9332
9332
|
key: 0,
|
|
9333
|
-
class: ie(["vs-btn", { "vs-active":
|
|
9333
|
+
class: ie(["vs-btn", { "vs-active": x.value === "marker" }]),
|
|
9334
9334
|
title: "Точка",
|
|
9335
9335
|
onClick: p[2] || (p[2] = (h) => Tn("marker")),
|
|
9336
9336
|
disabled: r.value
|
|
9337
9337
|
}, [
|
|
9338
|
-
G(
|
|
9338
|
+
G(q(Da), { class: "vs-btn-icon" })
|
|
9339
9339
|
], 10, Bp)) : K("", !0),
|
|
9340
9340
|
ae.value.line ? (u(), v("button", {
|
|
9341
9341
|
key: 1,
|
|
9342
|
-
class: ie(["vs-btn", { "vs-active":
|
|
9342
|
+
class: ie(["vs-btn", { "vs-active": x.value === "polyline" }]),
|
|
9343
9343
|
title: "Лінія",
|
|
9344
9344
|
onClick: p[3] || (p[3] = (h) => Tn("polyline")),
|
|
9345
9345
|
disabled: r.value
|
|
@@ -9348,7 +9348,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9348
9348
|
], 10, Rp)) : K("", !0),
|
|
9349
9349
|
ae.value.polygon ? (u(), v("button", {
|
|
9350
9350
|
key: 2,
|
|
9351
|
-
class: ie(["vs-btn", { "vs-active":
|
|
9351
|
+
class: ie(["vs-btn", { "vs-active": x.value === "polygon" }]),
|
|
9352
9352
|
title: "Полігон",
|
|
9353
9353
|
onClick: p[4] || (p[4] = (h) => Tn("polygon")),
|
|
9354
9354
|
disabled: r.value
|
|
@@ -9357,7 +9357,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9357
9357
|
], 10, Np)) : K("", !0),
|
|
9358
9358
|
ae.value.rectangle ? (u(), v("button", {
|
|
9359
9359
|
key: 3,
|
|
9360
|
-
class: ie(["vs-btn", { "vs-active":
|
|
9360
|
+
class: ie(["vs-btn", { "vs-active": x.value === "rectangle" }]),
|
|
9361
9361
|
title: "Прямокутник",
|
|
9362
9362
|
onClick: p[5] || (p[5] = (h) => Tn("rectangle")),
|
|
9363
9363
|
disabled: r.value
|
|
@@ -9368,47 +9368,47 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9368
9368
|
O.value ? (u(), v("div", zp)) : K("", !0),
|
|
9369
9369
|
ae.value.ruler ? (u(), v("button", {
|
|
9370
9370
|
key: 2,
|
|
9371
|
-
class: ie(["vs-btn", { "vs-active":
|
|
9371
|
+
class: ie(["vs-btn", { "vs-active": q(g).isRulerActive.value }]),
|
|
9372
9372
|
title: "Лінійка",
|
|
9373
9373
|
onClick: M
|
|
9374
9374
|
}, [
|
|
9375
|
-
G(
|
|
9375
|
+
G(q(Ia), { class: "vs-btn-icon" })
|
|
9376
9376
|
], 2)) : K("", !0),
|
|
9377
9377
|
d("button", {
|
|
9378
9378
|
class: "vs-btn",
|
|
9379
9379
|
onClick: p[6] || (p[6] = (h) => c.value = !c.value),
|
|
9380
9380
|
title: c.value ? "Згорнути" : "На весь екран"
|
|
9381
9381
|
}, [
|
|
9382
|
-
c.value ? (u(), xe(
|
|
9382
|
+
c.value ? (u(), xe(q(Uo), {
|
|
9383
9383
|
key: 0,
|
|
9384
9384
|
class: "vs-btn-icon"
|
|
9385
|
-
})) : (u(), xe(
|
|
9385
|
+
})) : (u(), xe(q(Ho), {
|
|
9386
9386
|
key: 1,
|
|
9387
9387
|
class: "vs-btn-icon"
|
|
9388
9388
|
}))
|
|
9389
9389
|
], 8, Up)
|
|
9390
9390
|
])
|
|
9391
9391
|
]),
|
|
9392
|
-
ae.value.ruler &&
|
|
9392
|
+
ae.value.ruler && q(g).isRulerActive.value ? (u(), xe(gp, {
|
|
9393
9393
|
key: 1,
|
|
9394
9394
|
ref_key: "rulerPanelRefEl",
|
|
9395
|
-
ref:
|
|
9396
|
-
onClose: p[7] || (p[7] = (h) =>
|
|
9397
|
-
onTabChange:
|
|
9398
|
-
onPointsChange:
|
|
9399
|
-
onShapeClosedChange:
|
|
9395
|
+
ref: k,
|
|
9396
|
+
onClose: p[7] || (p[7] = (h) => q(g).closeRuler()),
|
|
9397
|
+
onTabChange: q(g).onRulerTabChange,
|
|
9398
|
+
onPointsChange: q(g).onRulerPointsChange,
|
|
9399
|
+
onShapeClosedChange: q(g).onRulerShapeClosedChange
|
|
9400
9400
|
}, null, 8, ["onTabChange", "onPointsChange", "onShapeClosedChange"])) : K("", !0),
|
|
9401
|
-
ae.value.ruler &&
|
|
9401
|
+
ae.value.ruler && q(g).isRulerActive.value && q(g).hasRulerPoints.value ? (u(), xe(yp, {
|
|
9402
9402
|
key: 2,
|
|
9403
9403
|
map: m.value,
|
|
9404
|
-
points:
|
|
9405
|
-
"is-shape-closed":
|
|
9406
|
-
"label-mode":
|
|
9404
|
+
points: q(g).rulerPoints.value,
|
|
9405
|
+
"is-shape-closed": q(g).rulerShapeClosed.value,
|
|
9406
|
+
"label-mode": q(g).rulerActiveTab.value
|
|
9407
9407
|
}, null, 8, ["map", "points", "is-shape-closed", "label-mode"])) : K("", !0),
|
|
9408
9408
|
ct.value.length ? (u(), v("div", {
|
|
9409
9409
|
key: 3,
|
|
9410
9410
|
class: "absolute z-[1500] pointer-events-none",
|
|
9411
|
-
style: Oe(
|
|
9411
|
+
style: Oe(W.value)
|
|
9412
9412
|
}, [
|
|
9413
9413
|
d("div", Hp, [
|
|
9414
9414
|
d("dl", Wp, [
|
|
@@ -9425,9 +9425,9 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9425
9425
|
d("div", Yp, [
|
|
9426
9426
|
G(Qc, {
|
|
9427
9427
|
compact: "",
|
|
9428
|
-
basemaps:
|
|
9428
|
+
basemaps: q(Ne),
|
|
9429
9429
|
"active-base-key": qe.value,
|
|
9430
|
-
"tile-overlays":
|
|
9430
|
+
"tile-overlays": q($),
|
|
9431
9431
|
"active-tile-overlay-keys": L.value,
|
|
9432
9432
|
"vector-overlays": me.value,
|
|
9433
9433
|
"preview-tile": Y.value,
|
|
@@ -9449,7 +9449,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9449
9449
|
h.interactive ? (u(), v("button", {
|
|
9450
9450
|
key: 0,
|
|
9451
9451
|
type: "button",
|
|
9452
|
-
class: ie(["vs-map-status__chip", { "vs-map-status__chip--active": h.id ===
|
|
9452
|
+
class: ie(["vs-map-status__chip", { "vs-map-status__chip--active": h.id === q(st) }]),
|
|
9453
9453
|
onClick: (I) => mo(h.id),
|
|
9454
9454
|
disabled: r.value
|
|
9455
9455
|
}, ce(h.label), 11, Qp)) : (u(), v("span", em, ce(h.label), 1)),
|
|
@@ -9474,7 +9474,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9474
9474
|
onClick: go,
|
|
9475
9475
|
disabled: r.value
|
|
9476
9476
|
}, [
|
|
9477
|
-
G(
|
|
9477
|
+
G(q(Wo), { class: "vs-status-btn__icon" })
|
|
9478
9478
|
], 8, dm),
|
|
9479
9479
|
d("button", {
|
|
9480
9480
|
type: "button",
|
|
@@ -9483,7 +9483,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9483
9483
|
onClick: vo,
|
|
9484
9484
|
disabled: r.value
|
|
9485
9485
|
}, [
|
|
9486
|
-
G(
|
|
9486
|
+
G(q(on), { class: "vs-status-btn__icon" })
|
|
9487
9487
|
], 8, cm)
|
|
9488
9488
|
])
|
|
9489
9489
|
])
|
|
@@ -9515,15 +9515,15 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9515
9515
|
emits: /* @__PURE__ */ Ue(["update:modelValue"], ["update:modelValue"]),
|
|
9516
9516
|
setup(e, { emit: t }) {
|
|
9517
9517
|
const n = e, l = t;
|
|
9518
|
-
|
|
9519
|
-
const o = D(null), a = D(null), i = D(null), r = D(!1), c = D(""), f = Ke(e, "modelValue"),
|
|
9518
|
+
wt(n.style);
|
|
9519
|
+
const o = D(null), a = D(null), i = D(null), r = D(!1), c = D(""), f = Ke(e, "modelValue"), _ = y(() => n.placeholder || "Add tag…"), x = y(() => f.value?.length === 0 && c.value === ""), w = y(() => !n.disabled && f.value?.length > 0), b = y(() => n.disabled), m = async () => {
|
|
9520
9520
|
b.value || await et(() => i.value?.focus());
|
|
9521
|
-
},
|
|
9521
|
+
}, k = (Z) => {
|
|
9522
9522
|
const F = Z.trim();
|
|
9523
9523
|
F !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [F] : n.unique ? f.value.includes(F) || (f.value = [...f.value, F]) : f.value = [...f.value, F], c.value = "");
|
|
9524
9524
|
}, g = () => {
|
|
9525
9525
|
const Z = c.value;
|
|
9526
|
-
Z.trim() !== "" &&
|
|
9526
|
+
Z.trim() !== "" && k(Z), c.value = "";
|
|
9527
9527
|
}, M = (Z) => {
|
|
9528
9528
|
const F = f.value.slice();
|
|
9529
9529
|
F.splice(Z, 1), l("update:modelValue", F);
|
|
@@ -9577,14 +9577,14 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9577
9577
|
onClick: Ee((P) => M(B), ["stop"]),
|
|
9578
9578
|
"aria-label": `Remove ${j}`
|
|
9579
9579
|
}, [
|
|
9580
|
-
G(
|
|
9580
|
+
G(q(Ct), {
|
|
9581
9581
|
"aria-hidden": "true",
|
|
9582
9582
|
focusable: "false",
|
|
9583
9583
|
class: "inline-block h-4 w-4"
|
|
9584
9584
|
})
|
|
9585
9585
|
], 8, _m)
|
|
9586
9586
|
]))), 128)),
|
|
9587
|
-
|
|
9587
|
+
x.value ? (u(), v("div", $m, ce(_.value), 1)) : K("", !0),
|
|
9588
9588
|
d("div", Sm, [
|
|
9589
9589
|
b.value ? K("", !0) : Re((u(), v("input", {
|
|
9590
9590
|
key: 0,
|
|
@@ -9617,7 +9617,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9617
9617
|
disabled: b.value,
|
|
9618
9618
|
onClick: Ee(C, ["stop"])
|
|
9619
9619
|
}, [
|
|
9620
|
-
G(
|
|
9620
|
+
G(q(Ct), { class: "h-4 w-4" })
|
|
9621
9621
|
], 8, Lm)) : K("", !0)
|
|
9622
9622
|
])
|
|
9623
9623
|
], 10, wm)
|
|
@@ -9724,16 +9724,16 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9724
9724
|
setup(e) {
|
|
9725
9725
|
const t = e, n = Ke(e, "modelValue"), l = D(!1), o = y(() => t.init !== !1), a = y(() => !!t.table && !!t.code), i = () => {
|
|
9726
9726
|
if (!a.value) return "";
|
|
9727
|
-
const f = encodeURIComponent(String(t.table)),
|
|
9728
|
-
return `/api/code-gen/${f}/${
|
|
9727
|
+
const f = encodeURIComponent(String(t.table)), _ = encodeURIComponent(String(t.code));
|
|
9728
|
+
return `/api/code-gen/${f}/${_}`;
|
|
9729
9729
|
}, r = async () => {
|
|
9730
9730
|
if (!a.value || l.value) return;
|
|
9731
9731
|
const f = i();
|
|
9732
9732
|
if (f) {
|
|
9733
9733
|
l.value = !0;
|
|
9734
9734
|
try {
|
|
9735
|
-
const
|
|
9736
|
-
n.value =
|
|
9735
|
+
const x = await (await fetch(f)).text();
|
|
9736
|
+
n.value = x;
|
|
9737
9737
|
} finally {
|
|
9738
9738
|
l.value = !1;
|
|
9739
9739
|
}
|
|
@@ -9748,11 +9748,11 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9748
9748
|
() => {
|
|
9749
9749
|
c();
|
|
9750
9750
|
}
|
|
9751
|
-
), (f,
|
|
9751
|
+
), (f, _) => (u(), v("div", Em, [
|
|
9752
9752
|
Re(d("input", {
|
|
9753
9753
|
disabled: f.disabled,
|
|
9754
9754
|
placeholder: f.placeholder,
|
|
9755
|
-
"onUpdate:modelValue":
|
|
9755
|
+
"onUpdate:modelValue": _[0] || (_[0] = (x) => n.value = x),
|
|
9756
9756
|
class: "block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
|
|
9757
9757
|
}, null, 8, Fm), [
|
|
9758
9758
|
[at, n.value]
|
|
@@ -9794,7 +9794,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9794
9794
|
value: C
|
|
9795
9795
|
}));
|
|
9796
9796
|
})();
|
|
9797
|
-
function
|
|
9797
|
+
function x(g) {
|
|
9798
9798
|
f.value = g;
|
|
9799
9799
|
}
|
|
9800
9800
|
function w(g) {
|
|
@@ -9804,7 +9804,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9804
9804
|
}
|
|
9805
9805
|
const b = y(() => c.value.some((g) => g.key && !g.value || !g.key && g.value)), m = () => {
|
|
9806
9806
|
c.value.push({ id: n("key-value-"), key: "", value: "" });
|
|
9807
|
-
},
|
|
9807
|
+
}, k = (g) => {
|
|
9808
9808
|
c.value = c.value.filter((M) => M.id !== g);
|
|
9809
9809
|
};
|
|
9810
9810
|
return ve(
|
|
@@ -9829,13 +9829,13 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9829
9829
|
key: C.id,
|
|
9830
9830
|
class: ie(["flex items-center gap-2 w-full", { "opacity-50": f.value === V }]),
|
|
9831
9831
|
draggable: "true",
|
|
9832
|
-
onDragstart: (A) =>
|
|
9832
|
+
onDragstart: (A) => x(V),
|
|
9833
9833
|
onDragover: M[0] || (M[0] = Ee(() => {
|
|
9834
9834
|
}, ["prevent"])),
|
|
9835
9835
|
onDrop: (A) => w(V)
|
|
9836
9836
|
}, [
|
|
9837
9837
|
d("button", Hm, [
|
|
9838
|
-
G(
|
|
9838
|
+
G(q(cn), { class: "h-4 w-4" })
|
|
9839
9839
|
]),
|
|
9840
9840
|
d("div", Wm, [
|
|
9841
9841
|
G(kn, {
|
|
@@ -9852,10 +9852,10 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9852
9852
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
9853
9853
|
]),
|
|
9854
9854
|
d("button", {
|
|
9855
|
-
onClick: (A) =>
|
|
9855
|
+
onClick: (A) => k(C.id),
|
|
9856
9856
|
class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
|
|
9857
9857
|
}, [
|
|
9858
|
-
G(
|
|
9858
|
+
G(q(Ct), { class: "h-4 w-4" })
|
|
9859
9859
|
], 8, Km)
|
|
9860
9860
|
], 42, Um))), 128))
|
|
9861
9861
|
], 512),
|
|
@@ -9867,8 +9867,8 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9867
9867
|
disabled: b.value,
|
|
9868
9868
|
class: "py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
9869
9869
|
}, [
|
|
9870
|
-
G(
|
|
9871
|
-
nt(" " + ce(
|
|
9870
|
+
G(q(Ot), { class: "h-4 w-4" }),
|
|
9871
|
+
nt(" " + ce(q(i)), 1)
|
|
9872
9872
|
], 8, Xm)
|
|
9873
9873
|
])
|
|
9874
9874
|
]));
|
|
@@ -9895,21 +9895,21 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9895
9895
|
setup(e) {
|
|
9896
9896
|
const t = e, n = Ke(e, "modelValue"), l = D([]), o = D(null), a = y(() => !!t.disabled), i = y(() => t.placeholder ?? ""), r = y(() => t.addButtonText ?? "Додати");
|
|
9897
9897
|
let c = !1;
|
|
9898
|
-
const f = (g) => `${g}-${Math.random().toString(36).substring(2, 15)}`,
|
|
9898
|
+
const f = (g) => `${g}-${Math.random().toString(36).substring(2, 15)}`, _ = (g) => {
|
|
9899
9899
|
const M = g ?? n.value ?? [];
|
|
9900
9900
|
l.value = M.map((C, V) => ({
|
|
9901
9901
|
id: l.value[V]?.id ?? f("text-array"),
|
|
9902
9902
|
value: C ?? ""
|
|
9903
9903
|
}));
|
|
9904
9904
|
};
|
|
9905
|
-
|
|
9905
|
+
_(), ve(
|
|
9906
9906
|
() => n.value,
|
|
9907
9907
|
(g) => {
|
|
9908
9908
|
if (c) {
|
|
9909
9909
|
c = !1;
|
|
9910
9910
|
return;
|
|
9911
9911
|
}
|
|
9912
|
-
|
|
9912
|
+
_(g || []);
|
|
9913
9913
|
},
|
|
9914
9914
|
{ deep: !0 }
|
|
9915
9915
|
), ve(
|
|
@@ -9919,9 +9919,9 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9919
9919
|
},
|
|
9920
9920
|
{ deep: !0 }
|
|
9921
9921
|
);
|
|
9922
|
-
const
|
|
9922
|
+
const x = y(() => a.value || l.value.some((g) => !g.value));
|
|
9923
9923
|
function w() {
|
|
9924
|
-
|
|
9924
|
+
x.value || (l.value = [...l.value, { id: f("text-array"), value: "" }]);
|
|
9925
9925
|
}
|
|
9926
9926
|
function b(g) {
|
|
9927
9927
|
a.value || (l.value = l.value.filter((M) => M.id !== g));
|
|
@@ -9929,7 +9929,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9929
9929
|
function m(g) {
|
|
9930
9930
|
a.value || (o.value = g);
|
|
9931
9931
|
}
|
|
9932
|
-
function
|
|
9932
|
+
function k(g) {
|
|
9933
9933
|
if (a.value || o.value === null || o.value === g) return;
|
|
9934
9934
|
const M = [...l.value], [C] = M.splice(o.value, 1);
|
|
9935
9935
|
M.splice(g, 0, C), l.value = M, o.value = null;
|
|
@@ -9943,14 +9943,14 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9943
9943
|
onDragstart: (A) => m(V),
|
|
9944
9944
|
onDragover: M[0] || (M[0] = Ee(() => {
|
|
9945
9945
|
}, ["prevent"])),
|
|
9946
|
-
onDrop: (A) =>
|
|
9946
|
+
onDrop: (A) => k(V)
|
|
9947
9947
|
}, [
|
|
9948
9948
|
d("button", {
|
|
9949
9949
|
class: "cursor-move",
|
|
9950
9950
|
type: "button",
|
|
9951
9951
|
disabled: a.value
|
|
9952
9952
|
}, [
|
|
9953
|
-
G(
|
|
9953
|
+
G(q(cn), { class: "h-4 w-4" })
|
|
9954
9954
|
], 8, nv),
|
|
9955
9955
|
d("div", lv, [
|
|
9956
9956
|
g.inputType === "text" ? (u(), xe(kn, {
|
|
@@ -9989,7 +9989,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9989
9989
|
disabled: a.value,
|
|
9990
9990
|
class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200 disabled:opacity-50"
|
|
9991
9991
|
}, [
|
|
9992
|
-
G(
|
|
9992
|
+
G(q(Ct), { class: "h-4 w-4" })
|
|
9993
9993
|
], 8, av)
|
|
9994
9994
|
], 42, tv))), 128))
|
|
9995
9995
|
], 512),
|
|
@@ -9998,10 +9998,10 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
9998
9998
|
d("button", {
|
|
9999
9999
|
type: "button",
|
|
10000
10000
|
onClick: w,
|
|
10001
|
-
disabled:
|
|
10001
|
+
disabled: x.value,
|
|
10002
10002
|
class: "py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
10003
10003
|
}, [
|
|
10004
|
-
G(
|
|
10004
|
+
G(q(Ot), { class: "h-4 w-4" }),
|
|
10005
10005
|
nt(" " + ce(r.value), 1)
|
|
10006
10006
|
], 8, sv)
|
|
10007
10007
|
])
|
|
@@ -10022,7 +10022,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10022
10022
|
},
|
|
10023
10023
|
emits: ["update:modelValue"],
|
|
10024
10024
|
setup(e, { emit: t }) {
|
|
10025
|
-
const n = e, { inputClass: l } =
|
|
10025
|
+
const n = e, { inputClass: l } = wt(n.style), o = t, a = y({
|
|
10026
10026
|
get: () => n.modelValue || "#000000",
|
|
10027
10027
|
set: (r) => o("update:modelValue", r)
|
|
10028
10028
|
}), i = y(() => !!n.disabled);
|
|
@@ -10032,7 +10032,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10032
10032
|
"onUpdate:modelValue": c[0] || (c[0] = (f) => a.value = f),
|
|
10033
10033
|
disabled: i.value,
|
|
10034
10034
|
ref: "color",
|
|
10035
|
-
class: ie(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50",
|
|
10035
|
+
class: ie(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", q(l)].join(" ")]),
|
|
10036
10036
|
style: { border: "1px solid #CFD9E0" }
|
|
10037
10037
|
}, null, 10, cv), [
|
|
10038
10038
|
[at, a.value]
|
|
@@ -10064,28 +10064,28 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10064
10064
|
},
|
|
10065
10065
|
emits: ["update:modelValue"],
|
|
10066
10066
|
setup(e, { emit: t }) {
|
|
10067
|
-
const n = e, { inputClass: l } =
|
|
10068
|
-
const
|
|
10069
|
-
return Number.isNaN(
|
|
10067
|
+
const n = e, { inputClass: l } = wt(n.style), o = t, a = (_) => {
|
|
10068
|
+
const x = Number(_), w = Number(n.min), b = Number(n.max);
|
|
10069
|
+
return Number.isNaN(x) ? w : Math.min(b, Math.max(w, x));
|
|
10070
10070
|
}, i = y({
|
|
10071
10071
|
get: () => a(n.modelValue ?? n.min),
|
|
10072
|
-
set: (
|
|
10073
|
-
}), r = (
|
|
10074
|
-
const
|
|
10075
|
-
|
|
10076
|
-
}, c = (
|
|
10077
|
-
Number(n.min) >= 0 &&
|
|
10072
|
+
set: (_) => o("update:modelValue", a(_))
|
|
10073
|
+
}), r = (_) => {
|
|
10074
|
+
const x = _.target, w = a(x.value);
|
|
10075
|
+
x.value = String(w), o("update:modelValue", w);
|
|
10076
|
+
}, c = (_) => {
|
|
10077
|
+
Number(n.min) >= 0 && _.key === "-" && _.preventDefault();
|
|
10078
10078
|
}, f = y(() => !!n.disabled);
|
|
10079
|
-
return (
|
|
10079
|
+
return (_, x) => (u(), v("div", mv, [
|
|
10080
10080
|
Re(d("input", {
|
|
10081
10081
|
type: "range",
|
|
10082
|
-
"onUpdate:modelValue":
|
|
10083
|
-
min:
|
|
10084
|
-
max:
|
|
10085
|
-
step:
|
|
10082
|
+
"onUpdate:modelValue": x[0] || (x[0] = (w) => i.value = w),
|
|
10083
|
+
min: _.min,
|
|
10084
|
+
max: _.max,
|
|
10085
|
+
step: _.step,
|
|
10086
10086
|
disabled: f.value,
|
|
10087
10087
|
ref: "range",
|
|
10088
|
-
class: ie(["w-full cursor-pointer accent-blue-500", [
|
|
10088
|
+
class: ie(["w-full cursor-pointer accent-blue-500", [_.modelValue ? "" : "text-opacity-50", q(l)].join(" ")])
|
|
10089
10089
|
}, null, 10, vv), [
|
|
10090
10090
|
[at, i.value]
|
|
10091
10091
|
]),
|
|
@@ -10093,9 +10093,9 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10093
10093
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
|
|
10094
10094
|
type: "number",
|
|
10095
10095
|
value: i.value,
|
|
10096
|
-
min:
|
|
10097
|
-
max:
|
|
10098
|
-
step:
|
|
10096
|
+
min: _.min,
|
|
10097
|
+
max: _.max,
|
|
10098
|
+
step: _.step,
|
|
10099
10099
|
onInput: r,
|
|
10100
10100
|
onKeydown: c,
|
|
10101
10101
|
disabled: f.value
|
|
@@ -10126,22 +10126,22 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10126
10126
|
}),
|
|
10127
10127
|
emits: ["update:modelValue"],
|
|
10128
10128
|
setup(e) {
|
|
10129
|
-
const t = e, n = D(t.count), l = y(() => t.limit), { inputClass: o } =
|
|
10129
|
+
const t = e, n = D(t.count), l = y(() => t.limit), { inputClass: o } = wt(t.style), a = Ke(e, "modelValue"), i = y(() => !!t.disabled), r = y(() => t.placeholder ?? "");
|
|
10130
10130
|
Vl(() => {
|
|
10131
|
-
const
|
|
10132
|
-
|
|
10131
|
+
const k = a.value?.length ?? 0;
|
|
10132
|
+
k < n.value && (a.value = [
|
|
10133
10133
|
...a.value ?? [],
|
|
10134
|
-
...Array(n.value -
|
|
10134
|
+
...Array(n.value - k)
|
|
10135
10135
|
]);
|
|
10136
10136
|
});
|
|
10137
10137
|
const c = D({}), f = D({});
|
|
10138
|
-
function
|
|
10139
|
-
|
|
10138
|
+
function _(k, g) {
|
|
10139
|
+
k && (c.value[g] = k);
|
|
10140
10140
|
}
|
|
10141
|
-
async function k
|
|
10142
|
-
if (!
|
|
10141
|
+
async function x(k, g) {
|
|
10142
|
+
if (!k || t.inputType !== "mask") return;
|
|
10143
10143
|
const { default: M } = await import("./index-W-qQIppj.js");
|
|
10144
|
-
f.value[g] && f.value[g].destroy(), f.value[g] = M(
|
|
10144
|
+
f.value[g] && f.value[g].destroy(), f.value[g] = M(k, {
|
|
10145
10145
|
mask: t.mask || "",
|
|
10146
10146
|
definitions: {
|
|
10147
10147
|
9: /[0-9]/,
|
|
@@ -10157,41 +10157,41 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10157
10157
|
C[g] = t.unmask ? f.value[g].unmaskedValue : f.value[g].value, a.value = C;
|
|
10158
10158
|
}), a.value?.[g] && (f.value[g].value = a.value[g]);
|
|
10159
10159
|
}
|
|
10160
|
-
function w(
|
|
10160
|
+
function w(k, g) {
|
|
10161
10161
|
if (i.value) return;
|
|
10162
|
-
const M =
|
|
10162
|
+
const M = k.target.value ?? null, C = [...a.value];
|
|
10163
10163
|
C[g] = t.inputType === "text" ? M : Number(M), a.value = C;
|
|
10164
10164
|
}
|
|
10165
10165
|
function b() {
|
|
10166
10166
|
n.value += 1;
|
|
10167
|
-
const
|
|
10168
|
-
a.value = [...a.value,
|
|
10167
|
+
const k = t.inputType === "text" || t.inputType === "mask" ? null : 0;
|
|
10168
|
+
a.value = [...a.value, k], t.inputType === "mask" && setTimeout(() => {
|
|
10169
10169
|
const g = n.value - 1;
|
|
10170
|
-
c.value[g] &&
|
|
10170
|
+
c.value[g] && x(c.value[g], g);
|
|
10171
10171
|
}, 0);
|
|
10172
10172
|
}
|
|
10173
|
-
function m(
|
|
10173
|
+
function m(k) {
|
|
10174
10174
|
if (n.value > 1) {
|
|
10175
|
-
f.value[
|
|
10175
|
+
f.value[k] && (f.value[k].destroy(), delete f.value[k]), n.value -= 1, a.value = a.value.filter((M, C) => C !== k);
|
|
10176
10176
|
const g = {};
|
|
10177
10177
|
Object.keys(f.value).forEach((M) => {
|
|
10178
10178
|
const C = parseInt(M, 10);
|
|
10179
|
-
C >
|
|
10179
|
+
C > k ? g[C - 1] = f.value[C] : C < k && (g[C] = f.value[C]);
|
|
10180
10180
|
}), f.value = g;
|
|
10181
10181
|
}
|
|
10182
10182
|
}
|
|
10183
10183
|
return lt(() => {
|
|
10184
10184
|
if (t.inputType === "mask")
|
|
10185
|
-
for (let
|
|
10186
|
-
c.value[
|
|
10185
|
+
for (let k = 0; k < n.value; k += 1)
|
|
10186
|
+
c.value[k] && x(c.value[k], k);
|
|
10187
10187
|
}), It(() => {
|
|
10188
|
-
Object.values(f.value).forEach((
|
|
10189
|
-
|
|
10188
|
+
Object.values(f.value).forEach((k) => {
|
|
10189
|
+
k && k.destroy();
|
|
10190
10190
|
});
|
|
10191
|
-
}), ve(() => t.mask, (
|
|
10191
|
+
}), ve(() => t.mask, (k) => {
|
|
10192
10192
|
t.inputType === "mask" && Object.values(f.value).forEach((g) => {
|
|
10193
10193
|
g && g.updateOptions({
|
|
10194
|
-
mask:
|
|
10194
|
+
mask: k,
|
|
10195
10195
|
definitions: {
|
|
10196
10196
|
9: /[0-9]/,
|
|
10197
10197
|
A: /[a-zA-Z]/,
|
|
@@ -10199,56 +10199,56 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10199
10199
|
}
|
|
10200
10200
|
});
|
|
10201
10201
|
});
|
|
10202
|
-
}), ve(a, (
|
|
10203
|
-
t.inputType === "mask" &&
|
|
10202
|
+
}), ve(a, (k) => {
|
|
10203
|
+
t.inputType === "mask" && k && k.forEach((g, M) => {
|
|
10204
10204
|
f.value[M] && f.value[M].value !== g && (f.value[M].value = g || "");
|
|
10205
10205
|
});
|
|
10206
|
-
}, { deep: !0 }), (
|
|
10206
|
+
}, { deep: !0 }), (k, g) => (u(), v("div", {
|
|
10207
10207
|
class: ie(["grid gap-2", `grid-cols-${l.value}`])
|
|
10208
10208
|
}, [
|
|
10209
10209
|
(u(!0), v(Ae, null, Be(n.value, (M) => (u(), v("div", {
|
|
10210
10210
|
key: M,
|
|
10211
10211
|
class: "flex items-center gap-2 w-full"
|
|
10212
10212
|
}, [
|
|
10213
|
-
|
|
10213
|
+
k.inputType === "mask" ? (u(), v("input", {
|
|
10214
10214
|
key: 0,
|
|
10215
10215
|
type: "text",
|
|
10216
10216
|
ref_for: !0,
|
|
10217
|
-
ref: (C) =>
|
|
10218
|
-
placeholder:
|
|
10219
|
-
disabled:
|
|
10220
|
-
name: `${
|
|
10221
|
-
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [
|
|
10217
|
+
ref: (C) => _(C, M - 1),
|
|
10218
|
+
placeholder: k.placeholder,
|
|
10219
|
+
disabled: k.disabled,
|
|
10220
|
+
name: `${k.name}[${M - 1}]`,
|
|
10221
|
+
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(o), { "!border-red-600": k.error }]]),
|
|
10222
10222
|
style: {
|
|
10223
10223
|
border: "1px solid #CFD9E0"
|
|
10224
10224
|
}
|
|
10225
10225
|
}, null, 10, hv)) : (u(), v("input", {
|
|
10226
10226
|
key: 1,
|
|
10227
|
-
type:
|
|
10227
|
+
type: k.inputType,
|
|
10228
10228
|
value: a.value?.[M - 1],
|
|
10229
10229
|
onInput: (C) => w(C, M - 1),
|
|
10230
10230
|
placeholder: r.value,
|
|
10231
10231
|
disabled: i.value,
|
|
10232
|
-
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [
|
|
10232
|
+
class: ie(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(o), { "!border-red-600": k.error }]]),
|
|
10233
10233
|
style: {
|
|
10234
10234
|
border: "1px solid #CFD9E0"
|
|
10235
10235
|
}
|
|
10236
10236
|
}, null, 42, bv)),
|
|
10237
|
-
!
|
|
10237
|
+
!k.disabled && M === n.value && k.isAdded ? (u(), v("button", {
|
|
10238
10238
|
key: 2,
|
|
10239
10239
|
type: "button",
|
|
10240
10240
|
onClick: Ee(b, ["stop"]),
|
|
10241
10241
|
class: "cursor-pointer shrink-0 w-[38px] text-green-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"
|
|
10242
10242
|
}, [
|
|
10243
|
-
G(
|
|
10243
|
+
G(q(Ot), { class: "h-4 w-4" })
|
|
10244
10244
|
])) : K("", !0),
|
|
10245
|
-
!
|
|
10245
|
+
!k.disabled && n.value > 1 && k.isAdded ? (u(), v("button", {
|
|
10246
10246
|
key: 3,
|
|
10247
10247
|
type: "button",
|
|
10248
10248
|
onClick: Ee((C) => m(M - 1), ["stop"]),
|
|
10249
10249
|
class: "cursor-pointer shrink-0 w-[38px] text-red-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"
|
|
10250
10250
|
}, [
|
|
10251
|
-
G(
|
|
10251
|
+
G(q(Ct), { class: "h-4 w-4" })
|
|
10252
10252
|
], 8, wv)) : K("", !0)
|
|
10253
10253
|
]))), 128))
|
|
10254
10254
|
], 2));
|
|
@@ -10288,7 +10288,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10288
10288
|
}),
|
|
10289
10289
|
emits: /* @__PURE__ */ Ue(["change", "update:modelValue", "value-selected"], ["update:modelValue"]),
|
|
10290
10290
|
setup(e, { emit: t }) {
|
|
10291
|
-
const n = e, l = t, o = Ke(e, "modelValue"), a = D([]), i = D(n.options ?? []), r = D({}), c = D({}), f = D({ keyword: "", parent: null }),
|
|
10291
|
+
const n = e, l = t, o = Ke(e, "modelValue"), a = D([]), i = D(n.options ?? []), r = D({}), c = D({}), f = D({ keyword: "", parent: null }), _ = D(""), x = D(!1), w = D(null), b = D(null), m = D(null), k = D(null), g = D(null), M = D({});
|
|
10292
10292
|
let C = !1, V = !1;
|
|
10293
10293
|
const A = dt("values"), U = y(() => !!n.disabled), Z = y(() => n.placeholder ?? "Оберіть значення"), F = y(() => n.search !== !1), j = y(() => {
|
|
10294
10294
|
const $ = n.parent ?? n.parentValue;
|
|
@@ -10303,8 +10303,8 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10303
10303
|
}, Se = y(() => new Set(a.value.map(($) => P($.id)))), X = y(() => {
|
|
10304
10304
|
const $ = Se.value;
|
|
10305
10305
|
let L = [...i.value];
|
|
10306
|
-
if (!n.data &&
|
|
10307
|
-
const O =
|
|
10306
|
+
if (!n.data && _.value.trim()) {
|
|
10307
|
+
const O = _.value.toLowerCase();
|
|
10308
10308
|
L = L.filter((me) => Q(me).toLowerCase().includes(O));
|
|
10309
10309
|
}
|
|
10310
10310
|
return L.filter((O) => !$.has(P(O.id)));
|
|
@@ -10374,32 +10374,32 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10374
10374
|
n.data && await R($, { force: !0 });
|
|
10375
10375
|
}, 250), se = D(null), Me = () => {
|
|
10376
10376
|
if (!m.value) return;
|
|
10377
|
-
const $ = m.value.getBoundingClientRect(), L = window.innerHeight ?? document.documentElement.clientHeight, O = window.innerWidth ?? document.documentElement.clientWidth, me = 8, De = 8, Qe = n.maxHeight ?? 280, Ge = L - $.bottom - De - me, pt = $.top - De - me,
|
|
10377
|
+
const $ = m.value.getBoundingClientRect(), L = window.innerHeight ?? document.documentElement.clientHeight, O = window.innerWidth ?? document.documentElement.clientWidth, me = 8, De = 8, Qe = n.maxHeight ?? 280, Ge = L - $.bottom - De - me, pt = $.top - De - me, ht = Ge >= pt, xt = Math.max(O - me * 2, 0);
|
|
10378
10378
|
let { width: E } = $;
|
|
10379
10379
|
xt > 0 && E > xt && (E = xt);
|
|
10380
10380
|
let { left: he } = $;
|
|
10381
10381
|
he + E + me > O && (he = O - E - me), he = Math.max(he, me);
|
|
10382
10382
|
const mt = Math.min(
|
|
10383
10383
|
Qe,
|
|
10384
|
-
Math.max(
|
|
10384
|
+
Math.max(ht ? Ge : pt, 50)
|
|
10385
10385
|
);
|
|
10386
10386
|
M.value = {
|
|
10387
10387
|
position: "fixed",
|
|
10388
10388
|
left: `${he}px`,
|
|
10389
10389
|
width: `${E}px`,
|
|
10390
10390
|
maxHeight: `${mt}px`,
|
|
10391
|
-
transform:
|
|
10392
|
-
top:
|
|
10391
|
+
transform: ht ? "none" : "translateY(-100%)",
|
|
10392
|
+
top: ht ? `${$.bottom + De}px` : `${$.top - De}px`
|
|
10393
10393
|
};
|
|
10394
10394
|
}, Ie = async ($ = "click") => {
|
|
10395
|
-
U.value ||
|
|
10395
|
+
U.value || x.value || (se.value = $, await R(_.value.trim()), x.value = !0, await et(), Me(), g.value?.focus());
|
|
10396
10396
|
}, Ve = () => {
|
|
10397
|
-
|
|
10397
|
+
x.value = !1, se.value = null, et(() => {
|
|
10398
10398
|
g.value?.blur();
|
|
10399
10399
|
});
|
|
10400
10400
|
}, He = async ($) => {
|
|
10401
10401
|
if ($.stopPropagation(), !U.value) {
|
|
10402
|
-
if (
|
|
10402
|
+
if (x.value) {
|
|
10403
10403
|
if (se.value === "focus") {
|
|
10404
10404
|
se.value = null;
|
|
10405
10405
|
return;
|
|
@@ -10412,12 +10412,12 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10412
10412
|
}, Ze = ($) => {
|
|
10413
10413
|
$.key === "Escape" && Ve();
|
|
10414
10414
|
}, Je = ($) => {
|
|
10415
|
-
if (!
|
|
10415
|
+
if (!x.value) return;
|
|
10416
10416
|
const L = $.target;
|
|
10417
|
-
|
|
10417
|
+
k.value?.contains(L) || Ve();
|
|
10418
10418
|
}, ze = ($) => {
|
|
10419
10419
|
const L = $.target;
|
|
10420
|
-
b.value?.contains(L) ||
|
|
10420
|
+
b.value?.contains(L) || k.value?.contains(L) || Ve();
|
|
10421
10421
|
}, ue = ($) => {
|
|
10422
10422
|
if ($.key === "Escape") {
|
|
10423
10423
|
$.preventDefault(), Ve();
|
|
@@ -10438,7 +10438,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10438
10438
|
text: Q($) || String($.id ?? ""),
|
|
10439
10439
|
key: pe($.id)
|
|
10440
10440
|
};
|
|
10441
|
-
a.value = [...a.value, O], Le($),
|
|
10441
|
+
a.value = [...a.value, O], Le($), _.value = "", et(() => {
|
|
10442
10442
|
g.value?.focus();
|
|
10443
10443
|
});
|
|
10444
10444
|
}, Le = ($) => {
|
|
@@ -10455,7 +10455,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10455
10455
|
}, {
|
|
10456
10456
|
isOpenAdd: Ye,
|
|
10457
10457
|
addData: ct,
|
|
10458
|
-
addSchema:
|
|
10458
|
+
addSchema: W,
|
|
10459
10459
|
addForm: le,
|
|
10460
10460
|
addTitle: ae,
|
|
10461
10461
|
addOption: we,
|
|
@@ -10509,14 +10509,14 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10509
10509
|
return;
|
|
10510
10510
|
}
|
|
10511
10511
|
qe();
|
|
10512
|
-
}, { deep: !0 }), ve(
|
|
10513
|
-
!n.data || !
|
|
10512
|
+
}, { deep: !0 }), ve(_, ($) => {
|
|
10513
|
+
!n.data || !x.value || be($.trim());
|
|
10514
10514
|
}), ve(U, ($) => {
|
|
10515
10515
|
$ && Ve();
|
|
10516
10516
|
}), ve(() => n.options, async ($) => {
|
|
10517
10517
|
n.data || (Y($ ?? []), await qe());
|
|
10518
10518
|
}, { immediate: !0, deep: !0 }), ve(() => n.data, async ($) => {
|
|
10519
|
-
$ && (await R(
|
|
10519
|
+
$ && (await R(_.value.trim()), await qe());
|
|
10520
10520
|
}, { immediate: !0 });
|
|
10521
10521
|
const z = D(!1);
|
|
10522
10522
|
return ve(B, async () => {
|
|
@@ -10525,25 +10525,25 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10525
10525
|
z.value = !0;
|
|
10526
10526
|
return;
|
|
10527
10527
|
}
|
|
10528
|
-
a.value = [], await R(
|
|
10528
|
+
a.value = [], await R(_.value.trim()), await qe();
|
|
10529
10529
|
}
|
|
10530
10530
|
}), lt(async () => {
|
|
10531
10531
|
document.addEventListener("click", ze, !0), window.addEventListener("keydown", Ze), window.addEventListener("scroll", Je, !0), await qe();
|
|
10532
10532
|
}), fn(() => {
|
|
10533
10533
|
document.removeEventListener("click", ze, !0), window.removeEventListener("keydown", Ze), window.removeEventListener("scroll", Je, !0);
|
|
10534
10534
|
}), ($, L) => (u(), v(Ae, null, [
|
|
10535
|
-
G(
|
|
10536
|
-
visible:
|
|
10535
|
+
G(q(el), {
|
|
10536
|
+
visible: q(Ye),
|
|
10537
10537
|
"onUpdate:visible": L[1] || (L[1] = (O) => Yn(Ye) ? Ye.value = O : null),
|
|
10538
10538
|
class: "z-[1000]",
|
|
10539
|
-
title:
|
|
10539
|
+
title: q(ae),
|
|
10540
10540
|
buttonText: "Додати",
|
|
10541
|
-
onDone:
|
|
10541
|
+
onDone: q(we)
|
|
10542
10542
|
}, {
|
|
10543
10543
|
default: ut(() => [
|
|
10544
10544
|
G(qt, {
|
|
10545
|
-
schema: W
|
|
10546
|
-
modelValue:
|
|
10545
|
+
schema: q(W),
|
|
10546
|
+
modelValue: q(ct),
|
|
10547
10547
|
"onUpdate:modelValue": L[0] || (L[0] = (O) => Yn(ct) ? ct.value = O : null),
|
|
10548
10548
|
ref_key: "addForm",
|
|
10549
10549
|
ref: le
|
|
@@ -10568,19 +10568,19 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10568
10568
|
class: ie([
|
|
10569
10569
|
"flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white px-3",
|
|
10570
10570
|
"border-gray-300 hover:border-[#b3d4ff]",
|
|
10571
|
-
|
|
10571
|
+
x.value ? "border-[#2684ff] ring-1 ring-[#2684ff] shadow-[0_0_0_1px_rgba(38,132,255,0.5)]" : "",
|
|
10572
10572
|
U.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
|
|
10573
10573
|
]),
|
|
10574
10574
|
role: "combobox",
|
|
10575
|
-
"aria-expanded":
|
|
10575
|
+
"aria-expanded": x.value,
|
|
10576
10576
|
"aria-haspopup": "listbox",
|
|
10577
|
-
"data-focus":
|
|
10577
|
+
"data-focus": x.value ? "true" : "false",
|
|
10578
10578
|
onClick: He
|
|
10579
10579
|
}, [
|
|
10580
10580
|
Re(d("input", {
|
|
10581
10581
|
ref_key: "inputRef",
|
|
10582
10582
|
ref: g,
|
|
10583
|
-
"onUpdate:modelValue": L[2] || (L[2] = (O) =>
|
|
10583
|
+
"onUpdate:modelValue": L[2] || (L[2] = (O) => _.value = O),
|
|
10584
10584
|
placeholder: Z.value,
|
|
10585
10585
|
disabled: U.value,
|
|
10586
10586
|
readonly: !F.value,
|
|
@@ -10588,22 +10588,22 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10588
10588
|
onKeydown: ue,
|
|
10589
10589
|
class: "flex-1 bg-transparent border-0 outline-none px-0 py-1 text-sm text-stone-900 placeholder:text-stone-400"
|
|
10590
10590
|
}, null, 40, $v), [
|
|
10591
|
-
[at,
|
|
10591
|
+
[at, _.value]
|
|
10592
10592
|
]),
|
|
10593
10593
|
d("span", {
|
|
10594
|
-
class: ie(["text-stone-400 transition-transform duration-150",
|
|
10594
|
+
class: ie(["text-stone-400 transition-transform duration-150", x.value ? "rotate-180" : ""]),
|
|
10595
10595
|
"aria-hidden": "true"
|
|
10596
10596
|
}, [
|
|
10597
|
-
G(
|
|
10597
|
+
G(q(pn), { class: "h-4 w-4" })
|
|
10598
10598
|
], 2)
|
|
10599
10599
|
], 10, _v),
|
|
10600
10600
|
(u(), xe(Kt, { to: "body" }, [
|
|
10601
10601
|
G(Jn, { name: "fade" }, {
|
|
10602
10602
|
default: ut(() => [
|
|
10603
|
-
|
|
10603
|
+
x.value ? (u(), v("div", {
|
|
10604
10604
|
key: 0,
|
|
10605
10605
|
ref_key: "dropdownRef",
|
|
10606
|
-
ref:
|
|
10606
|
+
ref: k,
|
|
10607
10607
|
class: "fixed z-[3000] rounded-md border border-stone-200 bg-white shadow-lg overflow-auto",
|
|
10608
10608
|
style: Oe(M.value)
|
|
10609
10609
|
}, [
|
|
@@ -10626,12 +10626,12 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10626
10626
|
n.add ? (u(), v("button", {
|
|
10627
10627
|
key: 0,
|
|
10628
10628
|
onClick: L[5] || (L[5] = //@ts-ignore
|
|
10629
|
-
(...O) =>
|
|
10629
|
+
(...O) => q(Ce) && q(Ce)(...O)),
|
|
10630
10630
|
class: "bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",
|
|
10631
10631
|
disabled: U.value,
|
|
10632
10632
|
type: "button"
|
|
10633
10633
|
}, [
|
|
10634
|
-
G(
|
|
10634
|
+
G(q(Ot), { class: "h-4 w-4" }),
|
|
10635
10635
|
L[8] || (L[8] = d("span", null, "Додати", -1))
|
|
10636
10636
|
], 8, Lv)) : K("", !0)
|
|
10637
10637
|
]),
|
|
@@ -10652,7 +10652,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10652
10652
|
disabled: U.value,
|
|
10653
10653
|
"aria-label": "Перетягнути"
|
|
10654
10654
|
}, [
|
|
10655
|
-
G(
|
|
10655
|
+
G(q(cn), { class: "h-4 w-4" })
|
|
10656
10656
|
], 8, Dv),
|
|
10657
10657
|
d("div", {
|
|
10658
10658
|
class: "flex-1 text-sm text-stone-900",
|
|
@@ -10665,7 +10665,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10665
10665
|
onClick: Ee((De) => Pe(O.id), ["stop"]),
|
|
10666
10666
|
"aria-label": `Видалити ${O.text}`
|
|
10667
10667
|
}, [
|
|
10668
|
-
G(
|
|
10668
|
+
G(q(Ct), { class: "h-4 w-4" })
|
|
10669
10669
|
], 8, Tv)
|
|
10670
10670
|
], 42, Vv))), 128)),
|
|
10671
10671
|
a.value.length === 0 ? (u(), v("p", Ev, "Немає вибраних значень")) : K("", !0)
|
|
@@ -10701,16 +10701,16 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10701
10701
|
}),
|
|
10702
10702
|
emits: /* @__PURE__ */ Ue(["update:modelValue", "update:geom"], ["update:modelValue"]),
|
|
10703
10703
|
setup(e, { emit: t }) {
|
|
10704
|
-
const n = /{{\s*([^}]+?)\s*}}/g, l = e, o = t, { inputClass: a } =
|
|
10704
|
+
const n = /{{\s*([^}]+?)\s*}}/g, l = e, o = t, { inputClass: a } = wt(l.style), i = Ke(e, "modelValue"), r = y({
|
|
10705
10705
|
get: () => i.value,
|
|
10706
10706
|
set: (F) => {
|
|
10707
10707
|
i.value = F;
|
|
10708
10708
|
}
|
|
10709
|
-
}), c = D(!1), f = D([]),
|
|
10710
|
-
ve(
|
|
10711
|
-
typeof document > "u" || (F ? (
|
|
10709
|
+
}), c = D(!1), f = D([]), _ = D(!1), x = D(null);
|
|
10710
|
+
ve(_, (F) => {
|
|
10711
|
+
typeof document > "u" || (F ? (x.value = document.body.style.overflow, document.body.style.overflow = "hidden") : x.value != null ? (document.body.style.overflow = x.value, x.value = null) : document.body.style.removeProperty("overflow"));
|
|
10712
10712
|
}), It(() => {
|
|
10713
|
-
typeof document > "u" || (
|
|
10713
|
+
typeof document > "u" || (x.value != null ? document.body.style.overflow = x.value : document.body.style.removeProperty("overflow"));
|
|
10714
10714
|
});
|
|
10715
10715
|
const w = y(() => l.placeholder ?? ""), b = y(() => !!l.disabled), m = (F) => {
|
|
10716
10716
|
if (!F) return null;
|
|
@@ -10720,13 +10720,13 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10720
10720
|
return j.length !== 4 ? null : j.map(Number);
|
|
10721
10721
|
}
|
|
10722
10722
|
return null;
|
|
10723
|
-
},
|
|
10723
|
+
}, k = y(() => {
|
|
10724
10724
|
const F = m(l.bbox);
|
|
10725
10725
|
if (!F || F.length !== 4) return null;
|
|
10726
10726
|
const j = F.map(Number);
|
|
10727
10727
|
return j.some((B) => Number.isNaN(B)) ? null : j;
|
|
10728
10728
|
}), g = y(() => {
|
|
10729
|
-
const F =
|
|
10729
|
+
const F = k.value;
|
|
10730
10730
|
if (!F) return "";
|
|
10731
10731
|
const [j, B, P, Q] = F;
|
|
10732
10732
|
return `${j},${Math.max(B, Q)},${P},${Math.min(B, Q)}`;
|
|
@@ -10749,7 +10749,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10749
10749
|
c.value = !0;
|
|
10750
10750
|
try {
|
|
10751
10751
|
const Q = await (await fetch(B)).json();
|
|
10752
|
-
f.value = Array.isArray(Q) ? Q : [],
|
|
10752
|
+
f.value = Array.isArray(Q) ? Q : [], _.value = !0;
|
|
10753
10753
|
} catch (P) {
|
|
10754
10754
|
console.error("Address search error:", P);
|
|
10755
10755
|
} finally {
|
|
@@ -10758,11 +10758,11 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10758
10758
|
}
|
|
10759
10759
|
}
|
|
10760
10760
|
function A() {
|
|
10761
|
-
|
|
10761
|
+
_.value = !_.value;
|
|
10762
10762
|
}
|
|
10763
10763
|
function U(F) {
|
|
10764
10764
|
if (!F) return;
|
|
10765
|
-
|
|
10765
|
+
_.value = !1;
|
|
10766
10766
|
const j = parseFloat(F.lat), P = {
|
|
10767
10767
|
type: "Point",
|
|
10768
10768
|
coordinates: [parseFloat(F.lon), j]
|
|
@@ -10773,7 +10773,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10773
10773
|
if (!l.api) return "";
|
|
10774
10774
|
const j = {
|
|
10775
10775
|
value: encodeURIComponent(F),
|
|
10776
|
-
bbox:
|
|
10776
|
+
bbox: k.value ? k.value.join(",") : ""
|
|
10777
10777
|
};
|
|
10778
10778
|
return l.api.replace(n, (B, P) => j[P.trim()] ?? "");
|
|
10779
10779
|
}
|
|
@@ -10784,7 +10784,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10784
10784
|
"onUpdate:modelValue": j[0] || (j[0] = (B) => r.value = B),
|
|
10785
10785
|
placeholder: w.value,
|
|
10786
10786
|
disabled: b.value,
|
|
10787
|
-
class: ie(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500", [
|
|
10787
|
+
class: ie(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500", [q(a), { "!border-red-600": l.error }]]),
|
|
10788
10788
|
style: { border: "1px solid #CFD9E0" },
|
|
10789
10789
|
onKeydown: Ao(Ee(C, ["prevent"]), ["enter"])
|
|
10790
10790
|
}, null, 42, Bv), [
|
|
@@ -10797,7 +10797,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10797
10797
|
onClick: A,
|
|
10798
10798
|
title: "Show search results"
|
|
10799
10799
|
}, [
|
|
10800
|
-
G(
|
|
10800
|
+
G(q(ln), { class: "h-4 w-4" })
|
|
10801
10801
|
])) : K("", !0)
|
|
10802
10802
|
]),
|
|
10803
10803
|
d("button", {
|
|
@@ -10806,25 +10806,25 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10806
10806
|
class: "flex items-center justify-center px-2 py-2 border rounded-md bg-white hover:bg-gray-50 text-gray-600 hover:text-blue-600 disabled:opacity-50 h-[38px]",
|
|
10807
10807
|
disabled: c.value || !r.value?.trim()
|
|
10808
10808
|
}, [
|
|
10809
|
-
c.value ? (u(), xe(
|
|
10809
|
+
c.value ? (u(), xe(q(Ta), {
|
|
10810
10810
|
key: 1,
|
|
10811
10811
|
class: "h-5 w-5 animate-spin text-gray-400"
|
|
10812
|
-
})) : (u(), xe(
|
|
10812
|
+
})) : (u(), xe(q(Qn), {
|
|
10813
10813
|
key: 0,
|
|
10814
10814
|
class: "h-4 w-4"
|
|
10815
10815
|
}))
|
|
10816
10816
|
], 8, Rv),
|
|
10817
10817
|
(u(), xe(Kt, { to: "body" }, [
|
|
10818
|
-
|
|
10818
|
+
_.value ? (u(), v("div", Nv, [
|
|
10819
10819
|
d("div", jv, [
|
|
10820
10820
|
d("div", zv, [
|
|
10821
10821
|
j[2] || (j[2] = d("span", null, "Результати пошуку", -1)),
|
|
10822
10822
|
d("button", {
|
|
10823
10823
|
class: "text-gray-500 hover:text-blue-600",
|
|
10824
|
-
onClick: j[1] || (j[1] = (B) =>
|
|
10824
|
+
onClick: j[1] || (j[1] = (B) => _.value = !1),
|
|
10825
10825
|
title: "Close"
|
|
10826
10826
|
}, [
|
|
10827
|
-
G(
|
|
10827
|
+
G(q(Ct), { class: "h-4 w-4" })
|
|
10828
10828
|
])
|
|
10829
10829
|
]),
|
|
10830
10830
|
d("ul", null, [
|
|
@@ -10869,18 +10869,18 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10869
10869
|
const t = e, n = Ke(e, "modelValue"), l = y(() => Array.isArray(n.value) ? n.value : []), o = D([]), a = y(() => t.schema?.map((g) => ({
|
|
10870
10870
|
...g,
|
|
10871
10871
|
disabled: t.disabled || g.disabled
|
|
10872
|
-
})) ?? []), i = y(() => a.value.map((g) =>
|
|
10872
|
+
})) ?? []), i = y(() => a.value.map((g) => k(g))), r = y(() => a.value.reduce((M, C) => {
|
|
10873
10873
|
const V = Number(C?.col ?? 12);
|
|
10874
10874
|
return M + (Number.isFinite(V) && V > 0 ? V : 12);
|
|
10875
10875
|
}, 0) > 12), c = y(() => t.disabled ? !1 : t.maxItems ? l.value.length < t.maxItems : !0), f = y(() => t.disabled || l.value.length <= (t.minItems || 0));
|
|
10876
10876
|
ve(() => l.value.length, () => {
|
|
10877
|
-
|
|
10878
|
-
}, { immediate: !0 }), ve(() => t.schema,
|
|
10879
|
-
function
|
|
10877
|
+
_(), x();
|
|
10878
|
+
}, { immediate: !0 }), ve(() => t.schema, x, { immediate: !0, deep: !0 });
|
|
10879
|
+
function _() {
|
|
10880
10880
|
const g = l.value.length;
|
|
10881
10881
|
o.value.length < g ? o.value = [...o.value, ...Array.from({ length: g - o.value.length }, () => Nl())] : o.value.length > g && o.value.splice(g);
|
|
10882
10882
|
}
|
|
10883
|
-
function
|
|
10883
|
+
function x() {
|
|
10884
10884
|
if (!t.minItems || l.value.length >= t.minItems) return;
|
|
10885
10885
|
const g = t.minItems - l.value.length, M = Array.from({ length: g }, w);
|
|
10886
10886
|
n.value = [...l.value, ...M];
|
|
@@ -10892,12 +10892,12 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10892
10892
|
}), g;
|
|
10893
10893
|
}
|
|
10894
10894
|
function b() {
|
|
10895
|
-
c.value && (n.value = [...l.value, w()],
|
|
10895
|
+
c.value && (n.value = [...l.value, w()], _());
|
|
10896
10896
|
}
|
|
10897
10897
|
function m(g) {
|
|
10898
|
-
f.value || (n.value = l.value.filter((M, C) => C !== g),
|
|
10898
|
+
f.value || (n.value = l.value.filter((M, C) => C !== g), _(), x());
|
|
10899
10899
|
}
|
|
10900
|
-
function
|
|
10900
|
+
function k(g) {
|
|
10901
10901
|
return {
|
|
10902
10902
|
...g
|
|
10903
10903
|
};
|
|
@@ -10924,7 +10924,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10924
10924
|
onClick: (A) => m(V),
|
|
10925
10925
|
disabled: f.value
|
|
10926
10926
|
}, [
|
|
10927
|
-
G(
|
|
10927
|
+
G(q(on), { class: "h-4 w-4" })
|
|
10928
10928
|
], 8, Yv)
|
|
10929
10929
|
], 2))), 128)),
|
|
10930
10930
|
l.value.length === 0 ? (u(), v("div", Gv, ce(t.emptyLabel), 1)) : K("", !0)
|
|
@@ -10935,7 +10935,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10935
10935
|
onClick: b,
|
|
10936
10936
|
disabled: !c.value
|
|
10937
10937
|
}, [
|
|
10938
|
-
G(
|
|
10938
|
+
G(q(Ot), { class: "h-4 w-4" }),
|
|
10939
10939
|
nt(" " + ce(t.addButtonText), 1)
|
|
10940
10940
|
], 8, Xv)
|
|
10941
10941
|
]));
|
|
@@ -10972,10 +10972,10 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10972
10972
|
}),
|
|
10973
10973
|
emits: ["update:modelValue"],
|
|
10974
10974
|
setup(e) {
|
|
10975
|
-
const t = e, n = Ke(e, "modelValue"), l = D([]), o = D([]), a = D(0), i = D(null), r = D(null), c = D(null), f = y(() => t.groupLabel ?? "Group"),
|
|
10975
|
+
const t = e, n = Ke(e, "modelValue"), l = D([]), o = D([]), a = D(0), i = D(null), r = D(null), c = D(null), f = y(() => t.groupLabel ?? "Group"), _ = y(() => t.emptyLabel ?? "Ще немає груп"), x = y(() => t.schema?.map((R) => ({
|
|
10976
10976
|
...R,
|
|
10977
10977
|
disabled: t.disabled || R.disabled
|
|
10978
|
-
})) ?? []), w = y(() =>
|
|
10978
|
+
})) ?? []), w = y(() => x.value.map((R) => B(R))), b = y(() => t.view === "accordion"), m = y(() => !!(t.collapsible || b.value)), k = y(() => t.draggable !== !1), g = y(() => t.disabled ? !1 : t.maxGroups ? n.value.length < t.maxGroups : !0), M = y(() => t.disabled || n.value.length <= (t.minGroups || 0));
|
|
10979
10979
|
ve(() => n.value.length, () => {
|
|
10980
10980
|
C(), V(), A();
|
|
10981
10981
|
}, { immediate: !0 }), ve(() => t.schema, A, { immediate: !0, deep: !0 }), ve(() => t.view, () => {
|
|
@@ -10996,7 +10996,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
10996
10996
|
}
|
|
10997
10997
|
function U() {
|
|
10998
10998
|
const R = {};
|
|
10999
|
-
return
|
|
10999
|
+
return x.value.forEach((fe) => {
|
|
11000
11000
|
R[fe.name] = fe?.default ?? null;
|
|
11001
11001
|
}), R;
|
|
11002
11002
|
}
|
|
@@ -11033,7 +11033,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11033
11033
|
}
|
|
11034
11034
|
}
|
|
11035
11035
|
function pe(R, fe) {
|
|
11036
|
-
if (!
|
|
11036
|
+
if (!k.value || t.disabled) {
|
|
11037
11037
|
fe.preventDefault();
|
|
11038
11038
|
return;
|
|
11039
11039
|
}
|
|
@@ -11044,13 +11044,13 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11044
11044
|
}, fe.dataTransfer?.setData("text/plain", String(R)), fe.dataTransfer?.setDragImage?.(fe.currentTarget, 0, 0);
|
|
11045
11045
|
}
|
|
11046
11046
|
function Se(R, fe) {
|
|
11047
|
-
!
|
|
11047
|
+
!k.value || t.disabled || i.value !== null && ke(R, fe);
|
|
11048
11048
|
}
|
|
11049
11049
|
function X(R, fe) {
|
|
11050
11050
|
ke(R, fe);
|
|
11051
11051
|
}
|
|
11052
11052
|
function te(R) {
|
|
11053
|
-
!
|
|
11053
|
+
!k.value || t.disabled || ne();
|
|
11054
11054
|
}
|
|
11055
11055
|
function J() {
|
|
11056
11056
|
c.value && Y(), i.value = null, r.value = null, c.value = null;
|
|
@@ -11096,7 +11096,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11096
11096
|
class: ie(["relative border border-gray-200 rounded-lg bg-white transition vs-dataform__group", [
|
|
11097
11097
|
t.view === "accordion" ? "overflow-hidden" : P(se) ? "pt-6 px-6" : "p-6"
|
|
11098
11098
|
]]),
|
|
11099
|
-
draggable:
|
|
11099
|
+
draggable: k.value && !t.disabled,
|
|
11100
11100
|
onDragstart: (Me) => pe(se, Me),
|
|
11101
11101
|
onDragend: J,
|
|
11102
11102
|
onDragover: Ee((Me) => Se(se, Me), ["prevent"]),
|
|
@@ -11110,7 +11110,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11110
11110
|
]])
|
|
11111
11111
|
}, [
|
|
11112
11112
|
d("div", tg, [
|
|
11113
|
-
|
|
11113
|
+
k.value ? (u(), xe(q(cn), {
|
|
11114
11114
|
key: 0,
|
|
11115
11115
|
class: "h-4 w-4 text-gray-400",
|
|
11116
11116
|
"aria-hidden": "true"
|
|
@@ -11121,7 +11121,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11121
11121
|
class: "rounded-full p-1 text-gray-500 transition hover:bg-gray-100",
|
|
11122
11122
|
onClick: (Me) => Q(se)
|
|
11123
11123
|
}, [
|
|
11124
|
-
G(
|
|
11124
|
+
G(q(pn), {
|
|
11125
11125
|
class: ie(["h-4 w-4 transition", P(se) ? "-rotate-90" : "rotate-0"])
|
|
11126
11126
|
}, null, 8, ["class"])
|
|
11127
11127
|
], 8, ng)) : K("", !0),
|
|
@@ -11136,7 +11136,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11136
11136
|
disabled: t.disabled,
|
|
11137
11137
|
draggable: "false"
|
|
11138
11138
|
}, [
|
|
11139
|
-
G(
|
|
11139
|
+
G(q(qo), { class: "h-4 w-4" })
|
|
11140
11140
|
], 8, og),
|
|
11141
11141
|
d("button", {
|
|
11142
11142
|
type: "button",
|
|
@@ -11146,7 +11146,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11146
11146
|
disabled: M.value,
|
|
11147
11147
|
draggable: "false"
|
|
11148
11148
|
}, [
|
|
11149
|
-
G(
|
|
11149
|
+
G(q(on), { class: "h-4 w-4" })
|
|
11150
11150
|
], 8, rg)
|
|
11151
11151
|
])
|
|
11152
11152
|
], 2),
|
|
@@ -11167,14 +11167,14 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11167
11167
|
[Pt, !P(se)]
|
|
11168
11168
|
])
|
|
11169
11169
|
], 42, eg))), 128)),
|
|
11170
|
-
n.value.length === 0 ? (u(), v("div", sg, ce(
|
|
11170
|
+
n.value.length === 0 ? (u(), v("div", sg, ce(_.value), 1)) : K("", !0),
|
|
11171
11171
|
d("button", {
|
|
11172
11172
|
type: "button",
|
|
11173
11173
|
class: "flex items-center gap-2 text-gray-600 hover:text-gray-900 font-medium transition-colors text-sm",
|
|
11174
11174
|
onClick: Z,
|
|
11175
11175
|
disabled: !g.value
|
|
11176
11176
|
}, [
|
|
11177
|
-
G(
|
|
11177
|
+
G(q(Ot), { class: "h-4 w-4" }),
|
|
11178
11178
|
nt(" " + ce(t.addButtonText), 1)
|
|
11179
11179
|
], 8, ig)
|
|
11180
11180
|
]));
|
|
@@ -11252,7 +11252,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11252
11252
|
throw delete m[Wn], M;
|
|
11253
11253
|
});
|
|
11254
11254
|
return m[Wn] = g, g;
|
|
11255
|
-
},
|
|
11255
|
+
}, _ = () => {
|
|
11256
11256
|
!o.value || !r || (i && (i.dispose(), i = null), i = r.editor.create(o.value, {
|
|
11257
11257
|
value: l.value || "",
|
|
11258
11258
|
language: n.syntax,
|
|
@@ -11263,15 +11263,15 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11263
11263
|
}), i.onDidChangeModelContent(() => {
|
|
11264
11264
|
c || (l.value = i.getValue());
|
|
11265
11265
|
}));
|
|
11266
|
-
},
|
|
11266
|
+
}, x = () => {
|
|
11267
11267
|
i?.focus();
|
|
11268
11268
|
}, w = () => i, b = () => r;
|
|
11269
11269
|
return ve(
|
|
11270
11270
|
() => l.value,
|
|
11271
11271
|
(m) => {
|
|
11272
11272
|
if (!i) return;
|
|
11273
|
-
const
|
|
11274
|
-
m !==
|
|
11273
|
+
const k = i.getValue();
|
|
11274
|
+
m !== k && (c = !0, i.setValue(m || ""), c = !1);
|
|
11275
11275
|
}
|
|
11276
11276
|
), ve(
|
|
11277
11277
|
() => n.syntax,
|
|
@@ -11297,17 +11297,17 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11297
11297
|
try {
|
|
11298
11298
|
const m = await f();
|
|
11299
11299
|
if (!m || !m.editor) return;
|
|
11300
|
-
r = m,
|
|
11300
|
+
r = m, _();
|
|
11301
11301
|
} catch (m) {
|
|
11302
11302
|
console.error("Failed to load Monaco editor", m);
|
|
11303
11303
|
}
|
|
11304
11304
|
}), It(() => {
|
|
11305
11305
|
i && (i.dispose(), i = null);
|
|
11306
11306
|
}), t({
|
|
11307
|
-
focus:
|
|
11307
|
+
focus: x,
|
|
11308
11308
|
getEditor: w,
|
|
11309
11309
|
getMonaco: b
|
|
11310
|
-
}), (m,
|
|
11310
|
+
}), (m, k) => (u(), v("div", {
|
|
11311
11311
|
class: "w-full",
|
|
11312
11312
|
style: Oe({ height: a.value })
|
|
11313
11313
|
}, [
|
|
@@ -11431,15 +11431,15 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11431
11431
|
setup(e, { emit: t }) {
|
|
11432
11432
|
const n = e, l = Ke(e, "modelValue"), o = t, a = y(() => br[`${n.layout}`]), i = ["label", "placeholder", "info", "description", "text", "html"], r = D(pe()), c = y(() => B(n.item, r.value)), f = y(() => {
|
|
11433
11433
|
const X = { ...c.value ?? {} }, te = n.item?.name;
|
|
11434
|
-
return te &&
|
|
11435
|
-
}),
|
|
11436
|
-
const X =
|
|
11434
|
+
return te && x?.value?.[te] && Object.assign(X, x.value[te]), X.__locale = r.value, X;
|
|
11435
|
+
}), _ = y(() => fg?.[`vs-input-${n.item.type}`]), x = dt("field-props"), w = y(() => {
|
|
11436
|
+
const X = q(_);
|
|
11437
11437
|
if (!X) return /* @__PURE__ */ new Set();
|
|
11438
11438
|
const te = X.props ?? X.__vccOpts?.props;
|
|
11439
11439
|
if (!te) return /* @__PURE__ */ new Set();
|
|
11440
11440
|
const J = Array.isArray(te) ? te : Object.keys(te);
|
|
11441
11441
|
return new Set(J);
|
|
11442
|
-
}), m = [...["min", "max", "step"], "api", "set", "mask", "layers"],
|
|
11442
|
+
}), m = [...["min", "max", "step"], "api", "set", "mask", "layers"], k = /* @__PURE__ */ new Set([
|
|
11443
11443
|
"name",
|
|
11444
11444
|
"type",
|
|
11445
11445
|
"label",
|
|
@@ -11476,7 +11476,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11476
11476
|
function g(X) {
|
|
11477
11477
|
const te = {};
|
|
11478
11478
|
Object.entries(X).forEach(([ee, Y]) => {
|
|
11479
|
-
|
|
11479
|
+
k.has(ee) || ee.includes(":") || Y !== void 0 && (te[ee] = Y);
|
|
11480
11480
|
});
|
|
11481
11481
|
const J = X.props;
|
|
11482
11482
|
return J && typeof J == "object" && !Array.isArray(J) && Object.entries(J).forEach(([ee, Y]) => {
|
|
@@ -11485,7 +11485,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11485
11485
|
}
|
|
11486
11486
|
const M = y(() => {
|
|
11487
11487
|
const X = { ...c.value ?? {} }, te = n.item?.name;
|
|
11488
|
-
te &&
|
|
11488
|
+
te && x?.value?.[te] && Object.assign(X, x.value[te]);
|
|
11489
11489
|
const J = w.value;
|
|
11490
11490
|
let ee;
|
|
11491
11491
|
return J.size ? ee = Object.fromEntries(Object.entries(X).filter(([Y]) => J.has(Y))) : ee = { ...X }, Object.assign(ee, g(X)), m.forEach((Y) => {
|
|
@@ -11601,7 +11601,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11601
11601
|
class: ie(["flex items-center gap-2 w-full", { "flex-1": Z.value }])
|
|
11602
11602
|
}, [
|
|
11603
11603
|
d("div", vg, [
|
|
11604
|
-
(u(), xe(_t(
|
|
11604
|
+
(u(), xe(_t(_.value), Jt(M.value, {
|
|
11605
11605
|
modelValue: l.value,
|
|
11606
11606
|
"onUpdate:modelValue": te[0] || (te[0] = (J) => l.value = J),
|
|
11607
11607
|
onValueSelected: C
|
|
@@ -11614,10 +11614,10 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11614
11614
|
disabled: U.value || !l.value?.toString().trim(),
|
|
11615
11615
|
onClick: j
|
|
11616
11616
|
}, [
|
|
11617
|
-
U.value ? (u(), xe(
|
|
11617
|
+
U.value ? (u(), xe(q(Ta), {
|
|
11618
11618
|
key: 1,
|
|
11619
11619
|
class: "h-5 w-5 animate-spin text-gray-400"
|
|
11620
|
-
})) : (u(), xe(
|
|
11620
|
+
})) : (u(), xe(q(Qn), {
|
|
11621
11621
|
key: 0,
|
|
11622
11622
|
class: "h-4 w-4"
|
|
11623
11623
|
}))
|
|
@@ -11655,8 +11655,8 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11655
11655
|
const pe = typeof Q == "number" ? `${Q}px` : `${Q}`;
|
|
11656
11656
|
return { width: pe, minWidth: pe };
|
|
11657
11657
|
});
|
|
11658
|
-
let f = null,
|
|
11659
|
-
const
|
|
11658
|
+
let f = null, _ = 0, x = 0, w = null, b = null, m = null;
|
|
11659
|
+
const k = () => B(), g = () => C();
|
|
11660
11660
|
ve(
|
|
11661
11661
|
() => n.target,
|
|
11662
11662
|
async (Q) => {
|
|
@@ -11680,7 +11680,7 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11680
11680
|
), lt(() => {
|
|
11681
11681
|
n.scrollContainer || M(null), C();
|
|
11682
11682
|
}), It(() => {
|
|
11683
|
-
Z(), M(null, !0), w = null, typeof window < "u" && (
|
|
11683
|
+
Z(), M(null, !0), w = null, typeof window < "u" && (_ && window.cancelAnimationFrame(_), x && window.cancelAnimationFrame(x));
|
|
11684
11684
|
});
|
|
11685
11685
|
function M(Q, pe = !1) {
|
|
11686
11686
|
if (m && (m(), m = null), pe) {
|
|
@@ -11689,17 +11689,17 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11689
11689
|
}
|
|
11690
11690
|
if (b = Q ?? null, typeof window > "u") return;
|
|
11691
11691
|
const Se = Q ?? window, X = window;
|
|
11692
|
-
Se.addEventListener("scroll",
|
|
11693
|
-
Se.removeEventListener("scroll",
|
|
11692
|
+
Se.addEventListener("scroll", k, { passive: !0 }), X.addEventListener("resize", g), m = () => {
|
|
11693
|
+
Se.removeEventListener("scroll", k), X.removeEventListener("resize", g);
|
|
11694
11694
|
};
|
|
11695
11695
|
}
|
|
11696
11696
|
function C() {
|
|
11697
11697
|
if (!i.value || !w) return;
|
|
11698
|
-
|
|
11698
|
+
_ && typeof window < "u" && window.cancelAnimationFrame(_);
|
|
11699
11699
|
const Q = () => {
|
|
11700
|
-
V(),
|
|
11700
|
+
V(), _ = 0;
|
|
11701
11701
|
};
|
|
11702
|
-
typeof window > "u" ? Q() :
|
|
11702
|
+
typeof window > "u" ? Q() : _ = window.requestAnimationFrame(Q);
|
|
11703
11703
|
}
|
|
11704
11704
|
function V() {
|
|
11705
11705
|
if (!i.value || !w) return;
|
|
@@ -11751,8 +11751,8 @@ const Cp = { class: "vs-map-body" }, Mp = {
|
|
|
11751
11751
|
pe + 5 >= J && (te = l.value[l.value.length - 1].id), te && (o.value = te);
|
|
11752
11752
|
}
|
|
11753
11753
|
function B() {
|
|
11754
|
-
i.value && (
|
|
11755
|
-
j(),
|
|
11754
|
+
i.value && (x && window.cancelAnimationFrame(x), x = window.requestAnimationFrame(() => {
|
|
11755
|
+
j(), x = 0;
|
|
11756
11756
|
}));
|
|
11757
11757
|
}
|
|
11758
11758
|
function P(Q) {
|
|
@@ -11938,8 +11938,8 @@ function Og(e, t, n = !1) {
|
|
|
11938
11938
|
});
|
|
11939
11939
|
}
|
|
11940
11940
|
function c(w) {
|
|
11941
|
-
const b = [], m = Number(w?.minlength),
|
|
11942
|
-
!Number.isNaN(m) && Number.isFinite(m) && b.push({ type: "minlength", value: m }), !Number.isNaN(
|
|
11941
|
+
const b = [], m = Number(w?.minlength), k = Number(w?.maxlength), g = Number(w?.min), M = Number(w?.max);
|
|
11942
|
+
!Number.isNaN(m) && Number.isFinite(m) && b.push({ type: "minlength", value: m }), !Number.isNaN(k) && Number.isFinite(k) && b.push({ type: "maxlength", value: k }), !Number.isNaN(g) && Number.isFinite(g) && b.push({ type: "min", value: g }), !Number.isNaN(M) && Number.isFinite(M) && b.push({ type: "max", value: M }), typeof w?.maxField == "string" && w.maxField && b.push({
|
|
11943
11943
|
type: "maxField",
|
|
11944
11944
|
field: w.maxField,
|
|
11945
11945
|
message: w.maxFieldMessage
|
|
@@ -11963,22 +11963,22 @@ function Og(e, t, n = !1) {
|
|
|
11963
11963
|
e,
|
|
11964
11964
|
() => {
|
|
11965
11965
|
const w = [], b = (m) => {
|
|
11966
|
-
m.forEach((
|
|
11967
|
-
r(
|
|
11966
|
+
m.forEach((k) => {
|
|
11967
|
+
r(k) && w.push(k), k.schema && b(k.schema);
|
|
11968
11968
|
});
|
|
11969
11969
|
};
|
|
11970
11970
|
b(l.value), w.forEach(c);
|
|
11971
11971
|
},
|
|
11972
11972
|
{ deep: !0 }
|
|
11973
11973
|
);
|
|
11974
|
-
const
|
|
11974
|
+
const _ = y(() => l.value?.filter((w) => w.hidden !== !0 && a(w)));
|
|
11975
11975
|
return {
|
|
11976
11976
|
errors: o,
|
|
11977
11977
|
validate: f,
|
|
11978
11978
|
reset: () => {
|
|
11979
11979
|
e.value = {}, o.value = {};
|
|
11980
11980
|
},
|
|
11981
|
-
visibleSchema:
|
|
11981
|
+
visibleSchema: _
|
|
11982
11982
|
};
|
|
11983
11983
|
}
|
|
11984
11984
|
const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
@@ -12015,11 +12015,11 @@ const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
|
12015
12015
|
r.value = J, c.value = J;
|
|
12016
12016
|
}
|
|
12017
12017
|
}), {
|
|
12018
|
-
errors:
|
|
12019
|
-
validate:
|
|
12018
|
+
errors: _,
|
|
12019
|
+
validate: x,
|
|
12020
12020
|
reset: w,
|
|
12021
12021
|
visibleSchema: b
|
|
12022
|
-
} = Og(f, o.schema, Vo(o, "disabled")), m = D(null),
|
|
12022
|
+
} = Og(f, o.schema, Vo(o, "disabled")), m = D(null), k = D(null), g = D({}), M = y(() => o.navigation), C = y(() => o.navWidth), V = y(() => o.style?.columns), A = Object.freeze({ container: 12, label: 3 }), U = y(() => o.columns ?? V.value ?? A), Z = y(() => o.columns != null || V.value != null), F = y(() => Z.value ? "horizontal" : o.layout), j = (J) => J?.columns ? "horizontal" : F.value, B = (J) => J?.columns ?? U.value, P = y(() => {
|
|
12023
12023
|
const J = {}, ee = (Y) => {
|
|
12024
12024
|
if (!Y) return;
|
|
12025
12025
|
(Array.isArray(Y) ? Y.map((ye, T) => ({ key: String(T), entry: ye })) : typeof Y == "object" ? Object.entries(Y).map(([ye, T]) => ({ key: ye, entry: T })) : []).forEach(({ key: ye, entry: T }) => {
|
|
@@ -12033,20 +12033,20 @@ const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
|
12033
12033
|
};
|
|
12034
12034
|
return ee(o.schema), J;
|
|
12035
12035
|
}), Q = () => {
|
|
12036
|
-
!a.value && f.value && delete f.value.id, l("update:modelValue", f.value),
|
|
12036
|
+
!a.value && f.value && delete f.value.id, l("update:modelValue", f.value), x(), l("handle-submit", f.value);
|
|
12037
12037
|
}, pe = (J) => {
|
|
12038
12038
|
l("value-selected", J);
|
|
12039
12039
|
};
|
|
12040
12040
|
t({
|
|
12041
|
-
validate:
|
|
12041
|
+
validate: x,
|
|
12042
12042
|
reset: w,
|
|
12043
|
-
errors:
|
|
12043
|
+
errors: _
|
|
12044
12044
|
}), lt(() => {
|
|
12045
12045
|
i.value = {
|
|
12046
12046
|
value: f.value,
|
|
12047
|
-
errors:
|
|
12047
|
+
errors: _.value,
|
|
12048
12048
|
reset: w,
|
|
12049
|
-
validate:
|
|
12049
|
+
validate: x,
|
|
12050
12050
|
formId: o.formId
|
|
12051
12051
|
};
|
|
12052
12052
|
});
|
|
@@ -12076,7 +12076,7 @@ const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
|
12076
12076
|
d("div", {
|
|
12077
12077
|
class: "flex-1 min-h-0 overflow-y-auto overflow-x-visible",
|
|
12078
12078
|
ref_key: "formScrollContainer",
|
|
12079
|
-
ref:
|
|
12079
|
+
ref: k
|
|
12080
12080
|
}, [
|
|
12081
12081
|
d("form", {
|
|
12082
12082
|
ref_key: "formRef",
|
|
@@ -12084,7 +12084,7 @@ const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
|
12084
12084
|
onSubmit: Ee(Q, ["prevent"]),
|
|
12085
12085
|
class: ie(["grid grid-cols-12 p-1", F.value === "default" ? "gap-6" : "gap-4"])
|
|
12086
12086
|
}, [
|
|
12087
|
-
(u(!0), v(Ae, null, Be(
|
|
12087
|
+
(u(!0), v(Ae, null, Be(q(b), (Y, ke) => (u(), v("div", {
|
|
12088
12088
|
key: Y.name,
|
|
12089
12089
|
class: ie(j(Y) === "horizontal" ? "col-span-12" : `col-span-12 md:col-span-${Y.col || 12}`)
|
|
12090
12090
|
}, [
|
|
@@ -12099,16 +12099,16 @@ const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
|
12099
12099
|
const T = f.value[Y.name];
|
|
12100
12100
|
Se(T, ye) || (f.value[Y.name] = ye);
|
|
12101
12101
|
},
|
|
12102
|
-
error:
|
|
12102
|
+
error: q(_)[Y.name],
|
|
12103
12103
|
onValueSelected: pe
|
|
12104
12104
|
}, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
|
|
12105
|
-
j(Y) === "settings" && ke + 1 !==
|
|
12105
|
+
j(Y) === "settings" && ke + 1 !== q(b).length ? (u(), v("div", Rg)) : K("", !0)
|
|
12106
12106
|
], 2))), 128))
|
|
12107
12107
|
], 34)
|
|
12108
12108
|
], 512),
|
|
12109
12109
|
G($g, {
|
|
12110
12110
|
target: m.value,
|
|
12111
|
-
"scroll-container":
|
|
12111
|
+
"scroll-container": k.value,
|
|
12112
12112
|
enabled: M.value,
|
|
12113
12113
|
width: C.value
|
|
12114
12114
|
}, null, 8, ["target", "scroll-container", "enabled", "width"])
|
|
@@ -12127,10 +12127,10 @@ const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
|
12127
12127
|
},
|
|
12128
12128
|
emits: ["close", "save", "edit"],
|
|
12129
12129
|
setup(e, { emit: t }) {
|
|
12130
|
-
const n = e, l = t, o = D(n.schema), a = D(n.defaultValue ? JSON.parse(JSON.stringify(n.defaultValue)) : {}), i = D({}), r = D(n.token || ""), c = D(n.token || ""), f = D(n.mode),
|
|
12130
|
+
const n = e, l = t, o = D(n.schema), a = D(n.defaultValue ? JSON.parse(JSON.stringify(n.defaultValue)) : {}), i = D({}), r = D(n.token || ""), c = D(n.token || ""), f = D(n.mode), _ = () => {
|
|
12131
12131
|
const g = n.method?.trim().toUpperCase();
|
|
12132
12132
|
return g === "GET" || g === "POST" || g === "PUT" ? g : f.value === "add" ? "POST" : "PUT";
|
|
12133
|
-
},
|
|
12133
|
+
}, x = () => {
|
|
12134
12134
|
Te({
|
|
12135
12135
|
type: "success",
|
|
12136
12136
|
title: "Успішно",
|
|
@@ -12144,7 +12144,7 @@ const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
|
12144
12144
|
});
|
|
12145
12145
|
}, b = async (g) => {
|
|
12146
12146
|
if (console.log(g), g.ok) {
|
|
12147
|
-
await g.json().catch(() => ({})),
|
|
12147
|
+
await g.json().catch(() => ({})), x(), l("save", a.value);
|
|
12148
12148
|
return;
|
|
12149
12149
|
}
|
|
12150
12150
|
const M = await g.json().catch(() => ({})), C = M.message || M.error;
|
|
@@ -12184,7 +12184,7 @@ const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
|
12184
12184
|
f.value === "add" && a.value && delete a.value.id;
|
|
12185
12185
|
const M = n.api?.trim();
|
|
12186
12186
|
if (M) {
|
|
12187
|
-
const C =
|
|
12187
|
+
const C = _();
|
|
12188
12188
|
try {
|
|
12189
12189
|
const V = await fetch(M, {
|
|
12190
12190
|
method: C,
|
|
@@ -12221,9 +12221,9 @@ const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
|
12221
12221
|
});
|
|
12222
12222
|
}
|
|
12223
12223
|
else
|
|
12224
|
-
l("edit", a.value),
|
|
12224
|
+
l("edit", a.value), k();
|
|
12225
12225
|
}
|
|
12226
|
-
function
|
|
12226
|
+
function k() {
|
|
12227
12227
|
l("close");
|
|
12228
12228
|
}
|
|
12229
12229
|
return lt(async () => {
|
|
@@ -12270,12 +12270,12 @@ const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
|
12270
12270
|
d("div", Ug, [
|
|
12271
12271
|
d("h3", Hg, ce(f.value === "add" ? "Додати" : "Змінити"), 1),
|
|
12272
12272
|
d("button", {
|
|
12273
|
-
onClick:
|
|
12273
|
+
onClick: k,
|
|
12274
12274
|
type: "button",
|
|
12275
12275
|
class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"
|
|
12276
12276
|
}, [
|
|
12277
12277
|
M[2] || (M[2] = d("span", { class: "sr-only" }, "Close", -1)),
|
|
12278
|
-
G(
|
|
12278
|
+
G(q(Ct), { class: "h-4 w-4 flex-shrink-0" })
|
|
12279
12279
|
])
|
|
12280
12280
|
]),
|
|
12281
12281
|
d("div", Wg, [
|
|
@@ -12292,7 +12292,7 @@ const Bg = { class: "flex w-full h-full min-h-0 gap-6" }, Rg = {
|
|
|
12292
12292
|
d("div", { class: "vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, [
|
|
12293
12293
|
d("button", {
|
|
12294
12294
|
type: "button",
|
|
12295
|
-
onClick:
|
|
12295
|
+
onClick: k,
|
|
12296
12296
|
class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
|
|
12297
12297
|
}, " Скасувати "),
|
|
12298
12298
|
d("button", {
|