@topvisor/ui 1.5.6-topSelectorReactive.0 → 1.5.6-topSelectorReactive.2

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 (185) hide show
  1. package/.chunks/api-DZQlrC2R.amd.js +2 -0
  2. package/.chunks/api-DZQlrC2R.amd.js.map +1 -0
  3. package/.chunks/{api-D5wIZnrK.esm.js → api-DZQlrC2R.esm.js} +21 -18
  4. package/.chunks/api-DZQlrC2R.esm.js.map +1 -0
  5. package/.chunks/{app-CQnQGya1.amd.js → app-DinkodXi.amd.js} +2 -2
  6. package/.chunks/{app-CQnQGya1.amd.js.map → app-DinkodXi.amd.js.map} +1 -1
  7. package/.chunks/{app-CQnQGya1.esm.js → app-DinkodXi.esm.js} +11 -11
  8. package/.chunks/app-DinkodXi.esm.js.map +1 -0
  9. package/.chunks/{datepicker-CYAhR3K9.amd.js → datepicker-bozIEbDA.amd.js} +2 -2
  10. package/.chunks/{datepicker-CYAhR3K9.amd.js.map → datepicker-bozIEbDA.amd.js.map} +1 -1
  11. package/.chunks/{datepicker-CYAhR3K9.esm.js → datepicker-bozIEbDA.esm.js} +2 -2
  12. package/.chunks/{datepicker-CYAhR3K9.esm.js.map → datepicker-bozIEbDA.esm.js.map} +1 -1
  13. package/.chunks/{dialog-B7DkbSQZ.amd.js → dialog-BCDVMWG1.amd.js} +2 -2
  14. package/.chunks/{dialog-B7DkbSQZ.amd.js.map → dialog-BCDVMWG1.amd.js.map} +1 -1
  15. package/.chunks/{dialog-B7DkbSQZ.esm.js → dialog-BCDVMWG1.esm.js} +3 -3
  16. package/.chunks/{dialog-B7DkbSQZ.esm.js.map → dialog-BCDVMWG1.esm.js.map} +1 -1
  17. package/.chunks/{dialog_regionSelectorRegions-DnDFRV42.amd.js → dialog_regionSelectorRegions-0M1fMu1a.amd.js} +2 -2
  18. package/.chunks/dialog_regionSelectorRegions-0M1fMu1a.amd.js.map +1 -0
  19. package/.chunks/{dialog_regionSelectorRegions-DnDFRV42.esm.js → dialog_regionSelectorRegions-0M1fMu1a.esm.js} +6 -6
  20. package/.chunks/dialog_regionSelectorRegions-0M1fMu1a.esm.js.map +1 -0
  21. package/.chunks/forms-CY5MOh7a.amd.js +2 -0
  22. package/.chunks/forms-CY5MOh7a.amd.js.map +1 -0
  23. package/.chunks/{forms-BiKUURH4.esm.js → forms-CY5MOh7a.esm.js} +16 -14
  24. package/.chunks/forms-CY5MOh7a.esm.js.map +1 -0
  25. package/.chunks/formsExt-C9r4Gz9y.amd.js +2 -0
  26. package/.chunks/formsExt-C9r4Gz9y.amd.js.map +1 -0
  27. package/.chunks/{formsExt-kZL0--bf.esm.js → formsExt-C9r4Gz9y.esm.js} +162 -162
  28. package/.chunks/formsExt-C9r4Gz9y.esm.js.map +1 -0
  29. package/.chunks/{mocker-C3O-c0Np.amd.js → mocker-Bl1SzAJY.amd.js} +2 -2
  30. package/.chunks/mocker-Bl1SzAJY.amd.js.map +1 -0
  31. package/.chunks/{mocker-C3O-c0Np.esm.js → mocker-Bl1SzAJY.esm.js} +6 -2
  32. package/.chunks/mocker-Bl1SzAJY.esm.js.map +1 -0
  33. package/.chunks/notice-bro62vCA.amd.js +4 -0
  34. package/.chunks/notice-bro62vCA.amd.js.map +1 -0
  35. package/.chunks/{notice-LFdPfo-5.esm.js → notice-bro62vCA.esm.js} +3 -3
  36. package/.chunks/notice-bro62vCA.esm.js.map +1 -0
  37. package/.chunks/popup-3cwJ8Hev.amd.js +2 -0
  38. package/.chunks/popup-3cwJ8Hev.amd.js.map +1 -0
  39. package/.chunks/{popup-KKfSSrM6.esm.js → popup-3cwJ8Hev.esm.js} +5 -3
  40. package/.chunks/popup-3cwJ8Hev.esm.js.map +1 -0
  41. package/.chunks/popup-CzhBQhVH.amd.js +2 -0
  42. package/.chunks/popup-CzhBQhVH.amd.js.map +1 -0
  43. package/.chunks/{popup-DB5g_8kB.esm.js → popup-CzhBQhVH.esm.js} +5 -5
  44. package/.chunks/popup-CzhBQhVH.esm.js.map +1 -0
  45. package/.chunks/punycode.es6-CMafsPEb.amd.js +2 -0
  46. package/.chunks/punycode.es6-CMafsPEb.amd.js.map +1 -0
  47. package/.chunks/punycode.es6-CMafsPEb.esm.js +105 -0
  48. package/.chunks/{punycode.es6-BZRFIj88.esm.js.map → punycode.es6-CMafsPEb.esm.js.map} +1 -1
  49. package/.chunks/store-DjQAOnrn.esm.js.map +1 -1
  50. package/.chunks/{utils-D4nhUVHm.amd.js → utils-Be-ScFyj.amd.js} +2 -2
  51. package/.chunks/{utils-D4nhUVHm.amd.js.map → utils-Be-ScFyj.amd.js.map} +1 -1
  52. package/.chunks/{utils-D4nhUVHm.esm.js → utils-Be-ScFyj.esm.js} +3 -3
  53. package/.chunks/{utils-D4nhUVHm.esm.js.map → utils-Be-ScFyj.esm.js.map} +1 -1
  54. package/.chunks/{utils-DKbnf1Th.amd.js → utils-ds_g-L_r.amd.js} +2 -2
  55. package/.chunks/{utils-DKbnf1Th.amd.js.map → utils-ds_g-L_r.amd.js.map} +1 -1
  56. package/.chunks/{utils-DKbnf1Th.esm.js → utils-ds_g-L_r.esm.js} +4 -4
  57. package/.chunks/{utils-DKbnf1Th.esm.js.map → utils-ds_g-L_r.esm.js.map} +1 -1
  58. package/.chunks/{worker-BufdAd-a.amd.js → worker-Bv_yPPMv.amd.js} +2 -2
  59. package/.chunks/{worker-BufdAd-a.amd.js.map → worker-Bv_yPPMv.amd.js.map} +1 -1
  60. package/.chunks/{worker-BufdAd-a.esm.js → worker-Bv_yPPMv.esm.js} +3 -3
  61. package/.chunks/{worker-BufdAd-a.esm.js.map → worker-Bv_yPPMv.esm.js.map} +1 -1
  62. package/api/additional.js.map +1 -1
  63. package/api/index.amd.js +1 -1
  64. package/api/index.amd.js.map +1 -1
  65. package/api/index.js +1 -1
  66. package/assets/formsExt.css +1 -1
  67. package/assets/project.css +1 -1
  68. package/autoload-css-manifest.amd.json +4 -4
  69. package/autoload-css-manifest.json +4 -4
  70. package/charts/charts.amd.js +1 -1
  71. package/charts/charts.amd.js.map +1 -1
  72. package/charts/charts.js +1 -1
  73. package/charts/charts.js.map +1 -1
  74. package/core/app.amd.js +1 -1
  75. package/core/app.amd.js.map +1 -1
  76. package/core/app.js +3 -3
  77. package/dialog/dialog.amd.js +1 -1
  78. package/dialog/dialog.amd.js.map +1 -1
  79. package/dialog/dialog.js +2 -2
  80. package/forms/forms.amd.js +1 -1
  81. package/forms/forms.amd.js.map +1 -1
  82. package/forms/forms.js +1 -1
  83. package/formsExt/formsExt.amd.js +1 -1
  84. package/formsExt/formsExt.amd.js.map +1 -1
  85. package/formsExt/formsExt.js +1 -1
  86. package/layout/layout.amd.js +1 -1
  87. package/layout/layout.amd.js.map +1 -1
  88. package/layout/layout.js +1 -1
  89. package/package.json +2 -2
  90. package/popup/popup.amd.js +1 -1
  91. package/popup/popup.amd.js.map +1 -1
  92. package/popup/popup.js +1 -1
  93. package/popup/worker.amd.js +1 -1
  94. package/popup/worker.amd.js.map +1 -1
  95. package/popup/worker.js +1 -1
  96. package/project/project.amd.js +1 -1
  97. package/project/project.amd.js.map +1 -1
  98. package/project/project.js +458 -459
  99. package/project/project.js.map +1 -1
  100. package/schedule/schedule.amd.js +1 -1
  101. package/schedule/schedule.amd.js.map +1 -1
  102. package/schedule/schedule.js +8 -6
  103. package/schedule/schedule.js.map +1 -1
  104. package/src/api/api/mocker/index.d.ts +1 -6
  105. package/src/api/api/types/api.d.ts +1 -1
  106. package/src/components/formsExt/selector2/composables/useAPI.d.ts +406 -0
  107. package/src/components/formsExt/selector2/composables/useMenu.d.ts +412 -0
  108. package/src/components/formsExt/selector2/types.d.ts +17 -11
  109. package/src/components/popup/popup/types.d.ts +6 -1
  110. package/src/components/project/project.d.ts +1 -1
  111. package/src/components/project/projectSelector/cache.d.ts +14 -12
  112. package/src/components/project/projectSelector/submenu/types.d.ts +7 -14
  113. package/src/components/project/projectSelector/types.d.ts +22 -9
  114. package/src/components/project/projectSelector/utils.d.ts +8 -4
  115. package/src/core/core/core.d.ts +2 -3
  116. package/src/core/core/options.d.ts +26 -19
  117. package/src/core/core/state.d.ts +3 -4
  118. package/src/core/plugins/core.d.ts +1 -1
  119. package/tabsView/tabsView.amd.js +1 -1
  120. package/tabsView/tabsView.amd.js.map +1 -1
  121. package/tabsView/tabsView.js +2 -2
  122. package/tabsView/tabsView.js.map +1 -1
  123. package/utils/check.js.map +1 -1
  124. package/utils/clipboard.amd.js +1 -1
  125. package/utils/clipboard.amd.js.map +1 -1
  126. package/utils/clipboard.js +1 -1
  127. package/utils/clipboard.js.map +1 -1
  128. package/utils/date.amd.js +1 -1
  129. package/utils/date.amd.js.map +1 -1
  130. package/utils/date.js +1 -1
  131. package/utils/device.amd.js +1 -1
  132. package/utils/device.amd.js.map +1 -1
  133. package/utils/device.js +1 -1
  134. package/utils/dom.amd.js.map +1 -1
  135. package/utils/dom.js.map +1 -1
  136. package/utils/image.amd.js +1 -1
  137. package/utils/image.amd.js.map +1 -1
  138. package/utils/image.js +1 -1
  139. package/utils/lodash.amd.js +1 -1
  140. package/utils/lodash.amd.js.map +1 -1
  141. package/utils/lodash.js +1 -1
  142. package/utils/price.amd.js +1 -1
  143. package/utils/price.amd.js.map +1 -1
  144. package/utils/price.js +1 -1
  145. package/utils/price.js.map +1 -1
  146. package/utils/route.js.map +1 -1
  147. package/utils/scroll.js.map +1 -1
  148. package/utils/searchers.amd.js +1 -1
  149. package/utils/searchers.amd.js.map +1 -1
  150. package/utils/searchers.js +1 -1
  151. package/utils/searchers.js.map +1 -1
  152. package/utils/string.amd.js +1 -1
  153. package/utils/string.amd.js.map +1 -1
  154. package/utils/string.js +2 -2
  155. package/utils/string.js.map +1 -1
  156. package/utils/url.amd.js +1 -1
  157. package/utils/url.amd.js.map +1 -1
  158. package/utils/url.js +1 -1
  159. package/utils/url.js.map +1 -1
  160. package/.chunks/api-D5wIZnrK.amd.js +0 -2
  161. package/.chunks/api-D5wIZnrK.amd.js.map +0 -1
  162. package/.chunks/api-D5wIZnrK.esm.js.map +0 -1
  163. package/.chunks/app-CQnQGya1.esm.js.map +0 -1
  164. package/.chunks/dialog_regionSelectorRegions-DnDFRV42.amd.js.map +0 -1
  165. package/.chunks/dialog_regionSelectorRegions-DnDFRV42.esm.js.map +0 -1
  166. package/.chunks/forms-BiKUURH4.amd.js +0 -2
  167. package/.chunks/forms-BiKUURH4.amd.js.map +0 -1
  168. package/.chunks/forms-BiKUURH4.esm.js.map +0 -1
  169. package/.chunks/formsExt-kZL0--bf.amd.js +0 -2
  170. package/.chunks/formsExt-kZL0--bf.amd.js.map +0 -1
  171. package/.chunks/formsExt-kZL0--bf.esm.js.map +0 -1
  172. package/.chunks/mocker-C3O-c0Np.amd.js.map +0 -1
  173. package/.chunks/mocker-C3O-c0Np.esm.js.map +0 -1
  174. package/.chunks/notice-LFdPfo-5.amd.js +0 -4
  175. package/.chunks/notice-LFdPfo-5.amd.js.map +0 -1
  176. package/.chunks/notice-LFdPfo-5.esm.js.map +0 -1
  177. package/.chunks/popup-DB5g_8kB.amd.js +0 -2
  178. package/.chunks/popup-DB5g_8kB.amd.js.map +0 -1
  179. package/.chunks/popup-DB5g_8kB.esm.js.map +0 -1
  180. package/.chunks/popup-KKfSSrM6.amd.js +0 -2
  181. package/.chunks/popup-KKfSSrM6.amd.js.map +0 -1
  182. package/.chunks/popup-KKfSSrM6.esm.js.map +0 -1
  183. package/.chunks/punycode.es6-BZRFIj88.amd.js +0 -2
  184. package/.chunks/punycode.es6-BZRFIj88.amd.js.map +0 -1
  185. package/.chunks/punycode.es6-BZRFIj88.esm.js +0 -105
