@topvisor/ui 1.0.21-pinia-1 → 1.0.22-selectorRegion-pr
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/.chunks/core-Cb1K4rks.es.js +196 -0
- package/.chunks/core-Cb1K4rks.es.js.map +1 -0
- package/.chunks/core-DOD2Zduv.amd.js +2 -0
- package/.chunks/core-DOD2Zduv.amd.js.map +1 -0
- package/.chunks/{datepicker-BC31NE5M.es.js → datepicker-BbLOzQtp.es.js} +2 -2
- package/.chunks/datepicker-BbLOzQtp.es.js.map +1 -0
- package/.chunks/{datepicker-CVoT5EME.amd.js → datepicker-DNOnzVIz.amd.js} +2 -2
- package/.chunks/datepicker-DNOnzVIz.amd.js.map +1 -0
- package/.chunks/dialog_selectorRegions-BYAZLdbp.es.js +140 -0
- package/.chunks/dialog_selectorRegions-BYAZLdbp.es.js.map +1 -0
- package/.chunks/dialog_selectorRegions-D1YE2mYS.amd.js +2 -0
- package/.chunks/dialog_selectorRegions-D1YE2mYS.amd.js.map +1 -0
- package/.chunks/{utils-C5sf4bZh.es.js → dialogs.vue_vue_type_script_setup_true_lang-DtLpQTwi.es.js} +72 -144
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DtLpQTwi.es.js.map +1 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-xoE5yB6b.amd.js +2 -0
- package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-xoE5yB6b.amd.js.map +1 -0
- package/.chunks/{forms-CxYSHZLL.amd.js → forms-Dv9L8-AZ.amd.js} +3 -3
- package/.chunks/forms-Dv9L8-AZ.amd.js.map +1 -0
- package/.chunks/{forms-CipZtprq.es.js → forms-LTK63Ugt.es.js} +28 -28
- package/.chunks/forms-LTK63Ugt.es.js.map +1 -0
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CT6O_7Qy.amd.js → listItem.vue_vue_type_script_setup_true_lang-COGiIcDO.amd.js} +2 -2
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-COGiIcDO.amd.js.map +1 -0
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-uNNJJ4S0.es.js → listItem.vue_vue_type_script_setup_true_lang-UC3o5oK5.es.js} +7 -7
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-UC3o5oK5.es.js.map +1 -0
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-DAI_WcXI.amd.js → menu.vue_vue_type_style_index_0_lang-BFmZ4tvs.amd.js} +2 -2
- package/.chunks/menu.vue_vue_type_style_index_0_lang-BFmZ4tvs.amd.js.map +1 -0
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-fU3LbpR7.es.js → menu.vue_vue_type_style_index_0_lang-hQu5BJPe.es.js} +5 -5
- package/.chunks/menu.vue_vue_type_style_index_0_lang-hQu5BJPe.es.js.map +1 -0
- package/.chunks/{notice-uzdQ-t3s.amd.js → notice-BoZG4Mg1.amd.js} +2 -2
- package/.chunks/notice-BoZG4Mg1.amd.js.map +1 -0
- package/.chunks/{notice-cCZZtLLu.es.js → notice-CYutIom0.es.js} +2 -2
- package/.chunks/notice-CYutIom0.es.js.map +1 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-B2wjrf5z.es.js +143 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-B2wjrf5z.es.js.map +1 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-CffDh-th.amd.js +2 -0
- package/.chunks/page.vue_vue_type_script_setup_true_lang-CffDh-th.amd.js.map +1 -0
- package/.chunks/{popup-Bwknq6xI.amd.js → popup-Cg9w4Vy-.amd.js} +2 -2
- package/.chunks/popup-Cg9w4Vy-.amd.js.map +1 -0
- package/.chunks/{popup-BvhY5oAD.es.js → popup-ec_xLrTA.es.js} +2 -2
- package/.chunks/popup-ec_xLrTA.es.js.map +1 -0
- package/.chunks/store-CX_6ZXhO.es.js.map +1 -1
- package/.chunks/store-esTid5oI.amd.js.map +1 -1
- package/.chunks/{utils-C2OmmJkw.es.js → utils-BRLYX_ZC.es.js} +3 -3
- package/.chunks/utils-BRLYX_ZC.es.js.map +1 -0
- package/.chunks/utils-COoE8KP7.es.js +79 -0
- package/.chunks/utils-COoE8KP7.es.js.map +1 -0
- package/.chunks/utils-GpKurv7L.amd.js +2 -0
- package/.chunks/utils-GpKurv7L.amd.js.map +1 -0
- package/.chunks/utils-z5wL437D.amd.js +2 -0
- package/.chunks/utils-z5wL437D.amd.js.map +1 -0
- package/README.md +82 -82
- package/assets/core.css +1 -1
- package/assets/dialog_selectorRegions.css +1 -0
- package/assets/forms.css +1 -1
- package/assets/formsExt.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.js +1 -1
- package/charts/charts.js.map +1 -1
- package/components/project/project.d.ts +1 -1
- package/components/project/selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue.d.ts +4 -0
- package/components/project/selectorRegion/dialog_selectorRegions/types.d.ts +26 -0
- package/components/project/selectorRegion/selectorRegion.d.ts +0 -12
- package/components/project/selectorRegion/selectorRegion.vue.d.ts +1 -3
- package/components/project/selectorRegion/utils/utils.d.ts +9 -0
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +122 -310
- package/core/app.js.map +1 -1
- package/core/utils/string.d.ts +3 -1
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.amd.js.map +1 -1
- package/dialog/dialog.js +22 -155
- package/dialog/dialog.js.map +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/forms/helpers.amd.js.map +1 -1
- package/forms/helpers.js.map +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +2 -2
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/Read Me.txt +7 -7
- package/icomoon/Topvisor icons.json +6259 -6259
- package/icomoon/demo-files/demo.css +158 -158
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +3558 -3558
- package/icomoon/fonts/Topvisor-2.svg +276 -276
- package/icomoon/style.css +780 -780
- package/jquery-ui.min.css +5 -5
- package/layout/layout.amd.js +1 -1
- package/layout/layout.amd.js.map +1 -1
- package/layout/layout.js +1 -1
- package/layout/layout.js.map +1 -1
- package/package.json +33 -33
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +2 -2
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +2 -2
- package/popup/worker.js.map +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +517 -515
- package/project/project.js.map +1 -1
- package/require/css.amd.js +12 -12
- package/tabs/tabs.amd.js.map +1 -1
- package/tabs/tabs.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +1 -1
- package/tabsView/tabsView.js.map +1 -1
- package/utils/check.amd.js.map +1 -1
- package/utils/check.js.map +1 -1
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.amd.js.map +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/clipboard.js.map +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +2 -2
- package/utils/device.amd.js +1 -1
- package/utils/device.js +4 -4
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/utils/image.amd.js.map +1 -1
- package/utils/image.js.map +1 -1
- package/utils/keyboard.amd.js.map +1 -1
- package/utils/keyboard.js.map +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +3 -3
- package/utils/number.amd.js.map +1 -1
- package/utils/number.js.map +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.amd.js.map +1 -1
- package/utils/price.js +4 -4
- package/utils/price.js.map +1 -1
- package/utils/route.amd.js.map +1 -1
- package/utils/route.js.map +1 -1
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.js.map +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.amd.js.map +1 -1
- package/utils/searchers.js +16 -12
- package/utils/searchers.js.map +1 -1
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +1 -1
- package/utils/string.js.map +1 -1
- package/utils/system.amd.js.map +1 -1
- package/utils/system.js.map +1 -1
- package/utils/url.amd.js.map +1 -1
- package/utils/url.js.map +1 -1
- package/web-types.json +130 -130
- package/.chunks/datepicker-BC31NE5M.es.js.map +0 -1
- package/.chunks/datepicker-CVoT5EME.amd.js.map +0 -1
- package/.chunks/forms-CipZtprq.es.js.map +0 -1
- package/.chunks/forms-CxYSHZLL.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CT6O_7Qy.amd.js.map +0 -1
- package/.chunks/listItem.vue_vue_type_script_setup_true_lang-uNNJJ4S0.es.js.map +0 -1
- package/.chunks/menu.vue_vue_type_style_index_0_lang-DAI_WcXI.amd.js.map +0 -1
- package/.chunks/menu.vue_vue_type_style_index_0_lang-fU3LbpR7.es.js.map +0 -1
- package/.chunks/notice-cCZZtLLu.es.js.map +0 -1
- package/.chunks/notice-uzdQ-t3s.amd.js.map +0 -1
- package/.chunks/popup-BvhY5oAD.es.js.map +0 -1
- package/.chunks/popup-Bwknq6xI.amd.js.map +0 -1
- package/.chunks/utils-BfdO2xlC.amd.js +0 -2
- package/.chunks/utils-BfdO2xlC.amd.js.map +0 -1
- package/.chunks/utils-C2OmmJkw.es.js.map +0 -1
- package/.chunks/utils-C3dsXIj9.amd.js +0 -2
- package/.chunks/utils-C3dsXIj9.amd.js.map +0 -1
- package/.chunks/utils-C5sf4bZh.es.js.map +0 -1
package/project/project.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { Core as Te } from "../core/app.js";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import {
|
|
4
|
-
import { _ as he, a as se, b as Ae } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as Oe } from "../.chunks/menu.vue_vue_type_style_index_0_lang-
|
|
6
|
-
import {
|
|
2
|
+
import { defineComponent as q, mergeModels as R, useModel as N, computed as E, createElementBlock as B, openBlock as k, createBlock as b, unref as y, withCtx as _, Fragment as W, renderList as ie, normalizeClass as Q, createElementVNode as ye, toDisplayString as M, createVNode as L, createTextVNode as z, ref as D, watch as K, createCommentVNode as F, withModifiers as j, mergeProps as pe, withKeys as de, nextTick as be, resolveDirective as Be, withDirectives as Ve, resolveDynamicComponent as Ee, renderSlot as Me, shallowRef as $e, createSlots as Ke, reactive as we, toValue as ue, isRef as ce } from "vue";
|
|
3
|
+
import { u as A, C as J, _ as Y, x as re, d as Le } from "../.chunks/forms-LTK63Ugt.es.js";
|
|
4
|
+
import { _ as he, a as se, b as Ae } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-UC3o5oK5.es.js";
|
|
5
|
+
import { _ as Oe } from "../.chunks/menu.vue_vue_type_style_index_0_lang-hQu5BJPe.es.js";
|
|
6
|
+
import { u as Re } from "../.chunks/utils-COoE8KP7.es.js";
|
|
7
|
+
import { getSearcherGIcon as Ne, getLangLabel as De, getDeviceGIcon as Fe } from "../utils/searchers.js";
|
|
7
8
|
import { storage as G } from "../utils/dom.js";
|
|
8
|
-
import { TopPopupWorker as
|
|
9
|
-
const _e = ["../assets/project.css"].map((
|
|
9
|
+
import { TopPopupWorker as qe } from "../popup/worker.js";
|
|
10
|
+
const _e = ["../assets/project.css"].map((t) => import.meta.resolve(t));
|
|
10
11
|
Te.insertCSSLinkToPage(_e, !0);
|
|
11
|
-
const
|
|
12
|
+
const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }, je = /* @__PURE__ */ q({
|
|
12
13
|
__name: "selectorCompetitors",
|
|
13
|
-
props: /* @__PURE__ */
|
|
14
|
+
props: /* @__PURE__ */ R({
|
|
14
15
|
modelValue: {},
|
|
15
16
|
items: {},
|
|
16
17
|
showSelectAllItem: { type: Boolean, default: !0 }
|
|
@@ -19,69 +20,69 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
19
20
|
modelModifiers: {}
|
|
20
21
|
}),
|
|
21
22
|
emits: ["update:modelValue"],
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
23
|
+
setup(t) {
|
|
24
|
+
const l = t, o = N(t, "modelValue"), e = E(() => {
|
|
25
|
+
if (l.showSelectAllItem)
|
|
25
26
|
return {
|
|
26
27
|
icon: "",
|
|
27
|
-
title:
|
|
28
|
+
title: A().Common.Select_all,
|
|
28
29
|
value: "all",
|
|
29
30
|
content: ""
|
|
30
31
|
};
|
|
31
32
|
});
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
opener:
|
|
35
|
-
|
|
33
|
+
return (i, a) => (k(), B("div", Pe, [
|
|
34
|
+
y(J).state.isMobile ? (k(), b(he, { key: 0 }, {
|
|
35
|
+
opener: _(() => [
|
|
36
|
+
L(Y, {
|
|
36
37
|
class: "top-selectorCompetitors_opener",
|
|
37
38
|
color: "theme",
|
|
38
39
|
icon: "",
|
|
39
40
|
icon2: ""
|
|
40
41
|
}, {
|
|
41
|
-
default:
|
|
42
|
+
default: _(() => {
|
|
42
43
|
var n;
|
|
43
44
|
return [
|
|
44
|
-
z(
|
|
45
|
+
z(M((n = i.items.find((d) => {
|
|
45
46
|
var g;
|
|
46
|
-
return d.value === ((g =
|
|
47
|
+
return d.value === ((g = o.value) == null ? void 0 : g[0]);
|
|
47
48
|
})) == null ? void 0 : n.content), 1)
|
|
48
49
|
];
|
|
49
50
|
}),
|
|
50
51
|
_: 1
|
|
51
52
|
})
|
|
52
53
|
]),
|
|
53
|
-
contentList:
|
|
54
|
-
(
|
|
54
|
+
contentList: _(() => [
|
|
55
|
+
(k(!0), B(W, null, ie(i.items, (n, d) => {
|
|
55
56
|
var g;
|
|
56
|
-
return
|
|
57
|
+
return k(), b(se, {
|
|
57
58
|
class: Q({
|
|
58
|
-
"top-active": (g =
|
|
59
|
+
"top-active": (g = o.value) == null ? void 0 : g.includes(n.value)
|
|
59
60
|
}),
|
|
60
61
|
"data-top-icon": n.icon,
|
|
61
62
|
title: n.title,
|
|
62
|
-
onClick: () =>
|
|
63
|
+
onClick: () => o.value = [n.value]
|
|
63
64
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
ye("span",
|
|
65
|
+
default: _(() => [
|
|
66
|
+
ye("span", Ue, M(n.content), 1)
|
|
66
67
|
]),
|
|
67
68
|
_: 2
|
|
68
69
|
}, 1032, ["class", "data-top-icon", "title", "onClick"]);
|
|
69
70
|
}), 256))
|
|
70
71
|
]),
|
|
71
72
|
_: 1
|
|
72
|
-
})) : (
|
|
73
|
+
})) : (k(), b(Oe, {
|
|
73
74
|
key: 1,
|
|
74
|
-
modelValue:
|
|
75
|
-
"onUpdate:modelValue":
|
|
76
|
-
items:
|
|
75
|
+
modelValue: o.value,
|
|
76
|
+
"onUpdate:modelValue": a[0] || (a[0] = (n) => o.value = n),
|
|
77
|
+
items: i.items,
|
|
77
78
|
isMultiple: !0,
|
|
78
79
|
styling: "bar",
|
|
79
80
|
canBeEmptyMultiple: !1,
|
|
80
|
-
selectAllItem:
|
|
81
|
+
selectAllItem: e.value
|
|
81
82
|
}, null, 8, ["modelValue", "items", "selectAllItem"]))
|
|
82
83
|
]));
|
|
83
84
|
}
|
|
84
|
-
}),
|
|
85
|
+
}), x = -2, Je = {
|
|
85
86
|
0: "Yandex",
|
|
86
87
|
1: "Google",
|
|
87
88
|
4: "YouTube",
|
|
@@ -92,23 +93,23 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
92
93
|
20: "Yandex.com",
|
|
93
94
|
21: "Yandex.com.tr"
|
|
94
95
|
}, ee = {
|
|
95
|
-
key:
|
|
96
|
+
key: x,
|
|
96
97
|
name: "--",
|
|
97
|
-
index:
|
|
98
|
+
index: x
|
|
98
99
|
}, Se = {
|
|
99
|
-
key:
|
|
100
|
+
key: x,
|
|
100
101
|
name: "--",
|
|
101
102
|
regions: [ee],
|
|
102
|
-
regionByIndex: /* @__PURE__ */ new Map([[
|
|
103
|
+
regionByIndex: /* @__PURE__ */ new Map([[x, ee]])
|
|
103
104
|
}, te = {
|
|
104
|
-
key:
|
|
105
|
+
key: x,
|
|
105
106
|
name: "Autoselect",
|
|
106
|
-
index:
|
|
107
|
-
},
|
|
108
|
-
key:
|
|
107
|
+
index: x
|
|
108
|
+
}, oe = {
|
|
109
|
+
key: x,
|
|
109
110
|
name: "Autoselect",
|
|
110
111
|
regions: [te],
|
|
111
|
-
regionByIndex: /* @__PURE__ */ new Map([[
|
|
112
|
+
regionByIndex: /* @__PURE__ */ new Map([[x, te]])
|
|
112
113
|
}, me = {
|
|
113
114
|
countryCode: "00",
|
|
114
115
|
depth: 1,
|
|
@@ -117,219 +118,219 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
117
118
|
index: -1,
|
|
118
119
|
lang: "ru",
|
|
119
120
|
name: "Without region"
|
|
120
|
-
},
|
|
121
|
-
let
|
|
122
|
-
return
|
|
123
|
-
}, xe = (
|
|
124
|
-
const
|
|
125
|
-
return
|
|
126
|
-
if (!
|
|
127
|
-
const n = { ...
|
|
128
|
-
n.regionByIndex = /* @__PURE__ */ new Map(),
|
|
129
|
-
if (
|
|
121
|
+
}, ze = () => (te.name = A().Common.Autoselect, te), Ge = () => (ze(), oe.name = A().Common.Autoselect, console.log(oe), oe), We = () => (me.name = A().Keywords.Without_region, me), Ie = (t = !1, l = !1, o = []) => {
|
|
122
|
+
let e;
|
|
123
|
+
return t ? e = Ye(o) : e = xe(o), l && e.set(x, Ge()), e.size || e.set(x, Se), e;
|
|
124
|
+
}, xe = (t, l = !0, o = [], e = !1) => {
|
|
125
|
+
const i = /* @__PURE__ */ new Map();
|
|
126
|
+
return t.forEach((a) => {
|
|
127
|
+
if (!a.enabled || e && typeof a.key == "number" && a.key > 1) return;
|
|
128
|
+
const n = { ...a };
|
|
129
|
+
n.regionByIndex = /* @__PURE__ */ new Map(), a.regions && a.regions.forEach((d) => {
|
|
130
|
+
if (l && !d.enabled) return;
|
|
131
|
+
vd(d.index);
|
|
130
132
|
const g = { ...d };
|
|
131
|
-
n.regionByIndex
|
|
132
|
-
}), !n.regionByIndex.size && !
|
|
133
|
-
}),
|
|
134
|
-
if (
|
|
133
|
+
n.regionByIndex.set(g.index, g);
|
|
134
|
+
}), !n.regionByIndex.size && !o.length && n.regionByIndex.set(ee.index, ee), typeof n.key == "number" && i.set(n.key, n);
|
|
135
|
+
}), o.forEach((a) => {
|
|
136
|
+
if (i.has(a)) return;
|
|
135
137
|
const n = {
|
|
136
|
-
key:
|
|
137
|
-
name:
|
|
138
|
+
key: a,
|
|
139
|
+
name: Je[a],
|
|
138
140
|
regions: [],
|
|
139
141
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
140
142
|
};
|
|
141
|
-
|
|
142
|
-
}),
|
|
143
|
-
},
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
146
|
-
const
|
|
147
|
-
|
|
143
|
+
i.set(n.key, n);
|
|
144
|
+
}), i;
|
|
145
|
+
}, Ye = (t) => {
|
|
146
|
+
const l = xe(t, !1, [0, 1], !0);
|
|
147
|
+
if (l.has(2)) {
|
|
148
|
+
const o = l.get(2);
|
|
149
|
+
o && (o.regionByIndex = /* @__PURE__ */ new Map());
|
|
148
150
|
}
|
|
149
|
-
return
|
|
150
|
-
if (!
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
}), a;
|
|
154
|
-
}, Ye = (e, a, i = []) => {
|
|
155
|
-
const t = Ie(e, !1, i);
|
|
156
|
-
let l;
|
|
157
|
-
return t.forEach((o) => {
|
|
158
|
-
if (!(a.searcher_key !== void 0 && a.searcher_key != o.key) && o.regions && (o.regions.forEach((n) => {
|
|
159
|
-
if (!l && !(a.key !== void 0 && a.key != n.key) && !(a.index !== void 0 && a.index != n.index) && !(!e && (a.lang !== void 0 && a.lang != n.lang || a.device !== void 0 && a.device != n.device)))
|
|
160
|
-
return n.searcher_key = o.key, l = n, !1;
|
|
161
|
-
}), l))
|
|
162
|
-
return !1;
|
|
151
|
+
return l.forEach((o) => {
|
|
152
|
+
if (!o.regionByIndex) return;
|
|
153
|
+
const e = { ...We() };
|
|
154
|
+
o.regionByIndex.set(e.index, e);
|
|
163
155
|
}), l;
|
|
164
|
-
}, He = (
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
156
|
+
}, He = (t, l, o = []) => {
|
|
157
|
+
const e = Ie(t, !1, o);
|
|
158
|
+
let i;
|
|
159
|
+
return e.forEach((a) => {
|
|
160
|
+
if (!(l.searcher_key !== void 0 && l.searcher_key != a.key) && a.regions && (a.regions.forEach((n) => {
|
|
161
|
+
if (!i && !(l.key !== void 0 && l.key != n.key) && !(l.index !== void 0 && l.index != n.index) && !(!t && (l.lang !== void 0 && l.lang != n.lang || l.device !== void 0 && l.device != n.device)))
|
|
162
|
+
return n.searcher_key = a.key, i = n, !1;
|
|
163
|
+
}), i))
|
|
164
|
+
return !1;
|
|
165
|
+
}), i;
|
|
166
|
+
}, Qe = Re(() => import("../.chunks/dialog_selectorRegions-BYAZLdbp.es.js")), Xe = (t, l) => {
|
|
167
|
+
const o = A(), e = D(l.value.keys().next().value ?? x), i = E(() => {
|
|
168
|
+
const a = /* @__PURE__ */ new Map();
|
|
169
|
+
if (l.value.forEach((n) => {
|
|
168
170
|
let d = {
|
|
169
171
|
value: n.key,
|
|
170
172
|
title: n.name
|
|
171
173
|
};
|
|
172
|
-
|
|
173
|
-
}),
|
|
174
|
+
t.addSearcherIcon && (d.icon = Ne(n.key)), a.set(n.key, d);
|
|
175
|
+
}), t.addCompare && !a.has(x)) {
|
|
174
176
|
const n = {
|
|
175
177
|
value: "",
|
|
176
178
|
title: "--------------------",
|
|
177
179
|
disabled: !0
|
|
178
180
|
};
|
|
179
|
-
|
|
181
|
+
a.set(n.value, n);
|
|
180
182
|
const d = {
|
|
181
183
|
value: -1,
|
|
182
|
-
title:
|
|
184
|
+
title: o.Common.Compare
|
|
183
185
|
};
|
|
184
|
-
|
|
186
|
+
a.set(d.value, d);
|
|
185
187
|
}
|
|
186
|
-
return
|
|
188
|
+
return a;
|
|
187
189
|
});
|
|
188
190
|
return {
|
|
189
|
-
searcherKey:
|
|
190
|
-
optionBySearcherKey:
|
|
191
|
+
searcherKey: e,
|
|
192
|
+
optionBySearcherKey: i
|
|
191
193
|
};
|
|
192
|
-
},
|
|
193
|
-
var
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
const
|
|
197
|
-
var
|
|
194
|
+
}, Ze = (t, l) => {
|
|
195
|
+
var a, n, d;
|
|
196
|
+
const o = A(), e = D(x);
|
|
197
|
+
t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === x && (t.forFrequency ? e.value = ((n = (a = l.value) == null ? void 0 : a.regionByIndex.values().next().value) == null ? void 0 : n.key) ?? x : e.value = ((d = l.value) == null ? void 0 : d.regionByIndex.keys().next().value) ?? x);
|
|
198
|
+
const i = E(() => {
|
|
199
|
+
var p;
|
|
198
200
|
const g = /* @__PURE__ */ new Map();
|
|
199
|
-
return (
|
|
200
|
-
let r =
|
|
201
|
-
if (
|
|
202
|
-
const
|
|
203
|
-
value:
|
|
201
|
+
return (p = l.value.regionByIndex) == null || p.forEach((h) => {
|
|
202
|
+
let r = h.name;
|
|
203
|
+
if (t.forFrequency) {
|
|
204
|
+
const I = {
|
|
205
|
+
value: h.key,
|
|
204
206
|
title: r
|
|
205
207
|
};
|
|
206
|
-
g.has(
|
|
208
|
+
g.has(h.key) || g.set(h.key, I);
|
|
207
209
|
return;
|
|
208
210
|
}
|
|
209
|
-
|
|
210
|
-
const m =
|
|
211
|
+
h.device && (r += " (" + o.Common["Device_" + h.device] + ")");
|
|
212
|
+
const m = De(l.value.key || 0, h.lang ?? "");
|
|
211
213
|
m && (r += " / " + m);
|
|
212
|
-
const
|
|
213
|
-
value:
|
|
214
|
+
const u = {
|
|
215
|
+
value: h.index,
|
|
214
216
|
title: r,
|
|
215
|
-
icon:
|
|
217
|
+
icon: h.device ? Fe(h.device) : void 0
|
|
216
218
|
};
|
|
217
|
-
g.set(
|
|
219
|
+
g.set(h.index, u);
|
|
218
220
|
}), g;
|
|
219
221
|
});
|
|
220
|
-
return
|
|
221
|
-
var
|
|
222
|
-
if (
|
|
222
|
+
return K(i, (g, p) => {
|
|
223
|
+
var u;
|
|
224
|
+
if (t.onlySearcher || e.value !== void 0 && g.get(e.value))
|
|
223
225
|
return;
|
|
224
|
-
let
|
|
225
|
-
if (
|
|
226
|
-
|
|
226
|
+
let h = g.keys().next().value;
|
|
227
|
+
if (e.value === x || h === x) {
|
|
228
|
+
e.value = h;
|
|
227
229
|
return;
|
|
228
230
|
}
|
|
229
|
-
let r = ((
|
|
230
|
-
for (const [
|
|
231
|
-
const
|
|
232
|
-
if (typeof
|
|
231
|
+
let r = ((u = p == null ? void 0 : p.get(e.value)) == null ? void 0 : u.title) || "", m = -1;
|
|
232
|
+
for (const [I, T] of g.entries()) {
|
|
233
|
+
const C = T.title;
|
|
234
|
+
if (typeof C != "string" || typeof I == "string")
|
|
233
235
|
break;
|
|
234
|
-
if (
|
|
235
|
-
|
|
236
|
+
if (C === r) {
|
|
237
|
+
h = I;
|
|
236
238
|
break;
|
|
237
239
|
}
|
|
238
|
-
const
|
|
239
|
-
let
|
|
240
|
-
|
|
240
|
+
const V = new RegExp(` \\((${o.Common.Device_1}|${o.Common.Device_2})\\)`);
|
|
241
|
+
let f = r, s = 3;
|
|
242
|
+
C.indexOf(f) === -1 && (f = r.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(f) === -1 && (f = r.replace(/ \/.*/, ""), s--), C.indexOf(f) === -1 && (f = r.replace(/ \/.*/, ""), f = f.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(f) !== -1 && (s <= m || (m = s, h = I));
|
|
241
243
|
}
|
|
242
|
-
|
|
244
|
+
e.value = h;
|
|
243
245
|
}), {
|
|
244
|
-
regionIndex:
|
|
245
|
-
optionByRegionIndex:
|
|
246
|
+
regionIndex: e,
|
|
247
|
+
optionByRegionIndex: i
|
|
246
248
|
};
|
|
247
|
-
},
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
|
|
249
|
+
}, et = (t, l, o) => {
|
|
250
|
+
const e = D([]), i = () => {
|
|
251
|
+
if (t.onlySearcher && l.value) {
|
|
252
|
+
e.value = Array.from(l.value.keys());
|
|
251
253
|
return;
|
|
252
254
|
}
|
|
253
255
|
let n = [];
|
|
254
|
-
if (
|
|
255
|
-
n = [...
|
|
256
|
+
if (t.modelValue.length > 1)
|
|
257
|
+
n = [...t.modelValue];
|
|
256
258
|
else
|
|
257
259
|
try {
|
|
258
260
|
n = JSON.parse(
|
|
259
|
-
localStorage.getItem("ui:project:regionSelector" +
|
|
261
|
+
localStorage.getItem("ui:project:regionSelector" + t.projectId + ":regionsIndexes")
|
|
260
262
|
) ?? [];
|
|
261
263
|
} catch {
|
|
262
264
|
}
|
|
263
|
-
n.length && (n = n.filter((d) =>
|
|
264
|
-
},
|
|
265
|
-
|
|
265
|
+
n.length && (n = n.filter((d) => o.value.has(d))), n.length || (n = Array.from(o.value)), e.value = [...n];
|
|
266
|
+
}, a = () => {
|
|
267
|
+
e.value.length ? localStorage.setItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes", JSON.stringify(e.value)) : localStorage.removeItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes");
|
|
266
268
|
};
|
|
267
|
-
return
|
|
268
|
-
|
|
269
|
-
}),
|
|
270
|
-
regionsIndexes:
|
|
269
|
+
return K(e, () => {
|
|
270
|
+
a();
|
|
271
|
+
}), t.addCompare && i(), {
|
|
272
|
+
regionsIndexes: e
|
|
271
273
|
};
|
|
272
|
-
},
|
|
273
|
-
const
|
|
274
|
+
}, tt = (t) => {
|
|
275
|
+
const l = E(() => Ie(t.forFrequency, t.autoRegion, t.searchers)), o = E(() => l.value.get(i.searcherKey.value) || Se), e = E(() => {
|
|
274
276
|
const r = /* @__PURE__ */ new Set();
|
|
275
|
-
return
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
C.index !== -1 && C.index !== I && r.add(C.index);
|
|
277
|
+
return l.value.forEach((m) => {
|
|
278
|
+
m.regionByIndex.forEach((u) => {
|
|
279
|
+
u.index !== -1 && u.index !== x && r.add(u.index);
|
|
279
280
|
});
|
|
280
281
|
}), r;
|
|
281
|
-
}),
|
|
282
|
-
|
|
283
|
-
var m,
|
|
284
|
-
if (
|
|
285
|
-
let r =
|
|
286
|
-
|
|
287
|
-
var
|
|
288
|
-
if (
|
|
289
|
-
r =
|
|
282
|
+
}), i = Xe(t, l), a = Ze(t, o), n = et(t, l, e);
|
|
283
|
+
K(l, () => {
|
|
284
|
+
var m, u, I, T;
|
|
285
|
+
if (t.onlySearcher ? n.regionsIndexes.value = Array.from(l.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((C) => e.value.has(C)), i.searcherKey.value === -1) return;
|
|
286
|
+
let r = l.value.keys().next().value;
|
|
287
|
+
l.value.forEach((C) => {
|
|
288
|
+
var V, f, s;
|
|
289
|
+
if (t.onlySearcher && C.key === i.searcherKey.value) {
|
|
290
|
+
r = i.searcherKey.value;
|
|
290
291
|
return;
|
|
291
292
|
}
|
|
292
|
-
if (
|
|
293
|
-
let
|
|
294
|
-
r !== void 0 && (
|
|
295
|
-
const
|
|
296
|
-
|
|
293
|
+
if (a.regionIndex.value && ((V = C.regionByIndex) != null && V.has(a.regionIndex.value)) && (r = C.key), !t.onlySearcher) {
|
|
294
|
+
let c;
|
|
295
|
+
r !== void 0 && (c = (f = l.value.get(r)) == null ? void 0 : f.regionByIndex);
|
|
296
|
+
const v = (s = l.value.get(C.key)) == null ? void 0 : s.regionByIndex;
|
|
297
|
+
c != null && c.has(x) && !(v != null && v.has(x)) && (r = C.key);
|
|
297
298
|
}
|
|
298
|
-
}), r !== void 0 && (
|
|
299
|
+
}), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((u = (m = o.value) == null ? void 0 : m.regionByIndex) != null && u.has(a.regionIndex.value)) && (a.regionIndex.value = (T = (I = o.value) == null ? void 0 : I.regions) == null ? void 0 : T.keys().next().value);
|
|
299
300
|
}, { immediate: !0 });
|
|
300
301
|
const d = () => {
|
|
301
|
-
if (!(
|
|
302
|
-
return
|
|
302
|
+
if (!(i.searcherKey.value === -1 || i.searcherKey.value === x))
|
|
303
|
+
return i.searcherKey.value;
|
|
303
304
|
}, g = () => {
|
|
304
|
-
if (
|
|
305
|
-
let r =
|
|
306
|
-
if (
|
|
307
|
-
const m =
|
|
308
|
-
r =
|
|
305
|
+
if (t.onlySearcher || a.regionIndex.value === x) return;
|
|
306
|
+
let r = a.regionIndex.value;
|
|
307
|
+
if (t.forFrequency) {
|
|
308
|
+
const m = a.regionIndex.value, u = He(t.forFrequency, { searcher_key: d(), key: m }, t.searchers);
|
|
309
|
+
r = u == null ? void 0 : u.index;
|
|
309
310
|
}
|
|
310
311
|
return r;
|
|
311
|
-
},
|
|
312
|
+
}, p = () => {
|
|
312
313
|
const r = d();
|
|
313
314
|
if (r !== void 0)
|
|
314
|
-
return
|
|
315
|
+
return l.value.get(r);
|
|
315
316
|
};
|
|
316
317
|
return {
|
|
317
|
-
selectSearcher:
|
|
318
|
-
selectRegion:
|
|
318
|
+
selectSearcher: i,
|
|
319
|
+
selectRegion: a,
|
|
319
320
|
compare: n,
|
|
320
|
-
searcherByKey:
|
|
321
|
-
allRegionsIndexes:
|
|
322
|
-
getSearcher:
|
|
321
|
+
searcherByKey: l,
|
|
322
|
+
allRegionsIndexes: e,
|
|
323
|
+
getSearcher: p,
|
|
323
324
|
getRegion: () => {
|
|
324
|
-
var m,
|
|
325
|
+
var m, u;
|
|
325
326
|
const r = g();
|
|
326
327
|
if (r !== void 0)
|
|
327
|
-
return (
|
|
328
|
+
return (u = (m = p()) == null ? void 0 : m.regionByIndex) == null ? void 0 : u.get(r);
|
|
328
329
|
}
|
|
329
330
|
};
|
|
330
|
-
},
|
|
331
|
+
}, at = /* @__PURE__ */ q({
|
|
331
332
|
__name: "selectorRegion",
|
|
332
|
-
props: /* @__PURE__ */
|
|
333
|
+
props: /* @__PURE__ */ R({
|
|
333
334
|
projectId: {},
|
|
334
335
|
searchers: { default: () => [] },
|
|
335
336
|
modelValue: {},
|
|
@@ -347,131 +348,131 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
347
348
|
modelValueSingle: {},
|
|
348
349
|
modelValueSingleModifiers: {}
|
|
349
350
|
}),
|
|
350
|
-
emits:
|
|
351
|
-
setup(
|
|
352
|
-
const
|
|
353
|
-
selectSearcher:
|
|
354
|
-
selectRegion:
|
|
355
|
-
compare:
|
|
356
|
-
searcherByKey:
|
|
357
|
-
allRegionsIndexes:
|
|
358
|
-
getSearcher:
|
|
359
|
-
getRegion:
|
|
360
|
-
} =
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
351
|
+
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
352
|
+
setup(t, { expose: l }) {
|
|
353
|
+
const o = t, e = N(t, "modelValue"), i = N(t, "modelValueSingle"), {
|
|
354
|
+
selectSearcher: a,
|
|
355
|
+
selectRegion: n,
|
|
356
|
+
compare: d,
|
|
357
|
+
searcherByKey: g,
|
|
358
|
+
allRegionsIndexes: p,
|
|
359
|
+
getSearcher: h,
|
|
360
|
+
getRegion: r
|
|
361
|
+
} = tt(o), m = () => {
|
|
362
|
+
const u = [];
|
|
363
|
+
g.value.forEach((I) => {
|
|
364
|
+
I.enabled && I.regions.forEach((T) => {
|
|
365
|
+
T.enabled && u.push(T);
|
|
366
|
+
});
|
|
367
|
+
}), Qe.open("selectorRegions", {
|
|
368
|
+
regions: u,
|
|
369
|
+
regionsIndexes: d.regionsIndexes.value,
|
|
370
|
+
"@update:regionsIndexes": (I) => d.regionsIndexes.value = I
|
|
371
|
+
});
|
|
371
372
|
};
|
|
372
|
-
return
|
|
373
|
-
if (
|
|
374
|
-
if (JSON.stringify(
|
|
373
|
+
return K([n.regionIndex, a.searcherKey, d.regionsIndexes], () => {
|
|
374
|
+
if (a.searcherKey.value === -1 && d.regionsIndexes.value.length) {
|
|
375
|
+
if (JSON.stringify(e.value) === JSON.stringify(d.regionsIndexes.value))
|
|
375
376
|
return;
|
|
376
|
-
|
|
377
|
+
e.value = [...d.regionsIndexes.value];
|
|
377
378
|
} else
|
|
378
|
-
|
|
379
|
-
!
|
|
380
|
-
}),
|
|
381
|
-
|
|
382
|
-
}, { immediate: !0 }),
|
|
383
|
-
var
|
|
384
|
-
if (
|
|
385
|
-
if (!
|
|
386
|
-
let
|
|
387
|
-
|
|
379
|
+
e.value = [o.onlySearcher ? a.searcherKey.value : n.regionIndex.value];
|
|
380
|
+
!o.onlySearcher && !p.value.size && (a.searcherKey.value = x);
|
|
381
|
+
}), i.value && K(i, () => {
|
|
382
|
+
e.value = [i.value];
|
|
383
|
+
}, { immediate: !0 }), K(e, () => {
|
|
384
|
+
var u, I, T, C, V;
|
|
385
|
+
if (e.value[0] && (i.value = e.value[0]), o.onlySearcher) {
|
|
386
|
+
if (!e.value.length || e.value.length === 1 && !g.value.has(e.value[0])) {
|
|
387
|
+
let f = g.value.keys().next().value;
|
|
388
|
+
f !== void 0 && (e.value = [f]);
|
|
388
389
|
return;
|
|
389
390
|
}
|
|
390
|
-
if (
|
|
391
|
-
|
|
391
|
+
if (e.value.length > 1 && JSON.stringify(e.value) !== JSON.stringify(d.regionsIndexes.value)) {
|
|
392
|
+
e.value = [...d.regionsIndexes.value];
|
|
392
393
|
return;
|
|
393
394
|
}
|
|
394
395
|
} else {
|
|
395
|
-
let
|
|
396
|
-
if (
|
|
397
|
-
|
|
398
|
-
else if (
|
|
399
|
-
let
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
396
|
+
let f = [...new Set(e.value)], s = (I = (u = g.value.values().next().value) == null ? void 0 : u.regionByIndex) == null ? void 0 : I.keys().next().value;
|
|
397
|
+
if (o.forFrequency && (s = (V = (C = (T = g.value.values().next().value) == null ? void 0 : T.regionByIndex) == null ? void 0 : C.values().next().value) == null ? void 0 : V.key), !f.length)
|
|
398
|
+
s !== void 0 && f.push(s);
|
|
399
|
+
else if (f.length === 1) {
|
|
400
|
+
let c = p.value;
|
|
401
|
+
o.forFrequency && (c = /* @__PURE__ */ new Set(), g.value.forEach((v) => {
|
|
402
|
+
v.regionByIndex.forEach((S) => {
|
|
403
|
+
S.index !== -1 && S.index !== x && c.add(S.key);
|
|
403
404
|
});
|
|
404
|
-
})), !
|
|
405
|
+
})), !c.has(f[0]) && f[0] !== -2 && (f = [], s !== void 0 && f.push(s));
|
|
405
406
|
} else
|
|
406
|
-
|
|
407
|
-
if (JSON.stringify(
|
|
408
|
-
|
|
407
|
+
f = f.filter((c) => p.value.has(c)), !f.length && s !== void 0 && f.push(s);
|
|
408
|
+
if (JSON.stringify(e.value) !== JSON.stringify(f)) {
|
|
409
|
+
e.value = f;
|
|
409
410
|
return;
|
|
410
411
|
}
|
|
411
412
|
}
|
|
412
|
-
if (!(
|
|
413
|
-
if (
|
|
414
|
-
if (
|
|
415
|
-
|
|
413
|
+
if (!(e.value.length === 1 && e.value[0] === (o.onlySearcher ? a.searcherKey.value : n.regionIndex.value)))
|
|
414
|
+
if (o.onlySearcher) {
|
|
415
|
+
if (e.value.length === 1) {
|
|
416
|
+
a.searcherKey.value = e.value[0];
|
|
416
417
|
return;
|
|
417
418
|
}
|
|
418
|
-
|
|
419
|
+
a.searcherKey.value = -1;
|
|
419
420
|
return;
|
|
420
|
-
} else if (
|
|
421
|
-
|
|
422
|
-
let
|
|
423
|
-
for (const
|
|
424
|
-
for (const
|
|
425
|
-
if ((
|
|
426
|
-
|
|
421
|
+
} else if (e.value.length === 1 && a.searcherKey.value !== -1) {
|
|
422
|
+
n.regionIndex.value = e.value[0];
|
|
423
|
+
let f;
|
|
424
|
+
for (const s of g.value.values()) {
|
|
425
|
+
for (const c of s.regionByIndex.values())
|
|
426
|
+
if ((o.forFrequency ? c.key : c.index) === n.regionIndex.value) {
|
|
427
|
+
f = s.key;
|
|
427
428
|
break;
|
|
428
429
|
}
|
|
429
|
-
if (
|
|
430
|
+
if (f !== void 0)
|
|
430
431
|
break;
|
|
431
432
|
}
|
|
432
|
-
|
|
433
|
+
f !== void 0 && (a.searcherKey.value = f);
|
|
433
434
|
} else
|
|
434
|
-
|
|
435
|
-
}, { immediate: !0 }),
|
|
436
|
-
getSearcher:
|
|
437
|
-
getRegion:
|
|
438
|
-
}), (
|
|
435
|
+
a.searcherKey.value = -1, d.regionsIndexes.value = [...e.value];
|
|
436
|
+
}, { immediate: !0 }), l({
|
|
437
|
+
getSearcher: h,
|
|
438
|
+
getRegion: r
|
|
439
|
+
}), (u, I) => (k(), B("div", {
|
|
439
440
|
class: Q({
|
|
440
441
|
"top-selectorRegion": !0,
|
|
441
|
-
"top-selectorRegion-onlySearcher":
|
|
442
|
+
"top-selectorRegion-onlySearcher": u.onlySearcher
|
|
442
443
|
})
|
|
443
444
|
}, [
|
|
444
|
-
|
|
445
|
-
options:
|
|
446
|
-
modelValue:
|
|
447
|
-
"onUpdate:modelValue":
|
|
445
|
+
L(re, {
|
|
446
|
+
options: y(a).optionBySearcherKey.value,
|
|
447
|
+
modelValue: y(a).searcherKey.value,
|
|
448
|
+
"onUpdate:modelValue": I[0] || (I[0] = (T) => y(a).searcherKey.value = T),
|
|
448
449
|
name: "searcher_key",
|
|
449
|
-
addChanger:
|
|
450
|
+
addChanger: u.addChanger
|
|
450
451
|
}, null, 8, ["options", "modelValue", "addChanger"]),
|
|
451
|
-
!
|
|
452
|
+
!u.onlySearcher && y(a).searcherKey.value !== -1 ? (k(), b(re, {
|
|
452
453
|
key: 0,
|
|
453
454
|
class: "top-select-region",
|
|
454
|
-
options:
|
|
455
|
-
modelValue:
|
|
456
|
-
"onUpdate:modelValue":
|
|
457
|
-
name:
|
|
458
|
-
addChanger:
|
|
459
|
-
"data-top-icon":
|
|
460
|
-
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) :
|
|
461
|
-
|
|
455
|
+
options: y(n).optionByRegionIndex.value,
|
|
456
|
+
modelValue: y(n).regionIndex.value,
|
|
457
|
+
"onUpdate:modelValue": I[1] || (I[1] = (T) => y(n).regionIndex.value = T),
|
|
458
|
+
name: u.forFrequency ? "region_key" : "region_index",
|
|
459
|
+
addChanger: u.addChanger,
|
|
460
|
+
"data-top-icon": u.addRegionIcon ? "" : void 0
|
|
461
|
+
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : F("", !0),
|
|
462
|
+
u.addCompare && !u.onlySearcher && y(a).searcherKey.value === -1 ? (k(), b(Y, {
|
|
462
463
|
key: 1,
|
|
463
464
|
name: "compare",
|
|
464
|
-
onClick:
|
|
465
|
-
"data-count-compare-regions-indexes":
|
|
465
|
+
onClick: m,
|
|
466
|
+
"data-count-compare-regions-indexes": y(d).regionsIndexes.value.length
|
|
466
467
|
}, {
|
|
467
|
-
default:
|
|
468
|
-
z(
|
|
468
|
+
default: _(() => [
|
|
469
|
+
z(M(u.$i18n.Common.Selected_regions), 1)
|
|
469
470
|
]),
|
|
470
471
|
_: 1
|
|
471
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
472
|
+
}, 8, ["data-count-compare-regions-indexes"])) : F("", !0)
|
|
472
473
|
], 2));
|
|
473
474
|
}
|
|
474
|
-
}),
|
|
475
|
+
}), lt = [
|
|
475
476
|
{
|
|
476
477
|
id: "1",
|
|
477
478
|
name: "Without Tag",
|
|
@@ -522,12 +523,12 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
522
523
|
name: "Turquoise",
|
|
523
524
|
color_id: "10"
|
|
524
525
|
}
|
|
525
|
-
], ge = (
|
|
526
|
-
|
|
527
|
-
const
|
|
528
|
-
if (
|
|
529
|
-
return
|
|
530
|
-
},
|
|
526
|
+
], ge = (t) => "-" + t, H = (t) => t[0] === "-" ? t.substring(1) : t, ae = (t, l) => {
|
|
527
|
+
t = H(t);
|
|
528
|
+
const o = l.find((e) => e.id === t);
|
|
529
|
+
if (o)
|
|
530
|
+
return o;
|
|
531
|
+
}, nt = ["data-tag_id", "data-tag_color_id", "title"], le = /* @__PURE__ */ q({
|
|
531
532
|
__name: "tagIcon",
|
|
532
533
|
props: {
|
|
533
534
|
id: {},
|
|
@@ -535,21 +536,21 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
535
536
|
name: {},
|
|
536
537
|
state: {}
|
|
537
538
|
},
|
|
538
|
-
setup(
|
|
539
|
-
return (
|
|
539
|
+
setup(t) {
|
|
540
|
+
return (l, o) => (k(), B("div", {
|
|
540
541
|
class: Q({
|
|
541
542
|
"top-tagSelector_tagIcon": !0,
|
|
542
|
-
"top-tagSelector-active": !!
|
|
543
|
-
"top-tagSelector-excluded":
|
|
543
|
+
"top-tagSelector-active": !!l.state,
|
|
544
|
+
"top-tagSelector-excluded": l.state === "excluded"
|
|
544
545
|
}),
|
|
545
|
-
"data-tag_id":
|
|
546
|
-
"data-tag_color_id":
|
|
547
|
-
title:
|
|
548
|
-
}, null, 10,
|
|
546
|
+
"data-tag_id": l.id,
|
|
547
|
+
"data-tag_color_id": l.colorId,
|
|
548
|
+
title: l.name
|
|
549
|
+
}, null, 10, nt));
|
|
549
550
|
}
|
|
550
|
-
}),
|
|
551
|
+
}), ot = ["contenteditable", "onKeydown"], fe = /* @__PURE__ */ q({
|
|
551
552
|
__name: "tagPopupListItem",
|
|
552
|
-
props: /* @__PURE__ */
|
|
553
|
+
props: /* @__PURE__ */ R({
|
|
553
554
|
editable: { type: Boolean },
|
|
554
555
|
disabled: { type: Boolean },
|
|
555
556
|
canExclude: { type: Boolean },
|
|
@@ -563,27 +564,27 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
563
564
|
},
|
|
564
565
|
nameModifiers: {}
|
|
565
566
|
}),
|
|
566
|
-
emits: /* @__PURE__ */
|
|
567
|
-
setup(
|
|
568
|
-
const
|
|
567
|
+
emits: /* @__PURE__ */ R(["update:name", "unselect", "exclude", "select"], ["update:name"]),
|
|
568
|
+
setup(t, { emit: l }) {
|
|
569
|
+
const o = t, e = l, i = N(t, "name"), a = D(null), n = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
569
570
|
contenteditable: d.value,
|
|
570
571
|
onpaste: (m) => m.preventDefault()
|
|
571
|
-
} : {}), d =
|
|
572
|
+
} : {}), d = D(!1), g = async () => {
|
|
572
573
|
var m;
|
|
573
|
-
d.value = !0, await be(), (m =
|
|
574
|
-
},
|
|
575
|
-
var
|
|
576
|
-
const m = (
|
|
577
|
-
if (!m) return
|
|
578
|
-
|
|
579
|
-
},
|
|
580
|
-
|
|
574
|
+
d.value = !0, await be(), (m = a.value) == null || m.focus();
|
|
575
|
+
}, p = () => {
|
|
576
|
+
var u;
|
|
577
|
+
const m = (u = a.value) == null ? void 0 : u.innerText;
|
|
578
|
+
if (!m) return h();
|
|
579
|
+
a.value && (a.value.innerText = m), d.value = !1, e("update:name", m);
|
|
580
|
+
}, h = async () => {
|
|
581
|
+
a.value && (a.value.innerText = o.name), d.value = !1;
|
|
581
582
|
}, r = (m) => {
|
|
582
|
-
if (d.value ||
|
|
583
|
-
let
|
|
584
|
-
|
|
583
|
+
if (d.value || o.disabled) return;
|
|
584
|
+
let u = "selected";
|
|
585
|
+
o.canExclude && (m.ctrlKey || m.metaKey) && (u = "excluded"), o.state == u && (u = ""), u === "" && e("unselect"), u === "selected" && e("select"), u === "excluded" && e("exclude");
|
|
585
586
|
};
|
|
586
|
-
return (m,
|
|
587
|
+
return (m, u) => (k(), b(se, {
|
|
587
588
|
class: Q({
|
|
588
589
|
"top-tagSelector_tagListItem": !0,
|
|
589
590
|
"top-tagSelector_tagListItem-inEdit": d.value,
|
|
@@ -594,45 +595,45 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
594
595
|
}),
|
|
595
596
|
onClick: j(r, ["stop"])
|
|
596
597
|
}, {
|
|
597
|
-
default:
|
|
598
|
-
|
|
598
|
+
default: _(() => [
|
|
599
|
+
L(le, {
|
|
599
600
|
id: m.id,
|
|
600
|
-
name:
|
|
601
|
+
name: i.value,
|
|
601
602
|
colorId: m.colorId,
|
|
602
603
|
state: m.state
|
|
603
604
|
}, null, 8, ["id", "name", "colorId", "state"]),
|
|
604
605
|
ye("span", pe({
|
|
605
606
|
ref_key: "elName",
|
|
606
|
-
ref:
|
|
607
|
+
ref: a,
|
|
607
608
|
class: "top-tagSelector_tagListItemName",
|
|
608
609
|
contenteditable: d.value ? "plaintext-only" : !1
|
|
609
610
|
}, n.value, {
|
|
610
611
|
onKeydown: [
|
|
611
|
-
de(j(
|
|
612
|
-
de(j(
|
|
612
|
+
de(j(p, ["stop"]), ["enter"]),
|
|
613
|
+
de(j(h, ["stop"]), ["esc"])
|
|
613
614
|
]
|
|
614
|
-
}),
|
|
615
|
-
m.editable ? (
|
|
616
|
-
d.value ? (
|
|
615
|
+
}), M(i.value), 17, ot),
|
|
616
|
+
m.editable ? (k(), B(W, { key: 0 }, [
|
|
617
|
+
d.value ? (k(), B("span", {
|
|
617
618
|
key: 1,
|
|
618
619
|
"data-top-icon": "",
|
|
619
620
|
class: "top-tagSelector_edit",
|
|
620
|
-
onClick: j(
|
|
621
|
-
})) : (
|
|
621
|
+
onClick: j(p, ["stop"])
|
|
622
|
+
})) : (k(), B("span", {
|
|
622
623
|
key: 0,
|
|
623
624
|
"data-top-icon": "",
|
|
624
625
|
class: "top-tagSelector_edit",
|
|
625
626
|
onClick: g
|
|
626
627
|
}))
|
|
627
|
-
], 64)) :
|
|
628
|
+
], 64)) : F("", !0)
|
|
628
629
|
]),
|
|
629
630
|
_: 1
|
|
630
631
|
}, 8, ["class"]));
|
|
631
632
|
}
|
|
632
|
-
}),
|
|
633
|
+
}), rt = { key: 1 }, ke = /* @__PURE__ */ q({
|
|
633
634
|
inheritAttrs: !1,
|
|
634
635
|
__name: "popupOpener",
|
|
635
|
-
props: /* @__PURE__ */
|
|
636
|
+
props: /* @__PURE__ */ R({
|
|
636
637
|
modelValue: {},
|
|
637
638
|
id: {},
|
|
638
639
|
tags: {},
|
|
@@ -648,62 +649,62 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
648
649
|
modelModifiers: {}
|
|
649
650
|
}),
|
|
650
651
|
emits: ["update:modelValue"],
|
|
651
|
-
setup(
|
|
652
|
-
const
|
|
653
|
-
model:
|
|
654
|
-
mode:
|
|
655
|
-
targetId:
|
|
656
|
-
filters:
|
|
657
|
-
payload:
|
|
652
|
+
setup(t) {
|
|
653
|
+
const l = t, o = N(t, "modelValue"), e = l.useTopButton ? Y : "div", i = l.useTopButton ? "html" : "default", a = {
|
|
654
|
+
model: o,
|
|
655
|
+
mode: l.mode,
|
|
656
|
+
targetId: l.targetId,
|
|
657
|
+
filters: l.filters,
|
|
658
|
+
payload: l.payload
|
|
658
659
|
};
|
|
659
660
|
return (n, d) => {
|
|
660
661
|
const g = Be("top-data");
|
|
661
|
-
return
|
|
662
|
-
default:
|
|
663
|
-
Ve((
|
|
662
|
+
return k(), b(Ae, { id: n.id }, {
|
|
663
|
+
default: _(() => [
|
|
664
|
+
Ve((k(), b(Ee(y(e)), pe({
|
|
664
665
|
class: {
|
|
665
666
|
"top-tagSelector": !0,
|
|
666
|
-
"top-tagSelector-filter":
|
|
667
|
-
"top-tagSelector-setter_single":
|
|
668
|
-
"top-tagSelector-setter_several":
|
|
669
|
-
"top-tagSelector-selectedOne": !
|
|
670
|
-
"top-tagSelector-toTwoLine":
|
|
667
|
+
"top-tagSelector-filter": l.mode === "filter",
|
|
668
|
+
"top-tagSelector-setter_single": l.mode === "setter" && !n.filters,
|
|
669
|
+
"top-tagSelector-setter_several": l.mode === "setter" && n.filters,
|
|
670
|
+
"top-tagSelector-selectedOne": !o.value.length || o.value.length === 1,
|
|
671
|
+
"top-tagSelector-toTwoLine": o.value.length > 5
|
|
671
672
|
},
|
|
672
673
|
color: "theme",
|
|
673
674
|
styling: ""
|
|
674
675
|
}, n.$attrs), {
|
|
675
|
-
[
|
|
676
|
-
!
|
|
676
|
+
[y(i)]: _(() => [
|
|
677
|
+
!o.value.length && n.mode === "filter" ? (k(), b(le, {
|
|
677
678
|
key: 0,
|
|
678
679
|
id: "all",
|
|
679
680
|
colorId: "",
|
|
680
681
|
name: n.$i18n.Common.All_tags ?? "",
|
|
681
682
|
state: ""
|
|
682
|
-
}, null, 8, ["name"])) :
|
|
683
|
-
n.mode === "setter" && n.filters ? (
|
|
683
|
+
}, null, 8, ["name"])) : F("", !0),
|
|
684
|
+
n.mode === "setter" && n.filters ? (k(), B("div", rt, [
|
|
684
685
|
Me(n.$slots, "default")
|
|
685
|
-
])) : (
|
|
686
|
-
var
|
|
687
|
-
return
|
|
688
|
-
id:
|
|
689
|
-
colorId: ((
|
|
690
|
-
name: ((r =
|
|
691
|
-
state:
|
|
686
|
+
])) : (k(!0), B(W, { key: 2 }, ie(o.value, (p) => {
|
|
687
|
+
var h, r;
|
|
688
|
+
return k(), b(le, {
|
|
689
|
+
id: y(H)(p),
|
|
690
|
+
colorId: ((h = y(ae)(p, n.tags)) == null ? void 0 : h.color_id) ?? "",
|
|
691
|
+
name: ((r = y(ae)(p, n.tags)) == null ? void 0 : r.name) ?? "",
|
|
692
|
+
state: y(H)(p) === p ? "selected" : "excluded"
|
|
692
693
|
}, null, 8, ["id", "colorId", "name", "state"]);
|
|
693
694
|
}), 256))
|
|
694
695
|
]),
|
|
695
696
|
_: 2
|
|
696
697
|
}, 1040, ["class"])), [
|
|
697
|
-
[g,
|
|
698
|
+
[g, a, "topTagSelectorTarget"]
|
|
698
699
|
])
|
|
699
700
|
]),
|
|
700
701
|
_: 3
|
|
701
702
|
}, 8, ["id"]);
|
|
702
703
|
};
|
|
703
704
|
}
|
|
704
|
-
}),
|
|
705
|
+
}), it = /* @__PURE__ */ q({
|
|
705
706
|
__name: "tagSelector",
|
|
706
|
-
props: /* @__PURE__ */
|
|
707
|
+
props: /* @__PURE__ */ R({
|
|
707
708
|
modelValue: {},
|
|
708
709
|
tags: {},
|
|
709
710
|
tagsEditable: { type: Boolean },
|
|
@@ -719,180 +720,180 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
719
720
|
},
|
|
720
721
|
modelModifiers: {},
|
|
721
722
|
tags: {
|
|
722
|
-
default:
|
|
723
|
+
default: we(lt)
|
|
723
724
|
},
|
|
724
725
|
tagsModifiers: {}
|
|
725
726
|
}),
|
|
726
|
-
emits: /* @__PURE__ */
|
|
727
|
-
setup(
|
|
728
|
-
const
|
|
729
|
-
n(
|
|
730
|
-
},
|
|
731
|
-
|
|
732
|
-
const g =
|
|
733
|
-
var
|
|
734
|
-
const
|
|
735
|
-
return
|
|
727
|
+
emits: /* @__PURE__ */ R(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
|
|
728
|
+
setup(t, { emit: l }) {
|
|
729
|
+
const o = A(), e = t, i = N(t, "modelValue"), a = N(t, "tags"), n = l, d = Le((s, c) => {
|
|
730
|
+
n(s, c);
|
|
731
|
+
}, e.emitDelay);
|
|
732
|
+
e.singleMode && !i.value.length && (i.value = [a.value[0].id]);
|
|
733
|
+
const g = e.id ?? "top-popup-id-" + Math.random(), p = D("add"), h = () => {
|
|
734
|
+
var v;
|
|
735
|
+
const s = " " + ((v = o.Common.Tags) == null ? void 0 : v.toLowerCase()), c = /* @__PURE__ */ new Map();
|
|
736
|
+
return c.set("add", { value: "add", title: o.Common.Add + s }), c.set("replace", { value: "replace", title: o.Common.Replace + s }), c.set("delete", { value: "delete", title: o.Common.Delete + s }), c;
|
|
736
737
|
};
|
|
737
738
|
let r = $e({
|
|
738
|
-
model:
|
|
739
|
+
model: i,
|
|
739
740
|
mode: "filter",
|
|
740
741
|
targetId: void 0,
|
|
741
742
|
filters: void 0,
|
|
742
743
|
payload: void 0
|
|
743
744
|
});
|
|
744
|
-
|
|
745
|
-
d("selector",
|
|
745
|
+
K(i, () => {
|
|
746
|
+
d("selector", i.value);
|
|
746
747
|
});
|
|
747
|
-
const m =
|
|
748
|
-
if (r.value.mode === "setter" &&
|
|
749
|
-
return r.value.model.value.length >=
|
|
750
|
-
}),
|
|
751
|
-
if (
|
|
752
|
-
if (r.value.model.value.includes(
|
|
753
|
-
if (r.value.model.value.includes(ge(
|
|
748
|
+
const m = E(() => {
|
|
749
|
+
if (r.value.mode === "setter" && e.maxTagsForSetter && !r.value.filters)
|
|
750
|
+
return r.value.model.value.length >= e.maxTagsForSetter;
|
|
751
|
+
}), u = (s) => {
|
|
752
|
+
if (s !== "all") {
|
|
753
|
+
if (r.value.model.value.includes(s)) return "selected";
|
|
754
|
+
if (r.value.model.value.includes(ge(s))) return "excluded";
|
|
754
755
|
}
|
|
755
|
-
return
|
|
756
|
-
},
|
|
757
|
-
const
|
|
758
|
-
let
|
|
759
|
-
|
|
760
|
-
if (!
|
|
761
|
-
const X =
|
|
756
|
+
return s === "all" && !r.value.model.value.length ? "selected" : "";
|
|
757
|
+
}, I = (s, c) => {
|
|
758
|
+
const v = ge(s);
|
|
759
|
+
let S = r.value.model.value.filter((w) => w !== s && w !== v);
|
|
760
|
+
c === "select" && S.push(s), c === "exclude" && S.push(v), r.value.mode === "setter" && r.value.targetId !== void 0 && e.requiredForSetter && (S.length || S.push("1"), S.length === 2 && r.value.model.value.length === 1 && r.value.model.value[0] === "1" && (S = S.filter((w) => w !== "1"))), e.singleMode && !r.value.filters && (S.length || (S = r.value.model.value), S.length > 1 && (S = [S[S.length - 1]])), S.sort((w, P) => {
|
|
761
|
+
if (!e.tags) return 0;
|
|
762
|
+
const X = e.tags.findIndex((O) => O.id === w), U = e.tags.findIndex((O) => O.id === P);
|
|
762
763
|
return X - U;
|
|
763
|
-
}), r.value.model.value =
|
|
764
|
-
tagsIds:
|
|
764
|
+
}), r.value.model.value = S, r.value.mode === "setter" && r.value.targetId !== void 0 && d("setter", {
|
|
765
|
+
tagsIds: S,
|
|
765
766
|
targetId: r.value.targetId,
|
|
766
767
|
payload: r.value.payload
|
|
767
768
|
});
|
|
768
|
-
},
|
|
769
|
-
let
|
|
770
|
-
return r.value.mode === "filter" && (
|
|
771
|
-
}),
|
|
772
|
-
const
|
|
773
|
-
if (!
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
id: String(
|
|
777
|
-
name:
|
|
778
|
-
color_id: String((
|
|
779
|
-
}), n("tagsChanged",
|
|
780
|
-
},
|
|
781
|
-
var
|
|
782
|
-
if (r.value = G(
|
|
783
|
-
if (r.value.filters && (
|
|
769
|
+
}, T = E(() => {
|
|
770
|
+
let s = "top-tagSelector_popup";
|
|
771
|
+
return r.value.mode === "filter" && (s += " top-tagSelector_popup-filter"), r.value.mode === "setter" && (s += " top-tagSelector_popup-setter"), s;
|
|
772
|
+
}), C = () => {
|
|
773
|
+
const s = prompt("", "New tag");
|
|
774
|
+
if (!s || s === "New tag") return;
|
|
775
|
+
const c = a.value.length + 1;
|
|
776
|
+
a.value.push({
|
|
777
|
+
id: String(c),
|
|
778
|
+
name: s,
|
|
779
|
+
color_id: String((c - 1) % 10 + 1)
|
|
780
|
+
}), n("tagsChanged", a.value);
|
|
781
|
+
}, V = (s) => {
|
|
782
|
+
var c;
|
|
783
|
+
if (r.value = G(s.elPopupOpener, "topTagSelectorTarget"), !r.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
784
|
+
if (r.value.filters && (p.value = "add", r.value.model.value = []), !((c = J.$) != null && c.ui.sortable)) {
|
|
784
785
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
785
786
|
return;
|
|
786
787
|
}
|
|
787
|
-
!J.state.isMobile && !J.state.isMobileUA &&
|
|
788
|
+
!J.state.isMobile && !J.state.isMobileUA && a.value && $(s.elPopup).sortable({
|
|
788
789
|
items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
|
|
789
790
|
/**
|
|
790
791
|
* @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
|
|
791
792
|
*/
|
|
792
793
|
cancel: '[contenteditable="plaintext-only"], [contenteditable="true"]',
|
|
793
794
|
distance: 10,
|
|
794
|
-
stop: function(
|
|
795
|
-
if (!
|
|
796
|
-
const
|
|
797
|
-
|
|
798
|
-
if (!
|
|
799
|
-
const
|
|
800
|
-
|
|
801
|
-
}),
|
|
802
|
-
const
|
|
803
|
-
return
|
|
804
|
-
}), d("tagsChanged",
|
|
795
|
+
stop: function(v, S) {
|
|
796
|
+
if (!a.value) return;
|
|
797
|
+
const w = $(S.item).parent().find("[data-tag_id]"), P = [];
|
|
798
|
+
w.each((X, U) => {
|
|
799
|
+
if (!a.value) return;
|
|
800
|
+
const O = $(U).attr("data-tag_id");
|
|
801
|
+
P.push(O);
|
|
802
|
+
}), a.value.sort((X, U) => {
|
|
803
|
+
const O = P.findIndex((ne) => ne === X.id), Ce = P.findIndex((ne) => ne === U.id);
|
|
804
|
+
return O - Ce;
|
|
805
|
+
}), d("tagsChanged", a.value);
|
|
805
806
|
}
|
|
806
807
|
});
|
|
807
|
-
},
|
|
808
|
-
var
|
|
809
|
-
(
|
|
808
|
+
}, f = (s) => {
|
|
809
|
+
var c;
|
|
810
|
+
(c = J.$) != null && c.ui.sortable && $(s.elPopup).data("ui-sortable") && $(s.elPopup).sortable("destroy");
|
|
810
811
|
};
|
|
811
|
-
return (
|
|
812
|
-
|
|
812
|
+
return (s, c) => (k(), B(W, null, [
|
|
813
|
+
L(ke, {
|
|
813
814
|
class: "top-select_arrow",
|
|
814
|
-
modelValue:
|
|
815
|
-
"onUpdate:modelValue":
|
|
816
|
-
id:
|
|
817
|
-
tags:
|
|
815
|
+
modelValue: i.value,
|
|
816
|
+
"onUpdate:modelValue": c[0] || (c[0] = (v) => i.value = v),
|
|
817
|
+
id: y(g),
|
|
818
|
+
tags: a.value,
|
|
818
819
|
mode: "filter",
|
|
819
820
|
useTopButton: ""
|
|
820
821
|
}, null, 8, ["modelValue", "id", "tags"]),
|
|
821
|
-
|
|
822
|
-
id:
|
|
823
|
-
class: Q(
|
|
824
|
-
onOpen:
|
|
825
|
-
onClose:
|
|
822
|
+
L(he, {
|
|
823
|
+
id: y(g),
|
|
824
|
+
class: Q(T.value),
|
|
825
|
+
onOpen: c[4] || (c[4] = (v) => V(v)),
|
|
826
|
+
onClose: c[5] || (c[5] = (v) => f(v)),
|
|
826
827
|
"transition-duration": 50
|
|
827
|
-
},
|
|
828
|
-
contentList:
|
|
829
|
-
|
|
828
|
+
}, Ke({
|
|
829
|
+
contentList: _(() => [
|
|
830
|
+
y(r).mode === "filter" && !s.singleMode ? (k(), b(fe, {
|
|
830
831
|
key: 0,
|
|
831
832
|
id: "all",
|
|
832
833
|
colorId: "",
|
|
833
|
-
name:
|
|
834
|
-
state:
|
|
835
|
-
onSelect:
|
|
836
|
-
}, null, 8, ["name", "state"])) :
|
|
837
|
-
(
|
|
838
|
-
key:
|
|
839
|
-
id:
|
|
840
|
-
colorId:
|
|
841
|
-
name:
|
|
842
|
-
state:
|
|
843
|
-
canExclude:
|
|
844
|
-
editable:
|
|
845
|
-
disabled: m.value &&
|
|
846
|
-
onUnselect: (
|
|
847
|
-
onSelect: (
|
|
848
|
-
onExclude: (
|
|
849
|
-
"onUpdate:name": (
|
|
850
|
-
|
|
834
|
+
name: s.$i18n.Common.All_tags ?? "",
|
|
835
|
+
state: y(r).model.value.length ? "" : "selected",
|
|
836
|
+
onSelect: c[3] || (c[3] = (v) => y(r).model.value = [])
|
|
837
|
+
}, null, 8, ["name", "state"])) : F("", !0),
|
|
838
|
+
(k(!0), B(W, null, ie(a.value, (v) => (k(), b(fe, {
|
|
839
|
+
key: v.id,
|
|
840
|
+
id: v.id,
|
|
841
|
+
colorId: v.color_id,
|
|
842
|
+
name: v.name,
|
|
843
|
+
state: u(v.id),
|
|
844
|
+
canExclude: y(r).mode === "filter" && !s.singleMode,
|
|
845
|
+
editable: s.tagsEditable,
|
|
846
|
+
disabled: m.value && u(v.id) === "",
|
|
847
|
+
onUnselect: (S) => I(v.id, "unselect"),
|
|
848
|
+
onSelect: (S) => I(v.id, "select"),
|
|
849
|
+
onExclude: (S) => I(v.id, "exclude"),
|
|
850
|
+
"onUpdate:name": (S) => {
|
|
851
|
+
v.name = S, y(d)("tagsChanged", a.value);
|
|
851
852
|
}
|
|
852
853
|
}, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
|
|
853
|
-
|
|
854
|
+
s.tagsEditable && a.value.length < s.tagsMax && a.value.length < 20 ? (k(), b(se, {
|
|
854
855
|
key: 1,
|
|
855
856
|
"data-top-icon": "",
|
|
856
|
-
onClick: j(
|
|
857
|
+
onClick: j(C, ["stop"])
|
|
857
858
|
}, {
|
|
858
|
-
default:
|
|
859
|
-
z(
|
|
859
|
+
default: _(() => [
|
|
860
|
+
z(M(s.$i18n.Common.Add), 1)
|
|
860
861
|
]),
|
|
861
862
|
_: 1
|
|
862
|
-
})) :
|
|
863
|
+
})) : F("", !0)
|
|
863
864
|
]),
|
|
864
865
|
_: 2
|
|
865
866
|
}, [
|
|
866
|
-
|
|
867
|
+
y(r).mode === "setter" && y(r).filters ? {
|
|
867
868
|
name: "header",
|
|
868
|
-
fn:
|
|
869
|
-
|
|
870
|
-
modelValue:
|
|
871
|
-
"onUpdate:modelValue":
|
|
872
|
-
options:
|
|
869
|
+
fn: _(() => [
|
|
870
|
+
L(re, {
|
|
871
|
+
modelValue: p.value,
|
|
872
|
+
"onUpdate:modelValue": c[1] || (c[1] = (v) => p.value = v),
|
|
873
|
+
options: h()
|
|
873
874
|
}, null, 8, ["modelValue", "options"])
|
|
874
875
|
]),
|
|
875
876
|
key: "0"
|
|
876
877
|
} : void 0,
|
|
877
|
-
|
|
878
|
+
y(r).mode === "setter" && y(r).filters ? {
|
|
878
879
|
name: "footer",
|
|
879
|
-
fn:
|
|
880
|
-
|
|
881
|
-
default:
|
|
882
|
-
z(
|
|
880
|
+
fn: _(() => [
|
|
881
|
+
L(Y, { color: "theme" }, {
|
|
882
|
+
default: _(() => [
|
|
883
|
+
z(M(s.$i18n.Common.Cancel), 1)
|
|
883
884
|
]),
|
|
884
885
|
_: 1
|
|
885
886
|
}),
|
|
886
|
-
|
|
887
|
-
onClick:
|
|
888
|
-
tagsIds:
|
|
889
|
-
filters:
|
|
890
|
-
filtersAction:
|
|
891
|
-
payload:
|
|
887
|
+
L(Y, {
|
|
888
|
+
onClick: c[2] || (c[2] = (v) => y(d)("setter", {
|
|
889
|
+
tagsIds: y(r).model.value,
|
|
890
|
+
filters: y(r).filters,
|
|
891
|
+
filtersAction: p.value,
|
|
892
|
+
payload: y(r).payload
|
|
892
893
|
}))
|
|
893
894
|
}, {
|
|
894
|
-
default:
|
|
895
|
-
z(
|
|
895
|
+
default: _(() => [
|
|
896
|
+
z(M(p.value === "add" ? s.$i18n.Common.Add : "") + " " + M(p.value === "replace" ? s.$i18n.Common.Replace : "") + " " + M(p.value === "delete" ? s.$i18n.Common.Remove : ""), 1)
|
|
896
897
|
]),
|
|
897
898
|
_: 1
|
|
898
899
|
})
|
|
@@ -902,74 +903,75 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
902
903
|
]), 1032, ["id", "class"])
|
|
903
904
|
], 64));
|
|
904
905
|
}
|
|
905
|
-
}),
|
|
906
|
-
value:
|
|
907
|
-
title:
|
|
908
|
-
icon:
|
|
909
|
-
content:
|
|
910
|
-
}))),
|
|
911
|
-
|
|
912
|
-
const
|
|
913
|
-
return
|
|
914
|
-
|
|
915
|
-
const
|
|
916
|
-
model:
|
|
917
|
-
mode:
|
|
918
|
-
targetId:
|
|
919
|
-
filters:
|
|
920
|
-
payload:
|
|
906
|
+
}), pt = (t, l) => E(() => ue(t).filter((i) => i.on >= 0 || i.id === l).map((i) => ({
|
|
907
|
+
value: i.id,
|
|
908
|
+
title: i.url + ` [${i.id}]`,
|
|
909
|
+
icon: i.id === ue(l) ? "" : "",
|
|
910
|
+
content: i.name
|
|
911
|
+
}))), ht = (t, l, o) => {
|
|
912
|
+
l || (l = { id: t.id }), l.id = t.id;
|
|
913
|
+
const e = qe.genElPopupOpener("div", l);
|
|
914
|
+
return e.classList.add("top-tagSelector"), t.useTopButton && e.classList.add("top-button", "top-color_theme"), t.mode === "filter" && e.classList.add("top-tagSelector-filter"), t.mode === "setter" && !t.filters && e.classList.add("top-tagSelector-setter_single"), t.mode === "setter" && t.filters && e.classList.add("top-tagSelector-setter_several"), e.onclick = (i) => {
|
|
915
|
+
i.preventDefault(), i.stopPropagation(), e.onclick = null;
|
|
916
|
+
const a = D(t.modelValue), n = {
|
|
917
|
+
model: a,
|
|
918
|
+
mode: t.mode,
|
|
919
|
+
targetId: t.targetId,
|
|
920
|
+
filters: t.filters,
|
|
921
|
+
payload: t.payload
|
|
921
922
|
};
|
|
922
|
-
G(
|
|
923
|
-
|
|
924
|
-
}),
|
|
925
|
-
}, ce(
|
|
926
|
-
|
|
927
|
-
const
|
|
928
|
-
|
|
929
|
-
}), Z(
|
|
930
|
-
},
|
|
923
|
+
G(e, "topTagSelectorTarget", n), delete e.dataset.topPopupDisabled, ce(t.modelValue) || K(a, () => {
|
|
924
|
+
t.modelValue = a.value, Z(e, t, o);
|
|
925
|
+
}), e.click();
|
|
926
|
+
}, ce(t.modelValue) ? K(t.modelValue, () => Z(e, t, o)) : G(e, "topTagSelectorRender", (i) => {
|
|
927
|
+
t.modelValue = i;
|
|
928
|
+
const a = G(e, "topTagSelectorTarget");
|
|
929
|
+
a && (a.model.value = i), Z(e, t, o);
|
|
930
|
+
}), Z(e, t, o), e;
|
|
931
|
+
}, St = (t, l) => {
|
|
932
|
+
var o;
|
|
933
|
+
(o = G(t, "topTagSelectorRender")) == null || o(l);
|
|
934
|
+
}, Z = (t, l, o) => {
|
|
931
935
|
var i;
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
const t = h(a.modelValue);
|
|
936
|
-
if (e.classList.toggle("top-tagSelector-selectedOne", !t.length || t.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", t.length > 5), a.mode === "setter" && a.filters) {
|
|
937
|
-
e.innerHTML = `<div>${i}</div>`;
|
|
936
|
+
const e = y(l.modelValue);
|
|
937
|
+
if (t.classList.toggle("top-tagSelector-selectedOne", !e.length || e.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", e.length > 5), l.mode === "setter" && l.filters) {
|
|
938
|
+
t.innerHTML = `<div>${o}</div>`;
|
|
938
939
|
return;
|
|
939
940
|
}
|
|
940
|
-
if (
|
|
941
|
-
const
|
|
941
|
+
if (t.innerHTML = "", !e.length && l.mode === "filter") {
|
|
942
|
+
const a = ve({
|
|
942
943
|
id: "all",
|
|
943
944
|
colorId: "",
|
|
944
|
-
name: ((
|
|
945
|
+
name: ((i = A().Common) == null ? void 0 : i.All_tags) ?? "",
|
|
945
946
|
state: ""
|
|
946
947
|
});
|
|
947
|
-
|
|
948
|
+
t.append(a);
|
|
948
949
|
}
|
|
949
|
-
|
|
950
|
+
e.forEach((a) => {
|
|
950
951
|
var d, g;
|
|
951
952
|
const n = ve({
|
|
952
|
-
id: H(
|
|
953
|
-
colorId: ((d = ae(
|
|
954
|
-
name: ((g = ae(
|
|
955
|
-
state: H(
|
|
953
|
+
id: H(a),
|
|
954
|
+
colorId: ((d = ae(a, l.tags)) == null ? void 0 : d.color_id) ?? "",
|
|
955
|
+
name: ((g = ae(a, l.tags)) == null ? void 0 : g.name) ?? "",
|
|
956
|
+
state: H(a) === a ? "selected" : "excluded"
|
|
956
957
|
});
|
|
957
|
-
|
|
958
|
+
t.append(n);
|
|
958
959
|
});
|
|
959
|
-
}, ve = (
|
|
960
|
-
const
|
|
961
|
-
return
|
|
962
|
-
},
|
|
960
|
+
}, ve = (t) => {
|
|
961
|
+
const l = document.createElement("div");
|
|
962
|
+
return l.classList.add("top-tagSelector_tagIcon"), l.classList.toggle("top-tagSelector-active", !!t.state), l.classList.toggle("top-tagSelector-excluded", t.state === "excluded"), l.dataset.tag_id = t.id, l.dataset.tag_color_id = t.colorId, l.title = t.name, l;
|
|
963
|
+
}, It = je, xt = at, kt = it, Ct = ke, Tt = le;
|
|
963
964
|
export {
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
965
|
+
It as TopSelectorCompetitors,
|
|
966
|
+
xt as TopSelectorRegion,
|
|
967
|
+
kt as TopTagSelector,
|
|
968
|
+
Ct as TopTagSelectorPopupOpener,
|
|
969
|
+
Tt as TopTagSelectorTagIcon,
|
|
970
|
+
Qe as dialogSelectorRegions,
|
|
971
|
+
He as findRegion,
|
|
972
|
+
ht as genElTopTagSelectorPopupOpener,
|
|
971
973
|
Ie as genSearcherByKey,
|
|
972
|
-
|
|
973
|
-
|
|
974
|
+
St as renderElTopTagSelectorPopupOpener,
|
|
975
|
+
pt as useItemsFromCompetitors
|
|
974
976
|
};
|
|
975
977
|
//# sourceMappingURL=project.js.map
|