@topvisor/ui 1.0.7 → 1.0.8-fixed-2
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/assets/themes/dark.css +1 -1
- package/assets/themes/light.css +1 -1
- package/package.json +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +150 -149
- package/project/project.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +86 -86
- package/tabsView/tabsView.js.map +1 -1
package/project/project.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import P from "../core/core.js";
|
|
2
|
-
import { defineComponent as j, mergeModels as N, useModel as b, computed as R, openBlock as V, createElementBlock as q, unref as
|
|
2
|
+
import { defineComponent as j, mergeModels as N, useModel as b, computed as R, openBlock as V, createElementBlock as q, unref as C, createBlock as w, withCtx as _, createVNode as A, createTextVNode as J, toDisplayString as E, Fragment as H, renderList as Q, normalizeClass as D, createElementVNode as W, ref as F, watch as B, createCommentVNode as T } from "vue";
|
|
3
3
|
import { b as L, C as X, T as z, _ as U, S as $ } from "../.chunks/forms-CHiMZ8vg.es.js";
|
|
4
4
|
import { P as Y, a as Z } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Bb7B8CTJ.es.js";
|
|
5
5
|
import { M as ee } from "../.chunks/menu-CHeV29rC.es.js";
|
|
6
|
-
import { d as
|
|
6
|
+
import { d as p, g as ne, s as oe, f as te } from "../.chunks/utils-BOlUthaH.es.js";
|
|
7
7
|
import { getSearcherGIcon as le, getLangLabel as ae, getDeviceGIcon as re } from "../utils/searchers.js";
|
|
8
8
|
const G = ["../assets/project.css"].map((n) => import.meta.resolve(n));
|
|
9
9
|
P.insertCSSLinkToPage(G, !0);
|
|
@@ -19,8 +19,8 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
19
19
|
}),
|
|
20
20
|
emits: ["update:modelValue"],
|
|
21
21
|
setup(n) {
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
22
|
+
const i = n, v = b(n, "modelValue"), t = R(() => {
|
|
23
|
+
if (i.showSelectAllItem)
|
|
24
24
|
return {
|
|
25
25
|
icon: "",
|
|
26
26
|
title: L().Common.Select_all,
|
|
@@ -29,9 +29,9 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
29
29
|
};
|
|
30
30
|
});
|
|
31
31
|
return (e, r) => (V(), q("div", ie, [
|
|
32
|
-
|
|
32
|
+
C(X).state.isMobile ? (V(), w(Y, { key: 0 }, {
|
|
33
33
|
opener: _(() => [
|
|
34
|
-
|
|
34
|
+
A(z, {
|
|
35
35
|
class: "top-selectorCompetitors_opener",
|
|
36
36
|
color: "theme",
|
|
37
37
|
icon: "",
|
|
@@ -40,9 +40,9 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
40
40
|
default: _(() => {
|
|
41
41
|
var o;
|
|
42
42
|
return [
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
return a.value === ((
|
|
43
|
+
J(E((o = e.items.find((a) => {
|
|
44
|
+
var c;
|
|
45
|
+
return a.value === ((c = v.value) == null ? void 0 : c[0]);
|
|
46
46
|
})) == null ? void 0 : o.content), 1)
|
|
47
47
|
];
|
|
48
48
|
}),
|
|
@@ -51,14 +51,14 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
51
51
|
]),
|
|
52
52
|
contentList: _(() => [
|
|
53
53
|
(V(!0), q(H, null, Q(e.items, (o, a) => {
|
|
54
|
-
var
|
|
54
|
+
var c;
|
|
55
55
|
return V(), w(Z, {
|
|
56
56
|
class: D({
|
|
57
|
-
"top-active": (
|
|
57
|
+
"top-active": (c = v.value) == null ? void 0 : c.includes(o.value)
|
|
58
58
|
}),
|
|
59
59
|
"data-top-icon": o.icon,
|
|
60
60
|
title: o.title,
|
|
61
|
-
onClick: () =>
|
|
61
|
+
onClick: () => v.value = [o.value]
|
|
62
62
|
}, {
|
|
63
63
|
default: _(() => [
|
|
64
64
|
W("span", se, E(o.content), 1)
|
|
@@ -70,8 +70,8 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
70
70
|
_: 1
|
|
71
71
|
})) : (V(), w(ee, {
|
|
72
72
|
key: 1,
|
|
73
|
-
modelValue:
|
|
74
|
-
"onUpdate:modelValue": r[0] || (r[0] = (o) =>
|
|
73
|
+
modelValue: v.value,
|
|
74
|
+
"onUpdate:modelValue": r[0] || (r[0] = (o) => v.value = o),
|
|
75
75
|
items: e.items,
|
|
76
76
|
isMultiple: !0,
|
|
77
77
|
styling: "bar",
|
|
@@ -85,16 +85,16 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
85
85
|
"top-button": "top-button"
|
|
86
86
|
}, de = {
|
|
87
87
|
$style: ce
|
|
88
|
-
}, ve = /* @__PURE__ */ U(ue, [["__cssModules", de]]),
|
|
89
|
-
const
|
|
88
|
+
}, ve = /* @__PURE__ */ U(ue, [["__cssModules", de]]), fe = (n, i) => {
|
|
89
|
+
const v = L(), t = F(i.value.keys().next().value ?? p), e = R(() => {
|
|
90
90
|
const r = /* @__PURE__ */ new Map();
|
|
91
|
-
if (
|
|
91
|
+
if (i.value.forEach((o) => {
|
|
92
92
|
let a = {
|
|
93
93
|
value: o.key,
|
|
94
94
|
title: o.name
|
|
95
95
|
};
|
|
96
96
|
n.addSearcherIcon && (a.icon = le(o.key)), r.set(o.key, a);
|
|
97
|
-
}), n.addCompare && !r.has(
|
|
97
|
+
}), n.addCompare && !r.has(p)) {
|
|
98
98
|
const o = {
|
|
99
99
|
value: "",
|
|
100
100
|
title: "--------------------",
|
|
@@ -103,7 +103,7 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
103
103
|
r.set(o.value, o);
|
|
104
104
|
const a = {
|
|
105
105
|
value: -1,
|
|
106
|
-
title:
|
|
106
|
+
title: v.Common.Compare
|
|
107
107
|
};
|
|
108
108
|
r.set(a.value, a);
|
|
109
109
|
}
|
|
@@ -113,65 +113,65 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
113
113
|
searcherKey: t,
|
|
114
114
|
optionBySearcherKey: e
|
|
115
115
|
};
|
|
116
|
-
},
|
|
116
|
+
}, ge = (n, i) => {
|
|
117
117
|
var r, o, a;
|
|
118
|
-
const
|
|
119
|
-
n.modelValue.length === 1 && (t.value = n.modelValue[0]), t.value ===
|
|
118
|
+
const v = L(), t = F(p);
|
|
119
|
+
n.modelValue.length === 1 && (t.value = n.modelValue[0]), t.value === p && (n.forFrequency ? t.value = ((o = (r = i.value) == null ? void 0 : r.regionByIndex.values().next().value) == null ? void 0 : o.key) ?? p : t.value = ((a = i.value) == null ? void 0 : a.regionByIndex.keys().next().value) ?? p);
|
|
120
120
|
const e = R(() => {
|
|
121
|
-
var
|
|
122
|
-
const
|
|
123
|
-
return (
|
|
124
|
-
let l =
|
|
121
|
+
var f;
|
|
122
|
+
const c = /* @__PURE__ */ new Map();
|
|
123
|
+
return (f = i.value.regionByIndex) == null || f.forEach((s) => {
|
|
124
|
+
let l = s.name;
|
|
125
125
|
if (n.forFrequency) {
|
|
126
|
-
const
|
|
127
|
-
value:
|
|
126
|
+
const x = {
|
|
127
|
+
value: s.key,
|
|
128
128
|
title: l
|
|
129
129
|
};
|
|
130
|
-
|
|
130
|
+
c.has(s.key) || c.set(s.key, x);
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
|
-
|
|
134
|
-
const y = ae(
|
|
133
|
+
s.device && (l += " (" + v.Common["Device_" + s.device] + ")");
|
|
134
|
+
const y = ae(i.value.key || 0, s.lang ?? "");
|
|
135
135
|
y && (l += " / " + y);
|
|
136
|
-
const
|
|
137
|
-
value:
|
|
136
|
+
const m = {
|
|
137
|
+
value: s.index,
|
|
138
138
|
title: l,
|
|
139
|
-
icon:
|
|
139
|
+
icon: s.device ? re(s.device) : void 0
|
|
140
140
|
};
|
|
141
|
-
|
|
142
|
-
}),
|
|
141
|
+
c.set(s.index, m);
|
|
142
|
+
}), c;
|
|
143
143
|
});
|
|
144
|
-
return B(e, (
|
|
145
|
-
var
|
|
146
|
-
if (n.onlySearcher || t.value !== void 0 &&
|
|
144
|
+
return B(e, (c, f) => {
|
|
145
|
+
var m;
|
|
146
|
+
if (n.onlySearcher || t.value !== void 0 && c.get(t.value))
|
|
147
147
|
return;
|
|
148
|
-
let
|
|
149
|
-
if (t.value ===
|
|
150
|
-
t.value =
|
|
148
|
+
let s = c.keys().next().value;
|
|
149
|
+
if (t.value === p || s === p) {
|
|
150
|
+
t.value = s;
|
|
151
151
|
return;
|
|
152
152
|
}
|
|
153
|
-
let l = ((
|
|
154
|
-
for (const [
|
|
155
|
-
const
|
|
156
|
-
if (typeof
|
|
153
|
+
let l = ((m = f == null ? void 0 : f.get(t.value)) == null ? void 0 : m.title) || "", y = -1;
|
|
154
|
+
for (const [x, g] of c.entries()) {
|
|
155
|
+
const d = g.title;
|
|
156
|
+
if (typeof d != "string" || typeof x == "string")
|
|
157
157
|
break;
|
|
158
|
-
if (
|
|
159
|
-
|
|
158
|
+
if (d === l) {
|
|
159
|
+
s = x;
|
|
160
160
|
break;
|
|
161
161
|
}
|
|
162
|
-
const
|
|
163
|
-
let
|
|
164
|
-
|
|
162
|
+
const I = new RegExp(` \\((${v.Common.Device_1}|${v.Common.Device_2})\\)`);
|
|
163
|
+
let h = l, k = 3;
|
|
164
|
+
d.indexOf(h) === -1 && (h = l.replace(/^[^a-zа-я]/i, "").replace(I, ""), k--), d.indexOf(h) === -1 && (h = l.replace(/ \/.*/, ""), k--), d.indexOf(h) === -1 && (h = l.replace(/ \/.*/, ""), h = h.replace(/^[^a-zа-я]/i, "").replace(I, ""), k--), d.indexOf(h) !== -1 && (k <= y || (y = k, s = x));
|
|
165
165
|
}
|
|
166
|
-
t.value =
|
|
166
|
+
t.value = s;
|
|
167
167
|
}), {
|
|
168
168
|
regionIndex: t,
|
|
169
169
|
optionByRegionIndex: e
|
|
170
170
|
};
|
|
171
|
-
}, me = (n,
|
|
171
|
+
}, me = (n, i, v) => {
|
|
172
172
|
const t = F([]), e = () => {
|
|
173
|
-
if (n.onlySearcher &&
|
|
174
|
-
t.value = Array.from(
|
|
173
|
+
if (n.onlySearcher && i.value) {
|
|
174
|
+
t.value = Array.from(i.value.keys());
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
177
|
let o = [];
|
|
@@ -184,7 +184,7 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
184
184
|
) ?? [];
|
|
185
185
|
} catch {
|
|
186
186
|
}
|
|
187
|
-
o.length && (o = o.filter((a) =>
|
|
187
|
+
o.length && (o = o.filter((a) => v.value.has(a))), o.length || (o = Array.from(v.value)), t.value = [...o];
|
|
188
188
|
}, r = () => {
|
|
189
189
|
t.value.length ? localStorage.setItem("ui:project:regionSelector:" + n.projectId + ":regionsIndexes", JSON.stringify(t.value)) : localStorage.removeItem("ui:project:regionSelector:" + n.projectId + ":regionsIndexes");
|
|
190
190
|
};
|
|
@@ -194,60 +194,61 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
194
194
|
regionsIndexes: t
|
|
195
195
|
};
|
|
196
196
|
}, ye = (n) => {
|
|
197
|
-
const
|
|
197
|
+
const i = R(() => ne(n.forFrequency, n.autoRegion, n.searchers)), v = R(() => i.value.get(e.searcherKey.value) || oe), t = R(() => {
|
|
198
198
|
const l = /* @__PURE__ */ new Set();
|
|
199
|
-
return
|
|
200
|
-
var
|
|
201
|
-
(
|
|
202
|
-
|
|
199
|
+
return i.value.forEach((y) => {
|
|
200
|
+
var m;
|
|
201
|
+
(m = y.regions) == null || m.forEach((x) => {
|
|
202
|
+
x.index !== -1 && x.index !== p && l.add(x.index);
|
|
203
203
|
});
|
|
204
204
|
}), l;
|
|
205
|
-
}), e =
|
|
206
|
-
B(
|
|
207
|
-
var y,
|
|
208
|
-
if (e.searcherKey.value === -1)
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
205
|
+
}), e = fe(n, i), r = ge(n, v), o = me(n, i, t);
|
|
206
|
+
B(i, () => {
|
|
207
|
+
var y, m, x, g;
|
|
208
|
+
if (n.onlySearcher ? o.regionsIndexes.value = Array.from(i.value.keys()) : o.regionsIndexes.value = o.regionsIndexes.value.filter((d) => t.value.has(d)), e.searcherKey.value === -1) return;
|
|
209
|
+
let l = i.value.keys().next().value;
|
|
210
|
+
i.value.forEach((d) => {
|
|
211
|
+
var I, h, k;
|
|
212
|
+
if (n.onlySearcher && d.key === e.searcherKey.value) {
|
|
213
|
+
l = e.searcherKey.value;
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
if (r.regionIndex.value && ((I = d.regionByIndex) != null && I.has(r.regionIndex.value)) && (l = d.key), !n.onlySearcher) {
|
|
217
|
+
let u;
|
|
218
|
+
l !== void 0 && (u = (h = i.value.get(l)) == null ? void 0 : h.regionByIndex);
|
|
219
|
+
const S = (k = i.value.get(d.key)) == null ? void 0 : k.regionByIndex;
|
|
220
|
+
u != null && u.has(p) && !(S != null && S.has(p)) && (l = d.key);
|
|
220
221
|
}
|
|
221
|
-
}),
|
|
222
|
+
}), l !== void 0 && (e.searcherKey.value = l), r.regionIndex.value !== void 0 && !((m = (y = v.value) == null ? void 0 : y.regionByIndex) != null && m.has(r.regionIndex.value)) && (r.regionIndex.value = (g = (x = v.value) == null ? void 0 : x.regions) == null ? void 0 : g.keys().next().value);
|
|
222
223
|
}, { immediate: !0 });
|
|
223
224
|
const a = () => {
|
|
224
|
-
if (!(e.searcherKey.value === -1 || e.searcherKey.value ===
|
|
225
|
+
if (!(e.searcherKey.value === -1 || e.searcherKey.value === p))
|
|
225
226
|
return e.searcherKey.value;
|
|
226
|
-
},
|
|
227
|
-
if (n.onlySearcher || r.regionIndex.value ===
|
|
227
|
+
}, c = () => {
|
|
228
|
+
if (n.onlySearcher || r.regionIndex.value === p) return;
|
|
228
229
|
let l = r.regionIndex.value;
|
|
229
230
|
if (n.forFrequency) {
|
|
230
|
-
const y = r.regionIndex.value,
|
|
231
|
-
l =
|
|
231
|
+
const y = r.regionIndex.value, m = te(n.forFrequency, { searcher_key: a(), key: y }, n.searchers);
|
|
232
|
+
l = m == null ? void 0 : m.index;
|
|
232
233
|
}
|
|
233
234
|
return l;
|
|
234
|
-
},
|
|
235
|
+
}, f = () => {
|
|
235
236
|
const l = a();
|
|
236
237
|
if (l !== void 0)
|
|
237
|
-
return
|
|
238
|
+
return i.value.get(l);
|
|
238
239
|
};
|
|
239
240
|
return {
|
|
240
241
|
selectSearcher: e,
|
|
241
242
|
selectRegion: r,
|
|
242
243
|
compare: o,
|
|
243
|
-
searcherByKey:
|
|
244
|
+
searcherByKey: i,
|
|
244
245
|
allRegionsIndexes: t,
|
|
245
|
-
getSearcher:
|
|
246
|
+
getSearcher: f,
|
|
246
247
|
getRegion: () => {
|
|
247
|
-
var y,
|
|
248
|
-
const l =
|
|
248
|
+
var y, m;
|
|
249
|
+
const l = c();
|
|
249
250
|
if (l !== void 0)
|
|
250
|
-
return (
|
|
251
|
+
return (m = (y = f()) == null ? void 0 : y.regionByIndex) == null ? void 0 : m.get(l);
|
|
251
252
|
}
|
|
252
253
|
};
|
|
253
254
|
}, he = /* @__PURE__ */ j({
|
|
@@ -271,68 +272,68 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
271
272
|
modelValueSingleModifiers: {}
|
|
272
273
|
}),
|
|
273
274
|
emits: /* @__PURE__ */ N(["compareRegions"], ["update:modelValue", "update:modelValueSingle"]),
|
|
274
|
-
setup(n, { expose:
|
|
275
|
-
const t = n, e = b(n, "modelValue"), r = b(n, "modelValueSingle"), o =
|
|
275
|
+
setup(n, { expose: i, emit: v }) {
|
|
276
|
+
const t = n, e = b(n, "modelValue"), r = b(n, "modelValueSingle"), o = v, {
|
|
276
277
|
selectSearcher: a,
|
|
277
|
-
selectRegion:
|
|
278
|
-
compare:
|
|
279
|
-
searcherByKey:
|
|
278
|
+
selectRegion: c,
|
|
279
|
+
compare: f,
|
|
280
|
+
searcherByKey: s,
|
|
280
281
|
allRegionsIndexes: l,
|
|
281
282
|
getSearcher: y,
|
|
282
|
-
getRegion:
|
|
283
|
-
} = ye(t),
|
|
283
|
+
getRegion: m
|
|
284
|
+
} = ye(t), x = () => {
|
|
284
285
|
var g;
|
|
285
286
|
if (window.fieldTemplates && ((g = window.fieldTemplates) != null && g.openSelectorRegions)) {
|
|
286
287
|
window.fieldTemplates.openSelectorRegions(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
(
|
|
288
|
+
s.value,
|
|
289
|
+
f.regionsIndexes.value,
|
|
290
|
+
(d) => f.regionsIndexes.value = d
|
|
290
291
|
);
|
|
291
292
|
return;
|
|
292
293
|
}
|
|
293
|
-
o("compareRegions",
|
|
294
|
+
o("compareRegions", s.value);
|
|
294
295
|
};
|
|
295
|
-
return B([
|
|
296
|
-
if (a.searcherKey.value === -1 &&
|
|
297
|
-
if (JSON.stringify(e.value) === JSON.stringify(
|
|
296
|
+
return B([c.regionIndex, a.searcherKey, f.regionsIndexes], () => {
|
|
297
|
+
if (a.searcherKey.value === -1 && f.regionsIndexes.value.length) {
|
|
298
|
+
if (JSON.stringify(e.value) === JSON.stringify(f.regionsIndexes.value))
|
|
298
299
|
return;
|
|
299
|
-
e.value = [...
|
|
300
|
+
e.value = [...f.regionsIndexes.value];
|
|
300
301
|
} else
|
|
301
|
-
e.value = [t.onlySearcher ? a.searcherKey.value :
|
|
302
|
-
l.value.size
|
|
302
|
+
e.value = [t.onlySearcher ? a.searcherKey.value : c.regionIndex.value];
|
|
303
|
+
!t.onlySearcher && !l.value.size && (a.searcherKey.value = p);
|
|
303
304
|
}), r.value && B(r, () => {
|
|
304
305
|
e.value = [r.value];
|
|
305
306
|
}, { immediate: !0 }), B(e, () => {
|
|
306
|
-
var g,
|
|
307
|
+
var g, d, I, h, k;
|
|
307
308
|
if (e.value[0] && (r.value = e.value[0]), t.onlySearcher) {
|
|
308
|
-
if (!e.value.length || e.value.length === 1 && !
|
|
309
|
-
let
|
|
310
|
-
|
|
309
|
+
if (!e.value.length || e.value.length === 1 && !s.value.has(e.value[0])) {
|
|
310
|
+
let u = s.value.keys().next().value;
|
|
311
|
+
u !== void 0 && (e.value = [u]);
|
|
311
312
|
return;
|
|
312
313
|
}
|
|
313
|
-
if (e.value.length > 1 && JSON.stringify(e.value) !== JSON.stringify(
|
|
314
|
-
e.value = [...
|
|
314
|
+
if (e.value.length > 1 && JSON.stringify(e.value) !== JSON.stringify(f.regionsIndexes.value)) {
|
|
315
|
+
e.value = [...f.regionsIndexes.value];
|
|
315
316
|
return;
|
|
316
317
|
}
|
|
317
318
|
} else {
|
|
318
|
-
let
|
|
319
|
-
if (t.forFrequency && (
|
|
320
|
-
|
|
321
|
-
else if (
|
|
322
|
-
let
|
|
323
|
-
t.forFrequency && (
|
|
319
|
+
let u = [...new Set(e.value)], S = (d = (g = s.value.values().next().value) == null ? void 0 : g.regionByIndex) == null ? void 0 : d.keys().next().value;
|
|
320
|
+
if (t.forFrequency && (S = (k = (h = (I = s.value.values().next().value) == null ? void 0 : I.regionByIndex) == null ? void 0 : h.values().next().value) == null ? void 0 : k.key), !u.length)
|
|
321
|
+
S !== void 0 && u.push(S);
|
|
322
|
+
else if (u.length === 1) {
|
|
323
|
+
let K = l.value;
|
|
324
|
+
t.forFrequency && (K = /* @__PURE__ */ new Set(), s.value.forEach((O) => {
|
|
324
325
|
O.regionByIndex.forEach((M) => {
|
|
325
|
-
M.index !== -1 && M.index !==
|
|
326
|
+
M.index !== -1 && M.index !== p && K.add(M.key);
|
|
326
327
|
});
|
|
327
|
-
})), !
|
|
328
|
+
})), !K.has(u[0]) && u[0] !== -2 && (u = [], S !== void 0 && u.push(S));
|
|
328
329
|
} else
|
|
329
|
-
|
|
330
|
-
if (JSON.stringify(e.value) !== JSON.stringify(
|
|
331
|
-
e.value =
|
|
330
|
+
u = u.filter((K) => l.value.has(K)), !u.length && S !== void 0 && u.push(S);
|
|
331
|
+
if (JSON.stringify(e.value) !== JSON.stringify(u)) {
|
|
332
|
+
e.value = u;
|
|
332
333
|
return;
|
|
333
334
|
}
|
|
334
335
|
}
|
|
335
|
-
if (!(e.value.length === 1 && e.value[0] === (t.onlySearcher ? a.searcherKey.value :
|
|
336
|
+
if (!(e.value.length === 1 && e.value[0] === (t.onlySearcher ? a.searcherKey.value : c.regionIndex.value)))
|
|
336
337
|
if (t.onlySearcher) {
|
|
337
338
|
if (e.value.length === 1) {
|
|
338
339
|
a.searcherKey.value = e.value[0];
|
|
@@ -341,54 +342,54 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
341
342
|
a.searcherKey.value = -1;
|
|
342
343
|
return;
|
|
343
344
|
} else if (e.value.length === 1 && a.searcherKey.value !== -1) {
|
|
344
|
-
|
|
345
|
-
let
|
|
346
|
-
for (const
|
|
347
|
-
for (const
|
|
348
|
-
if ((t.forFrequency ?
|
|
349
|
-
|
|
345
|
+
c.regionIndex.value = e.value[0];
|
|
346
|
+
let u;
|
|
347
|
+
for (const S of s.value.values()) {
|
|
348
|
+
for (const K of S.regionByIndex.values())
|
|
349
|
+
if ((t.forFrequency ? K.key : K.index) === c.regionIndex.value) {
|
|
350
|
+
u = S.key;
|
|
350
351
|
break;
|
|
351
352
|
}
|
|
352
|
-
if (
|
|
353
|
+
if (u !== void 0)
|
|
353
354
|
break;
|
|
354
355
|
}
|
|
355
|
-
|
|
356
|
+
u !== void 0 && (a.searcherKey.value = u);
|
|
356
357
|
} else
|
|
357
|
-
a.searcherKey.value = -1,
|
|
358
|
-
}, { immediate: !0 }),
|
|
358
|
+
a.searcherKey.value = -1, f.regionsIndexes.value = [...e.value];
|
|
359
|
+
}, { immediate: !0 }), i({
|
|
359
360
|
getSearcher: y,
|
|
360
|
-
getRegion:
|
|
361
|
-
}), (g,
|
|
361
|
+
getRegion: m
|
|
362
|
+
}), (g, d) => (V(), q("div", {
|
|
362
363
|
class: D({
|
|
363
364
|
"top-selectorRegion": !0,
|
|
364
365
|
"top-selectorRegion-onlySearcher": g.onlySearcher
|
|
365
366
|
})
|
|
366
367
|
}, [
|
|
367
|
-
|
|
368
|
-
options:
|
|
369
|
-
modelValue:
|
|
370
|
-
"onUpdate:modelValue":
|
|
368
|
+
A($, {
|
|
369
|
+
options: C(a).optionBySearcherKey.value,
|
|
370
|
+
modelValue: C(a).searcherKey.value,
|
|
371
|
+
"onUpdate:modelValue": d[0] || (d[0] = (I) => C(a).searcherKey.value = I),
|
|
371
372
|
name: "searcher_key",
|
|
372
373
|
addChanger: g.addChanger
|
|
373
374
|
}, null, 8, ["options", "modelValue", "addChanger"]),
|
|
374
|
-
!g.onlySearcher &&
|
|
375
|
+
!g.onlySearcher && C(a).searcherKey.value !== -1 ? (V(), w($, {
|
|
375
376
|
key: 0,
|
|
376
377
|
class: "top-select-region",
|
|
377
|
-
options:
|
|
378
|
-
modelValue:
|
|
379
|
-
"onUpdate:modelValue":
|
|
378
|
+
options: C(c).optionByRegionIndex.value,
|
|
379
|
+
modelValue: C(c).regionIndex.value,
|
|
380
|
+
"onUpdate:modelValue": d[1] || (d[1] = (I) => C(c).regionIndex.value = I),
|
|
380
381
|
name: g.forFrequency ? "region_key" : "region_index",
|
|
381
382
|
addChanger: g.addChanger,
|
|
382
383
|
"data-top-icon": g.addRegionIcon ? "" : void 0
|
|
383
384
|
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : T("", !0),
|
|
384
|
-
g.addCompare && !g.onlySearcher &&
|
|
385
|
+
g.addCompare && !g.onlySearcher && C(a).searcherKey.value === -1 ? (V(), w(z, {
|
|
385
386
|
key: 1,
|
|
386
387
|
name: "compare",
|
|
387
|
-
onClick:
|
|
388
|
-
"data-count-compare-regions-indexes":
|
|
388
|
+
onClick: x,
|
|
389
|
+
"data-count-compare-regions-indexes": C(f).regionsIndexes.value.length
|
|
389
390
|
}, {
|
|
390
391
|
default: _(() => [
|
|
391
|
-
|
|
392
|
+
J(E(g.$i18n.Common.Selected_regions), 1)
|
|
392
393
|
]),
|
|
393
394
|
_: 1
|
|
394
395
|
}, 8, ["data-count-compare-regions-indexes"])) : T("", !0)
|
|
@@ -404,7 +405,7 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
|
|
|
404
405
|
"top-selectorRegion-onlySearcher": "top-selectorRegion-onlySearcher"
|
|
405
406
|
}, xe = {
|
|
406
407
|
$style: pe
|
|
407
|
-
},
|
|
408
|
+
}, Se = /* @__PURE__ */ U(he, [["__cssModules", xe]]), _e = ve, we = Se;
|
|
408
409
|
export {
|
|
409
410
|
_e as TopSelectorCompetitors,
|
|
410
411
|
we as TopSelectorRegion
|