@topvisor/ui 1.5.10 → 1.6.1-searcherKey.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 (125) hide show
  1. package/.chunks/{app-C6mHPpb7.es.amd.js → app-qGtdp_Vh.es.amd.js} +2 -2
  2. package/.chunks/{app-C6mHPpb7.es.amd.js.map → app-qGtdp_Vh.es.amd.js.map} +1 -1
  3. package/.chunks/{app-C6mHPpb7.es.js → app-qGtdp_Vh.es.js} +5 -5
  4. package/.chunks/{app-C6mHPpb7.es.js.map → app-qGtdp_Vh.es.js.map} +1 -1
  5. package/.chunks/{datepicker-DtdAe-rf.es.amd.js → datepicker-MlbIM78m.es.amd.js} +2 -2
  6. package/.chunks/{datepicker-DtdAe-rf.es.amd.js.map → datepicker-MlbIM78m.es.amd.js.map} +1 -1
  7. package/.chunks/{datepicker-DtdAe-rf.es.js → datepicker-MlbIM78m.es.js} +2 -2
  8. package/.chunks/{datepicker-DtdAe-rf.es.js.map → datepicker-MlbIM78m.es.js.map} +1 -1
  9. package/.chunks/{dialog-Cs7KfRxQ.es.amd.js → dialog-C_1nmPXN.es.amd.js} +2 -2
  10. package/.chunks/{dialog-Cs7KfRxQ.es.amd.js.map → dialog-C_1nmPXN.es.amd.js.map} +1 -1
  11. package/.chunks/{dialog-Cs7KfRxQ.es.js → dialog-C_1nmPXN.es.js} +3 -3
  12. package/.chunks/{dialog-Cs7KfRxQ.es.js.map → dialog-C_1nmPXN.es.js.map} +1 -1
  13. package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.amd.js +2 -0
  14. package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.amd.js.map +1 -0
  15. package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.js +165 -0
  16. package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.js.map +1 -0
  17. package/.chunks/{forms-DrY7Q_VD.es.amd.js → forms-dosApNxi.es.amd.js} +2 -2
  18. package/.chunks/{forms-DrY7Q_VD.es.amd.js.map → forms-dosApNxi.es.amd.js.map} +1 -1
  19. package/.chunks/{forms-DrY7Q_VD.es.js → forms-dosApNxi.es.js} +5 -5
  20. package/.chunks/{forms-DrY7Q_VD.es.js.map → forms-dosApNxi.es.js.map} +1 -1
  21. package/.chunks/{formsExt-BgtDJL34.es.amd.js → formsExt-D7XsRleI.es.amd.js} +2 -2
  22. package/.chunks/{formsExt-BgtDJL34.es.amd.js.map → formsExt-D7XsRleI.es.amd.js.map} +1 -1
  23. package/.chunks/{formsExt-BgtDJL34.es.js → formsExt-D7XsRleI.es.js} +3 -3
  24. package/.chunks/{formsExt-BgtDJL34.es.js.map → formsExt-D7XsRleI.es.js.map} +1 -1
  25. package/.chunks/{notice-qj8gI3Vn.es.amd.js → notice-8nwvAJQm.es.amd.js} +2 -2
  26. package/.chunks/{notice-qj8gI3Vn.es.amd.js.map → notice-8nwvAJQm.es.amd.js.map} +1 -1
  27. package/.chunks/{notice-qj8gI3Vn.es.js → notice-8nwvAJQm.es.js} +2 -2
  28. package/.chunks/{notice-qj8gI3Vn.es.js.map → notice-8nwvAJQm.es.js.map} +1 -1
  29. package/.chunks/{popup-CWtDQcwo.es.amd.js → popup-Bn5Wm8WI.es.amd.js} +2 -2
  30. package/.chunks/{popup-CWtDQcwo.es.amd.js.map → popup-Bn5Wm8WI.es.amd.js.map} +1 -1
  31. package/.chunks/{popup-CWtDQcwo.es.js → popup-Bn5Wm8WI.es.js} +3 -3
  32. package/.chunks/{popup-CWtDQcwo.es.js.map → popup-Bn5Wm8WI.es.js.map} +1 -1
  33. package/.chunks/{popup-DQDuBLfC.es.amd.js → popup-cAqd6Dj3.es.amd.js} +2 -2
  34. package/.chunks/{popup-DQDuBLfC.es.amd.js.map → popup-cAqd6Dj3.es.amd.js.map} +1 -1
  35. package/.chunks/{popup-DQDuBLfC.es.js → popup-cAqd6Dj3.es.js} +3 -3
  36. package/.chunks/{popup-DQDuBLfC.es.js.map → popup-cAqd6Dj3.es.js.map} +1 -1
  37. package/.chunks/utils-D46Z7je_.es.amd.js +3 -0
  38. package/.chunks/utils-D46Z7je_.es.amd.js.map +1 -0
  39. package/.chunks/{utils-Dltd8Oce.es.js → utils-D46Z7je_.es.js} +5 -5
  40. package/.chunks/utils-D46Z7je_.es.js.map +1 -0
  41. package/.chunks/{utils-D9A8uWOP.es.amd.js → utils-mBJcBhkk.es.amd.js} +2 -2
  42. package/.chunks/{utils-D9A8uWOP.es.amd.js.map → utils-mBJcBhkk.es.amd.js.map} +1 -1
  43. package/.chunks/{utils-D9A8uWOP.es.js → utils-mBJcBhkk.es.js} +2 -2
  44. package/.chunks/{utils-D9A8uWOP.es.js.map → utils-mBJcBhkk.es.js.map} +1 -1
  45. package/.chunks/worker-BfCrg4RI.es.amd.js +2 -0
  46. package/.chunks/worker-BfCrg4RI.es.amd.js.map +1 -0
  47. package/.chunks/{worker-C6E8GqL6.es.js → worker-BfCrg4RI.es.js} +4 -4
  48. package/.chunks/worker-BfCrg4RI.es.js.map +1 -0
  49. package/assets/forms.css +1 -1
  50. package/autoload-css-manifest.amd.json +4 -4
  51. package/autoload-css-manifest.json +4 -4
  52. package/charts/charts.amd.js +1 -1
  53. package/charts/charts.amd.js.map +1 -1
  54. package/charts/charts.js +1 -1
  55. package/core/app.amd.js +1 -1
  56. package/core/app.amd.js.map +1 -1
  57. package/core/app.js +3 -3
  58. package/dialog/dialog.amd.js +1 -1
  59. package/dialog/dialog.amd.js.map +1 -1
  60. package/dialog/dialog.js +2 -2
  61. package/forms/forms.amd.js +1 -1
  62. package/forms/forms.amd.js.map +1 -1
  63. package/forms/forms.js +1 -1
  64. package/formsExt/formsExt.amd.js +1 -1
  65. package/formsExt/formsExt.amd.js.map +1 -1
  66. package/formsExt/formsExt.js +1 -1
  67. package/layout/layout.amd.js +1 -1
  68. package/layout/layout.amd.js.map +1 -1
  69. package/layout/layout.js +1 -1
  70. package/package.json +2 -2
  71. package/popup/popup.amd.js +1 -1
  72. package/popup/popup.amd.js.map +1 -1
  73. package/popup/popup.js +1 -1
  74. package/popup/worker.amd.js +1 -1
  75. package/popup/worker.amd.js.map +1 -1
  76. package/popup/worker.js +1 -1
  77. package/project/project.amd.js +1 -1
  78. package/project/project.amd.js.map +1 -1
  79. package/project/project.js +470 -424
  80. package/project/project.js.map +1 -1
  81. package/schedule/schedule.amd.js +1 -1
  82. package/schedule/schedule.amd.js.map +1 -1
  83. package/schedule/schedule.js +2 -2
  84. package/src/components/project/projectSelector/utils.d.ts +9 -1
  85. package/src/components/project/regionSelector/dialog_regionSelectorRegions/types.d.ts +2 -4
  86. package/src/components/project/regionSelector/types.d.ts +6 -0
  87. package/src/core/utils/searchers.d.ts +15 -0
  88. package/src/core/utils/string.d.ts +5 -4
  89. package/src/core/utils/tests/nl2br.test.d.ts +1 -0
  90. package/tabsView/tabsView.amd.js +1 -1
  91. package/tabsView/tabsView.amd.js.map +1 -1
  92. package/tabsView/tabsView.js +2 -2
  93. package/utils/clipboard.amd.js +1 -1
  94. package/utils/clipboard.amd.js.map +1 -1
  95. package/utils/clipboard.js +1 -1
  96. package/utils/date.amd.js +1 -1
  97. package/utils/date.amd.js.map +1 -1
  98. package/utils/date.js +1 -1
  99. package/utils/device.amd.js +1 -1
  100. package/utils/device.amd.js.map +1 -1
  101. package/utils/device.js +1 -1
  102. package/utils/lodash.amd.js +1 -1
  103. package/utils/lodash.amd.js.map +1 -1
  104. package/utils/lodash.js +1 -1
  105. package/utils/price.amd.js +1 -1
  106. package/utils/price.amd.js.map +1 -1
  107. package/utils/price.js +1 -1
  108. package/utils/searchers.amd.js +1 -1
  109. package/utils/searchers.amd.js.map +1 -1
  110. package/utils/searchers.js +24 -7
  111. package/utils/searchers.js.map +1 -1
  112. package/utils/string.amd.js +2 -2
  113. package/utils/string.amd.js.map +1 -1
  114. package/utils/string.js +2 -9
  115. package/utils/string.js.map +1 -1
  116. package/.chunks/dialog_regionSelectorRegions-B3lesZe-.es.amd.js +0 -2
  117. package/.chunks/dialog_regionSelectorRegions-B3lesZe-.es.amd.js.map +0 -1
  118. package/.chunks/dialog_regionSelectorRegions-B3lesZe-.es.js +0 -169
  119. package/.chunks/dialog_regionSelectorRegions-B3lesZe-.es.js.map +0 -1
  120. package/.chunks/utils-Dltd8Oce.es.amd.js +0 -2
  121. package/.chunks/utils-Dltd8Oce.es.amd.js.map +0 -1
  122. package/.chunks/utils-Dltd8Oce.es.js.map +0 -1
  123. package/.chunks/worker-C6E8GqL6.es.amd.js +0 -2
  124. package/.chunks/worker-C6E8GqL6.es.amd.js.map +0 -1
  125. package/.chunks/worker-C6E8GqL6.es.js.map +0 -1
@@ -6,22 +6,22 @@
6
6
  /* end import css */
7
7
 
8
8
  import { a as e, i as t } from "../.chunks/api-nVBtzTDk.es.js";
9
- import { E as n, O as r, P as i, h as a, n as o } from "../.chunks/forms-DrY7Q_VD.es.js";
9
+ import { E as n, O as r, P as i, h as a, n as o } from "../.chunks/forms-dosApNxi.es.js";
10
10
  import { storage as s } from "../utils/dom.js";
11
- import { t as c } from "../.chunks/worker-C6E8GqL6.es.js";
12
- import "../.chunks/app-C6mHPpb7.es.js";
13
- import { t as l } from "../.chunks/utils-D9A8uWOP.es.js";
11
+ import { t as c } from "../.chunks/worker-BfCrg4RI.es.js";
12
+ import "../.chunks/app-qGtdp_Vh.es.js";
13
+ import { t as l } from "../.chunks/utils-mBJcBhkk.es.js";
14
14
  import { validUrl as u } from "../utils/check.js";
15
15
  import { ellipsis as d } from "../utils/string.js";
16
- import { getDeviceGIcon as f, getLangLabel as p, getSearcherGIcon as m } from "../utils/searchers.js";
17
- import { invertKeyboardLayout as h } from "../utils/keyboard.js";
18
- import { c as g, n as _, o as v, r as ee, s as y } from "../.chunks/popup-DQDuBLfC.es.js";
19
- import { c as b, d as x, f as te, p as ne } from "../.chunks/formsExt-BgtDJL34.es.js";
20
- import { Fragment as S, computed as C, createBlock as w, createCommentVNode as T, createElementBlock as E, createElementVNode as D, createSlots as re, createTextVNode as O, createVNode as k, defineComponent as A, isRef as ie, mergeModels as j, mergeProps as ae, nextTick as oe, normalizeClass as M, onMounted as se, openBlock as N, reactive as ce, ref as P, renderList as F, renderSlot as le, resolveComponent as ue, resolveDirective as de, resolveDynamicComponent as fe, shallowRef as pe, toDisplayString as I, toValue as me, unref as L, useId as he, useModel as R, watch as z, withCtx as B, withDirectives as ge, withKeys as _e, withModifiers as V } from "vue";
16
+ import { genRegionLabelData as f, getSearcherGIcon as p } from "../utils/searchers.js";
17
+ import { invertKeyboardLayout as m } from "../utils/keyboard.js";
18
+ import { c as h, n as g, o as _, r as v, s as y } from "../.chunks/popup-cAqd6Dj3.es.js";
19
+ import { c as b, d as x, f as S, p as C } from "../.chunks/formsExt-D7XsRleI.es.js";
20
+ import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createSlots as ee, createTextVNode as A, createVNode as j, defineComponent as M, isRef as te, mergeModels as N, mergeProps as ne, nextTick as re, normalizeClass as P, onMounted as ie, openBlock as F, reactive as ae, ref as I, renderList as oe, renderSlot as se, resolveComponent as ce, resolveDirective as le, resolveDynamicComponent as ue, shallowRef as de, toDisplayString as L, toValue as fe, unref as R, useId as pe, useModel as z, watch as B, withCtx as V, withDirectives as me, withKeys as he, withModifiers as H } from "vue";
21
21
  //#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
