@topvisor/ui 1.4.0-TopGroupSelector.9 → 1.4.1-projectSelector.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 (228) hide show
  1. package/.chunks/core-BgoBbm_5.es.js +242 -0
  2. package/.chunks/core-BgoBbm_5.es.js.map +1 -0
  3. package/.chunks/core-D1KnwO7l.amd.js +2 -0
  4. package/.chunks/core-D1KnwO7l.amd.js.map +1 -0
  5. package/.chunks/{datepicker-D1Hw3a3o.es.js → datepicker-BPTUHd97.es.js} +2 -2
  6. package/.chunks/datepicker-BPTUHd97.es.js.map +1 -0
  7. package/.chunks/{datepicker-3coUsFW2.amd.js → datepicker-O_SK-Dz4.amd.js} +2 -2
  8. package/.chunks/datepicker-O_SK-Dz4.amd.js.map +1 -0
  9. package/.chunks/{dialog_regionSelectorRegions-CZ8IX7la.amd.js → dialog_regionSelectorRegions-Ba-Eypgv.amd.js} +2 -2
  10. package/.chunks/dialog_regionSelectorRegions-Ba-Eypgv.amd.js.map +1 -0
  11. package/.chunks/{dialog_regionSelectorRegions-1UVhgK2f.es.js → dialog_regionSelectorRegions-DA38RsiW.es.js} +4 -4
  12. package/.chunks/dialog_regionSelectorRegions-DA38RsiW.es.js.map +1 -0
  13. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js → dialogs.vue_vue_type_script_setup_true_lang-CWprVs8d.amd.js} +2 -2
  14. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CWprVs8d.amd.js.map +1 -0
  15. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js → dialogs.vue_vue_type_script_setup_true_lang-CzFMOjlE.es.js} +2 -2
  16. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CzFMOjlE.es.js.map +1 -0
  17. package/.chunks/field-Cvv0SRcJ.amd.js.map +1 -1
  18. package/.chunks/field-CyyFzM-Y.es.js.map +1 -1
  19. package/.chunks/{forms-CUSCBQu3.amd.js → forms-4D_EVI46.amd.js} +3 -3
  20. package/.chunks/forms-4D_EVI46.amd.js.map +1 -0
  21. package/.chunks/{forms-BseC3Ftz.es.js → forms-xkXHvvah.es.js} +565 -551
  22. package/.chunks/forms-xkXHvvah.es.js.map +1 -0
  23. package/.chunks/index-DLUtoTUg.amd.js.map +1 -1
  24. package/.chunks/index-DkQWJkMc.es.js.map +1 -1
  25. package/.chunks/lazy-40pjr8cZ.es.js.map +1 -1
  26. package/.chunks/lazy-DSFLxvj4.amd.js.map +1 -1
  27. package/.chunks/{notice-DwjipV21.amd.js → notice-hF3z8ewG.amd.js} +2 -2
  28. package/.chunks/notice-hF3z8ewG.amd.js.map +1 -0
  29. package/.chunks/{notice-Cl3ZgiHm.es.js → notice-wqZxmsUH.es.js} +2 -2
  30. package/.chunks/notice-wqZxmsUH.es.js.map +1 -0
  31. package/.chunks/{page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js → page.vue_vue_type_script_setup_true_lang-rW3w9LMh.es.js} +4 -4
  32. package/.chunks/page.vue_vue_type_script_setup_true_lang-rW3w9LMh.es.js.map +1 -0
  33. package/.chunks/{page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js → page.vue_vue_type_script_setup_true_lang-tiWuQ_ZK.amd.js} +2 -2
  34. package/.chunks/page.vue_vue_type_script_setup_true_lang-tiWuQ_ZK.amd.js.map +1 -0
  35. package/.chunks/policy.vue_vue_type_style_index_0_lang-C9A--uWd.es.js +503 -0
  36. package/.chunks/policy.vue_vue_type_style_index_0_lang-C9A--uWd.es.js.map +1 -0
  37. package/.chunks/policy.vue_vue_type_style_index_0_lang-DABqSSXw.amd.js +2 -0
  38. package/.chunks/policy.vue_vue_type_style_index_0_lang-DABqSSXw.amd.js.map +1 -0
  39. package/.chunks/{popup-Jw_Yyg3U.es.js → popup-BeLPdHWv.es.js} +2 -2
  40. package/.chunks/popup-BeLPdHWv.es.js.map +1 -0
  41. package/.chunks/{popup-DRuyYFGB.amd.js → popup-Bwmu8rOb.amd.js} +2 -2
  42. package/.chunks/popup-Bwmu8rOb.amd.js.map +1 -0
  43. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js → popupHint.vue_vue_type_style_index_0_lang-B0BWXhHK.amd.js} +2 -2
  44. package/.chunks/popupHint.vue_vue_type_style_index_0_lang-B0BWXhHK.amd.js.map +1 -0
  45. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js → popupHint.vue_vue_type_style_index_0_lang-fnjq0yg1.es.js} +2 -2
  46. package/.chunks/popupHint.vue_vue_type_style_index_0_lang-fnjq0yg1.es.js.map +1 -0
  47. package/.chunks/store-CX_6ZXhO.es.js.map +1 -1
  48. package/.chunks/store-YRW59xEF.amd.js.map +1 -1
  49. package/.chunks/{utils-D9nYQabE.amd.js → utils-BRJvuqe_.amd.js} +2 -2
  50. package/.chunks/utils-BRJvuqe_.amd.js.map +1 -0
  51. package/.chunks/{utils-YrUExsH7.es.js → utils-ByqQkftW.es.js} +2 -2
  52. package/.chunks/utils-ByqQkftW.es.js.map +1 -0
  53. package/.chunks/{utils-Q69SXlnV.es.js → utils-YVlPlqDK.es.js} +3 -3
  54. package/.chunks/utils-YVlPlqDK.es.js.map +1 -0
  55. package/.chunks/{utils-CzHUG_xz.amd.js → utils-cAJahDml.amd.js} +2 -2
  56. package/.chunks/utils-cAJahDml.amd.js.map +1 -0
  57. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js → widgetInput.vue_vue_type_script_setup_true_lang-D7lVLE3D.amd.js} +2 -2
  58. package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-D7lVLE3D.amd.js.map +1 -0
  59. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js → widgetInput.vue_vue_type_script_setup_true_lang-UUovJzhL.es.js} +2 -2
  60. package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-UUovJzhL.es.js.map +1 -0
  61. package/README.md +82 -82
  62. package/api/additional.amd.js.map +1 -1
  63. package/api/additional.js.map +1 -1
  64. package/api/index.amd.js +1 -1
  65. package/api/index.amd.js.map +1 -1
  66. package/api/index.js +1 -1
  67. package/api/index.js.map +1 -1
  68. package/assets/core.css +1 -1
  69. package/assets/forms.css +1 -1
  70. package/assets/policy.css +1 -1
  71. package/assets/project.css +1 -1
  72. package/charts/charts.amd.js +1 -1
  73. package/charts/charts.amd.js.map +1 -1
  74. package/charts/charts.js +1 -1
  75. package/charts/charts.js.map +1 -1
  76. package/core/app.amd.js +1 -1
  77. package/core/app.amd.js.map +1 -1
  78. package/core/app.js +5 -5
  79. package/core/app.js.map +1 -1
  80. package/dialog/dialog.amd.js +1 -1
  81. package/dialog/dialog.amd.js.map +1 -1
  82. package/dialog/dialog.js +2 -2
  83. package/dialog/dialog.js.map +1 -1
  84. package/extra/extra.amd.js.map +1 -1
  85. package/extra/extra.js.map +1 -1
  86. package/forms/forms.amd.js +1 -1
  87. package/forms/forms.js +3 -3
  88. package/formsExt/formsExt.amd.js +1 -1
  89. package/formsExt/formsExt.amd.js.map +1 -1
  90. package/formsExt/formsExt.js +123 -111
  91. package/formsExt/formsExt.js.map +1 -1
  92. package/icomoon/Read Me.txt +7 -7
  93. package/icomoon/Topvisor icons.json +6658 -0
  94. package/icomoon/demo-files/demo.css +158 -158
  95. package/icomoon/demo-files/demo.js +30 -30
  96. package/icomoon/demo.css +158 -158
  97. package/icomoon/demo.html +15 -1
  98. package/icomoon/demo.js +30 -30
  99. package/icomoon/fonts/Topvisor-2.eot +0 -0
  100. package/icomoon/fonts/Topvisor-2.svg +1 -0
  101. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  102. package/icomoon/fonts/Topvisor-2.woff +0 -0
  103. package/icomoon/selection.json +1 -1
  104. package/icomoon/style.css +8 -5
  105. package/jquery-ui.min.css +5 -5
  106. package/layout/layout.amd.js +1 -1
  107. package/layout/layout.amd.js.map +1 -1
  108. package/layout/layout.js +1 -1
  109. package/layout/layout.js.map +1 -1
  110. package/package.json +1 -1
  111. package/popup/popup.amd.js +1 -1
  112. package/popup/popup.amd.js.map +1 -1
  113. package/popup/popup.js +6 -6
  114. package/popup/popup.js.map +1 -1
  115. package/popup/worker.amd.js +1 -1
  116. package/popup/worker.amd.js.map +1 -1
  117. package/popup/worker.js +2 -2
  118. package/popup/worker.js.map +1 -1
  119. package/project/project.amd.js +1 -1
  120. package/project/project.amd.js.map +1 -1
  121. package/project/project.js +892 -613
  122. package/project/project.js.map +1 -1
  123. package/require/css.amd.js +12 -12
  124. package/src/api/api/types/client/request-options.d.ts +8 -3
  125. package/src/components/forms/caption/types.d.ts +5 -1
  126. package/src/components/forms/input/input.vue.d.ts +2 -4
  127. package/src/components/forms/input/types.d.ts +15 -0
  128. package/src/components/forms/select/select.vue.d.ts +15 -2
  129. package/src/components/forms/select/types.d.ts +6 -0
  130. package/src/components/formsExt/editArea/editArea.vue.d.ts +15 -2
  131. package/src/components/formsExt/editArea/types.d.ts +6 -0
  132. package/src/components/formsExt/editInput/editInput.vue.d.ts +16 -1
  133. package/src/components/formsExt/selector2/composables/useAPI.d.ts +2 -0
  134. package/src/components/formsExt/selector2/composables/useMenu.d.ts +3 -1
  135. package/src/components/formsExt/selector2/types.d.ts +14 -0
  136. package/src/components/popup/popup/listItem.vue.d.ts +24 -4
  137. package/src/components/popup/popup/types.d.ts +1 -0
  138. package/src/components/project/groupSelector/groupSelector.vue.d.ts +5 -0
  139. package/src/components/project/groupSelector/groups/groups.vue.d.ts +2 -0
  140. package/src/components/project/groupSelector/groups/types.d.ts +4 -0
  141. package/src/components/project/groupSelector/groups/utils.d.ts +1 -1
  142. package/src/components/project/groupSelector/types.d.ts +4 -0
  143. package/src/components/project/project.d.ts +1 -0
  144. package/src/components/project/projectSelector/projectSelector.vue.d.ts +121 -0
  145. package/src/components/project/projectSelector/stories/mocks/projects.d.ts +10 -0
  146. package/src/components/project/projectSelector/submenu/submenu.vue.d.ts +4 -0
  147. package/src/components/project/projectSelector/submenu/types.d.ts +17 -0
  148. package/src/components/project/projectSelector/types.d.ts +57 -0
  149. package/src/components/project/projectSelector/utils.d.ts +206 -0
  150. package/src/core/directives/shortcut.d.ts +12 -0
  151. package/src/core/utils/string.d.ts +1 -1
  152. package/tabs/tabs.amd.js.map +1 -1
  153. package/tabs/tabs.js.map +1 -1
  154. package/tabsView/tabsView.amd.js +1 -1
  155. package/tabsView/tabsView.amd.js.map +1 -1
  156. package/tabsView/tabsView.js +2 -2
  157. package/tabsView/tabsView.js.map +1 -1
  158. package/utils/check.amd.js.map +1 -1
  159. package/utils/check.js.map +1 -1
  160. package/utils/clipboard.amd.js +1 -1
  161. package/utils/clipboard.amd.js.map +1 -1
  162. package/utils/clipboard.js +1 -1
  163. package/utils/clipboard.js.map +1 -1
  164. package/utils/date.amd.js +1 -1
  165. package/utils/date.js +1 -1
  166. package/utils/device.amd.js +1 -1
  167. package/utils/device.js +1 -1
  168. package/utils/dom.amd.js.map +1 -1
  169. package/utils/dom.js.map +1 -1
  170. package/utils/image.amd.js.map +1 -1
  171. package/utils/image.js.map +1 -1
  172. package/utils/keyboard.amd.js.map +1 -1
  173. package/utils/keyboard.js.map +1 -1
  174. package/utils/lodash.amd.js +1 -1
  175. package/utils/lodash.js +1 -1
  176. package/utils/number.amd.js.map +1 -1
  177. package/utils/number.js.map +1 -1
  178. package/utils/price.amd.js +1 -1
  179. package/utils/price.amd.js.map +1 -1
  180. package/utils/price.js +1 -1
  181. package/utils/price.js.map +1 -1
  182. package/utils/route.amd.js.map +1 -1
  183. package/utils/route.js.map +1 -1
  184. package/utils/scroll.amd.js.map +1 -1
  185. package/utils/scroll.js.map +1 -1
  186. package/utils/searchers.amd.js +1 -1
  187. package/utils/searchers.amd.js.map +1 -1
  188. package/utils/searchers.js +3 -3
  189. package/utils/searchers.js.map +1 -1
  190. package/utils/string.amd.js +1 -1
  191. package/utils/string.amd.js.map +1 -1
  192. package/utils/string.js +50 -50
  193. package/utils/string.js.map +1 -1
  194. package/utils/system.amd.js.map +1 -1
  195. package/utils/system.js.map +1 -1
  196. package/utils/url.amd.js.map +1 -1
  197. package/utils/url.js.map +1 -1
  198. package/web-types.json +31 -0
  199. package/.chunks/core-BL-38XF7.es.js +0 -196
  200. package/.chunks/core-BL-38XF7.es.js.map +0 -1
  201. package/.chunks/core-BsPx05H9.amd.js +0 -2
  202. package/.chunks/core-BsPx05H9.amd.js.map +0 -1
  203. package/.chunks/datepicker-3coUsFW2.amd.js.map +0 -1
  204. package/.chunks/datepicker-D1Hw3a3o.es.js.map +0 -1
  205. package/.chunks/dialog_regionSelectorRegions-1UVhgK2f.es.js.map +0 -1
  206. package/.chunks/dialog_regionSelectorRegions-CZ8IX7la.amd.js.map +0 -1
  207. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js.map +0 -1
  208. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js.map +0 -1
  209. package/.chunks/forms-BseC3Ftz.es.js.map +0 -1
  210. package/.chunks/forms-CUSCBQu3.amd.js.map +0 -1
  211. package/.chunks/notice-Cl3ZgiHm.es.js.map +0 -1
  212. package/.chunks/notice-DwjipV21.amd.js.map +0 -1
  213. package/.chunks/page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js.map +0 -1
  214. package/.chunks/page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js.map +0 -1
  215. package/.chunks/policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js +0 -496
  216. package/.chunks/policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js.map +0 -1
  217. package/.chunks/policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js +0 -2
  218. package/.chunks/policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js.map +0 -1
  219. package/.chunks/popup-DRuyYFGB.amd.js.map +0 -1
  220. package/.chunks/popup-Jw_Yyg3U.es.js.map +0 -1
  221. package/.chunks/popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js.map +0 -1
  222. package/.chunks/popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js.map +0 -1
  223. package/.chunks/utils-CzHUG_xz.amd.js.map +0 -1
  224. package/.chunks/utils-D9nYQabE.amd.js.map +0 -1
  225. package/.chunks/utils-Q69SXlnV.es.js.map +0 -1
  226. package/.chunks/utils-YrUExsH7.es.js.map +0 -1
  227. package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js.map +0 -1
  228. package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js.map +0 -1
