@topvisor/ui 1.3.3-piniaTPAPluginClearHash.0 → 1.3.3

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 (68) 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/charts/charts.js +62 -60
  30. package/charts/charts.js.map +1 -1
  31. package/core/app.amd.js +1 -1
  32. package/core/app.amd.js.map +1 -1
  33. package/core/app.js +26 -26
  34. package/core/app.js.map +1 -1
  35. package/dialog/dialog.js +2 -2
  36. package/extra/extra.js +22 -20
  37. package/extra/extra.js.map +1 -1
  38. package/forms/forms.js +1 -1
  39. package/formsExt/formsExt.amd.js +1 -1
  40. package/formsExt/formsExt.amd.js.map +1 -1
  41. package/formsExt/formsExt.js +115 -113
  42. package/formsExt/formsExt.js.map +1 -1
  43. package/layout/layout.js +37 -35
  44. package/layout/layout.js.map +1 -1
  45. package/package.json +1 -1
  46. package/popup/popup.amd.js +1 -1
  47. package/popup/popup.amd.js.map +1 -1
  48. package/popup/popup.js +9 -4
  49. package/popup/worker.js +2 -2
  50. package/project/project.js +245 -243
  51. package/project/project.js.map +1 -1
  52. package/tabs/tabs.js +28 -26
  53. package/tabs/tabs.js.map +1 -1
  54. package/tabsView/tabsView.amd.js +1 -1
  55. package/tabsView/tabsView.amd.js.map +1 -1
  56. package/tabsView/tabsView.js +67 -65
  57. package/tabsView/tabsView.js.map +1 -1
  58. package/utils/clipboard.js +1 -1
  59. package/utils/date.js +1 -1
  60. package/utils/device.js +1 -1
  61. package/utils/lodash.js +1 -1
  62. package/utils/price.js +1 -1
  63. package/utils/searchers.js +3 -3
  64. package/utils/string.js +1 -1
  65. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js +0 -184
  66. package/.chunks/notice-DYd206Yd.es.js +0 -192
  67. package/.chunks/popupHint.vue_vue_type_style_index_0_lang-BCpRWeKK.amd.js +0 -2
  68. 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 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 J, mergeProps as Ie, withKeys as ge, nextTick as _e, resolveDirective as be, 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 Se, 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" }, Pe = { class: "top-ellipsis1" }, mt = /* @__PURE__ */ P({
13
15
  __name: "selectorCompetitors",