22
- var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, be = /* @__PURE__ */ A({
22
+ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, ve = /* @__PURE__ */ M({
23
23
  __name: "competitorSelector",
24
- props: /*@__PURE__*/ j({
24
+ props: /*@__PURE__*/ N({
25
25
  modelValue: {},
26
26
  items: {},
27
27
  showSelectAllItem: {
@@ -35,7 +35,7 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
35
35
  }),
36
36
  emits: ["update:modelValue"],
37
37
  setup(e) {
38
- let t = e, i = R(e, "modelValue"), o = C(() => {
38
+ let t = e, i = z(e, "modelValue"), o = T(() => {
39
39
  if (t.showSelectAllItem) return {
40
40
  icon: t.selectAllItemIcon,
41
41
  title: n().Common.Select_all,
@@ -43,23 +43,23 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
43
43
  content: ""
44
44
  };
45
45
  });
46
- return (t, n) => (N(), E("div", ve, [L(r).state.isMobile ? (N(), w(y, { key: 0 }, {
47
- opener: B(() => [k(a, {
46
+ return (t, n) => (F(), O("div", ge, [R(r).state.isMobile ? (F(), E(y, { key: 0 }, {
47
+ opener: V(() => [j(a, {
48
48
  class: "top-competitorSelector_opener",
49
49
  color: "theme",
50
50
  icon: "",
51
51
  icon2: ""
52
52
  }, {
53
- default: B(() => [O(I(e.items.find((e) => e.value === i.value?.[0])?.content), 1)]),
53
+ default: V(() => [A(L(e.items.find((e) => e.value === i.value?.[0])?.content), 1)]),
54
54
  _: 1
55
55
  })]),
56
- contentList: B(() => [(N(!0), E(S, null, F(e.items, (e) => (N(), w(v, {
57
- class: M({ "top-active": i.value?.includes(e.value) }),
56
+ contentList: V(() => [(F(!0), O(w, null, oe(e.items, (e) => (F(), E(_, {
57
+ class: P({ "top-active": i.value?.includes(e.value) }),
58
58
  "data-top-icon": e.icon,
59
59
  title: e.title,
60
60
  onClick: () => i.value = [e.value]
61
61
  }, {
62
- default: B(() => [D("span", ye, I(e.content), 1)]),
62
+ default: V(() => [k("span", _e, L(e.content), 1)]),
63
63
  _: 2
64
64
  }, 1032, [
65
65
  "class",
@@ -68,7 +68,7 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
68
68
  "onClick"
69
69
  ]))), 256))]),
70
70
  _: 1
71
- })) : (N(), w(ne, {
71
+ })) : (F(), E(C, {
72
72
  key: 1,
73
73
  modelValue: i.value,
74
74
  "onUpdate:modelValue": n[0] ||= (e) => i.value = e,
@@ -83,12 +83,12 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
83
83
  "selectAllItem"
84
84
  ]))]));
85
85
  }
86
- }), xe = (e, t) => C(() => me(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
86
+ }), ye = (e, t) => T(() => fe(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
87
87
  value: e.id,
88
88
  title: e.url + ` [${e.id}]`,
89
- icon: e.id === me(t) ? "" : "",
89
+ icon: e.id === fe(t) ? "" : "",
90
90
  content: e.name
91
- }))), Se = {
91
+ }))), be = {
92
92
  0: "Yandex",
93
93
  1: "Google",
94
94
  4: "YouTube",
@@ -99,27 +99,27 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
99
99
  20: "Yandex.com",
100
100
  21: "Yandex.com.tr",
101
101
  22: "YandexLive"
102
- }, Ce = {
102
+ }, xe = {
103
103
  alt: "",
104
104
  key: -2,
105
105
  name: "--",
106
106
  index: -2
107
- }, we = {
107
+ }, Se = {
108
108
  key: -2,
109
109
  name: "--",
110
- regions: [Ce],
111
- regionByIndex: /* @__PURE__ */ new Map([[-2, Ce]])
112
- }, H = {
110
+ regions: [xe],
111
+ regionByIndex: /* @__PURE__ */ new Map([[-2, xe]])
112
+ }, U = {
113
113
  alt: "",
114
114
  key: -2,
115
115
  name: "Autoselect",
116
116
  index: -2
117
- }, Te = {
117
+ }, Ce = {
118
118
  key: -2,
119
119
  name: "Autoselect",
120
- regions: [H],
121
- regionByIndex: /* @__PURE__ */ new Map([[-2, H]])
122
- }, Ee = {
120
+ regions: [U],
121
+ regionByIndex: /* @__PURE__ */ new Map([[-2, U]])
122
+ }, we = {
123
123
  alt: "",
124
124
  countryCode: "00",
125
125
  depth: 1,
@@ -128,38 +128,38 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
128
128
  index: -1,
129
129
  lang: "ru",
130
130
  name: "Without region"
131
- }, De = () => (H.name = n().Common.Autoselect, H), Oe = () => (De(), Te.name = n().Common.Autoselect, console.log(Te), Te), ke = () => (Ee.name = n().Keywords.Without_region, Ee), Ae = [
131
+ }, Te = () => (U.name = n().Common.Autoselect, U), Ee = () => (Te(), Ce.name = n().Common.Autoselect, console.log(Ce), Ce), De = () => (we.name = n().Keywords.Without_region, we), Oe = [
132
132
  4,
133
133
  8,
134
134
  9
135
- ], je = (e, t, n = []) => {
136
- let r = Ne(e, !1, n), i;
135
+ ], ke = (e, t, n = []) => {
136
+ let r = je(e, !1, n), i;
137
137
  return r.forEach((n) => {
138
138
  if ((t.searcher_key === void 0 || t.searcher_key == n.key) && n.regions && (n.regions.forEach((r) => {
139
139
  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;
140
140
  }), i)) return !1;
141
141
  }), i;
142
- }, Me = l(() => import("../.chunks/dialog_regionSelectorRegions-B3lesZe-.es.js")), Ne = (e = "", t = !1, n = []) => {
142
+ }, Ae = l(() => import("../.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.js")), je = (e = "", t = !1, n = []) => {
143
143
  let r;
144
- return r = e === "volume" || e === "cost_forecast" ? Pe(n) : e === "project_relevant_url" ? Fe(n) : Ie(n, !0), t && r.set(-2, Oe()), r.size || r.set(-2, we), r;
145
- }, Pe = (e) => {
144
+ return r = e === "volume" || e === "cost_forecast" ? Me(n) : e === "project_relevant_url" ? Ne(n) : Pe(n, !0), t && r.set(-2, Ee()), r.size || r.set(-2, Se), r;
145
+ }, Me = (e) => {
146
146
  e = e.filter((e) => r.state.forceSearchersKeysForKeywordsStats.includes(e.key));
147
- let t = Ie(e, !1);
147
+ let t = Pe(e, !1);
148
148
  return r.state.forceSearchersKeysForKeywordsStats.forEach((e) => {
149
149
  if (t.has(e)) return;
150
150
  let n = {
151
151
  key: e,
152
- name: Se[e],
152
+ name: be[e],
153
153
  regions: [],
154
154
  regionByIndex: /* @__PURE__ */ new Map()
155
155
  };
156
156
  t.set(n.key, n);
157
157
  }), r.state.showGlobalRegionForKeywordsStats && t.forEach((e) => {
158
158
  if (!e.regionByIndex) return;
159
- let t = { ...ke() };
159
+ let t = { ...De() };
160
160
  e.regionByIndex.set(t.index, t);
161
161
  }), t;
162
- }, Fe = (e) => (e = e.filter((e) => !Ae.includes(e.key)), Ie(e, !1)), Ie = (e, t) => {
162
+ }, Ne = (e) => (e = e.filter((e) => !Oe.includes(e.key)), Pe(e, !1)), Pe = (e, t) => {
163
163
  let n = /* @__PURE__ */ new Map();
164
164
  return e.forEach((e) => {
165
165
  if (t && !e.enabled) return;
@@ -170,18 +170,18 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
170
170
  r.regionByIndex.set(n.index, n);
171
171
  }), r.regionByIndex.size, (!e.regions || r.regionByIndex.size) && n.set(r.key, r);
172
172
  }), n;
173
- }, Le = (e, t) => {
173
+ }, Fe = (e, t) => {
174
174
  let r = n();
175
175
  return {
176
- searcherKey: P(t.value.keys().next().value ?? -2),
177
- optionBySearcherKey: C(() => {
176
+ searcherKey: I(e.modelValueSearcherKey ?? t.value.keys().next().value ?? -2),
177
+ optionBySearcherKey: T(() => {
178
178
  let n = /* @__PURE__ */ new Map();
179
179
  if (t.value.forEach((t) => {
180
180
  let r = {
181
181
  value: t.key,
182
182
  title: t.name
183
183
  };
184
- e.addSearcherIcon && (r.icon = m(t.key)), n.set(t.key, r);
184
+ e.addSearcherIcon && (r.icon = p(t.key)), n.set(t.key, r);
185
185
  }), e.addCompare && !n.has(-2)) {
186
186
  let e = {
187
187
  value: "",
@@ -198,36 +198,33 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
198
198
  return n;
199
199
  })
200
200
  };
201
- }, Re = (e, t) => {
202
- let r = n(), i = C(() => e.forMode === "volume" || e.forMode === "cost_forecast"), a = P(-2);
201
+ }, Ie = (e, t) => {
202
+ let r = n(), i = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), a = I(-2);
203
203
  e.modelValue.length === 1 && (a.value = e.modelValue[0]), a.value === -2 && (a.value = i.value ? t.value?.regionByIndex.values().next().value?.key ?? -2 : t.value?.regionByIndex.keys().next().value ?? -2);
204
- let o = C(() => {
204
+ let o = T(() => {
205
205
  let e = /* @__PURE__ */ new Map();
206
- return t.value.regionByIndex?.forEach((n) => {
207
- let a = n.name;
206
+ return t.value.regionByIndex?.forEach((t) => {
208
207
  if (i.value) {
209
- let t = {
210
- value: n.key,
211
- title: a
208
+ let n = {
209
+ value: t.key,
210
+ title: t.name
212
211
  };
213
- e.has(n.key) || e.set(n.key, t);
212
+ e.has(t.key) || e.set(t.key, n);
214
213
  return;
215
214
  }
216
- let o = p(t.value.key || 0, n.lang ?? ""), s = "";
217
- if (n.device !== void 0 && (s = r.Common["Device_" + n.device]), o && (s += s ? `, ${o}` : o), n.alt) {
218
- let e = n.alt.toUpperCase();
219
- s += s ? `, ${e}` : e;
220
- }
221
- s &&= ` (${s})`;
222
- let c = {
223
- value: n.index,
224
- title: a + s,
225
- icon: n.device === void 0 ? void 0 : f(n.device)
215
+ let n = f(t), r = [];
216
+ n.deviceLabel && r.push(n.deviceLabel), n.langLabel && r.push(n.langLabel), n.altLabel && r.push(n.altLabel);
217
+ let a = r.join(", ");
218
+ a &&= ` (${a})`;
219
+ let o = {
220
+ value: t.index,
221
+ title: t.name + a,
222
+ icon: n.deviceTopIcon
226
223
  };
227
- e.set(n.index, c);
224
+ e.set(t.index, o);
228
225
  }), e;
229
226
  });
230
- return z(o, (t, n) => {
227
+ return B(o, (t, n) => {
231
228
  if (e.onlySearcher || a.value !== void 0 && t.get(a.value)) return;
232
229
  let i = t.keys().next().value;
233
230
  if (a.value === -2 || i === -2) {
@@ -250,8 +247,8 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
250
247
  regionIndex: a,
251
248
  optionByRegionIndex: o
252
249
  };
253
- }, ze = (e, t, n) => {
254
- let r = P([]), i = () => {
250
+ }, Le = (e, t, n) => {
251
+ let r = I([]), i = () => {
255
252
  if (e.onlySearcher && t.value) {
256
253
  r.value = Array.from(t.value.keys());
257
254
  return;
@@ -265,22 +262,22 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
265
262
  }, a = () => {
266
263
  r.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(r.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
267
264
  };
268
- return z(r, () => {
265
+ return B(r, () => {
269
266
  a();
270
267
  }), e.addCompare && i(), { regionsIndexes: r };
271
- }, Be = (e) => {
272
- let t = C(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = C(() => Ne(e.forMode, e.autoRegion, e.searchers)), r = C(() => n.value.get(a.searcherKey.value) || we), i = C(() => {
268
+ }, Re = (e) => {
269
+ let t = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = T(() => je(e.forMode, e.autoRegion, e.searchers)), r = T(() => n.value.get(a.searcherKey.value) || Se), i = T(() => {
273
270
  let e = /* @__PURE__ */ new Set();
274
271
  return n.value.forEach((t) => {
275
272
  t.regionByIndex.forEach((t) => {
276
273
  t.index !== -2 && e.add(t.index);
277
274
  });
278
275
  }), e;
279
- }), a = Le(e, n), o = Re(e, r), s = ze(e, n, i);
280
- z(n, () => {
276
+ }), a = Fe(e, n), o = Ie(e, r), s = Le(e, n, i);
277
+ B(n, () => {
281
278
  if (e.onlySearcher ? s.regionsIndexes.value = Array.from(n.value.keys()) : s.regionsIndexes.value = s.regionsIndexes.value.filter((e) => i.value.has(e)), a.searcherKey.value === -1) return;
282
279
  let t = n.value.keys().next().value;
283
- n.value.forEach((r) => {
280
+ e.modelValueSearcherKey === void 0 ? n.value.forEach((r) => {
284
281
  if (e.onlySearcher && r.key === a.searcherKey.value) {
285
282
  t = a.searcherKey.value;
286
283
  return;
@@ -291,7 +288,7 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
291
288
  let i = n.value.get(r.key)?.regionByIndex;
292
289
  e?.has(-2) && !i?.has(-2) && (t = r.key);
293
290
  }
294
- }), t !== void 0 && (a.searcherKey.value = t), o.regionIndex.value !== void 0 && !(r.value?.regionByIndex)?.has(o.regionIndex.value) && (o.regionIndex.value = r.value?.regions?.keys().next().value);
291
+ }) : t = e.modelValueSearcherKey, t !== void 0 && (a.searcherKey.value = t), o.regionIndex.value !== void 0 && !(r.value?.regionByIndex)?.has(o.regionIndex.value) && (o.regionIndex.value = r.value?.regions?.keys().next().value);
295
292
  }, { immediate: !0 });
296
293
  let c = () => {
297
294
  if (a.searcherKey.value !== -1 && a.searcherKey.value !== -2) return a.searcherKey.value;
@@ -300,7 +297,7 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
300
297
  let n = o.regionIndex.value;
301
298
  if (t.value && e.forMode) {
302
299
  let t = o.regionIndex.value;
303
- n = je(e.forMode, {
300
+ n = ke(e.forMode, {
304
301
  searcher_key: c(),
305
302
  key: t
306
303
  }, e.searchers)?.index;
@@ -322,13 +319,14 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
322
319
  if (e !== void 0) return u()?.regionByIndex?.get(e);
323
320
  }
324
321
  };
325
- }, Ve = /* @__PURE__ */ A({
322
+ }, ze = /* @__PURE__ */ M({
326
323
  __name: "regionSelector",
327
- props: /*@__PURE__*/ j({
324
+ props: /*@__PURE__*/ N({
328
325
  projectId: {},
329
326
  searchers: { default: () => [] },
330
327
  modelValue: {},
331
328
  modelValueSingle: {},
329
+ modelValueSearcherKey: {},
332
330
  addCompare: { type: Boolean },
333
331
  forMode: {},
334
332
  autoRegion: { type: Boolean },
@@ -349,95 +347,107 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
349
347
  modelValue: { required: !0 },
350
348
  modelModifiers: {},
351
349
  modelValueSingle: {},
352
- modelValueSingleModifiers: {}
350
+ modelValueSingleModifiers: {},
351
+ modelValueSearcherKey: {},
352
+ modelValueSearcherKeyModifiers: {}
353
353
  }),
354
- emits: ["update:modelValue", "update:modelValueSingle"],
354
+ emits: [
355
+ "update:modelValue",
356
+ "update:modelValueSingle",
357
+ "update:modelValueSearcherKey"
358
+ ],
355
359
  setup(e, { expose: t }) {
356
- let n = e, r = C(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i = R(e, "modelValue"), s = R(e, "modelValueSingle"), { selectSearcher: c, selectRegion: l, compare: u, searcherByKey: d, allRegionsIndexes: f, getSearcher: p, getRegion: m } = Be(n), h = () => {
360
+ let n = e, r = T(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i = z(e, "modelValue"), s = z(e, "modelValueSingle"), c = z(e, "modelValueSearcherKey"), l = i.value.some((e) => e !== -2);
361
+ if (r.value && !n.onlySearcher && c.value === void 0 && l) throw Error("При использовании `region.key` в `modelValue` необходимо передавать `modelValueSearcherKey`");
362
+ let { selectSearcher: u, selectRegion: d, compare: f, searcherByKey: p, allRegionsIndexes: m, getSearcher: h, getRegion: g } = Re(n), _ = () => {
357
363
  let e = [];
358
- d.value.forEach((t) => {
364
+ p.value.forEach((t) => {
359
365
  (n.forMode === "project_relevant_url" || t.enabled) && t.regions.forEach((t) => {
360
366
  (n.forMode === "project_relevant_url" || t.enabled) && t.index !== -1 && e.push(t);
361
367
  });
362
- }), Me.open("regions", {
368
+ }), Ae.open("regions", {
363
369
  regions: e,
364
- regionsIndexes: u.regionsIndexes.value,
365
- "@update:regionsIndexes": (e) => u.regionsIndexes.value = e
370
+ regionsIndexes: f.regionsIndexes.value,
371
+ "@update:regionsIndexes": (e) => f.regionsIndexes.value = e
366
372
  });
367
373
  };
368
- return z([
369
- l.regionIndex,
370
- c.searcherKey,
371
- u.regionsIndexes
374
+ return B([
375
+ d.regionIndex,
376
+ u.searcherKey,
377
+ f.regionsIndexes
372
378
  ], () => {
373
- if (c.searcherKey.value === -1 && u.regionsIndexes.value.length) {
374
- if (JSON.stringify(i.value) === JSON.stringify(u.regionsIndexes.value)) return;
375
- i.value = [...u.regionsIndexes.value];
376
- } else n.onlySearcher ? (i.value = [c.searcherKey.value], c.searcherKey.value === -2 && !n.autoRegion && (i.value.length = 0)) : (i.value = [l.regionIndex.value], l.regionIndex.value === -2 && !n.autoRegion && (i.value.length = 0));
377
- !n.onlySearcher && !f.value.size && (c.searcherKey.value = -2);
378
- }), s.value && z(s, () => {
379
+ if (u.searcherKey.value === -1 && f.regionsIndexes.value.length) {
380
+ if (JSON.stringify(i.value) === JSON.stringify(f.regionsIndexes.value)) return;
381
+ i.value = [...f.regionsIndexes.value];
382
+ } else n.onlySearcher ? (i.value = [u.searcherKey.value], u.searcherKey.value === -2 && !n.autoRegion && (i.value.length = 0)) : (i.value = [d.regionIndex.value], d.regionIndex.value === -2 && !n.autoRegion && (i.value.length = 0));
383
+ !n.onlySearcher && !m.value.size && (u.searcherKey.value = -2);
384
+ }), B(c, () => {
385
+ c.value !== void 0 && (u.searcherKey.value = c.value);
386
+ }), B(u.searcherKey, () => {
387
+ c.value !== void 0 && (c.value = u.searcherKey.value);
388
+ }), s.value && B(s, () => {
379
389
  s.value && (i.value = [s.value]);
380
- }, { immediate: !0 }), z(i, () => {
390
+ }, { immediate: !0 }), B(i, () => {
381
391
  if (i.value[0] && (s.value = i.value[0]), n.onlySearcher) {
382
- if (!i.value.length || i.value.length === 1 && !d.value.has(i.value[0]) || i.value.length === 1 && i.value[0] === -2 && !n.autoRegion) {
383
- let e = d.value.keys().next().value;
392
+ if (!i.value.length || i.value.length === 1 && !p.value.has(i.value[0]) || i.value.length === 1 && i.value[0] === -2 && !n.autoRegion) {
393
+ let e = p.value.keys().next().value;
384
394
  e === -2 && !n.autoRegion && (e = void 0, s.value = -2), e === void 0 ? i.value.length = 0 : i.value = [e];
385
395
  return;
386
396
  }
387
- if (i.value.length > 1 && JSON.stringify(i.value) !== JSON.stringify(u.regionsIndexes.value)) {
388
- i.value = [...u.regionsIndexes.value];
397
+ if (i.value.length > 1 && JSON.stringify(i.value) !== JSON.stringify(f.regionsIndexes.value)) {
398
+ i.value = [...f.regionsIndexes.value];
389
399
  return;
390
400
  }
391
401
  } else {
392
- let e = [...new Set(i.value)], t = d.value.values().next().value?.regionByIndex?.keys().next().value;
393
- if (r.value && (t = d.value.values().next().value?.regionByIndex?.values().next().value?.key), t === -2 && !n.autoRegion && (t = void 0, s.value = -2), !e.length) t !== void 0 && e.push(t);
402
+ let e = [...new Set(i.value)], t = p.value.values().next().value?.regionByIndex?.keys().next().value;
403
+ if (r.value && (t = p.value.values().next().value?.regionByIndex?.values().next().value?.key), t === -2 && !n.autoRegion && (t = void 0, s.value = -2), !e.length) t !== void 0 && e.push(t);
394
404
  else if (e.length === 1) {
395
- let n = f.value;
396
- r.value && (n = /* @__PURE__ */ new Set(), d.value.forEach((e) => {
405
+ let n = m.value;
406
+ r.value && (n = /* @__PURE__ */ new Set(), p.value.forEach((e) => {
397
407
  e.regionByIndex.forEach((e) => {
398
408
  e.index !== -2 && n.add(e.key);
399
409
  });
400
410
  })), n.has(e[0]) || (e = [], t !== void 0 && e.push(t));
401
- } else e = e.filter((e) => f.value.has(e)), !e.length && t !== void 0 && e.push(t);
411
+ } else e = e.filter((e) => m.value.has(e)), !e.length && t !== void 0 && e.push(t);
402
412
  if (JSON.stringify(i.value) !== JSON.stringify(e)) {
403
413
  i.value = e;
404
414
  return;
405
415
  }
406
416
  }
407
- if (i.value.length !== 1 || i.value[0] !== (n.onlySearcher ? c.searcherKey.value : l.regionIndex.value)) {
417
+ if (i.value.length !== 1 || i.value[0] !== (n.onlySearcher ? u.searcherKey.value : d.regionIndex.value)) {
408
418
  if (n.onlySearcher) {
409
419
  if (i.value.length === 1) {
410
- c.searcherKey.value = i.value[0];
420
+ u.searcherKey.value = i.value[0];
411
421
  return;
412
422
  }
413
- c.searcherKey.value = -1;
423
+ u.searcherKey.value = -1;
414
424
  return;
415
425
  }
416
426
  if (!i.value.length) return;
417
- if (i.value.length === 1 && c.searcherKey.value !== -1) {
418
- l.regionIndex.value = i.value[0];
419
- let e;
420
- for (let t of d.value.values()) {
421
- for (let n of t.regionByIndex.values()) if ((r.value ? n.key : n.index) === l.regionIndex.value) {
427
+ if (i.value.length === 1 && u.searcherKey.value !== -1) {
428
+ d.regionIndex.value = i.value[0];
429
+ let e = c.value;
430
+ if (e === void 0) for (let t of p.value.values()) {
431
+ for (let n of t.regionByIndex.values()) if ((r.value ? n.key : n.index) === d.regionIndex.value) {
422
432
  e = t.key;
423
433
  break;
424
434
  }
425
435
  if (e !== void 0) break;
426
436
  }
427
- e !== void 0 && (c.searcherKey.value = e);
428
- } else c.searcherKey.value = -1, u.regionsIndexes.value = [...i.value];
437
+ e !== void 0 && (u.searcherKey.value = e);
438
+ } else u.searcherKey.value = -1, f.regionsIndexes.value = [...i.value];
429
439
  }
430
440
  }, { immediate: !0 }), t({
431
- getSearcher: p,
432
- getRegion: m
433
- }), (t, n) => (N(), E("div", { class: M({
441
+ getSearcher: h,
442
+ getRegion: g
443
+ }), (t, n) => (F(), O("div", { class: P({
434
444
  "top-regionSelector": !0,
435
445
  "top-regionSelector-onlySearcher": e.onlySearcher
436
446
  }) }, [
437
- k(o, {
438
- options: L(c).optionBySearcherKey.value,
439
- modelValue: L(c).searcherKey.value,
440
- "onUpdate:modelValue": n[0] ||= (e) => L(c).searcherKey.value = e,
447
+ j(o, {
448
+ options: R(u).optionBySearcherKey.value,
449
+ modelValue: R(u).searcherKey.value,
450
+ "onUpdate:modelValue": n[0] ||= (e) => R(u).searcherKey.value = e,
441
451
  name: "searcher_key",
442
452
  addChanger: e.addChanger
443
453
  }, null, 8, [
@@ -445,12 +455,12 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
445
455
  "modelValue",
446
456
  "addChanger"
447
457
  ]),
448
- !e.onlySearcher && L(c).searcherKey.value !== L(-1) ? (N(), w(o, {
458
+ !e.onlySearcher && R(u).searcherKey.value !== R(-1) ? (F(), E(o, {
449
459
  key: 0,
450
460
  class: "top-select-region",
451
- options: L(l).optionByRegionIndex.value,
452
- modelValue: L(l).regionIndex.value,
453
- "onUpdate:modelValue": n[1] ||= (e) => L(l).regionIndex.value = e,
461
+ options: R(d).optionByRegionIndex.value,
462
+ modelValue: R(d).regionIndex.value,
463
+ "onUpdate:modelValue": n[1] ||= (e) => R(d).regionIndex.value = e,
454
464
  name: r.value ? "region_key" : "region_index",
455
465
  addChanger: e.addChanger,
456
466
  "data-top-icon": e.addRegionIcon ? "" : void 0
@@ -460,31 +470,31 @@ var ve = { class: "top-competitorSelector" }, ye = { class: "top-ellipsis1" }, b
460
470
  "name",
461
471
  "addChanger",
462
472
  "data-top-icon"
463
- ])) : T("", !0),
464
- e.addCompare && !e.onlySearcher && L(c).searcherKey.value === L(-1) ? (N(), w(a, {
473
+ ])) : D("", !0),
474
+ e.addCompare && !e.onlySearcher && R(u).searcherKey.value === R(-1) ? (F(), E(a, {
465
475
  key: 1,
466
476
  name: "compare",
467
- onClick: h,
468
- "data-count-compare-regions-indexes": L(u).regionsIndexes.value.length
477
+ onClick: _,
478
+ "data-count-compare-regions-indexes": R(f).regionsIndexes.value.length
469
479
  }, {
470
- default: B(() => [O(I(t.$i18n.Common.Selected_regions), 1)]),
480
+ default: V(() => [A(L(t.$i18n.Common.Selected_regions), 1)]),
471
481
  _: 1
472
- }, 8, ["data-count-compare-regions-indexes"])) : T("", !0)
482
+ }, 8, ["data-count-compare-regions-indexes"])) : D("", !0)
473
483
  ], 2));
474
484
  }
475
- }), U = {
485
+ }), W = {
476
486
  id: 0,
477
487
  name: "/",
478
488
  path: "/"
479
489
  };
480
- function He(e) {
490
+ function Be(e) {
481
491
  return e ? n()?.Common.All_folders : "/ (" + n()?.Keywords.Root_folder + ")";
482
492
  }
483
- var Ue = (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) => {
484
- a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = He(t));
493
+ var Ve = (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) => {
494
+ a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Be(t));
485
495
  let o = i > 1 ? "-".repeat(i - 1) + " " : "";
486
- o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Ue(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);
487
- }), n), We = (e, t) => e.gen(`/get/${t}/folders/`, [
496
+ o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Ve(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);
497
+ }), n), He = (e, t) => e.gen(`/get/${t}/folders/`, [
488
498
  "id",
489
499
  "parent_id",
490
500
  "name",
@@ -495,9 +505,9 @@ var Ue = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
495
505
  });
496
506
  //#endregion
497
507
  //#region src/core/utils/composables/useWatch.ts
498
- function Ge(e, t, n) {
508
+ function Ue(e, t, n) {
499
509
  let r = Object.keys(e), i = r.map((t) => e[t]);
500
- return z(i, (e, n, i) => {
510
+ return B(i, (e, n, i) => {
501
511
  let a = {};
502
512
  e.forEach((e, t) => {
503
513
  if (!Object.is(e, n[t])) {
@@ -512,9 +522,9 @@ function Ge(e, t, n) {
512
522
  }
513
523
  //#endregion
514
524
  //#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
515
- var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
525
+ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
516
526
  __name: "folders",
517
- props: /*@__PURE__*/ j({
527
+ props: /*@__PURE__*/ N({
518
528
  folderId: {},
519
529
  folder: {},
520
530
  folders: {},
@@ -530,20 +540,20 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
530
540
  }, {
531
541
  folderId: { required: !0 },
532
542
  folderIdModifiers: {},
533
- folder: { default: U },
543
+ folder: { default: W },
534
544
  folderModifiers: {}
535
545
  }),
536
546
  emits: ["update:folderId", "update:folder"],
537
547
  setup(e) {
538
- let t = e, n = R(e, "folderId"), r = R(e, "folder"), i = t.client && !t.folders ? We(t.client, t.service) : void 0, a = P(null);
539
- z(() => t.projectId, () => {
548
+ let t = e, n = z(e, "folderId"), r = z(e, "folder"), i = t.client && !t.folders ? He(t.client, t.service) : void 0, a = I(null);
549
+ B(() => t.projectId, () => {
540
550
  i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
541
551
  }, { immediate: !0 });
542
- let o = C(() => Ue(t.folders ?? { root: [U] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
552
+ let o = T(() => Ve(t.folders ?? { root: [W] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
543
553
  ...e[0],
544
- name: He(!0)
554
+ name: Be(!0)
545
555
  }), e);
546
- return Ge({
556
+ return Ue({
547
557
  modelFolder: r,
548
558
  modelFolderId: n
549
559
  }, async (e) => {
@@ -553,21 +563,21 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
553
563
  return;
554
564
  }
555
565
  let i = o.value.get(t.folderId);
556
- i ||= U, r.value = i, n.value = i.id;
557
- }, { immediate: !0 }), (t, n) => (N(), w(b, {
566
+ i ||= W, r.value = i, n.value = i.id;
567
+ }, { immediate: !0 }), (t, n) => (F(), E(b, {
558
568
  class: "top-groupSelector_folder",
559
569
  modelValue: r.value,
560
570
  "onUpdate:modelValue": n[0] ||= (e) => r.value = e,
561
571
  items: e.folders ? [...o.value.values()] : void 0,
562
572
  "search-type": "inline",
563
573
  icon: e.addIcon ? "" : void 0,
564
- api: e.folders ? void 0 : L(i),
565
- apiSetSearchParams: (...e) => L(x)(...e, "name"),
574
+ api: e.folders ? void 0 : R(i),
575
+ apiSetSearchParams: (...e) => R(x)(...e, "name"),
566
576
  prepareItemsBeforeRender: s,
567
577
  addChanger: e.addChanger,
568
578
  useCache: ""
569
579
  }, {
570
- item: B(({ item: e }) => [D("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ke)]),
580
+ item: V(({ item: e }) => [k("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, We)]),
571
581
  _: 1
572
582
  }, 8, [
573
583
  "modelValue",
@@ -578,17 +588,17 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
578
588
  "addChanger"
579
589
  ]));
580
590
  }
581
- }), W = {
591
+ }), G = {
582
592
  id: -1,
583
593
  name: "--",
584
- folder_id: U.id,
585
- folder_path: U.path
586
- }, G = {
594
+ folder_id: W.id,
595
+ folder_path: W.path
596
+ }, K = {
587
597
  id: 0,
588
598
  name: "All groups",
589
- folder_id: U.id,
590
- folder_path: U.path
591
- }, K = () => (G.name = n()?.Common.All_groups, G), Je = () => (G.name = n()?.Keywords.Choose_group, G), Ye = (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), Xe = (e, t) => e.gen(`/get/${t}/groups/`, [
599
+ folder_id: W.id,
600
+ folder_path: W.path
601
+ }, q = () => (K.name = n()?.Common.All_groups, K), Ke = () => (K.name = n()?.Keywords.Choose_group, K), qe = (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), Je = (e, t) => e.gen(`/get/${t}/groups/`, [
592
602
  "id",
593
603
  "name",
594
604
  "folder_id",
@@ -596,12 +606,12 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
596
606
  ]).changeParams({
597
607
  folder_id_depth: !0,
598
608
  limit: 100
599
- }), Ze = (e, t) => e.gen(`/add/${t}/groups/`), Qe = (e, t) => e.gen(`/del/${t}/groups/`), $e = (e, t) => e.gen(`/edit/${t}/groups/rename/`), et = { class: "top-groupSelector_groupItem top-ellipsis1" }, tt = {
609
+ }), Ye = (e, t) => e.gen(`/add/${t}/groups/`), Xe = (e, t) => e.gen(`/del/${t}/groups/`), Ze = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Qe = { class: "top-groupSelector_groupItem top-ellipsis1" }, $e = {
600
610
  key: 0,
601
611
  class: "top-comment"
602
- }, nt = ["innerHTML"], rt = ["innerHTML"], it = ["innerHTML"], at = /* @__PURE__ */ A({
612
+ }, et = ["innerHTML"], tt = ["innerHTML"], nt = ["innerHTML"], rt = /* @__PURE__ */ M({
603
613
  __name: "groups",
604
- props: /*@__PURE__*/ j({
614
+ props: /*@__PURE__*/ N({
605
615
  groupId: {},
606
616
  group: {},
607
617
  projectId: {},
@@ -632,14 +642,14 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
632
642
  group: { required: !0 },
633
643
  groupModifiers: {}
634
644
  }),
635
- emits: /*@__PURE__*/ j([
645
+ emits: /*@__PURE__*/ N([
636
646
  "addGroup",
637
647
  "editGroup",
638
648
  "delGroup"
639
649
  ], ["update:groupId", "update:group"]),
640
650
  setup(e, { expose: n, emit: r }) {
641
- let i = e, a = r, o = R(e, "groupId"), s = R(e, "group"), c = i.client && !i.groups ? Xe(i.client, i.service) : void 0, l = i.client ? Ze(i.client, i.service) : void 0, u = i.client ? Qe(i.client, i.service) : void 0, d = i.client ? $e(i.client, i.service) : void 0, f = P(null), p = C(() => {
642
- if (i.groups !== void 0) return Ye(i.groups, i.on, i.folder);
651
+ let i = e, a = r, o = z(e, "groupId"), s = z(e, "group"), c = i.client && !i.groups ? Je(i.client, i.service) : void 0, l = i.client ? Ye(i.client, i.service) : void 0, u = i.client ? Xe(i.client, i.service) : void 0, d = i.client ? Ze(i.client, i.service) : void 0, f = I(null), p = T(() => {
652
+ if (i.groups !== void 0) return qe(i.groups, i.on, i.folder);
643
653
  }), m = t("folder_id", "EQUALS", [i.folder?.id ?? 0]);
644
654
  c?.changeParams({
645
655
  project_id: i.projectId,
@@ -648,19 +658,19 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
648
658
  }), i.on !== void 0 && c?.params.filters?.push(t("on", "EQUALS", [Number(i.on)]));
649
659
  let h = (e) => {
650
660
  s.value = e, o.value = e.id;
651
- }, g = (e = !1) => {
661
+ }, _ = (e = !1) => {
652
662
  f.value?.resetCache(e);
653
663
  };
654
- Ge({
664
+ Ue({
655
665
  projectId: () => i.projectId,
656
666
  folderId: () => i.folder?.id,
657
667
  canSelectAll: () => i.canSelectAll
658
668
  }, (e) => {
659
- if (e.projectId && (c?.changeParams({ project_id: i.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + i.projectId })), e.folderId && (m.values = [i.folder?.id ?? 0]), g(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && o.value !== null) {
669
+ if (e.projectId && (c?.changeParams({ project_id: i.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + i.projectId })), e.folderId && (m.values = [i.folder?.id ?? 0]), _(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && o.value !== null) {
660
670
  let e;
661
- i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = ce(K()))), (i.autoselect === "placeholder" || !e) && (e = Je()), h(e);
671
+ i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = ae(q()))), (i.autoselect === "placeholder" || !e) && (e = Ke()), h(e);
662
672
  }
663
- }, { immediate: !0 }), Ge({
673
+ }, { immediate: !0 }), Ue({
664
674
  modelGroup: s,
665
675
  modelGroupId: o
666
676
  }, async (e) => {
@@ -672,14 +682,14 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
672
682
  if (!(i.canAdd && o.value === null)) {
673
683
  if (i.groups) {
674
684
  let e = p.value?.find((e) => e.id === o.value);
675
- if (!e && i.canSelectAll && (e = K()), e) h(e);
685
+ if (!e && i.canSelectAll && (e = q()), e) h(e);
676
686
  else {
677
687
  let e = p.value?.[0];
678
- e && !o.value ? h(e) : h(W);
688
+ e && !o.value ? h(e) : h(G);
679
689
  }
680
690
  }
681
691
  if (i.client && !i.groups && (o.value || o.value === 0 && !i.canSelectAll)) {
682
- let e = Xe(i.client, i.service).changeParams({
692
+ let e = Je(i.client, i.service).changeParams({
683
693
  project_id: i.projectId,
684
694
  id: o.value,
685
695
  filters: [m]
@@ -687,17 +697,17 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
687
697
  e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + i.projectId });
688
698
  let t = await e.call();
689
699
  if (!t.errors?.length && !t.result) return;
690
- !t.errors && t.result[0] ? h(t.result[0]) : h(W);
700
+ !t.errors && t.result[0] ? h(t.result[0]) : h(G);
691
701
  }
692
702
  }
693
703
  }
694
704
  }, { immediate: !0 });
695
- let v = async (e) => {
705
+ let y = async (e) => {
696
706
  if (i.canAdd !== "api" || !l) return;
697
707
  let t = s.value, n = await l.changeParams({
698
708
  project_id: i.projectId,
699
709
  names: [e.name],
700
- to_id: i.folder?.id ?? U.id,
710
+ to_id: i.folder?.id ?? W.id,
701
711
  to_type: "in_folder_last"
702
712
  }).call();
703
713
  if (n.result) {
@@ -705,7 +715,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
705
715
  h(e), a("addGroup", e);
706
716
  } else h(t);
707
717
  f.value?.resetCache(!0);
708
- }, y = async (e, t) => {
718
+ }, S = async (e, t) => {
709
719
  d && ((await d.changeParams({
710
720
  project_id: i.projectId,
711
721
  id: e.id,
@@ -714,13 +724,13 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
714
724
  id: e.id,
715
725
  name: t
716
726
  }), f.value?.updateCacheItemById(e.id, { name: t })));
717
- }, te = async (e) => {
727
+ }, C = async (e) => {
718
728
  u && ((await u.changeParams({
719
729
  project_id: i.projectId,
720
730
  id: e.id
721
- }).call()).errors || (s.value.id === e.id && h(i.canSelectAll ? K() : W), a("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
731
+ }).call()).errors || (s.value.id === e.id && h(i.canSelectAll ? q() : G), a("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
722
732
  };
723
- return n({ resetCacheGroups: g }), (t, n) => (N(), w(b, {
733
+ return n({ resetCacheGroups: _ }), (t, n) => (F(), E(b, {
724
734
  ref_key: "refSelector",
725
735
  ref: f,
726
736
  class: "top-groupSelector_group",
@@ -729,51 +739,51 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
729
739
  items: p.value ?? e.groups,
730
740
  searchType: "inline",
731
741
  icon: e.addIcon ? "" : void 0,
732
- api: e.groups ? void 0 : L(c),
733
- apiSetSearchParams: (...e) => L(x)(...e, "name"),
742
+ api: e.groups ? void 0 : R(c),
743
+ apiSetSearchParams: (...e) => R(x)(...e, "name"),
734
744
  appendSearchToResult: !!e.canAdd,
735
- useAllItem: e.canSelectAll ? L(K)().name : !1,
745
+ useAllItem: e.canSelectAll ? R(q)().name : !1,
736
746
  addChanger: e.addChanger,
737
747
  useCache: "",
738
- onAppendItem: v
739
- }, re({
740
- item: B(({ item: n }) => [D("div", et, [
741
- n.id === L(null) ? (N(), E("div", tt, I(t.$i18n.Common.Add) + ": ", 1)) : T("", !0),
742
- D("span", {
748
+ onAppendItem: y
749
+ }, ee({
750
+ item: V(({ item: n }) => [k("div", Qe, [
751
+ n.id === R(null) ? (F(), O("div", $e, L(t.$i18n.Common.Add) + ": ", 1)) : D("", !0),
752
+ k("span", {
743
753
  class: "top-groupSelector_groupItemName top-ellipsis1",
744
754
  innerHTML: n.name
745
- }, null, 8, nt),
746
- n.folder_path && e.showPath ? (N(), E("span", {
755
+ }, null, 8, et),
756
+ n.folder_path && e.showPath ? (F(), O("span", {
747
757
  key: 1,
748
758
  class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
749
759
  innerHTML: n.folder_path
750
- }, null, 8, rt)) : T("", !0)
760
+ }, null, 8, tt)) : D("", !0)
751
761
  ])]),
752
762
  _: 2
753
763
  }, [e.canEditAndDel && e.client ? {
754
764
  name: "actions",
755
- fn: B(({ item: r }) => [r.id ? (N(), E(S, { key: 0 }, [k(_, {
765
+ fn: V(({ item: r }) => [r.id ? (F(), O(w, { key: 0 }, [j(g, {
756
766
  submitText: t.$i18n.Common.Save,
757
767
  defaultValue: r.name,
758
768
  inputProps: { addCleaner: !1 },
759
- onSubmit: (e) => y(r, e)
769
+ onSubmit: (e) => S(r, e)
760
770
  }, {
761
- opener: B(() => [...n[1] ||= [D("div", { "data-top-icon": "" }, null, -1)]]),
762
- default: B(() => [...n[2] ||= []]),
771
+ opener: V(() => [...n[1] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
772
+ default: V(() => [...n[2] ||= []]),
763
773
  _: 1
764
774
  }, 8, [
765
775
  "submitText",
766
776
  "defaultValue",
767
777
  "onSubmit"
768
- ]), k(ee, {
778
+ ]), j(v, {
769
779
  isWarning: "",
770
780
  submitText: t.$i18n.Common.Delete,
771
- onSubmit: (e) => te(r)
781
+ onSubmit: (e) => C(r)
772
782
  }, {
773
- opener: B(() => [...n[3] ||= [D("div", { "data-top-icon": "" }, null, -1)]]),
774
- default: B(() => [D("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n.Aitracker.Delete_group_warning }, null, 8, it)]),
783
+ opener: V(() => [...n[3] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
784
+ default: V(() => [k("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n.Aitracker.Delete_group_warning }, null, 8, nt)]),
775
785
  _: 1
776
- }, 8, ["submitText", "onSubmit"])], 64)) : T("", !0)]),
786
+ }, 8, ["submitText", "onSubmit"])], 64)) : D("", !0)]),
777
787
  key: "0"
778
788
  } : void 0]), 1032, [
779
789
  "modelValue",
@@ -786,9 +796,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
786
796
  "addChanger"
787
797
  ]));
788
798
  }
789
- }), ot = { class: "top-groupSelector" }, st = /* @__PURE__ */ A({
799
+ }), it = { class: "top-groupSelector" }, at = /* @__PURE__ */ M({
790
800
  __name: "groupSelector",
791
- props: /*@__PURE__*/ j({
801
+ props: /*@__PURE__*/ N({
792
802
  folderId: {},
793
803
  folder: {},
794
804
  groupId: {},
@@ -833,20 +843,20 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
833
843
  folderModifiers: {},
834
844
  groupId: { required: !0 },
835
845
  groupIdModifiers: {},
836
- group: { default: W },
846
+ group: { default: G },
837
847
  groupModifiers: {}
838
848
  }),
839
- emits: /*@__PURE__*/ j(["update:groups"], [
849
+ emits: /*@__PURE__*/ N(["update:groups"], [
840
850
  "update:folderId",
841
851
  "update:folder",
842
852
  "update:groupId",
843
853
  "update:group"
844
854
  ]),
845
855
  setup(e, { expose: t, emit: n }) {
846
- let r = e, i = P(null), a = R(e, "folderId"), o = R(e, "folder"), s = R(e, "groupId"), c = R(e, "group"), l = n;
847
- o.value = Ue(r.folders ?? { root: [U] }, r.canSelectAllGroups).get(a.value);
856
+ let r = e, i = I(null), a = z(e, "folderId"), o = z(e, "folder"), s = z(e, "groupId"), c = z(e, "group"), l = n;
857
+ o.value = Ve(r.folders ?? { root: [W] }, r.canSelectAllGroups).get(a.value);
848
858
  let u = r.groups?.find((e) => e.id === s.value);
849
- s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = K()), (r.autoselect === "placeholder" || !u) && (u = Je()), u ??= W, c.value = u;
859
+ s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = q()), (r.autoselect === "placeholder" || !u) && (u = Ke()), u ??= G, c.value = u;
850
860
  let d = (e) => {
851
861
  let t;
852
862
  r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
@@ -872,7 +882,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
872
882
  };
873
883
  return t({ resetCacheGroups: (e = !1) => {
874
884
  i.value?.resetCacheGroups(e);
875
- } }), (t, n) => (N(), E("div", ot, [e.showFolders ? (N(), w(qe, {
885
+ } }), (t, n) => (F(), O("div", it, [e.showFolders ? (F(), E(Ge, {
876
886
  key: 0,
877
887
  folderId: a.value,
878
888
  "onUpdate:folderId": n[0] ||= (e) => a.value = e,
@@ -895,7 +905,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
895
905
  "addIcon",
896
906
  "client",
897
907
  "service"
898
- ])) : T("", !0), e.showGroups ? (N(), w(at, {
908
+ ])) : D("", !0), e.showGroups ? (F(), E(rt, {
899
909
  key: 1,
900
910
  ref_key: "componentGroupsRef",
901
911
  ref: i,
@@ -935,46 +945,46 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
935
945
  "addIcon",
936
946
  "client",
937
947
  "service"
938
- ])) : T("", !0)]));
948
+ ])) : D("", !0)]));
939
949
  }
940
- }), ct = (e) => ({
950
+ }), ot = (e) => ({
941
951
  id: null,
942
952
  name: e,
943
953
  listItemProps: {
944
954
  type: "title",
945
955
  class: "top-projectSelector_item"
946
956
  }
947
- }), lt = {
957
+ }), st = {
948
958
  scheduledUpdate: !1,
949
959
  manualUpdate: !1,
950
960
  guestProjects: !1
951
- }, ut = (e, t) => {
961
+ }, ct = (e, t) => {
952
962
  let r = [], i = {
953
- scheduledUpdate: ct(n().Projects.Scheduled_update),
954
- manualUpdate: ct(n().Projects.Manual_update),
955
- guestProjects: ct(n().Projects.Guest_projects)
963
+ scheduledUpdate: ot(n().Projects.Scheduled_update),
964
+ manualUpdate: ot(n().Projects.Manual_update),
965
+ guestProjects: ot(n().Projects.Guest_projects)
956
966
  }, a = t ? {
957
967
  scheduledUpdate: !1,
958
968
  manualUpdate: !1,
959
969
  guestProjects: !1
960
- } : lt;
970
+ } : st;
961
971
  for (let t of e) !a.scheduledUpdate && t.right?.startsWith("1") && t.on > 0 && (r.push(i.scheduledUpdate), a.scheduledUpdate = !0), !a.manualUpdate && t.right?.startsWith("1") && t.on === 0 && (r.push(i.manualUpdate), a.manualUpdate = !0), !a.guestProjects && t.right?.startsWith("0") && t.on >= 0 && (r.push(i.guestProjects), a.guestProjects = !0), r.push(t);
962
972
  return r;
963
- }, dt = (e) => ({
973
+ }, lt = (e) => ({
964
974
  ...e,
965
- externalLink: _t(e.url ?? ""),
975
+ externalLink: ht(e.url ?? ""),
966
976
  listItemProps: {
967
977
  class: "top-projectSelector_item",
968
978
  attrs: { title: e.name }
969
979
  }
970
- }), ft = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(lt).forEach((e) => lt[e] = !1), ut(e.map(dt), n)), pt = (e) => {
980
+ }), ut = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(st).forEach((e) => st[e] = !1), ct(e.map(lt), n)), dt = (e) => {
971
981
  e = e.replace(/#.*/, "");
972
982
  let t = location.hash;
973
983
  return 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;
974
- }, mt = (e) => {
975
- location.href = ht(e);
976
- }, ht = (e) => {
977
- let t = gt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
984
+ }, ft = (e) => {
985
+ location.href = pt(e);
986
+ }, pt = (e) => {
987
+ let t = mt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
978
988
  n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
979
989
  "watcher",
980
990
  "indexing",
@@ -984,17 +994,17 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
984
994
  "adwords"
985
995
  ].includes(n[4]) && (i = n[4] + "/");
986
996
  let a = "https://" + t + "/" + r + e + "/" + i;
987
- return a = pt(a), a;
988
- }, gt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, _t = (e) => {
997
+ return a = dt(a), a;
998
+ }, mt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, ht = (e) => {
989
999
  let t = e.startsWith("http") ? e : "https://" + e;
990
1000
  return t = t.replace(/"/g, "%22"), t;
991
- }, vt = (e, n) => {
1001
+ }, gt = (e, n) => {
992
1002
  let r = e.params.filters ?? [];
993
1003
  r = r.filter((e) => e.name !== "GEN_SEARCH_STRING()");
994
- let i = h(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
1004
+ let i = m(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
995
1005
  n && r.push(t("GEN_SEARCH_STRING()", "REGEXP", [`(${a}|${o})`])), e.changeParams({ filters: r });
996
- }, yt = (n) => {
997
- let i = n.gen("/get/projects_2/projects/", [
1006
+ }, _t = (n, i = !0) => {
1007
+ let a = n.gen("/get/projects_2/projects/", [
998
1008
  "id",
999
1009
  "user_id",
1000
1010
  "name",
@@ -1002,7 +1012,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1002
1012
  "on",
1003
1013
  "right"
1004
1014
  ]);
1005
- return i.changeParams({
1015
+ return a.changeParams({
1006
1016
  filters: [t("on", "GREATER_THAN_EQUALS", [0])],
1007
1017
  orders: [
1008
1018
  e("user_id", "DESC", [r.state.userId]),
@@ -1011,15 +1021,46 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1011
1021
  e("ord", "ASC"),
1012
1022
  e("id", "DESC")
1013
1023
  ]
1014
- }), i.options.loadingShowSpinner = !1, i.options.onApiLoaded = (e, t, n) => {
1024
+ }), a.options.loadingShowSpinner = !1, i && (a.options.onApiLoaded = (e, t, n) => {
1015
1025
  let r = t.data.filters.length > 1, i = t.data.offset === 0, a = t.data.offset === void 0 || i && !r, o = r;
1016
- e.result = ft(e.result, a, o), n?.(e, t);
1017
- }, i;
1018
- }, bt = (e) => e.gen("/add/projects_2/projects/"), xt = { class: "top-ellipsis1" }, St = /* @__PURE__ */ A({
1026
+ e.result = ut(e.result, a, o), n?.(e, t);
1027
+ }), a;
1028
+ }, vt = (e) => {
1029
+ let t = () => ({
1030
+ userId: r.state.userId,
1031
+ projectsIds: [],
1032
+ nextOffset: 0,
1033
+ isLoading: !1,
1034
+ needFind: !0
1035
+ }), n = t(), i = (e, t) => {
1036
+ let r = n.projectsIds.indexOf(e);
1037
+ if (r === -1) return;
1038
+ if (r === 0 && t) {
1039
+ n.needFind = !1;
1040
+ return;
1041
+ }
1042
+ let i = t ? -1 : 1;
1043
+ return n.projectsIds[r + i];
1044
+ };
1045
+ return { getNextProjectId: async (a, o = !1) => {
1046
+ if (n.isLoading) return;
1047
+ n.userId !== r.state.userId && (n = t());
1048
+ let s = _t(e, !1);
1049
+ s.changeParams({ limit: 1e3 });
1050
+ let c;
1051
+ for (n.isLoading = !0, n.needFind = !0; c = i(a, o), n.needFind && !c && n.nextOffset !== null;) {
1052
+ s.changeParams({ offset: n.nextOffset });
1053
+ let e = await s.call();
1054
+ if (e.errors) break;
1055
+ n.nextOffset = e.nextOffset ?? null, n.projectsIds.push(...e.result.map((e) => e.id));
1056
+ }
1057
+ return n.isLoading = !1, c;
1058
+ } };
1059
+ }, yt = (e) => e.gen("/add/projects_2/projects/"), bt = { class: "top-ellipsis1" }, xt = /* @__PURE__ */ M({
1019
1060
  __name: "submenu",
1020
1061
  props: { id: {} },
1021
1062
  setup(e) {
1022
- let t = e, i = n(), a = gt(), o = (e) => {
1063
+ let t = e, i = n(), a = mt(), o = (e) => {
1023
1064
  let t = [
1024
1065
  {
1025
1066
  href: `https://${a}/project/keywords/${e.id}/`,
@@ -1096,60 +1137,60 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1096
1137
  ].filter((e) => !Object.entries(r.state.closedByMod).some(([t, n]) => n && e.href.includes(`/${t}/`)));
1097
1138
  return e.right.includes("0") ? t.filter((t) => e.right[t.right] === "1") : t;
1098
1139
  };
1099
- return (e, n) => (N(), w(L(y), {
1140
+ return (e, n) => (F(), E(R(y), {
1100
1141
  id: t.id,
1101
1142
  class: "top-projectSelectorSubmenu",
1102
1143
  notch: !1,
1103
1144
  pos: "2"
1104
1145
  }, {
1105
- contentList: B(({ data: t }) => [t ? (N(), E(S, { key: 0 }, [(N(!0), E(S, null, F(o(t.projectItem), (t) => (N(), w(L(v), {
1146
+ contentList: V(({ data: t }) => [t ? (F(), O(w, { key: 0 }, [(F(!0), O(w, null, oe(o(t.projectItem), (t) => (F(), E(R(_), {
1106
1147
  href: t.href,
1107
1148
  title: t.title,
1108
1149
  "data-top-icon": t.icon,
1109
1150
  "data-right": t.right
1110
1151
  }, {
1111
- default: B(() => [O(I(e.$core.state.isMobile ? t.title : ""), 1)]),
1152
+ default: V(() => [A(L(e.$core.state.isMobile ? t.title : ""), 1)]),
1112
1153
  _: 2
1113
1154
  }, 1032, [
1114
1155
  "href",
1115
1156
  "title",
1116
1157
  "data-top-icon",
1117
1158
  "data-right"
1118
- ]))), 256)), k(L(v), {
1159
+ ]))), 256)), j(R(_), {
1119
1160
  href: t.projectItem.externalLink,
1120
1161
  title: t.projectItem.externalLink,
1121
1162
  class: "top-ellipsis",
1122
1163
  "data-top-icon": "",
1123
1164
  target: "_blank"
1124
1165
  }, {
1125
- default: B(() => [D("span", xt, I(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
1166
+ default: V(() => [k("span", bt, L(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
1126
1167
  _: 2
1127
- }, 1032, ["href", "title"])], 64)) : T("", !0)]),
1168
+ }, 1032, ["href", "title"])], 64)) : D("", !0)]),
1128
1169
  _: 1
1129
1170
  }, 8, ["id"]));
1130
1171
  }
1131
- }), q = "ui_project_selector_total", Ct = 864e5, J = P(null), Y = pe(), wt = (e) => {
1132
- localStorage.setItem(q + ":" + r.state.userId, JSON.stringify({
1172
+ }), J = "ui_project_selector_total", St = 864e5, Y = I(null), X = de(), Ct = (e) => {
1173
+ localStorage.setItem(J + ":" + r.state.userId, JSON.stringify({
1133
1174
  projectsTotal: e,
1134
- expiresAt: Date.now() + Ct
1175
+ expiresAt: Date.now() + St
1135
1176
  }));
1136
- }, Tt = () => {
1137
- let e = localStorage.getItem(q + ":" + r.state.userId);
1177
+ }, wt = () => {
1178
+ let e = localStorage.getItem(J + ":" + r.state.userId);
1138
1179
  if (!e) return;
1139
1180
  let { projectsTotal: t, expiresAt: n } = JSON.parse(e);
1140
1181
  if (Date.now() > n) {
1141
- localStorage.removeItem(q + ":" + r.state.userId);
1182
+ localStorage.removeItem(J + ":" + r.state.userId);
1142
1183
  return;
1143
1184
  }
1144
1185
  return t;
1145
- }, Et = () => {
1146
- J.value = null, Y.value = void 0, localStorage.removeItem(q + ":" + r.state.userId), te("/get/projects_2/projects/");
1147
- }, Dt = { class: "top-projectSelector_itemText" }, Ot = { class: "top-comment" }, kt = {
1186
+ }, Tt = () => {
1187
+ Y.value = null, X.value = void 0, localStorage.removeItem(J + ":" + r.state.userId), S("/get/projects_2/projects/");
1188
+ }, Et = { class: "top-projectSelector_itemText" }, Dt = { class: "top-comment" }, Ot = {
1148
1189
  key: 0,
1149
1190
  class: "top-comment"
1150
- }, At = ["href"], jt = 1e3, Mt = /* @__PURE__ */ A({
1191
+ }, kt = ["href"], At = 1e3, jt = /* @__PURE__ */ M({
1151
1192
  __name: "projectSelector",
1152
- props: /*@__PURE__*/ j({
1193
+ props: /*@__PURE__*/ N({
1153
1194
  modelValue: {},
1154
1195
  client: {},
1155
1196
  menuMode: { type: Boolean },
@@ -1169,65 +1210,70 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1169
1210
  modelModifiers: {}
1170
1211
  }),
1171
1212
  emits: ["update:modelValue"],
1172
- setup(e) {
1173
- let t = n(), i = e, a = R(e, "modelValue"), o = yt(i.client), s = bt(i.client), c = P(Tt()), l = P(null), f = he(), p = C(() => i.placeholder ?? t.Projects.Select_project), m = C(() => !Y.value || !i.excludeProjectId ? Y.value : Y.value.filter((e) => e.id !== i.excludeProjectId)), h = C(() => {
1174
- if (c.value || c.value === 0) return c.value < jt ? "static" : "api";
1175
- }), _ = async () => {
1176
- J.value ||= o.call();
1177
- let e = await J.value;
1178
- return J.value = null, e;
1179
- }, v = async (e) => {
1180
- let t = await s.changeParams({
1213
+ setup(e, { expose: t }) {
1214
+ let i = n(), a = e, o = z(e, "modelValue"), s = _t(a.client), c = yt(a.client), l = I(wt()), f = I(null), p = pe(), m = T(() => a.placeholder ?? i.Projects.Select_project), g = T(() => !X.value || !a.excludeProjectId ? X.value : X.value.filter((e) => e.id !== a.excludeProjectId)), { getNextProjectId: _ } = vt(a.client), v = async (e = !1) => {
1215
+ let t = o.value.id;
1216
+ if (!t) return;
1217
+ let n = await _(t, e);
1218
+ n && ft(n);
1219
+ }, y = T(() => {
1220
+ if (l.value || l.value === 0) return l.value < At ? "static" : "api";
1221
+ }), x = async () => {
1222
+ Y.value ||= s.call();
1223
+ let e = await Y.value;
1224
+ return Y.value = null, e;
1225
+ }, S = async (e) => {
1226
+ let t = await c.changeParams({
1181
1227
  url: e.name,
1182
1228
  name: e.name
1183
1229
  }).call();
1184
1230
  if (!t.errors) {
1185
- if (Y.value && h.value === "static") {
1186
- let n = dt({
1231
+ if (X.value && y.value === "static") {
1232
+ let n = lt({
1187
1233
  id: t.result,
1188
1234
  user_id: r.state.userId,
1189
1235
  name: e.name,
1190
1236
  url: e.name,
1191
1237
  on: 0,
1192
1238
  right: "11111111111111111111"
1193
- }), i = Y.value.findIndex((e) => e.on === 0);
1194
- Y.value = [
1195
- ...Y.value.slice(0, i),
1239
+ }), i = X.value.findIndex((e) => e.on === 0);
1240
+ X.value = [
1241
+ ...X.value.slice(0, i),
1196
1242
  n,
1197
- ...Y.value.slice(i)
1198
- ], c.value && (c.value += 1, wt(c.value));
1243
+ ...X.value.slice(i)
1244
+ ], l.value && (l.value += 1, Ct(l.value));
1199
1245
  }
1200
- h.value === "api" && l.value?.resetCache(!0);
1246
+ y.value === "api" && f.value?.resetCache(!0);
1201
1247
  }
1248
+ }, C = async () => {
1249
+ if (X.value || y.value === "api") return;
1250
+ let e = await x();
1251
+ e.errors || (X.value = e.result);
1202
1252
  }, ee = async () => {
1203
- if (Y.value || h.value === "api") return;
1204
- let e = await _();
1205
- e.errors || (Y.value = e.result);
1206
- }, y = async () => {
1207
- if (c.value) {
1208
- let e = l.value?.popupOpenerRef?.$el;
1209
- e && e.addEventListener("pointerenter", () => ee(), { once: !0 });
1253
+ if (l.value) {
1254
+ let e = f.value?.popupOpenerRef?.$el;
1255
+ e && e.addEventListener("pointerenter", () => C(), { once: !0 });
1210
1256
  } else {
1211
- o.changeParams({ limit: jt });
1212
- let e = await _();
1257
+ s.changeParams({ limit: At });
1258
+ let e = await x();
1213
1259
  if (e.errors) return;
1214
- delete o.params.limit, c.value = e.total ?? void 0, !Y.value && h.value !== "api" && (Y.value = e.result), c.value && wt(c.value);
1260
+ delete s.params.limit, l.value = e.total ?? void 0, !X.value && y.value !== "api" && (X.value = e.result), l.value && Ct(l.value);
1215
1261
  }
1216
1262
  };
1217
- return se(async () => {
1218
- await y();
1263
+ return t({ goToNextProject: v }), ie(async () => {
1264
+ await ee();
1219
1265
  }), (t, n) => {
1220
- let r = ue("TopButton");
1221
- return N(), E(S, null, [(N(), w(b, {
1222
- key: h.value ?? "dummy",
1266
+ let r = ce("TopButton");
1267
+ return F(), O(w, null, [(F(), E(b, {
1268
+ key: y.value ?? "dummy",
1223
1269
  ref_key: "refSelector",
1224
- ref: l,
1270
+ ref: f,
1225
1271
  class: "top-projectSelector",
1226
- modelValue: a.value,
1227
- "onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? L(mt)(t.id) : a.value = t,
1228
- items: m.value,
1272
+ modelValue: o.value,
1273
+ "onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? R(ft)(t.id) : o.value = t,
1274
+ items: g.value,
1229
1275
  itemsChunkSize: 100,
1230
- itemsIsLoading: h.value === "static" && L(Y) === void 0,
1276
+ itemsIsLoading: y.value === "static" && R(X) === void 0,
1231
1277
  title: t.$i18n.Projects.Search_projects,
1232
1278
  modificator: e.modificator,
1233
1279
  searchFields: [
@@ -1235,52 +1281,52 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1235
1281
  "name",
1236
1282
  "url"
1237
1283
  ],
1238
- placeholder: p.value,
1284
+ placeholder: m.value,
1239
1285
  hasCloserBtn: "",
1240
- api: h.value === "api" ? L(o) : void 0,
1241
- apiSetSearchParams: h.value === "api" ? (...e) => L(vt)(...e) : void 0,
1286
+ api: y.value === "api" ? R(s) : void 0,
1287
+ apiSetSearchParams: y.value === "api" ? (...e) => R(gt)(...e) : void 0,
1242
1288
  useCache: "",
1243
1289
  appendSearchToResult: "",
1244
1290
  appendSearchAllowDuplicate: "",
1245
- appendSearchToResultCond: L(u),
1291
+ appendSearchToResultCond: R(u),
1246
1292
  appendWithoutSelect: "",
1247
1293
  buttonProps: {
1248
1294
  ...e.buttonProps,
1249
- isProgress: !h.value,
1250
- disabled: !h.value
1295
+ isProgress: !y.value,
1296
+ disabled: !y.value
1251
1297
  },
1252
1298
  openerShortcut: e.openerShortcut,
1253
- onAppendItem: v,
1254
- onOpen: ee
1299
+ onAppendItem: S,
1300
+ onOpen: C
1255
1301
  }, {
1256
- item: B(({ item: i }) => [D("div", Dt, [i.id ? (N(), E(S, { key: 0 }, [O(I(L(d)(i.name, 20)) + " ", 1), D("span", Ot, " id " + I(i.id), 1)], 64)) : (N(), E(S, { key: 1 }, [i.listItemProps?.type ? T("", !0) : (N(), E("div", kt, I(t.$i18n.Projects.Add_project) + ": ", 1)), O(" " + I(i.name), 1)], 64))]), i.id ? (N(), E(S, { key: 0 }, [
1257
- e.menuMode ? (N(), E("a", {
1302
+ item: V(({ item: i }) => [k("div", Et, [i.id ? (F(), O(w, { key: 0 }, [A(L(R(d)(i.name, 20)) + " ", 1), k("span", Dt, " id " + L(i.id), 1)], 64)) : (F(), O(w, { key: 1 }, [i.listItemProps?.type ? D("", !0) : (F(), O("div", Ot, L(t.$i18n.Projects.Add_project) + ": ", 1)), A(" " + L(i.name), 1)], 64))]), i.id ? (F(), O(w, { key: 0 }, [
1303
+ e.menuMode ? (F(), O("a", {
1258
1304
  key: 0,
1259
1305
  class: "top-projectSelector_itemLink",
1260
- href: L(ht)(i.id)
1261
- }, null, 8, At)) : T("", !0),
1262
- t.$core.state.isMobile ? T("", !0) : (N(), w(r, {
1306
+ href: R(pt)(i.id)
1307
+ }, null, 8, kt)) : D("", !0),
1308
+ t.$core.state.isMobile ? D("", !0) : (F(), E(r, {
1263
1309
  key: 1,
1264
1310
  href: i.externalLink,
1265
1311
  "data-top-icon": "",
1266
1312
  color: "theme",
1267
1313
  target: "_blank",
1268
- onClick: n[0] ||= V(() => {}, ["stop"])
1314
+ onClick: n[0] ||= H(() => {}, ["stop"])
1269
1315
  }, null, 8, ["href"])),
1270
- k(g, {
1271
- id: L(f),
1316
+ j(h, {
1317
+ id: R(p),
1272
1318
  pos: "2",
1273
1319
  notch: !1,
1274
1320
  data: { projectItem: i }
1275
1321
  }, {
1276
- default: B(() => [k(r, {
1322
+ default: V(() => [j(r, {
1277
1323
  class: "top-popup_listMore",
1278
1324
  "data-top-icon": "",
1279
1325
  color: "theme"
1280
1326
  })]),
1281
1327
  _: 1
1282
1328
  }, 8, ["id", "data"])
1283
- ], 64)) : T("", !0)]),
1329
+ ], 64)) : D("", !0)]),
1284
1330
  _: 1
1285
1331
  }, 8, [
1286
1332
  "modelValue",
@@ -1294,11 +1340,11 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1294
1340
  "appendSearchToResultCond",
1295
1341
  "buttonProps",
1296
1342
  "openerShortcut"
1297
- ])), k(St, { id: L(f) }, null, 8, ["id"])], 64);
1343
+ ])), j(xt, { id: R(p) }, null, 8, ["id"])], 64);
1298
1344
  };
1299
1345
  }
1300
- }), Nt = (e) => "-" + e, X = (e) => e[0] === "-" ? e.substring(1) : e, Z = (e, t) => {
1301
- e = X(e);
1346
+ }), Mt = (e) => "-" + e, Z = (e) => e[0] === "-" ? e.substring(1) : e, Nt = (e, t) => {
1347
+ e = Z(e);
1302
1348
  let n = t.find((t) => t.id === e);
1303
1349
  if (n) return n;
1304
1350
  }, Pt = (e, t, n) => {
@@ -1306,31 +1352,31 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1306
1352
  let r = c.genElPopupOpener("div", t);
1307
1353
  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) => {
1308
1354
  t.preventDefault(), t.stopPropagation(), r.onclick = null;
1309
- let i = P(e.modelValue), a = {
1355
+ let i = I(e.modelValue), a = {
1310
1356
  model: i,
1311
1357
  mode: e.mode,
1312
1358
  targetId: e.targetId,
1313
1359
  filters: e.filters,
1314
1360
  payload: e.payload
1315
1361
  };
1316
- s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, ie(e.modelValue) || z(i, () => {
1317
- e.modelValue = i.value, Q(r, e, n);
1362
+ s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, te(e.modelValue) || B(i, () => {
1363
+ e.modelValue = i.value, It(r, e, n);
1318
1364
  }), r.click();
1319
- }, ie(e.modelValue) ? z(e.modelValue, () => Q(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1365
+ }, te(e.modelValue) ? B(e.modelValue, () => It(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1320
1366
  e.modelValue = t;
1321
1367
  let i = s(r, "topTagSelectorTarget");
1322
- i && (i.model.value = t), Q(r, e, n);
1323
- }), Q(r, e, n), r;
1368
+ i && (i.model.value = t), It(r, e, n);
1369
+ }), It(r, e, n), r;
1324
1370
  }, Ft = (e, t) => {
1325
1371
  s(e, "topTagSelectorRender")?.(t);
1326
- }, Q = (e, t, r) => {
1327
- let i = L(t.modelValue);
1372
+ }, It = (e, t, r) => {
1373
+ let i = R(t.modelValue);
1328
1374
  if (e.classList.toggle("top-tagSelector-selectedOne", !i.length || i.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", i.length > 5), t.mode === "setter" && t.filters) {
1329
1375
  e.innerHTML = `<div>${r}</div>`;
1330
1376
  return;
1331
1377
  }
1332
1378
  if (e.innerHTML = "", !i.length && t.mode === "filter") {
1333
- let t = It({
1379
+ let t = Lt({
1334
1380
  id: "all",
1335
1381
  colorId: "",
1336
1382
  name: n().Common?.All_tags ?? "",
@@ -1339,18 +1385,18 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1339
1385
  e.append(t);
1340
1386
  }
1341
1387
  i.forEach((n) => {
1342
- let r = It({
1343
- id: X(n),
1344
- colorId: Z(n, t.tags)?.color_id ?? "",
1345
- name: Z(n, t.tags)?.name ?? "",
1346
- state: X(n) === n ? "selected" : "excluded"
1388
+ let r = Lt({
1389
+ id: Z(n),
1390
+ colorId: Nt(n, t.tags)?.color_id ?? "",
1391
+ name: Nt(n, t.tags)?.name ?? "",
1392
+ state: Z(n) === n ? "selected" : "excluded"
1347
1393
  });
1348
1394
  e.append(r);
1349
1395
  });
1350
- }, It = (e) => {
1396
+ }, Lt = (e) => {
1351
1397
  let t = document.createElement("div");
1352
1398
  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;
1353
- }, Lt = [
1399
+ }, Rt = [
1354
1400
  {
1355
1401
  id: "1",
1356
1402
  name: "Without Tag",
@@ -1401,11 +1447,11 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1401
1447
  name: "Turquoise",
1402
1448
  color_id: "10"
1403
1449
  }
1404
- ], Rt = [
1450
+ ], zt = [
1405
1451
  "data-tag_id",
1406
1452
  "data-tag_color_id",
1407
1453
  "title"
1408
- ], zt = /* @__PURE__ */ A({
1454
+ ], Q = /* @__PURE__ */ M({
1409
1455
  __name: "tagIcon",
1410
1456
  props: {
1411
1457
  id: {},
@@ -1414,8 +1460,8 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1414
1460
  state: {}
1415
1461
  },
1416
1462
  setup(e) {
1417
- return (t, n) => (N(), E("div", {
1418
- class: M({
1463
+ return (t, n) => (F(), O("div", {
1464
+ class: P({
1419
1465
  "top-tagSelector_tagIcon": !0,
1420
1466
  "top-tagSelector-active": !!e.state,
1421
1467
  "top-tagSelector-excluded": e.state === "excluded"
@@ -1423,11 +1469,11 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1423
1469
  "data-tag_id": e.id,
1424
1470
  "data-tag_color_id": e.colorId,
1425
1471
  title: e.name
1426
- }, null, 10, Rt));
1472
+ }, null, 10, zt));
1427
1473
  }
1428
- }), Bt = ["contenteditable", "onKeydown"], Vt = /* @__PURE__ */ A({
1474
+ }), Bt = ["contenteditable", "onKeydown"], Vt = /* @__PURE__ */ M({
1429
1475
  __name: "tagPopupListItem",
1430
- props: /*@__PURE__*/ j({
1476
+ props: /*@__PURE__*/ N({
1431
1477
  editable: { type: Boolean },
1432
1478
  disabled: { type: Boolean },
1433
1479
  canExclude: { type: Boolean },
@@ -1439,18 +1485,18 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1439
1485
  name: { required: !0 },
1440
1486
  nameModifiers: {}
1441
1487
  }),
1442
- emits: /*@__PURE__*/ j([
1488
+ emits: /*@__PURE__*/ N([
1443
1489
  "update:name",
1444
1490
  "unselect",
1445
1491
  "exclude",
1446
1492
  "select"
1447
1493
  ], ["update:name"]),
1448
1494
  setup(e, { emit: t }) {
1449
- let n = e, r = t, i = R(e, "name"), a = P(null), o = C(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
1495
+ let n = e, r = t, i = z(e, "name"), a = I(null), o = T(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
1450
1496
  contenteditable: s.value,
1451
1497
  onpaste: (e) => e.preventDefault()
1452
- }), s = P(!1), c = async () => {
1453
- s.value = !0, await oe(), a.value?.focus();
1498
+ }), s = I(!1), c = async () => {
1499
+ s.value = !0, await re(), a.value?.focus();
1454
1500
  }, l = () => {
1455
1501
  let e = a.value?.innerText;
1456
1502
  if (!e) return u();
@@ -1462,8 +1508,8 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1462
1508
  let t = "selected";
1463
1509
  n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
1464
1510
  };
1465
- return (t, n) => (N(), w(v, {
1466
- class: M({
1511
+ return (t, n) => (F(), E(_, {
1512
+ class: P({
1467
1513
  "top-tagSelector_tagListItem": !0,
1468
1514
  "top-tagSelector_tagListItem-inEdit": s.value,
1469
1515
  "top-tagSelector_tagListItem-disabled": e.disabled,
@@ -1471,10 +1517,10 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1471
1517
  "top-tagSelector-active": !!e.state,
1472
1518
  "top-tagSelector-excluded": e.state === "excluded"
1473
1519
  }),
1474
- onClick: V(d, ["stop"])
1520
+ onClick: H(d, ["stop"])
1475
1521
  }, {
1476
- default: B(() => [
1477
- k(zt, {
1522
+ default: V(() => [
1523
+ j(Q, {
1478
1524
  id: e.id,
1479
1525
  name: i.value,
1480
1526
  colorId: e.colorId,
@@ -1485,31 +1531,31 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1485
1531
  "colorId",
1486
1532
  "state"
1487
1533
  ]),
1488
- D("span", ae({
1534
+ k("span", ne({
1489
1535
  ref_key: "elName",
1490
1536
  ref: a,
1491
1537
  class: "top-tagSelector_tagListItemName",
1492
1538
  contenteditable: s.value ? "plaintext-only" : !1
1493
- }, o.value, { onKeydown: [_e(V(l, ["stop"]), ["enter"]), _e(V(u, ["stop"]), ["esc"])] }), I(i.value), 17, Bt),
1494
- e.editable ? (N(), E(S, { key: 0 }, [s.value ? (N(), E("span", {
1539
+ }, o.value, { onKeydown: [he(H(l, ["stop"]), ["enter"]), he(H(u, ["stop"]), ["esc"])] }), L(i.value), 17, Bt),
1540
+ e.editable ? (F(), O(w, { key: 0 }, [s.value ? (F(), O("span", {
1495
1541
  key: 1,
1496
1542
  "data-top-icon": "",
1497
1543
  class: "top-tagSelector_edit",
1498
- onClick: V(l, ["stop"])
1499
- })) : (N(), E("span", {
1544
+ onClick: H(l, ["stop"])
1545
+ })) : (F(), O("span", {
1500
1546
  key: 0,
1501
1547
  "data-top-icon": "",
1502
1548
  class: "top-tagSelector_edit",
1503
1549
  onClick: c
1504
- }))], 64)) : T("", !0)
1550
+ }))], 64)) : D("", !0)
1505
1551
  ]),
1506
1552
  _: 1
1507
1553
  }, 8, ["class"]));
1508
1554
  }
1509
- }), Ht = { key: 1 }, Ut = /* @__PURE__ */ A({
1555
+ }), Ht = { key: 1 }, Ut = /* @__PURE__ */ M({
1510
1556
  inheritAttrs: !1,
1511
1557
  __name: "popupOpener",
1512
- props: /*@__PURE__*/ j({
1558
+ props: /*@__PURE__*/ N({
1513
1559
  modelValue: {},
1514
1560
  id: {},
1515
1561
  tags: {},
@@ -1525,7 +1571,7 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1525
1571
  }),
1526
1572
  emits: ["update:modelValue"],
1527
1573
  setup(e, { attrs: t }) {
1528
- let n = e, r = R(e, "modelValue"), i = n.useTopButton ? a : "div", o = n.useTopButton ? "html" : "default", s = {
1574
+ let n = e, r = z(e, "modelValue"), i = n.useTopButton ? a : "div", o = n.useTopButton ? "html" : "default", s = {
1529
1575
  model: r,
1530
1576
  mode: n.mode,
1531
1577
  targetId: n.targetId,
@@ -1533,9 +1579,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1533
1579
  payload: n.payload
1534
1580
  };
1535
1581
  return (a, c) => {
1536
- let l = de("top-data");
1537
- return N(), w(g, { id: e.id }, {
1538
- default: B(() => [ge((N(), w(fe(L(i)), ae({
1582
+ let l = le("top-data");
1583
+ return F(), E(h, { id: e.id }, {
1584
+ default: V(() => [me((F(), E(ue(R(i)), ne({
1539
1585
  class: {
1540
1586
  "top-tagSelector": !0,
1541
1587
  "top-tagSelector-useTopButton": n.useTopButton,
@@ -1550,17 +1596,17 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1550
1596
  color: "theme",
1551
1597
  styling: e.styling
1552
1598
  }, t), {
1553
- [L(o)]: B(() => [!r.value.length && e.mode === "filter" ? (N(), w(zt, {
1599
+ [R(o)]: V(() => [!r.value.length && e.mode === "filter" ? (F(), E(Q, {
1554
1600
  key: 0,
1555
1601
  id: "all",
1556
1602
  colorId: "",
1557
1603
  name: a.$i18n.Common.All_tags ?? "",
1558
1604
  state: ""
1559
- }, null, 8, ["name"])) : T("", !0), e.mode === "setter" && e.filters ? (N(), E("div", Ht, [le(a.$slots, "default")])) : (N(!0), E(S, { key: 2 }, F(r.value, (t) => (N(), w(zt, {
1560
- id: L(X)(t),
1561
- colorId: L(Z)(t, e.tags)?.color_id ?? "",
1562
- name: L(Z)(t, e.tags)?.name ?? "",
1563
- state: L(X)(t) === t ? "selected" : "excluded"
1605
+ }, null, 8, ["name"])) : D("", !0), e.mode === "setter" && e.filters ? (F(), O("div", Ht, [se(a.$slots, "default")])) : (F(!0), O(w, { key: 2 }, oe(r.value, (t) => (F(), E(Q, {
1606
+ id: R(Z)(t),
1607
+ colorId: R(Nt)(t, e.tags)?.color_id ?? "",
1608
+ name: R(Nt)(t, e.tags)?.name ?? "",
1609
+ state: R(Z)(t) === t ? "selected" : "excluded"
1564
1610
  }, null, 8, [
1565
1611
  "id",
1566
1612
  "colorId",
@@ -1577,9 +1623,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1577
1623
  }, 8, ["id"]);
1578
1624
  };
1579
1625
  }
1580
- }), Wt = /* @__PURE__ */ A({
1626
+ }), Wt = /* @__PURE__ */ M({
1581
1627
  __name: "tagSelector",
1582
- props: /*@__PURE__*/ j({
1628
+ props: /*@__PURE__*/ N({
1583
1629
  modelValue: {},
1584
1630
  tags: {},
1585
1631
  tagsEditable: { type: Boolean },
@@ -1600,20 +1646,20 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1600
1646
  }, {
1601
1647
  modelValue: { required: !0 },
1602
1648
  modelModifiers: {},
1603
- tags: { default: ce(Lt) },
1649
+ tags: { default: ae(Rt) },
1604
1650
  tagsModifiers: {}
1605
1651
  }),
1606
- emits: /*@__PURE__*/ j([
1652
+ emits: /*@__PURE__*/ N([
1607
1653
  "selector",
1608
1654
  "setter",
1609
1655
  "tagsChanged"
1610
1656
  ], ["update:modelValue", "update:tags"]),
1611
1657
  setup(e, { emit: t }) {
1612
- let c = n(), l = e, u = R(e, "modelValue"), d = R(e, "tags"), f = t, p = i((e, t) => {
1658
+ let c = n(), l = e, u = z(e, "modelValue"), d = z(e, "tags"), f = t, p = i((e, t) => {
1613
1659
  f(e, t);
1614
1660
  }, l.emitDelay);
1615
1661
  l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
1616
- let m = l.id ?? "top-popup-id-" + Math.random(), h = P("add"), g = () => {
1662
+ let m = l.id ?? "top-popup-id-" + Math.random(), h = I("add"), g = () => {
1617
1663
  let e = " " + c.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
1618
1664
  return t.set("add", {
1619
1665
  value: "add",
@@ -1625,35 +1671,35 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1625
1671
  value: "delete",
1626
1672
  title: c.Common.Delete + e
1627
1673
  }), t;
1628
- }, _ = pe({
1674
+ }, v = de({
1629
1675
  model: u,
1630
1676
  mode: "filter",
1631
1677
  targetId: void 0,
1632
1678
  filters: void 0,
1633
1679
  payload: void 0
1634
1680
  });
1635
- z(u, () => {
1681
+ B(u, () => {
1636
1682
  p("selector", u.value);
1637
1683
  });
1638
- let ee = C(() => {
1639
- if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
1640
- }), b = (e) => {
1684
+ let b = T(() => {
1685
+ if (v.value.mode === "setter" && l.maxTagsForSetter && !v.value.filters) return v.value.model.value.length >= l.maxTagsForSetter;
1686
+ }), x = (e) => {
1641
1687
  if (e !== "all") {
1642
- if (_.value.model.value.includes(e)) return "selected";
1643
- if (_.value.model.value.includes(Nt(e))) return "excluded";
1688
+ if (v.value.model.value.includes(e)) return "selected";
1689
+ if (v.value.model.value.includes(Mt(e))) return "excluded";
1644
1690
  }
1645
- return e === "all" && !_.value.model.value.length ? "selected" : "";
1646
- }, x = (e, t) => {
1647
- let n = Nt(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
1648
- 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", {
1691
+ return e === "all" && !v.value.model.value.length ? "selected" : "";
1692
+ }, S = (e, t) => {
1693
+ let n = Mt(e), r = v.value.model.value.filter((t) => t !== e && t !== n);
1694
+ 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", {
1649
1695
  tagsIds: r,
1650
- targetId: _.value.targetId,
1651
- payload: _.value.payload
1696
+ targetId: v.value.targetId,
1697
+ payload: v.value.payload
1652
1698
  });
1653
- }, te = C(() => {
1699
+ }, C = T(() => {
1654
1700
  let e = "top-tagSelector_popup";
1655
- return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
1656
- }), ne = () => {
1701
+ return v.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), v.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
1702
+ }), k = () => {
1657
1703
  let e = prompt("", "New tag");
1658
1704
  if (!e || e === "New tag") return;
1659
1705
  let t = d.value.length + 1;
@@ -1662,9 +1708,9 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1662
1708
  name: e,
1663
1709
  color_id: String((t - 1) % 10 + 1)
1664
1710
  }), f("tagsChanged", d.value);
1665
- }, D = (e) => {
1666
- if (_.value = s(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1667
- if (_.value.filters && (h.value = "add", _.value.model.value = []), !r.$?.ui.sortable) {
1711
+ }, M = (e) => {
1712
+ if (v.value = s(e.elPopupOpener, "topTagSelectorTarget"), !v.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1713
+ if (v.value.filters && (h.value = "add", v.value.model.value = []), !r.$?.ui.sortable) {
1668
1714
  console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
1669
1715
  return;
1670
1716
  }
@@ -1682,13 +1728,13 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1682
1728
  }), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
1683
1729
  }
1684
1730
  });
1685
- }, A = (e) => {
1731
+ }, te = (e) => {
1686
1732
  r.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
1687
1733
  };
1688
- return (t, n) => (N(), E(S, null, [k(Ut, {
1734
+ return (t, n) => (F(), O(w, null, [j(Ut, {
1689
1735
  modelValue: u.value,
1690
1736
  "onUpdate:modelValue": n[0] ||= (e) => u.value = e,
1691
- id: L(m),
1737
+ id: R(m),
1692
1738
  tags: d.value,
1693
1739
  styling: e.styling,
1694
1740
  mode: "filter",
@@ -1699,36 +1745,36 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1699
1745
  "tags",
1700
1746
  "styling",
1701
1747
  "useTopButton"
1702
- ]), k(y, {
1703
- id: L(m),
1704
- class: M(te.value),
1705
- onOpen: n[4] ||= (e) => D(e),
1706
- onClose: n[5] ||= (e) => A(e),
1748
+ ]), j(y, {
1749
+ id: R(m),
1750
+ class: P(C.value),
1751
+ onOpen: n[4] ||= (e) => M(e),
1752
+ onClose: n[5] ||= (e) => te(e),
1707
1753
  "transition-duration": 50
1708
- }, re({
1709
- contentList: B(() => [
1710
- _.value.mode === "filter" && !e.singleMode ? (N(), w(Vt, {
1754
+ }, ee({
1755
+ contentList: V(() => [
1756
+ v.value.mode === "filter" && !e.singleMode ? (F(), E(Vt, {
1711
1757
  key: 0,
1712
1758
  id: "all",
1713
1759
  colorId: "",
1714
1760
  name: t.$i18n.Common.All_tags ?? "",
1715
- state: _.value.model.value.length ? "" : "selected",
1716
- onSelect: n[3] ||= (e) => _.value.model.value = []
1717
- }, null, 8, ["name", "state"])) : T("", !0),
1718
- (N(!0), E(S, null, F(d.value, (t) => (N(), w(Vt, {
1761
+ state: v.value.model.value.length ? "" : "selected",
1762
+ onSelect: n[3] ||= (e) => v.value.model.value = []
1763
+ }, null, 8, ["name", "state"])) : D("", !0),
1764
+ (F(!0), O(w, null, oe(d.value, (t) => (F(), E(Vt, {
1719
1765
  key: t.id,
1720
1766
  id: t.id,
1721
1767
  colorId: t.color_id,
1722
1768
  name: t.name,
1723
- state: b(t.id),
1724
- canExclude: _.value.mode === "filter" && !e.singleMode,
1769
+ state: x(t.id),
1770
+ canExclude: v.value.mode === "filter" && !e.singleMode,
1725
1771
  editable: e.tagsEditable,
1726
- disabled: ee.value && b(t.id) === "",
1727
- onUnselect: (e) => x(t.id, "unselect"),
1728
- onSelect: (e) => x(t.id, "select"),
1729
- onExclude: (e) => x(t.id, "exclude"),
1772
+ disabled: b.value && x(t.id) === "",
1773
+ onUnselect: (e) => S(t.id, "unselect"),
1774
+ onSelect: (e) => S(t.id, "select"),
1775
+ onExclude: (e) => S(t.id, "exclude"),
1730
1776
  "onUpdate:name": (e) => {
1731
- t.name = e, L(p)("tagsChanged", d.value);
1777
+ t.name = e, R(p)("tagsChanged", d.value);
1732
1778
  }
1733
1779
  }, null, 8, [
1734
1780
  "id",
@@ -1743,36 +1789,36 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1743
1789
  "onExclude",
1744
1790
  "onUpdate:name"
1745
1791
  ]))), 128)),
1746
- e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (N(), w(v, {
1792
+ e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (F(), E(_, {
1747
1793
  key: 1,
1748
1794
  "data-top-icon": "",
1749
- onClick: V(ne, ["stop"])
1795
+ onClick: H(k, ["stop"])
1750
1796
  }, {
1751
- default: B(() => [O(I(t.$i18n.Common.Add), 1)]),
1797
+ default: V(() => [A(L(t.$i18n.Common.Add), 1)]),
1752
1798
  _: 1
1753
- })) : T("", !0)
1799
+ })) : D("", !0)
1754
1800
  ]),
1755
1801
  _: 2
1756
- }, [_.value.mode === "setter" && _.value.filters ? {
1802
+ }, [v.value.mode === "setter" && v.value.filters ? {
1757
1803
  name: "header",
1758
- fn: B(() => [k(o, {
1804
+ fn: V(() => [j(o, {
1759
1805
  modelValue: h.value,
1760
1806
  "onUpdate:modelValue": n[1] ||= (e) => h.value = e,
1761
1807
  options: g()
1762
1808
  }, null, 8, ["modelValue", "options"])]),
1763
1809
  key: "0"
1764
- } : void 0, _.value.mode === "setter" && _.value.filters ? {
1810
+ } : void 0, v.value.mode === "setter" && v.value.filters ? {
1765
1811
  name: "footer",
1766
- fn: B(() => [k(a, { color: "theme" }, {
1767
- default: B(() => [O(I(t.$i18n.Common.Cancel), 1)]),
1812
+ fn: V(() => [j(a, { color: "theme" }, {
1813
+ default: V(() => [A(L(t.$i18n.Common.Cancel), 1)]),
1768
1814
  _: 1
1769
- }), k(a, { onClick: n[2] ||= (e) => L(p)("setter", {
1770
- tagsIds: _.value.model.value,
1771
- filters: _.value.filters,
1815
+ }), j(a, { onClick: n[2] ||= (e) => R(p)("setter", {
1816
+ tagsIds: v.value.model.value,
1817
+ filters: v.value.filters,
1772
1818
  filtersAction: h.value,
1773
- payload: _.value.payload
1819
+ payload: v.value.payload
1774
1820
  }) }, {
1775
- default: B(() => [O(I(h.value === "add" ? t.$i18n.Common.Add : "") + " " + I(h.value === "replace" ? t.$i18n.Common.Replace : "") + " " + I(h.value === "delete" ? t.$i18n.Common.Delete : ""), 1)]),
1821
+ default: V(() => [A(L(h.value === "add" ? t.$i18n.Common.Add : "") + " " + L(h.value === "replace" ? t.$i18n.Common.Replace : "") + " " + L(h.value === "delete" ? t.$i18n.Common.Delete : ""), 1)]),
1776
1822
  _: 1
1777
1823
  })]),
1778
1824
  key: "1"
@@ -1780,6 +1826,6 @@ var Ke = ["innerHTML"], qe = /* @__PURE__ */ A({
1780
1826
  }
1781
1827
  });
1782
1828
  //#endregion
1783
- export { be as TopCompetitorSelector, st as TopGroupSelector, Mt as TopProjectSelector, Ve as TopRegionSelector, Wt as TopTagSelector, Ut as TopTagSelectorPopupOpener, zt as TopTagSelectorTagIcon, Me as dialogRegionSelector, je as findRegion, Pt as genElTopTagSelectorPopupOpener, Ne as genSearcherByKey, Ft as renderElTopTagSelectorPopupOpener, Et as topProjectSelectorClearCache, xe as useItemsFromCompetitors };
1829
+ export { ve as TopCompetitorSelector, at as TopGroupSelector, jt as TopProjectSelector, ze as TopRegionSelector, Wt as TopTagSelector, Ut as TopTagSelectorPopupOpener, Q as TopTagSelectorTagIcon, Ae as dialogRegionSelector, ke as findRegion, Pt as genElTopTagSelectorPopupOpener, je as genSearcherByKey, Ft as renderElTopTagSelectorPopupOpener, Tt as topProjectSelectorClearCache, ye as useItemsFromCompetitors };
1784
1830
 
1785
1831
  //# sourceMappingURL=project.js.map