@@ -5,25 +5,24 @@
5
5
  _autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
6
6
  /* end import css */
7
7
 
8
- import "../.chunks/api-D5wIZnrK.esm.js";
9
- import { E as e, O as t, P as n, h as r, n as i } from "../.chunks/forms-BiKUURH4.esm.js";
8
+ import "../.chunks/api-DZQlrC2R.esm.js";
9
+ import { E as e, O as t, P as n, h as r, n as i } from "../.chunks/forms-CY5MOh7a.esm.js";
10
10
  import { n as a, t as o } from "../.chunks/field-DEusYVqS.esm.js";
11
11
  import { storage as s } from "../utils/dom.js";
12
- import { t as c } from "../.chunks/worker-BufdAd-a.esm.js";
13
- import "../.chunks/app-CQnQGya1.esm.js";
14
- import { t as l } from "../.chunks/utils-D4nhUVHm.esm.js";
12
+ import { t as c } from "../.chunks/worker-Bv_yPPMv.esm.js";
13
+ import "../.chunks/app-DinkodXi.esm.js";
14
+ import { t as l } from "../.chunks/utils-Be-ScFyj.esm.js";
15
15
  import { validUrl as u } from "../utils/check.js";
16
16
  import { ellipsis as d } from "../utils/string.js";
17
17
  import { getDeviceGIcon as f, getLangLabel as p, getSearcherGIcon as m } from "../utils/searchers.js";
18
18
  import { invertKeyboardLayout as h } from "../utils/keyboard.js";
19
- import { c as g, n as _, o as v, r as ee, s as y } from "../.chunks/popup-KKfSSrM6.esm.js";
20
- import { d as b, s as x, u as te } from "../.chunks/formsExt-kZL0--bf.esm.js";
21
- import "../popup/worker.js";
22
- import { Fragment as S, computed as C, createBlock as w, createCommentVNode as T, createElementBlock as E, createElementVNode as D, createSlots as ne, createTextVNode as O, createVNode as k, defineComponent as A, isRef as re, mergeModels as j, mergeProps as ie, nextTick as ae, normalizeClass as M, onMounted as oe, openBlock as N, reactive as se, ref as P, renderList as F, renderSlot as ce, resolveComponent as le, resolveDirective as ue, resolveDynamicComponent as de, shallowRef as fe, toDisplayString as I, toValue as pe, unref as L, useModel as R, watch as z, withCtx as B, withDirectives as me, withKeys as he, withModifiers as V } from "vue";
19
+ import { c as g, n as _, o as v, r as ee, s as y } from "../.chunks/popup-3cwJ8Hev.esm.js";
20
+ import { d as b, f as x, s as S, u as te } from "../.chunks/formsExt-C9r4Gz9y.esm.js";
21
+ import { Fragment as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createSlots as ne, createTextVNode as k, createVNode as A, defineComponent as j, isRef as re, mergeModels as M, mergeProps as ie, nextTick as ae, normalizeClass as N, onMounted as oe, openBlock as P, reactive as se, ref as F, renderList as I, renderSlot as ce, resolveComponent as le, resolveDirective as ue, resolveDynamicComponent as de, shallowRef as fe, toDisplayString as L, toValue as pe, unref as R, useId as me, useModel as z, watch as B, withCtx as V, withDirectives as he, withKeys as ge, withModifiers as H } from "vue";
23
22
  //#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
