@topvisor/ui 1.3.3-piniaTPAPluginClearHash.0 → 1.3.4-0

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.
Files changed (75) hide show
  1. package/.chunks/{core-BrkcXLtM.es.js → core-PgN-H_aP.es.js} +4 -4
  2. package/.chunks/{core-BrkcXLtM.es.js.map → core-PgN-H_aP.es.js.map} +1 -1
  3. package/.chunks/{datepicker-Dfl91fRZ.es.js → datepicker-lHzfJ7vE.es.js} +2 -2
  4. package/.chunks/{datepicker-Dfl91fRZ.es.js.map → datepicker-lHzfJ7vE.es.js.map} +1 -1
  5. package/.chunks/{dialog_selectorRegions-QbGG0L91.es.js → dialog_selectorRegions-Ccsrpo2C.es.js} +55 -53
  6. package/.chunks/{dialog_selectorRegions-QbGG0L91.es.js.map → dialog_selectorRegions-Ccsrpo2C.es.js.map} +1 -1
  7. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-8LLCo4IK.es.js → dialogs.vue_vue_type_script_setup_true_lang-Bei7eCOi.es.js} +2 -2
  8. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-8LLCo4IK.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-Bei7eCOi.es.js.map} +1 -1
  9. package/.chunks/{forms-BWoAyEVH.es.js → forms-CuEEAPvm.es.js} +5 -5
  10. package/.chunks/{forms-BWoAyEVH.es.js.map → forms-CuEEAPvm.es.js.map} +1 -1
  11. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-_3WmLmPV.es.js +186 -0
  12. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js.map → listItem.vue_vue_type_script_setup_true_lang-_3WmLmPV.es.js.map} +1 -1
  13. package/.chunks/{menu.vue_vue_type_style_index_0_lang-HDPVVgzy.es.js → menu.vue_vue_type_style_index_0_lang-Ct0tivnh.es.js} +35 -33
  14. package/.chunks/{menu.vue_vue_type_style_index_0_lang-HDPVVgzy.es.js.map → menu.vue_vue_type_style_index_0_lang-Ct0tivnh.es.js.map} +1 -1
  15. package/.chunks/notice-Aw2dLsyE.es.js +194 -0
  16. package/.chunks/{notice-DYd206Yd.es.js.map → notice-Aw2dLsyE.es.js.map} +1 -1
  17. package/.chunks/{page.vue_vue_type_script_setup_true_lang-B26E2LsY.es.js → page.vue_vue_type_script_setup_true_lang-x02Y0eiE.es.js} +4 -4
  18. package/.chunks/{page.vue_vue_type_script_setup_true_lang-B26E2LsY.es.js.map → page.vue_vue_type_script_setup_true_lang-x02Y0eiE.es.js.map} +1 -1
  19. package/.chunks/{popup-1pqtx_O5.es.js → popup-axQQEyIk.es.js} +2 -2
  20. package/.chunks/{popup-1pqtx_O5.es.js.map → popup-axQQEyIk.es.js.map} +1 -1
  21. package/.chunks/popupHint.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd.js +2 -0
  22. package/.chunks/popupHint.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd.js.map +1 -0
  23. package/.chunks/{utils-Dk7uXZsi.es.js → utils-BHW-ownM.es.js} +2 -2
  24. package/.chunks/{utils-Dk7uXZsi.es.js.map → utils-BHW-ownM.es.js.map} +1 -1
  25. package/.chunks/{utils-C_yz4vdX.es.js → utils-D1fvioEG.es.js} +3 -3
  26. package/.chunks/{utils-C_yz4vdX.es.js.map → utils-D1fvioEG.es.js.map} +1 -1
  27. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-Cr_jgOW4.es.js → widgetInput.vue_vue_type_script_setup_true_lang-IWJIVl4_.es.js} +2 -2
  28. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-Cr_jgOW4.es.js.map → widgetInput.vue_vue_type_script_setup_true_lang-IWJIVl4_.es.js.map} +1 -1
  29. package/assets/project.css +1 -1
  30. package/charts/charts.js +62 -60
  31. package/charts/charts.js.map +1 -1
  32. package/core/app.amd.js +1 -1
  33. package/core/app.amd.js.map +1 -1
  34. package/core/app.js +26 -26
  35. package/core/app.js.map +1 -1
  36. package/dialog/dialog.js +2 -2
  37. package/extra/extra.js +22 -20
  38. package/extra/extra.js.map +1 -1
  39. package/forms/forms.js +1 -1
  40. package/formsExt/formsExt.amd.js +1 -1
  41. package/formsExt/formsExt.amd.js.map +1 -1
  42. package/formsExt/formsExt.js +115 -113
  43. package/formsExt/formsExt.js.map +1 -1
  44. package/layout/layout.js +37 -35
  45. package/layout/layout.js.map +1 -1
  46. package/package.json +1 -1
  47. package/popup/popup.amd.js +1 -1
  48. package/popup/popup.amd.js.map +1 -1
  49. package/popup/popup.js +9 -4
  50. package/popup/worker.js +2 -2
  51. package/project/project.amd.js +1 -1
  52. package/project/project.amd.js.map +1 -1
  53. package/project/project.js +253 -248
  54. package/project/project.js.map +1 -1
  55. package/src/components/project/tagSelector/popupOpener/types.d.ts +6 -3
  56. package/src/components/project/tagSelector/tagSelector.vue.d.ts +1 -0
  57. package/src/components/project/tagSelector/types.d.ts +9 -2
  58. package/src/components/project/tagSelector/utils/el.d.ts +3 -3
  59. package/tabs/tabs.js +28 -26
  60. package/tabs/tabs.js.map +1 -1
  61. package/tabsView/tabsView.amd.js +1 -1
  62. package/tabsView/tabsView.amd.js.map +1 -1
  63. package/tabsView/tabsView.js +67 -65
  64. package/tabsView/tabsView.js.map +1 -1
  65. package/utils/clipboard.js +1 -1
  66. package/utils/date.js +1 -1
  67. package/utils/device.js +1 -1
  68. package/utils/lodash.js +1 -1
  69. package/utils/price.js +1 -1
  70. package/utils/searchers.js +3 -3
  71. package/utils/string.js +1 -1
  72. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js +0 -184
  73. package/.chunks/notice-DYd206Yd.es.js +0 -192
  74. package/.chunks/popupHint.vue_vue_type_style_index_0_lang-BCpRWeKK.amd.js +0 -2
  75. package/.chunks/popupHint.vue_vue_type_style_index_0_lang-BCpRWeKK.amd.js.map +0 -1
@@ -1,15 +1,17 @@
1
- import { Core as _e } from "../core/app.js";
2
- import { defineComponent as P, mergeModels as N, useModel as D, computed as E, createElementBlock as B, openBlock as k, createBlock as b, unref as y, withCtx as _, Fragment as Y, renderList as se, normalizeClass as X, createElementVNode as he, toDisplayString as K, createVNode as A, createTextVNode as G, toValue as de, ref as F, watch as w, createCommentVNode as q, isRef as ce, withModifiers as z, mergeProps as Se, withKeys as ge, nextTick as Be, resolveDirective as Ve, withDirectives as Ee, resolveDynamicComponent as Me, renderSlot as Ke, shallowRef as $e, createSlots as we, reactive as Le } from "vue";
3
- import { u as R, C as J, c as H, o as re, d as Ae } from "../.chunks/forms-BWoAyEVH.es.js";
4
- import { _ as Ie, b as ue, a as Re } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js";
5
- import { _ as Oe } from "../.chunks/menu.vue_vue_type_style_index_0_lang-HDPVVgzy.es.js";
6
- import { u as Ne } from "../.chunks/utils-Dk7uXZsi.es.js";
7
- import { getSearcherGIcon as De, getLangLabel as Fe, getDeviceGIcon as qe } from "../utils/searchers.js";
1
+
2
+ import { Core as _autoloadCSSCore } from '../core/app.js';
3
+ const fileNames = ['../assets/project.css'].map(fileName => import.meta.resolve(fileName));
4
+ _autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
5
+
6
+ import { defineComponent as U, mergeModels as N, useModel as D, computed as E, createElementBlock as b, openBlock as k, createBlock as _, unref as y, withCtx as B, Fragment as Y, renderList as se, normalizeClass as X, createElementVNode as he, toDisplayString as K, createVNode as A, createTextVNode as G, toValue as de, ref as F, watch as w, createCommentVNode as q, isRef as ce, withModifiers as J, mergeProps as Se, withKeys as ge, nextTick as Be, resolveDirective as _e, withDirectives as be, resolveDynamicComponent as Ve, renderSlot as Ee, shallowRef as Me, createSlots as Ke, reactive as $e } from "vue";
7
+ import { u as R, C as j, c as H, o as re, d as we } from "../.chunks/forms-CuEEAPvm.es.js";
8
+ import { _ as Ie, b as ue, a as Le } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-_3WmLmPV.es.js";
9
+ import { _ as Ae } from "../.chunks/menu.vue_vue_type_style_index_0_lang-Ct0tivnh.es.js";
10
+ import { u as Re } from "../.chunks/utils-BHW-ownM.es.js";
11
+ import { getSearcherGIcon as Oe, getLangLabel as Ne, getDeviceGIcon as De } from "../utils/searchers.js";
8
12
  import { storage as W } from "../utils/dom.js";
