@topvisor/ui 1.5.0 → 1.5.1-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 (131) hide show
  1. package/.chunks/{api-DW3Y93Lp.amd.js → api-CBMWBeCS.amd.js} +2 -2
  2. package/.chunks/{api-DW3Y93Lp.amd.js.map → api-CBMWBeCS.amd.js.map} +1 -1
  3. package/.chunks/{api-DW3Y93Lp.esm.js → api-CBMWBeCS.esm.js} +2 -2
  4. package/.chunks/{api-DW3Y93Lp.esm.js.map → api-CBMWBeCS.esm.js.map} +1 -1
  5. package/.chunks/{app-Df8tFGnf.amd.js → app-DyAn8Ury.amd.js} +2 -2
  6. package/.chunks/{app-Df8tFGnf.amd.js.map → app-DyAn8Ury.amd.js.map} +1 -1
  7. package/.chunks/{app-Df8tFGnf.esm.js → app-DyAn8Ury.esm.js} +6 -6
  8. package/.chunks/{app-Df8tFGnf.esm.js.map → app-DyAn8Ury.esm.js.map} +1 -1
  9. package/.chunks/{datepicker-06ASYGz9.amd.js → datepicker-BmHkZfBO.amd.js} +2 -2
  10. package/.chunks/{datepicker-06ASYGz9.amd.js.map → datepicker-BmHkZfBO.amd.js.map} +1 -1
  11. package/.chunks/{datepicker-06ASYGz9.esm.js → datepicker-BmHkZfBO.esm.js} +2 -2
  12. package/.chunks/{datepicker-06ASYGz9.esm.js.map → datepicker-BmHkZfBO.esm.js.map} +1 -1
  13. package/.chunks/{dialog-TwUfHMd8.amd.js → dialog-bIV6Y2PF.amd.js} +2 -2
  14. package/.chunks/{dialog-TwUfHMd8.amd.js.map → dialog-bIV6Y2PF.amd.js.map} +1 -1
  15. package/.chunks/{dialog-TwUfHMd8.esm.js → dialog-bIV6Y2PF.esm.js} +4 -4
  16. package/.chunks/{dialog-TwUfHMd8.esm.js.map → dialog-bIV6Y2PF.esm.js.map} +1 -1
  17. package/.chunks/{dialog_regionSelectorRegions-D2PDcJOI.amd.js → dialog_regionSelectorRegions-gPKA93af.amd.js} +2 -2
  18. package/.chunks/{dialog_regionSelectorRegions-D2PDcJOI.amd.js.map → dialog_regionSelectorRegions-gPKA93af.amd.js.map} +1 -1
  19. package/.chunks/{dialog_regionSelectorRegions-D2PDcJOI.esm.js → dialog_regionSelectorRegions-gPKA93af.esm.js} +5 -5
  20. package/.chunks/{dialog_regionSelectorRegions-D2PDcJOI.esm.js.map → dialog_regionSelectorRegions-gPKA93af.esm.js.map} +1 -1
  21. package/.chunks/{dialogs-69JOByg2.amd.js → dialogs-CE8F7A0M.amd.js} +2 -2
  22. package/.chunks/{dialogs-69JOByg2.amd.js.map → dialogs-CE8F7A0M.amd.js.map} +1 -1
  23. package/.chunks/{dialogs-69JOByg2.esm.js → dialogs-CE8F7A0M.esm.js} +3 -3
  24. package/.chunks/{dialogs-69JOByg2.esm.js.map → dialogs-CE8F7A0M.esm.js.map} +1 -1
  25. package/.chunks/{forms-3oS4Utyg.amd.js → forms-DByj6MWE.amd.js} +2 -2
  26. package/.chunks/{forms-3oS4Utyg.amd.js.map → forms-DByj6MWE.amd.js.map} +1 -1
  27. package/.chunks/{forms-3oS4Utyg.esm.js → forms-DByj6MWE.esm.js} +5 -5
  28. package/.chunks/{forms-3oS4Utyg.esm.js.map → forms-DByj6MWE.esm.js.map} +1 -1
  29. package/.chunks/{formsExt-CdLb48ea.amd.js → formsExt-LekJqOck.amd.js} +2 -2
  30. package/.chunks/formsExt-LekJqOck.amd.js.map +1 -0
  31. package/.chunks/{formsExt-CdLb48ea.esm.js → formsExt-LekJqOck.esm.js} +5 -4
  32. package/.chunks/formsExt-LekJqOck.esm.js.map +1 -0
  33. package/.chunks/{notice-CBraHnl2.amd.js → notice-Ds5K-ei_.amd.js} +2 -2
  34. package/.chunks/{notice-CBraHnl2.amd.js.map → notice-Ds5K-ei_.amd.js.map} +1 -1
  35. package/.chunks/{notice-CBraHnl2.esm.js → notice-Ds5K-ei_.esm.js} +2 -2
  36. package/.chunks/{notice-CBraHnl2.esm.js.map → notice-Ds5K-ei_.esm.js.map} +1 -1
  37. package/.chunks/popup-BxGYabRi.amd.js +2 -0
  38. package/.chunks/popup-BxGYabRi.amd.js.map +1 -0
  39. package/.chunks/{popup--ITACA7I.esm.js → popup-BxGYabRi.esm.js} +8 -7
  40. package/.chunks/popup-BxGYabRi.esm.js.map +1 -0
  41. package/.chunks/popup-Cvyqovn6.amd.js +2 -0
  42. package/.chunks/popup-Cvyqovn6.amd.js.map +1 -0
  43. package/.chunks/{popup-CAy1LTfy.esm.js → popup-Cvyqovn6.esm.js} +4 -4
  44. package/.chunks/popup-Cvyqovn6.esm.js.map +1 -0
  45. package/.chunks/{utils-BAP3Hzmk.amd.js → utils-mRLC32Uo.amd.js} +2 -2
  46. package/.chunks/{utils-BAP3Hzmk.amd.js.map → utils-mRLC32Uo.amd.js.map} +1 -1
  47. package/.chunks/{utils-BAP3Hzmk.esm.js → utils-mRLC32Uo.esm.js} +4 -4
  48. package/.chunks/{utils-BAP3Hzmk.esm.js.map → utils-mRLC32Uo.esm.js.map} +1 -1
  49. package/.chunks/{utils-DI45Ujdf.amd.js → utils-sPSU5tXH.amd.js} +2 -2
  50. package/.chunks/{utils-DI45Ujdf.amd.js.map → utils-sPSU5tXH.amd.js.map} +1 -1
  51. package/.chunks/{utils-DI45Ujdf.esm.js → utils-sPSU5tXH.esm.js} +3 -3
  52. package/.chunks/{utils-DI45Ujdf.esm.js.map → utils-sPSU5tXH.esm.js.map} +1 -1
  53. package/.chunks/worker-Cx7e_9o9.amd.js +2 -0
  54. package/.chunks/worker-Cx7e_9o9.amd.js.map +1 -0
  55. package/.chunks/{worker-OsfdwnCi.esm.js → worker-Cx7e_9o9.esm.js} +21 -3
  56. package/.chunks/worker-Cx7e_9o9.esm.js.map +1 -0
  57. package/api/index.amd.js +1 -1
  58. package/api/index.amd.js.map +1 -1
  59. package/api/index.js +1 -1
  60. package/assets/project.css +1 -1
  61. package/autoload-css-manifest.amd.json +4 -4
  62. package/autoload-css-manifest.json +4 -4
  63. package/charts/charts.amd.js +1 -1
  64. package/charts/charts.amd.js.map +1 -1
  65. package/charts/charts.js +1 -1
  66. package/core/app.amd.js +1 -1
  67. package/core/app.amd.js.map +1 -1
  68. package/core/app.js +4 -4
  69. package/dialog/dialog.amd.js +1 -1
  70. package/dialog/dialog.amd.js.map +1 -1
  71. package/dialog/dialog.js +3 -3
  72. package/forms/forms.amd.js +1 -1
  73. package/forms/forms.amd.js.map +1 -1
  74. package/forms/forms.js +1 -1
  75. package/formsExt/formsExt.amd.js +1 -1
  76. package/formsExt/formsExt.amd.js.map +1 -1
  77. package/formsExt/formsExt.js +1 -1
  78. package/layout/layout.amd.js +1 -1
  79. package/layout/layout.amd.js.map +1 -1
  80. package/layout/layout.js +1 -1
  81. package/package.json +1 -1
  82. package/popup/popup.amd.js +1 -1
  83. package/popup/popup.amd.js.map +1 -1
  84. package/popup/popup.js +1 -1
  85. package/popup/worker.amd.js +1 -1
  86. package/popup/worker.amd.js.map +1 -1
  87. package/popup/worker.js +1 -1
  88. package/project/project.amd.js +1 -1
  89. package/project/project.amd.js.map +1 -1
  90. package/project/project.js +260 -215
  91. package/project/project.js.map +1 -1
  92. package/src/components/formsExt/selector2/types.d.ts +10 -0
  93. package/src/components/popup/lib/worker.d.ts +13 -1
  94. package/src/components/project/groupSelector/groups/types.d.ts +6 -0
  95. package/src/components/project/groupSelector/groups/utils.d.ts +43 -1
  96. package/src/components/project/groupSelector/types.d.ts +8 -0
  97. package/tabsView/tabsView.amd.js +1 -1
  98. package/tabsView/tabsView.amd.js.map +1 -1
  99. package/tabsView/tabsView.js +2 -2
  100. package/utils/clipboard.amd.js +1 -1
  101. package/utils/clipboard.amd.js.map +1 -1
  102. package/utils/clipboard.js +1 -1
  103. package/utils/date.amd.js +1 -1
  104. package/utils/date.amd.js.map +1 -1
  105. package/utils/date.js +1 -1
  106. package/utils/device.amd.js +1 -1
  107. package/utils/device.amd.js.map +1 -1
  108. package/utils/device.js +1 -1
  109. package/utils/lodash.amd.js +1 -1
  110. package/utils/lodash.amd.js.map +1 -1
  111. package/utils/lodash.js +1 -1
  112. package/utils/price.amd.js +1 -1
  113. package/utils/price.amd.js.map +1 -1
  114. package/utils/price.js +1 -1
  115. package/utils/searchers.amd.js +1 -1
  116. package/utils/searchers.amd.js.map +1 -1
  117. package/utils/searchers.js +1 -1
  118. package/utils/string.amd.js +1 -1
  119. package/utils/string.amd.js.map +1 -1
  120. package/utils/string.js +1 -1
  121. package/.chunks/formsExt-CdLb48ea.amd.js.map +0 -1
  122. package/.chunks/formsExt-CdLb48ea.esm.js.map +0 -1
  123. package/.chunks/popup--ITACA7I.amd.js +0 -2
  124. package/.chunks/popup--ITACA7I.amd.js.map +0 -1
  125. package/.chunks/popup--ITACA7I.esm.js.map +0 -1
  126. package/.chunks/popup-CAy1LTfy.amd.js +0 -2
  127. package/.chunks/popup-CAy1LTfy.amd.js.map +0 -1
  128. package/.chunks/popup-CAy1LTfy.esm.js.map +0 -1
  129. package/.chunks/worker-OsfdwnCi.amd.js +0 -2
  130. package/.chunks/worker-OsfdwnCi.amd.js.map +0 -1
  131. package/.chunks/worker-OsfdwnCi.esm.js.map +0 -1