24
- var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, ve = /* @__PURE__ */ A({
23
+ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, ye = /* @__PURE__ */ j({
25
24
  __name: "competitorSelector",
26
- props: /*@__PURE__*/ j({
25
+ props: /*@__PURE__*/ M({
27
26
  modelValue: {},
28
27
  items: {},
29
28
  showSelectAllItem: {
@@ -37,7 +36,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
37
36
  }),
38
37
  emits: ["update:modelValue"],
39
38
  setup(n) {
40
- let i = n, a = R(n, "modelValue"), o = C(() => {
39
+ let i = n, a = z(n, "modelValue"), o = w(() => {
41
40
  if (i.showSelectAllItem) return {
42
41
  icon: i.selectAllItemIcon,
43
42
  title: e().Common.Select_all,
@@ -45,23 +44,23 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
45
44
  content: ""
46
45
  };
47
46
  });
48
- return (e, i) => (N(), E("div", ge, [L(t).state.isMobile ? (N(), w(y, { key: 0 }, {
49
- opener: B(() => [k(r, {
47
+ return (e, i) => (P(), D("div", _e, [R(t).state.isMobile ? (P(), T(y, { key: 0 }, {
48
+ opener: V(() => [A(r, {
50
49
  class: "top-competitorSelector_opener",
51
50
  color: "theme",
52
51
  icon: "",
53
52
  icon2: ""
54
53
  }, {
55
- default: B(() => [O(I(n.items.find((e) => e.value === a.value?.[0])?.content), 1)]),
54
+ default: V(() => [k(L(n.items.find((e) => e.value === a.value?.[0])?.content), 1)]),
56
55
  _: 1
57
56
  })]),
58
- contentList: B(() => [(N(!0), E(S, null, F(n.items, (e) => (N(), w(v, {
59
- class: M({ "top-active": a.value?.includes(e.value) }),
57
+ contentList: V(() => [(P(!0), D(C, null, I(n.items, (e) => (P(), T(v, {
58
+ class: N({ "top-active": a.value?.includes(e.value) }),
60
59
  "data-top-icon": e.icon,
61
60
  title: e.title,
62
61
  onClick: () => a.value = [e.value]
63
62
  }, {
64
- default: B(() => [D("span", _e, I(e.content), 1)]),
63
+ default: V(() => [O("span", ve, L(e.content), 1)]),
65
64
  _: 2
66
65
  }, 1032, [
67
66
  "class",
@@ -70,7 +69,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
70
69
  "onClick"
71
70
  ]))), 256))]),
72
71
  _: 1
73
- })) : (N(), w(b, {
72
+ })) : (P(), T(x, {
74
73
  key: 1,
75
74
  modelValue: a.value,
76
75
  "onUpdate:modelValue": i[0] ||= (e) => a.value = e,
@@ -85,12 +84,12 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
85
84
  "selectAllItem"
86
85
  ]))]));
87
86
  }
88
- }), ye = (e, t) => C(() => pe(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
87
+ }), be = (e, t) => w(() => pe(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
89
88
  value: e.id,
90
89
  title: e.url + ` [${e.id}]`,
91
90
  icon: e.id === pe(t) ? "" : "",
92
91
  content: e.name
93
- }))), be = {
92
+ }))), xe = {
94
93
  0: "Yandex",
95
94
  1: "Google",
96
95
  4: "YouTube",
@@ -100,25 +99,25 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
100
99
  9: "GoogleStore",
101
100
  20: "Yandex.com",
102
101
  21: "Yandex.com.tr"
103
- }, xe = {
102
+ }, Se = {
104
103
  key: -2,
105
104
  name: "--",
106
105
  index: -2
107
- }, Se = {
106
+ }, Ce = {
108
107
  key: -2,
109
108
  name: "--",
110
- regions: [xe],
111
- regionByIndex: new Map([[-2, xe]])
112
- }, H = {
109
+ regions: [Se],
110
+ regionByIndex: /* @__PURE__ */ new Map([[-2, Se]])
111
+ }, U = {
113
112
  key: -2,
114
113
  name: "Autoselect",
115
114
  index: -2
116
- }, Ce = {
115
+ }, we = {
117
116
  key: -2,
118
117
  name: "Autoselect",
119
- regions: [H],
120
- regionByIndex: new Map([[-2, H]])
121
- }, we = {
118
+ regions: [U],
119
+ regionByIndex: /* @__PURE__ */ new Map([[-2, U]])
120
+ }, Te = {
122
121
  countryCode: "00",
123
122
  depth: 1,
124
123
  device: 0,
@@ -126,10 +125,10 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
126
125
  index: -1,
127
126
  lang: "ru",
128
127
  name: "Without region"
129
- }, Te = () => (H.name = e().Common.Autoselect, H), Ee = () => (Te(), Ce.name = e().Common.Autoselect, console.log(Ce), Ce), De = () => (we.name = e().Keywords.Without_region, we), Oe = (e = "", t = !1, n = []) => {
128
+ }, Ee = () => (U.name = e().Common.Autoselect, U), De = () => (Ee(), we.name = e().Common.Autoselect, console.log(we), we), Oe = () => (Te.name = e().Keywords.Without_region, Te), ke = (e = "", t = !1, n = []) => {
130
129
  let r;
131
- return r = e ? Ae(n, e) : ke(n), t && r.set(-2, Ee()), r.size || r.set(-2, Se), r;
132
- }, ke = (e, t = !0, n = [], r = "") => {
130
+ return r = e ? je(n, e) : Ae(n), t && r.set(-2, De()), r.size || r.set(-2, Ce), r;
131
+ }, Ae = (e, t = !0, n = [], r = "") => {
133
132
  let i = /* @__PURE__ */ new Map();
134
133
  return e.forEach((e) => {
135
134
  if (!e.enabled || r && typeof e.key == "number" && e.key > 1) return;
@@ -143,35 +142,35 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
143
142
  if (i.has(e)) return;
144
143
  let t = {
145
144
  key: e,
146
- name: be[e],
145
+ name: xe[e],
147
146
  regions: [],
148
147
  regionByIndex: /* @__PURE__ */ new Map()
149
148
  };
150
149
  i.set(t.key, t);
151
150
  }), i;
152
- }, Ae = (e, n) => {
153
- let r = ke(e, !1, t.state.forceSearchersKeysForKeywordsStats, n);
151
+ }, je = (e, n) => {
152
+ let r = Ae(e, !1, t.state.forceSearchersKeysForKeywordsStats, n);
154
153
  if (r.has(2)) {
155
154
  let e = r.get(2);
156
155
  e && (e.regionByIndex = /* @__PURE__ */ new Map());
157
156
  }
158
157
  return (n === "volume" || n === "cost_forecast") && t.state.showGlobalRegionForKeywordsStats && r.forEach((e) => {
159
158
  if (!e.regionByIndex) return;
160
- let t = { ...De() };
159
+ let t = { ...Oe() };
161
160
  e.regionByIndex.set(t.index, t);
162
161
  }), r;
163
- }, je = (e, t, n = []) => {
164
- let r = Oe(e, !1, n), i;
162
+ }, Me = (e, t, n = []) => {
163
+ let r = ke(e, !1, n), i;
165
164
  return r.forEach((n) => {
166
165
  if (!(t.searcher_key !== void 0 && t.searcher_key != n.key) && n.regions && (n.regions.forEach((r) => {
167
166
  if (!i && !(t.key !== void 0 && t.key != r.key) && !(t.index !== void 0 && t.index != r.index) && !(!e && (t.lang !== void 0 && t.lang != r.lang || t.device !== void 0 && t.device != r.device))) return r.searcher_key = n.key, i = r, !1;
168
167
  }), i)) return !1;
169
168
  }), i;
170
- }, Me = l(() => import("../.chunks/dialog_regionSelectorRegions-DnDFRV42.esm.js")), Ne = (t, n) => {
169
+ }, Ne = l(() => import("../.chunks/dialog_regionSelectorRegions-0M1fMu1a.esm.js")), Pe = (t, n) => {
171
170
  let r = e();
172
171
  return {
173
- searcherKey: P(n.value.keys().next().value ?? -2),
174
- optionBySearcherKey: C(() => {
172
+ searcherKey: F(n.value.keys().next().value ?? -2),
173
+ optionBySearcherKey: w(() => {
175
174
  let e = /* @__PURE__ */ new Map();
176
175
  if (n.value.forEach((n) => {
177
176
  let r = {
@@ -195,10 +194,10 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
195
194
  return e;
196
195
  })
197
196
  };
198
- }, Pe = (t, n) => {
199
- let r = e(), i = P(-2);
197
+ }, Fe = (t, n) => {
198
+ let r = e(), i = F(-2);
200
199
  t.modelValue.length === 1 && (i.value = t.modelValue[0]), i.value === -2 && (t.forMode ? i.value = n.value?.regionByIndex.values().next().value?.key ?? -2 : i.value = n.value?.regionByIndex.keys().next().value ?? -2);
201
- let a = C(() => {
200
+ let a = w(() => {
202
201
  let e = /* @__PURE__ */ new Map();
203
202
  return n.value.regionByIndex?.forEach((i) => {
204
203
  let a = i.name;
@@ -221,7 +220,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
221
220
  e.set(i.index, s);
222
221
  }), e;
223
222
  });
224
- return z(a, (e, n) => {
223
+ return B(a, (e, n) => {
225
224
  if (t.onlySearcher || i.value !== void 0 && e.get(i.value)) return;
226
225
  let a = e.keys().next().value;
227
226
  if (i.value === -2 || a === -2) {
@@ -244,8 +243,8 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
244
243
  regionIndex: i,
245
244
  optionByRegionIndex: a
246
245
  };
247
- }, Fe = (e, t, n) => {
248
- let r = P([]), i = () => {
246
+ }, Ie = (e, t, n) => {
247
+ let r = F([]), i = () => {
249
248
  if (e.onlySearcher && t.value) {
250
249
  r.value = Array.from(t.value.keys());
251
250
  return;
@@ -259,19 +258,19 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
259
258
  }, a = () => {
260
259
  r.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(r.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
261
260
  };
262
- return z(r, () => {
261
+ return B(r, () => {
263
262
  a();
264
263
  }), e.addCompare && i(), { regionsIndexes: r };
265
- }, Ie = (e) => {
266
- let t = C(() => Oe(e.forMode, e.autoRegion, e.searchers)), n = C(() => t.value.get(i.searcherKey.value) || Se), r = C(() => {
264
+ }, Le = (e) => {
265
+ let t = w(() => ke(e.forMode, e.autoRegion, e.searchers)), n = w(() => t.value.get(i.searcherKey.value) || Ce), r = w(() => {
267
266
  let e = /* @__PURE__ */ new Set();
268
267
  return t.value.forEach((t) => {
269
268
  t.regionByIndex.forEach((t) => {
270
269
  t.index !== -1 && t.index !== -2 && e.add(t.index);
271
270
  });
272
271
  }), e;
273
- }), i = Ne(e, t), a = Pe(e, n), o = Fe(e, t, r);
274
- z(t, () => {
272
+ }), i = Pe(e, t), a = Fe(e, n), o = Ie(e, t, r);
273
+ B(t, () => {
275
274
  if (e.onlySearcher ? o.regionsIndexes.value = Array.from(t.value.keys()) : o.regionsIndexes.value = o.regionsIndexes.value.filter((e) => r.value.has(e)), i.searcherKey.value === -1) return;
276
275
  let s = t.value.keys().next().value;
277
276
  t.value.forEach((n) => {
@@ -294,7 +293,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
294
293
  let t = a.regionIndex.value;
295
294
  if (e.forMode) {
296
295
  let n = a.regionIndex.value;
297
- t = je(e.forMode, {
296
+ t = Me(e.forMode, {
298
297
  searcher_key: s(),
299
298
  key: n
300
299
  }, e.searchers)?.index;
@@ -316,9 +315,9 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
316
315
  if (e !== void 0) return l()?.regionByIndex?.get(e);
317
316
  }
318
317
  };
319
- }, Le = /* @__PURE__ */ A({
318
+ }, Re = /* @__PURE__ */ j({
320
319
  __name: "regionSelector",
321
- props: /*@__PURE__*/ j({
320
+ props: /*@__PURE__*/ M({
322
321
  projectId: {},
323
322
  searchers: { default: () => [] },
324
323
  modelValue: {},
@@ -347,19 +346,19 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
347
346
  }),
348
347
  emits: ["update:modelValue", "update:modelValueSingle"],
349
348
  setup(e, { expose: t }) {
350
- let n = e, a = R(e, "modelValue"), o = R(e, "modelValueSingle"), { selectSearcher: s, selectRegion: c, compare: l, searcherByKey: u, allRegionsIndexes: d, getSearcher: f, getRegion: p } = Ie(n), m = () => {
349
+ let n = e, a = z(e, "modelValue"), o = z(e, "modelValueSingle"), { selectSearcher: s, selectRegion: c, compare: l, searcherByKey: u, allRegionsIndexes: d, getSearcher: f, getRegion: p } = Le(n), m = () => {
351
350
  let e = [];
352
351
  u.value.forEach((t) => {
353
352
  t.enabled && t.regions.forEach((t) => {
354
353
  t.enabled && e.push(t);
355
354
  });
356
- }), Me.open("regions", {
355
+ }), Ne.open("regions", {
357
356
  regions: e,
358
357
  regionsIndexes: l.regionsIndexes.value,
359
358
  "@update:regionsIndexes": (e) => l.regionsIndexes.value = e
360
359
  });
361
360
  };
362
- return z([
361
+ return B([
363
362
  c.regionIndex,
364
363
  s.searcherKey,
365
364
  l.regionsIndexes
@@ -369,9 +368,9 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
369
368
  a.value = [...l.regionsIndexes.value];
370
369
  } else n.onlySearcher ? (a.value = [s.searcherKey.value], s.searcherKey.value === -2 && !n.autoRegion && (a.value.length = 0)) : (a.value = [c.regionIndex.value], c.regionIndex.value === -2 && !n.autoRegion && (a.value.length = 0));
371
370
  !n.onlySearcher && !d.value.size && (s.searcherKey.value = -2);
372
- }), o.value && z(o, () => {
371
+ }), o.value && B(o, () => {
373
372
  o.value && (a.value = [o.value]);
374
- }, { immediate: !0 }), z(a, () => {
373
+ }, { immediate: !0 }), B(a, () => {
375
374
  if (a.value[0] && (o.value = a.value[0]), n.onlySearcher) {
376
375
  if (!a.value.length || a.value.length === 1 && !u.value.has(a.value[0]) || a.value.length === 1 && a.value[0] === -2 && !n.autoRegion) {
377
376
  let e = u.value.keys().next().value;
@@ -423,14 +422,14 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
423
422
  }, { immediate: !0 }), t({
424
423
  getSearcher: f,
425
424
  getRegion: p
426
- }), (t, n) => (N(), E("div", { class: M({
425
+ }), (t, n) => (P(), D("div", { class: N({
427
426
  "top-regionSelector": !0,
428
427
  "top-regionSelector-onlySearcher": e.onlySearcher
429
428
  }) }, [
430
- k(i, {
431
- options: L(s).optionBySearcherKey.value,
432
- modelValue: L(s).searcherKey.value,
433
- "onUpdate:modelValue": n[0] ||= (e) => L(s).searcherKey.value = e,
429
+ A(i, {
430
+ options: R(s).optionBySearcherKey.value,
431
+ modelValue: R(s).searcherKey.value,
432
+ "onUpdate:modelValue": n[0] ||= (e) => R(s).searcherKey.value = e,
434
433
  name: "searcher_key",
435
434
  addChanger: e.addChanger
436
435
  }, null, 8, [
@@ -438,12 +437,12 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
438
437
  "modelValue",
439
438
  "addChanger"
440
439
  ]),
441
- !e.onlySearcher && L(s).searcherKey.value !== L(-1) ? (N(), w(i, {
440
+ !e.onlySearcher && R(s).searcherKey.value !== R(-1) ? (P(), T(i, {
442
441
  key: 0,
443
442
  class: "top-select-region",
444
- options: L(c).optionByRegionIndex.value,
445
- modelValue: L(c).regionIndex.value,
446
- "onUpdate:modelValue": n[1] ||= (e) => L(c).regionIndex.value = e,
443
+ options: R(c).optionByRegionIndex.value,
444
+ modelValue: R(c).regionIndex.value,
445
+ "onUpdate:modelValue": n[1] ||= (e) => R(c).regionIndex.value = e,
447
446
  name: e.forMode ? "region_key" : "region_index",
448
447
  addChanger: e.addChanger,
449
448
  "data-top-icon": e.addRegionIcon ? "" : void 0
@@ -453,31 +452,31 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
453
452
  "name",
454
453
  "addChanger",
455
454
  "data-top-icon"
456
- ])) : T("", !0),
457
- e.addCompare && !e.onlySearcher && L(s).searcherKey.value === L(-1) ? (N(), w(r, {
455
+ ])) : E("", !0),
456
+ e.addCompare && !e.onlySearcher && R(s).searcherKey.value === R(-1) ? (P(), T(r, {
458
457
  key: 1,
459
458
  name: "compare",
460
459
  onClick: m,
461
- "data-count-compare-regions-indexes": L(l).regionsIndexes.value.length
460
+ "data-count-compare-regions-indexes": R(l).regionsIndexes.value.length
462
461
  }, {
463
- default: B(() => [O(I(t.$i18n.Common.Selected_regions), 1)]),
462
+ default: V(() => [k(L(t.$i18n.Common.Selected_regions), 1)]),
464
463
  _: 1
465
- }, 8, ["data-count-compare-regions-indexes"])) : T("", !0)
464
+ }, 8, ["data-count-compare-regions-indexes"])) : E("", !0)
466
465
  ], 2));
467
466
  }
468
- }), U = {
467
+ }), W = {
469
468
  id: 0,
470
469
  name: "/",
471
470
  path: "/"
472
471
  };
473
- function Re(t) {
472
+ function ze(t) {
474
473
  return t ? e()?.Common.All_folders : "/ (" + e()?.Keywords.Root_folder + ")";
475
474
  }
476
- var ze = (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) => {
477
- a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Re(t));
475
+ var Be = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
476
+ a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = ze(t));
478
477
  let o = i > 1 ? "-".repeat(i - 1) + " " : "";
479
- o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), ze(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);
480
- }), n), Be = (e, t) => e.gen(`/get/${t}/folders/`, [
478
+ o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Be(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
479
+ }), n), Ve = (e, t) => e.gen(`/get/${t}/folders/`, [
481
480
  "id",
482
481
  "parent_id",
483
482
  "name",
@@ -488,9 +487,9 @@ var ze = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
488
487
  });
489
488
  //#endregion
490
489
  //#region src/core/utils/composables/useWatch.ts
491
- function Ve(e, t, n) {
490
+ function He(e, t, n) {
492
491
  let r = Object.keys(e);
493
- return z(r.map((t) => e[t]), (e, n, i) => {
492
+ return B(r.map((t) => e[t]), (e, n, i) => {
494
493
  let a = {};
495
494
  e.forEach((e, t) => {
496
495
  if (!Object.is(e, n[t])) {
@@ -505,9 +504,9 @@ function Ve(e, t, n) {
505
504
  }
506
505
  //#endregion
507
506
  //#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
508
- var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
507
+ var Ue = ["innerHTML"], We = /* @__PURE__ */ j({
509
508
  __name: "folders",
510
- props: /*@__PURE__*/ j({
509
+ props: /*@__PURE__*/ M({
511
510
  folderId: {},
512
511
  folder: {},
513
512
  folders: {},
@@ -523,20 +522,20 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
523
522
  }, {
524
523
  folderId: { required: !0 },
525
524
  folderIdModifiers: {},
526
- folder: { default: U },
525
+ folder: { default: W },
527
526
  folderModifiers: {}
528
527
  }),
529
528
  emits: ["update:folderId", "update:folder"],
530
529
  setup(e) {
531
- let t = e, n = R(e, "folderId"), r = R(e, "folder"), i = t.client && !t.folders ? Be(t.client, t.service) : void 0, a = P(null);
532
- z(() => t.projectId, () => {
530
+ let t = e, n = z(e, "folderId"), r = z(e, "folder"), i = t.client && !t.folders ? Ve(t.client, t.service) : void 0, a = F(null);
531
+ B(() => t.projectId, () => {
533
532
  i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
534
533
  }, { immediate: !0 });
535
- let o = C(() => ze(t.folders ?? { root: [U] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
534
+ let o = w(() => Be(t.folders ?? { root: [W] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
536
535
  ...e[0],
537
- name: Re(!0)
536
+ name: ze(!0)
538
537
  }), e);
539
- return Ve({
538
+ return He({
540
539
  modelFolder: r,
541
540
  modelFolderId: n
542
541
  }, async (e) => {
@@ -546,21 +545,21 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
546
545
  return;
547
546
  }
548
547
  let i = o.value.get(t.folderId);
549
- i ||= U, r.value = i, n.value = i.id;
550
- }, { immediate: !0 }), (t, n) => (N(), w(x, {
548
+ i ||= W, r.value = i, n.value = i.id;
549
+ }, { immediate: !0 }), (t, n) => (P(), T(S, {
551
550
  class: "top-groupSelector_folder",
552
551
  modelValue: r.value,
553
552
  "onUpdate:modelValue": n[0] ||= (e) => r.value = e,
554
553
  items: e.folders ? [...o.value.values()] : void 0,
555
554
  "search-type": "inline",
556
555
  icon: e.addIcon ? "" : void 0,
557
- api: e.folders ? void 0 : L(i),
558
- apiSetSearchParams: (...e) => L(te)(...e, "name"),
556
+ api: e.folders ? void 0 : R(i),
557
+ apiSetSearchParams: (...e) => R(te)(...e, "name"),
559
558
  prepareItemsBeforeRender: s,
560
559
  addChanger: e.addChanger,
561
560
  useCache: ""
562
561
  }, {
563
- item: B(({ item: e }) => [D("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, He)]),
562
+ item: V(({ item: e }) => [O("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ue)]),
564
563
  _: 1
565
564
  }, 8, [
566
565
  "modelValue",
@@ -571,17 +570,17 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
571
570
  "addChanger"
572
571
  ]));
573
572
  }
574
- }), W = {
573
+ }), G = {
575
574
  id: -1,
576
575
  name: "--",
577
- folder_id: U.id,
578
- folder_path: U.path
579
- }, G = {
576
+ folder_id: W.id,
577
+ folder_path: W.path
578
+ }, K = {
580
579
  id: 0,
581
580
  name: "All groups",
582
- folder_id: U.id,
583
- folder_path: U.path
584
- }, K = () => (G.name = e()?.Common.All_groups, G), We = () => (G.name = e()?.Keywords.Choose_group, G), Ge = (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), Ke = (e, t) => e.gen(`/get/${t}/groups/`, [
581
+ folder_id: W.id,
582
+ folder_path: W.path
583
+ }, q = () => (K.name = e()?.Common.All_groups, K), Ge = () => (K.name = e()?.Keywords.Choose_group, K), Ke = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), qe = (e, t) => e.gen(`/get/${t}/groups/`, [
585
584
  "id",
586
585
  "name",
587
586
  "folder_id",
@@ -589,12 +588,12 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
589
588
  ]).changeParams({
590
589
  folder_id_depth: !0,
591
590
  limit: 100
592
- }), qe = (e, t) => e.gen(`/add/${t}/groups/`), Je = (e, t) => e.gen(`/del/${t}/groups/`), Ye = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Xe = { class: "top-groupSelector_groupItem top-ellipsis1" }, Ze = {
591
+ }), Je = (e, t) => e.gen(`/add/${t}/groups/`), Ye = (e, t) => e.gen(`/del/${t}/groups/`), Xe = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Ze = { class: "top-groupSelector_groupItem top-ellipsis1" }, Qe = {
593
592
  key: 0,
594
593
  class: "top-comment"
595
- }, Qe = ["innerHTML"], $e = ["innerHTML"], et = ["innerHTML"], tt = /* @__PURE__ */ A({
594
+ }, $e = ["innerHTML"], et = ["innerHTML"], tt = ["innerHTML"], nt = /* @__PURE__ */ j({
596
595
  __name: "groups",
597
- props: /*@__PURE__*/ j({
596
+ props: /*@__PURE__*/ M({
598
597
  groupId: {},
599
598
  group: {},
600
599
  projectId: {},
@@ -625,14 +624,14 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
625
624
  group: { required: !0 },
626
625
  groupModifiers: {}
627
626
  }),
628
- emits: /*@__PURE__*/ j([
627
+ emits: /*@__PURE__*/ M([
629
628
  "addGroup",
630
629
  "editGroup",
631
630
  "delGroup"
632
631
  ], ["update:groupId", "update:group"]),
633
632
  setup(e, { expose: t, emit: n }) {
634
- let r = e, i = n, a = R(e, "groupId"), s = R(e, "group"), c = r.client && !r.groups ? Ke(r.client, r.service) : void 0, l = r.client ? qe(r.client, r.service) : void 0, u = r.client ? Je(r.client, r.service) : void 0, d = r.client ? Ye(r.client, r.service) : void 0, f = P(null), p = C(() => {
635
- if (r.groups !== void 0) return Ge(r.groups, r.on, r.folder);
633
+ let r = e, i = n, a = z(e, "groupId"), s = z(e, "group"), c = r.client && !r.groups ? qe(r.client, r.service) : void 0, l = r.client ? Je(r.client, r.service) : void 0, u = r.client ? Ye(r.client, r.service) : void 0, d = r.client ? Xe(r.client, r.service) : void 0, f = F(null), p = w(() => {
634
+ if (r.groups !== void 0) return Ke(r.groups, r.on, r.folder);
636
635
  }), m = o("folder_id", "EQUALS", [r.folder?.id ?? 0]);
637
636
  c?.changeParams({
638
637
  project_id: r.projectId,
@@ -644,16 +643,16 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
644
643
  }, g = (e = !1) => {
645
644
  f.value?.resetCache(e);
646
645
  };
647
- Ve({
646
+ He({
648
647
  projectId: () => r.projectId,
649
648
  folderId: () => r.folder?.id,
650
649
  canSelectAll: () => r.canSelectAll
651
650
  }, (e) => {
652
651
  if (e.projectId && (c?.changeParams({ project_id: r.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + r.projectId })), e.folderId && (m.values = [r.folder?.id ?? 0]), g(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && a.value !== null) {
653
652
  let e;
654
- r.autoselect === "first" && (e = p.value?.[0], r.canSelectAll && (e = se(K()))), (r.autoselect === "placeholder" || !e) && (e = We()), h(e);
653
+ r.autoselect === "first" && (e = p.value?.[0], r.canSelectAll && (e = se(q()))), (r.autoselect === "placeholder" || !e) && (e = Ge()), h(e);
655
654
  }
656
- }, { immediate: !0 }), Ve({
655
+ }, { immediate: !0 }), He({
657
656
  modelGroup: s,
658
657
  modelGroupId: a
659
658
  }, async (e) => {
@@ -665,14 +664,14 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
665
664
  if (!(r.canAdd && a.value === null)) {
666
665
  if (r.groups) {
667
666
  let e = p.value?.find((e) => e.id === a.value);
668
- if (!e && r.canSelectAll && (e = K()), e) h(e);
667
+ if (!e && r.canSelectAll && (e = q()), e) h(e);
669
668
  else {
670
669
  let e = p.value?.[0];
671
- e && !a.value ? h(e) : h(W);
670
+ e && !a.value ? h(e) : h(G);
672
671
  }
673
672
  }
674
673
  if (r.client && !r.groups && (a.value || a.value === 0 && !r.canSelectAll)) {
675
- let e = Ke(r.client, r.service).changeParams({
674
+ let e = qe(r.client, r.service).changeParams({
676
675
  project_id: r.projectId,
677
676
  id: a.value,
678
677
  filters: [m]
@@ -680,7 +679,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
680
679
  e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + r.projectId });
681
680
  let t = await e.call();
682
681
  if (!t.errors?.length && !t.result) return;
683
- !t.errors && t.result[0] ? h(t.result[0]) : h(W);
682
+ !t.errors && t.result[0] ? h(t.result[0]) : h(G);
684
683
  }
685
684
  }
686
685
  }
@@ -690,7 +689,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
690
689
  let t = s.value, n = await l.changeParams({
691
690
  project_id: r.projectId,
692
691
  names: [e.name],
693
- to_id: r.folder?.id ?? U.id,
692
+ to_id: r.folder?.id ?? W.id,
694
693
  to_type: "in_folder_last"
695
694
  }).call();
696
695
  if (n.result) {
@@ -703,7 +702,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
703
702
  project_id: r.projectId,
704
703
  id: e.id,
705
704
  name: t
706
- }).call()).errors || (i("editGroup", {
705
+ }).call()).errors || (s.value.id === e.id && (s.value.name = t), i("editGroup", {
707
706
  id: e.id,
708
707
  name: t
709
708
  }), f.value?.updateCacheItemById(e.id, { name: t })));
@@ -711,9 +710,9 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
711
710
  u && ((await u.changeParams({
712
711
  project_id: r.projectId,
713
712
  id: e.id
714
- }).call()).errors || (s.value.id === e.id && h(r.canSelectAll ? K() : W), i("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
713
+ }).call()).errors || (s.value.id === e.id && h(r.canSelectAll ? q() : G), i("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
715
714
  };
716
- return t({ resetCacheGroups: g }), (t, n) => (N(), w(x, {
715
+ return t({ resetCacheGroups: g }), (t, n) => (P(), T(S, {
717
716
  ref_key: "refSelector",
718
717
  ref: f,
719
718
  class: "top-groupSelector_group",
@@ -722,51 +721,51 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
722
721
  items: p.value ?? e.groups,
723
722
  searchType: "inline",
724
723
  icon: e.addIcon ? "" : void 0,
725
- api: e.groups ? void 0 : L(c),
726
- apiSetSearchParams: (...e) => L(te)(...e, "name"),
724
+ api: e.groups ? void 0 : R(c),
725
+ apiSetSearchParams: (...e) => R(te)(...e, "name"),
727
726
  appendSearchToResult: !!e.canAdd,
728
- useAllItem: e.canSelectAll ? L(K)().name : !1,
727
+ useAllItem: e.canSelectAll ? R(q)().name : !1,
729
728
  addChanger: e.addChanger,
730
729
  useCache: "",
731
730
  onAppendItem: v
732
731
  }, ne({
733
- item: B(({ item: n }) => [D("div", Xe, [
734
- n.id === L(null) ? (N(), E("div", Ze, I(t.$i18n.Common.Add) + ": ", 1)) : T("", !0),
735
- D("span", {
732
+ item: V(({ item: n }) => [O("div", Ze, [
733
+ n.id === R(null) ? (P(), D("div", Qe, L(t.$i18n.Common.Add) + ": ", 1)) : E("", !0),
734
+ O("span", {
736
735
  class: "top-groupSelector_groupItemName top-ellipsis1",
737
736
  innerHTML: n.name
738
- }, null, 8, Qe),
739
- n.folder_path && e.showPath ? (N(), E("span", {
737
+ }, null, 8, $e),
738
+ n.folder_path && e.showPath ? (P(), D("span", {
740
739
  key: 1,
741
740
  class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
742
741
  innerHTML: n.folder_path
743
- }, null, 8, $e)) : T("", !0)
742
+ }, null, 8, et)) : E("", !0)
744
743
  ])]),
745
744
  _: 2
746
745
  }, [e.canEditAndDel && e.client ? {
747
746
  name: "actions",
748
- fn: B(({ item: r }) => [r.id ? (N(), E(S, { key: 0 }, [k(_, {
747
+ fn: V(({ item: r }) => [r.id ? (P(), D(C, { key: 0 }, [A(_, {
749
748
  submitText: t.$i18n.Common.Save,
750
749
  defaultValue: r.name,
751
750
  inputProps: { addCleaner: !1 },
752
751
  onSubmit: (e) => y(r, e)
753
752
  }, {
754
- opener: B(() => [...n[1] ||= [D("div", { "data-top-icon": "" }, null, -1)]]),
755
- default: B(() => [...n[2] ||= []]),
753
+ opener: V(() => [...n[1] ||= [O("div", { "data-top-icon": "" }, null, -1)]]),
754
+ default: V(() => [...n[2] ||= []]),
756
755
  _: 1
757
756
  }, 8, [
758
757
  "submitText",
759
758
  "defaultValue",
760
759
  "onSubmit"
761
- ]), k(ee, {
760
+ ]), A(ee, {
762
761
  isWarning: "",
763
762
  submitText: t.$i18n.Common.Delete,
764
763
  onSubmit: (e) => b(r)
765
764
  }, {
766
- opener: B(() => [...n[3] ||= [D("div", { "data-top-icon": "" }, null, -1)]]),
767
- default: B(() => [D("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n["Ai.Tracker"].Delete_group_warning }, null, 8, et)]),
765
+ opener: V(() => [...n[3] ||= [O("div", { "data-top-icon": "" }, null, -1)]]),
766
+ default: V(() => [O("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n["Ai.Tracker"].Delete_group_warning }, null, 8, tt)]),
768
767
  _: 1
769
- }, 8, ["submitText", "onSubmit"])], 64)) : T("", !0)]),
768
+ }, 8, ["submitText", "onSubmit"])], 64)) : E("", !0)]),
770
769
  key: "0"
771
770
  } : void 0]), 1032, [
772
771
  "modelValue",
@@ -779,9 +778,9 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
779
778
  "addChanger"
780
779
  ]));
781
780
  }
782
- }), nt = { class: "top-groupSelector" }, rt = /* @__PURE__ */ A({
781
+ }), rt = { class: "top-groupSelector" }, it = /* @__PURE__ */ j({
783
782
  __name: "groupSelector",
784
- props: /*@__PURE__*/ j({
783
+ props: /*@__PURE__*/ M({
785
784
  folderId: {},
786
785
  folder: {},
787
786
  groupId: {},
@@ -826,20 +825,20 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
826
825
  folderModifiers: {},
827
826
  groupId: { required: !0 },
828
827
  groupIdModifiers: {},
829
- group: { default: W },
828
+ group: { default: G },
830
829
  groupModifiers: {}
831
830
  }),
832
- emits: /*@__PURE__*/ j(["update:groups"], [
831
+ emits: /*@__PURE__*/ M(["update:groups"], [
833
832
  "update:folderId",
834
833
  "update:folder",
835
834
  "update:groupId",
836
835
  "update:group"
837
836
  ]),
838
837
  setup(e, { expose: t, emit: n }) {
839
- let r = e, i = P(null), a = R(e, "folderId"), o = R(e, "folder"), s = R(e, "groupId"), c = R(e, "group"), l = n;
840
- o.value = ze(r.folders ?? { root: [U] }, r.canSelectAllGroups).get(a.value);
838
+ let r = e, i = F(null), a = z(e, "folderId"), o = z(e, "folder"), s = z(e, "groupId"), c = z(e, "group"), l = n;
839
+ o.value = Be(r.folders ?? { root: [W] }, r.canSelectAllGroups).get(a.value);
841
840
  let u = r.groups?.find((e) => e.id === s.value);
842
- s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = K()), (r.autoselect === "placeholder" || !u) && (u = We()), u ??= W, c.value = u;
841
+ s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = q()), (r.autoselect === "placeholder" || !u) && (u = Ge()), u ??= G, c.value = u;
843
842
  let d = (e) => {
844
843
  let t;
845
844
  r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
@@ -848,17 +847,24 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
848
847
  l("update:groups");
849
848
  return;
850
849
  }
851
- l("update:groups", r.groups.map((t) => t.id === e.id ? e : t));
850
+ let t = r.groups.find((t) => t.id === e.id);
851
+ if (!t) return;
852
+ let n = {
853
+ ...t,
854
+ ...e
855
+ }, i = r.groups.map((e) => e.id === n.id ? n : e);
856
+ l("update:groups", i);
852
857
  }, p = (e) => {
853
858
  if (!r.groups) {
854
859
  l("update:groups");
855
860
  return;
856
861
  }
857
- l("update:groups", r.groups.filter((t) => t.id !== e.id));
862
+ let t = r.groups.filter((t) => t.id !== e);
863
+ l("update:groups", t);
858
864
  };
859
865
  return t({ resetCacheGroups: (e = !1) => {
860
866
  i.value?.resetCacheGroups(e);
861
- } }), (t, n) => (N(), E("div", nt, [e.showFolders ? (N(), w(Ue, {
867
+ } }), (t, n) => (P(), D("div", rt, [e.showFolders ? (P(), T(We, {
862
868
  key: 0,
863
869
  folderId: a.value,
864
870
  "onUpdate:folderId": n[0] ||= (e) => a.value = e,
@@ -881,7 +887,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
881
887
  "addIcon",
882
888
  "client",
883
889
  "service"
884
- ])) : T("", !0), e.showGroups ? (N(), w(tt, {
890
+ ])) : E("", !0), e.showGroups ? (P(), T(nt, {
885
891
  key: 1,
886
892
  ref_key: "componentGroupsRef",
887
893
  ref: i,
@@ -921,58 +927,65 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
921
927
  "addIcon",
922
928
  "client",
923
929
  "service"
924
- ])) : T("", !0)]));
930
+ ])) : E("", !0)]));
925
931
  }
926
- }), it = (e) => ({
932
+ }), at = (e) => ({
927
933
  id: null,
928
934
  name: e,
929
- listItemProps: { type: "title" }
930
- }), at = {
935
+ listItemProps: {
936
+ type: "title",
937
+ class: "top-projectSelector_item"
938
+ }
939
+ }), ot = {
931
940
  scheduledUpdate: !1,
932
941
  manualUpdate: !1,
933
942
  guestProjects: !1
934
- }, ot = (t, n) => {
943
+ }, st = (t, n) => {
935
944
  let r = [], i = {
936
- scheduledUpdate: it(e().Projects.Scheduled_update),
937
- manualUpdate: it(e().Projects.Manual_update),
938
- guestProjects: it(e().Projects.Guest_projects)
945
+ scheduledUpdate: at(e().Projects.Scheduled_update),
946
+ manualUpdate: at(e().Projects.Manual_update),
947
+ guestProjects: at(e().Projects.Guest_projects)
939
948
  }, a = n ? {
940
949
  scheduledUpdate: !1,
941
950
  manualUpdate: !1,
942
951
  guestProjects: !1
943
- } : at;
952
+ } : ot;
944
953
  for (let e of t) !a.scheduledUpdate && e.right?.startsWith("1") && e.on > 0 && (r.push(i.scheduledUpdate), a.scheduledUpdate = !0), !a.manualUpdate && e.right?.startsWith("1") && e.on === 0 && (r.push(i.manualUpdate), a.manualUpdate = !0), !a.guestProjects && e.right?.startsWith("0") && e.on >= 0 && (r.push(i.guestProjects), a.guestProjects = !0), r.push(e);
945
954
  return r;
946
- }, st = (e) => e.map((e) => ({
955
+ }, ct = (e) => ({
947
956
  ...e,
948
- listItemProps: { attrs: { title: e.name } }
949
- })), ct = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(at).forEach((e) => at[e] = !1), ot(st(e), n)), lt = (e) => {
957
+ externalLink: mt(e.url ?? ""),
958
+ listItemProps: {
959
+ class: "top-projectSelector_item",
960
+ attrs: { title: e.name }
961
+ }
962
+ }), lt = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(ot).forEach((e) => ot[e] = !1), st(e.map(ct), n)), ut = (e) => {
950
963
  e = e.replace(/#.*/, "");
951
964
  let t = location.hash;
952
- return t = t.replace(/historyView=[^&]*/, ""), t = t.replace(/modelsKeys=[^&]*/, ""), t = t.replace(/competitorsIds=[^&]*/, ""), t = t.replace(/searchersKeys=[^&]*/, ""), t = t.replace(/regionIndex=[^&]*/, ""), t = t.replace(/regionsIndexes=[^&]*/, ""), t = t.replace(/folderId=[^&]*/, ""), t = t.replace(/groupId=[^&]*/, ""), t = t.replace(/tags=[^&]*/, ""), window.mo?.getHash && !window.mo.getHash("dataSort").toString().includes("0000-00-00") && (t = t.replace(/dataSort=[^&]*/, "")), t = t.replace(/%22historyView%22:[^,]*,/, ""), t = t.replace(/%22modelsKeys%22:\[[^\]]*\],/, ""), t = t.replace(/%22competitorsIds%22:\[[^\]]*],/, ""), t = t.replace(/%22searchersKeys%22:\[[^\]]*],/, ""), t = t.replace(/%22regionIndex%22:[^,]*,/, ""), t = t.replace(/%22regionsIndexes%22:\[[^\]]*],/, ""), t = t.replace(/%22folderId%22:[^,]*,/, ""), t = t.replace(/%22groupId%22:[^,]*,/, ""), t = t.replace(/%22tagsIds%22:\[[^\]]*],/, ""), /%22dataSort%22:\{[^}]*0000-00-00[^}]*}/.test(t) || (t = t.replace(/,?%22dataSort%22:\{[^}]*}(,?)/, "$1")), e + t;
953
- }, ut = (e, t) => {
954
- t && t.target instanceof HTMLElement && c.close(t.target.closest(".top-popup-wrapper"));
955
- let n = lt(e);
956
- location.href = n;
965
+ 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;
957
966
  }, dt = (e) => {
958
- let t = ft(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
959
- return n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
967
+ location.href = ft(e);
968
+ }, ft = (e) => {
969
+ let t = pt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
970
+ n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
960
971
  "watcher",
961
972
  "indexing",
962
973
  "sitemap",
963
974
  "audit",
964
975
  "direct",
965
976
  "adwords"
966
- ].includes(n[4]) && (i = n[4] + "/"), "https://" + t + "/" + r + e + "/" + i;
967
- }, ft = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, pt = (e) => {
968
- let t = e.startsWith("http") ? e : "http://" + e;
977
+ ].includes(n[4]) && (i = n[4] + "/");
978
+ let a = "https://" + t + "/" + r + e + "/" + i;
979
+ return a = ut(a), a;
980
+ }, pt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, mt = (e) => {
981
+ let t = e.startsWith("http") ? e : "https://" + e;
969
982
  return t = t.replace(/"/g, "%22"), t;
970
- }, mt = (e, t) => {
983
+ }, ht = (e, t) => {
971
984
  let n = e.params.filters ?? [];
972
985
  n = n.filter((e) => e.name !== "GEN_SEARCH_STRING()");
973
986
  let r = h(t), i = t.replace(/([[^$.|?*+()])/g, "\\$1"), a = r.replace(/([[^$.|?*+()])/g, "\\$1");
974
987
  t && n.push(o("GEN_SEARCH_STRING()", "REGEXP", [`(${i}|${a})`])), e.changeParams({ filters: n });
975
- }, ht = (e) => {
988
+ }, gt = (e) => {
976
989
  let n = e.gen("/get/projects_2/projects/", [
977
990
  "id",
978
991
  "user_id",
@@ -984,234 +997,217 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
984
997
  return n.changeParams({
985
998
  filters: [o("on", "GREATER_THAN_EQUALS", [0])],
986
999
  orders: [
987
- a("user_id", "DESC", [t.state.user.id]),
1000
+ a("user_id", "DESC", [t.state.userId]),
988
1001
  a("on", "DESC"),
989
1002
  a("favorite", "DESC"),
990
1003
  a("id", "DESC")
991
1004
  ]
992
- }), n.options.onApiLoaded = (e, t, n) => {
993
- let r = t.data.filters.length === 1 && t.data.offset === 0 || t.data.limit === 1e3, i = t.data.limit === 100 && t.data.filters.length > 1 ? !0 : void 0;
994
- e.result = ct(e.result, r, i), n?.(e, t);
1005
+ }), n.options.loadingShowSpinner = !1, n.options.onApiLoaded = (e, t, n) => {
1006
+ let r = t.data.filters.length === 1 && t.data.offset === 0 || t.data.limit === 1e3, i = t.data.limit === 100 && t.data.filters.length > 1 || void 0;
1007
+ e.result = lt(e.result, r, i), n?.(e, t);
995
1008
  }, n;
996
- }, gt = (e) => e.gen("/add/projects_2/projects/"), _t = { class: "top-projectSelectorSubmenu_item" }, vt = [
997
- "href",
998
- "title",
999
- "data-top-icon",
1000
- "data-right"
1001
- ], yt = { class: "top-projectSelectorSubmenu_item" }, bt = ["href"], xt = /* @__PURE__ */ A({
1009
+ }, _t = (e) => e.gen("/add/projects_2/projects/"), vt = { class: "top-ellipsis1" }, yt = /* @__PURE__ */ j({
1002
1010
  __name: "submenu",
1003
- props: {
1004
- id: {},
1005
- right: {},
1006
- url: {}
1007
- },
1008
- setup(t) {
1009
- let n = t, r = e(), i = ft(), a = [
1010
- {
1011
- href: `https://${i}/project/keywords/${n.id}/`,
1012
- title: r.Common.Menu_phrases,
1013
- icon: "",
1014
- right: "2"
1015
- },
1016
- {
1017
- href: `https://${i}/project/dynamics/${n.id}/`,
1018
- title: r.Common.Menu_dynamics,
1019
- icon: "",
1020
- right: "1"
1021
- },
1022
- {
1023
- href: `https://${i}/project/snapshots/${n.id}/`,
1024
- title: r.Common.Menu_snapshots,
1025
- icon: "",
1026
- right: "1"
1027
- },
1028
- {
1029
- href: `https://${i}/project/competitors/${n.id}/`,
1030
- title: r.Common.Menu_competitors,
1031
- icon: "",
1032
- right: "1"
1033
- },
1034
- {
1035
- href: `https://${i}/project/ai-tracker/${n.id}/`,
1036
- title: r.Common.Menu_aiTracker,
1037
- icon: "",
1038
- right: "13"
1039
- },
1040
- {
1041
- href: `https://${i}/project/analytics/${n.id}/`,
1042
- title: r.Common.Menu_analytics,
1043
- icon: "",
1044
- right: "5"
1045
- },
1046
- {
1047
- href: `https://${i}/project/broker/${n.id}/`,
1048
- title: r.Common.Menu_broker,
1049
- icon: "",
1050
- right: "6"
1051
- },
1052
- {
1053
- href: `https://${i}/project/audit/${n.id}/sitemap/`,
1054
- title: r.Audit.Sitemap_gen,
1055
- icon: "",
1056
- right: "8"
1057
- },
1058
- {
1059
- href: `https://${i}/project/audit/${n.id}/audit/`,
1060
- title: r.Common.Menu_audit,
1061
- icon: "",
1062
- right: "8"
1063
- },
1064
- {
1065
- href: `https://${i}/project/audit/${n.id}/indexing/`,
1066
- title: r.Audit.Indexing,
1067
- icon: "",
1068
- right: "8"
1069
- },
1070
- {
1071
- href: `https://${i}/project/audit/${n.id}/watcher/`,
1072
- title: r.Audit.Watcher,
1073
- icon: "",
1074
- right: "9"
1075
- },
1076
- {
1077
- href: `https://${i}/project/settings/${n.id}/`,
1078
- title: r.Common.Menu_settings,
1079
- icon: "",
1080
- right: "2"
1081
- }
1082
- ], o = C(() => n.right.includes("0") ? a.filter((e) => n.right[e.right] === "1") : a);
1083
- return (e, n) => {
1084
- let r = le("TopButton");
1085
- return N(), w(L(y), {
1086
- class: "top-projectSelectorSubmenu",
1087
- notch: !1,
1088
- pos: "2"
1089
- }, {
1090
- opener: B(() => [k(r, {
1091
- class: "top-projectSelectorSubmenu_opener",
1092
- "data-top-icon": "",
1093
- color: "theme"
1094
- })]),
1095
- contentList: B(() => [(N(!0), E(S, null, F(o.value, (e) => (N(), E("li", _t, [D("a", {
1096
- href: e.href,
1097
- title: e.title,
1098
- "data-top-icon": e.icon,
1099
- "data-right": e.right
1100
- }, null, 8, vt)]))), 256)), D("li", yt, [D("a", {
1101
- href: t.url,
1102
- "data-top-icon": "",
1103
- target: "_blank"
1104
- }, null, 8, bt)])]),
1105
- _: 1
1106
- });
1011
+ props: { id: {} },
1012
+ setup(n) {
1013
+ let r = n, i = e(), a = pt(), o = (e) => {
1014
+ let n = [
1015
+ {
1016
+ href: `https://${a}/project/keywords/${e.id}/`,
1017
+ title: i.Common.Menu_phrases,
1018
+ icon: "",
1019
+ right: "2"
1020
+ },
1021
+ {
1022
+ href: `https://${a}/project/dynamics/${e.id}/`,
1023
+ title: i.Common.Menu_dynamics,
1024
+ icon: "",
1025
+ right: "1"
1026
+ },
1027
+ {
1028
+ href: `https://${a}/project/snapshots/${e.id}/`,
1029
+ title: i.Common.Menu_snapshots,
1030
+ icon: "",
1031
+ right: "1"
1032
+ },
1033
+ {
1034
+ href: `https://${a}/project/competitors/${e.id}/`,
1035
+ title: i.Common.Menu_competitors,
1036
+ icon: "",
1037
+ right: "1"
1038
+ },
1039
+ {
1040
+ href: `https://${a}/project/ai-tracker/${e.id}/`,
1041
+ title: i.Common.Menu_aiTracker,
1042
+ icon: "",
1043
+ right: "13"
1044
+ },
1045
+ {
1046
+ href: `https://${a}/project/analytics/${e.id}/`,
1047
+ title: i.Common.Menu_analytics,
1048
+ icon: "",
1049
+ right: "5"
1050
+ },
1051
+ {
1052
+ href: `https://${a}/project/broker/${e.id}/`,
1053
+ title: i.Common.Menu_broker,
1054
+ icon: "",
1055
+ right: "6"
1056
+ },
1057
+ {
1058
+ href: `https://${a}/project/audit/${e.id}/sitemap/`,
1059
+ title: i.Audit.Sitemap_gen,
1060
+ icon: "",
1061
+ right: "8"
1062
+ },
1063
+ {
1064
+ href: `https://${a}/project/audit/${e.id}/audit/`,
1065
+ title: i.Common.Menu_audit,
1066
+ icon: "",
1067
+ right: "8"
1068
+ },
1069
+ {
1070
+ href: `https://${a}/project/audit/${e.id}/indexing/`,
1071
+ title: i.Audit.Indexing,
1072
+ icon: "",
1073
+ right: "8"
1074
+ },
1075
+ {
1076
+ href: `https://${a}/project/audit/${e.id}/watcher/`,
1077
+ title: i.Audit.Watcher,
1078
+ icon: "",
1079
+ right: "9"
1080
+ },
1081
+ {
1082
+ href: `https://${a}/project/settings/${e.id}/`,
1083
+ title: i.Common.Menu_settings,
1084
+ icon: "",
1085
+ right: "2"
1086
+ }
1087
+ ].filter((e) => !Object.entries(t.state.closedByMod).some(([t, n]) => n && e.href.includes(`/${t}/`)));
1088
+ return e.right.includes("0") ? n.filter((t) => e.right[t.right] === "1") : n;
1107
1089
  };
1090
+ return (e, t) => (P(), T(R(y), {
1091
+ id: r.id,
1092
+ class: "top-projectSelectorSubmenu",
1093
+ notch: !1,
1094
+ pos: "2"
1095
+ }, {
1096
+ contentList: V(({ data: t }) => [t ? (P(), D(C, { key: 0 }, [(P(!0), D(C, null, I(o(t.projectItem), (t) => (P(), T(R(v), {
1097
+ href: t.href,
1098
+ title: t.title,
1099
+ "data-top-icon": t.icon,
1100
+ "data-right": t.right
1101
+ }, {
1102
+ default: V(() => [k(L(e.$core.state.isMobile ? t.title : ""), 1)]),
1103
+ _: 2
1104
+ }, 1032, [
1105
+ "href",
1106
+ "title",
1107
+ "data-top-icon",
1108
+ "data-right"
1109
+ ]))), 256)), A(R(v), {
1110
+ href: t.projectItem.externalLink,
1111
+ title: t.projectItem.externalLink,
1112
+ class: "top-ellipsis",
1113
+ "data-top-icon": "",
1114
+ target: "_blank"
1115
+ }, {
1116
+ default: V(() => [O("span", vt, L(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
1117
+ _: 2
1118
+ }, 1032, ["href", "title"])], 64)) : E("", !0)]),
1119
+ _: 1
1120
+ }, 8, ["id"]));
1108
1121
  }
1109
- }), St = 1440 * 60 * 1e3, q = fe(), Ct = P(0), J = P(null), wt = (e) => {
1110
- localStorage.setItem("ui_project_selector_total:" + t.state.user.id, JSON.stringify({
1122
+ }), bt = 1440 * 60 * 1e3, J = F(null), Y = fe(), xt = (e) => {
1123
+ localStorage.setItem("ui_project_selector_total:" + t.state.userId, JSON.stringify({
1111
1124
  projectsTotal: e,
1112
- expiresAt: Date.now() + St
1125
+ expiresAt: Date.now() + bt
1113
1126
  }));
1114
- }, Tt = () => {
1115
- let e = localStorage.getItem("ui_project_selector_total:" + t.state.user.id);
1127
+ }, St = () => {
1128
+ let e = localStorage.getItem("ui_project_selector_total:" + t.state.userId);
1116
1129
  if (!e) return;
1117
1130
  let { projectsTotal: n, expiresAt: r } = JSON.parse(e);
1118
1131
  if (Date.now() > r) {
1119
- localStorage.removeItem("ui_project_selector_total:" + t.state.user.id);
1132
+ localStorage.removeItem("ui_project_selector_total:" + t.state.userId);
1120
1133
  return;
1121
1134
  }
1122
1135
  return n;
1123
- }, Et = (e = !0) => {
1124
- q.value = void 0, J.value = null, localStorage.removeItem("ui_project_selector_total:" + t.state.user.id), e && Ct.value++;
1125
- }, Dt = { class: "top-projectSelector_item" }, Ot = { class: "top-projectSelector_itemText" }, kt = { class: "top-comment" }, At = {
1136
+ }, Ct = () => {
1137
+ J.value = null, Y.value = void 0, localStorage.removeItem("ui_project_selector_total:" + t.state.userId), b("/get/projects_2/projects/");
1138
+ }, wt = { class: "top-projectSelector_itemText" }, Tt = { class: "top-comment" }, Et = {
1126
1139
  key: 0,
1127
1140
  class: "top-comment"
1128
- }, jt = ["href", "onClick"], Mt = 1e3, Nt = /* @__PURE__ */ A({
1141
+ }, Dt = ["href"], Ot = 1e3, kt = /* @__PURE__ */ j({
1129
1142
  __name: "projectSelector",
1130
- props: /*@__PURE__*/ j({
1143
+ props: /*@__PURE__*/ M({
1131
1144
  modelValue: {},
1132
1145
  client: {},
1133
- addLinksToProjects: {
1134
- type: Boolean,
1135
- default: !0
1136
- },
1146
+ menuMode: { type: Boolean },
1137
1147
  excludeProjectId: {},
1148
+ openerShortcut: {},
1138
1149
  modificator: {},
1139
1150
  placeholder: {},
1140
- buttonProps: {},
1141
- openerShortcut: {}
1151
+ buttonProps: {}
1142
1152
  }, {
1143
- modelValue: { default: {
1153
+ modelValue: { default: () => ({
1144
1154
  id: null,
1145
1155
  name: ""
1146
- } },
1156
+ }) },
1147
1157
  modelModifiers: {}
1148
1158
  }),
1149
1159
  emits: ["update:modelValue"],
1150
1160
  setup(n) {
1151
- let r = e(), i = n, a = R(n, "modelValue"), o = ht(i.client), s = ht(i.client);
1152
- s.changeParams({ limit: Mt });
1153
- let c = gt(i.client), l = P(Tt()), f = P(null), p = C(() => i.placeholder ?? r.Projects.Select_project), m = C(() => !q.value || !i.excludeProjectId ? q.value : q.value.filter((e) => e.id !== i.excludeProjectId)), h = C(() => {
1154
- if (!(!l.value && l.value !== 0)) return l.value < Mt ? "static" : "api";
1155
- });
1156
- z(Ct, () => {
1157
- ee();
1158
- }), z(a, () => {
1159
- !a.value.id || !i.addLinksToProjects || ut(dt(a.value.id));
1160
- });
1161
- let g = async () => {
1162
- J.value ||= s.call();
1161
+ let r = e(), i = n, a = z(n, "modelValue"), o = gt(i.client), s = _t(i.client), c = F(St()), l = F(null), f = me(), p = w(() => i.placeholder ?? r.Projects.Select_project), m = w(() => !Y.value || !i.excludeProjectId ? Y.value : Y.value.filter((e) => e.id !== i.excludeProjectId)), h = w(() => {
1162
+ if (!(!c.value && c.value !== 0)) return c.value < Ot ? "static" : "api";
1163
+ }), _ = async () => {
1164
+ J.value ||= o.call();
1163
1165
  let e = await J.value;
1164
- if (e.errors) {
1165
- J.value = null;
1166
- return;
1167
- }
1168
1166
  return J.value = null, e;
1169
- }, _ = async () => {
1170
- if (l.value) return;
1171
- let e = await g();
1172
- e && (l.value = e.total, h.value === "static" && !q.value && (q.value = e.result), l.value && wt(l.value));
1173
1167
  }, v = async (e) => {
1174
- let n = await c.changeParams({
1168
+ let n = await s.changeParams({
1175
1169
  url: e.name,
1176
1170
  name: e.name
1177
1171
  }).call();
1178
1172
  if (!n.errors) {
1179
- if (q.value && h.value === "static") {
1180
- let r = {
1181
- id: Number(n.result),
1182
- user_id: t.state.user.id,
1173
+ if (Y.value && h.value === "static") {
1174
+ let r = ct({
1175
+ id: n.result,
1176
+ user_id: t.state.userId,
1183
1177
  name: e.name,
1184
1178
  url: e.name,
1185
1179
  on: 0,
1186
- right: "11111111111111111111",
1187
- listItemProps: { attrs: { title: e.name } }
1188
- }, i = q.value.findIndex((e) => e.on === 0);
1189
- q.value = [
1190
- ...q.value.slice(0, i),
1180
+ right: "11111111111111111111"
1181
+ }), i = Y.value.findIndex((e) => e.on === 0);
1182
+ Y.value = [
1183
+ ...Y.value.slice(0, i),
1191
1184
  r,
1192
- ...q.value.slice(i)
1193
- ], l.value && (l.value += 1, wt(l.value));
1185
+ ...Y.value.slice(i)
1186
+ ], c.value && (c.value += 1, xt(c.value));
1194
1187
  }
1195
- h.value === "api" && Et();
1188
+ h.value === "api" && l.value?.resetCache(!0);
1196
1189
  }
1197
- }, ee = () => {
1198
- h.value === "api" && f.value?.resetCache(!0);
1190
+ }, ee = async () => {
1191
+ if (Y.value || h.value === "api") return;
1192
+ let e = await _();
1193
+ e.errors || (Y.value = e.result);
1199
1194
  }, y = async () => {
1200
- if (q.value || h.value === "api") return;
1201
- let e = await g();
1202
- e && (q.value = e.result);
1195
+ if (c.value) return;
1196
+ let e = await _();
1197
+ e.errors || (c.value = e.total ?? void 0, h.value === "static" && !Y.value && (Y.value = e.result), c.value && xt(c.value));
1203
1198
  };
1204
1199
  return oe(async () => {
1205
- await _();
1200
+ await y();
1206
1201
  }), (e, t) => {
1207
1202
  let r = le("TopButton");
1208
- return N(), w(x, {
1203
+ return P(), D(C, null, [A(S, {
1209
1204
  ref_key: "refSelector",
1210
- ref: f,
1205
+ ref: l,
1211
1206
  class: "top-projectSelector",
1212
1207
  modelValue: a.value,
1213
- "onUpdate:modelValue": t[1] ||= (e) => a.value = e,
1208
+ "onUpdate:modelValue": t[1] ||= (e) => n.menuMode ? R(dt)(e.id) : a.value = e,
1214
1209
  items: m.value,
1210
+ itemsIsLoading: h.value === "static" && R(Y) === void 0,
1215
1211
  title: e.$i18n.Projects.Search_projects,
1216
1212
  modificator: n.modificator,
1217
1213
  searchFields: [
@@ -1221,48 +1217,51 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1221
1217
  ],
1222
1218
  placeholder: p.value,
1223
1219
  hasCloserBtn: "",
1224
- api: h.value === "api" ? L(o) : void 0,
1225
- apiSetSearchParams: h.value === "api" ? (...e) => L(mt)(...e) : void 0,
1220
+ api: h.value === "api" ? R(o) : void 0,
1221
+ apiSetSearchParams: h.value === "api" ? (...e) => R(ht)(...e) : void 0,
1226
1222
  useCache: "",
1227
1223
  appendSearchToResult: "",
1228
1224
  appendSearchAllowDuplicate: "",
1229
- appendSearchToResultCond: L(u),
1225
+ appendSearchToResultCond: R(u),
1230
1226
  appendWithoutSelect: "",
1231
1227
  buttonProps: n.buttonProps,
1232
1228
  openerShortcut: n.openerShortcut,
1233
1229
  onAppendItem: v,
1234
- onOpen: y
1230
+ onOpen: ee
1235
1231
  }, {
1236
- item: B(({ item: i }) => [D("div", Dt, [D("div", Ot, [i.id ? (N(), E(S, { key: 0 }, [O(I(L(d)(i.name, 20)) + " ", 1), D("span", kt, " id " + I(i.id), 1)], 64)) : (N(), E(S, { key: 1 }, [i.listItemProps?.type ? T("", !0) : (N(), E("div", At, I(e.$i18n.Projects.Add_project) + ": ", 1)), O(" " + I(i.name), 1)], 64))]), i.id ? (N(), E(S, { key: 0 }, [
1237
- n.addLinksToProjects ? (N(), E("a", {
1232
+ item: V(({ item: i }) => [O("div", wt, [i.id ? (P(), D(C, { key: 0 }, [k(L(R(d)(i.name, 20)) + " ", 1), O("span", Tt, " id " + L(i.id), 1)], 64)) : (P(), D(C, { key: 1 }, [i.listItemProps?.type ? E("", !0) : (P(), D("div", Et, L(e.$i18n.Projects.Add_project) + ": ", 1)), k(" " + L(i.name), 1)], 64))]), i.id ? (P(), D(C, { key: 0 }, [
1233
+ n.menuMode ? (P(), D("a", {
1238
1234
  key: 0,
1239
1235
  class: "top-projectSelector_itemLink",
1240
- href: L(dt)(i.id),
1241
- onClick: V((e) => L(ut)(L(dt)(i.id), e), ["prevent", "stop"])
1242
- }, null, 8, jt)) : T("", !0),
1243
- e.$core.state.isMobile ? T("", !0) : (N(), w(r, {
1236
+ href: R(ft)(i.id)
1237
+ }, null, 8, Dt)) : E("", !0),
1238
+ e.$core.state.isMobile ? E("", !0) : (P(), T(r, {
1244
1239
  key: 1,
1245
- class: "top-projectSelector_itemExtLink",
1246
- href: L(pt)(i.url),
1240
+ href: i.externalLink,
1247
1241
  "data-top-icon": "",
1248
1242
  color: "theme",
1249
1243
  target: "_blank",
1250
- onClick: t[0] ||= V(() => {}, ["stop"])
1244
+ onClick: t[0] ||= H(() => {}, ["stop"])
1251
1245
  }, null, 8, ["href"])),
1252
- k(xt, {
1253
- id: i.id,
1254
- right: i.right ?? void 0,
1255
- url: L(pt)(i.url)
1256
- }, null, 8, [
1257
- "id",
1258
- "right",
1259
- "url"
1260
- ])
1261
- ], 64)) : T("", !0)])]),
1246
+ A(g, {
1247
+ id: R(f),
1248
+ pos: "2",
1249
+ notch: !1,
1250
+ data: { projectItem: i }
1251
+ }, {
1252
+ default: V(() => [A(r, {
1253
+ class: "top-popup_listMore",
1254
+ "data-top-icon": "",
1255
+ color: "theme"
1256
+ })]),
1257
+ _: 1
1258
+ }, 8, ["id", "data"])
1259
+ ], 64)) : E("", !0)]),
1262
1260
  _: 1
1263
1261
  }, 8, [
1264
1262
  "modelValue",
1265
1263
  "items",
1264
+ "itemsIsLoading",
1266
1265
  "title",
1267
1266
  "modificator",
1268
1267
  "placeholder",
@@ -1271,43 +1270,43 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1271
1270
  "appendSearchToResultCond",
1272
1271
  "buttonProps",
1273
1272
  "openerShortcut"
1274
- ]);
1273
+ ]), A(yt, { id: R(f) }, null, 8, ["id"])], 64);
1275
1274
  };
1276
1275
  }
1277
- }), Pt = (e) => "-" + e, Y = (e) => e[0] === "-" ? e.substring(1) : e, X = (e, t) => {
1278
- e = Y(e);
1276
+ }), At = (e) => "-" + e, X = (e) => e[0] === "-" ? e.substring(1) : e, Z = (e, t) => {
1277
+ e = X(e);
1279
1278
  let n = t.find((t) => t.id === e);
1280
1279
  if (n) return n;
1281
- }, Ft = (e, t, n) => {
1280
+ }, jt = (e, t, n) => {
1282
1281
  t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
1283
1282
  let r = c.genElPopupOpener("div", t);
1284
1283
  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) => {
1285
1284
  t.preventDefault(), t.stopPropagation(), r.onclick = null;
1286
- let i = P(e.modelValue);
1287
- s(r, "topTagSelectorTarget", {
1285
+ let i = F(e.modelValue), a = {
1288
1286
  model: i,
1289
1287
  mode: e.mode,
1290
1288
  targetId: e.targetId,
1291
1289
  filters: e.filters,
1292
1290
  payload: e.payload
1293
- }), delete r.dataset.topPopupDisabled, re(e.modelValue) || z(i, () => {
1294
- e.modelValue = i.value, Z(r, e, n);
1291
+ };
1292
+ s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, re(e.modelValue) || B(i, () => {
1293
+ e.modelValue = i.value, Q(r, e, n);
1295
1294
  }), r.click();
1296
- }, re(e.modelValue) ? z(e.modelValue, () => Z(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1295
+ }, re(e.modelValue) ? B(e.modelValue, () => Q(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1297
1296
  e.modelValue = t;
1298
1297
  let i = s(r, "topTagSelectorTarget");
1299
- i && (i.model.value = t), Z(r, e, n);
1300
- }), Z(r, e, n), r;
1301
- }, It = (e, t) => {
1298
+ i && (i.model.value = t), Q(r, e, n);
1299
+ }), Q(r, e, n), r;
1300
+ }, Mt = (e, t) => {
1302
1301
  s(e, "topTagSelectorRender")?.(t);
1303
- }, Z = (t, n, r) => {
1304
- let i = L(n.modelValue);
1302
+ }, Q = (t, n, r) => {
1303
+ let i = R(n.modelValue);
1305
1304
  if (t.classList.toggle("top-tagSelector-selectedOne", !i.length || i.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", i.length > 5), n.mode === "setter" && n.filters) {
1306
1305
  t.innerHTML = `<div>${r}</div>`;
1307
1306
  return;
1308
1307
  }
1309
1308
  if (t.innerHTML = "", !i.length && n.mode === "filter") {
1310
- let n = Lt({
1309
+ let n = Nt({
1311
1310
  id: "all",
1312
1311
  colorId: "",
1313
1312
  name: e().Common?.All_tags ?? "",
@@ -1316,18 +1315,18 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1316
1315
  t.append(n);
1317
1316
  }
1318
1317
  i.forEach((e) => {
1319
- let r = Lt({
1320
- id: Y(e),
1321
- colorId: X(e, n.tags)?.color_id ?? "",
1322
- name: X(e, n.tags)?.name ?? "",
1323
- state: Y(e) === e ? "selected" : "excluded"
1318
+ let r = Nt({
1319
+ id: X(e),
1320
+ colorId: Z(e, n.tags)?.color_id ?? "",
1321
+ name: Z(e, n.tags)?.name ?? "",
1322
+ state: X(e) === e ? "selected" : "excluded"
1324
1323
  });
1325
1324
  t.append(r);
1326
1325
  });
1327
- }, Lt = (e) => {
1326
+ }, Nt = (e) => {
1328
1327
  let t = document.createElement("div");
1329
1328
  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;
1330
- }, Rt = [
1329
+ }, Pt = [
1331
1330
  {
1332
1331
  id: "1",
1333
1332
  name: "Without Tag",
@@ -1378,11 +1377,11 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1378
1377
  name: "Turquoise",
1379
1378
  color_id: "10"
1380
1379
  }
1381
- ], zt = [
1380
+ ], Ft = [
1382
1381
  "data-tag_id",
1383
1382
  "data-tag_color_id",
1384
1383
  "title"
1385
- ], Q = /* @__PURE__ */ A({
1384
+ ], It = /* @__PURE__ */ j({
1386
1385
  __name: "tagIcon",
1387
1386
  props: {
1388
1387
  id: {},
@@ -1391,8 +1390,8 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1391
1390
  state: {}
1392
1391
  },
1393
1392
  setup(e) {
1394
- return (t, n) => (N(), E("div", {
1395
- class: M({
1393
+ return (t, n) => (P(), D("div", {
1394
+ class: N({
1396
1395
  "top-tagSelector_tagIcon": !0,
1397
1396
  "top-tagSelector-active": !!e.state,
1398
1397
  "top-tagSelector-excluded": e.state === "excluded"
@@ -1400,11 +1399,11 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1400
1399
  "data-tag_id": e.id,
1401
1400
  "data-tag_color_id": e.colorId,
1402
1401
  title: e.name
1403
- }, null, 10, zt));
1402
+ }, null, 10, Ft));
1404
1403
  }
1405
- }), Bt = ["contenteditable", "onKeydown"], Vt = /* @__PURE__ */ A({
1404
+ }), Lt = ["contenteditable", "onKeydown"], Rt = /* @__PURE__ */ j({
1406
1405
  __name: "tagPopupListItem",
1407
- props: /*@__PURE__*/ j({
1406
+ props: /*@__PURE__*/ M({
1408
1407
  editable: { type: Boolean },
1409
1408
  disabled: { type: Boolean },
1410
1409
  canExclude: { type: Boolean },
@@ -1416,17 +1415,17 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1416
1415
  name: { required: !0 },
1417
1416
  nameModifiers: {}
1418
1417
  }),
1419
- emits: /*@__PURE__*/ j([
1418
+ emits: /*@__PURE__*/ M([
1420
1419
  "update:name",
1421
1420
  "unselect",
1422
1421
  "exclude",
1423
1422
  "select"
1424
1423
  ], ["update:name"]),
1425
1424
  setup(e, { emit: t }) {
1426
- let n = e, r = t, i = R(e, "name"), a = P(null), o = C(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
1425
+ let n = e, r = t, i = z(e, "name"), a = F(null), o = w(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
1427
1426
  contenteditable: s.value,
1428
1427
  onpaste: (e) => e.preventDefault()
1429
- }), s = P(!1), c = async () => {
1428
+ }), s = F(!1), c = async () => {
1430
1429
  s.value = !0, await ae(), a.value?.focus();
1431
1430
  }, l = () => {
1432
1431
  let e = a.value?.innerText;
@@ -1439,8 +1438,8 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1439
1438
  let t = "selected";
1440
1439
  n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
1441
1440
  };
1442
- return (t, n) => (N(), w(v, {
1443
- class: M({
1441
+ return (t, n) => (P(), T(v, {
1442
+ class: N({
1444
1443
  "top-tagSelector_tagListItem": !0,
1445
1444
  "top-tagSelector_tagListItem-inEdit": s.value,
1446
1445
  "top-tagSelector_tagListItem-disabled": e.disabled,
@@ -1448,10 +1447,10 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1448
1447
  "top-tagSelector-active": !!e.state,
1449
1448
  "top-tagSelector-excluded": e.state === "excluded"
1450
1449
  }),
1451
- onClick: V(d, ["stop"])
1450
+ onClick: H(d, ["stop"])
1452
1451
  }, {
1453
- default: B(() => [
1454
- k(Q, {
1452
+ default: V(() => [
1453
+ A(It, {
1455
1454
  id: e.id,
1456
1455
  name: i.value,
1457
1456
  colorId: e.colorId,
@@ -1462,31 +1461,31 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1462
1461
  "colorId",
1463
1462
  "state"
1464
1463
  ]),
1465
- D("span", ie({
1464
+ O("span", ie({
1466
1465
  ref_key: "elName",
1467
1466
  ref: a,
1468
1467
  class: "top-tagSelector_tagListItemName",
1469
1468
  contenteditable: s.value ? "plaintext-only" : !1
1470
- }, o.value, { onKeydown: [he(V(l, ["stop"]), ["enter"]), he(V(u, ["stop"]), ["esc"])] }), I(i.value), 17, Bt),
1471
- e.editable ? (N(), E(S, { key: 0 }, [s.value ? (N(), E("span", {
1469
+ }, o.value, { onKeydown: [ge(H(l, ["stop"]), ["enter"]), ge(H(u, ["stop"]), ["esc"])] }), L(i.value), 17, Lt),
1470
+ e.editable ? (P(), D(C, { key: 0 }, [s.value ? (P(), D("span", {
1472
1471
  key: 1,
1473
1472
  "data-top-icon": "",
1474
1473
  class: "top-tagSelector_edit",
1475
- onClick: V(l, ["stop"])
1476
- })) : (N(), E("span", {
1474
+ onClick: H(l, ["stop"])
1475
+ })) : (P(), D("span", {
1477
1476
  key: 0,
1478
1477
  "data-top-icon": "",
1479
1478
  class: "top-tagSelector_edit",
1480
1479
  onClick: c
1481
- }))], 64)) : T("", !0)
1480
+ }))], 64)) : E("", !0)
1482
1481
  ]),
1483
1482
  _: 1
1484
1483
  }, 8, ["class"]));
1485
1484
  }
1486
- }), Ht = { key: 1 }, Ut = /* @__PURE__ */ A({
1485
+ }), zt = { key: 1 }, Bt = /* @__PURE__ */ j({
1487
1486
  inheritAttrs: !1,
1488
1487
  __name: "popupOpener",
1489
- props: /*@__PURE__*/ j({
1488
+ props: /*@__PURE__*/ M({
1490
1489
  modelValue: {},
1491
1490
  id: {},
1492
1491
  tags: {},
@@ -1502,7 +1501,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1502
1501
  }),
1503
1502
  emits: ["update:modelValue"],
1504
1503
  setup(e) {
1505
- let t = e, n = R(e, "modelValue"), i = t.useTopButton ? r : "div", a = t.useTopButton ? "html" : "default", o = {
1504
+ let t = e, n = z(e, "modelValue"), i = t.useTopButton ? r : "div", a = t.useTopButton ? "html" : "default", o = {
1506
1505
  model: n,
1507
1506
  mode: t.mode,
1508
1507
  targetId: t.targetId,
@@ -1511,8 +1510,8 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1511
1510
  };
1512
1511
  return (r, s) => {
1513
1512
  let c = ue("top-data");
1514
- return N(), w(g, { id: e.id }, {
1515
- default: B(() => [me((N(), w(de(L(i)), ie({
1513
+ return P(), T(g, { id: e.id }, {
1514
+ default: V(() => [he((P(), T(de(R(i)), ie({
1516
1515
  class: {
1517
1516
  "top-tagSelector": !0,
1518
1517
  "top-tagSelector-useTopButton": t.useTopButton,
@@ -1527,17 +1526,17 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1527
1526
  color: "theme",
1528
1527
  styling: e.styling
1529
1528
  }, r.$attrs), {
1530
- [L(a)]: B(() => [!n.value.length && e.mode === "filter" ? (N(), w(Q, {
1529
+ [R(a)]: V(() => [!n.value.length && e.mode === "filter" ? (P(), T(It, {
1531
1530
  key: 0,
1532
1531
  id: "all",
1533
1532
  colorId: "",
1534
1533
  name: r.$i18n.Common.All_tags ?? "",
1535
1534
  state: ""
1536
- }, null, 8, ["name"])) : T("", !0), e.mode === "setter" && e.filters ? (N(), E("div", Ht, [ce(r.$slots, "default")])) : (N(!0), E(S, { key: 2 }, F(n.value, (t) => (N(), w(Q, {
1537
- id: L(Y)(t),
1538
- colorId: L(X)(t, e.tags)?.color_id ?? "",
1539
- name: L(X)(t, e.tags)?.name ?? "",
1540
- state: L(Y)(t) === t ? "selected" : "excluded"
1535
+ }, null, 8, ["name"])) : E("", !0), e.mode === "setter" && e.filters ? (P(), D("div", zt, [ce(r.$slots, "default")])) : (P(!0), D(C, { key: 2 }, I(n.value, (t) => (P(), T(It, {
1536
+ id: R(X)(t),
1537
+ colorId: R(Z)(t, e.tags)?.color_id ?? "",
1538
+ name: R(Z)(t, e.tags)?.name ?? "",
1539
+ state: R(X)(t) === t ? "selected" : "excluded"
1541
1540
  }, null, 8, [
1542
1541
  "id",
1543
1542
  "colorId",
@@ -1554,9 +1553,9 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1554
1553
  }, 8, ["id"]);
1555
1554
  };
1556
1555
  }
1557
- }), Wt = /* @__PURE__ */ A({
1556
+ }), Vt = /* @__PURE__ */ j({
1558
1557
  __name: "tagSelector",
1559
- props: /*@__PURE__*/ j({
1558
+ props: /*@__PURE__*/ M({
1560
1559
  modelValue: {},
1561
1560
  tags: {},
1562
1561
  tagsEditable: { type: Boolean },
@@ -1577,20 +1576,20 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1577
1576
  }, {
1578
1577
  modelValue: { required: !0 },
1579
1578
  modelModifiers: {},
1580
- tags: { default: se(Rt) },
1579
+ tags: { default: se(Pt) },
1581
1580
  tagsModifiers: {}
1582
1581
  }),
1583
- emits: /*@__PURE__*/ j([
1582
+ emits: /*@__PURE__*/ M([
1584
1583
  "selector",
1585
1584
  "setter",
1586
1585
  "tagsChanged"
1587
1586
  ], ["update:modelValue", "update:tags"]),
1588
1587
  setup(a, { emit: o }) {
1589
- let c = e(), l = a, u = R(a, "modelValue"), d = R(a, "tags"), f = o, p = n((e, t) => {
1588
+ let c = e(), l = a, u = z(a, "modelValue"), d = z(a, "tags"), f = o, p = n((e, t) => {
1590
1589
  f(e, t);
1591
1590
  }, l.emitDelay);
1592
1591
  l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
1593
- let m = l.id ?? "top-popup-id-" + Math.random(), h = P("add"), g = () => {
1592
+ let m = l.id ?? "top-popup-id-" + Math.random(), h = F("add"), g = () => {
1594
1593
  let e = " " + c.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
1595
1594
  return t.set("add", {
1596
1595
  value: "add",
@@ -1609,28 +1608,28 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1609
1608
  filters: void 0,
1610
1609
  payload: void 0
1611
1610
  });
1612
- z(u, () => {
1611
+ B(u, () => {
1613
1612
  p("selector", u.value);
1614
1613
  });
1615
- let ee = C(() => {
1614
+ let ee = w(() => {
1616
1615
  if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
1617
1616
  }), b = (e) => {
1618
1617
  if (e !== "all") {
1619
1618
  if (_.value.model.value.includes(e)) return "selected";
1620
- if (_.value.model.value.includes(Pt(e))) return "excluded";
1619
+ if (_.value.model.value.includes(At(e))) return "excluded";
1621
1620
  }
1622
1621
  return e === "all" && !_.value.model.value.length ? "selected" : "";
1623
1622
  }, x = (e, t) => {
1624
- let n = Pt(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
1623
+ let n = At(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
1625
1624
  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", {
1626
1625
  tagsIds: r,
1627
1626
  targetId: _.value.targetId,
1628
1627
  payload: _.value.payload
1629
1628
  });
1630
- }, te = C(() => {
1629
+ }, S = w(() => {
1631
1630
  let e = "top-tagSelector_popup";
1632
1631
  return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
1633
- }), D = () => {
1632
+ }), te = () => {
1634
1633
  let e = prompt("", "New tag");
1635
1634
  if (!e || e === "New tag") return;
1636
1635
  let t = d.value.length + 1;
@@ -1639,7 +1638,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1639
1638
  name: e,
1640
1639
  color_id: String((t - 1) % 10 + 1)
1641
1640
  }), f("tagsChanged", d.value);
1642
- }, A = (e) => {
1641
+ }, O = (e) => {
1643
1642
  if (_.value = s(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1644
1643
  if (_.value.filters && (h.value = "add", _.value.model.value = []), !t.$?.ui.sortable) {
1645
1644
  console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
@@ -1659,13 +1658,13 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1659
1658
  }), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
1660
1659
  }
1661
1660
  });
1662
- }, re = (e) => {
1661
+ }, j = (e) => {
1663
1662
  t.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
1664
1663
  };
1665
- return (e, t) => (N(), E(S, null, [k(Ut, {
1664
+ return (e, t) => (P(), D(C, null, [A(Bt, {
1666
1665
  modelValue: u.value,
1667
1666
  "onUpdate:modelValue": t[0] ||= (e) => u.value = e,
1668
- id: L(m),
1667
+ id: R(m),
1669
1668
  tags: d.value,
1670
1669
  styling: a.styling,
1671
1670
  mode: "filter",
@@ -1676,23 +1675,23 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1676
1675
  "tags",
1677
1676
  "styling",
1678
1677
  "useTopButton"
1679
- ]), k(y, {
1680
- id: L(m),
1681
- class: M(te.value),
1682
- onOpen: t[4] ||= (e) => A(e),
1683
- onClose: t[5] ||= (e) => re(e),
1678
+ ]), A(y, {
1679
+ id: R(m),
1680
+ class: N(S.value),
1681
+ onOpen: t[4] ||= (e) => O(e),
1682
+ onClose: t[5] ||= (e) => j(e),
1684
1683
  "transition-duration": 50
1685
1684
  }, ne({
1686
- contentList: B(() => [
1687
- _.value.mode === "filter" && !a.singleMode ? (N(), w(Vt, {
1685
+ contentList: V(() => [
1686
+ _.value.mode === "filter" && !a.singleMode ? (P(), T(Rt, {
1688
1687
  key: 0,
1689
1688
  id: "all",
1690
1689
  colorId: "",
1691
1690
  name: e.$i18n.Common.All_tags ?? "",
1692
1691
  state: _.value.model.value.length ? "" : "selected",
1693
1692
  onSelect: t[3] ||= (e) => _.value.model.value = []
1694
- }, null, 8, ["name", "state"])) : T("", !0),
1695
- (N(!0), E(S, null, F(d.value, (e) => (N(), w(Vt, {
1693
+ }, null, 8, ["name", "state"])) : E("", !0),
1694
+ (P(!0), D(C, null, I(d.value, (e) => (P(), T(Rt, {
1696
1695
  key: e.id,
1697
1696
  id: e.id,
1698
1697
  colorId: e.color_id,
@@ -1705,7 +1704,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1705
1704
  onSelect: (t) => x(e.id, "select"),
1706
1705
  onExclude: (t) => x(e.id, "exclude"),
1707
1706
  "onUpdate:name": (t) => {
1708
- e.name = t, L(p)("tagsChanged", d.value);
1707
+ e.name = t, R(p)("tagsChanged", d.value);
1709
1708
  }
1710
1709
  }, null, 8, [
1711
1710
  "id",
@@ -1720,19 +1719,19 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1720
1719
  "onExclude",
1721
1720
  "onUpdate:name"
1722
1721
  ]))), 128)),
1723
- a.tagsEditable && d.value.length < a.tagsMax && d.value.length < 20 ? (N(), w(v, {
1722
+ a.tagsEditable && d.value.length < a.tagsMax && d.value.length < 20 ? (P(), T(v, {
1724
1723
  key: 1,
1725
1724
  "data-top-icon": "",
1726
- onClick: V(D, ["stop"])
1725
+ onClick: H(te, ["stop"])
1727
1726
  }, {
1728
- default: B(() => [O(I(e.$i18n.Common.Add), 1)]),
1727
+ default: V(() => [k(L(e.$i18n.Common.Add), 1)]),
1729
1728
  _: 1
1730
- })) : T("", !0)
1729
+ })) : E("", !0)
1731
1730
  ]),
1732
1731
  _: 2
1733
1732
  }, [_.value.mode === "setter" && _.value.filters ? {
1734
1733
  name: "header",
1735
- fn: B(() => [k(i, {
1734
+ fn: V(() => [A(i, {
1736
1735
  modelValue: h.value,
1737
1736
  "onUpdate:modelValue": t[1] ||= (e) => h.value = e,
1738
1737
  options: g()
@@ -1740,16 +1739,16 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1740
1739
  key: "0"
1741
1740
  } : void 0, _.value.mode === "setter" && _.value.filters ? {
1742
1741
  name: "footer",
1743
- fn: B(() => [k(r, { color: "theme" }, {
1744
- default: B(() => [O(I(e.$i18n.Common.Cancel), 1)]),
1742
+ fn: V(() => [A(r, { color: "theme" }, {
1743
+ default: V(() => [k(L(e.$i18n.Common.Cancel), 1)]),
1745
1744
  _: 1
1746
- }), k(r, { onClick: t[2] ||= (e) => L(p)("setter", {
1745
+ }), A(r, { onClick: t[2] ||= (e) => R(p)("setter", {
1747
1746
  tagsIds: _.value.model.value,
1748
1747
  filters: _.value.filters,
1749
1748
  filtersAction: h.value,
1750
1749
  payload: _.value.payload
1751
1750
  }) }, {
1752
- default: B(() => [O(I(h.value === "add" ? e.$i18n.Common.Add : "") + " " + I(h.value === "replace" ? e.$i18n.Common.Replace : "") + " " + I(h.value === "delete" ? e.$i18n.Common.Delete : ""), 1)]),
1751
+ default: V(() => [k(L(h.value === "add" ? e.$i18n.Common.Add : "") + " " + L(h.value === "replace" ? e.$i18n.Common.Replace : "") + " " + L(h.value === "delete" ? e.$i18n.Common.Delete : ""), 1)]),
1753
1752
  _: 1
1754
1753
  })]),
1755
1754
  key: "1"
@@ -1757,6 +1756,6 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1757
1756
  }
1758
1757
  });
1759
1758
  //#endregion
1760
- export { ve as TopCompetitorSelector, rt as TopGroupSelector, Nt as TopProjectSelector, Le as TopRegionSelector, Wt as TopTagSelector, Ut as TopTagSelectorPopupOpener, Q as TopTagSelectorTagIcon, Et as clearCache, Me as dialogRegionSelector, je as findRegion, Ft as genElTopTagSelectorPopupOpener, Oe as genSearcherByKey, It as renderElTopTagSelectorPopupOpener, ye as useItemsFromCompetitors };
1759
+ export { ye as TopCompetitorSelector, it as TopGroupSelector, kt as TopProjectSelector, Re as TopRegionSelector, Vt as TopTagSelector, Bt as TopTagSelectorPopupOpener, It as TopTagSelectorTagIcon, Ne as dialogRegionSelector, Me as findRegion, jt as genElTopTagSelectorPopupOpener, ke as genSearcherByKey, Mt as renderElTopTagSelectorPopupOpener, Ct as topProjectSelectorClearCache, be as useItemsFromCompetitors };
1761
1760
 
1762
1761
  //# sourceMappingURL=project.js.map