9
- import { TopPopupWorker as Pe } from "../popup/worker.js";
10
- const be = ["../assets/project.css"].map((t) => import.meta.resolve(t));
11
- _e.insertCSSLinkToPage(be, !0);
12
- const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }, yt = /* @__PURE__ */ P({
13
+ import { TopPopupWorker as Fe } from "../popup/worker.js";
14
+ const qe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }, mt = /* @__PURE__ */ U({
13
15
  __name: "selectorCompetitors",
14
16
  props: /* @__PURE__ */ N({
15
17
  modelValue: {},
@@ -21,7 +23,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
21
23
  }),
22
24
  emits: ["update:modelValue"],
23
25
  setup(t) {
24
- const l = t, o = D(t, "modelValue"), e = E(() => {
26
+ const l = t, n = D(t, "modelValue"), e = E(() => {
25
27
  if (l.showSelectAllItem)
26
28
  return {
27
29
  icon: "",
@@ -30,50 +32,50 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
30
32
  content: ""
31
33
  };
32
34
  });
33
- return (i, a) => (k(), B("div", Ue, [
34
- y(J).state.isMobile ? (k(), b(Ie, { key: 0 }, {
35
- opener: _(() => [
35
+ return (i, a) => (k(), b("div", qe, [
36
+ y(j).state.isMobile ? (k(), _(Ie, { key: 0 }, {
37
+ opener: B(() => [
36
38
  A(H, {
37
39
  class: "top-selectorCompetitors_opener",
38
40
  color: "theme",
39
41
  icon: "",
40
42
  icon2: ""
41
43
  }, {
42
- default: _(() => {
43
- var n;
44
+ default: B(() => {
45
+ var o;
44
46
  return [
45
- G(K((n = i.items.find((u) => {
47
+ G(K((o = i.items.find((u) => {
46
48
  var f;
47
- return u.value === ((f = o.value) == null ? void 0 : f[0]);
48
- })) == null ? void 0 : n.content), 1)
49
+ return u.value === ((f = n.value) == null ? void 0 : f[0]);
50
+ })) == null ? void 0 : o.content), 1)
49
51
  ];
50
52
  }),
51
53
  _: 1
52
54
  })
53
55
  ]),
54
- contentList: _(() => [
55
- (k(!0), B(Y, null, se(i.items, (n) => {
56
+ contentList: B(() => [
57
+ (k(!0), b(Y, null, se(i.items, (o) => {
56
58
  var u;
57
- return k(), b(ue, {
59
+ return k(), _(ue, {
58
60
  class: X({
59
- "top-active": (u = o.value) == null ? void 0 : u.includes(n.value)
61
+ "top-active": (u = n.value) == null ? void 0 : u.includes(o.value)
60
62
  }),
61
- "data-top-icon": n.icon,
62
- title: n.title,
63
- onClick: () => o.value = [n.value]
63
+ "data-top-icon": o.icon,
64
+ title: o.title,
65
+ onClick: () => n.value = [o.value]
64
66
  }, {
65
- default: _(() => [
66
- he("span", je, K(n.content), 1)
67
+ default: B(() => [
68
+ he("span", Ue, K(o.content), 1)
67
69
  ]),
68
70
  _: 2
69
71
  }, 1032, ["class", "data-top-icon", "title", "onClick"]);
70
72
  }), 256))
71
73
  ]),
72
74
  _: 1
73
- })) : (k(), b(Oe, {
75
+ })) : (k(), _(Ae, {
74
76
  key: 1,
75
- modelValue: o.value,
76
- "onUpdate:modelValue": a[0] || (a[0] = (n) => o.value = n),
77
+ modelValue: n.value,
78
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => n.value = o),
77
79
  items: i.items,
78
80
  isMultiple: !0,
79
81
  styling: "bar",
@@ -82,12 +84,12 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
82
84
  }, null, 8, ["modelValue", "items", "selectAllItem"]))
83
85
  ]));
84
86
  }
85
- }), pt = (t, l) => E(() => de(t).filter((i) => i.on >= 0 || i.id === l).map((i) => ({
87
+ }), ft = (t, l) => E(() => de(t).filter((i) => i.on >= 0 || i.id === l).map((i) => ({
86
88
  value: i.id,
87
89
  title: i.url + ` [${i.id}]`,
88
90
  icon: i.id === de(l) ? "" : "",
89
91
  content: i.name
90
- }))), M = -1, p = -2, te = -1, ze = {
92
+ }))), M = -1, p = -2, te = -1, Pe = {
91
93
  0: "Yandex",
92
94
  1: "Google",
93
95
  4: "YouTube",
@@ -106,15 +108,15 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
106
108
  name: "--",
107
109
  regions: [me],
108
110
  regionByIndex: /* @__PURE__ */ new Map([[p, me]])
109
- }, ae = {
111
+ }, le = {
110
112
  key: p,
111
113
  name: "Autoselect",
112
114
  index: p
113
- }, oe = {
115
+ }, ne = {
114
116
  key: p,
115
117
  name: "Autoselect",
116
- regions: [ae],
117
- regionByIndex: /* @__PURE__ */ new Map([[p, ae]])
118
+ regions: [le],
119
+ regionByIndex: /* @__PURE__ */ new Map([[p, le]])
118
120
  }, fe = {
119
121
  countryCode: "00",
120
122
  depth: 1,
@@ -123,72 +125,72 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
123
125
  index: te,
124
126
  lang: "ru",
125
127
  name: "Without region"
126
- }, Je = () => (ae.name = R().Common.Autoselect, ae), Ge = () => (Je(), oe.name = R().Common.Autoselect, console.log(oe), oe), We = () => (fe.name = R().Keywords.Without_region, fe), ke = (t = !1, l = !1, o = []) => {
128
+ }, ze = () => (le.name = R().Common.Autoselect, le), Je = () => (ze(), ne.name = R().Common.Autoselect, console.log(ne), ne), je = () => (fe.name = R().Keywords.Without_region, fe), ke = (t = !1, l = !1, n = []) => {
127
129
  let e;
128
- return t ? e = Ye(o) : e = Ce(o), l && e.set(p, Ge()), e.size || e.set(p, xe), e;
129
- }, Ce = (t, l = !0, o = [], e = !1) => {
130
+ return t ? e = Ge(n) : e = Te(n), l && e.set(p, Je()), e.size || e.set(p, xe), e;
131
+ }, Te = (t, l = !0, n = [], e = !1) => {
130
132
  const i = /* @__PURE__ */ new Map();
131
133
  return t.forEach((a) => {
132
134
  if (!a.enabled || e && typeof a.key == "number" && a.key > 1) return;
133
- const n = { ...a };
134
- n.regionByIndex = /* @__PURE__ */ new Map(), a.regions && a.regions.forEach((u) => {
135
+ const o = { ...a };
136
+ o.regionByIndex = /* @__PURE__ */ new Map(), a.regions && a.regions.forEach((u) => {
135
137
  if (l && !u.enabled) return;
136
138
  const f = { ...u };
137
- n.regionByIndex.set(f.index, f);
138
- }), !n.regionByIndex.size && o.length, // режим вывода ПС без регионов
139
+ o.regionByIndex.set(f.index, f);
140
+ }), !o.regionByIndex.size && n.length, // режим вывода ПС без регионов
139
141
  (!a.regions || // есть включенные регионы
140
- n.regionByIndex.size || // запрошен вывод конкретных ПС
141
- o.length) && typeof n.key == "number" && i.set(n.key, n);
142
- }), o.forEach((a) => {
142
+ o.regionByIndex.size || // запрошен вывод конкретных ПС
143
+ n.length) && typeof o.key == "number" && i.set(o.key, o);
144
+ }), n.forEach((a) => {
143
145
  if (i.has(a)) return;
144
- const n = {
146
+ const o = {
145
147
  key: a,
146
- name: ze[a],
148
+ name: Pe[a],
147
149
  regions: [],
148
150
  regionByIndex: /* @__PURE__ */ new Map()
149
151
  };
150
- i.set(n.key, n);
152
+ i.set(o.key, o);
151
153
  }), i;
152
- }, Ye = (t) => {
153
- const l = Ce(t, !1, [0, 1], !0);
154
+ }, Ge = (t) => {
155
+ const l = Te(t, !1, [0, 1], !0);
154
156
  if (l.has(2)) {
155
- const o = l.get(2);
156
- o && (o.regionByIndex = /* @__PURE__ */ new Map());
157
+ const n = l.get(2);
158
+ n && (n.regionByIndex = /* @__PURE__ */ new Map());
157
159
  }
158
- return l.forEach((o) => {
159
- if (!o.regionByIndex) return;
160
- const e = { ...We() };
161
- o.regionByIndex.set(e.index, e);
160
+ return l.forEach((n) => {
161
+ if (!n.regionByIndex) return;
162
+ const e = { ...je() };
163
+ n.regionByIndex.set(e.index, e);
162
164
  }), l;
163
- }, He = (t, l, o = []) => {
164
- const e = ke(t, !1, o);
165
+ }, We = (t, l, n = []) => {
166
+ const e = ke(t, !1, n);
165
167
  let i;
166
168
  return e.forEach((a) => {
167
- if (!(l.searcher_key !== void 0 && l.searcher_key != a.key) && a.regions && (a.regions.forEach((n) => {
168
- 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)))
169
- return n.searcher_key = a.key, i = n, !1;
169
+ if (!(l.searcher_key !== void 0 && l.searcher_key != a.key) && a.regions && (a.regions.forEach((o) => {
170
+ if (!i && !(l.key !== void 0 && l.key != o.key) && !(l.index !== void 0 && l.index != o.index) && !(!t && (l.lang !== void 0 && l.lang != o.lang || l.device !== void 0 && l.device != o.device)))
171
+ return o.searcher_key = a.key, i = o, !1;
170
172
  }), i))
171
173
  return !1;
172
174
  }), i;
173
- }, Qe = Ne(() => import("../.chunks/dialog_selectorRegions-QbGG0L91.es.js")), Xe = (t, l) => {
174
- const o = R(), e = F(l.value.keys().next().value ?? p), i = E(() => {
175
+ }, Ye = Re(() => import("../.chunks/dialog_selectorRegions-Ccsrpo2C.es.js")), He = (t, l) => {
176
+ const n = R(), e = F(l.value.keys().next().value ?? p), i = E(() => {
175
177
  const a = /* @__PURE__ */ new Map();
176
- if (l.value.forEach((n) => {
178
+ if (l.value.forEach((o) => {
177
179
  let u = {
178
- value: n.key,
179
- title: n.name
180
+ value: o.key,
181
+ title: o.name
180
182
  };
181
- t.addSearcherIcon && (u.icon = De(n.key)), a.set(n.key, u);
183
+ t.addSearcherIcon && (u.icon = Oe(o.key)), a.set(o.key, u);
182
184
  }), t.addCompare && !a.has(p)) {
183
- const n = {
185
+ const o = {
184
186
  value: "",
185
187
  title: "--------------------",
186
188
  disabled: !0
187
189
  };
188
- a.set(n.value, n);
190
+ a.set(o.value, o);
189
191
  const u = {
190
192
  value: M,
191
- title: o.Common.Compare
193
+ title: n.Common.Compare
192
194
  };
193
195
  a.set(u.value, u);
194
196
  }
@@ -198,10 +200,10 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
198
200
  searcherKey: e,
199
201
  optionBySearcherKey: i
200
202
  };
201
- }, Ze = (t, l) => {
202
- var a, n, u;
203
- const o = R(), e = F(p);
204
- t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === p && (t.forFrequency ? e.value = ((n = (a = l.value) == null ? void 0 : a.regionByIndex.values().next().value) == null ? void 0 : n.key) ?? p : e.value = ((u = l.value) == null ? void 0 : u.regionByIndex.keys().next().value) ?? p);
203
+ }, Qe = (t, l) => {
204
+ var a, o, u;
205
+ const n = R(), e = F(p);
206
+ t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === p && (t.forFrequency ? e.value = ((o = (a = l.value) == null ? void 0 : a.regionByIndex.values().next().value) == null ? void 0 : o.key) ?? p : e.value = ((u = l.value) == null ? void 0 : u.regionByIndex.keys().next().value) ?? p);
205
207
  const i = E(() => {
206
208
  var h;
207
209
  const f = /* @__PURE__ */ new Map();
@@ -215,13 +217,13 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
215
217
  f.has(S.key) || f.set(S.key, x);
216
218
  return;
217
219
  }
218
- S.device && (r += " (" + o.Common["Device_" + S.device] + ")");
219
- const g = Fe(l.value.key || 0, S.lang ?? "");
220
+ S.device && (r += " (" + n.Common["Device_" + S.device] + ")");
221
+ const g = Ne(l.value.key || 0, S.lang ?? "");
220
222
  g && (r += " / " + g);
221
223
  const d = {
222
224
  value: S.index,
223
225
  title: r,
224
- icon: S.device ? qe(S.device) : void 0
226
+ icon: S.device ? De(S.device) : void 0
225
227
  };
226
228
  f.set(S.index, d);
227
229
  }), f;
@@ -236,40 +238,40 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
236
238
  return;
237
239
  }
238
240
  let r = ((d = h == null ? void 0 : h.get(e.value)) == null ? void 0 : d.title) || "", g = -1;
239
- for (const [x, T] of f.entries()) {
240
- const C = T.title;
241
- if (typeof C != "string" || typeof x == "string")
241
+ for (const [x, C] of f.entries()) {
242
+ const T = C.title;
243
+ if (typeof T != "string" || typeof x == "string")
242
244
  break;
243
- if (C === r) {
245
+ if (T === r) {
244
246
  S = x;
245
247
  break;
246
248
  }
247
- const V = new RegExp(` \\((${o.Common.Device_1}|${o.Common.Device_2})\\)`);
249
+ const V = new RegExp(` \\((${n.Common.Device_1}|${n.Common.Device_2})\\)`);
248
250
  let m = r, s = 3;
249
- C.indexOf(m) === -1 && (m = r.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(m) === -1 && (m = r.replace(/ \/.*/, ""), s--), C.indexOf(m) === -1 && (m = r.replace(/ \/.*/, ""), m = m.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(m) !== -1 && (s <= g || (g = s, S = x));
251
+ T.indexOf(m) === -1 && (m = r.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), T.indexOf(m) === -1 && (m = r.replace(/ \/.*/, ""), s--), T.indexOf(m) === -1 && (m = r.replace(/ \/.*/, ""), m = m.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), T.indexOf(m) !== -1 && (s <= g || (g = s, S = x));
250
252
  }
251
253
  e.value = S;
252
254
  }), {
253
255
  regionIndex: e,
254
256
  optionByRegionIndex: i
255
257
  };
256
- }, et = (t, l, o) => {
258
+ }, Xe = (t, l, n) => {
257
259
  const e = F([]), i = () => {
258
260
  if (t.onlySearcher && l.value) {
259
261
  e.value = Array.from(l.value.keys());
260
262
  return;
261
263
  }
262
- let n = [];
264
+ let o = [];
263
265
  if (t.modelValue.length > 1)
264
- n = [...t.modelValue];
266
+ o = [...t.modelValue];
265
267
  else
266
268
  try {
267
- n = JSON.parse(
269
+ o = JSON.parse(
268
270
  localStorage.getItem("ui:project:regionSelector" + t.projectId + ":regionsIndexes")
269
271
  ) ?? [];
270
272
  } catch {
271
273
  }
272
- n.length && (n = n.filter((u) => o.value.has(u))), n.length || (n = Array.from(o.value)), e.value = [...n];
274
+ o.length && (o = o.filter((u) => n.value.has(u))), o.length || (o = Array.from(n.value)), e.value = [...o];
273
275
  }, a = () => {
274
276
  e.value.length ? localStorage.setItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes", JSON.stringify(e.value)) : localStorage.removeItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes");
275
277
  };
@@ -278,32 +280,32 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
278
280
  }), t.addCompare && i(), {
279
281
  regionsIndexes: e
280
282
  };
281
- }, tt = (t) => {
282
- const l = E(() => ke(t.forFrequency, t.autoRegion, t.searchers)), o = E(() => l.value.get(i.searcherKey.value) || xe), e = E(() => {
283
+ }, Ze = (t) => {
284
+ const l = E(() => ke(t.forFrequency, t.autoRegion, t.searchers)), n = E(() => l.value.get(i.searcherKey.value) || xe), e = E(() => {
283
285
  const r = /* @__PURE__ */ new Set();
284
286
  return l.value.forEach((g) => {
285
287
  g.regionByIndex.forEach((d) => {
286
288
  d.index !== te && d.index !== p && r.add(d.index);
287
289
  });
288
290
  }), r;
289
- }), i = Xe(t, l), a = Ze(t, o), n = et(t, l, e);
291
+ }), i = He(t, l), a = Qe(t, n), o = Xe(t, l, e);
290
292
  w(l, () => {
291
- var g, d, x, T;
292
- 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 === M) return;
293
+ var g, d, x, C;
294
+ if (t.onlySearcher ? o.regionsIndexes.value = Array.from(l.value.keys()) : o.regionsIndexes.value = o.regionsIndexes.value.filter((T) => e.value.has(T)), i.searcherKey.value === M) return;
293
295
  let r = l.value.keys().next().value;
294
- l.value.forEach((C) => {
296
+ l.value.forEach((T) => {
295
297
  var V, m, s;
296
- if (t.onlySearcher && C.key === i.searcherKey.value) {
298
+ if (t.onlySearcher && T.key === i.searcherKey.value) {
297
299
  r = i.searcherKey.value;
298
300
  return;
299
301
  }
300
- if (a.regionIndex.value && ((V = C.regionByIndex) != null && V.has(a.regionIndex.value)) && (r = C.key), !t.onlySearcher) {
302
+ if (a.regionIndex.value && ((V = T.regionByIndex) != null && V.has(a.regionIndex.value)) && (r = T.key), !t.onlySearcher) {
301
303
  let c;
302
304
  r !== void 0 && (c = (m = l.value.get(r)) == null ? void 0 : m.regionByIndex);
303
- const v = (s = l.value.get(C.key)) == null ? void 0 : s.regionByIndex;
304
- c != null && c.has(p) && !(v != null && v.has(p)) && (r = C.key);
305
+ const v = (s = l.value.get(T.key)) == null ? void 0 : s.regionByIndex;
306
+ c != null && c.has(p) && !(v != null && v.has(p)) && (r = T.key);
305
307
  }
306
- }), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((d = (g = o.value) == null ? void 0 : g.regionByIndex) != null && d.has(a.regionIndex.value)) && (a.regionIndex.value = (T = (x = o.value) == null ? void 0 : x.regions) == null ? void 0 : T.keys().next().value);
308
+ }), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((d = (g = n.value) == null ? void 0 : g.regionByIndex) != null && d.has(a.regionIndex.value)) && (a.regionIndex.value = (C = (x = n.value) == null ? void 0 : x.regions) == null ? void 0 : C.keys().next().value);
307
309
  }, { immediate: !0 });
308
310
  const u = () => {
309
311
  if (!(i.searcherKey.value === M || i.searcherKey.value === p))
@@ -312,7 +314,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
312
314
  if (t.onlySearcher || a.regionIndex.value === p) return;
313
315
  let r = a.regionIndex.value;
314
316
  if (t.forFrequency) {
315
- const g = a.regionIndex.value, d = He(t.forFrequency, { searcher_key: u(), key: g }, t.searchers);
317
+ const g = a.regionIndex.value, d = We(t.forFrequency, { searcher_key: u(), key: g }, t.searchers);
316
318
  r = d == null ? void 0 : d.index;
317
319
  }
318
320
  return r;
@@ -324,7 +326,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
324
326
  return {
325
327
  selectSearcher: i,
326
328
  selectRegion: a,
327
- compare: n,
329
+ compare: o,
328
330
  searcherByKey: l,
329
331
  allRegionsIndexes: e,
330
332
  getSearcher: h,
@@ -335,7 +337,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
335
337
  return (d = (g = h()) == null ? void 0 : g.regionByIndex) == null ? void 0 : d.get(r);
336
338
  }
337
339
  };
338
- }, ht = /* @__PURE__ */ P({
340
+ }, vt = /* @__PURE__ */ U({
339
341
  __name: "selectorRegion",
340
342
  props: /* @__PURE__ */ N({
341
343
  projectId: {},
@@ -357,42 +359,42 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
357
359
  }),
358
360
  emits: ["update:modelValue", "update:modelValueSingle"],
359
361
  setup(t, { expose: l }) {
360
- const o = t, e = D(t, "modelValue"), i = D(t, "modelValueSingle"), {
362
+ const n = t, e = D(t, "modelValue"), i = D(t, "modelValueSingle"), {
361
363
  selectSearcher: a,
362
- selectRegion: n,
364
+ selectRegion: o,
363
365
  compare: u,
364
366
  searcherByKey: f,
365
367
  allRegionsIndexes: h,
366
368
  getSearcher: S,
367
369
  getRegion: r
368
- } = tt(o), g = () => {
370
+ } = Ze(n), g = () => {
369
371
  const d = [];
370
372
  f.value.forEach((x) => {
371
- x.enabled && x.regions.forEach((T) => {
372
- T.enabled && d.push(T);
373
+ x.enabled && x.regions.forEach((C) => {
374
+ C.enabled && d.push(C);
373
375
  });
374
- }), Qe.open("selectorRegions", {
376
+ }), Ye.open("selectorRegions", {
375
377
  regions: d,
376
378
  regionsIndexes: u.regionsIndexes.value,
377
379
  "@update:regionsIndexes": (x) => u.regionsIndexes.value = x
378
380
  });
379
381
  };
380
- return w([n.regionIndex, a.searcherKey, u.regionsIndexes], () => {
382
+ return w([o.regionIndex, a.searcherKey, u.regionsIndexes], () => {
381
383
  if (a.searcherKey.value === M && u.regionsIndexes.value.length) {
382
384
  if (JSON.stringify(e.value) === JSON.stringify(u.regionsIndexes.value))
383
385
  return;
384
386
  e.value = [...u.regionsIndexes.value];
385
387
  } else
386
- o.onlySearcher ? (e.value = [a.searcherKey.value], a.searcherKey.value === p && !o.autoRegion && (e.value.length = 0)) : (e.value = [n.regionIndex.value], n.regionIndex.value === p && !o.autoRegion && (e.value.length = 0));
387
- !o.onlySearcher && !h.value.size && (a.searcherKey.value = p);
388
+ n.onlySearcher ? (e.value = [a.searcherKey.value], a.searcherKey.value === p && !n.autoRegion && (e.value.length = 0)) : (e.value = [o.regionIndex.value], o.regionIndex.value === p && !n.autoRegion && (e.value.length = 0));
389
+ !n.onlySearcher && !h.value.size && (a.searcherKey.value = p);
388
390
  }), i.value && w(i, () => {
389
391
  i.value && (e.value = [i.value]);
390
392
  }, { immediate: !0 }), w(e, () => {
391
- var d, x, T, C, V;
392
- if (e.value[0] && (i.value = e.value[0]), o.onlySearcher) {
393
- if (!e.value.length || e.value.length === 1 && !f.value.has(e.value[0]) || e.value.length === 1 && e.value[0] === p && !o.autoRegion) {
393
+ var d, x, C, T, V;
394
+ if (e.value[0] && (i.value = e.value[0]), n.onlySearcher) {
395
+ if (!e.value.length || e.value.length === 1 && !f.value.has(e.value[0]) || e.value.length === 1 && e.value[0] === p && !n.autoRegion) {
394
396
  let m = f.value.keys().next().value;
395
- m === p && !o.autoRegion && (m = void 0, i.value = p), m !== void 0 ? e.value = [m] : e.value.length = 0;
397
+ m === p && !n.autoRegion && (m = void 0, i.value = p), m !== void 0 ? e.value = [m] : e.value.length = 0;
396
398
  return;
397
399
  }
398
400
  if (e.value.length > 1 && JSON.stringify(e.value) !== JSON.stringify(u.regionsIndexes.value)) {
@@ -401,11 +403,11 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
401
403
  }
402
404
  } else {
403
405
  let m = [...new Set(e.value)], s = (x = (d = f.value.values().next().value) == null ? void 0 : d.regionByIndex) == null ? void 0 : x.keys().next().value;
404
- if (o.forFrequency && (s = (V = (C = (T = f.value.values().next().value) == null ? void 0 : T.regionByIndex) == null ? void 0 : C.values().next().value) == null ? void 0 : V.key), s === p && !o.autoRegion && (s = void 0, i.value = p), !m.length)
406
+ if (n.forFrequency && (s = (V = (T = (C = f.value.values().next().value) == null ? void 0 : C.regionByIndex) == null ? void 0 : T.values().next().value) == null ? void 0 : V.key), s === p && !n.autoRegion && (s = void 0, i.value = p), !m.length)
405
407
  s !== void 0 && m.push(s);
406
408
  else if (m.length === 1) {
407
409
  let c = h.value;
408
- o.forFrequency && (c = /* @__PURE__ */ new Set(), f.value.forEach((v) => {
410
+ n.forFrequency && (c = /* @__PURE__ */ new Set(), f.value.forEach((v) => {
409
411
  v.regionByIndex.forEach((I) => {
410
412
  I.index !== te && I.index !== p && c.add(I.key);
411
413
  });
@@ -417,8 +419,8 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
417
419
  return;
418
420
  }
419
421
  }
420
- if (!(e.value.length === 1 && e.value[0] === (o.onlySearcher ? a.searcherKey.value : n.regionIndex.value)))
421
- if (o.onlySearcher) {
422
+ if (!(e.value.length === 1 && e.value[0] === (n.onlySearcher ? a.searcherKey.value : o.regionIndex.value)))
423
+ if (n.onlySearcher) {
422
424
  if (e.value.length === 1) {
423
425
  a.searcherKey.value = e.value[0];
424
426
  return;
@@ -429,11 +431,11 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
429
431
  if (!e.value.length)
430
432
  return;
431
433
  if (e.value.length === 1 && a.searcherKey.value !== M) {
432
- n.regionIndex.value = e.value[0];
434
+ o.regionIndex.value = e.value[0];
433
435
  let m;
434
436
  for (const s of f.value.values()) {
435
437
  for (const c of s.regionByIndex.values())
436
- if ((o.forFrequency ? c.key : c.index) === n.regionIndex.value) {
438
+ if ((n.forFrequency ? c.key : c.index) === o.regionIndex.value) {
437
439
  m = s.key;
438
440
  break;
439
441
  }
@@ -447,7 +449,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
447
449
  }, { immediate: !0 }), l({
448
450
  getSearcher: S,
449
451
  getRegion: r
450
- }), (d, x) => (k(), B("div", {
452
+ }), (d, x) => (k(), b("div", {
451
453
  class: X({
452
454
  "top-selectorRegion": !0,
453
455
  "top-selectorRegion-onlySearcher": d.onlySearcher
@@ -456,66 +458,66 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
456
458
  A(re, {
457
459
  options: y(a).optionBySearcherKey.value,
458
460
  modelValue: y(a).searcherKey.value,
459
- "onUpdate:modelValue": x[0] || (x[0] = (T) => y(a).searcherKey.value = T),
461
+ "onUpdate:modelValue": x[0] || (x[0] = (C) => y(a).searcherKey.value = C),
460
462
  name: "searcher_key",
461
463
  addChanger: d.addChanger
462
464
  }, null, 8, ["options", "modelValue", "addChanger"]),
463
- !d.onlySearcher && y(a).searcherKey.value !== y(M) ? (k(), b(re, {
465
+ !d.onlySearcher && y(a).searcherKey.value !== y(M) ? (k(), _(re, {
464
466
  key: 0,
465
467
  class: "top-select-region",
466
- options: y(n).optionByRegionIndex.value,
467
- modelValue: y(n).regionIndex.value,
468
- "onUpdate:modelValue": x[1] || (x[1] = (T) => y(n).regionIndex.value = T),
468
+ options: y(o).optionByRegionIndex.value,
469
+ modelValue: y(o).regionIndex.value,
470
+ "onUpdate:modelValue": x[1] || (x[1] = (C) => y(o).regionIndex.value = C),
469
471
  name: d.forFrequency ? "region_key" : "region_index",
470
472
  addChanger: d.addChanger,
471
473
  "data-top-icon": d.addRegionIcon ? "" : void 0
472
474
  }, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : q("", !0),
473
- d.addCompare && !d.onlySearcher && y(a).searcherKey.value === y(M) ? (k(), b(H, {
475
+ d.addCompare && !d.onlySearcher && y(a).searcherKey.value === y(M) ? (k(), _(H, {
474
476
  key: 1,
475
477
  name: "compare",
476
478
  onClick: g,
477
479
  "data-count-compare-regions-indexes": y(u).regionsIndexes.value.length
478
480
  }, {
479
- default: _(() => [
481
+ default: B(() => [
480
482
  G(K(d.$i18n.Common.Selected_regions), 1)
481
483
  ]),
482
484
  _: 1
483
485
  }, 8, ["data-count-compare-regions-indexes"])) : q("", !0)
484
486
  ], 2));
485
487
  }
486
- }), ve = (t) => "-" + t, Q = (t) => t[0] === "-" ? t.substring(1) : t, le = (t, l) => {
488
+ }), ve = (t) => "-" + t, Q = (t) => t[0] === "-" ? t.substring(1) : t, ae = (t, l) => {
487
489
  t = Q(t);
488
- const o = l.find((e) => e.id === t);
489
- if (o)
490
- return o;
491
- }, St = (t, l, o) => {
492
- l || (l = { id: t.id }), l.id = t.id;
493
- const e = Pe.genElPopupOpener("div", l);
494
- 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) => {
490
+ const n = l.find((e) => e.id === t);
491
+ if (n)
492
+ return n;
493
+ }, yt = (t, l, n) => {
494
+ l || (l = { id: t.id }), l.id = t.id, l.pos ??= "3", l.notch ??= !0, l.posBy ??= "fixed";
495
+ const e = Fe.genElPopupOpener("div", l);
496
+ return e.classList.add("top-tagSelector"), t.useTopButton && e.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), t.useTopButton || e.classList.add("top-tagSelector-custom"), 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) => {
495
497
  i.preventDefault(), i.stopPropagation(), e.onclick = null;
496
- const a = F(t.modelValue), n = {
498
+ const a = F(t.modelValue), o = {
497
499
  model: a,
498
500
  mode: t.mode,
499
501
  targetId: t.targetId,
500
502
  filters: t.filters,
501
503
  payload: t.payload
502
504
  };
503
- W(e, "topTagSelectorTarget", n), delete e.dataset.topPopupDisabled, ce(t.modelValue) || w(a, () => {
504
- t.modelValue = a.value, ee(e, t, o);
505
+ W(e, "topTagSelectorTarget", o), delete e.dataset.topPopupDisabled, ce(t.modelValue) || w(a, () => {
506
+ t.modelValue = a.value, ee(e, t, n);
505
507
  }), e.click();
506
- }, ce(t.modelValue) ? w(t.modelValue, () => ee(e, t, o)) : W(e, "topTagSelectorRender", (i) => {
508
+ }, ce(t.modelValue) ? w(t.modelValue, () => ee(e, t, n)) : W(e, "topTagSelectorRender", (i) => {
507
509
  t.modelValue = i;
508
510
  const a = W(e, "topTagSelectorTarget");
509
- a && (a.model.value = i), ee(e, t, o);
510
- }), ee(e, t, o), e;
511
- }, It = (t, l) => {
512
- var o;
513
- (o = W(t, "topTagSelectorRender")) == null || o(l);
514
- }, ee = (t, l, o) => {
511
+ a && (a.model.value = i), ee(e, t, n);
512
+ }), ee(e, t, n), e;
513
+ }, pt = (t, l) => {
514
+ var n;
515
+ (n = W(t, "topTagSelectorRender")) == null || n(l);
516
+ }, ee = (t, l, n) => {
515
517
  var i;
516
518
  const e = y(l.modelValue);
517
519
  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) {
518
- t.innerHTML = `<div>${o}</div>`;
520
+ t.innerHTML = `<div>${n}</div>`;
519
521
  return;
520
522
  }
521
523
  if (t.innerHTML = "", !e.length && l.mode === "filter") {
@@ -529,18 +531,18 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
529
531
  }
530
532
  e.forEach((a) => {
531
533
  var u, f;
532
- const n = ye({
534
+ const o = ye({
533
535
  id: Q(a),
534
- colorId: ((u = le(a, l.tags)) == null ? void 0 : u.color_id) ?? "",
535
- name: ((f = le(a, l.tags)) == null ? void 0 : f.name) ?? "",
536
+ colorId: ((u = ae(a, l.tags)) == null ? void 0 : u.color_id) ?? "",
537
+ name: ((f = ae(a, l.tags)) == null ? void 0 : f.name) ?? "",
536
538
  state: Q(a) === a ? "selected" : "excluded"
537
539
  });
538
- t.append(n);
540
+ t.append(o);
539
541
  });
540
542
  }, ye = (t) => {
541
543
  const l = document.createElement("div");
542
544
  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;
543
- }, at = [
545
+ }, et = [
544
546
  {
545
547
  id: "1",
546
548
  name: "Without Tag",
@@ -591,7 +593,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
591
593
  name: "Turquoise",
592
594
  color_id: "10"
593
595
  }
594
- ], lt = ["data-tag_id", "data-tag_color_id", "title"], ie = /* @__PURE__ */ P({
596
+ ], tt = ["data-tag_id", "data-tag_color_id", "title"], ie = /* @__PURE__ */ U({
595
597
  __name: "tagIcon",
596
598
  props: {
597
599
  id: {},
@@ -600,7 +602,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
600
602
  state: {}
601
603
  },
602
604
  setup(t) {
603
- return (l, o) => (k(), B("div", {
605
+ return (l, n) => (k(), b("div", {
604
606
  class: X({
605
607
  "top-tagSelector_tagIcon": !0,
606
608
  "top-tagSelector-active": !!l.state,
@@ -609,9 +611,9 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
609
611
  "data-tag_id": l.id,
610
612
  "data-tag_color_id": l.colorId,
611
613
  title: l.name
612
- }, null, 10, lt));
614
+ }, null, 10, tt));
613
615
  }
614
- }), nt = ["contenteditable", "onKeydown"], pe = /* @__PURE__ */ P({
616
+ }), lt = ["contenteditable", "onKeydown"], pe = /* @__PURE__ */ U({
615
617
  __name: "tagPopupListItem",
616
618
  props: /* @__PURE__ */ N({
617
619
  editable: { type: Boolean },
@@ -629,7 +631,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
629
631
  }),
630
632
  emits: /* @__PURE__ */ N(["update:name", "unselect", "exclude", "select"], ["update:name"]),
631
633
  setup(t, { emit: l }) {
632
- const o = t, e = l, i = D(t, "name"), a = F(null), n = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
634
+ const n = t, e = l, i = D(t, "name"), a = F(null), o = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
633
635
  contenteditable: u.value,
634
636
  onpaste: (g) => g.preventDefault()
635
637
  } : {}), u = F(!1), f = async () => {
@@ -641,13 +643,13 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
641
643
  if (!g) return S();
642
644
  a.value && (a.value.innerText = g), u.value = !1, e("update:name", g);
643
645
  }, S = async () => {
644
- a.value && (a.value.innerText = o.name), u.value = !1;
646
+ a.value && (a.value.innerText = n.name), u.value = !1;
645
647
  }, r = (g) => {
646
- if (u.value || o.disabled) return;
648
+ if (u.value || n.disabled) return;
647
649
  let d = "selected";
648
- o.canExclude && (g.ctrlKey || g.metaKey) && (d = "excluded"), o.state == d && (d = ""), d === "" && e("unselect"), d === "selected" && e("select"), d === "excluded" && e("exclude");
650
+ n.canExclude && (g.ctrlKey || g.metaKey) && (d = "excluded"), n.state == d && (d = ""), d === "" && e("unselect"), d === "selected" && e("select"), d === "excluded" && e("exclude");
649
651
  };
650
- return (g, d) => (k(), b(ue, {
652
+ return (g, d) => (k(), _(ue, {
651
653
  class: X({
652
654
  "top-tagSelector_tagListItem": !0,
653
655
  "top-tagSelector_tagListItem-inEdit": u.value,
@@ -656,9 +658,9 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
656
658
  "top-tagSelector-active": !!g.state,
657
659
  "top-tagSelector-excluded": g.state === "excluded"
658
660
  }),
659
- onClick: z(r, ["stop"])
661
+ onClick: J(r, ["stop"])
660
662
  }, {
661
- default: _(() => [
663
+ default: B(() => [
662
664
  A(ie, {
663
665
  id: g.id,
664
666
  name: i.value,
@@ -670,19 +672,19 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
670
672
  ref: a,
671
673
  class: "top-tagSelector_tagListItemName",
672
674
  contenteditable: u.value ? "plaintext-only" : !1
673
- }, n.value, {
675
+ }, o.value, {
674
676
  onKeydown: [
675
- ge(z(h, ["stop"]), ["enter"]),
676
- ge(z(S, ["stop"]), ["esc"])
677
+ ge(J(h, ["stop"]), ["enter"]),
678
+ ge(J(S, ["stop"]), ["esc"])
677
679
  ]
678
- }), K(i.value), 17, nt),
679
- g.editable ? (k(), B(Y, { key: 0 }, [
680
- u.value ? (k(), B("span", {
680
+ }), K(i.value), 17, lt),
681
+ g.editable ? (k(), b(Y, { key: 0 }, [
682
+ u.value ? (k(), b("span", {
681
683
  key: 1,
682
684
  "data-top-icon": "",
683
685
  class: "top-tagSelector_edit",
684
- onClick: z(h, ["stop"])
685
- })) : (k(), B("span", {
686
+ onClick: J(h, ["stop"])
687
+ })) : (k(), b("span", {
686
688
  key: 0,
687
689
  "data-top-icon": "",
688
690
  class: "top-tagSelector_edit",
@@ -693,7 +695,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
693
695
  _: 1
694
696
  }, 8, ["class"]));
695
697
  }
696
- }), ot = { key: 1 }, rt = /* @__PURE__ */ P({
698
+ }), at = { key: 1 }, ot = /* @__PURE__ */ U({
697
699
  inheritAttrs: !1,
698
700
  __name: "popupOpener",
699
701
  props: /* @__PURE__ */ N({
@@ -714,45 +716,48 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
714
716
  }),
715
717
  emits: ["update:modelValue"],
716
718
  setup(t) {
717
- const l = t, o = D(t, "modelValue"), e = l.useTopButton ? H : "div", i = l.useTopButton ? "html" : "default", a = {
718
- model: o,
719
+ const l = t, n = D(t, "modelValue"), e = l.useTopButton ? H : "div", i = l.useTopButton ? "html" : "default", a = {
720
+ model: n,
719
721
  mode: l.mode,
720
722
  targetId: l.targetId,
721
723
  filters: l.filters,
722
724
  payload: l.payload
723
725
  };
724
- return (n, u) => {
725
- const f = Ve("top-data");
726
- return k(), b(Re, { id: n.id }, {
727
- default: _(() => [
728
- Ee((k(), b(Me(y(e)), Se({
726
+ return (o, u) => {
727
+ const f = _e("top-data");
728
+ return k(), _(Le, { id: o.id }, {
729
+ default: B(() => [
730
+ be((k(), _(Ve(y(e)), Se({
729
731
  class: {
730
732
  "top-tagSelector": !0,
733
+ "top-tagSelector-useTopButton": l.useTopButton,
734
+ "top-tagSelector-custom": !l.useTopButton,
735
+ "top-as-selector": l.useTopButton,
731
736
  "top-tagSelector-filter": l.mode === "filter",
732
- "top-tagSelector-setter_single": l.mode === "setter" && !n.filters,
733
- "top-tagSelector-setter_several": l.mode === "setter" && n.filters,
734
- "top-tagSelector-selectedOne": !o.value.length || o.value.length === 1,
735
- "top-tagSelector-toTwoLine": o.value.length > 5
737
+ "top-tagSelector-setter_single": l.mode === "setter" && !o.filters,
738
+ "top-tagSelector-setter_several": l.mode === "setter" && o.filters,
739
+ "top-tagSelector-selectedOne": !n.value.length || n.value.length === 1,
740
+ "top-tagSelector-toTwoLine": n.value.length > 5
736
741
  },
737
742
  color: "theme",
738
- styling: n.styling
739
- }, n.$attrs), {
740
- [y(i)]: _(() => [
741
- !o.value.length && n.mode === "filter" ? (k(), b(ie, {
743
+ styling: o.styling
744
+ }, o.$attrs), {
745
+ [y(i)]: B(() => [
746
+ !n.value.length && o.mode === "filter" ? (k(), _(ie, {
742
747
  key: 0,
743
748
  id: "all",
744
749
  colorId: "",
745
- name: n.$i18n.Common.All_tags ?? "",
750
+ name: o.$i18n.Common.All_tags ?? "",
746
751
  state: ""
747
752
  }, null, 8, ["name"])) : q("", !0),
748
- n.mode === "setter" && n.filters ? (k(), B("div", ot, [
749
- Ke(n.$slots, "default")
750
- ])) : (k(!0), B(Y, { key: 2 }, se(o.value, (h) => {
753
+ o.mode === "setter" && o.filters ? (k(), b("div", at, [
754
+ Ee(o.$slots, "default")
755
+ ])) : (k(!0), b(Y, { key: 2 }, se(n.value, (h) => {
751
756
  var S, r;
752
- return k(), b(ie, {
757
+ return k(), _(ie, {
753
758
  id: y(Q)(h),
754
- colorId: ((S = y(le)(h, n.tags)) == null ? void 0 : S.color_id) ?? "",
755
- name: ((r = y(le)(h, n.tags)) == null ? void 0 : r.name) ?? "",
759
+ colorId: ((S = y(ae)(h, o.tags)) == null ? void 0 : S.color_id) ?? "",
760
+ name: ((r = y(ae)(h, o.tags)) == null ? void 0 : r.name) ?? "",
756
761
  state: y(Q)(h) === h ? "selected" : "excluded"
757
762
  }, null, 8, ["id", "colorId", "name", "state"]);
758
763
  }), 256))
@@ -766,7 +771,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
766
771
  }, 8, ["id"]);
767
772
  };
768
773
  }
769
- }), xt = /* @__PURE__ */ P({
774
+ }), ht = /* @__PURE__ */ U({
770
775
  __name: "tagSelector",
771
776
  props: /* @__PURE__ */ N({
772
777
  modelValue: {},
@@ -778,6 +783,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
778
783
  requiredForSetter: { type: Boolean, default: !0 },
779
784
  maxTagsForSetter: {},
780
785
  emitDelay: { default: 500 },
786
+ useTopButton: { type: Boolean, default: !0 },
781
787
  styling: {}
782
788
  }, {
783
789
  modelValue: {
@@ -785,22 +791,22 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
785
791
  },
786
792
  modelModifiers: {},
787
793
  tags: {
788
- default: Le(at)
794
+ default: $e(et)
789
795
  },
790
796
  tagsModifiers: {}
791
797
  }),
792
798
  emits: /* @__PURE__ */ N(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
793
799
  setup(t, { emit: l }) {
794
- const o = R(), e = t, i = D(t, "modelValue"), a = D(t, "tags"), n = l, u = Ae((s, c) => {
795
- n(s, c);
800
+ const n = R(), e = t, i = D(t, "modelValue"), a = D(t, "tags"), o = l, u = we((s, c) => {
801
+ o(s, c);
796
802
  }, e.emitDelay);
797
803
  e.singleMode && !i.value.length && (i.value = [a.value[0].id]);
798
804
  const f = e.id ?? "top-popup-id-" + Math.random(), h = F("add"), S = () => {
799
805
  var v;
800
- const s = " " + ((v = o.Common.Tags) == null ? void 0 : v.toLowerCase()), c = /* @__PURE__ */ new Map();
801
- 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;
806
+ const s = " " + ((v = n.Common.Tags) == null ? void 0 : v.toLowerCase()), c = /* @__PURE__ */ new Map();
807
+ return c.set("add", { value: "add", title: n.Common.Add + s }), c.set("replace", { value: "replace", title: n.Common.Replace + s }), c.set("delete", { value: "delete", title: n.Common.Delete + s }), c;
802
808
  };
803
- let r = $e({
809
+ let r = Me({
804
810
  model: i,
805
811
  mode: "filter",
806
812
  targetId: void 0,
@@ -822,19 +828,19 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
822
828
  }, x = (s, c) => {
823
829
  const v = ve(s);
824
830
  let I = r.value.model.value.filter((L) => L !== s && L !== v);
825
- c === "select" && I.push(s), c === "exclude" && I.push(v), r.value.mode === "setter" && r.value.targetId !== void 0 && e.requiredForSetter && (I.length || I.push("1"), I.length === 2 && r.value.model.value.length === 1 && r.value.model.value[0] === "1" && (I = I.filter((L) => L !== "1"))), e.singleMode && !r.value.filters && (I.length || (I = r.value.model.value), I.length > 1 && (I = [I[I.length - 1]])), I.sort((L, U) => {
831
+ c === "select" && I.push(s), c === "exclude" && I.push(v), r.value.mode === "setter" && r.value.targetId !== void 0 && e.requiredForSetter && (I.length || I.push("1"), I.length === 2 && r.value.model.value.length === 1 && r.value.model.value[0] === "1" && (I = I.filter((L) => L !== "1"))), e.singleMode && !r.value.filters && (I.length || (I = r.value.model.value), I.length > 1 && (I = [I[I.length - 1]])), I.sort((L, P) => {
826
832
  if (!e.tags) return 0;
827
- const Z = e.tags.findIndex((O) => O.id === L), j = e.tags.findIndex((O) => O.id === U);
828
- return Z - j;
833
+ const Z = e.tags.findIndex((O) => O.id === L), z = e.tags.findIndex((O) => O.id === P);
834
+ return Z - z;
829
835
  }), r.value.model.value = I, r.value.mode === "setter" && r.value.targetId !== void 0 && u("setter", {
830
836
  tagsIds: I,
831
837
  targetId: r.value.targetId,
832
838
  payload: r.value.payload
833
839
  });
834
- }, T = E(() => {
840
+ }, C = E(() => {
835
841
  let s = "top-tagSelector_popup";
836
842
  return r.value.mode === "filter" && (s += " top-tagSelector_popup-filter"), r.value.mode === "setter" && (s += " top-tagSelector_popup-setter"), s;
837
- }), C = () => {
843
+ }), T = () => {
838
844
  const s = prompt("", "New tag");
839
845
  if (!s || s === "New tag") return;
840
846
  const c = a.value.length + 1;
@@ -842,15 +848,15 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
842
848
  id: String(c),
843
849
  name: s,
844
850
  color_id: String((c - 1) % 10 + 1)
845
- }), n("tagsChanged", a.value);
851
+ }), o("tagsChanged", a.value);
846
852
  }, V = (s) => {
847
853
  var c;
848
854
  if (r.value = W(s.elPopupOpener, "topTagSelectorTarget"), !r.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
849
- if (r.value.filters && (h.value = "add", r.value.model.value = []), !((c = J.$) != null && c.ui.sortable)) {
855
+ if (r.value.filters && (h.value = "add", r.value.model.value = []), !((c = j.$) != null && c.ui.sortable)) {
850
856
  console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
851
857
  return;
852
858
  }
853
- !J.state.isMobile && !J.state.isMobileUA && a.value && $(s.elPopup).sortable({
859
+ !j.state.isMobile && !j.state.isMobileUA && a.value && $(s.elPopup).sortable({
854
860
  items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
855
861
  /**
856
862
  * @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
@@ -859,41 +865,40 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
859
865
  distance: 10,
860
866
  stop: function(v, I) {
861
867
  if (!a.value) return;
862
- const L = $(I.item).parent().find("[data-tag_id]"), U = [];
863
- L.each((Z, j) => {
868
+ const L = $(I.item).parent().find("[data-tag_id]"), P = [];
869
+ L.each((Z, z) => {
864
870
  if (!a.value) return;
865
- const O = $(j).attr("data-tag_id");
866
- U.push(O);
867
- }), a.value.sort((Z, j) => {
868
- const O = U.findIndex((ne) => ne === Z.id), Te = U.findIndex((ne) => ne === j.id);
869
- return O - Te;
871
+ const O = $(z).attr("data-tag_id");
872
+ P.push(O);
873
+ }), a.value.sort((Z, z) => {
874
+ const O = P.findIndex((oe) => oe === Z.id), Ce = P.findIndex((oe) => oe === z.id);
875
+ return O - Ce;
870
876
  }), u("tagsChanged", a.value);
871
877
  }
872
878
  });
873
879
  }, m = (s) => {
874
880
  var c;
875
- (c = J.$) != null && c.ui.sortable && $(s.elPopup).data("ui-sortable") && $(s.elPopup).sortable("destroy");
881
+ (c = j.$) != null && c.ui.sortable && $(s.elPopup).data("ui-sortable") && $(s.elPopup).sortable("destroy");
876
882
  };
877
- return (s, c) => (k(), B(Y, null, [
878
- A(rt, {
879
- class: "top-as-selector",
883
+ return (s, c) => (k(), b(Y, null, [
884
+ A(ot, {
880
885
  modelValue: i.value,
881
886
  "onUpdate:modelValue": c[0] || (c[0] = (v) => i.value = v),
882
887
  id: y(f),
883
888
  tags: a.value,
884
889
  styling: s.styling,
885
890
  mode: "filter",
886
- useTopButton: ""
887
- }, null, 8, ["modelValue", "id", "tags", "styling"]),
891
+ useTopButton: s.useTopButton
892
+ }, null, 8, ["modelValue", "id", "tags", "styling", "useTopButton"]),
888
893
  A(Ie, {
889
894
  id: y(f),
890
- class: X(T.value),
895
+ class: X(C.value),
891
896
  onOpen: c[4] || (c[4] = (v) => V(v)),
892
897
  onClose: c[5] || (c[5] = (v) => m(v)),
893
898
  "transition-duration": 50
894
- }, we({
895
- contentList: _(() => [
896
- y(r).mode === "filter" && !s.singleMode ? (k(), b(pe, {
899
+ }, Ke({
900
+ contentList: B(() => [
901
+ y(r).mode === "filter" && !s.singleMode ? (k(), _(pe, {
897
902
  key: 0,
898
903
  id: "all",
899
904
  colorId: "",
@@ -901,7 +906,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
901
906
  state: y(r).model.value.length ? "" : "selected",
902
907
  onSelect: c[3] || (c[3] = (v) => y(r).model.value = [])
903
908
  }, null, 8, ["name", "state"])) : q("", !0),
904
- (k(!0), B(Y, null, se(a.value, (v) => (k(), b(pe, {
909
+ (k(!0), b(Y, null, se(a.value, (v) => (k(), _(pe, {
905
910
  key: v.id,
906
911
  id: v.id,
907
912
  colorId: v.color_id,
@@ -917,12 +922,12 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
917
922
  v.name = I, y(u)("tagsChanged", a.value);
918
923
  }
919
924
  }, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
920
- s.tagsEditable && a.value.length < s.tagsMax && a.value.length < 20 ? (k(), b(ue, {
925
+ s.tagsEditable && a.value.length < s.tagsMax && a.value.length < 20 ? (k(), _(ue, {
921
926
  key: 1,
922
927
  "data-top-icon": "",
923
- onClick: z(C, ["stop"])
928
+ onClick: J(T, ["stop"])
924
929
  }, {
925
- default: _(() => [
930
+ default: B(() => [
926
931
  G(K(s.$i18n.Common.Add), 1)
927
932
  ]),
928
933
  _: 1
@@ -932,7 +937,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
932
937
  }, [
933
938
  y(r).mode === "setter" && y(r).filters ? {
934
939
  name: "header",
935
- fn: _(() => [
940
+ fn: B(() => [
936
941
  A(re, {
937
942
  modelValue: h.value,
938
943
  "onUpdate:modelValue": c[1] || (c[1] = (v) => h.value = v),
@@ -943,9 +948,9 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
943
948
  } : void 0,
944
949
  y(r).mode === "setter" && y(r).filters ? {
945
950
  name: "footer",
946
- fn: _(() => [
951
+ fn: B(() => [
947
952
  A(H, { color: "theme" }, {
948
- default: _(() => [
953
+ default: B(() => [
949
954
  G(K(s.$i18n.Common.Cancel), 1)
950
955
  ]),
951
956
  _: 1
@@ -958,8 +963,8 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
958
963
  payload: y(r).payload
959
964
  }))
960
965
  }, {
961
- default: _(() => [
962
- G(K(h.value === "add" ? s.$i18n.Common.Add : "") + " " + K(h.value === "replace" ? s.$i18n.Common.Replace : "") + " " + K(h.value === "delete" ? s.$i18n.Common.Remove : ""), 1)
966
+ default: B(() => [
967
+ G(K(h.value === "add" ? s.$i18n.Common.Add : "") + " " + K(h.value === "replace" ? s.$i18n.Common.Replace : "") + " " + K(h.value === "delete" ? s.$i18n.Common.Delete : ""), 1)
963
968
  ]),
964
969
  _: 1
965
970
  })
@@ -971,16 +976,16 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
971
976
  }
972
977
  });
973
978
  export {
974
- yt as TopSelectorCompetitors,
975
- ht as TopSelectorRegion,
976
- xt as TopTagSelector,
977
- rt as TopTagSelectorPopupOpener,
979
+ mt as TopSelectorCompetitors,
980
+ vt as TopSelectorRegion,
981
+ ht as TopTagSelector,
982
+ ot as TopTagSelectorPopupOpener,
978
983
  ie as TopTagSelectorTagIcon,
979
- Qe as dialogSelectorRegions,
980
- He as findRegion,
981
- St as genElTopTagSelectorPopupOpener,
984
+ Ye as dialogSelectorRegions,
985
+ We as findRegion,
986
+ yt as genElTopTagSelectorPopupOpener,
982
987
  ke as genSearcherByKey,
983
- It as renderElTopTagSelectorPopupOpener,
984
- pt as useItemsFromCompetitors
988
+ pt as renderElTopTagSelectorPopupOpener,
989
+ ft as useItemsFromCompetitors
985
990
  };
986
991
  //# sourceMappingURL=project.js.map