@@ -5,23 +5,23 @@
5
5
  _autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
6
6
  /* end import css */
7
7
 
8
- import "../.chunks/api-DW3Y93Lp.esm.js";
9
- import { E as e, O as t, P as n, h as r, n as i } from "../.chunks/forms-3oS4Utyg.esm.js";
8
+ import "../.chunks/api-CBMWBeCS.esm.js";
9
+ import { E as e, O as t, P as n, h as r, n as i } from "../.chunks/forms-DByj6MWE.esm.js";
10
10
  import { n as a, t as o } from "../.chunks/field-CjkpGeA7.esm.js";
11
11
  import { storage as s } from "../utils/dom.js";
12
- import { t as c } from "../.chunks/worker-OsfdwnCi.esm.js";
13
- import "../.chunks/app-Df8tFGnf.esm.js";
12
+ import { t as c } from "../.chunks/worker-Cx7e_9o9.esm.js";
13
+ import "../.chunks/app-DyAn8Ury.esm.js";
14
14
  import { validUrl as l } from "../utils/check.js";
15
15
  import { ellipsis as u } from "../utils/string.js";
16
- import { t as d } from "../.chunks/utils-DI45Ujdf.esm.js";
16
+ import { t as d } from "../.chunks/utils-sPSU5tXH.esm.js";
17
17
  import { getDeviceGIcon as f, getLangLabel as p, getSearcherGIcon as m } from "../utils/searchers.js";
18
18
  import { invertKeyboardLayout as h } from "../utils/keyboard.js";
19
- import { c as ee, o as g, s as _ } from "../.chunks/popup-CAy1LTfy.esm.js";
20
- import { d as v, s as y, u as b } from "../.chunks/formsExt-CdLb48ea.esm.js";
19
+ import { c as g, n as _, o as v, r as ee, s as te } from "../.chunks/popup-Cvyqovn6.esm.js";
20
+ import { d as ne, s as y, u as b } from "../.chunks/formsExt-LekJqOck.esm.js";
21
21
  import "../popup/worker.js";
22
- import { Fragment as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createSlots as te, createTextVNode as D, createVNode as O, defineComponent as k, isRef as ne, mergeModels as A, mergeProps as re, nextTick as ie, normalizeClass as j, onMounted as ae, openBlock as M, reactive as oe, ref as N, renderList as P, renderSlot as se, resolveComponent as ce, resolveDirective as le, resolveDynamicComponent as ue, shallowRef as de, toDisplayString as F, toValue as fe, unref as I, useModel as L, watch as R, withCtx as z, withDirectives as pe, withKeys as me, withModifiers as B } from "vue";
22
+ import { Fragment as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createSlots as re, createTextVNode as D, createVNode as O, defineComponent as k, isRef as ie, mergeModels as A, mergeProps as ae, nextTick as oe, normalizeClass as j, onMounted as se, openBlock as M, reactive as ce, ref as N, renderList as P, renderSlot as le, resolveComponent as ue, resolveDirective as de, resolveDynamicComponent as fe, shallowRef as pe, toDisplayString as F, toValue as me, unref as I, useModel as L, watch as R, withCtx as z, withDirectives as he, withKeys as ge, withModifiers as B } from "vue";
23
23
  //#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