@@ -3,18 +3,19 @@
3
3
  const fileNames = ['../assets/project.css'].map(fileName => import.meta.resolve(fileName));
4
4
  _autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
5
5
 
6
- import { defineComponent as R, mergeModels as M, useModel as T, computed as E, createElementBlock as A, openBlock as h, createBlock as C, unref as v, withCtx as B, Fragment as Y, renderList as me, normalizeClass as X, createElementVNode as oe, toDisplayString as b, createVNode as N, createTextVNode as z, toValue as ye, ref as G, watch as V, createCommentVNode as L, reactive as be, isRef as he, withModifiers as U, mergeProps as Ve, withKeys as Ie, nextTick as Ne, resolveDirective as Pe, withDirectives as De, resolveDynamicComponent as Fe, renderSlot as qe, shallowRef as Ue, createSlots as _e } from "vue";
7
- import { u as w, C as _, e as Q, p as se, d as ze } from "../.chunks/forms-BseC3Ftz.es.js";
8
- import { _ as Me, b as ve, a as Je } from "../.chunks/popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js";
9
- import { a as We, _ as we, b as Ee, c as $e, I as de } from "../.chunks/policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js";
10
- import { u as Ye } from "../.chunks/utils-YrUExsH7.es.js";
11
- import { getSearcherGIcon as Qe, getLangLabel as He, getDeviceGIcon as Xe } from "../utils/searchers.js";
12
- import "../.chunks/core-BL-38XF7.es.js";
13
- import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js";
14
- import { g as Se } from "../.chunks/field-CyyFzM-Y.es.js";
15
- import { storage as J } from "../utils/dom.js";
16
- import { TopPopupWorker as Ze } from "../popup/worker.js";
17
- const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" }, Nt = /* @__PURE__ */ R({
6
+ import { defineComponent as G, mergeModels as M, useModel as B, computed as w, createElementBlock as T, openBlock as v, createBlock as j, unref as p, withCtx as C, Fragment as q, renderList as se, normalizeClass as Z, createElementVNode as L, toDisplayString as A, createVNode as E, createTextVNode as N, toValue as ke, ref as V, watch as P, createCommentVNode as _, reactive as _e, resolveComponent as Ee, onMounted as Ue, withModifiers as D, isRef as Ce, mergeProps as Ge, withKeys as je, nextTick as Fe, resolveDirective as We, withDirectives as ze, resolveDynamicComponent as Je, renderSlot as Ye, shallowRef as He, createSlots as Qe } from "vue";
7
+ import { u as b, C as J, e as Q, q as fe, d as Xe } from "../.chunks/forms-xkXHvvah.es.js";
8
+ import { _ as he, b as ye, a as Ze } from "../.chunks/popupHint.vue_vue_type_style_index_0_lang-fnjq0yg1.es.js";
9
+ import { a as et, _ as Ie, b as Se, c as Ke, I as le } from "../.chunks/policy.vue_vue_type_style_index_0_lang-C9A--uWd.es.js";
10
+ import { u as tt } from "../.chunks/utils-ByqQkftW.es.js";
11
+ import { getSearcherGIcon as ot, getLangLabel as lt, getDeviceGIcon as nt } from "../utils/searchers.js";
12
+ import "../.chunks/core-BgoBbm_5.es.js";
13
+ import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-CzFMOjlE.es.js";
14
+ import { g as Te } from "../.chunks/field-CyyFzM-Y.es.js";
15
+ import { validUrl as Ae } from "../utils/check.js";
16
+ import { storage as Y } from "../utils/dom.js";
17
+ import { TopPopupWorker as at } from "../popup/worker.js";
18
+ const rt = { class: "top-competitorSelector" }, it = { class: "top-ellipsis1" }, io = /* @__PURE__ */ G({
18
19
  __name: "competitorSelector",
19
20
  props: /* @__PURE__ */ M({
20
21
  modelValue: {},
@@ -26,64 +27,64 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
26
27
  }),
27
28
  emits: ["update:modelValue"],
28
29
  setup(e) {
29
- const a = e, o = T(e, "modelValue"), t = E(() => {
30
- if (a.showSelectAllItem)
30
+ const t = e, o = B(e, "modelValue"), l = w(() => {
31
+ if (t.showSelectAllItem)
31
32
  return {
32
33
  icon: "",
33
- title: w().Common.Select_all,
34
+ title: b().Common.Select_all,
34
35
  value: "all",
35
36
  content: ""
36
37
  };
37
38
  });
38
- return (r, l) => (h(), A("div", et, [
39
- v(_).state.isMobile ? (h(), C(Me, { key: 0 }, {
40
- opener: B(() => [
41
- N(Q, {
39
+ return (a, n) => (v(), T("div", rt, [
40
+ p(J).state.isMobile ? (v(), j(he, { key: 0 }, {
41
+ opener: C(() => [
42
+ E(Q, {
42
43
  class: "top-competitorSelector_opener",
43
44
  color: "theme",
44
45
  icon: "",
45
46
  icon2: ""
46
47
  }, {
47
- default: B(() => [
48
- z(b(e.items.find((n) => n.value === o.value?.[0])?.content), 1)
48
+ default: C(() => [
49
+ N(A(e.items.find((r) => r.value === o.value?.[0])?.content), 1)
49
50
  ]),
50
51
  _: 1
51
52
  })
52
53
  ]),
53
- contentList: B(() => [
54
- (h(!0), A(Y, null, me(e.items, (n) => (h(), C(ve, {
55
- class: X({
56
- "top-active": o.value?.includes(n.value)
54
+ contentList: C(() => [
55
+ (v(!0), T(q, null, se(e.items, (r) => (v(), j(ye, {
56
+ class: Z({
57
+ "top-active": o.value?.includes(r.value)
57
58
  }),
58
- "data-top-icon": n.icon,
59
- title: n.title,
60
- onClick: () => o.value = [n.value]
59
+ "data-top-icon": r.icon,
60
+ title: r.title,
61
+ onClick: () => o.value = [r.value]
61
62
  }, {
62
- default: B(() => [
63
- oe("span", tt, b(n.content), 1)
63
+ default: C(() => [
64
+ L("span", it, A(r.content), 1)
64
65
  ]),
65
66
  _: 2
66
67
  }, 1032, ["class", "data-top-icon", "title", "onClick"]))), 256))
67
68
  ]),
68
69
  _: 1
69
- })) : (h(), C(We, {
70
+ })) : (v(), j(et, {
70
71
  key: 1,
71
72
  modelValue: o.value,
72
- "onUpdate:modelValue": l[0] || (l[0] = (n) => o.value = n),
73
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => o.value = r),
73
74
  items: e.items,
74
75
  isMultiple: !0,
75
76
  styling: "bar",
76
77
  canBeEmptyMultiple: !1,
77
- selectAllItem: t.value
78
+ selectAllItem: l.value
78
79
  }, null, 8, ["modelValue", "items", "selectAllItem"]))
79
80
  ]));
80
81
  }
81
- }), Pt = (e, a) => E(() => ye(e).filter((r) => r.on >= 0 || r.id === a).map((r) => ({
82
- value: r.id,
83
- title: r.url + ` [${r.id}]`,
84
- icon: r.id === ye(a) ? "" : "",
85
- content: r.name
86
- }))), j = -1, y = -2, le = -1, ot = {
82
+ }), so = (e, t) => w(() => ke(e).filter((a) => a.on >= 0 || a.id === t).map((a) => ({
83
+ value: a.id,
84
+ title: a.url + ` [${a.id}]`,
85
+ icon: a.id === ke(t) ? "" : "",
86
+ content: a.name
87
+ }))), O = -1, y = -2, ne = -1, dt = {
87
88
  0: "Yandex",
88
89
  1: "Google",
89
90
  4: "YouTube",
@@ -93,239 +94,239 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
93
94
  9: "GoogleStore",
94
95
  20: "Yandex.com",
95
96
  21: "Yandex.com.tr"
96
- }, xe = {
97
+ }, Be = {
97
98
  key: y,
98
99
  name: "--",
99
100
  index: y
100
- }, Ge = {
101
+ }, Le = {
101
102
  key: y,
102
103
  name: "--",
103
- regions: [xe],
104
- regionByIndex: /* @__PURE__ */ new Map([[y, xe]])
104
+ regions: [Be],
105
+ regionByIndex: /* @__PURE__ */ new Map([[y, Be]])
105
106
  }, ae = {
106
107
  key: y,
107
108
  name: "Autoselect",
108
109
  index: y
109
- }, ue = {
110
+ }, ce = {
110
111
  key: y,
111
112
  name: "Autoselect",
112
113
  regions: [ae],
113
114
  regionByIndex: /* @__PURE__ */ new Map([[y, ae]])
114
- }, ke = {
115
+ }, be = {
115
116
  countryCode: "00",
116
117
  depth: 1,
117
118
  device: 0,
118
- key: le,
119
- index: le,
119
+ key: ne,
120
+ index: ne,
120
121
  lang: "ru",
121
122
  name: "Without region"
122
- }, lt = () => (ae.name = w().Common.Autoselect, ae), at = () => (lt(), ue.name = w().Common.Autoselect, console.log(ue), ue), nt = () => (ke.name = w().Keywords.Without_region, ke), Ke = (e = !1, a = !1, o = []) => {
123
- let t;
124
- return e ? t = rt(o) : t = Oe(o), a && t.set(y, at()), t.size || t.set(y, Ge), t;
125
- }, Oe = (e, a = !0, o = [], t = !1) => {
126
- const r = /* @__PURE__ */ new Map();
127
- return e.forEach((l) => {
128
- if (!l.enabled || t && typeof l.key == "number" && l.key > 1) return;
129
- const n = { ...l };
130
- n.regionByIndex = /* @__PURE__ */ new Map(), l.regions && l.regions.forEach((u) => {
131
- if (a && !u.enabled) return;
132
- const f = { ...u };
133
- n.regionByIndex.set(f.index, f);
134
- }), !n.regionByIndex.size && o.length, // режим вывода ПС без регионов
135
- (!l.regions || // есть включенные регионы
136
- n.regionByIndex.size || // запрошен вывод конкретных ПС
137
- o.length) && typeof n.key == "number" && r.set(n.key, n);
138
- }), o.forEach((l) => {
139
- if (r.has(l)) return;
140
- const n = {
141
- key: l,
142
- name: ot[l],
123
+ }, st = () => (ae.name = b().Common.Autoselect, ae), ut = () => (st(), ce.name = b().Common.Autoselect, console.log(ce), ce), ct = () => (be.name = b().Keywords.Without_region, be), Oe = (e = !1, t = !1, o = []) => {
124
+ let l;
125
+ return e ? l = gt(o) : l = Re(o), t && l.set(y, ut()), l.size || l.set(y, Le), l;
126
+ }, Re = (e, t = !0, o = [], l = !1) => {
127
+ const a = /* @__PURE__ */ new Map();
128
+ return e.forEach((n) => {
129
+ if (!n.enabled || l && typeof n.key == "number" && n.key > 1) return;
130
+ const r = { ...n };
131
+ r.regionByIndex = /* @__PURE__ */ new Map(), n.regions && n.regions.forEach((u) => {
132
+ if (t && !u.enabled) return;
133
+ const c = { ...u };
134
+ r.regionByIndex.set(c.index, c);
135
+ }), !r.regionByIndex.size && o.length, // режим вывода ПС без регионов
136
+ (!n.regions || // есть включенные регионы
137
+ r.regionByIndex.size || // запрошен вывод конкретных ПС
138
+ o.length) && typeof r.key == "number" && a.set(r.key, r);
139
+ }), o.forEach((n) => {
140
+ if (a.has(n)) return;
141
+ const r = {
142
+ key: n,
143
+ name: dt[n],
143
144
  regions: [],
144
145
  regionByIndex: /* @__PURE__ */ new Map()
145
146
  };
146
- r.set(n.key, n);
147
- }), r;
148
- }, rt = (e) => {
149
- const a = Oe(e, !1, [0, 1], !0);
150
- if (a.has(2)) {
151
- const o = a.get(2);
147
+ a.set(r.key, r);
148
+ }), a;
149
+ }, gt = (e) => {
150
+ const t = Re(e, !1, [0, 1], !0);
151
+ if (t.has(2)) {
152
+ const o = t.get(2);
152
153
  o && (o.regionByIndex = /* @__PURE__ */ new Map());
153
154
  }
154
- return a.forEach((o) => {
155
+ return t.forEach((o) => {
155
156
  if (!o.regionByIndex) return;
156
- const t = { ...nt() };
157
- o.regionByIndex.set(t.index, t);
158
- }), a;
159
- }, it = (e, a, o = []) => {
160
- const t = Ke(e, !1, o);
161
- let r;
162
- return t.forEach((l) => {
163
- if (!(a.searcher_key !== void 0 && a.searcher_key != l.key) && l.regions && (l.regions.forEach((n) => {
164
- if (!r && !(a.key !== void 0 && a.key != n.key) && !(a.index !== void 0 && a.index != n.index) && !(!e && (a.lang !== void 0 && a.lang != n.lang || a.device !== void 0 && a.device != n.device)))
165
- return n.searcher_key = l.key, r = n, !1;
166
- }), r))
157
+ const l = { ...ct() };
158
+ o.regionByIndex.set(l.index, l);
159
+ }), t;
160
+ }, ft = (e, t, o = []) => {
161
+ const l = Oe(e, !1, o);
162
+ let a;
163
+ return l.forEach((n) => {
164
+ if (!(t.searcher_key !== void 0 && t.searcher_key != n.key) && n.regions && (n.regions.forEach((r) => {
165
+ if (!a && !(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)))
166
+ return r.searcher_key = n.key, a = r, !1;
167
+ }), a))
167
168
  return !1;
168
- }), r;
169
- }, dt = Ye(() => import("../.chunks/dialog_regionSelectorRegions-1UVhgK2f.es.js")), ut = (e, a) => {
170
- const o = w(), t = G(a.value.keys().next().value ?? y), r = E(() => {
171
- const l = /* @__PURE__ */ new Map();
172
- if (a.value.forEach((n) => {
169
+ }), a;
170
+ }, mt = tt(() => import("../.chunks/dialog_regionSelectorRegions-DA38RsiW.es.js")), pt = (e, t) => {
171
+ const o = b(), l = V(t.value.keys().next().value ?? y), a = w(() => {
172
+ const n = /* @__PURE__ */ new Map();
173
+ if (t.value.forEach((r) => {
173
174
  let u = {
174
- value: n.key,
175
- title: n.name
175
+ value: r.key,
176
+ title: r.name
176
177
  };
177
- e.addSearcherIcon && (u.icon = Qe(n.key)), l.set(n.key, u);
178
- }), e.addCompare && !l.has(y)) {
179
- const n = {
178
+ e.addSearcherIcon && (u.icon = ot(r.key)), n.set(r.key, u);
179
+ }), e.addCompare && !n.has(y)) {
180
+ const r = {
180
181
  value: "",
181
182
  title: "--------------------",
182
183
  disabled: !0
183
184
  };
184
- l.set(n.value, n);
185
+ n.set(r.value, r);
185
186
  const u = {
186
- value: j,
187
+ value: O,
187
188
  title: o.Common.Compare
188
189
  };
189
- l.set(u.value, u);
190
+ n.set(u.value, u);
190
191
  }
191
- return l;
192
+ return n;
192
193
  });
193
194
  return {
194
- searcherKey: t,
195
- optionBySearcherKey: r
195
+ searcherKey: l,
196
+ optionBySearcherKey: a
196
197
  };
197
- }, st = (e, a) => {
198
- const o = w(), t = G(y);
199
- e.modelValue.length === 1 && (t.value = e.modelValue[0]), t.value === y && (e.forFrequency ? t.value = a.value?.regionByIndex.values().next().value?.key ?? y : t.value = a.value?.regionByIndex.keys().next().value ?? y);
200
- const r = E(() => {
201
- const l = /* @__PURE__ */ new Map();
202
- return a.value.regionByIndex?.forEach((n) => {
203
- let u = n.name;
198
+ }, vt = (e, t) => {
199
+ const o = b(), l = V(y);
200
+ e.modelValue.length === 1 && (l.value = e.modelValue[0]), l.value === y && (e.forFrequency ? l.value = t.value?.regionByIndex.values().next().value?.key ?? y : l.value = t.value?.regionByIndex.keys().next().value ?? y);
201
+ const a = w(() => {
202
+ const n = /* @__PURE__ */ new Map();
203
+ return t.value.regionByIndex?.forEach((r) => {
204
+ let u = r.name;
204
205
  if (e.forFrequency) {
205
- const x = {
206
- value: n.key,
206
+ const S = {
207
+ value: r.key,
207
208
  title: u
208
209
  };
209
- l.has(n.key) || l.set(n.key, x);
210
+ n.has(r.key) || n.set(r.key, S);
210
211
  return;
211
212
  }
212
- n.device && (u += " (" + o.Common["Device_" + n.device] + ")");
213
- const f = He(a.value.key || 0, n.lang ?? "");
214
- f && (u += " / " + f);
215
- const c = {
216
- value: n.index,
213
+ r.device && (u += " (" + o.Common["Device_" + r.device] + ")");
214
+ const c = lt(t.value.key || 0, r.lang ?? "");
215
+ c && (u += " / " + c);
216
+ const f = {
217
+ value: r.index,
217
218
  title: u,
218
- icon: n.device ? Xe(n.device) : void 0
219
+ icon: r.device ? nt(r.device) : void 0
219
220
  };
220
- l.set(n.index, c);
221
- }), l;
221
+ n.set(r.index, f);
222
+ }), n;
222
223
  });
223
- return V(r, (l, n) => {
224
- if (e.onlySearcher || t.value !== void 0 && l.get(t.value))
224
+ return P(a, (n, r) => {
225
+ if (e.onlySearcher || l.value !== void 0 && n.get(l.value))
225
226
  return;
226
- let u = l.keys().next().value;
227
- if (t.value === y || u === y) {
228
- t.value = u;
227
+ let u = n.keys().next().value;
228
+ if (l.value === y || u === y) {
229
+ l.value = u;
229
230
  return;
230
231
  }
231
- let f = n?.get(t.value)?.title || "", c = -1;
232
- for (const [x, i] of l.entries()) {
233
- const m = i.title;
234
- if (typeof m != "string" || typeof x == "string")
232
+ let c = r?.get(l.value)?.title || "", f = -1;
233
+ for (const [S, i] of n.entries()) {
234
+ const g = i.title;
235
+ if (typeof g != "string" || typeof S == "string")
235
236
  break;
236
- if (m === f) {
237
- u = x;
237
+ if (g === c) {
238
+ u = S;
238
239
  break;
239
240
  }
240
241
  const d = new RegExp(` \\((${o.Common.Device_1}|${o.Common.Device_2})\\)`);
241
- let s = f, g = 3;
242
- m.indexOf(s) === -1 && (s = f.replace(/^[^a-zа-я]/i, "").replace(d, ""), g--), m.indexOf(s) === -1 && (s = f.replace(/ \/.*/, ""), g--), m.indexOf(s) === -1 && (s = f.replace(/ \/.*/, ""), s = s.replace(/^[^a-zа-я]/i, "").replace(d, ""), g--), m.indexOf(s) !== -1 && (g <= c || (c = g, u = x));
242
+ let s = c, m = 3;
243
+ g.indexOf(s) === -1 && (s = c.replace(/^[^a-zа-я]/i, "").replace(d, ""), m--), g.indexOf(s) === -1 && (s = c.replace(/ \/.*/, ""), m--), g.indexOf(s) === -1 && (s = c.replace(/ \/.*/, ""), s = s.replace(/^[^a-zа-я]/i, "").replace(d, ""), m--), g.indexOf(s) !== -1 && (m <= f || (f = m, u = S));
243
244
  }
244
- t.value = u;
245
+ l.value = u;
245
246
  }), {
246
- regionIndex: t,
247
- optionByRegionIndex: r
247
+ regionIndex: l,
248
+ optionByRegionIndex: a
248
249
  };
249
- }, ct = (e, a, o) => {
250
- const t = G([]), r = () => {
251
- if (e.onlySearcher && a.value) {
252
- t.value = Array.from(a.value.keys());
250
+ }, ht = (e, t, o) => {
251
+ const l = V([]), a = () => {
252
+ if (e.onlySearcher && t.value) {
253
+ l.value = Array.from(t.value.keys());
253
254
  return;
254
255
  }
255
- let n = [];
256
+ let r = [];
256
257
  if (e.modelValue.length > 1)
257
- n = [...e.modelValue];
258
+ r = [...e.modelValue];
258
259
  else
259
260
  try {
260
- n = JSON.parse(
261
+ r = JSON.parse(
261
262
  localStorage.getItem("ui:project:regionSelector" + e.projectId + ":regionsIndexes")
262
263
  ) ?? [];
263
264
  } catch {
264
265
  }
265
- n.length && (n = n.filter((u) => o.value.has(u))), n.length || (n = Array.from(o.value)), t.value = [...n];
266
- }, l = () => {
267
- t.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(t.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
266
+ r.length && (r = r.filter((u) => o.value.has(u))), r.length || (r = Array.from(o.value)), l.value = [...r];
267
+ }, n = () => {
268
+ l.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(l.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
268
269
  };
269
- return V(t, () => {
270
- l();
271
- }), e.addCompare && r(), {
272
- regionsIndexes: t
270
+ return P(l, () => {
271
+ n();
272
+ }), e.addCompare && a(), {
273
+ regionsIndexes: l
273
274
  };
274
- }, gt = (e) => {
275
- const a = E(() => Ke(e.forFrequency, e.autoRegion, e.searchers)), o = E(() => a.value.get(r.searcherKey.value) || Ge), t = E(() => {
275
+ }, yt = (e) => {
276
+ const t = w(() => Oe(e.forFrequency, e.autoRegion, e.searchers)), o = w(() => t.value.get(a.searcherKey.value) || Le), l = w(() => {
276
277
  const i = /* @__PURE__ */ new Set();
277
- return a.value.forEach((m) => {
278
- m.regionByIndex.forEach((d) => {
279
- d.index !== le && d.index !== y && i.add(d.index);
278
+ return t.value.forEach((g) => {
279
+ g.regionByIndex.forEach((d) => {
280
+ d.index !== ne && d.index !== y && i.add(d.index);
280
281
  });
281
282
  }), i;
282
- }), r = ut(e, a), l = st(e, o), n = ct(e, a, t);
283
- V(a, () => {
284
- if (e.onlySearcher ? n.regionsIndexes.value = Array.from(a.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((m) => t.value.has(m)), r.searcherKey.value === j) return;
285
- let i = a.value.keys().next().value;
286
- a.value.forEach((m) => {
287
- if (e.onlySearcher && m.key === r.searcherKey.value) {
288
- i = r.searcherKey.value;
283
+ }), a = pt(e, t), n = vt(e, o), r = ht(e, t, l);
284
+ P(t, () => {
285
+ if (e.onlySearcher ? r.regionsIndexes.value = Array.from(t.value.keys()) : r.regionsIndexes.value = r.regionsIndexes.value.filter((g) => l.value.has(g)), a.searcherKey.value === O) return;
286
+ let i = t.value.keys().next().value;
287
+ t.value.forEach((g) => {
288
+ if (e.onlySearcher && g.key === a.searcherKey.value) {
289
+ i = a.searcherKey.value;
289
290
  return;
290
291
  }
291
- if (l.regionIndex.value && m.regionByIndex?.has(l.regionIndex.value) && (i = m.key), !e.onlySearcher) {
292
+ if (n.regionIndex.value && g.regionByIndex?.has(n.regionIndex.value) && (i = g.key), !e.onlySearcher) {
292
293
  let d;
293
- i !== void 0 && (d = a.value.get(i)?.regionByIndex);
294
- const s = a.value.get(m.key)?.regionByIndex;
295
- d?.has(y) && !s?.has(y) && (i = m.key);
294
+ i !== void 0 && (d = t.value.get(i)?.regionByIndex);
295
+ const s = t.value.get(g.key)?.regionByIndex;
296
+ d?.has(y) && !s?.has(y) && (i = g.key);
296
297
  }
297
- }), i !== void 0 && (r.searcherKey.value = i), l.regionIndex.value !== void 0 && !o.value?.regionByIndex?.has(l.regionIndex.value) && (l.regionIndex.value = o.value?.regions?.keys().next().value);
298
+ }), i !== void 0 && (a.searcherKey.value = i), n.regionIndex.value !== void 0 && !o.value?.regionByIndex?.has(n.regionIndex.value) && (n.regionIndex.value = o.value?.regions?.keys().next().value);
298
299
  }, { immediate: !0 });
299
300
  const u = () => {
300
- if (!(r.searcherKey.value === j || r.searcherKey.value === y))
301
- return r.searcherKey.value;
302
- }, f = () => {
303
- if (e.onlySearcher || l.regionIndex.value === y) return;
304
- let i = l.regionIndex.value;
301
+ if (!(a.searcherKey.value === O || a.searcherKey.value === y))
302
+ return a.searcherKey.value;
303
+ }, c = () => {
304
+ if (e.onlySearcher || n.regionIndex.value === y) return;
305
+ let i = n.regionIndex.value;
305
306
  if (e.forFrequency) {
306
- const m = l.regionIndex.value;
307
- i = it(e.forFrequency, { searcher_key: u(), key: m }, e.searchers)?.index;
307
+ const g = n.regionIndex.value;
308
+ i = ft(e.forFrequency, { searcher_key: u(), key: g }, e.searchers)?.index;
308
309
  }
309
310
  return i;
310
- }, c = () => {
311
+ }, f = () => {
311
312
  const i = u();
312
313
  if (i !== void 0)
313
- return a.value.get(i);
314
+ return t.value.get(i);
314
315
  };
315
316
  return {
316
- selectSearcher: r,
317
- selectRegion: l,
318
- compare: n,
319
- searcherByKey: a,
320
- allRegionsIndexes: t,
321
- getSearcher: c,
317
+ selectSearcher: a,
318
+ selectRegion: n,
319
+ compare: r,
320
+ searcherByKey: t,
321
+ allRegionsIndexes: l,
322
+ getSearcher: f,
322
323
  getRegion: () => {
323
- const i = f();
324
+ const i = c();
324
325
  if (i !== void 0)
325
- return c()?.regionByIndex?.get(i);
326
+ return f()?.regionByIndex?.get(i);
326
327
  }
327
328
  };
328
- }, Dt = /* @__PURE__ */ R({
329
+ }, uo = /* @__PURE__ */ G({
329
330
  __name: "regionSelector",
330
331
  props: /* @__PURE__ */ M({
331
332
  projectId: {},
@@ -346,164 +347,161 @@ const et = { class: "top-competitorSelector" }, tt = { class: "top-ellipsis1" },
346
347
  modelValueSingleModifiers: {}
347
348
  }),
348
349
  emits: ["update:modelValue", "update:modelValueSingle"],
349
- setup(e, { expose: a }) {
350
- const o = e, t = T(e, "modelValue"), r = T(e, "modelValueSingle"), {
351
- selectSearcher: l,
352
- selectRegion: n,
350
+ setup(e, { expose: t }) {
351
+ const o = e, l = B(e, "modelValue"), a = B(e, "modelValueSingle"), {
352
+ selectSearcher: n,
353
+ selectRegion: r,
353
354
  compare: u,
354
- searcherByKey: f,
355
- allRegionsIndexes: c,
356
- getSearcher: x,
355
+ searcherByKey: c,
356
+ allRegionsIndexes: f,
357
+ getSearcher: S,
357
358
  getRegion: i
358
- } = gt(o), m = () => {
359
+ } = yt(o), g = () => {
359
360
  const d = [];
360
- f.value.forEach((s) => {
361
- s.enabled && s.regions.forEach((g) => {
362
- g.enabled && d.push(g);
361
+ c.value.forEach((s) => {
362
+ s.enabled && s.regions.forEach((m) => {
363
+ m.enabled && d.push(m);
363
364
  });
364
- }), dt.open("regions", {
365
+ }), mt.open("regions", {
365
366
  regions: d,
366
367
  regionsIndexes: u.regionsIndexes.value,
367
368
  "@update:regionsIndexes": (s) => u.regionsIndexes.value = s
368
369
  });
369
370
  };
370
- return V([n.regionIndex, l.searcherKey, u.regionsIndexes], () => {
371
- if (l.searcherKey.value === j && u.regionsIndexes.value.length) {
372
- if (JSON.stringify(t.value) === JSON.stringify(u.regionsIndexes.value))
371
+ return P([r.regionIndex, n.searcherKey, u.regionsIndexes], () => {
372
+ if (n.searcherKey.value === O && u.regionsIndexes.value.length) {
373
+ if (JSON.stringify(l.value) === JSON.stringify(u.regionsIndexes.value))
373
374
  return;
374
- t.value = [...u.regionsIndexes.value];
375
+ l.value = [...u.regionsIndexes.value];
375
376
  } else
376
- o.onlySearcher ? (t.value = [l.searcherKey.value], l.searcherKey.value === y && !o.autoRegion && (t.value.length = 0)) : (t.value = [n.regionIndex.value], n.regionIndex.value === y && !o.autoRegion && (t.value.length = 0));
377
- !o.onlySearcher && !c.value.size && (l.searcherKey.value = y);
378
- }), r.value && V(r, () => {
379
- r.value && (t.value = [r.value]);
380
- }, { immediate: !0 }), V(t, () => {
381
- if (t.value[0] && (r.value = t.value[0]), o.onlySearcher) {
382
- if (!t.value.length || t.value.length === 1 && !f.value.has(t.value[0]) || t.value.length === 1 && t.value[0] === y && !o.autoRegion) {
383
- let d = f.value.keys().next().value;
384
- d === y && !o.autoRegion && (d = void 0, r.value = y), d !== void 0 ? t.value = [d] : t.value.length = 0;
377
+ o.onlySearcher ? (l.value = [n.searcherKey.value], n.searcherKey.value === y && !o.autoRegion && (l.value.length = 0)) : (l.value = [r.regionIndex.value], r.regionIndex.value === y && !o.autoRegion && (l.value.length = 0));
378
+ !o.onlySearcher && !f.value.size && (n.searcherKey.value = y);
379
+ }), a.value && P(a, () => {
380
+ a.value && (l.value = [a.value]);
381
+ }, { immediate: !0 }), P(l, () => {
382
+ if (l.value[0] && (a.value = l.value[0]), o.onlySearcher) {
383
+ if (!l.value.length || l.value.length === 1 && !c.value.has(l.value[0]) || l.value.length === 1 && l.value[0] === y && !o.autoRegion) {
384
+ let d = c.value.keys().next().value;
385
+ d === y && !o.autoRegion && (d = void 0, a.value = y), d !== void 0 ? l.value = [d] : l.value.length = 0;
385
386
  return;
386
387
  }
387
- if (t.value.length > 1 && JSON.stringify(t.value) !== JSON.stringify(u.regionsIndexes.value)) {
388
- t.value = [...u.regionsIndexes.value];
388
+ if (l.value.length > 1 && JSON.stringify(l.value) !== JSON.stringify(u.regionsIndexes.value)) {
389
+ l.value = [...u.regionsIndexes.value];
389
390
  return;
390
391
  }
391
392
  } else {
392
- let d = [...new Set(t.value)], s = f.value.values().next().value?.regionByIndex?.keys().next().value;
393
- if (o.forFrequency && (s = f.value.values().next().value?.regionByIndex?.values().next().value?.key), s === y && !o.autoRegion && (s = void 0, r.value = y), !d.length)
393
+ let d = [...new Set(l.value)], s = c.value.values().next().value?.regionByIndex?.keys().next().value;
394
+ if (o.forFrequency && (s = c.value.values().next().value?.regionByIndex?.values().next().value?.key), s === y && !o.autoRegion && (s = void 0, a.value = y), !d.length)
394
395
  s !== void 0 && d.push(s);
395
396
  else if (d.length === 1) {
396
- let g = c.value;
397
- o.forFrequency && (g = /* @__PURE__ */ new Set(), f.value.forEach((Z) => {
398
- Z.regionByIndex.forEach((P) => {
399
- P.index !== le && P.index !== y && g.add(P.key);
397
+ let m = f.value;
398
+ o.forFrequency && (m = /* @__PURE__ */ new Set(), c.value.forEach((ee) => {
399
+ ee.regionByIndex.forEach((U) => {
400
+ U.index !== ne && U.index !== y && m.add(U.key);
400
401
  });
401
- })), g.has(d[0]) || (d = [], s !== void 0 && d.push(s));
402
+ })), m.has(d[0]) || (d = [], s !== void 0 && d.push(s));
402
403
  } else
403
- d = d.filter((g) => c.value.has(g)), !d.length && s !== void 0 && d.push(s);
404
- if (JSON.stringify(t.value) !== JSON.stringify(d)) {
405
- t.value = d;
404
+ d = d.filter((m) => f.value.has(m)), !d.length && s !== void 0 && d.push(s);
405
+ if (JSON.stringify(l.value) !== JSON.stringify(d)) {
406
+ l.value = d;
406
407
  return;
407
408
  }
408
409
  }
409
- if (!(t.value.length === 1 && t.value[0] === (o.onlySearcher ? l.searcherKey.value : n.regionIndex.value)))
410
+ if (!(l.value.length === 1 && l.value[0] === (o.onlySearcher ? n.searcherKey.value : r.regionIndex.value)))
410
411
  if (o.onlySearcher) {
411
- if (t.value.length === 1) {
412
- l.searcherKey.value = t.value[0];
412
+ if (l.value.length === 1) {
413
+ n.searcherKey.value = l.value[0];
413
414
  return;
414
415
  }
415
- l.searcherKey.value = j;
416
+ n.searcherKey.value = O;
416
417
  return;
417
418
  } else {
418
- if (!t.value.length)
419
+ if (!l.value.length)
419
420
  return;
420
- if (t.value.length === 1 && l.searcherKey.value !== j) {
421
- n.regionIndex.value = t.value[0];
421
+ if (l.value.length === 1 && n.searcherKey.value !== O) {
422
+ r.regionIndex.value = l.value[0];
422
423
  let d;
423
- for (const s of f.value.values()) {
424
- for (const g of s.regionByIndex.values())
425
- if ((o.forFrequency ? g.key : g.index) === n.regionIndex.value) {
424
+ for (const s of c.value.values()) {
425
+ for (const m of s.regionByIndex.values())
426
+ if ((o.forFrequency ? m.key : m.index) === r.regionIndex.value) {
426
427
  d = s.key;
427
428
  break;
428
429
  }
429
430
  if (d !== void 0)
430
431
  break;
431
432
  }
432
- d !== void 0 && (l.searcherKey.value = d);
433
+ d !== void 0 && (n.searcherKey.value = d);
433
434
  } else
434
- l.searcherKey.value = j, u.regionsIndexes.value = [...t.value];
435
+ n.searcherKey.value = O, u.regionsIndexes.value = [...l.value];
435
436
  }
436
- }, { immediate: !0 }), a({
437
- getSearcher: x,
437
+ }, { immediate: !0 }), t({
438
+ getSearcher: S,
438
439
  getRegion: i
439
- }), (d, s) => (h(), A("div", {
440
- class: X({
440
+ }), (d, s) => (v(), T("div", {
441
+ class: Z({
441
442
  "top-selectorRegion": !0,
442
443
  "top-selectorRegion-onlySearcher": e.onlySearcher
443
444
  })
444
445
  }, [
445
- N(se, {
446
- options: v(l).optionBySearcherKey.value,
447
- modelValue: v(l).searcherKey.value,
448
- "onUpdate:modelValue": s[0] || (s[0] = (g) => v(l).searcherKey.value = g),
446
+ E(fe, {
447
+ options: p(n).optionBySearcherKey.value,
448
+ modelValue: p(n).searcherKey.value,
449
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => p(n).searcherKey.value = m),
449
450
  name: "searcher_key",
450
451
  addChanger: e.addChanger
451
452
  }, null, 8, ["options", "modelValue", "addChanger"]),
452
- !e.onlySearcher && v(l).searcherKey.value !== v(j) ? (h(), C(se, {
453
+ !e.onlySearcher && p(n).searcherKey.value !== p(O) ? (v(), j(fe, {
453
454
  key: 0,
454
455
  class: "top-select-region",
455
- options: v(n).optionByRegionIndex.value,
456
- modelValue: v(n).regionIndex.value,
457
- "onUpdate:modelValue": s[1] || (s[1] = (g) => v(n).regionIndex.value = g),
456
+ options: p(r).optionByRegionIndex.value,
457
+ modelValue: p(r).regionIndex.value,
458
+ "onUpdate:modelValue": s[1] || (s[1] = (m) => p(r).regionIndex.value = m),
458
459
  name: e.forFrequency ? "region_key" : "region_index",
459
460
  addChanger: e.addChanger,
460
461
  "data-top-icon": e.addRegionIcon ? "" : void 0
461
- }, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : L("", !0),
462
- e.addCompare && !e.onlySearcher && v(l).searcherKey.value === v(j) ? (h(), C(Q, {
462
+ }, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : _("", !0),
463
+ e.addCompare && !e.onlySearcher && p(n).searcherKey.value === p(O) ? (v(), j(Q, {
463
464
  key: 1,
464
465
  name: "compare",
465
- onClick: m,
466
- "data-count-compare-regions-indexes": v(u).regionsIndexes.value.length
466
+ onClick: g,
467
+ "data-count-compare-regions-indexes": p(u).regionsIndexes.value.length
467
468
  }, {
468
- default: B(() => [
469
- z(b(d.$i18n.Common.Selected_regions), 1)
469
+ default: C(() => [
470
+ N(A(d.$i18n.Common.Selected_regions), 1)
470
471
  ]),
471
472
  _: 1
472
- }, 8, ["data-count-compare-regions-indexes"])) : L("", !0)
473
+ }, 8, ["data-count-compare-regions-indexes"])) : _("", !0)
473
474
  ], 2));
474
475
  }
475
- }), O = {
476
+ }), R = {
476
477
  id: 0,
477
478
  name: "/",
478
479
  path: "/"
479
- }, ft = (e, a) => {
480
- let o = e?.root[0] ?? O;
481
- return o = { ...o }, o.name = Le(a), o;
482
480
  };
483
- function Le(e) {
484
- return e ? w()?.Common.All_folders : "/ (" + w()?.Keywords.Root_folder + ")";
481
+ function It(e) {
482
+ return e ? b()?.Common.All_folders : "/ (" + b()?.Keywords.Root_folder + ")";
485
483
  }
486
- const pe = (e, a, o = /* @__PURE__ */ new Map(), t = { id: "root" }, r = 0) => (t.childsIds = [], t.id && (t.countAllGroupsActive = t.count_groups_active), e[t.id] && e[t.id].forEach((l) => {
487
- l = { ...l }, t.childsIds.push(l.id), l.id === 0 && (l.name = Le(a));
488
- const n = r > 1 ? "-".repeat(r - 1) + " " : "";
489
- n && !l.name.startsWith(n) && (l.name = n + l.name), o.set(l.id, l), pe(e, a, o, l, r + 1), t.childsIds = t.childsIds.concat(l.childsIds), t.id && l.count_groups_active && (t.countAllGroupsActive += l.count_groups_active);
490
- }), o), mt = (e) => e.gen("/get/keywords_2/folders/", ["id", "parent_id", "name", "path"]).changeParams({ orders: ["ord_path"], limit: 100 });
491
- function ce(e, a, o) {
492
- const t = Object.keys(e), r = t.map((l) => e[l]);
493
- return V(r, (l, n, u) => {
494
- const f = {};
495
- l.forEach((c, x) => {
496
- if (!Object.is(c, n[x])) {
497
- const i = t[x];
498
- f[i] = {
499
- old: n[x],
500
- new: c
484
+ const xe = (e, t, o = /* @__PURE__ */ new Map(), l = { id: "root" }, a = 0) => (l.childsIds = [], l.id && (l.countAllGroupsActive = l.count_groups_active), e[l.id] && e[l.id].forEach((n) => {
485
+ n = { ...n }, l.childsIds.push(n.id), n.id === 0 && (n.name = It(t));
486
+ const r = a > 1 ? "-".repeat(a - 1) + " " : "";
487
+ r && !n.name.startsWith(r) && (n.name = r + n.name), o.set(n.id, n), xe(e, t, o, n, a + 1), l.childsIds = l.childsIds.concat(n.childsIds), l.id && n.count_groups_active && (l.countAllGroupsActive += n.count_groups_active);
488
+ }), o), St = (e) => e.gen("/get/keywords_2/folders/", ["id", "parent_id", "name", "path"]).changeParams({ orders: ["ord_path"], limit: 100 });
489
+ function me(e, t, o) {
490
+ const l = Object.keys(e), a = l.map((n) => e[n]);
491
+ return P(a, (n, r, u) => {
492
+ const c = {};
493
+ n.forEach((f, S) => {
494
+ if (!Object.is(f, r[S])) {
495
+ const i = l[S];
496
+ c[i] = {
497
+ old: r[S],
498
+ new: f
501
499
  };
502
500
  }
503
- }), Object.keys(f).length && a(f, u);
501
+ }), Object.keys(c).length && t(c, u);
504
502
  }, o);
505
503
  }
506
- const vt = /* @__PURE__ */ R({
504
+ const xt = /* @__PURE__ */ G({
507
505
  __name: "folders",
508
506
  props: /* @__PURE__ */ M({
509
507
  folderId: {},
@@ -517,68 +515,62 @@ const vt = /* @__PURE__ */ R({
517
515
  }, {
518
516
  folderId: { required: !0 },
519
517
  folderIdModifiers: {},
520
- folder: { default: O },
518
+ folder: { default: R },
521
519
  folderModifiers: {}
522
520
  }),
523
521
  emits: ["update:folderId", "update:folder"],
524
522
  setup(e) {
525
- const a = e, o = T(e, "folderId"), t = T(e, "folder"), r = a.client && !a.folders ? mt(a.client) : void 0, l = G(null);
526
- V(() => a.projectId, () => {
527
- r?.changeParams({
528
- project_id: a.projectId
529
- }), r?.setOptions({
530
- checkFingerprint: "TopGroupSelectorFolders:" + a.projectId
531
- }), l.value?.resetCache();
523
+ const t = e, o = B(e, "folderId"), l = B(e, "folder"), a = t.client && !t.folders ? St(t.client) : void 0, n = V(null);
524
+ P(() => t.projectId, () => {
525
+ a?.changeParams({
526
+ project_id: t.projectId
527
+ }), a?.setOptions({
528
+ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId
529
+ }), n.value?.resetCache();
532
530
  }, { immediate: !0 });
533
- const n = E(() => pe(a.folders ?? { root: [O] }, a.canSelectAll));
534
- return ce({
535
- modelFolder: t,
531
+ const r = w(() => xe(t.folders ?? { root: [R] }, t.canSelectAll));
532
+ return me({
533
+ modelFolder: l,
536
534
  modelFolderId: o
537
535
  }, async (u) => {
538
- if (o.value === t.value.id)
536
+ if (o.value === l.value.id)
539
537
  return;
540
538
  if (u.modelFolder && !u.modelFolderId) {
541
- o.value = t.value.id;
539
+ o.value = l.value.id;
542
540
  return;
543
541
  }
544
- if (u.modelFolderId) {
545
- const c = n.value.get(a.folderId);
546
- c && (t.value = c, t.value = c);
547
- }
548
- let f = n.value.get(a.folderId);
549
- f || (f = O), t.value = f, o.value = f.id;
550
- }, { immediate: !0 }), V(t, () => {
551
- o.value = t.value.id;
552
- }), (u, f) => (h(), C(we, {
542
+ let c = r.value.get(t.folderId);
543
+ c || (c = R), l.value = c, o.value = c.id;
544
+ }, { immediate: !0 }), (u, c) => (v(), j(Ie, {
553
545
  class: "top-groupSelector_folder",
554
- modelValue: t.value,
555
- "onUpdate:modelValue": f[0] || (f[0] = (c) => t.value = c),
556
- items: e.folders ? [...n.value.values()] : void 0,
546
+ modelValue: l.value,
547
+ "onUpdate:modelValue": c[0] || (c[0] = (f) => l.value = f),
548
+ items: e.folders ? [...r.value.values()] : void 0,
557
549
  "search-type": "inline",
558
550
  icon: e.addIcon ? "" : void 0,
559
- api: e.folders ? void 0 : v(r),
560
- apiSetSearchParams: (...c) => v(Ee)(...c, "name"),
551
+ api: e.folders ? void 0 : p(a),
552
+ apiSetSearchParams: (...f) => p(Se)(...f, "name"),
561
553
  addChanger: e.addChanger,
562
554
  useCache: ""
563
555
  }, null, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "addChanger"]));
564
556
  }
565
- }), ge = {
557
+ }), re = {
566
558
  id: -1,
567
559
  name: "--",
568
- folder_id: O.id,
569
- folder_path: O.path
570
- }, ne = {
571
- id: $e,
560
+ folder_id: R.id,
561
+ folder_path: R.path
562
+ }, ie = {
563
+ id: Ke,
572
564
  name: "All groups",
573
- folder_id: O.id,
574
- folder_path: O.path
575
- }, W = () => (ne.name = w()?.Common.All_groups, ne), je = () => (ne.name = w()?.Keywords.Choose_group, ne), pt = (e, a, o) => (e = [...e], a !== void 0 && (e = e.filter((t) => t.on == Number(a))), o && o.id && o.childsIds && (e = e.filter((t) => t.folder_id === o.id || o.childsIds.includes(t.folder_id))), e), Ce = (e) => e.gen("/get/keywords_2/groups/", ["id", "name", "folder_id", "folder_path"]).changeParams({ folder_id_depth: !0, limit: 100 }), yt = (e) => e.gen("/add/keywords_2/groups/"), ht = { class: "top-groupSelector_groupItem" }, It = {
565
+ folder_id: R.id,
566
+ folder_path: R.path
567
+ }, H = () => (ie.name = b()?.Common.All_groups, ie), Ne = () => (ie.name = b()?.Keywords.Choose_group, ie), kt = (e, t, o) => (e = [...e], t !== void 0 && (e = e.filter((l) => l.on == Number(t))), o && o.id && o.childsIds && (e = e.filter((l) => l.folder_id === o.id || o.childsIds.includes(l.folder_id))), e), $e = (e) => e.gen("/get/keywords_2/groups/", ["id", "name", "folder_id", "folder_path"]).changeParams({ folder_id_depth: !0, limit: 100 }), Ct = (e) => e.gen("/add/keywords_2/groups/"), jt = { class: "top-groupSelector_groupItem" }, Tt = {
576
568
  key: 0,
577
569
  class: "top-comment"
578
- }, St = {
570
+ }, At = {
579
571
  key: 1,
580
572
  class: "top-groupSelector_groupItemFolderPath"
581
- }, xt = /* @__PURE__ */ R({
573
+ }, Bt = /* @__PURE__ */ G({
582
574
  __name: "groups",
583
575
  props: /* @__PURE__ */ M({
584
576
  groupId: {},
@@ -591,6 +583,7 @@ const vt = /* @__PURE__ */ R({
591
583
  canSelectAll: { type: [Boolean, String] },
592
584
  autoselect: { default: "first" },
593
585
  addChanger: { type: Boolean, default: !0 },
586
+ showPath: { type: Boolean },
594
587
  addIcon: { type: Boolean, default: !0 },
595
588
  client: {}
596
589
  }, {
@@ -600,116 +593,118 @@ const vt = /* @__PURE__ */ R({
600
593
  groupModifiers: {}
601
594
  }),
602
595
  emits: /* @__PURE__ */ M(["addGroup"], ["update:groupId", "update:group"]),
603
- setup(e, { emit: a }) {
604
- const o = e, t = a, r = T(e, "groupId"), l = T(e, "group"), n = o.client && !o.groups ? Ce(o.client) : void 0, u = o.client ? yt(o.client) : void 0, f = G(null), c = G(void 0), x = Se("folder_id", "EQUALS", [o.folder?.id ?? 0]);
605
- n?.changeParams({
596
+ setup(e, { emit: t }) {
597
+ const o = e, l = t, a = B(e, "groupId"), n = B(e, "group"), r = o.client && !o.groups ? $e(o.client) : void 0, u = o.client ? Ct(o.client) : void 0, c = V(null), f = V(void 0), S = Te("folder_id", "EQUALS", [o.folder?.id ?? 0]);
598
+ r?.changeParams({
606
599
  project_id: o.projectId,
600
+ folder_id_depth: !0,
607
601
  filters: [
608
- x
602
+ S
609
603
  ]
610
- }), o.on !== void 0 && n?.params.filters?.push(Se("on", "EQUALS", [o.on]));
604
+ }), o.on !== void 0 && r?.params.filters?.push(Te("on", "EQUALS", [Number(o.on)]));
611
605
  const i = (d) => {
612
- l.value = d, r.value = d.id;
606
+ n.value = d, a.value = d.id;
613
607
  };
614
- ce({
608
+ me({
615
609
  projectId: () => o.projectId,
616
610
  folderId: () => o.folder?.id,
617
611
  canSelectAll: () => o.canSelectAll
618
612
  }, (d) => {
619
- if (d.projectId && (n?.changeParams({
613
+ if (d.projectId && (r?.changeParams({
620
614
  project_id: o.projectId
621
- }), n?.setOptions({
615
+ }), r?.setOptions({
622
616
  checkFingerprint: "TopGroupSelectorGroups:" + o.projectId
623
- })), d.folderId && (x.values = [
617
+ })), d.folderId && (S.values = [
624
618
  o.folder?.id ?? 0
625
- ], o.groups && (c.value = pt(o.groups, o.on, o.folder))), f.value?.resetCache(), (d.folderId?.old !== void 0 || d.canSelectAll?.old !== void 0) && r.value !== de) {
619
+ ], o.groups && (f.value = kt(o.groups, o.on, o.folder))), c.value?.resetCache(), (d.folderId?.old !== void 0 || d.canSelectAll?.old !== void 0) && a.value !== le) {
626
620
  let s;
627
- o.autoselect === "first" && (s = c.value?.[0], o.canSelectAll && (s = be(W()))), (o.autoselect === "placeholder" || !s) && (s = je()), i(s);
621
+ o.autoselect === "first" && (s = f.value?.[0], o.canSelectAll && (s = _e(H()))), (o.autoselect === "placeholder" || !s) && (s = Ne()), i(s);
628
622
  }
629
- }, { immediate: !0 }), ce({
630
- modelGroup: l,
631
- modelGroupId: r
623
+ }, { immediate: !0 }), me({
624
+ modelGroup: n,
625
+ modelGroupId: a
632
626
  }, async (d) => {
633
- if (r.value !== l.value.id) {
627
+ if (a.value !== n.value.id) {
634
628
  if (d.modelGroup && !d.modelGroupId) {
635
- r.value = l.value.id;
629
+ a.value = n.value.id;
636
630
  return;
637
631
  }
638
- if (!(o.canAdd && r.value === de)) {
632
+ if (!(o.canAdd && a.value === le)) {
639
633
  if (o.groups) {
640
- let s = c.value?.find((g) => g.id === r.value);
641
- if (!s && o.canSelectAll && (s = W()), s)
634
+ let s = f.value?.find((m) => m.id === a.value);
635
+ if (!s && o.canSelectAll && (s = H()), s)
642
636
  i(s);
643
637
  else {
644
- const g = c.value?.[0];
645
- g && !r.value ? i(g) : i(ge);
638
+ const m = f.value?.[0];
639
+ m && !a.value ? i(m) : i(re);
646
640
  }
647
641
  }
648
- if (o.client && !o.groups && (r.value || r.value === $e && !o.canSelectAll)) {
649
- const s = Ce(o.client).changeParams({
642
+ if (o.client && !o.groups && (a.value || a.value === Ke && !o.canSelectAll)) {
643
+ const s = $e(o.client).changeParams({
650
644
  project_id: o.projectId,
651
- id: r.value,
645
+ id: a.value,
652
646
  filters: [
653
- x
647
+ S
654
648
  ]
655
649
  });
656
650
  s?.setOptions({
657
651
  checkFingerprint: "TopGroupSelectorFindGroup:" + o.projectId
658
652
  });
659
- const g = await s.call();
660
- if (!g.errors?.length && !g.result) return;
661
- !g.errors && g.result[0] ? i(g.result[0]) : i(ge);
653
+ const m = await s.call();
654
+ if (!m.errors?.length && !m.result) return;
655
+ !m.errors && m.result[0] ? i(m.result[0]) : i(re);
662
656
  }
663
657
  }
664
658
  }
665
659
  }, { immediate: !0 });
666
- const m = async (d) => {
660
+ const g = async (d) => {
667
661
  if (o.canAdd !== "api" || !u) return;
668
- const s = l.value, g = await u.changeParams({
662
+ const s = n.value, m = await u.changeParams({
669
663
  project_id: o.projectId,
670
664
  names: [d.name],
671
- to_id: o.folder?.id ?? O.id,
665
+ to_id: o.folder?.id ?? R.id,
672
666
  to_type: "in_folder_last"
673
667
  }).call();
674
- g.result ? (i(g.result), t("addGroup", g.result)) : i(s), f.value?.resetCache(!0);
668
+ m.result ? (i(m.result), l("addGroup", m.result)) : i(s), c.value?.resetCache(!0);
675
669
  };
676
- return (d, s) => (h(), C(we, {
670
+ return (d, s) => (v(), j(Ie, {
677
671
  ref_key: "refSelector",
678
- ref: f,
672
+ ref: c,
679
673
  class: "top-groupSelector_group",
680
- modelValue: l.value,
681
- "onUpdate:modelValue": s[0] || (s[0] = (g) => l.value = g),
682
- items: c.value ?? e.groups,
674
+ modelValue: n.value,
675
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => n.value = m),
676
+ items: f.value ?? e.groups,
683
677
  searchType: "inline",
684
678
  icon: e.addIcon ? "" : void 0,
685
- api: e.groups ? void 0 : v(n),
686
- apiSetSearchParams: (...g) => v(Ee)(...g, "name"),
679
+ api: e.groups ? void 0 : p(r),
680
+ apiSetSearchParams: (...m) => p(Se)(...m, "name"),
687
681
  appendSearchToResult: !!e.canAdd,
688
- useAllItem: e.canSelectAll ? v(W)().name : !1,
682
+ useAllItem: e.canSelectAll ? p(H)().name : !1,
689
683
  addChanger: e.addChanger,
690
684
  useCache: "",
691
- onAppendItem: m
685
+ onAppendItem: g
692
686
  }, {
693
- item: B(({ item: g }) => [
694
- oe("div", ht, [
695
- g.id === v(de) ? (h(), A("div", It, b(d.$i18n.Common.Add) + ": ", 1)) : L("", !0),
696
- oe("span", null, b(g.name), 1),
697
- g.folder_path ? (h(), A("span", St, b(g.folder_path), 1)) : L("", !0)
687
+ item: C(({ item: m }) => [
688
+ L("div", jt, [
689
+ m.id === p(le) ? (v(), T("div", Tt, A(d.$i18n.Common.Add) + ": ", 1)) : _("", !0),
690
+ L("span", null, A(m.name), 1),
691
+ m.folder_path && e.showPath ? (v(), T("span", At, A(m.folder_path), 1)) : _("", !0)
698
692
  ])
699
693
  ]),
700
694
  _: 1
701
695
  }, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "appendSearchToResult", "useAllItem", "addChanger"]));
702
696
  }
703
- }), kt = { class: "top-groupSelector" }, Ft = /* @__PURE__ */ R({
697
+ }), bt = { class: "top-groupSelector" }, co = /* @__PURE__ */ G({
704
698
  __name: "groupSelector",
705
699
  props: /* @__PURE__ */ M({
706
700
  folderId: {},
701
+ folder: {},
707
702
  groupId: {},
708
703
  group: {},
709
704
  projectId: {},
710
705
  folders: {},
711
706
  groups: {},
712
- on: { type: Boolean },
707
+ on: { type: Boolean, default: void 0 },
713
708
  canSelectAllGroups: { type: Boolean },
714
709
  canAddGroup: {},
715
710
  autoselect: { default: "first" },
@@ -721,110 +716,393 @@ const vt = /* @__PURE__ */ R({
721
716
  }, {
722
717
  folderId: { required: !0 },
723
718
  folderIdModifiers: {},
719
+ folder: {},
720
+ folderModifiers: {},
724
721
  groupId: { required: !0 },
725
722
  groupIdModifiers: {},
726
- group: {},
723
+ group: { default: re },
727
724
  groupModifiers: {}
728
725
  }),
729
- emits: /* @__PURE__ */ M(["update:groups"], ["update:folderId", "update:groupId", "update:group"]),
730
- setup(e, { emit: a }) {
731
- const o = e, t = T(e, "folderId"), r = T(e, "groupId"), l = T(e, "group"), n = a, u = G(ft(o.folders, o.canSelectAllGroups)), f = pe(o.folders ?? { root: [O] }, o.canSelectAllGroups);
732
- u.value = f.get(t.value);
733
- let c = o.groups?.find((i) => i.id === r.value);
734
- r.value || (c = o.groups?.[0]), o.canSelectAllGroups && !c && (c = W()), o.canSelectAllGroups && !c && (c = W()), (o.autoselect === "placeholder" || !c) && (c = je()), c ??= ge, l.value ??= c;
735
- const x = (i) => {
736
- let m;
737
- o.groups && i && (m = [...o.groups, i]), n("update:groups", m);
726
+ emits: /* @__PURE__ */ M(["update:groups"], ["update:folderId", "update:folder", "update:groupId", "update:group"]),
727
+ setup(e, { emit: t }) {
728
+ const o = e, l = B(e, "folderId"), a = B(e, "folder"), n = B(e, "groupId"), r = B(e, "group"), u = t, c = xe(o.folders ?? { root: [R] }, o.canSelectAllGroups);
729
+ a.value = c.get(l.value);
730
+ let f = o.groups?.find((i) => i.id === n.value);
731
+ n.value || (f = o.groups?.[0]), o.canSelectAllGroups && !f && (f = H()), o.canSelectAllGroups && !f && (f = H()), (o.autoselect === "placeholder" || !f) && (f = Ne()), f ??= re, r.value = f;
732
+ const S = (i) => {
733
+ let g;
734
+ o.groups && i && (g = [...o.groups, i]), u("update:groups", g);
738
735
  };
739
- return (i, m) => (h(), A("div", kt, [
740
- e.showFolders ? (h(), C(vt, {
736
+ return (i, g) => (v(), T("div", bt, [
737
+ e.showFolders ? (v(), j(xt, {
741
738
  key: 0,
742
- folderId: t.value,
743
- "onUpdate:folderId": m[0] || (m[0] = (d) => t.value = d),
744
- folder: u.value,
745
- "onUpdate:folder": m[1] || (m[1] = (d) => u.value = d),
739
+ folderId: l.value,
740
+ "onUpdate:folderId": g[0] || (g[0] = (d) => l.value = d),
741
+ folder: a.value,
742
+ "onUpdate:folder": g[1] || (g[1] = (d) => a.value = d),
746
743
  projectId: e.projectId,
747
744
  folders: e.folders,
748
745
  canSelectAll: e.canSelectAllGroups,
749
746
  addChanger: e.addChanger,
750
747
  addIcon: e.addIcon,
751
748
  client: e.client
752
- }, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client"])) : L("", !0),
753
- e.showGroups ? (h(), C(xt, {
749
+ }, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client"])) : _("", !0),
750
+ e.showGroups ? (v(), j(Bt, {
754
751
  key: 1,
755
- groupId: r.value,
756
- "onUpdate:groupId": m[2] || (m[2] = (d) => r.value = d),
757
- group: l.value,
758
- "onUpdate:group": m[3] || (m[3] = (d) => l.value = d),
752
+ groupId: n.value,
753
+ "onUpdate:groupId": g[2] || (g[2] = (d) => n.value = d),
754
+ group: r.value,
755
+ "onUpdate:group": g[3] || (g[3] = (d) => r.value = d),
759
756
  projectId: e.projectId,
760
- folder: u.value,
757
+ folder: a.value,
761
758
  groups: e.groups,
762
759
  on: e.on,
763
760
  canAdd: e.canAddGroup,
764
761
  canSelectAll: e.canSelectAllGroups,
765
762
  autoselect: e.autoselect,
766
763
  addChanger: e.addChanger,
764
+ showPath: e.showFolders && !!e.folders?.[0],
767
765
  addIcon: e.addIcon,
768
766
  client: e.client,
769
- onAddGroup: x
770
- }, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "addIcon", "client"])) : L("", !0)
767
+ onAddGroup: S
768
+ }, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "showPath", "addIcon", "client"])) : _("", !0)
771
769
  ]));
772
770
  }
773
- }), Be = (e) => "-" + e, H = (e) => e[0] === "-" ? e.substring(1) : e, re = (e, a) => {
774
- e = H(e);
775
- const o = a.find((t) => t.id === e);
771
+ }), $t = { class: "top-projectSelectorSubmenu_item" }, wt = ["href", "title", "data-top-icon", "data-right"], Mt = { class: "top-projectSelectorSubmenu_item" }, Pt = ["href"], Vt = /* @__PURE__ */ G({
772
+ __name: "submenu",
773
+ props: {
774
+ id: {},
775
+ right: {},
776
+ url: {}
777
+ },
778
+ setup(e) {
779
+ const t = e, o = b();
780
+ let l = [
781
+ {
782
+ href: `/project/keywords/${t.id}/`,
783
+ title: o.Common.Menu_phrases,
784
+ icon: "",
785
+ right: "2"
786
+ },
787
+ {
788
+ href: `/project/dynamics/${t.id}/`,
789
+ title: o.Common.Menu_dynamics,
790
+ icon: "",
791
+ right: "1"
792
+ },
793
+ {
794
+ href: `/project/snapshots/${t.id}/`,
795
+ title: o.Common.Menu_snapshots,
796
+ icon: "",
797
+ right: "1"
798
+ },
799
+ {
800
+ href: `/project/competitors/${t.id}/`,
801
+ title: o.Common.Menu_competitors,
802
+ icon: "",
803
+ right: "1"
804
+ },
805
+ {
806
+ href: `/project/analytics/${t.id}/`,
807
+ title: o.Common.Menu_analytics,
808
+ icon: "",
809
+ right: "5"
810
+ },
811
+ {
812
+ href: `/project/broker/${t.id}/`,
813
+ title: o.Common.Menu_broker,
814
+ icon: "",
815
+ right: "6"
816
+ },
817
+ {
818
+ href: `/project/audit/${t.id}/sitemap/`,
819
+ title: o.Audit.Sitemap_gen,
820
+ icon: "",
821
+ right: "8"
822
+ },
823
+ {
824
+ href: `/project/audit/${t.id}/audit/`,
825
+ title: o.Common.Menu_audit,
826
+ icon: "",
827
+ right: "8"
828
+ },
829
+ {
830
+ href: `//project/audit/${t.id}/indexing/`,
831
+ title: o.Audit.Indexing,
832
+ icon: "",
833
+ right: "8"
834
+ },
835
+ {
836
+ href: `/project/audit/${t.id}/watcher/`,
837
+ title: o.Audit.Watcher,
838
+ icon: "",
839
+ right: "9"
840
+ },
841
+ {
842
+ href: `/project/settings/${t.id}/`,
843
+ title: o.Common.Menu_settings,
844
+ icon: "",
845
+ right: "2"
846
+ }
847
+ ];
848
+ const a = w(() => t.right.includes("0") ? l.filter((n) => t.right[n.right] === "1") : l);
849
+ return (n, r) => {
850
+ const u = Ee("TopButton");
851
+ return v(), j(p(he), {
852
+ class: "top-projectSelectorSubmenu",
853
+ notch: !1,
854
+ pos: "2"
855
+ }, {
856
+ opener: C(() => [
857
+ E(u, {
858
+ class: "top-projectSelectorSubmenu_opener",
859
+ "data-top-icon": "",
860
+ color: "theme"
861
+ })
862
+ ]),
863
+ contentList: C(() => [
864
+ (v(!0), T(q, null, se(a.value, (c) => (v(), T("li", $t, [
865
+ L("a", {
866
+ href: c.href,
867
+ title: c.title,
868
+ "data-top-icon": c.icon,
869
+ "data-right": c.right
870
+ }, null, 8, wt)
871
+ ]))), 256)),
872
+ L("li", Mt, [
873
+ L("a", {
874
+ href: e.url,
875
+ "data-top-icon": "",
876
+ target: "_blank"
877
+ }, null, 8, Pt)
878
+ ])
879
+ ]),
880
+ _: 1
881
+ });
882
+ };
883
+ }
884
+ }), ge = (e) => ({
885
+ id: null,
886
+ name: e,
887
+ listItemProps: {
888
+ type: "title"
889
+ }
890
+ }), _t = (e) => {
891
+ const t = b();
892
+ return [
893
+ { filter: (l) => l.right.startsWith("1") && l.on > 0, title: ge(t.Projects.Scheduled_update) },
894
+ { filter: (l) => l.right.startsWith("1") && l.on === 0, title: ge(t.Projects.Manual_update) },
895
+ { filter: (l) => l.right.startsWith("0") && l.on >= 0, title: ge(t.Projects.Guest_projects) }
896
+ ].flatMap(({ filter: l, title: a }) => {
897
+ const n = e.filter(l);
898
+ return n.length ? [a, ...n] : [];
899
+ });
900
+ }, Et = (e) => e.map((t) => ({
901
+ ...t,
902
+ listItemProps: {
903
+ class: "top-projectSelector_item",
904
+ href: qe(Number(t.id)),
905
+ title: t.name
906
+ }
907
+ })), pe = (e, t) => {
908
+ if (!e) return;
909
+ t && (e = e.filter((l) => l.id !== t));
910
+ const o = Et(e);
911
+ return _t(o);
912
+ }, Gt = (e) => {
913
+ if (!e) return "";
914
+ let t = e;
915
+ return t = t.replace(/historyView=[^&]*/, ""), 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(/%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:\{[^\}]*\},/, "")), t;
916
+ }, qe = (e) => {
917
+ const t = location.pathname.split("/");
918
+ let o = "project/dynamics/", l = "";
919
+ t[1] == "project" && (o = t[1] + "/" + t[2] + "/"), ["watcher", "indexing", "sitemap", "audit", "direct", "adwords"].includes(t[4]) && (l = t[4] + "/");
920
+ let a = "/" + o + e + "/" + l;
921
+ const n = Gt(location.hash);
922
+ return a += n, a;
923
+ }, we = (e) => {
924
+ let t = e.startsWith("http") ? e : "http://" + e;
925
+ return t = t.replace(/"/g, "%22"), t;
926
+ }, Kt = (e, t) => {
927
+ const o = e.gen("/get/projects_2/projects/", ["id", "user_id", "name", "url", "on", "right"]);
928
+ return o.options.onApiLoaded = (l, a, n) => {
929
+ l.result = pe(l.result, t), n?.(l, a);
930
+ }, o;
931
+ }, Lt = (e) => e.gen("/add/projects_2/projects/"), Ot = { class: "top-projectSelector_itemText" }, Rt = { class: "top-projectSelector_itemName" }, Nt = { class: "top-projectSelector_itemId" }, qt = { key: 1 }, Dt = {
932
+ key: 0,
933
+ class: "top-comment"
934
+ }, go = /* @__PURE__ */ G({
935
+ __name: "projectSelector",
936
+ props: /* @__PURE__ */ M({
937
+ project: {},
938
+ projects: {},
939
+ userId: { default: window.mo?.user?.id },
940
+ icon: {},
941
+ modificator: { default: "projectSelector" },
942
+ excludeProjectId: {},
943
+ placeholder: {},
944
+ openerText: {},
945
+ buttonProps: {},
946
+ openerShortcut: {},
947
+ client: {}
948
+ }, {
949
+ project: {
950
+ default: { id: le, name: "" }
951
+ },
952
+ projectModifiers: {}
953
+ }),
954
+ emits: ["update:project"],
955
+ setup(e) {
956
+ const t = b(), o = e, l = w(() => o.placeholder ?? t.Projects.Select_project), a = w(() => o.openerText ?? t.Common.Projects), n = B(e, "project");
957
+ n.value.name || (n.value.name = a.value);
958
+ const r = o.client ? Kt(o.client, o.excludeProjectId) : void 0, u = o.client ? Lt(o.client) : void 0, c = V(pe(o.projects, o.excludeProjectId)), f = V(null);
959
+ P([() => o.projects, () => o.excludeProjectId], () => {
960
+ c.value = pe(o.projects, o.excludeProjectId);
961
+ });
962
+ const S = async (i) => {
963
+ if (!u) return;
964
+ const g = await u.changeParams({
965
+ url: i.name,
966
+ name: i.name
967
+ }).call();
968
+ if (!g.errors)
969
+ if (o.projects) {
970
+ const d = {
971
+ id: Number(g.result),
972
+ url: i.name,
973
+ name: i.name,
974
+ user_id: o.userId,
975
+ on: 0,
976
+ right: "11111111111111111111",
977
+ listItemProps: {
978
+ class: "top-projectSelector_item",
979
+ href: qe(Number(g.result))
980
+ }
981
+ };
982
+ c.value?.unshift(d);
983
+ } else
984
+ f.value?.resetCache(!0);
985
+ };
986
+ return Ue(() => {
987
+ n.value.name || (n.value.name = a.value);
988
+ }), (i, g) => {
989
+ const d = Ee("TopButton");
990
+ return v(), j(Ie, {
991
+ ref_key: "refSelector",
992
+ ref: f,
993
+ class: "top-projectSelector",
994
+ modelValue: n.value,
995
+ "onUpdate:modelValue": g[1] || (g[1] = (s) => n.value = s),
996
+ items: c.value,
997
+ title: i.$i18n.Projects.Search_projects,
998
+ icon: e.icon,
999
+ modificator: e.modificator,
1000
+ placeholder: l.value,
1001
+ api: e.projects ? void 0 : p(r),
1002
+ apiSetSearchParams: e.projects ? void 0 : (...s) => p(Se)(...s, "name"),
1003
+ useCache: "",
1004
+ appendSearchToResult: "",
1005
+ appendSearchToResultCond: p(Ae),
1006
+ buttonProps: e.buttonProps,
1007
+ openerShortcut: e.openerShortcut,
1008
+ onAppendItem: S
1009
+ }, {
1010
+ widgetAction: C(() => [
1011
+ i.$core.state.isMobile ? _("", !0) : (v(), j(d, {
1012
+ key: 0,
1013
+ class: "top-projectSelector_cancel closer",
1014
+ color: "theme"
1015
+ }, {
1016
+ default: C(() => [
1017
+ N(A(i.$i18n.Common.Cancel), 1)
1018
+ ]),
1019
+ _: 1
1020
+ }))
1021
+ ]),
1022
+ item: C(({ item: s }) => [
1023
+ s.id ? (v(), T(q, { key: 0 }, [
1024
+ L("div", Ot, [
1025
+ L("span", Rt, A(s.name), 1),
1026
+ L("span", Nt, " id " + A(s.id), 1)
1027
+ ]),
1028
+ E(d, {
1029
+ class: "top-projectSelector_itemLink",
1030
+ href: p(we)(s.url),
1031
+ "data-top-icon": "",
1032
+ color: "theme",
1033
+ target: "_blank",
1034
+ onClick: g[0] || (g[0] = D(() => {
1035
+ }, ["stop"]))
1036
+ }, null, 8, ["href"]),
1037
+ E(Vt, {
1038
+ id: s.id,
1039
+ right: s.right ?? void 0,
1040
+ url: p(we)(s.url)
1041
+ }, null, 8, ["id", "right", "url"])
1042
+ ], 64)) : (v(), T("div", qt, [
1043
+ p(Ae)(s.name) ? (v(), T("div", Dt, A(i.$i18n.Projects.Add_project) + ": ", 1)) : _("", !0),
1044
+ N(" " + A(s.name), 1)
1045
+ ]))
1046
+ ]),
1047
+ _: 1
1048
+ }, 8, ["modelValue", "items", "title", "icon", "modificator", "placeholder", "api", "apiSetSearchParams", "appendSearchToResultCond", "buttonProps", "openerShortcut"]);
1049
+ };
1050
+ }
1051
+ }), Me = (e) => "-" + e, X = (e) => e[0] === "-" ? e.substring(1) : e, de = (e, t) => {
1052
+ e = X(e);
1053
+ const o = t.find((l) => l.id === e);
776
1054
  if (o)
777
1055
  return o;
778
- }, qt = (e, a, o) => {
779
- a || (a = { id: e.id }), a.id = e.id, a.pos ??= "3", a.notch ??= !0, a.posBy ??= "fixed";
780
- const t = Ze.genElPopupOpener("div", a);
781
- return t.classList.add("top-tagSelector"), e.useTopButton && t.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || t.classList.add("top-tagSelector-custom"), e.mode === "filter" && t.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && t.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && t.classList.add("top-tagSelector-setter_several"), t.onclick = (r) => {
782
- r.preventDefault(), r.stopPropagation(), t.onclick = null;
783
- const l = G(e.modelValue), n = {
784
- model: l,
1056
+ }, fo = (e, t, o) => {
1057
+ t || (t = { id: e.id }), t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
1058
+ const l = at.genElPopupOpener("div", t);
1059
+ return l.classList.add("top-tagSelector"), e.useTopButton && l.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || l.classList.add("top-tagSelector-custom"), e.mode === "filter" && l.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && l.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && l.classList.add("top-tagSelector-setter_several"), l.onclick = (a) => {
1060
+ a.preventDefault(), a.stopPropagation(), l.onclick = null;
1061
+ const n = V(e.modelValue), r = {
1062
+ model: n,
785
1063
  mode: e.mode,
786
1064
  targetId: e.targetId,
787
1065
  filters: e.filters,
788
1066
  payload: e.payload
789
1067
  };
790
- J(t, "topTagSelectorTarget", n), delete t.dataset.topPopupDisabled, he(e.modelValue) || V(l, () => {
791
- e.modelValue = l.value, te(t, e, o);
792
- }), t.click();
793
- }, he(e.modelValue) ? V(e.modelValue, () => te(t, e, o)) : J(t, "topTagSelectorRender", (r) => {
794
- e.modelValue = r;
795
- const l = J(t, "topTagSelectorTarget");
796
- l && (l.model.value = r), te(t, e, o);
797
- }), te(t, e, o), t;
798
- }, Ut = (e, a) => {
799
- J(e, "topTagSelectorRender")?.(a);
800
- }, te = (e, a, o) => {
801
- const t = v(a.modelValue);
802
- if (e.classList.toggle("top-tagSelector-selectedOne", !t.length || t.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", t.length > 5), a.mode === "setter" && a.filters) {
1068
+ Y(l, "topTagSelectorTarget", r), delete l.dataset.topPopupDisabled, Ce(e.modelValue) || P(n, () => {
1069
+ e.modelValue = n.value, oe(l, e, o);
1070
+ }), l.click();
1071
+ }, Ce(e.modelValue) ? P(e.modelValue, () => oe(l, e, o)) : Y(l, "topTagSelectorRender", (a) => {
1072
+ e.modelValue = a;
1073
+ const n = Y(l, "topTagSelectorTarget");
1074
+ n && (n.model.value = a), oe(l, e, o);
1075
+ }), oe(l, e, o), l;
1076
+ }, mo = (e, t) => {
1077
+ Y(e, "topTagSelectorRender")?.(t);
1078
+ }, oe = (e, t, o) => {
1079
+ const l = p(t.modelValue);
1080
+ if (e.classList.toggle("top-tagSelector-selectedOne", !l.length || l.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", l.length > 5), t.mode === "setter" && t.filters) {
803
1081
  e.innerHTML = `<div>${o}</div>`;
804
1082
  return;
805
1083
  }
806
- if (e.innerHTML = "", !t.length && a.mode === "filter") {
807
- const r = Te({
1084
+ if (e.innerHTML = "", !l.length && t.mode === "filter") {
1085
+ const a = Pe({
808
1086
  id: "all",
809
1087
  colorId: "",
810
- name: w().Common?.All_tags ?? "",
1088
+ name: b().Common?.All_tags ?? "",
811
1089
  state: ""
812
1090
  });
813
- e.append(r);
1091
+ e.append(a);
814
1092
  }
815
- t.forEach((r) => {
816
- const l = Te({
817
- id: H(r),
818
- colorId: re(r, a.tags)?.color_id ?? "",
819
- name: re(r, a.tags)?.name ?? "",
820
- state: H(r) === r ? "selected" : "excluded"
1093
+ l.forEach((a) => {
1094
+ const n = Pe({
1095
+ id: X(a),
1096
+ colorId: de(a, t.tags)?.color_id ?? "",
1097
+ name: de(a, t.tags)?.name ?? "",
1098
+ state: X(a) === a ? "selected" : "excluded"
821
1099
  });
822
- e.append(l);
1100
+ e.append(n);
823
1101
  });
824
- }, Te = (e) => {
825
- const a = document.createElement("div");
826
- return a.classList.add("top-tagSelector_tagIcon"), a.classList.toggle("top-tagSelector-active", !!e.state), a.classList.toggle("top-tagSelector-excluded", e.state === "excluded"), a.dataset.tag_id = e.id, a.dataset.tag_color_id = e.colorId, a.title = e.name, a;
827
- }, Ct = [
1102
+ }, Pe = (e) => {
1103
+ const t = document.createElement("div");
1104
+ 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;
1105
+ }, Ut = [
828
1106
  {
829
1107
  id: "1",
830
1108
  name: "Without Tag",
@@ -875,7 +1153,7 @@ const vt = /* @__PURE__ */ R({
875
1153
  name: "Turquoise",
876
1154
  color_id: "10"
877
1155
  }
878
- ], Bt = ["data-tag_id", "data-tag_color_id", "title"], fe = /* @__PURE__ */ R({
1156
+ ], Ft = ["data-tag_id", "data-tag_color_id", "title"], ve = /* @__PURE__ */ G({
879
1157
  __name: "tagIcon",
880
1158
  props: {
881
1159
  id: {},
@@ -884,8 +1162,8 @@ const vt = /* @__PURE__ */ R({
884
1162
  state: {}
885
1163
  },
886
1164
  setup(e) {
887
- return (a, o) => (h(), A("div", {
888
- class: X({
1165
+ return (t, o) => (v(), T("div", {
1166
+ class: Z({
889
1167
  "top-tagSelector_tagIcon": !0,
890
1168
  "top-tagSelector-active": !!e.state,
891
1169
  "top-tagSelector-excluded": e.state === "excluded"
@@ -893,9 +1171,9 @@ const vt = /* @__PURE__ */ R({
893
1171
  "data-tag_id": e.id,
894
1172
  "data-tag_color_id": e.colorId,
895
1173
  title: e.name
896
- }, null, 10, Bt));
1174
+ }, null, 10, Ft));
897
1175
  }
898
- }), Tt = ["contenteditable", "onKeydown"], Ae = /* @__PURE__ */ R({
1176
+ }), Wt = ["contenteditable", "onKeydown"], Ve = /* @__PURE__ */ G({
899
1177
  __name: "tagPopupListItem",
900
1178
  props: /* @__PURE__ */ M({
901
1179
  editable: { type: Boolean },
@@ -912,25 +1190,25 @@ const vt = /* @__PURE__ */ R({
912
1190
  nameModifiers: {}
913
1191
  }),
914
1192
  emits: /* @__PURE__ */ M(["update:name", "unselect", "exclude", "select"], ["update:name"]),
915
- setup(e, { emit: a }) {
916
- const o = e, t = a, r = T(e, "name"), l = G(null), n = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
1193
+ setup(e, { emit: t }) {
1194
+ const o = e, l = t, a = B(e, "name"), n = V(null), r = w(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
917
1195
  contenteditable: u.value,
918
- onpaste: (m) => m.preventDefault()
919
- } : {}), u = G(!1), f = async () => {
920
- u.value = !0, await Ne(), l.value?.focus();
921
- }, c = () => {
922
- const m = l.value?.innerText;
923
- if (!m) return x();
924
- l.value && (l.value.innerText = m), u.value = !1, t("update:name", m);
925
- }, x = async () => {
926
- l.value && (l.value.innerText = o.name), u.value = !1;
927
- }, i = (m) => {
1196
+ onpaste: (g) => g.preventDefault()
1197
+ } : {}), u = V(!1), c = async () => {
1198
+ u.value = !0, await Fe(), n.value?.focus();
1199
+ }, f = () => {
1200
+ const g = n.value?.innerText;
1201
+ if (!g) return S();
1202
+ n.value && (n.value.innerText = g), u.value = !1, l("update:name", g);
1203
+ }, S = async () => {
1204
+ n.value && (n.value.innerText = o.name), u.value = !1;
1205
+ }, i = (g) => {
928
1206
  if (u.value || o.disabled) return;
929
1207
  let d = "selected";
930
- o.canExclude && (m.ctrlKey || m.metaKey) && (d = "excluded"), o.state == d && (d = ""), d === "" && t("unselect"), d === "selected" && t("select"), d === "excluded" && t("exclude");
1208
+ o.canExclude && (g.ctrlKey || g.metaKey) && (d = "excluded"), o.state == d && (d = ""), d === "" && l("unselect"), d === "selected" && l("select"), d === "excluded" && l("exclude");
931
1209
  };
932
- return (m, d) => (h(), C(ve, {
933
- class: X({
1210
+ return (g, d) => (v(), j(ye, {
1211
+ class: Z({
934
1212
  "top-tagSelector_tagListItem": !0,
935
1213
  "top-tagSelector_tagListItem-inEdit": u.value,
936
1214
  "top-tagSelector_tagListItem-disabled": e.disabled,
@@ -938,44 +1216,44 @@ const vt = /* @__PURE__ */ R({
938
1216
  "top-tagSelector-active": !!e.state,
939
1217
  "top-tagSelector-excluded": e.state === "excluded"
940
1218
  }),
941
- onClick: U(i, ["stop"])
1219
+ onClick: D(i, ["stop"])
942
1220
  }, {
943
- default: B(() => [
944
- N(fe, {
1221
+ default: C(() => [
1222
+ E(ve, {
945
1223
  id: e.id,
946
- name: r.value,
1224
+ name: a.value,
947
1225
  colorId: e.colorId,
948
1226
  state: e.state
949
1227
  }, null, 8, ["id", "name", "colorId", "state"]),
950
- oe("span", Ve({
1228
+ L("span", Ge({
951
1229
  ref_key: "elName",
952
- ref: l,
1230
+ ref: n,
953
1231
  class: "top-tagSelector_tagListItemName",
954
1232
  contenteditable: u.value ? "plaintext-only" : !1
955
- }, n.value, {
1233
+ }, r.value, {
956
1234
  onKeydown: [
957
- Ie(U(c, ["stop"]), ["enter"]),
958
- Ie(U(x, ["stop"]), ["esc"])
1235
+ je(D(f, ["stop"]), ["enter"]),
1236
+ je(D(S, ["stop"]), ["esc"])
959
1237
  ]
960
- }), b(r.value), 17, Tt),
961
- e.editable ? (h(), A(Y, { key: 0 }, [
962
- u.value ? (h(), A("span", {
1238
+ }), A(a.value), 17, Wt),
1239
+ e.editable ? (v(), T(q, { key: 0 }, [
1240
+ u.value ? (v(), T("span", {
963
1241
  key: 1,
964
1242
  "data-top-icon": "",
965
1243
  class: "top-tagSelector_edit",
966
- onClick: U(c, ["stop"])
967
- })) : (h(), A("span", {
1244
+ onClick: D(f, ["stop"])
1245
+ })) : (v(), T("span", {
968
1246
  key: 0,
969
1247
  "data-top-icon": "",
970
1248
  class: "top-tagSelector_edit",
971
- onClick: f
1249
+ onClick: c
972
1250
  }))
973
- ], 64)) : L("", !0)
1251
+ ], 64)) : _("", !0)
974
1252
  ]),
975
1253
  _: 1
976
1254
  }, 8, ["class"]));
977
1255
  }
978
- }), At = { key: 1 }, bt = /* @__PURE__ */ R({
1256
+ }), zt = { key: 1 }, Jt = /* @__PURE__ */ G({
979
1257
  inheritAttrs: !1,
980
1258
  __name: "popupOpener",
981
1259
  props: /* @__PURE__ */ M({
@@ -996,59 +1274,59 @@ const vt = /* @__PURE__ */ R({
996
1274
  }),
997
1275
  emits: ["update:modelValue"],
998
1276
  setup(e) {
999
- const a = e, o = T(e, "modelValue"), t = a.useTopButton ? Q : "div", r = a.useTopButton ? "html" : "default", l = {
1277
+ const t = e, o = B(e, "modelValue"), l = t.useTopButton ? Q : "div", a = t.useTopButton ? "html" : "default", n = {
1000
1278
  model: o,
1001
- mode: a.mode,
1002
- targetId: a.targetId,
1003
- filters: a.filters,
1004
- payload: a.payload
1279
+ mode: t.mode,
1280
+ targetId: t.targetId,
1281
+ filters: t.filters,
1282
+ payload: t.payload
1005
1283
  };
1006
- return (n, u) => {
1007
- const f = Pe("top-data");
1008
- return h(), C(Je, { id: e.id }, {
1009
- default: B(() => [
1010
- De((h(), C(Fe(v(t)), Ve({
1284
+ return (r, u) => {
1285
+ const c = We("top-data");
1286
+ return v(), j(Ze, { id: e.id }, {
1287
+ default: C(() => [
1288
+ ze((v(), j(Je(p(l)), Ge({
1011
1289
  class: {
1012
1290
  "top-tagSelector": !0,
1013
- "top-tagSelector-useTopButton": a.useTopButton,
1014
- "top-tagSelector-custom": !a.useTopButton,
1015
- "top-as-selector": a.useTopButton,
1016
- "top-tagSelector-filter": a.mode === "filter",
1017
- "top-tagSelector-setter_single": a.mode === "setter" && !e.filters,
1018
- "top-tagSelector-setter_several": a.mode === "setter" && e.filters,
1291
+ "top-tagSelector-useTopButton": t.useTopButton,
1292
+ "top-tagSelector-custom": !t.useTopButton,
1293
+ "top-as-selector": t.useTopButton,
1294
+ "top-tagSelector-filter": t.mode === "filter",
1295
+ "top-tagSelector-setter_single": t.mode === "setter" && !e.filters,
1296
+ "top-tagSelector-setter_several": t.mode === "setter" && e.filters,
1019
1297
  "top-tagSelector-selectedOne": !o.value.length || o.value.length === 1,
1020
1298
  "top-tagSelector-toTwoLine": o.value.length > 5
1021
1299
  },
1022
1300
  color: "theme",
1023
1301
  styling: e.styling
1024
- }, n.$attrs), {
1025
- [v(r)]: B(() => [
1026
- !o.value.length && e.mode === "filter" ? (h(), C(fe, {
1302
+ }, r.$attrs), {
1303
+ [p(a)]: C(() => [
1304
+ !o.value.length && e.mode === "filter" ? (v(), j(ve, {
1027
1305
  key: 0,
1028
1306
  id: "all",
1029
1307
  colorId: "",
1030
- name: n.$i18n.Common.All_tags ?? "",
1308
+ name: r.$i18n.Common.All_tags ?? "",
1031
1309
  state: ""
1032
- }, null, 8, ["name"])) : L("", !0),
1033
- e.mode === "setter" && e.filters ? (h(), A("div", At, [
1034
- qe(n.$slots, "default")
1035
- ])) : (h(!0), A(Y, { key: 2 }, me(o.value, (c) => (h(), C(fe, {
1036
- id: v(H)(c),
1037
- colorId: v(re)(c, e.tags)?.color_id ?? "",
1038
- name: v(re)(c, e.tags)?.name ?? "",
1039
- state: v(H)(c) === c ? "selected" : "excluded"
1310
+ }, null, 8, ["name"])) : _("", !0),
1311
+ e.mode === "setter" && e.filters ? (v(), T("div", zt, [
1312
+ Ye(r.$slots, "default")
1313
+ ])) : (v(!0), T(q, { key: 2 }, se(o.value, (f) => (v(), j(ve, {
1314
+ id: p(X)(f),
1315
+ colorId: p(de)(f, e.tags)?.color_id ?? "",
1316
+ name: p(de)(f, e.tags)?.name ?? "",
1317
+ state: p(X)(f) === f ? "selected" : "excluded"
1040
1318
  }, null, 8, ["id", "colorId", "name", "state"]))), 256))
1041
1319
  ]),
1042
1320
  _: 2
1043
1321
  }, 1040, ["class", "styling"])), [
1044
- [f, l, "topTagSelectorTarget"]
1322
+ [c, n, "topTagSelectorTarget"]
1045
1323
  ])
1046
1324
  ]),
1047
1325
  _: 3
1048
1326
  }, 8, ["id"]);
1049
1327
  };
1050
1328
  }
1051
- }), _t = /* @__PURE__ */ R({
1329
+ }), po = /* @__PURE__ */ G({
1052
1330
  __name: "tagSelector",
1053
1331
  props: /* @__PURE__ */ M({
1054
1332
  modelValue: {},
@@ -1068,177 +1346,177 @@ const vt = /* @__PURE__ */ R({
1068
1346
  },
1069
1347
  modelModifiers: {},
1070
1348
  tags: {
1071
- default: be(Ct)
1349
+ default: _e(Ut)
1072
1350
  },
1073
1351
  tagsModifiers: {}
1074
1352
  }),
1075
1353
  emits: /* @__PURE__ */ M(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
1076
- setup(e, { emit: a }) {
1077
- const o = w(), t = e, r = T(e, "modelValue"), l = T(e, "tags"), n = a, u = ze((p, I) => {
1078
- n(p, I);
1079
- }, t.emitDelay);
1080
- t.singleMode && !r.value.length && (r.value = [l.value[0].id]);
1081
- const f = t.id ?? "top-popup-id-" + Math.random(), c = G("add"), x = () => {
1082
- const p = " " + o.Common.Tags?.toLowerCase(), I = /* @__PURE__ */ new Map();
1083
- return I.set("add", { value: "add", title: o.Common.Add + p }), I.set("replace", { value: "replace", title: o.Common.Replace + p }), I.set("delete", { value: "delete", title: o.Common.Delete + p }), I;
1354
+ setup(e, { emit: t }) {
1355
+ const o = b(), l = e, a = B(e, "modelValue"), n = B(e, "tags"), r = t, u = Xe((h, I) => {
1356
+ r(h, I);
1357
+ }, l.emitDelay);
1358
+ l.singleMode && !a.value.length && (a.value = [n.value[0].id]);
1359
+ const c = l.id ?? "top-popup-id-" + Math.random(), f = V("add"), S = () => {
1360
+ const h = " " + o.Common.Tags?.toLowerCase(), I = /* @__PURE__ */ new Map();
1361
+ return I.set("add", { value: "add", title: o.Common.Add + h }), I.set("replace", { value: "replace", title: o.Common.Replace + h }), I.set("delete", { value: "delete", title: o.Common.Delete + h }), I;
1084
1362
  };
1085
- let i = Ue({
1086
- model: r,
1363
+ let i = He({
1364
+ model: a,
1087
1365
  mode: "filter",
1088
1366
  targetId: void 0,
1089
1367
  filters: void 0,
1090
1368
  payload: void 0
1091
1369
  });
1092
- V(r, () => {
1093
- u("selector", r.value);
1370
+ P(a, () => {
1371
+ u("selector", a.value);
1094
1372
  });
1095
- const m = E(() => {
1096
- if (i.value.mode === "setter" && t.maxTagsForSetter && !i.value.filters)
1097
- return i.value.model.value.length >= t.maxTagsForSetter;
1098
- }), d = (p) => {
1099
- if (p !== "all") {
1100
- if (i.value.model.value.includes(p)) return "selected";
1101
- if (i.value.model.value.includes(Be(p))) return "excluded";
1373
+ const g = w(() => {
1374
+ if (i.value.mode === "setter" && l.maxTagsForSetter && !i.value.filters)
1375
+ return i.value.model.value.length >= l.maxTagsForSetter;
1376
+ }), d = (h) => {
1377
+ if (h !== "all") {
1378
+ if (i.value.model.value.includes(h)) return "selected";
1379
+ if (i.value.model.value.includes(Me(h))) return "excluded";
1102
1380
  }
1103
- return p === "all" && !i.value.model.value.length ? "selected" : "";
1104
- }, s = (p, I) => {
1105
- const S = Be(p);
1106
- let k = i.value.model.value.filter((K) => K !== p && K !== S);
1107
- I === "select" && k.push(p), I === "exclude" && k.push(S), i.value.mode === "setter" && i.value.targetId !== void 0 && t.requiredForSetter && (k.length || k.push("1"), k.length === 2 && i.value.model.value.length === 1 && i.value.model.value[0] === "1" && (k = k.filter((K) => K !== "1"))), t.singleMode && !i.value.filters && (k.length || (k = i.value.model.value), k.length > 1 && (k = [k[k.length - 1]])), k.sort((K, ee) => {
1108
- if (!t.tags) return 0;
1109
- const D = t.tags.findIndex((q) => q.id === K), F = t.tags.findIndex((q) => q.id === ee);
1110
- return D - F;
1381
+ return h === "all" && !i.value.model.value.length ? "selected" : "";
1382
+ }, s = (h, I) => {
1383
+ const x = Me(h);
1384
+ let k = i.value.model.value.filter((K) => K !== h && K !== x);
1385
+ I === "select" && k.push(h), I === "exclude" && k.push(x), i.value.mode === "setter" && i.value.targetId !== void 0 && l.requiredForSetter && (k.length || k.push("1"), k.length === 2 && i.value.model.value.length === 1 && i.value.model.value[0] === "1" && (k = k.filter((K) => K !== "1"))), l.singleMode && !i.value.filters && (k.length || (k = i.value.model.value), k.length > 1 && (k = [k[k.length - 1]])), k.sort((K, te) => {
1386
+ if (!l.tags) return 0;
1387
+ const F = l.tags.findIndex((z) => z.id === K), W = l.tags.findIndex((z) => z.id === te);
1388
+ return F - W;
1111
1389
  }), i.value.model.value = k, i.value.mode === "setter" && i.value.targetId !== void 0 && u("setter", {
1112
1390
  tagsIds: k,
1113
1391
  targetId: i.value.targetId,
1114
1392
  payload: i.value.payload
1115
1393
  });
1116
- }, g = E(() => {
1117
- let p = "top-tagSelector_popup";
1118
- return i.value.mode === "filter" && (p += " top-tagSelector_popup-filter"), i.value.mode === "setter" && (p += " top-tagSelector_popup-setter"), p;
1119
- }), Z = () => {
1120
- const p = prompt("", "New tag");
1121
- if (!p || p === "New tag") return;
1122
- const I = l.value.length + 1;
1123
- l.value.push({
1394
+ }, m = w(() => {
1395
+ let h = "top-tagSelector_popup";
1396
+ return i.value.mode === "filter" && (h += " top-tagSelector_popup-filter"), i.value.mode === "setter" && (h += " top-tagSelector_popup-setter"), h;
1397
+ }), ee = () => {
1398
+ const h = prompt("", "New tag");
1399
+ if (!h || h === "New tag") return;
1400
+ const I = n.value.length + 1;
1401
+ n.value.push({
1124
1402
  id: String(I),
1125
- name: p,
1403
+ name: h,
1126
1404
  color_id: String((I - 1) % 10 + 1)
1127
- }), n("tagsChanged", l.value);
1128
- }, P = (p) => {
1129
- if (i.value = J(p.elPopupOpener, "topTagSelectorTarget"), !i.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1130
- if (i.value.filters && (c.value = "add", i.value.model.value = []), !_.$?.ui.sortable) {
1405
+ }), r("tagsChanged", n.value);
1406
+ }, U = (h) => {
1407
+ if (i.value = Y(h.elPopupOpener, "topTagSelectorTarget"), !i.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1408
+ if (i.value.filters && (f.value = "add", i.value.model.value = []), !J.$?.ui.sortable) {
1131
1409
  console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
1132
1410
  return;
1133
1411
  }
1134
- !_.state.isMobile && !_.state.isMobileUA && l.value && $(p.elPopup).sortable({
1412
+ !J.state.isMobile && !J.state.isMobileUA && n.value && $(h.elPopup).sortable({
1135
1413
  items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
1136
1414
  /**
1137
1415
  * @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
1138
1416
  */
1139
1417
  cancel: '[contenteditable="plaintext-only"], [contenteditable="true"]',
1140
1418
  distance: 10,
1141
- stop: function(I, S) {
1142
- if (!l.value) return;
1143
- const k = $(S.item).parent().find("[data-tag_id]"), K = [];
1144
- k.each((ee, D) => {
1145
- if (!l.value) return;
1146
- const F = $(D).attr("data-tag_id");
1147
- K.push(F);
1148
- }), l.value.sort((ee, D) => {
1149
- const F = K.findIndex((ie) => ie === ee.id), q = K.findIndex((ie) => ie === D.id);
1150
- return F - q;
1151
- }), u("tagsChanged", l.value);
1419
+ stop: function(I, x) {
1420
+ if (!n.value) return;
1421
+ const k = $(x.item).parent().find("[data-tag_id]"), K = [];
1422
+ k.each((te, F) => {
1423
+ if (!n.value) return;
1424
+ const W = $(F).attr("data-tag_id");
1425
+ K.push(W);
1426
+ }), n.value.sort((te, F) => {
1427
+ const W = K.findIndex((ue) => ue === te.id), z = K.findIndex((ue) => ue === F.id);
1428
+ return W - z;
1429
+ }), u("tagsChanged", n.value);
1152
1430
  }
1153
1431
  });
1154
- }, Re = (p) => {
1155
- _.$?.ui.sortable && $(p.elPopup).data("ui-sortable") && $(p.elPopup).sortable("destroy");
1432
+ }, De = (h) => {
1433
+ J.$?.ui.sortable && $(h.elPopup).data("ui-sortable") && $(h.elPopup).sortable("destroy");
1156
1434
  };
1157
- return (p, I) => (h(), A(Y, null, [
1158
- N(bt, {
1159
- modelValue: r.value,
1160
- "onUpdate:modelValue": I[0] || (I[0] = (S) => r.value = S),
1161
- id: v(f),
1162
- tags: l.value,
1435
+ return (h, I) => (v(), T(q, null, [
1436
+ E(Jt, {
1437
+ modelValue: a.value,
1438
+ "onUpdate:modelValue": I[0] || (I[0] = (x) => a.value = x),
1439
+ id: p(c),
1440
+ tags: n.value,
1163
1441
  styling: e.styling,
1164
1442
  mode: "filter",
1165
1443
  useTopButton: e.useTopButton
1166
1444
  }, null, 8, ["modelValue", "id", "tags", "styling", "useTopButton"]),
1167
- N(Me, {
1168
- id: v(f),
1169
- class: X(g.value),
1170
- onOpen: I[4] || (I[4] = (S) => P(S)),
1171
- onClose: I[5] || (I[5] = (S) => Re(S)),
1445
+ E(he, {
1446
+ id: p(c),
1447
+ class: Z(m.value),
1448
+ onOpen: I[4] || (I[4] = (x) => U(x)),
1449
+ onClose: I[5] || (I[5] = (x) => De(x)),
1172
1450
  "transition-duration": 50
1173
- }, _e({
1174
- contentList: B(() => [
1175
- v(i).mode === "filter" && !e.singleMode ? (h(), C(Ae, {
1451
+ }, Qe({
1452
+ contentList: C(() => [
1453
+ p(i).mode === "filter" && !e.singleMode ? (v(), j(Ve, {
1176
1454
  key: 0,
1177
1455
  id: "all",
1178
1456
  colorId: "",
1179
- name: p.$i18n.Common.All_tags ?? "",
1180
- state: v(i).model.value.length ? "" : "selected",
1181
- onSelect: I[3] || (I[3] = (S) => v(i).model.value = [])
1182
- }, null, 8, ["name", "state"])) : L("", !0),
1183
- (h(!0), A(Y, null, me(l.value, (S) => (h(), C(Ae, {
1184
- key: S.id,
1185
- id: S.id,
1186
- colorId: S.color_id,
1187
- name: S.name,
1188
- state: d(S.id),
1189
- canExclude: v(i).mode === "filter" && !e.singleMode,
1457
+ name: h.$i18n.Common.All_tags ?? "",
1458
+ state: p(i).model.value.length ? "" : "selected",
1459
+ onSelect: I[3] || (I[3] = (x) => p(i).model.value = [])
1460
+ }, null, 8, ["name", "state"])) : _("", !0),
1461
+ (v(!0), T(q, null, se(n.value, (x) => (v(), j(Ve, {
1462
+ key: x.id,
1463
+ id: x.id,
1464
+ colorId: x.color_id,
1465
+ name: x.name,
1466
+ state: d(x.id),
1467
+ canExclude: p(i).mode === "filter" && !e.singleMode,
1190
1468
  editable: e.tagsEditable,
1191
- disabled: m.value && d(S.id) === "",
1192
- onUnselect: (k) => s(S.id, "unselect"),
1193
- onSelect: (k) => s(S.id, "select"),
1194
- onExclude: (k) => s(S.id, "exclude"),
1469
+ disabled: g.value && d(x.id) === "",
1470
+ onUnselect: (k) => s(x.id, "unselect"),
1471
+ onSelect: (k) => s(x.id, "select"),
1472
+ onExclude: (k) => s(x.id, "exclude"),
1195
1473
  "onUpdate:name": (k) => {
1196
- S.name = k, v(u)("tagsChanged", l.value);
1474
+ x.name = k, p(u)("tagsChanged", n.value);
1197
1475
  }
1198
1476
  }, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
1199
- e.tagsEditable && l.value.length < e.tagsMax && l.value.length < 20 ? (h(), C(ve, {
1477
+ e.tagsEditable && n.value.length < e.tagsMax && n.value.length < 20 ? (v(), j(ye, {
1200
1478
  key: 1,
1201
1479
  "data-top-icon": "",
1202
- onClick: U(Z, ["stop"])
1480
+ onClick: D(ee, ["stop"])
1203
1481
  }, {
1204
- default: B(() => [
1205
- z(b(p.$i18n.Common.Add), 1)
1482
+ default: C(() => [
1483
+ N(A(h.$i18n.Common.Add), 1)
1206
1484
  ]),
1207
1485
  _: 1
1208
- })) : L("", !0)
1486
+ })) : _("", !0)
1209
1487
  ]),
1210
1488
  _: 2
1211
1489
  }, [
1212
- v(i).mode === "setter" && v(i).filters ? {
1490
+ p(i).mode === "setter" && p(i).filters ? {
1213
1491
  name: "header",
1214
- fn: B(() => [
1215
- N(se, {
1216
- modelValue: c.value,
1217
- "onUpdate:modelValue": I[1] || (I[1] = (S) => c.value = S),
1218
- options: x()
1492
+ fn: C(() => [
1493
+ E(fe, {
1494
+ modelValue: f.value,
1495
+ "onUpdate:modelValue": I[1] || (I[1] = (x) => f.value = x),
1496
+ options: S()
1219
1497
  }, null, 8, ["modelValue", "options"])
1220
1498
  ]),
1221
1499
  key: "0"
1222
1500
  } : void 0,
1223
- v(i).mode === "setter" && v(i).filters ? {
1501
+ p(i).mode === "setter" && p(i).filters ? {
1224
1502
  name: "footer",
1225
- fn: B(() => [
1226
- N(Q, { color: "theme" }, {
1227
- default: B(() => [
1228
- z(b(p.$i18n.Common.Cancel), 1)
1503
+ fn: C(() => [
1504
+ E(Q, { color: "theme" }, {
1505
+ default: C(() => [
1506
+ N(A(h.$i18n.Common.Cancel2), 1)
1229
1507
  ]),
1230
1508
  _: 1
1231
1509
  }),
1232
- N(Q, {
1233
- onClick: I[2] || (I[2] = (S) => v(u)("setter", {
1234
- tagsIds: v(i).model.value,
1235
- filters: v(i).filters,
1236
- filtersAction: c.value,
1237
- payload: v(i).payload
1510
+ E(Q, {
1511
+ onClick: I[2] || (I[2] = (x) => p(u)("setter", {
1512
+ tagsIds: p(i).model.value,
1513
+ filters: p(i).filters,
1514
+ filtersAction: f.value,
1515
+ payload: p(i).payload
1238
1516
  }))
1239
1517
  }, {
1240
- default: B(() => [
1241
- z(b(c.value === "add" ? p.$i18n.Common.Add : "") + " " + b(c.value === "replace" ? p.$i18n.Common.Replace : "") + " " + b(c.value === "delete" ? p.$i18n.Common.Delete : ""), 1)
1518
+ default: C(() => [
1519
+ N(A(f.value === "add" ? h.$i18n.Common.Add : "") + " " + A(f.value === "replace" ? h.$i18n.Common.Replace : "") + " " + A(f.value === "delete" ? h.$i18n.Common.Delete : ""), 1)
1242
1520
  ]),
1243
1521
  _: 1
1244
1522
  })
@@ -1250,17 +1528,18 @@ const vt = /* @__PURE__ */ R({
1250
1528
  }
1251
1529
  });
1252
1530
  export {
1253
- Nt as TopCompetitorSelector,
1254
- Ft as TopGroupSelector,
1255
- Dt as TopRegionSelector,
1256
- _t as TopTagSelector,
1257
- bt as TopTagSelectorPopupOpener,
1258
- fe as TopTagSelectorTagIcon,
1259
- dt as dialogRegionSelector,
1260
- it as findRegion,
1261
- qt as genElTopTagSelectorPopupOpener,
1262
- Ke as genSearcherByKey,
1263
- Ut as renderElTopTagSelectorPopupOpener,
1264
- Pt as useItemsFromCompetitors
1531
+ io as TopCompetitorSelector,
1532
+ co as TopGroupSelector,
1533
+ go as TopProjectSelector,
1534
+ uo as TopRegionSelector,
1535
+ po as TopTagSelector,
1536
+ Jt as TopTagSelectorPopupOpener,
1537
+ ve as TopTagSelectorTagIcon,
1538
+ mt as dialogRegionSelector,
1539
+ ft as findRegion,
1540
+ fo as genElTopTagSelectorPopupOpener,
1541
+ Oe as genSearcherByKey,
1542
+ mo as renderElTopTagSelectorPopupOpener,
1543
+ so as useItemsFromCompetitors
1265
1544
  };
1266
1545
  //# sourceMappingURL=project.js.map