14
16
  props: /* @__PURE__ */ N({
15
17
  modelValue: {},
@@ -21,8 +23,8 @@ 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(() => {
25
- if (l.showSelectAllItem)
26
+ const a = t, o = D(t, "modelValue"), e = E(() => {
27
+ if (a.showSelectAllItem)
26
28
  return {
27
29
  icon: "",
28
30
  title: R().Common.Select_all,
@@ -30,8 +32,8 @@ 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
+ return (i, l) => (k(), B("div", qe, [
36
+ y(j).state.isMobile ? (k(), b(Se, { key: 0 }, {
35
37
  opener: _(() => [
36
38
  A(H, {
37
39
  class: "top-selectorCompetitors_opener",
@@ -63,17 +65,17 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
63
65
  onClick: () => o.value = [n.value]
64
66
  }, {
65
67
  default: _(() => [
66
- he("span", je, K(n.content), 1)
68
+ he("span", Pe, K(n.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(), b(Ae, {
74
76
  key: 1,
75
77
  modelValue: o.value,
76
- "onUpdate:modelValue": a[0] || (a[0] = (n) => o.value = n),
78
+ "onUpdate:modelValue": l[0] || (l[0] = (n) => o.value = n),
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, a) => E(() => de(t).filter((i) => i.on >= 0 || i.id === a).map((i) => ({
86
88
  value: i.id,
87
89
  title: i.url + ` [${i.id}]`,
88
- icon: i.id === de(l) ? "" : "",
90
+ icon: i.id === de(a) ? "" : "",
89
91
  content: i.name
90
- }))), M = -1, p = -2, te = -1, ze = {
92
+ }))), M = -1, p = -2, te = -1, Ue = {
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
115
  }, oe = {
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,116 +125,116 @@ 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(), oe.name = R().Common.Autoselect, console.log(oe), oe), je = () => (fe.name = R().Keywords.Without_region, fe), ke = (t = !1, a = !1, o = []) => {
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(o) : e = Ce(o), a && e.set(p, Je()), e.size || e.set(p, xe), e;
131
+ }, Ce = (t, a = !0, o = [], e = !1) => {
130
132
  const i = /* @__PURE__ */ new Map();
131
- return t.forEach((a) => {
132
- 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
- if (l && !u.enabled) return;
133
+ return t.forEach((l) => {
134
+ if (!l.enabled || e && typeof l.key == "number" && l.key > 1) return;
135
+ const n = { ...l };
136
+ n.regionByIndex = /* @__PURE__ */ new Map(), l.regions && l.regions.forEach((u) => {
137
+ if (a && !u.enabled) return;
136
138
  const f = { ...u };
137
139
  n.regionByIndex.set(f.index, f);
138
140
  }), !n.regionByIndex.size && o.length, // режим вывода ПС без регионов
139
- (!a.regions || // есть включенные регионы
141
+ (!l.regions || // есть включенные регионы
140
142
  n.regionByIndex.size || // запрошен вывод конкретных ПС
141
143
  o.length) && typeof n.key == "number" && i.set(n.key, n);
142
- }), o.forEach((a) => {
143
- if (i.has(a)) return;
144
+ }), o.forEach((l) => {
145
+ if (i.has(l)) return;
144
146
  const n = {
145
- key: a,
146
- name: ze[a],
147
+ key: l,
148
+ name: Ue[l],
147
149
  regions: [],
148
150
  regionByIndex: /* @__PURE__ */ new Map()
149
151
  };
150
152
  i.set(n.key, n);
151
153
  }), i;
152
- }, Ye = (t) => {
153
- const l = Ce(t, !1, [0, 1], !0);
154
- if (l.has(2)) {
155
- const o = l.get(2);
154
+ }, Ge = (t) => {
155
+ const a = Ce(t, !1, [0, 1], !0);
156
+ if (a.has(2)) {
157
+ const o = a.get(2);
156
158
  o && (o.regionByIndex = /* @__PURE__ */ new Map());
157
159
  }
158
- return l.forEach((o) => {
160
+ return a.forEach((o) => {
159
161
  if (!o.regionByIndex) return;
160
- const e = { ...We() };
162
+ const e = { ...je() };
161
163
  o.regionByIndex.set(e.index, e);
162
- }), l;
163
- }, He = (t, l, o = []) => {
164
+ }), a;
165
+ }, We = (t, a, o = []) => {
164
166
  const e = ke(t, !1, o);
165
167
  let i;
166
- 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;
168
+ return e.forEach((l) => {
169
+ if (!(a.searcher_key !== void 0 && a.searcher_key != l.key) && l.regions && (l.regions.forEach((n) => {
170
+ if (!i && !(a.key !== void 0 && a.key != n.key) && !(a.index !== void 0 && a.index != n.index) && !(!t && (a.lang !== void 0 && a.lang != n.lang || a.device !== void 0 && a.device != n.device)))
171
+ return n.searcher_key = l.key, i = n, !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
- const a = /* @__PURE__ */ new Map();
176
- if (l.value.forEach((n) => {
175
+ }, Ye = Re(() => import("../.chunks/dialog_selectorRegions-Ccsrpo2C.es.js")), He = (t, a) => {
176
+ const o = R(), e = F(a.value.keys().next().value ?? p), i = E(() => {
177
+ const l = /* @__PURE__ */ new Map();
178
+ if (a.value.forEach((n) => {
177
179
  let u = {
178
180
  value: n.key,
179
181
  title: n.name
180
182
  };
181
- t.addSearcherIcon && (u.icon = De(n.key)), a.set(n.key, u);
182
- }), t.addCompare && !a.has(p)) {
183
+ t.addSearcherIcon && (u.icon = Oe(n.key)), l.set(n.key, u);
184
+ }), t.addCompare && !l.has(p)) {
183
185
  const n = {
184
186
  value: "",
185
187
  title: "--------------------",
186
188
  disabled: !0
187
189
  };
188
- a.set(n.value, n);
190
+ l.set(n.value, n);
189
191
  const u = {
190
192
  value: M,
191
193
  title: o.Common.Compare
192
194
  };
193
- a.set(u.value, u);
195
+ l.set(u.value, u);
194
196
  }
195
- return a;
197
+ return l;
196
198
  });
197
199
  return {
198
200
  searcherKey: e,
199
201
  optionBySearcherKey: i
200
202
  };
201
- }, Ze = (t, l) => {
202
- var a, n, u;
203
+ }, Qe = (t, a) => {
204
+ var l, n, u;
203
205
  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);
206
+ t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === p && (t.forFrequency ? e.value = ((n = (l = a.value) == null ? void 0 : l.regionByIndex.values().next().value) == null ? void 0 : n.key) ?? p : e.value = ((u = a.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();
208
- return (h = l.value.regionByIndex) == null || h.forEach((S) => {
209
- let r = S.name;
210
+ return (h = a.value.regionByIndex) == null || h.forEach((I) => {
211
+ let r = I.name;
210
212
  if (t.forFrequency) {
211
213
  const x = {
212
- value: S.key,
214
+ value: I.key,
213
215
  title: r
214
216
  };
215
- f.has(S.key) || f.set(S.key, x);
217
+ f.has(I.key) || f.set(I.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
+ I.device && (r += " (" + o.Common["Device_" + I.device] + ")");
221
+ const g = Ne(a.value.key || 0, I.lang ?? "");
220
222
  g && (r += " / " + g);
221
223
  const d = {
222
- value: S.index,
224
+ value: I.index,
223
225
  title: r,
224
- icon: S.device ? qe(S.device) : void 0
226
+ icon: I.device ? De(I.device) : void 0
225
227
  };
226
- f.set(S.index, d);
228
+ f.set(I.index, d);
227
229
  }), f;
228
230
  });
229
231
  return w(i, (f, h) => {
230
232
  var d;
231
233
  if (t.onlySearcher || e.value !== void 0 && f.get(e.value))
232
234
  return;
233
- let S = f.keys().next().value;
234
- if (e.value === p || S === p) {
235
- e.value = S;
235
+ let I = f.keys().next().value;
236
+ if (e.value === p || I === p) {
237
+ e.value = I;
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;
@@ -241,22 +243,22 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
241
243
  if (typeof C != "string" || typeof x == "string")
242
244
  break;
243
245
  if (C === r) {
244
- S = x;
246
+ I = x;
245
247
  break;
246
248
  }
247
249
  const V = new RegExp(` \\((${o.Common.Device_1}|${o.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
+ 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, I = x));
250
252
  }
251
- e.value = S;
253
+ e.value = I;
252
254
  }), {
253
255
  regionIndex: e,
254
256
  optionByRegionIndex: i
255
257
  };
256
- }, et = (t, l, o) => {
258
+ }, Xe = (t, a, o) => {
257
259
  const e = F([]), i = () => {
258
- if (t.onlySearcher && l.value) {
259
- e.value = Array.from(l.value.keys());
260
+ if (t.onlySearcher && a.value) {
261
+ e.value = Array.from(a.value.keys());
260
262
  return;
261
263
  }
262
264
  let n = [];
@@ -270,62 +272,62 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
270
272
  } catch {
271
273
  }
272
274
  n.length && (n = n.filter((u) => o.value.has(u))), n.length || (n = Array.from(o.value)), e.value = [...n];
273
- }, a = () => {
275
+ }, l = () => {
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
  };
276
278
  return w(e, () => {
277
- a();
279
+ l();
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 a = E(() => ke(t.forFrequency, t.autoRegion, t.searchers)), o = E(() => a.value.get(i.searcherKey.value) || xe), e = E(() => {
283
285
  const r = /* @__PURE__ */ new Set();
284
- return l.value.forEach((g) => {
286
+ return a.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);
290
- w(l, () => {
291
+ }), i = He(t, a), l = Qe(t, o), n = Xe(t, a, e);
292
+ w(a, () => {
291
293
  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
- let r = l.value.keys().next().value;
294
- l.value.forEach((C) => {
294
+ if (t.onlySearcher ? n.regionsIndexes.value = Array.from(a.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((C) => e.value.has(C)), i.searcherKey.value === M) return;
295
+ let r = a.value.keys().next().value;
296
+ a.value.forEach((C) => {
295
297
  var V, m, s;
296
298
  if (t.onlySearcher && C.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 (l.regionIndex.value && ((V = C.regionByIndex) != null && V.has(l.regionIndex.value)) && (r = C.key), !t.onlySearcher) {
301
303
  let c;
302
- 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
+ r !== void 0 && (c = (m = a.value.get(r)) == null ? void 0 : m.regionByIndex);
305
+ const v = (s = a.value.get(C.key)) == null ? void 0 : s.regionByIndex;
304
306
  c != null && c.has(p) && !(v != null && v.has(p)) && (r = C.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), l.regionIndex.value !== void 0 && !((d = (g = o.value) == null ? void 0 : g.regionByIndex) != null && d.has(l.regionIndex.value)) && (l.regionIndex.value = (T = (x = o.value) == null ? void 0 : x.regions) == null ? void 0 : T.keys().next().value);
307
309
  }, { immediate: !0 });
308
310
  const u = () => {
309
311
  if (!(i.searcherKey.value === M || i.searcherKey.value === p))
310
312
  return i.searcherKey.value;
311
313
  }, f = () => {
312
- if (t.onlySearcher || a.regionIndex.value === p) return;
313
- let r = a.regionIndex.value;
314
+ if (t.onlySearcher || l.regionIndex.value === p) return;
315
+ let r = l.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 = l.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;
319
321
  }, h = () => {
320
322
  const r = u();
321
323
  if (r !== void 0)
322
- return l.value.get(r);
324
+ return a.value.get(r);
323
325
  };
324
326
  return {
325
327
  selectSearcher: i,
326
- selectRegion: a,
328
+ selectRegion: l,
327
329
  compare: n,
328
- searcherByKey: l,
330
+ searcherByKey: a,
329
331
  allRegionsIndexes: e,
330
332
  getSearcher: h,
331
333
  getRegion: () => {
@@ -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__ */ P({
339
341
  __name: "selectorRegion",
340
342
  props: /* @__PURE__ */ N({
341
343
  projectId: {},
@@ -356,35 +358,35 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
356
358
  modelValueSingleModifiers: {}
357
359
  }),
358
360
  emits: ["update:modelValue", "update:modelValueSingle"],
359
- setup(t, { expose: l }) {
361
+ setup(t, { expose: a }) {
360
362
  const o = t, e = D(t, "modelValue"), i = D(t, "modelValueSingle"), {
361
- selectSearcher: a,
363
+ selectSearcher: l,
362
364
  selectRegion: n,
363
365
  compare: u,
364
366
  searcherByKey: f,
365
367
  allRegionsIndexes: h,
366
- getSearcher: S,
368
+ getSearcher: I,
367
369
  getRegion: r
368
- } = tt(o), g = () => {
370
+ } = Ze(o), g = () => {
369
371
  const d = [];
370
372
  f.value.forEach((x) => {
371
373
  x.enabled && x.regions.forEach((T) => {
372
374
  T.enabled && d.push(T);
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], () => {
381
- if (a.searcherKey.value === M && u.regionsIndexes.value.length) {
382
+ return w([n.regionIndex, l.searcherKey, u.regionsIndexes], () => {
383
+ if (l.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
+ o.onlySearcher ? (e.value = [l.searcherKey.value], l.searcherKey.value === p && !o.autoRegion && (e.value.length = 0)) : (e.value = [n.regionIndex.value], n.regionIndex.value === p && !o.autoRegion && (e.value.length = 0));
389
+ !o.onlySearcher && !h.value.size && (l.searcherKey.value = p);
388
390
  }), i.value && w(i, () => {
389
391
  i.value && (e.value = [i.value]);
390
392
  }, { immediate: !0 }), w(e, () => {
@@ -406,8 +408,8 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
406
408
  else if (m.length === 1) {
407
409
  let c = h.value;
408
410
  o.forFrequency && (c = /* @__PURE__ */ new Set(), f.value.forEach((v) => {
409
- v.regionByIndex.forEach((I) => {
410
- I.index !== te && I.index !== p && c.add(I.key);
411
+ v.regionByIndex.forEach((S) => {
412
+ S.index !== te && S.index !== p && c.add(S.key);
411
413
  });
412
414
  })), c.has(m[0]) || (m = [], s !== void 0 && m.push(s));
413
415
  } else
@@ -417,18 +419,18 @@ 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)))
422
+ if (!(e.value.length === 1 && e.value[0] === (o.onlySearcher ? l.searcherKey.value : n.regionIndex.value)))
421
423
  if (o.onlySearcher) {
422
424
  if (e.value.length === 1) {
423
- a.searcherKey.value = e.value[0];
425
+ l.searcherKey.value = e.value[0];
424
426
  return;
425
427
  }
426
- a.searcherKey.value = M;
428
+ l.searcherKey.value = M;
427
429
  return;
428
430
  } else {
429
431
  if (!e.value.length)
430
432
  return;
431
- if (e.value.length === 1 && a.searcherKey.value !== M) {
433
+ if (e.value.length === 1 && l.searcherKey.value !== M) {
432
434
  n.regionIndex.value = e.value[0];
433
435
  let m;
434
436
  for (const s of f.value.values()) {
@@ -440,12 +442,12 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
440
442
  if (m !== void 0)
441
443
  break;
442
444
  }
443
- m !== void 0 && (a.searcherKey.value = m);
445
+ m !== void 0 && (l.searcherKey.value = m);
444
446
  } else
445
- a.searcherKey.value = M, u.regionsIndexes.value = [...e.value];
447
+ l.searcherKey.value = M, u.regionsIndexes.value = [...e.value];
446
448
  }
447
- }, { immediate: !0 }), l({
448
- getSearcher: S,
449
+ }, { immediate: !0 }), a({
450
+ getSearcher: I,
449
451
  getRegion: r
450
452
  }), (d, x) => (k(), B("div", {
451
453
  class: X({
@@ -454,13 +456,13 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
454
456
  })
455
457
  }, [
456
458
  A(re, {
457
- options: y(a).optionBySearcherKey.value,
458
- modelValue: y(a).searcherKey.value,
459
- "onUpdate:modelValue": x[0] || (x[0] = (T) => y(a).searcherKey.value = T),
459
+ options: y(l).optionBySearcherKey.value,
460
+ modelValue: y(l).searcherKey.value,
461
+ "onUpdate:modelValue": x[0] || (x[0] = (T) => y(l).searcherKey.value = T),
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(l).searcherKey.value !== y(M) ? (k(), b(re, {
464
466
  key: 0,
465
467
  class: "top-select-region",
466
468
  options: y(n).optionByRegionIndex.value,
@@ -470,7 +472,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
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(l).searcherKey.value === y(M) ? (k(), b(H, {
474
476
  key: 1,
475
477
  name: "compare",
476
478
  onClick: g,
@@ -483,64 +485,64 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
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, a) => {
487
489
  t = Q(t);
488
- const o = l.find((e) => e.id === t);
490
+ const o = a.find((e) => e.id === t);
489
491
  if (o)
490
492
  return o;
491
- }, St = (t, l, o) => {
492
- l || (l = { id: t.id }), l.id = t.id;
493
- const e = Pe.genElPopupOpener("div", l);
493
+ }, yt = (t, a, o) => {
494
+ a || (a = { id: t.id }), a.id = t.id;
495
+ const e = Fe.genElPopupOpener("div", a);
494
496
  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) => {
495
497
  i.preventDefault(), i.stopPropagation(), e.onclick = null;
496
- const a = F(t.modelValue), n = {
497
- model: a,
498
+ const l = F(t.modelValue), n = {
499
+ model: l,
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", n), delete e.dataset.topPopupDisabled, ce(t.modelValue) || w(l, () => {
506
+ t.modelValue = l.value, ee(e, t, o);
505
507
  }), e.click();
506
508
  }, ce(t.modelValue) ? w(t.modelValue, () => ee(e, t, o)) : W(e, "topTagSelectorRender", (i) => {
507
509
  t.modelValue = i;
508
- const a = W(e, "topTagSelectorTarget");
509
- a && (a.model.value = i), ee(e, t, o);
510
+ const l = W(e, "topTagSelectorTarget");
511
+ l && (l.model.value = i), ee(e, t, o);
510
512
  }), ee(e, t, o), e;
511
- }, It = (t, l) => {
513
+ }, pt = (t, a) => {
512
514
  var o;
513
- (o = W(t, "topTagSelectorRender")) == null || o(l);
514
- }, ee = (t, l, o) => {
515
+ (o = W(t, "topTagSelectorRender")) == null || o(a);
516
+ }, ee = (t, a, o) => {
515
517
  var i;
516
- const e = y(l.modelValue);
517
- 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
+ const e = y(a.modelValue);
519
+ if (t.classList.toggle("top-tagSelector-selectedOne", !e.length || e.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", e.length > 5), a.mode === "setter" && a.filters) {
518
520
  t.innerHTML = `<div>${o}</div>`;
519
521
  return;
520
522
  }
521
- if (t.innerHTML = "", !e.length && l.mode === "filter") {
522
- const a = ye({
523
+ if (t.innerHTML = "", !e.length && a.mode === "filter") {
524
+ const l = ye({
523
525
  id: "all",
524
526
  colorId: "",
525
527
  name: ((i = R().Common) == null ? void 0 : i.All_tags) ?? "",
526
528
  state: ""
527
529
  });
528
- t.append(a);
530
+ t.append(l);
529
531
  }
530
- e.forEach((a) => {
532
+ e.forEach((l) => {
531
533
  var u, f;
532
534
  const n = ye({
533
- 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
- state: Q(a) === a ? "selected" : "excluded"
535
+ id: Q(l),
536
+ colorId: ((u = ae(l, a.tags)) == null ? void 0 : u.color_id) ?? "",
537
+ name: ((f = ae(l, a.tags)) == null ? void 0 : f.name) ?? "",
538
+ state: Q(l) === l ? "selected" : "excluded"
537
539
  });
538
540
  t.append(n);
539
541
  });
540
542
  }, ye = (t) => {
541
- const l = document.createElement("div");
542
- 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 = [
543
+ const a = document.createElement("div");
544
+ return a.classList.add("top-tagSelector_tagIcon"), a.classList.toggle("top-tagSelector-active", !!t.state), a.classList.toggle("top-tagSelector-excluded", t.state === "excluded"), a.dataset.tag_id = t.id, a.dataset.tag_color_id = t.colorId, a.title = t.name, a;
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__ */ P({
595
597
  __name: "tagIcon",
596
598
  props: {
597
599
  id: {},
@@ -600,18 +602,18 @@ 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 (a, o) => (k(), B("div", {
604
606
  class: X({
605
607
  "top-tagSelector_tagIcon": !0,
606
- "top-tagSelector-active": !!l.state,
607
- "top-tagSelector-excluded": l.state === "excluded"
608
+ "top-tagSelector-active": !!a.state,
609
+ "top-tagSelector-excluded": a.state === "excluded"
608
610
  }),
609
- "data-tag_id": l.id,
610
- "data-tag_color_id": l.colorId,
611
- title: l.name
612
- }, null, 10, lt));
611
+ "data-tag_id": a.id,
612
+ "data-tag_color_id": a.colorId,
613
+ title: a.name
614
+ }, null, 10, tt));
613
615
  }
614
- }), nt = ["contenteditable", "onKeydown"], pe = /* @__PURE__ */ P({
616
+ }), lt = ["contenteditable", "onKeydown"], pe = /* @__PURE__ */ P({
615
617
  __name: "tagPopupListItem",
616
618
  props: /* @__PURE__ */ N({
617
619
  editable: { type: Boolean },
@@ -628,20 +630,20 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
628
630
  nameModifiers: {}
629
631
  }),
630
632
  emits: /* @__PURE__ */ N(["update:name", "unselect", "exclude", "select"], ["update:name"]),
631
- setup(t, { emit: l }) {
632
- const o = t, e = l, i = D(t, "name"), a = F(null), n = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
633
+ setup(t, { emit: a }) {
634
+ const o = t, e = a, i = D(t, "name"), l = F(null), n = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
633
635
  contenteditable: u.value,
634
636
  onpaste: (g) => g.preventDefault()
635
637
  } : {}), u = F(!1), f = async () => {
636
638
  var g;
637
- u.value = !0, await Be(), (g = a.value) == null || g.focus();
639
+ u.value = !0, await _e(), (g = l.value) == null || g.focus();
638
640
  }, h = () => {
639
641
  var d;
640
- const g = (d = a.value) == null ? void 0 : d.innerText;
641
- if (!g) return S();
642
- a.value && (a.value.innerText = g), u.value = !1, e("update:name", g);
643
- }, S = async () => {
644
- a.value && (a.value.innerText = o.name), u.value = !1;
642
+ const g = (d = l.value) == null ? void 0 : d.innerText;
643
+ if (!g) return I();
644
+ l.value && (l.value.innerText = g), u.value = !1, e("update:name", g);
645
+ }, I = async () => {
646
+ l.value && (l.value.innerText = o.name), u.value = !1;
645
647
  }, r = (g) => {
646
648
  if (u.value || o.disabled) return;
647
649
  let d = "selected";
@@ -656,7 +658,7 @@ 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
663
  default: _(() => [
662
664
  A(ie, {
@@ -665,23 +667,23 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
665
667
  colorId: g.colorId,
666
668
  state: g.state
667
669
  }, null, 8, ["id", "name", "colorId", "state"]),
668
- he("span", Se({
670
+ he("span", Ie({
669
671
  ref_key: "elName",
670
- ref: a,
672
+ ref: l,
671
673
  class: "top-tagSelector_tagListItemName",
672
674
  contenteditable: u.value ? "plaintext-only" : !1
673
675
  }, n.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(I, ["stop"]), ["esc"])
677
679
  ]
678
- }), K(i.value), 17, nt),
680
+ }), K(i.value), 17, lt),
679
681
  g.editable ? (k(), B(Y, { key: 0 }, [
680
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"])
686
+ onClick: J(h, ["stop"])
685
687
  })) : (k(), B("span", {
686
688
  key: 0,
687
689
  "data-top-icon": "",
@@ -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 }, nt = /* @__PURE__ */ P({
697
699
  inheritAttrs: !1,
698
700
  __name: "popupOpener",
699
701
  props: /* @__PURE__ */ N({
@@ -714,23 +716,23 @@ 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 = {
719
+ const a = t, o = D(t, "modelValue"), e = a.useTopButton ? H : "div", i = a.useTopButton ? "html" : "default", l = {
718
720
  model: o,
719
- mode: l.mode,
720
- targetId: l.targetId,
721
- filters: l.filters,
722
- payload: l.payload
721
+ mode: a.mode,
722
+ targetId: a.targetId,
723
+ filters: a.filters,
724
+ payload: a.payload
723
725
  };
724
726
  return (n, u) => {
725
- const f = Ve("top-data");
726
- return k(), b(Re, { id: n.id }, {
727
+ const f = be("top-data");
728
+ return k(), b(Le, { id: n.id }, {
727
729
  default: _(() => [
728
- Ee((k(), b(Me(y(e)), Se({
730
+ Be((k(), b(Ve(y(e)), Ie({
729
731
  class: {
730
732
  "top-tagSelector": !0,
731
- "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,
733
+ "top-tagSelector-filter": a.mode === "filter",
734
+ "top-tagSelector-setter_single": a.mode === "setter" && !n.filters,
735
+ "top-tagSelector-setter_several": a.mode === "setter" && n.filters,
734
736
  "top-tagSelector-selectedOne": !o.value.length || o.value.length === 1,
735
737
  "top-tagSelector-toTwoLine": o.value.length > 5
736
738
  },
@@ -745,28 +747,28 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
745
747
  name: n.$i18n.Common.All_tags ?? "",
746
748
  state: ""
747
749
  }, null, 8, ["name"])) : q("", !0),
748
- n.mode === "setter" && n.filters ? (k(), B("div", ot, [
749
- Ke(n.$slots, "default")
750
+ n.mode === "setter" && n.filters ? (k(), B("div", at, [
751
+ Ee(n.$slots, "default")
750
752
  ])) : (k(!0), B(Y, { key: 2 }, se(o.value, (h) => {
751
- var S, r;
753
+ var I, r;
752
754
  return k(), b(ie, {
753
755
  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) ?? "",
756
+ colorId: ((I = y(ae)(h, n.tags)) == null ? void 0 : I.color_id) ?? "",
757
+ name: ((r = y(ae)(h, n.tags)) == null ? void 0 : r.name) ?? "",
756
758
  state: y(Q)(h) === h ? "selected" : "excluded"
757
759
  }, null, 8, ["id", "colorId", "name", "state"]);
758
760
  }), 256))
759
761
  ]),
760
762
  _: 2
761
763
  }, 1040, ["class", "styling"])), [
762
- [f, a, "topTagSelectorTarget"]
764
+ [f, l, "topTagSelectorTarget"]
763
765
  ])
764
766
  ]),
765
767
  _: 3
766
768
  }, 8, ["id"]);
767
769
  };
768
770
  }
769
- }), xt = /* @__PURE__ */ P({
771
+ }), ht = /* @__PURE__ */ P({
770
772
  __name: "tagSelector",
771
773
  props: /* @__PURE__ */ N({
772
774
  modelValue: {},
@@ -785,22 +787,22 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
785
787
  },
786
788
  modelModifiers: {},
787
789
  tags: {
788
- default: Le(at)
790
+ default: $e(et)
789
791
  },
790
792
  tagsModifiers: {}
791
793
  }),
792
794
  emits: /* @__PURE__ */ N(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
793
- 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
+ setup(t, { emit: a }) {
796
+ const o = R(), e = t, i = D(t, "modelValue"), l = D(t, "tags"), n = a, u = we((s, c) => {
795
797
  n(s, c);
796
798
  }, e.emitDelay);
797
- e.singleMode && !i.value.length && (i.value = [a.value[0].id]);
798
- const f = e.id ?? "top-popup-id-" + Math.random(), h = F("add"), S = () => {
799
+ e.singleMode && !i.value.length && (i.value = [l.value[0].id]);
800
+ const f = e.id ?? "top-popup-id-" + Math.random(), h = F("add"), I = () => {
799
801
  var v;
800
802
  const s = " " + ((v = o.Common.Tags) == null ? void 0 : v.toLowerCase()), c = /* @__PURE__ */ new Map();
801
803
  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;
802
804
  };
803
- let r = $e({
805
+ let r = Me({
804
806
  model: i,
805
807
  mode: "filter",
806
808
  targetId: void 0,
@@ -821,13 +823,13 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
821
823
  return s === "all" && !r.value.model.value.length ? "selected" : "";
822
824
  }, x = (s, c) => {
823
825
  const v = ve(s);
824
- 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) => {
826
+ let S = r.value.model.value.filter((L) => L !== s && L !== v);
827
+ 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((L) => L !== "1"))), e.singleMode && !r.value.filters && (S.length || (S = r.value.model.value), S.length > 1 && (S = [S[S.length - 1]])), S.sort((L, U) => {
826
828
  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;
829
- }), r.value.model.value = I, r.value.mode === "setter" && r.value.targetId !== void 0 && u("setter", {
830
- tagsIds: I,
829
+ const Z = e.tags.findIndex((O) => O.id === L), z = e.tags.findIndex((O) => O.id === U);
830
+ return Z - z;
831
+ }), r.value.model.value = S, r.value.mode === "setter" && r.value.targetId !== void 0 && u("setter", {
832
+ tagsIds: S,
831
833
  targetId: r.value.targetId,
832
834
  payload: r.value.payload
833
835
  });
@@ -837,61 +839,61 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
837
839
  }), C = () => {
838
840
  const s = prompt("", "New tag");
839
841
  if (!s || s === "New tag") return;
840
- const c = a.value.length + 1;
841
- a.value.push({
842
+ const c = l.value.length + 1;
843
+ l.value.push({
842
844
  id: String(c),
843
845
  name: s,
844
846
  color_id: String((c - 1) % 10 + 1)
845
- }), n("tagsChanged", a.value);
847
+ }), n("tagsChanged", l.value);
846
848
  }, V = (s) => {
847
849
  var c;
848
850
  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)) {
851
+ if (r.value.filters && (h.value = "add", r.value.model.value = []), !((c = j.$) != null && c.ui.sortable)) {
850
852
  console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
851
853
  return;
852
854
  }
853
- !J.state.isMobile && !J.state.isMobileUA && a.value && $(s.elPopup).sortable({
855
+ !j.state.isMobile && !j.state.isMobileUA && l.value && $(s.elPopup).sortable({
854
856
  items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
855
857
  /**
856
858
  * @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
857
859
  */
858
860
  cancel: '[contenteditable="plaintext-only"], [contenteditable="true"]',
859
861
  distance: 10,
860
- stop: function(v, I) {
861
- if (!a.value) return;
862
- const L = $(I.item).parent().find("[data-tag_id]"), U = [];
863
- L.each((Z, j) => {
864
- if (!a.value) return;
865
- const O = $(j).attr("data-tag_id");
862
+ stop: function(v, S) {
863
+ if (!l.value) return;
864
+ const L = $(S.item).parent().find("[data-tag_id]"), U = [];
865
+ L.each((Z, z) => {
866
+ if (!l.value) return;
867
+ const O = $(z).attr("data-tag_id");
866
868
  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
+ }), l.value.sort((Z, z) => {
870
+ const O = U.findIndex((ne) => ne === Z.id), Te = U.findIndex((ne) => ne === z.id);
869
871
  return O - Te;
870
- }), u("tagsChanged", a.value);
872
+ }), u("tagsChanged", l.value);
871
873
  }
872
874
  });
873
875
  }, m = (s) => {
874
876
  var c;
875
- (c = J.$) != null && c.ui.sortable && $(s.elPopup).data("ui-sortable") && $(s.elPopup).sortable("destroy");
877
+ (c = j.$) != null && c.ui.sortable && $(s.elPopup).data("ui-sortable") && $(s.elPopup).sortable("destroy");
876
878
  };
877
879
  return (s, c) => (k(), B(Y, null, [
878
- A(rt, {
880
+ A(nt, {
879
881
  class: "top-as-selector",
880
882
  modelValue: i.value,
881
883
  "onUpdate:modelValue": c[0] || (c[0] = (v) => i.value = v),
882
884
  id: y(f),
883
- tags: a.value,
885
+ tags: l.value,
884
886
  styling: s.styling,
885
887
  mode: "filter",
886
888
  useTopButton: ""
887
889
  }, null, 8, ["modelValue", "id", "tags", "styling"]),
888
- A(Ie, {
890
+ A(Se, {
889
891
  id: y(f),
890
892
  class: X(T.value),
891
893
  onOpen: c[4] || (c[4] = (v) => V(v)),
892
894
  onClose: c[5] || (c[5] = (v) => m(v)),
893
895
  "transition-duration": 50
894
- }, we({
896
+ }, Ke({
895
897
  contentList: _(() => [
896
898
  y(r).mode === "filter" && !s.singleMode ? (k(), b(pe, {
897
899
  key: 0,
@@ -901,7 +903,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
901
903
  state: y(r).model.value.length ? "" : "selected",
902
904
  onSelect: c[3] || (c[3] = (v) => y(r).model.value = [])
903
905
  }, null, 8, ["name", "state"])) : q("", !0),
904
- (k(!0), B(Y, null, se(a.value, (v) => (k(), b(pe, {
906
+ (k(!0), B(Y, null, se(l.value, (v) => (k(), b(pe, {
905
907
  key: v.id,
906
908
  id: v.id,
907
909
  colorId: v.color_id,
@@ -910,17 +912,17 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
910
912
  canExclude: y(r).mode === "filter" && !s.singleMode,
911
913
  editable: s.tagsEditable,
912
914
  disabled: g.value && d(v.id) === "",
913
- onUnselect: (I) => x(v.id, "unselect"),
914
- onSelect: (I) => x(v.id, "select"),
915
- onExclude: (I) => x(v.id, "exclude"),
916
- "onUpdate:name": (I) => {
917
- v.name = I, y(u)("tagsChanged", a.value);
915
+ onUnselect: (S) => x(v.id, "unselect"),
916
+ onSelect: (S) => x(v.id, "select"),
917
+ onExclude: (S) => x(v.id, "exclude"),
918
+ "onUpdate:name": (S) => {
919
+ v.name = S, y(u)("tagsChanged", l.value);
918
920
  }
919
921
  }, 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, {
922
+ s.tagsEditable && l.value.length < s.tagsMax && l.value.length < 20 ? (k(), b(ue, {
921
923
  key: 1,
922
924
  "data-top-icon": "",
923
- onClick: z(C, ["stop"])
925
+ onClick: J(C, ["stop"])
924
926
  }, {
925
927
  default: _(() => [
926
928
  G(K(s.$i18n.Common.Add), 1)
@@ -936,7 +938,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
936
938
  A(re, {
937
939
  modelValue: h.value,
938
940
  "onUpdate:modelValue": c[1] || (c[1] = (v) => h.value = v),
939
- options: S()
941
+ options: I()
940
942
  }, null, 8, ["modelValue", "options"])
941
943
  ]),
942
944
  key: "0"
@@ -971,16 +973,16 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
971
973
  }
972
974
  });
973
975
  export {
974
- yt as TopSelectorCompetitors,
975
- ht as TopSelectorRegion,
976
- xt as TopTagSelector,
977
- rt as TopTagSelectorPopupOpener,
976
+ mt as TopSelectorCompetitors,
977
+ vt as TopSelectorRegion,
978
+ ht as TopTagSelector,
979
+ nt as TopTagSelectorPopupOpener,
978
980
  ie as TopTagSelectorTagIcon,
979
- Qe as dialogSelectorRegions,
980
- He as findRegion,
981
- St as genElTopTagSelectorPopupOpener,
981
+ Ye as dialogSelectorRegions,
982
+ We as findRegion,
983
+ yt as genElTopTagSelectorPopupOpener,
982
984
  ke as genSearcherByKey,
983
- It as renderElTopTagSelectorPopupOpener,
984
- pt as useItemsFromCompetitors
985
+ pt as renderElTopTagSelectorPopupOpener,
986
+ ft as useItemsFromCompetitors
985
987
  };
986
988
  //# sourceMappingURL=project.js.map