24
- var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _e = /* @__PURE__ */ k({
24
+ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, ye = /* @__PURE__ */ k({
25
25
  __name: "competitorSelector",
26
26
  props: /* @__PURE__ */ A({
27
27
  modelValue: {},
@@ -44,7 +44,7 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
44
44
  content: ""
45
45
  };
46
46
  });
47
- return (e, i) => (M(), T("div", he, [I(t).state.isMobile ? (M(), C(_, { key: 0 }, {
47
+ return (e, i) => (M(), T("div", _e, [I(t).state.isMobile ? (M(), C(te, { key: 0 }, {
48
48
  opener: z(() => [O(r, {
49
49
  class: "top-competitorSelector_opener",
50
50
  color: "theme",
@@ -54,13 +54,13 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
54
54
  default: z(() => [D(F(n.items.find((e) => e.value === a.value?.[0])?.content), 1)]),
55
55
  _: 1
56
56
  })]),
57
- contentList: z(() => [(M(!0), T(x, null, P(n.items, (e) => (M(), C(g, {
57
+ contentList: z(() => [(M(!0), T(x, null, P(n.items, (e) => (M(), C(v, {
58
58
  class: j({ "top-active": a.value?.includes(e.value) }),
59
59
  "data-top-icon": e.icon,
60
60
  title: e.title,
61
61
  onClick: () => a.value = [e.value]
62
62
  }, {
63
- default: z(() => [E("span", ge, F(e.content), 1)]),
63
+ default: z(() => [E("span", ve, F(e.content), 1)]),
64
64
  _: 2
65
65
  }, 1032, [
66
66
  "class",
@@ -69,7 +69,7 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
69
69
  "onClick"
70
70
  ]))), 256))]),
71
71
  _: 1
72
- })) : (M(), C(v, {
72
+ })) : (M(), C(ne, {
73
73
  key: 1,
74
74
  modelValue: a.value,
75
75
  "onUpdate:modelValue": i[0] ||= (e) => a.value = e,
@@ -84,12 +84,12 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
84
84
  "selectAllItem"
85
85
  ]))]));
86
86
  }
87
- }), ve = (e, t) => S(() => fe(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
87
+ }), be = (e, t) => S(() => me(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
88
88
  value: e.id,
89
89
  title: e.url + ` [${e.id}]`,
90
- icon: e.id === fe(t) ? "" : "",
90
+ icon: e.id === me(t) ? "" : "",
91
91
  content: e.name
92
- }))), ye = {
92
+ }))), xe = {
93
93
  0: "Yandex",
94
94
  1: "Google",
95
95
  4: "YouTube",
@@ -99,25 +99,25 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
99
99
  9: "GoogleStore",
100
100
  20: "Yandex.com",
101
101
  21: "Yandex.com.tr"
102
- }, be = {
102
+ }, Se = {
103
103
  key: -2,
104
104
  name: "--",
105
105
  index: -2
106
- }, xe = {
106
+ }, Ce = {
107
107
  key: -2,
108
108
  name: "--",
109
- regions: [be],
110
- regionByIndex: new Map([[-2, be]])
109
+ regions: [Se],
110
+ regionByIndex: new Map([[-2, Se]])
111
111
  }, V = {
112
112
  key: -2,
113
113
  name: "Autoselect",
114
114
  index: -2
115
- }, Se = {
115
+ }, we = {
116
116
  key: -2,
117
117
  name: "Autoselect",
118
118
  regions: [V],
119
119
  regionByIndex: new Map([[-2, V]])
120
- }, Ce = {
120
+ }, Te = {
121
121
  countryCode: "00",
122
122
  depth: 1,
123
123
  device: 0,
@@ -125,10 +125,10 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
125
125
  index: -1,
126
126
  lang: "ru",
127
127
  name: "Without region"
128
- }, we = () => (V.name = e().Common.Autoselect, V), Te = () => (we(), Se.name = e().Common.Autoselect, console.log(Se), Se), Ee = () => (Ce.name = e().Keywords.Without_region, Ce), De = (e = "", t = !1, n = []) => {
128
+ }, Ee = () => (V.name = e().Common.Autoselect, V), De = () => (Ee(), we.name = e().Common.Autoselect, console.log(we), we), Oe = () => (Te.name = e().Keywords.Without_region, Te), ke = (e = "", t = !1, n = []) => {
129
129
  let r;
130
- return r = e ? ke(n, e) : Oe(n), t && r.set(-2, Te()), r.size || r.set(-2, xe), r;
131
- }, Oe = (e, t = !0, n = [], r = "") => {
130
+ return r = e ? je(n, e) : Ae(n), t && r.set(-2, De()), r.size || r.set(-2, Ce), r;
131
+ }, Ae = (e, t = !0, n = [], r = "") => {
132
132
  let i = /* @__PURE__ */ new Map();
133
133
  return e.forEach((e) => {
134
134
  if (!e.enabled || r && typeof e.key == "number" && e.key > 1) return;
@@ -142,31 +142,31 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
142
142
  if (i.has(e)) return;
143
143
  let t = {
144
144
  key: e,
145
- name: ye[e],
145
+ name: xe[e],
146
146
  regions: [],
147
147
  regionByIndex: /* @__PURE__ */ new Map()
148
148
  };
149
149
  i.set(t.key, t);
150
150
  }), i;
151
- }, ke = (e, t) => {
152
- let n = Oe(e, !1, [0, 1], t);
151
+ }, je = (e, t) => {
152
+ let n = Ae(e, !1, [0, 1], t);
153
153
  if (n.has(2)) {
154
154
  let e = n.get(2);
155
155
  e && (e.regionByIndex = /* @__PURE__ */ new Map());
156
156
  }
157
157
  return (t === "volume" || t === "cost_forecast") && n.forEach((e) => {
158
158
  if (!e.regionByIndex) return;
159
- let t = { ...Ee() };
159
+ let t = { ...Oe() };
160
160
  e.regionByIndex.set(t.index, t);
161
161
  }), n;
162
- }, Ae = (e, t, n = []) => {
163
- let r = De(e, !1, n), i;
162
+ }, Me = (e, t, n = []) => {
163
+ let r = ke(e, !1, n), i;
164
164
  return r.forEach((n) => {
165
165
  if (!(t.searcher_key !== void 0 && t.searcher_key != n.key) && n.regions && (n.regions.forEach((r) => {
166
166
  if (!i && !(t.key !== void 0 && t.key != r.key) && !(t.index !== void 0 && t.index != r.index) && !(!e && (t.lang !== void 0 && t.lang != r.lang || t.device !== void 0 && t.device != r.device))) return r.searcher_key = n.key, i = r, !1;
167
167
  }), i)) return !1;
168
168
  }), i;
169
- }, je = d(() => import("../.chunks/dialog_regionSelectorRegions-D2PDcJOI.esm.js")), Me = (t, n) => {
169
+ }, Ne = d(() => import("../.chunks/dialog_regionSelectorRegions-gPKA93af.esm.js")), Pe = (t, n) => {
170
170
  let r = e();
171
171
  return {
172
172
  searcherKey: N(n.value.keys().next().value ?? -2),
@@ -194,7 +194,7 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
194
194
  return e;
195
195
  })
196
196
  };
197
- }, Ne = (t, n) => {
197
+ }, Fe = (t, n) => {
198
198
  let r = e(), i = N(-2);
199
199
  t.modelValue.length === 1 && (i.value = t.modelValue[0]), i.value === -2 && (t.forMode ? i.value = n.value?.regionByIndex.values().next().value?.key ?? -2 : i.value = n.value?.regionByIndex.keys().next().value ?? -2);
200
200
  let a = S(() => {
@@ -243,7 +243,7 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
243
243
  regionIndex: i,
244
244
  optionByRegionIndex: a
245
245
  };
246
- }, Pe = (e, t, n) => {
246
+ }, Ie = (e, t, n) => {
247
247
  let r = N([]), i = () => {
248
248
  if (e.onlySearcher && t.value) {
249
249
  r.value = Array.from(t.value.keys());
@@ -261,15 +261,15 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
261
261
  return R(r, () => {
262
262
  a();
263
263
  }), e.addCompare && i(), { regionsIndexes: r };
264
- }, Fe = (e) => {
265
- let t = S(() => De(e.forMode, e.autoRegion, e.searchers)), n = S(() => t.value.get(i.searcherKey.value) || xe), r = S(() => {
264
+ }, Le = (e) => {
265
+ let t = S(() => ke(e.forMode, e.autoRegion, e.searchers)), n = S(() => t.value.get(i.searcherKey.value) || Ce), r = S(() => {
266
266
  let e = /* @__PURE__ */ new Set();
267
267
  return t.value.forEach((t) => {
268
268
  t.regionByIndex.forEach((t) => {
269
269
  t.index !== -1 && t.index !== -2 && e.add(t.index);
270
270
  });
271
271
  }), e;
272
- }), i = Me(e, t), a = Ne(e, n), o = Pe(e, t, r);
272
+ }), i = Pe(e, t), a = Fe(e, n), o = Ie(e, t, r);
273
273
  R(t, () => {
274
274
  if (e.onlySearcher ? o.regionsIndexes.value = Array.from(t.value.keys()) : o.regionsIndexes.value = o.regionsIndexes.value.filter((e) => r.value.has(e)), i.searcherKey.value === -1) return;
275
275
  let s = t.value.keys().next().value;
@@ -293,7 +293,7 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
293
293
  let t = a.regionIndex.value;
294
294
  if (e.forMode) {
295
295
  let n = a.regionIndex.value;
296
- t = Ae(e.forMode, {
296
+ t = Me(e.forMode, {
297
297
  searcher_key: s(),
298
298
  key: n
299
299
  }, e.searchers)?.index;
@@ -315,7 +315,7 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
315
315
  if (e !== void 0) return l()?.regionByIndex?.get(e);
316
316
  }
317
317
  };
318
- }, Ie = /* @__PURE__ */ k({
318
+ }, Re = /* @__PURE__ */ k({
319
319
  __name: "regionSelector",
320
320
  props: /* @__PURE__ */ A({
321
321
  projectId: {},
@@ -346,13 +346,13 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
346
346
  }),
347
347
  emits: ["update:modelValue", "update:modelValueSingle"],
348
348
  setup(e, { expose: t }) {
349
- let n = e, a = L(e, "modelValue"), o = L(e, "modelValueSingle"), { selectSearcher: s, selectRegion: c, compare: l, searcherByKey: u, allRegionsIndexes: d, getSearcher: f, getRegion: p } = Fe(n), m = () => {
349
+ let n = e, a = L(e, "modelValue"), o = L(e, "modelValueSingle"), { selectSearcher: s, selectRegion: c, compare: l, searcherByKey: u, allRegionsIndexes: d, getSearcher: f, getRegion: p } = Le(n), m = () => {
350
350
  let e = [];
351
351
  u.value.forEach((t) => {
352
352
  t.enabled && t.regions.forEach((t) => {
353
353
  t.enabled && e.push(t);
354
354
  });
355
- }), je.open("regions", {
355
+ }), Ne.open("regions", {
356
356
  regions: e,
357
357
  regionsIndexes: l.regionsIndexes.value,
358
358
  "@update:regionsIndexes": (e) => l.regionsIndexes.value = e
@@ -469,14 +469,14 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
469
469
  name: "/",
470
470
  path: "/"
471
471
  };
472
- function Le(t) {
472
+ function ze(t) {
473
473
  return t ? e()?.Common.All_folders : "/ (" + e()?.Keywords.Root_folder + ")";
474
474
  }
475
- var Re = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
476
- a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Le(t));
475
+ var Be = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
476
+ a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = ze(t));
477
477
  let o = i > 1 ? "-".repeat(i - 1) + " " : "";
478
- o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Re(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
479
- }), n), ze = (e, t) => e.gen(`/get/${t}/folders/`, [
478
+ o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Be(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
479
+ }), n), Ve = (e, t) => e.gen(`/get/${t}/folders/`, [
480
480
  "id",
481
481
  "parent_id",
482
482
  "name",
@@ -487,7 +487,7 @@ var Re = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
487
487
  });
488
488
  //#endregion
489
489
  //#region src/core/utils/composables/useWatch.ts
490
- function Be(e, t, n) {
490
+ function He(e, t, n) {
491
491
  let r = Object.keys(e);
492
492
  return R(r.map((t) => e[t]), (e, n, i) => {
493
493
  let a = {};
@@ -504,7 +504,7 @@ function Be(e, t, n) {
504
504
  }
505
505
  //#endregion
506
506
  //#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
507
- var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
507
+ var Ue = ["innerHTML"], We = /* @__PURE__ */ k({
508
508
  __name: "folders",
509
509
  props: /* @__PURE__ */ A({
510
510
  folderId: {},
@@ -527,12 +527,12 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
527
527
  }),
528
528
  emits: ["update:folderId", "update:folder"],
529
529
  setup(e) {
530
- let t = e, n = L(e, "folderId"), r = L(e, "folder"), i = t.client && !t.folders ? ze(t.client, t.service) : void 0, a = N(null);
530
+ let t = e, n = L(e, "folderId"), r = L(e, "folder"), i = t.client && !t.folders ? Ve(t.client, t.service) : void 0, a = N(null);
531
531
  R(() => t.projectId, () => {
532
532
  i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
533
533
  }, { immediate: !0 });
534
- let o = S(() => Re(t.folders ?? { root: [H] }, t.canSelectAll));
535
- return Be({
534
+ let o = S(() => Be(t.folders ?? { root: [H] }, t.canSelectAll));
535
+ return He({
536
536
  modelFolder: r,
537
537
  modelFolderId: n
538
538
  }, async (e) => {
@@ -555,7 +555,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
555
555
  addChanger: e.addChanger,
556
556
  useCache: ""
557
557
  }, {
558
- item: z(({ item: e }) => [E("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ve)]),
558
+ item: z(({ item: e }) => [E("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ue)]),
559
559
  _: 1
560
560
  }, 8, [
561
561
  "modelValue",
@@ -576,7 +576,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
576
576
  name: "All groups",
577
577
  folder_id: H.id,
578
578
  folder_path: H.path
579
- }, G = () => (W.name = e()?.Common.All_groups, W), Ue = () => (W.name = e()?.Keywords.Choose_group, W), We = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), Ge = (e, t) => e.gen(`/get/${t}/groups/`, [
579
+ }, G = () => (W.name = e()?.Common.All_groups, W), Ge = () => (W.name = e()?.Keywords.Choose_group, W), Ke = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), qe = (e, t) => e.gen(`/get/${t}/groups/`, [
580
580
  "id",
581
581
  "name",
582
582
  "folder_id",
@@ -584,10 +584,10 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
584
584
  ]).changeParams({
585
585
  folder_id_depth: !0,
586
586
  limit: 100
587
- }), Ke = (e, t) => e.gen(`/add/${t}/groups/`), qe = { class: "top-groupSelector_groupItem" }, Je = {
587
+ }), Je = (e, t) => e.gen(`/add/${t}/groups/`), Ye = (e, t) => e.gen(`/del/${t}/groups/`), Xe = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Ze = { class: "top-groupSelector_groupItem top-ellipsis1" }, Qe = {
588
588
  key: 0,
589
589
  class: "top-comment"
590
- }, Ye = ["innerHTML"], Xe = ["innerHTML"], Ze = /* @__PURE__ */ k({
590
+ }, $e = ["innerHTML"], et = ["innerHTML"], tt = ["innerHTML"], nt = /* @__PURE__ */ k({
591
591
  __name: "groups",
592
592
  props: /* @__PURE__ */ A({
593
593
  groupId: {},
@@ -600,6 +600,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
600
600
  default: void 0
601
601
  },
602
602
  canAdd: { type: [String, Boolean] },
603
+ canEditAndDel: { type: Boolean },
603
604
  canSelectAll: { type: [Boolean, String] },
604
605
  autoselect: { default: "first" },
605
606
  addChanger: {
@@ -621,25 +622,25 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
621
622
  }),
622
623
  emits: /* @__PURE__ */ A(["addGroup"], ["update:groupId", "update:group"]),
623
624
  setup(e, { emit: t }) {
624
- let n = e, r = t, i = L(e, "groupId"), a = L(e, "group"), s = n.client && !n.groups ? Ge(n.client, n.service) : void 0, c = n.client ? Ke(n.client, n.service) : void 0, l = N(null), u = N(void 0), d = o("folder_id", "EQUALS", [n.folder?.id ?? 0]);
625
+ let n = e, r = t, i = L(e, "groupId"), a = L(e, "group"), s = n.client && !n.groups ? qe(n.client, n.service) : void 0, c = n.client ? Je(n.client, n.service) : void 0, l = n.client ? Ye(n.client, n.service) : void 0, u = n.client ? Xe(n.client, n.service) : void 0, d = N(null), f = N(void 0), p = o("folder_id", "EQUALS", [n.folder?.id ?? 0]);
625
626
  s?.changeParams({
626
627
  project_id: n.projectId,
627
628
  folder_id_depth: !0,
628
- filters: [d]
629
+ filters: [p]
629
630
  }), n.on !== void 0 && s?.params.filters?.push(o("on", "EQUALS", [Number(n.on)]));
630
- let f = (e) => {
631
+ let m = (e) => {
631
632
  a.value = e, i.value = e.id;
632
633
  };
633
- Be({
634
+ He({
634
635
  projectId: () => n.projectId,
635
636
  folderId: () => n.folder?.id,
636
637
  canSelectAll: () => n.canSelectAll
637
638
  }, (e) => {
638
- if (e.projectId && (s?.changeParams({ project_id: n.projectId }), s?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + n.projectId })), e.folderId && (d.values = [n.folder?.id ?? 0], n.groups && (u.value = We(n.groups, n.on, n.folder))), l.value?.resetCache(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && i.value !== null) {
639
+ if (e.projectId && (s?.changeParams({ project_id: n.projectId }), s?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + n.projectId })), e.folderId && (p.values = [n.folder?.id ?? 0], n.groups && (f.value = Ke(n.groups, n.on, n.folder))), d.value?.resetCache(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && i.value !== null) {
639
640
  let e;
640
- n.autoselect === "first" && (e = u.value?.[0], n.canSelectAll && (e = oe(G()))), (n.autoselect === "placeholder" || !e) && (e = Ue()), f(e);
641
+ n.autoselect === "first" && (e = f.value?.[0], n.canSelectAll && (e = ce(G()))), (n.autoselect === "placeholder" || !e) && (e = Ge()), m(e);
641
642
  }
642
- }, { immediate: !0 }), Be({
643
+ }, { immediate: !0 }), He({
643
644
  modelGroup: a,
644
645
  modelGroupId: i
645
646
  }, async (e) => {
@@ -650,28 +651,28 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
650
651
  }
651
652
  if (!(n.canAdd && i.value === null)) {
652
653
  if (n.groups) {
653
- let e = u.value?.find((e) => e.id === i.value);
654
- if (!e && n.canSelectAll && (e = G()), e) f(e);
654
+ let e = f.value?.find((e) => e.id === i.value);
655
+ if (!e && n.canSelectAll && (e = G()), e) m(e);
655
656
  else {
656
- let e = u.value?.[0];
657
- e && !i.value ? f(e) : f(U);
657
+ let e = f.value?.[0];
658
+ e && !i.value ? m(e) : m(U);
658
659
  }
659
660
  }
660
661
  if (n.client && !n.groups && (i.value || i.value === 0 && !n.canSelectAll)) {
661
- let e = Ge(n.client, n.service).changeParams({
662
+ let e = qe(n.client, n.service).changeParams({
662
663
  project_id: n.projectId,
663
664
  id: i.value,
664
- filters: [d]
665
+ filters: [p]
665
666
  });
666
667
  e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + n.projectId });
667
668
  let t = await e.call();
668
669
  if (!t.errors?.length && !t.result) return;
669
- !t.errors && t.result[0] ? f(t.result[0]) : f(U);
670
+ !t.errors && t.result[0] ? m(t.result[0]) : m(U);
670
671
  }
671
672
  }
672
673
  }
673
674
  }, { immediate: !0 });
674
- let p = async (e) => {
675
+ let h = async (e) => {
675
676
  if (n.canAdd !== "api" || !c) return;
676
677
  let t = a.value, i = await c.changeParams({
677
678
  project_id: n.projectId,
@@ -681,17 +682,31 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
681
682
  }).call();
682
683
  if (i.result) {
683
684
  let e = i.result[0];
684
- f(e), r("addGroup", e);
685
- } else f(t);
686
- l.value?.resetCache(!0);
685
+ m(e), r("addGroup", e);
686
+ } else m(t);
687
+ d.value?.resetCache(!0);
688
+ }, g = async (e, t) => {
689
+ u && ((await u.changeParams({
690
+ project_id: n.projectId,
691
+ id: e.id,
692
+ name: t
693
+ }).call()).errors || (a.value.id === e.id && m({
694
+ ...a.value,
695
+ name: t
696
+ }), d.value?.resetCache(!0)));
697
+ }, v = async (e) => {
698
+ l && ((await l.changeParams({
699
+ project_id: n.projectId,
700
+ id: e.id
701
+ }).call()).errors || (a.value.id === e.id && m(n.canSelectAll ? G() : U), d.value?.resetCache(!0)));
687
702
  };
688
703
  return (t, n) => (M(), C(y, {
689
704
  ref_key: "refSelector",
690
- ref: l,
705
+ ref: d,
691
706
  class: "top-groupSelector_group",
692
707
  modelValue: a.value,
693
708
  "onUpdate:modelValue": n[0] ||= (e) => a.value = e,
694
- items: u.value ?? e.groups,
709
+ items: f.value ?? e.groups,
695
710
  searchType: "inline",
696
711
  icon: e.addIcon ? "" : void 0,
697
712
  api: e.groups ? void 0 : I(s),
@@ -700,19 +715,46 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
700
715
  useAllItem: e.canSelectAll ? I(G)().name : !1,
701
716
  addChanger: e.addChanger,
702
717
  useCache: "",
703
- onAppendItem: p
704
- }, {
705
- item: z(({ item: n }) => [E("div", qe, [
706
- n.id === I(null) ? (M(), T("div", Je, F(t.$i18n.Common.Add) + ": ", 1)) : w("", !0),
707
- E("span", { innerHTML: n.name }, null, 8, Ye),
718
+ onAppendItem: h
719
+ }, re({
720
+ item: z(({ item: n }) => [E("div", Ze, [
721
+ n.id === I(null) ? (M(), T("div", Qe, F(t.$i18n.Common.Add) + ": ", 1)) : w("", !0),
722
+ E("span", {
723
+ class: "top-groupSelector_groupItemName top-ellipsis1",
724
+ innerHTML: n.name
725
+ }, null, 8, $e),
708
726
  n.folder_path && e.showPath ? (M(), T("span", {
709
727
  key: 1,
710
- class: "top-groupSelector_groupItemFolderPath",
728
+ class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
711
729
  innerHTML: n.folder_path
712
- }, null, 8, Xe)) : w("", !0)
730
+ }, null, 8, et)) : w("", !0)
713
731
  ])]),
714
- _: 1
715
- }, 8, [
732
+ _: 2
733
+ }, [e.canEditAndDel && e.client ? {
734
+ name: "actions",
735
+ fn: z(({ item: r }) => [r.id ? (M(), T(x, { key: 0 }, [O(_, {
736
+ submitText: t.$i18n.Common.Save,
737
+ defaultValue: r.name,
738
+ onSubmit: (e) => g(r, e)
739
+ }, {
740
+ opener: z(() => [...n[1] ||= [E("div", { "data-top-icon": "" }, null, -1)]]),
741
+ default: z(() => [...n[2] ||= []]),
742
+ _: 1
743
+ }, 8, [
744
+ "submitText",
745
+ "defaultValue",
746
+ "onSubmit"
747
+ ]), O(ee, {
748
+ isWarning: "",
749
+ submitText: t.$i18n.Common.Delete,
750
+ onSubmit: (e) => v(r)
751
+ }, {
752
+ opener: z(() => [...n[3] ||= [E("div", { "data-top-icon": "" }, null, -1)]]),
753
+ default: z(() => [E("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n["Ai.Tracker"].Delete_group_warning }, null, 8, tt)]),
754
+ _: 1
755
+ }, 8, ["submitText", "onSubmit"])], 64)) : w("", !0)]),
756
+ key: "0"
757
+ } : void 0]), 1032, [
716
758
  "modelValue",
717
759
  "items",
718
760
  "icon",
@@ -723,7 +765,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
723
765
  "addChanger"
724
766
  ]));
725
767
  }
726
- }), Qe = { class: "top-groupSelector" }, $e = /* @__PURE__ */ k({
768
+ }), rt = { class: "top-groupSelector" }, it = /* @__PURE__ */ k({
727
769
  __name: "groupSelector",
728
770
  props: /* @__PURE__ */ A({
729
771
  folderId: {},
@@ -739,6 +781,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
739
781
  },
740
782
  canSelectAllGroups: { type: Boolean },
741
783
  canAddGroup: { type: [String, Boolean] },
784
+ canEditAndDelGroup: { type: Boolean },
742
785
  autoselect: { default: "first" },
743
786
  addChanger: {
744
787
  type: Boolean,
@@ -776,14 +819,14 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
776
819
  ]),
777
820
  setup(e, { emit: t }) {
778
821
  let n = e, r = L(e, "folderId"), i = L(e, "folder"), a = L(e, "groupId"), o = L(e, "group"), s = t;
779
- i.value = Re(n.folders ?? { root: [H] }, n.canSelectAllGroups).get(r.value);
822
+ i.value = Be(n.folders ?? { root: [H] }, n.canSelectAllGroups).get(r.value);
780
823
  let c = n.groups?.find((e) => e.id === a.value);
781
- a.value || (c = n.groups?.[0]), n.canSelectAllGroups && !c && (c = G()), n.canSelectAllGroups && !c && (c = G()), (n.autoselect === "placeholder" || !c) && (c = Ue()), c ??= U, o.value = c;
824
+ a.value || (c = n.groups?.[0]), n.canSelectAllGroups && !c && (c = G()), n.canSelectAllGroups && !c && (c = G()), (n.autoselect === "placeholder" || !c) && (c = Ge()), c ??= U, o.value = c;
782
825
  let l = (e) => {
783
826
  let t;
784
827
  n.groups && e && (t = [...n.groups, e]), s("update:groups", t);
785
828
  };
786
- return (t, n) => (M(), T("div", Qe, [e.showFolders ? (M(), C(He, {
829
+ return (t, n) => (M(), T("div", rt, [e.showFolders ? (M(), C(We, {
787
830
  key: 0,
788
831
  folderId: r.value,
789
832
  "onUpdate:folderId": n[0] ||= (e) => r.value = e,
@@ -806,7 +849,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
806
849
  "addIcon",
807
850
  "client",
808
851
  "service"
809
- ])) : w("", !0), e.showGroups ? (M(), C(Ze, {
852
+ ])) : w("", !0), e.showGroups ? (M(), C(nt, {
810
853
  key: 1,
811
854
  groupId: a.value,
812
855
  "onUpdate:groupId": n[2] ||= (e) => a.value = e,
@@ -817,6 +860,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
817
860
  groups: e.groups,
818
861
  on: e.on,
819
862
  canAdd: e.canAddGroup,
863
+ canEditAndDel: e.canEditAndDelGroup,
820
864
  canSelectAll: e.canSelectAllGroups,
821
865
  autoselect: e.autoselect,
822
866
  addChanger: e.addChanger,
@@ -833,6 +877,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
833
877
  "groups",
834
878
  "on",
835
879
  "canAdd",
880
+ "canEditAndDel",
836
881
  "canSelectAll",
837
882
  "autoselect",
838
883
  "addChanger",
@@ -842,39 +887,39 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
842
887
  "service"
843
888
  ])) : w("", !0)]));
844
889
  }
845
- }), et = (e) => ({
890
+ }), at = (e) => ({
846
891
  id: null,
847
892
  name: e,
848
893
  listItemProps: { type: "title" }
849
- }), tt = {
894
+ }), ot = {
850
895
  scheduledUpdate: !1,
851
896
  manualUpdate: !1,
852
897
  guestProjects: !1
853
- }, nt = (t, n) => {
898
+ }, st = (t, n) => {
854
899
  let r = [], i = {
855
- scheduledUpdate: et(e().Projects.Scheduled_update),
856
- manualUpdate: et(e().Projects.Manual_update),
857
- guestProjects: et(e().Projects.Guest_projects)
900
+ scheduledUpdate: at(e().Projects.Scheduled_update),
901
+ manualUpdate: at(e().Projects.Manual_update),
902
+ guestProjects: at(e().Projects.Guest_projects)
858
903
  }, a = n ? {
859
904
  scheduledUpdate: !1,
860
905
  manualUpdate: !1,
861
906
  guestProjects: !1
862
- } : tt;
907
+ } : ot;
863
908
  for (let e of t) !a.scheduledUpdate && e.right?.startsWith("1") && e.on > 0 && (r.push(i.scheduledUpdate), a.scheduledUpdate = !0), !a.manualUpdate && e.right?.startsWith("1") && e.on === 0 && (r.push(i.manualUpdate), a.manualUpdate = !0), !a.guestProjects && e.right?.startsWith("0") && e.on >= 0 && (r.push(i.guestProjects), a.guestProjects = !0), r.push(e);
864
909
  return r;
865
- }, rt = (e) => e.map((e) => ({
910
+ }, ct = (e) => e.map((e) => ({
866
911
  ...e,
867
912
  listItemProps: { attrs: { title: e.name } }
868
- })), it = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(tt).forEach((e) => tt[e] = !1), nt(rt(e), n)), at = (e) => {
913
+ })), lt = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(ot).forEach((e) => ot[e] = !1), st(ct(e), n)), ut = (e) => {
869
914
  e = e.replace(/#.*/, "");
870
915
  let t = location.hash;
871
916
  return t = t.replace(/historyView=[^&]*/, ""), t = t.replace(/modelsKeys=[^&]*/, ""), t = t.replace(/competitorsIds=[^&]*/, ""), t = t.replace(/searchersKeys=[^&]*/, ""), t = t.replace(/regionIndex=[^&]*/, ""), t = t.replace(/regionsIndexes=[^&]*/, ""), t = t.replace(/folderId=[^&]*/, ""), t = t.replace(/groupId=[^&]*/, ""), t = t.replace(/tags=[^&]*/, ""), window.mo?.getHash && !window.mo.getHash("dataSort").toString().includes("0000-00-00") && (t = t.replace(/dataSort=[^&]*/, "")), t = t.replace(/%22historyView%22:[^,]*,/, ""), t = t.replace(/%22modelsKeys%22:\[[^\]]*\],/, ""), t = t.replace(/%22competitorsIds%22:\[[^\]]*],/, ""), t = t.replace(/%22searchersKeys%22:\[[^\]]*],/, ""), t = t.replace(/%22regionIndex%22:[^,]*,/, ""), t = t.replace(/%22regionsIndexes%22:\[[^\]]*],/, ""), t = t.replace(/%22folderId%22:[^,]*,/, ""), t = t.replace(/%22groupId%22:[^,]*,/, ""), t = t.replace(/%22tagsIds%22:\[[^\]]*],/, ""), /%22dataSort%22:\{[^}]*0000-00-00[^}]*}/.test(t) || (t = t.replace(/,?%22dataSort%22:\{[^}]*}(,?)/, "$1")), e + t;
872
- }, ot = (e, t) => {
917
+ }, dt = (e, t) => {
873
918
  t && t.target instanceof HTMLElement && c.close(t.target.closest(".top-popup-wrapper"));
874
- let n = at(e);
919
+ let n = ut(e);
875
920
  location.href = n;
876
- }, st = (e) => {
877
- let t = ct(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
921
+ }, ft = (e) => {
922
+ let t = pt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
878
923
  return n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
879
924
  "watcher",
880
925
  "indexing",
@@ -883,15 +928,15 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
883
928
  "direct",
884
929
  "adwords"
885
930
  ].includes(n[4]) && (i = n[4] + "/"), "https://" + t + "/" + r + e + "/" + i;
886
- }, ct = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, lt = (e) => {
931
+ }, pt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, mt = (e) => {
887
932
  let t = e.startsWith("http") ? e : "http://" + e;
888
933
  return t = t.replace(/"/g, "%22"), t;
889
- }, ut = (e, t) => {
934
+ }, ht = (e, t) => {
890
935
  let n = e.params.filters ?? [];
891
936
  n = n.filter((e) => e.name !== "GEN_SEARCH_STRING()");
892
937
  let r = h(t), i = t.replace(/([[^$.|?*+()])/g, "\\$1"), a = r.replace(/([[^$.|?*+()])/g, "\\$1");
893
938
  t && n.push(o("GEN_SEARCH_STRING()", "REGEXP", [`(${i}|${a})`])), e.changeParams({ filters: n });
894
- }, dt = (e, t, n) => {
939
+ }, gt = (e, t, n) => {
895
940
  let r = e.gen("/get/projects_2/projects/", [
896
941
  "id",
897
942
  "user_id",
@@ -911,14 +956,14 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
911
956
  ]
912
957
  }, r.options.onApiLoaded = (e, t, n) => {
913
958
  let r = t.data.filters.length === 1 && t.data.offset === 0 || t.data.limit === 1e3, i = t.data.limit === 100 && t.data.filters.length > 1 ? !0 : void 0;
914
- e.result = it(e.result, r, i), n?.(e, t);
959
+ e.result = lt(e.result, r, i), n?.(e, t);
915
960
  }, r;
916
- }, ft = (e) => e.gen("/add/projects_2/projects/"), pt = { class: "top-projectSelectorSubmenu_item" }, mt = [
961
+ }, _t = (e) => e.gen("/add/projects_2/projects/"), vt = { class: "top-projectSelectorSubmenu_item" }, yt = [
917
962
  "href",
918
963
  "title",
919
964
  "data-top-icon",
920
965
  "data-right"
921
- ], ht = { class: "top-projectSelectorSubmenu_item" }, gt = ["href"], _t = /* @__PURE__ */ k({
966
+ ], bt = { class: "top-projectSelectorSubmenu_item" }, xt = ["href"], St = /* @__PURE__ */ k({
922
967
  __name: "submenu",
923
968
  props: {
924
969
  id: {},
@@ -926,7 +971,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
926
971
  url: {}
927
972
  },
928
973
  setup(t) {
929
- let n = t, r = e(), i = ct(), a = [
974
+ let n = t, r = e(), i = pt(), a = [
930
975
  {
931
976
  href: `https://${i}/project/keywords/${n.id}/`,
932
977
  title: r.Common.Menu_phrases,
@@ -1007,8 +1052,8 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1007
1052
  return n.right.includes("0") ? a.filter((e) => n.right[e.right] === "1") : a;
1008
1053
  });
1009
1054
  return (e, n) => {
1010
- let r = ce("TopButton");
1011
- return M(), C(I(_), {
1055
+ let r = ue("TopButton");
1056
+ return M(), C(I(te), {
1012
1057
  class: "top-projectSelectorSubmenu",
1013
1058
  notch: !1,
1014
1059
  pos: "2"
@@ -1018,26 +1063,26 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1018
1063
  "data-top-icon": "",
1019
1064
  color: "theme"
1020
1065
  })]),
1021
- contentList: z(() => [(M(!0), T(x, null, P(o.value, (e) => (M(), T("li", pt, [E("a", {
1066
+ contentList: z(() => [(M(!0), T(x, null, P(o.value, (e) => (M(), T("li", vt, [E("a", {
1022
1067
  href: e.href,
1023
1068
  title: e.title,
1024
1069
  "data-top-icon": e.icon,
1025
1070
  "data-right": e.right
1026
- }, null, 8, mt)]))), 256)), E("li", ht, [E("a", {
1071
+ }, null, 8, yt)]))), 256)), E("li", bt, [E("a", {
1027
1072
  href: t.url,
1028
1073
  "data-top-icon": "",
1029
1074
  target: "_blank"
1030
- }, null, 8, gt)])]),
1075
+ }, null, 8, xt)])]),
1031
1076
  _: 1
1032
1077
  });
1033
1078
  };
1034
1079
  }
1035
- }), K = "ui_project_selector_total:", vt = 1440 * 60 * 1e3, q = de(), yt = N(0), J = N(null), bt = (e, t) => {
1080
+ }), K = "ui_project_selector_total:", Ct = 1440 * 60 * 1e3, q = pe(), wt = N(0), J = N(null), Tt = (e, t) => {
1036
1081
  localStorage.setItem(K + e, JSON.stringify({
1037
1082
  projectsTotal: t,
1038
- expiresAt: Date.now() + vt
1083
+ expiresAt: Date.now() + Ct
1039
1084
  }));
1040
- }, xt = (e) => {
1085
+ }, Et = (e) => {
1041
1086
  let t = localStorage.getItem(K + e);
1042
1087
  if (!t) return;
1043
1088
  let { projectsTotal: n, expiresAt: r } = JSON.parse(t);
@@ -1046,12 +1091,12 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1046
1091
  return;
1047
1092
  }
1048
1093
  return n;
1049
- }, St = (e, t = !0) => {
1050
- q.value = void 0, localStorage.removeItem(K + e), t && yt.value++;
1051
- }, Ct = { class: "top-projectSelector_item" }, wt = { class: "top-projectSelector_itemText" }, Tt = { class: "top-comment" }, Et = {
1094
+ }, Dt = (e, t = !0) => {
1095
+ q.value = void 0, localStorage.removeItem(K + e), t && wt.value++;
1096
+ }, Ot = { class: "top-projectSelector_item" }, kt = { class: "top-projectSelector_itemText" }, At = { class: "top-comment" }, jt = {
1052
1097
  key: 0,
1053
1098
  class: "top-comment"
1054
- }, Dt = ["href", "onClick"], Ot = 1e3, kt = /* @__PURE__ */ k({
1099
+ }, Mt = ["href", "onClick"], Nt = 1e3, Pt = /* @__PURE__ */ k({
1055
1100
  __name: "projectSelector",
1056
1101
  props: /* @__PURE__ */ A({
1057
1102
  modelValue: {},
@@ -1076,27 +1121,27 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1076
1121
  setup(t) {
1077
1122
  let n = e();
1078
1123
  if (!window.mo?.user?.id) throw Error("TopProjectSelector: не удалось определить userId. Компонент требует авторизованного пользователя (см. window.mo.user.id)");
1079
- let r = window.mo.user.id, i = t, a = L(t, "modelValue"), o = dt(i.client, r), s = ft(i.client), c = N(xt(r)), d = N(null), f = S(() => i.placeholder ?? n.Projects.Select_project), p = S(() => !q.value || !i.excludeProjectId ? q.value : q.value.filter((e) => e.id !== i.excludeProjectId)), m = S(() => {
1080
- if (!(!c.value && c.value !== 0)) return c.value < Ot ? "static" : "api";
1124
+ let r = window.mo.user.id, i = t, a = L(t, "modelValue"), o = gt(i.client, r), s = _t(i.client), c = N(Et(r)), d = N(null), f = S(() => i.placeholder ?? n.Projects.Select_project), p = S(() => !q.value || !i.excludeProjectId ? q.value : q.value.filter((e) => e.id !== i.excludeProjectId)), m = S(() => {
1125
+ if (!(!c.value && c.value !== 0)) return c.value < Nt ? "static" : "api";
1081
1126
  });
1082
- R(yt, () => {
1083
- _();
1127
+ R(wt, () => {
1128
+ v();
1084
1129
  }), R(a, () => {
1085
- !a.value.id || !i.addLinksToProjects || ot(st(a.value.id));
1130
+ !a.value.id || !i.addLinksToProjects || dt(ft(a.value.id));
1086
1131
  });
1087
1132
  let h = async () => {
1088
- J.value ||= dt(i.client, r, { limit: Ot }).call();
1133
+ J.value ||= gt(i.client, r, { limit: Nt }).call();
1089
1134
  let e = await J.value;
1090
1135
  if (e.errors) {
1091
1136
  J.value = null;
1092
1137
  return;
1093
1138
  }
1094
1139
  return J.value = null, e;
1095
- }, ee = async () => {
1140
+ }, g = async () => {
1096
1141
  if (c.value) return;
1097
1142
  let e = await h();
1098
- e && (c.value = e.total, m.value === "static" && !q.value && (q.value = e.result), c.value && bt(r, c.value));
1099
- }, g = async (e) => {
1143
+ e && (c.value = e.total, m.value === "static" && !q.value && (q.value = e.result), c.value && Tt(r, c.value));
1144
+ }, _ = async (e) => {
1100
1145
  let t = await s.changeParams({
1101
1146
  url: e.name,
1102
1147
  name: e.name
@@ -1116,21 +1161,21 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1116
1161
  ...q.value.slice(0, i),
1117
1162
  n,
1118
1163
  ...q.value.slice(i)
1119
- ], c.value && (c.value += 1, bt(r, c.value));
1164
+ ], c.value && (c.value += 1, Tt(r, c.value));
1120
1165
  }
1121
- m.value === "api" && St(r);
1166
+ m.value === "api" && Dt(r);
1122
1167
  }
1123
- }, _ = () => {
1168
+ }, v = () => {
1124
1169
  m.value === "api" && d.value?.resetCache(!0);
1125
- }, v = async () => {
1170
+ }, ee = async () => {
1126
1171
  if (q.value || m.value !== "static") return;
1127
1172
  let e = await h();
1128
1173
  e && (q.value = e.result);
1129
1174
  };
1130
- return ae(async () => {
1131
- await ee();
1175
+ return se(async () => {
1176
+ await g();
1132
1177
  }), (e, n) => {
1133
- let r = ce("TopButton");
1178
+ let r = ue("TopButton");
1134
1179
  return M(), C(y, {
1135
1180
  ref_key: "refSelector",
1136
1181
  ref: d,
@@ -1148,7 +1193,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1148
1193
  placeholder: f.value,
1149
1194
  hasCloserBtn: "",
1150
1195
  api: m.value === "api" ? I(o) : void 0,
1151
- apiSetSearchParams: m.value === "api" ? (...e) => I(ut)(...e) : void 0,
1196
+ apiSetSearchParams: m.value === "api" ? (...e) => I(ht)(...e) : void 0,
1152
1197
  useCache: "",
1153
1198
  appendSearchToResult: "",
1154
1199
  appendSearchAllowDuplicate: "",
@@ -1156,29 +1201,29 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1156
1201
  appendWithoutSelect: "",
1157
1202
  buttonProps: t.buttonProps,
1158
1203
  openerShortcut: t.openerShortcut,
1159
- onAppendItem: g,
1160
- onOpen: v
1204
+ onAppendItem: _,
1205
+ onOpen: ee
1161
1206
  }, {
1162
- item: z(({ item: i }) => [E("div", Ct, [E("div", wt, [i.id ? (M(), T(x, { key: 0 }, [D(F(I(u)(i.name, 20)) + " ", 1), E("span", Tt, " id " + F(i.id), 1)], 64)) : (M(), T(x, { key: 1 }, [i.listItemProps?.type ? w("", !0) : (M(), T("div", Et, F(e.$i18n.Projects.Add_project) + ": ", 1)), D(" " + F(i.name), 1)], 64))]), i.id ? (M(), T(x, { key: 0 }, [
1207
+ item: z(({ item: i }) => [E("div", Ot, [E("div", kt, [i.id ? (M(), T(x, { key: 0 }, [D(F(I(u)(i.name, 20)) + " ", 1), E("span", At, " id " + F(i.id), 1)], 64)) : (M(), T(x, { key: 1 }, [i.listItemProps?.type ? w("", !0) : (M(), T("div", jt, F(e.$i18n.Projects.Add_project) + ": ", 1)), D(" " + F(i.name), 1)], 64))]), i.id ? (M(), T(x, { key: 0 }, [
1163
1208
  t.addLinksToProjects ? (M(), T("a", {
1164
1209
  key: 0,
1165
1210
  class: "top-projectSelector_itemLink",
1166
- href: I(st)(i.id),
1167
- onClick: B((e) => I(ot)(I(st)(i.id), e), ["prevent", "stop"])
1168
- }, null, 8, Dt)) : w("", !0),
1211
+ href: I(ft)(i.id),
1212
+ onClick: B((e) => I(dt)(I(ft)(i.id), e), ["prevent", "stop"])
1213
+ }, null, 8, Mt)) : w("", !0),
1169
1214
  e.$core.state.isMobile ? w("", !0) : (M(), C(r, {
1170
1215
  key: 1,
1171
1216
  class: "top-projectSelector_itemExtLink",
1172
- href: I(lt)(i.url),
1217
+ href: I(mt)(i.url),
1173
1218
  "data-top-icon": "",
1174
1219
  color: "theme",
1175
1220
  target: "_blank",
1176
1221
  onClick: n[0] ||= B(() => {}, ["stop"])
1177
1222
  }, null, 8, ["href"])),
1178
- O(_t, {
1223
+ O(St, {
1179
1224
  id: i.id,
1180
1225
  right: i.right ?? void 0,
1181
- url: I(lt)(i.url)
1226
+ url: I(mt)(i.url)
1182
1227
  }, null, 8, [
1183
1228
  "id",
1184
1229
  "right",
@@ -1200,11 +1245,11 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1200
1245
  ]);
1201
1246
  };
1202
1247
  }
1203
- }), At = (e) => "-" + e, Y = (e) => e[0] === "-" ? e.substring(1) : e, X = (e, t) => {
1248
+ }), Ft = (e) => "-" + e, Y = (e) => e[0] === "-" ? e.substring(1) : e, X = (e, t) => {
1204
1249
  e = Y(e);
1205
1250
  let n = t.find((t) => t.id === e);
1206
1251
  if (n) return n;
1207
- }, jt = (e, t, n) => {
1252
+ }, It = (e, t, n) => {
1208
1253
  t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
1209
1254
  let r = c.genElPopupOpener("div", t);
1210
1255
  return r.classList.add("top-tagSelector"), e.useTopButton && r.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || r.classList.add("top-tagSelector-custom"), e.mode === "filter" && r.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && r.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && r.classList.add("top-tagSelector-setter_several"), r.onclick = (t) => {
@@ -1216,15 +1261,15 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1216
1261
  targetId: e.targetId,
1217
1262
  filters: e.filters,
1218
1263
  payload: e.payload
1219
- }), delete r.dataset.topPopupDisabled, ne(e.modelValue) || R(i, () => {
1264
+ }), delete r.dataset.topPopupDisabled, ie(e.modelValue) || R(i, () => {
1220
1265
  e.modelValue = i.value, Z(r, e, n);
1221
1266
  }), r.click();
1222
- }, ne(e.modelValue) ? R(e.modelValue, () => Z(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1267
+ }, ie(e.modelValue) ? R(e.modelValue, () => Z(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1223
1268
  e.modelValue = t;
1224
1269
  let i = s(r, "topTagSelectorTarget");
1225
1270
  i && (i.model.value = t), Z(r, e, n);
1226
1271
  }), Z(r, e, n), r;
1227
- }, Mt = (e, t) => {
1272
+ }, Lt = (e, t) => {
1228
1273
  s(e, "topTagSelectorRender")?.(t);
1229
1274
  }, Z = (t, n, r) => {
1230
1275
  let i = I(n.modelValue);
@@ -1233,7 +1278,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1233
1278
  return;
1234
1279
  }
1235
1280
  if (t.innerHTML = "", !i.length && n.mode === "filter") {
1236
- let n = Nt({
1281
+ let n = Rt({
1237
1282
  id: "all",
1238
1283
  colorId: "",
1239
1284
  name: e().Common?.All_tags ?? "",
@@ -1242,7 +1287,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1242
1287
  t.append(n);
1243
1288
  }
1244
1289
  i.forEach((e) => {
1245
- let r = Nt({
1290
+ let r = Rt({
1246
1291
  id: Y(e),
1247
1292
  colorId: X(e, n.tags)?.color_id ?? "",
1248
1293
  name: X(e, n.tags)?.name ?? "",
@@ -1250,10 +1295,10 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1250
1295
  });
1251
1296
  t.append(r);
1252
1297
  });
1253
- }, Nt = (e) => {
1298
+ }, Rt = (e) => {
1254
1299
  let t = document.createElement("div");
1255
1300
  return t.classList.add("top-tagSelector_tagIcon"), t.classList.toggle("top-tagSelector-active", !!e.state), t.classList.toggle("top-tagSelector-excluded", e.state === "excluded"), t.dataset.tag_id = e.id, t.dataset.tag_color_id = e.colorId, t.title = e.name, t;
1256
- }, Pt = [
1301
+ }, zt = [
1257
1302
  {
1258
1303
  id: "1",
1259
1304
  name: "Without Tag",
@@ -1304,7 +1349,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1304
1349
  name: "Turquoise",
1305
1350
  color_id: "10"
1306
1351
  }
1307
- ], Ft = [
1352
+ ], Bt = [
1308
1353
  "data-tag_id",
1309
1354
  "data-tag_color_id",
1310
1355
  "title"
@@ -1326,9 +1371,9 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1326
1371
  "data-tag_id": e.id,
1327
1372
  "data-tag_color_id": e.colorId,
1328
1373
  title: e.name
1329
- }, null, 10, Ft));
1374
+ }, null, 10, Bt));
1330
1375
  }
1331
- }), It = ["contenteditable", "onKeydown"], Lt = /* @__PURE__ */ k({
1376
+ }), Vt = ["contenteditable", "onKeydown"], Ht = /* @__PURE__ */ k({
1332
1377
  __name: "tagPopupListItem",
1333
1378
  props: /* @__PURE__ */ A({
1334
1379
  editable: { type: Boolean },
@@ -1353,7 +1398,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1353
1398
  contenteditable: s.value,
1354
1399
  onpaste: (e) => e.preventDefault()
1355
1400
  }), s = N(!1), c = async () => {
1356
- s.value = !0, await ie(), a.value?.focus();
1401
+ s.value = !0, await oe(), a.value?.focus();
1357
1402
  }, l = () => {
1358
1403
  let e = a.value?.innerText;
1359
1404
  if (!e) return u();
@@ -1365,7 +1410,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1365
1410
  let t = "selected";
1366
1411
  n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
1367
1412
  };
1368
- return (t, n) => (M(), C(g, {
1413
+ return (t, n) => (M(), C(v, {
1369
1414
  class: j({
1370
1415
  "top-tagSelector_tagListItem": !0,
1371
1416
  "top-tagSelector_tagListItem-inEdit": s.value,
@@ -1388,12 +1433,12 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1388
1433
  "colorId",
1389
1434
  "state"
1390
1435
  ]),
1391
- E("span", re({
1436
+ E("span", ae({
1392
1437
  ref_key: "elName",
1393
1438
  ref: a,
1394
1439
  class: "top-tagSelector_tagListItemName",
1395
1440
  contenteditable: s.value ? "plaintext-only" : !1
1396
- }, o.value, { onKeydown: [me(B(l, ["stop"]), ["enter"]), me(B(u, ["stop"]), ["esc"])] }), F(i.value), 17, It),
1441
+ }, o.value, { onKeydown: [ge(B(l, ["stop"]), ["enter"]), ge(B(u, ["stop"]), ["esc"])] }), F(i.value), 17, Vt),
1397
1442
  e.editable ? (M(), T(x, { key: 0 }, [s.value ? (M(), T("span", {
1398
1443
  key: 1,
1399
1444
  "data-top-icon": "",
@@ -1409,7 +1454,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1409
1454
  _: 1
1410
1455
  }, 8, ["class"]));
1411
1456
  }
1412
- }), Rt = { key: 1 }, zt = /* @__PURE__ */ k({
1457
+ }), Ut = { key: 1 }, Wt = /* @__PURE__ */ k({
1413
1458
  inheritAttrs: !1,
1414
1459
  __name: "popupOpener",
1415
1460
  props: /* @__PURE__ */ A({
@@ -1436,9 +1481,9 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1436
1481
  payload: t.payload
1437
1482
  };
1438
1483
  return (r, s) => {
1439
- let c = le("top-data");
1440
- return M(), C(ee, { id: e.id }, {
1441
- default: z(() => [pe((M(), C(ue(I(i)), re({
1484
+ let c = de("top-data");
1485
+ return M(), C(g, { id: e.id }, {
1486
+ default: z(() => [he((M(), C(fe(I(i)), ae({
1442
1487
  class: {
1443
1488
  "top-tagSelector": !0,
1444
1489
  "top-tagSelector-useTopButton": t.useTopButton,
@@ -1459,7 +1504,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1459
1504
  colorId: "",
1460
1505
  name: r.$i18n.Common.All_tags ?? "",
1461
1506
  state: ""
1462
- }, null, 8, ["name"])) : w("", !0), e.mode === "setter" && e.filters ? (M(), T("div", Rt, [se(r.$slots, "default")])) : (M(!0), T(x, { key: 2 }, P(n.value, (t) => (M(), C(Q, {
1507
+ }, null, 8, ["name"])) : w("", !0), e.mode === "setter" && e.filters ? (M(), T("div", Ut, [le(r.$slots, "default")])) : (M(!0), T(x, { key: 2 }, P(n.value, (t) => (M(), C(Q, {
1463
1508
  id: I(Y)(t),
1464
1509
  colorId: I(X)(t, e.tags)?.color_id ?? "",
1465
1510
  name: I(X)(t, e.tags)?.name ?? "",
@@ -1480,7 +1525,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1480
1525
  }, 8, ["id"]);
1481
1526
  };
1482
1527
  }
1483
- }), Bt = /* @__PURE__ */ k({
1528
+ }), Gt = /* @__PURE__ */ k({
1484
1529
  __name: "tagSelector",
1485
1530
  props: /* @__PURE__ */ A({
1486
1531
  modelValue: {},
@@ -1503,7 +1548,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1503
1548
  }, {
1504
1549
  modelValue: { required: !0 },
1505
1550
  modelModifiers: {},
1506
- tags: { default: oe(Pt) },
1551
+ tags: { default: ce(zt) },
1507
1552
  tagsModifiers: {}
1508
1553
  }),
1509
1554
  emits: /* @__PURE__ */ A([
@@ -1516,7 +1561,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1516
1561
  f(e, t);
1517
1562
  }, l.emitDelay);
1518
1563
  l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
1519
- let m = l.id ?? "top-popup-id-" + Math.random(), h = N("add"), ee = () => {
1564
+ let m = l.id ?? "top-popup-id-" + Math.random(), h = N("add"), g = () => {
1520
1565
  let e = " " + c.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
1521
1566
  return t.set("add", {
1522
1567
  value: "add",
@@ -1528,7 +1573,7 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1528
1573
  value: "delete",
1529
1574
  title: c.Common.Delete + e
1530
1575
  }), t;
1531
- }, v = de({
1576
+ }, _ = pe({
1532
1577
  model: u,
1533
1578
  mode: "filter",
1534
1579
  targetId: void 0,
@@ -1538,25 +1583,25 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1538
1583
  R(u, () => {
1539
1584
  p("selector", u.value);
1540
1585
  });
1541
- let y = S(() => {
1542
- if (v.value.mode === "setter" && l.maxTagsForSetter && !v.value.filters) return v.value.model.value.length >= l.maxTagsForSetter;
1543
- }), b = (e) => {
1586
+ let ee = S(() => {
1587
+ if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
1588
+ }), ne = (e) => {
1544
1589
  if (e !== "all") {
1545
- if (v.value.model.value.includes(e)) return "selected";
1546
- if (v.value.model.value.includes(At(e))) return "excluded";
1590
+ if (_.value.model.value.includes(e)) return "selected";
1591
+ if (_.value.model.value.includes(Ft(e))) return "excluded";
1547
1592
  }
1548
- return e === "all" && !v.value.model.value.length ? "selected" : "";
1549
- }, E = (e, t) => {
1550
- let n = At(e), r = v.value.model.value.filter((t) => t !== e && t !== n);
1551
- t === "select" && r.push(e), t === "exclude" && r.push(n), v.value.mode === "setter" && v.value.targetId !== void 0 && l.requiredForSetter && (r.length || r.push("1"), r.length === 2 && v.value.model.value.length === 1 && v.value.model.value[0] === "1" && (r = r.filter((e) => e !== "1"))), l.singleMode && !v.value.filters && (r.length || (r = v.value.model.value), r.length > 1 && (r = [r[r.length - 1]])), r.sort((e, t) => l.tags ? l.tags.findIndex((t) => t.id === e) - l.tags.findIndex((e) => e.id === t) : 0), v.value.model.value = r, v.value.mode === "setter" && v.value.targetId !== void 0 && p("setter", {
1593
+ return e === "all" && !_.value.model.value.length ? "selected" : "";
1594
+ }, y = (e, t) => {
1595
+ let n = Ft(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
1596
+ t === "select" && r.push(e), t === "exclude" && r.push(n), _.value.mode === "setter" && _.value.targetId !== void 0 && l.requiredForSetter && (r.length || r.push("1"), r.length === 2 && _.value.model.value.length === 1 && _.value.model.value[0] === "1" && (r = r.filter((e) => e !== "1"))), l.singleMode && !_.value.filters && (r.length || (r = _.value.model.value), r.length > 1 && (r = [r[r.length - 1]])), r.sort((e, t) => l.tags ? l.tags.findIndex((t) => t.id === e) - l.tags.findIndex((e) => e.id === t) : 0), _.value.model.value = r, _.value.mode === "setter" && _.value.targetId !== void 0 && p("setter", {
1552
1597
  tagsIds: r,
1553
- targetId: v.value.targetId,
1554
- payload: v.value.payload
1598
+ targetId: _.value.targetId,
1599
+ payload: _.value.payload
1555
1600
  });
1556
- }, k = S(() => {
1601
+ }, b = S(() => {
1557
1602
  let e = "top-tagSelector_popup";
1558
- return v.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), v.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
1559
- }), ne = () => {
1603
+ return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
1604
+ }), E = () => {
1560
1605
  let e = prompt("", "New tag");
1561
1606
  if (!e || e === "New tag") return;
1562
1607
  let t = d.value.length + 1;
@@ -1565,9 +1610,9 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1565
1610
  name: e,
1566
1611
  color_id: String((t - 1) % 10 + 1)
1567
1612
  }), f("tagsChanged", d.value);
1568
- }, A = (e) => {
1569
- if (v.value = s(e.elPopupOpener, "topTagSelectorTarget"), !v.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1570
- if (v.value.filters && (h.value = "add", v.value.model.value = []), !t.$?.ui.sortable) {
1613
+ }, k = (e) => {
1614
+ if (_.value = s(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1615
+ if (_.value.filters && (h.value = "add", _.value.model.value = []), !t.$?.ui.sortable) {
1571
1616
  console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
1572
1617
  return;
1573
1618
  }
@@ -1585,10 +1630,10 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1585
1630
  }), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
1586
1631
  }
1587
1632
  });
1588
- }, re = (e) => {
1633
+ }, ie = (e) => {
1589
1634
  t.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
1590
1635
  };
1591
- return (e, t) => (M(), T(x, null, [O(zt, {
1636
+ return (e, t) => (M(), T(x, null, [O(Wt, {
1592
1637
  modelValue: u.value,
1593
1638
  "onUpdate:modelValue": t[0] ||= (e) => u.value = e,
1594
1639
  id: I(m),
@@ -1602,34 +1647,34 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1602
1647
  "tags",
1603
1648
  "styling",
1604
1649
  "useTopButton"
1605
- ]), O(_, {
1650
+ ]), O(te, {
1606
1651
  id: I(m),
1607
- class: j(k.value),
1608
- onOpen: t[4] ||= (e) => A(e),
1609
- onClose: t[5] ||= (e) => re(e),
1652
+ class: j(b.value),
1653
+ onOpen: t[4] ||= (e) => k(e),
1654
+ onClose: t[5] ||= (e) => ie(e),
1610
1655
  "transition-duration": 50
1611
- }, te({
1656
+ }, re({
1612
1657
  contentList: z(() => [
1613
- I(v).mode === "filter" && !a.singleMode ? (M(), C(Lt, {
1658
+ I(_).mode === "filter" && !a.singleMode ? (M(), C(Ht, {
1614
1659
  key: 0,
1615
1660
  id: "all",
1616
1661
  colorId: "",
1617
1662
  name: e.$i18n.Common.All_tags ?? "",
1618
- state: I(v).model.value.length ? "" : "selected",
1619
- onSelect: t[3] ||= (e) => I(v).model.value = []
1663
+ state: I(_).model.value.length ? "" : "selected",
1664
+ onSelect: t[3] ||= (e) => I(_).model.value = []
1620
1665
  }, null, 8, ["name", "state"])) : w("", !0),
1621
- (M(!0), T(x, null, P(d.value, (e) => (M(), C(Lt, {
1666
+ (M(!0), T(x, null, P(d.value, (e) => (M(), C(Ht, {
1622
1667
  key: e.id,
1623
1668
  id: e.id,
1624
1669
  colorId: e.color_id,
1625
1670
  name: e.name,
1626
- state: b(e.id),
1627
- canExclude: I(v).mode === "filter" && !a.singleMode,
1671
+ state: ne(e.id),
1672
+ canExclude: I(_).mode === "filter" && !a.singleMode,
1628
1673
  editable: a.tagsEditable,
1629
- disabled: y.value && b(e.id) === "",
1630
- onUnselect: (t) => E(e.id, "unselect"),
1631
- onSelect: (t) => E(e.id, "select"),
1632
- onExclude: (t) => E(e.id, "exclude"),
1674
+ disabled: ee.value && ne(e.id) === "",
1675
+ onUnselect: (t) => y(e.id, "unselect"),
1676
+ onSelect: (t) => y(e.id, "select"),
1677
+ onExclude: (t) => y(e.id, "exclude"),
1633
1678
  "onUpdate:name": (t) => {
1634
1679
  e.name = t, I(p)("tagsChanged", d.value);
1635
1680
  }
@@ -1646,34 +1691,34 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1646
1691
  "onExclude",
1647
1692
  "onUpdate:name"
1648
1693
  ]))), 128)),
1649
- a.tagsEditable && d.value.length < a.tagsMax && d.value.length < 20 ? (M(), C(g, {
1694
+ a.tagsEditable && d.value.length < a.tagsMax && d.value.length < 20 ? (M(), C(v, {
1650
1695
  key: 1,
1651
1696
  "data-top-icon": "",
1652
- onClick: B(ne, ["stop"])
1697
+ onClick: B(E, ["stop"])
1653
1698
  }, {
1654
1699
  default: z(() => [D(F(e.$i18n.Common.Add), 1)]),
1655
1700
  _: 1
1656
1701
  })) : w("", !0)
1657
1702
  ]),
1658
1703
  _: 2
1659
- }, [I(v).mode === "setter" && I(v).filters ? {
1704
+ }, [I(_).mode === "setter" && I(_).filters ? {
1660
1705
  name: "header",
1661
1706
  fn: z(() => [O(i, {
1662
1707
  modelValue: h.value,
1663
1708
  "onUpdate:modelValue": t[1] ||= (e) => h.value = e,
1664
- options: ee()
1709
+ options: g()
1665
1710
  }, null, 8, ["modelValue", "options"])]),
1666
1711
  key: "0"
1667
- } : void 0, I(v).mode === "setter" && I(v).filters ? {
1712
+ } : void 0, I(_).mode === "setter" && I(_).filters ? {
1668
1713
  name: "footer",
1669
1714
  fn: z(() => [O(r, { color: "theme" }, {
1670
1715
  default: z(() => [D(F(e.$i18n.Common.Cancel), 1)]),
1671
1716
  _: 1
1672
1717
  }), O(r, { onClick: t[2] ||= (e) => I(p)("setter", {
1673
- tagsIds: I(v).model.value,
1674
- filters: I(v).filters,
1718
+ tagsIds: I(_).model.value,
1719
+ filters: I(_).filters,
1675
1720
  filtersAction: h.value,
1676
- payload: I(v).payload
1721
+ payload: I(_).payload
1677
1722
  }) }, {
1678
1723
  default: z(() => [D(F(h.value === "add" ? e.$i18n.Common.Add : "") + " " + F(h.value === "replace" ? e.$i18n.Common.Replace : "") + " " + F(h.value === "delete" ? e.$i18n.Common.Delete : ""), 1)]),
1679
1724
  _: 1
@@ -1683,6 +1728,6 @@ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
1683
1728
  }
1684
1729
  });
1685
1730
  //#endregion
1686
- export { _e as TopCompetitorSelector, $e as TopGroupSelector, kt as TopProjectSelector, Ie as TopRegionSelector, Bt as TopTagSelector, zt as TopTagSelectorPopupOpener, Q as TopTagSelectorTagIcon, St as clearCache, je as dialogRegionSelector, Ae as findRegion, jt as genElTopTagSelectorPopupOpener, De as genSearcherByKey, Mt as renderElTopTagSelectorPopupOpener, ve as useItemsFromCompetitors };
1731
+ export { ye as TopCompetitorSelector, it as TopGroupSelector, Pt as TopProjectSelector, Re as TopRegionSelector, Gt as TopTagSelector, Wt as TopTagSelectorPopupOpener, Q as TopTagSelectorTagIcon, Dt as clearCache, Ne as dialogRegionSelector, Me as findRegion, It as genElTopTagSelectorPopupOpener, ke as genSearcherByKey, Lt as renderElTopTagSelectorPopupOpener, be as useItemsFromCompetitors };
1687
1732
 
1688
1733
  //# sourceMappingURL=project.js.map