@topvisor/ui 1.6.1-searcherKey.1 → 1.6.1-searcherKey.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,21 +6,21 @@
6
6
  /* end import css */
7
7
 
8
8
  import { a as e, i as t } from "../.chunks/api-nVBtzTDk.es.js";
9
- import { E as n, O as r, P as i, h as a, n as o } from "../.chunks/forms-CwTz6NZs.es.js";
10
- import { storage as s } from "../utils/dom.js";
11
- import { t as c } from "../.chunks/worker-2yAM4kZz.es.js";
12
- import { a as l, i as u, n as d, r as f } from "../.chunks/app-3wPEjUXe.es.js";
13
- import { validUrl as p } from "../utils/check.js";
14
- import { ellipsis as m } from "../utils/string.js";
15
- import { genRegionLabelData as h, getSearcherGIcon as g } from "../utils/searchers.js";
16
- import { invertKeyboardLayout as _ } from "../utils/keyboard.js";
17
- import { c as v, n as y, o as b, r as x, s as S } from "../.chunks/popup-DeoDmf_L.es.js";
18
- import { c as C, d as w, f as ee, p as te } from "../.chunks/formsExt-UGuWA3IZ.es.js";
19
- import { Fragment as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createSlots as ne, createTextVNode as j, createVNode as M, defineComponent as N, isRef as re, mergeModels as P, mergeProps as ie, nextTick as ae, normalizeClass as F, onMounted as oe, openBlock as I, reactive as se, ref as L, renderList as R, renderSlot as ce, resolveComponent as le, resolveDirective as ue, resolveDynamicComponent as de, shallowRef as fe, toDisplayString as z, toValue as pe, unref as B, useId as me, useModel as V, watch as H, withCtx as U, withDirectives as he, withKeys as ge, withModifiers as W } from "vue";
9
+ import { E as n, O as r, P as i, h as a, i as o, n as s } from "../.chunks/forms-CwTz6NZs.es.js";
10
+ import { storage as c } from "../utils/dom.js";
11
+ import { t as l } from "../.chunks/worker-2yAM4kZz.es.js";
12
+ import { a as u, i as d, n as f, r as p } from "../.chunks/app-DRqHHgFb.es.js";
13
+ import { validUrl as m } from "../utils/check.js";
14
+ import { ellipsis as h } from "../utils/string.js";
15
+ import { genRegionLabelData as g, getSearcherGIcon as _ } from "../utils/searchers.js";
16
+ import { invertKeyboardLayout as v } from "../utils/keyboard.js";
17
+ import { c as y, n as b, o as x, r as ee, s as S } from "../.chunks/popup-DeoDmf_L.es.js";
18
+ import { c as C, d as te, f as ne, p as re } from "../.chunks/formsExt-UGuWA3IZ.es.js";
19
+ import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createSlots as ie, createTextVNode as A, createVNode as j, defineComponent as M, isRef as ae, mergeModels as N, mergeProps as oe, nextTick as se, normalizeClass as P, normalizeStyle as ce, onMounted as le, onUnmounted as ue, openBlock as F, reactive as de, ref as I, renderList as L, renderSlot as R, resolveComponent as fe, resolveDirective as pe, resolveDynamicComponent as me, shallowRef as he, toDisplayString as z, toValue as ge, unref as B, useId as _e, useModel as V, watch as H, withCtx as U, withDirectives as ve, withKeys as ye, withModifiers as W } from "vue";
20
20
  //#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
21
- var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, ye = /* @__PURE__ */ N({
21
+ var be = { class: "top-competitorSelector" }, xe = { class: "top-ellipsis1" }, Se = /* @__PURE__ */ M({
22
22
  __name: "competitorSelector",
23
- props: /*@__PURE__*/ P({
23
+ props: /*@__PURE__*/ N({
24
24
  modelValue: {},
25
25
  items: {},
26
26
  showSelectAllItem: {
@@ -34,7 +34,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
34
34
  }),
35
35
  emits: ["update:modelValue"],
36
36
  setup(e) {
37
- let t = e, i = V(e, "modelValue"), o = E(() => {
37
+ let t = e, i = V(e, "modelValue"), o = T(() => {
38
38
  if (t.showSelectAllItem) return {
39
39
  icon: t.selectAllItemIcon,
40
40
  title: n().Common.Select_all,
@@ -42,23 +42,23 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
42
42
  content: ""
43
43
  };
44
44
  });
45
- return (t, n) => (I(), k("div", _e, [B(r).state.isMobile ? (I(), D(S, { key: 0 }, {
46
- opener: U(() => [M(a, {
45
+ return (t, n) => (F(), O("div", be, [B(r).state.isMobile ? (F(), E(S, { key: 0 }, {
46
+ opener: U(() => [j(a, {
47
47
  class: "top-competitorSelector_opener",
48
48
  color: "theme",
49
49
  icon: "",
50
50
  icon2: ""
51
51
  }, {
52
- default: U(() => [j(z(e.items.find((e) => e.value === i.value?.[0])?.content), 1)]),
52
+ default: U(() => [A(z(e.items.find((e) => e.value === i.value?.[0])?.content), 1)]),
53
53
  _: 1
54
54
  })]),
55
- contentList: U(() => [(I(!0), k(T, null, R(e.items, (e) => (I(), D(b, {
56
- class: F({ "top-active": i.value?.includes(e.value) }),
55
+ contentList: U(() => [(F(!0), O(w, null, L(e.items, (e) => (F(), E(x, {
56
+ class: P({ "top-active": i.value?.includes(e.value) }),
57
57
  "data-top-icon": e.icon,
58
58
  title: e.title,
59
59
  onClick: () => i.value = [e.value]
60
60
  }, {
61
- default: U(() => [A("span", ve, z(e.content), 1)]),
61
+ default: U(() => [k("span", xe, z(e.content), 1)]),
62
62
  _: 2
63
63
  }, 1032, [
64
64
  "class",
@@ -67,7 +67,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
67
67
  "onClick"
68
68
  ]))), 256))]),
69
69
  _: 1
70
- })) : (I(), D(te, {
70
+ })) : (F(), E(re, {
71
71
  key: 1,
72
72
  modelValue: i.value,
73
73
  "onUpdate:modelValue": n[0] ||= (e) => i.value = e,
@@ -82,23 +82,23 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
82
82
  "selectAllItem"
83
83
  ]))]));
84
84
  }
85
- }), be = (e, t) => E(() => pe(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
85
+ }), Ce = (e, t) => T(() => ge(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
86
86
  value: e.id,
87
87
  title: e.url + ` [${e.id}]`,
88
- icon: e.id === pe(t) ? "" : "",
88
+ icon: e.id === ge(t) ? "" : "",
89
89
  content: e.name
90
- }))), xe = (e, t) => {
90
+ }))), we = (e, t) => {
91
91
  let r = n();
92
92
  return {
93
- searcherKey: L(e.modelValueSearcherKey ?? t.value.keys().next().value ?? -2),
94
- optionBySearcherKey: E(() => {
93
+ searcherKey: I(e.modelValueSearcherKey ?? t.value.keys().next().value ?? -2),
94
+ optionBySearcherKey: T(() => {
95
95
  let n = /* @__PURE__ */ new Map();
96
96
  if (t.value.forEach((t) => {
97
97
  let r = {
98
98
  value: t.key,
99
99
  title: t.name
100
100
  };
101
- e.addSearcherIcon && (r.icon = g(t.key)), n.set(t.key, r);
101
+ e.addSearcherIcon && (r.icon = _(t.key)), n.set(t.key, r);
102
102
  }), e.addCompare && !n.has(-2)) {
103
103
  let e = {
104
104
  value: "",
@@ -115,10 +115,10 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
115
115
  return n;
116
116
  })
117
117
  };
118
- }, Se = (e, t) => {
119
- let r = n(), i = E(() => e.forMode === "volume" || e.forMode === "cost_forecast"), a = L(-2);
118
+ }, Te = (e, t) => {
119
+ let r = n(), i = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), a = I(-2);
120
120
  e.modelValue.length === 1 && (a.value = e.modelValue[0]), a.value === -2 && (a.value = i.value ? t.value?.regionByIndex.values().next().value?.key ?? -2 : t.value?.regionByIndex.keys().next().value ?? -2);
121
- let o = E(() => {
121
+ let o = T(() => {
122
122
  let e = /* @__PURE__ */ new Map();
123
123
  return t.value.regionByIndex?.forEach((t) => {
124
124
  if (i.value) {
@@ -129,7 +129,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
129
129
  e.has(t.key) || e.set(t.key, n);
130
130
  return;
131
131
  }
132
- let n = h(t), r = [];
132
+ let n = g(t), r = [];
133
133
  n.deviceLabel && r.push(n.deviceLabel), n.langLabel && r.push(n.langLabel), n.altLabel && r.push(n.altLabel);
134
134
  let a = r.join(", ");
135
135
  a &&= ` (${a})`;
@@ -164,8 +164,8 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
164
164
  regionIndex: a,
165
165
  optionByRegionIndex: o
166
166
  };
167
- }, Ce = (e, t, n) => {
168
- let r = L([]), i = () => {
167
+ }, Ee = (e, t, n) => {
168
+ let r = I([]), i = () => {
169
169
  if (e.onlySearcher && t.value) {
170
170
  r.value = Array.from(t.value.keys());
171
171
  return;
@@ -182,15 +182,15 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
182
182
  return H(r, () => {
183
183
  a();
184
184
  }), e.addCompare && i(), { regionsIndexes: r };
185
- }, we = (e) => {
186
- let t = E(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = E(() => u(e.forMode, e.autoRegion, e.searchers)), r = E(() => n.value.get(a.searcherKey.value) || l), i = E(() => {
185
+ }, De = (e) => {
186
+ let t = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = T(() => d(e.forMode, e.autoRegion, e.searchers)), r = T(() => n.value.get(a.searcherKey.value) || u), i = T(() => {
187
187
  let e = /* @__PURE__ */ new Set();
188
188
  return n.value.forEach((t) => {
189
189
  t.regionByIndex.forEach((t) => {
190
190
  t.index !== -2 && e.add(t.index);
191
191
  });
192
192
  }), e;
193
- }), a = xe(e, n), o = Se(e, r), s = Ce(e, n, i);
193
+ }), a = we(e, n), o = Te(e, r), s = Ee(e, n, i);
194
194
  H(n, () => {
195
195
  if (e.onlySearcher ? s.regionsIndexes.value = Array.from(n.value.keys()) : s.regionsIndexes.value = s.regionsIndexes.value.filter((e) => i.value.has(e)), a.searcherKey.value === -1) return;
196
196
  let c = n.value.keys().next().value;
@@ -213,18 +213,18 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
213
213
  }, { immediate: !0 });
214
214
  let c = () => {
215
215
  if (a.searcherKey.value !== -1 && a.searcherKey.value !== -2) return a.searcherKey.value;
216
- }, d = () => {
216
+ }, l = () => {
217
217
  if (e.onlySearcher || o.regionIndex.value === -2) return;
218
218
  let n = o.regionIndex.value;
219
219
  if (t.value && e.forMode) {
220
220
  let t = o.regionIndex.value;
221
- n = f(e.forMode, {
221
+ n = p(e.forMode, {
222
222
  searcher_key: c(),
223
223
  key: t
224
224
  }, e.searchers)?.index;
225
225
  }
226
226
  return n;
227
- }, p = () => {
227
+ }, f = () => {
228
228
  let e = c();
229
229
  if (e !== void 0) return n.value.get(e);
230
230
  };
@@ -234,15 +234,15 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
234
234
  compare: s,
235
235
  searcherByKey: n,
236
236
  allRegionsIndexes: i,
237
- getSearcher: p,
237
+ getSearcher: f,
238
238
  getRegion: () => {
239
- let e = d();
240
- if (e !== void 0) return p()?.regionByIndex?.get(e);
239
+ let e = l();
240
+ if (e !== void 0) return f()?.regionByIndex?.get(e);
241
241
  }
242
242
  };
243
- }, Te = /* @__PURE__ */ N({
243
+ }, Oe = /* @__PURE__ */ M({
244
244
  __name: "regionSelector",
245
- props: /*@__PURE__*/ P({
245
+ props: /*@__PURE__*/ N({
246
246
  projectId: {},
247
247
  searchers: { default: () => [] },
248
248
  modelValue: {},
@@ -278,16 +278,16 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
278
278
  "update:modelValueSearcherKey"
279
279
  ],
280
280
  setup(e, { expose: t }) {
281
- let n = e, r = E(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i = V(e, "modelValue"), s = V(e, "modelValueSingle"), c = V(e, "modelValueSearcherKey"), { selectSearcher: l, selectRegion: u, compare: f, searcherByKey: p, allRegionsIndexes: m, getSearcher: h, getRegion: g } = we(n), _ = () => {
281
+ let n = e, r = T(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i = V(e, "modelValue"), o = V(e, "modelValueSingle"), c = V(e, "modelValueSearcherKey"), { selectSearcher: l, selectRegion: u, compare: d, searcherByKey: p, allRegionsIndexes: m, getSearcher: h, getRegion: g } = De(n), _ = () => {
282
282
  let e = [];
283
283
  p.value.forEach((t) => {
284
284
  (n.forMode === "project_relevant_url" || t.enabled) && t.regions.forEach((t) => {
285
285
  (n.forMode === "project_relevant_url" || t.enabled) && t.index !== -1 && e.push(t);
286
286
  });
287
- }), d.open("regions", {
287
+ }), f.open("regions", {
288
288
  regions: e,
289
- regionsIndexes: f.regionsIndexes.value,
290
- "@update:regionsIndexes": (e) => f.regionsIndexes.value = e
289
+ regionsIndexes: d.regionsIndexes.value,
290
+ "@update:regionsIndexes": (e) => d.regionsIndexes.value = e
291
291
  });
292
292
  };
293
293
  return H([
@@ -300,40 +300,40 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
300
300
  }, { immediate: !0 }), H([
301
301
  u.regionIndex,
302
302
  l.searcherKey,
303
- f.regionsIndexes
303
+ d.regionsIndexes
304
304
  ], () => {
305
- if (l.searcherKey.value === -1 && f.regionsIndexes.value.length) {
306
- if (JSON.stringify(i.value) === JSON.stringify(f.regionsIndexes.value)) return;
307
- i.value = [...f.regionsIndexes.value];
305
+ if (l.searcherKey.value === -1 && d.regionsIndexes.value.length) {
306
+ if (JSON.stringify(i.value) === JSON.stringify(d.regionsIndexes.value)) return;
307
+ i.value = [...d.regionsIndexes.value];
308
308
  } else n.onlySearcher ? (i.value = [l.searcherKey.value], l.searcherKey.value === -2 && !n.autoRegion && (i.value.length = 0)) : (i.value = [u.regionIndex.value], u.regionIndex.value === -2 && !n.autoRegion && (i.value.length = 0));
309
309
  !n.onlySearcher && !m.value.size && (l.searcherKey.value = -2);
310
310
  }), H(c, () => {
311
311
  r.value && c.value !== void 0 && (l.searcherKey.value = c.value);
312
312
  }), H(l.searcherKey, () => {
313
313
  r.value && c.value !== void 0 && (c.value = l.searcherKey.value);
314
- }), s.value && H(s, () => {
315
- s.value && (i.value = [s.value]);
314
+ }), o.value && H(o, () => {
315
+ o.value && (i.value = [o.value]);
316
316
  }, { immediate: !0 }), H(i, () => {
317
- if (i.value[0] && (s.value = i.value[0]), n.onlySearcher) {
317
+ if (i.value[0] && (o.value = i.value[0]), n.onlySearcher) {
318
318
  if (!i.value.length || i.value.length === 1 && !p.value.has(i.value[0]) || i.value.length === 1 && i.value[0] === -2 && !n.autoRegion) {
319
319
  let e = p.value.keys().next().value;
320
- e === -2 && !n.autoRegion && (e = void 0, s.value = -2), e === void 0 ? i.value.length = 0 : i.value = [e];
320
+ e === -2 && !n.autoRegion && (e = void 0, o.value = -2), e === void 0 ? i.value.length = 0 : i.value = [e];
321
321
  return;
322
322
  }
323
- if (i.value.length > 1 && JSON.stringify(i.value) !== JSON.stringify(f.regionsIndexes.value)) {
324
- i.value = [...f.regionsIndexes.value];
323
+ if (i.value.length > 1 && JSON.stringify(i.value) !== JSON.stringify(d.regionsIndexes.value)) {
324
+ i.value = [...d.regionsIndexes.value];
325
325
  return;
326
326
  }
327
327
  } else {
328
328
  let e = [...new Set(i.value)], t = p.value.values().next().value?.regionByIndex?.keys().next().value;
329
- if (r.value && (t = p.value.values().next().value?.regionByIndex?.values().next().value?.key), t === -2 && !n.autoRegion && (t = void 0, s.value = -2), !e.length) t !== void 0 && e.push(t);
329
+ if (r.value && (t = p.value.values().next().value?.regionByIndex?.values().next().value?.key), t === -2 && !n.autoRegion && (t = void 0, o.value = -2), !e.length) t !== void 0 && e.push(t);
330
330
  else if (e.length === 1) {
331
- let n = m.value;
332
- r.value && (n = /* @__PURE__ */ new Set(), p.value.forEach((e) => {
331
+ let i = m.value;
332
+ r.value && (i = /* @__PURE__ */ new Set(), p.value.forEach((e) => {
333
333
  e.regionByIndex.forEach((e) => {
334
- e.index !== -2 && n.add(e.key);
334
+ e.index !== -2 && i.add(e.key);
335
335
  });
336
- })), n.has(e[0]) || (e = [], t !== void 0 && e.push(t));
336
+ })), !i.has(e[0]) && (e[0] !== -2 || !n.autoRegion) && (e = [], t !== void 0 && e.push(t));
337
337
  } else e = e.filter((e) => m.value.has(e)), !e.length && t !== void 0 && e.push(t);
338
338
  if (JSON.stringify(i.value) !== JSON.stringify(e)) {
339
339
  i.value = e;
@@ -361,16 +361,16 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
361
361
  if (e !== void 0) break;
362
362
  }
363
363
  e !== void 0 && (l.searcherKey.value = e);
364
- } else l.searcherKey.value = -1, f.regionsIndexes.value = [...i.value];
364
+ } else l.searcherKey.value = -1, d.regionsIndexes.value = [...i.value];
365
365
  }
366
366
  }, { immediate: !0 }), t({
367
367
  getSearcher: h,
368
368
  getRegion: g
369
- }), (t, n) => (I(), k("div", { class: F({
369
+ }), (t, n) => (F(), O("div", { class: P({
370
370
  "top-regionSelector": !0,
371
371
  "top-regionSelector-onlySearcher": e.onlySearcher
372
372
  }) }, [
373
- M(o, {
373
+ j(s, {
374
374
  options: B(l).optionBySearcherKey.value,
375
375
  modelValue: B(l).searcherKey.value,
376
376
  "onUpdate:modelValue": n[0] ||= (e) => B(l).searcherKey.value = e,
@@ -381,7 +381,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
381
381
  "modelValue",
382
382
  "addChanger"
383
383
  ]),
384
- !e.onlySearcher && B(l).searcherKey.value !== B(-1) ? (I(), D(o, {
384
+ !e.onlySearcher && B(l).searcherKey.value !== B(-1) ? (F(), E(s, {
385
385
  key: 0,
386
386
  class: "top-select-region",
387
387
  options: B(u).optionByRegionIndex.value,
@@ -396,16 +396,16 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
396
396
  "name",
397
397
  "addChanger",
398
398
  "data-top-icon"
399
- ])) : O("", !0),
400
- e.addCompare && !e.onlySearcher && B(l).searcherKey.value === B(-1) ? (I(), D(a, {
399
+ ])) : D("", !0),
400
+ e.addCompare && !e.onlySearcher && B(l).searcherKey.value === B(-1) ? (F(), E(a, {
401
401
  key: 1,
402
402
  name: "compare",
403
403
  onClick: _,
404
- "data-count-compare-regions-indexes": B(f).regionsIndexes.value.length
404
+ "data-count-compare-regions-indexes": B(d).regionsIndexes.value.length
405
405
  }, {
406
- default: U(() => [j(z(t.$i18n.Common.Selected_regions), 1)]),
406
+ default: U(() => [A(z(t.$i18n.Common.Selected_regions), 1)]),
407
407
  _: 1
408
- }, 8, ["data-count-compare-regions-indexes"])) : O("", !0)
408
+ }, 8, ["data-count-compare-regions-indexes"])) : D("", !0)
409
409
  ], 2));
410
410
  }
411
411
  }), G = {
@@ -413,14 +413,14 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
413
413
  name: "/",
414
414
  path: "/"
415
415
  };
416
- function Ee(e) {
416
+ function ke(e) {
417
417
  return e ? n()?.Common.All_folders : "/ (" + n()?.Keywords.Root_folder + ")";
418
418
  }
419
- var De = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
420
- a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Ee(t));
419
+ var Ae = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
420
+ a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = ke(t));
421
421
  let o = i > 1 ? "-".repeat(i - 1) + " " : "";
422
- o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), De(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
423
- }), n), Oe = (e, t) => e.gen(`/get/${t}/folders/`, [
422
+ o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Ae(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
423
+ }), n), je = (e, t) => e.gen(`/get/${t}/folders/`, [
424
424
  "id",
425
425
  "parent_id",
426
426
  "name",
@@ -431,7 +431,7 @@ var De = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
431
431
  });
432
432
  //#endregion
433
433
  //#region src/core/utils/composables/useWatch.ts
434
- function ke(e, t, n) {
434
+ function Me(e, t, n) {
435
435
  let r = Object.keys(e), i = r.map((t) => e[t]);
436
436
  return H(i, (e, n, i) => {
437
437
  let a = {};
@@ -448,9 +448,9 @@ function ke(e, t, n) {
448
448
  }
449
449
  //#endregion
450
450
  //#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
451
- var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
451
+ var Ne = ["innerHTML"], Pe = /* @__PURE__ */ M({
452
452
  __name: "folders",
453
- props: /*@__PURE__*/ P({
453
+ props: /*@__PURE__*/ N({
454
454
  folderId: {},
455
455
  folder: {},
456
456
  folders: {},
@@ -471,15 +471,15 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
471
471
  }),
472
472
  emits: ["update:folderId", "update:folder"],
473
473
  setup(e) {
474
- let t = e, n = V(e, "folderId"), r = V(e, "folder"), i = t.client && !t.folders ? Oe(t.client, t.service) : void 0, a = L(null);
474
+ let t = e, n = V(e, "folderId"), r = V(e, "folder"), i = t.client && !t.folders ? je(t.client, t.service) : void 0, a = I(null);
475
475
  H(() => t.projectId, () => {
476
476
  i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
477
477
  }, { immediate: !0 });
478
- let o = E(() => De(t.folders ?? { root: [G] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
478
+ let o = T(() => Ae(t.folders ?? { root: [G] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
479
479
  ...e[0],
480
- name: Ee(!0)
480
+ name: ke(!0)
481
481
  }), e);
482
- return ke({
482
+ return Me({
483
483
  modelFolder: r,
484
484
  modelFolderId: n
485
485
  }, async (e) => {
@@ -490,7 +490,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
490
490
  }
491
491
  let i = o.value.get(t.folderId);
492
492
  i ||= G, r.value = i, n.value = i.id;
493
- }, { immediate: !0 }), (t, n) => (I(), D(C, {
493
+ }, { immediate: !0 }), (t, n) => (F(), E(C, {
494
494
  class: "top-groupSelector_folder",
495
495
  modelValue: r.value,
496
496
  "onUpdate:modelValue": n[0] ||= (e) => r.value = e,
@@ -498,12 +498,12 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
498
498
  "search-type": "inline",
499
499
  icon: e.addIcon ? "" : void 0,
500
500
  api: e.folders ? void 0 : B(i),
501
- apiSetSearchParams: (...e) => B(w)(...e, "name"),
501
+ apiSetSearchParams: (...e) => B(te)(...e, "name"),
502
502
  prepareItemsBeforeRender: s,
503
503
  addChanger: e.addChanger,
504
504
  useCache: ""
505
505
  }, {
506
- item: U(({ item: e }) => [A("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ae)]),
506
+ item: U(({ item: e }) => [k("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ne)]),
507
507
  _: 1
508
508
  }, 8, [
509
509
  "modelValue",
@@ -524,7 +524,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
524
524
  name: "All groups",
525
525
  folder_id: G.id,
526
526
  folder_path: G.path
527
- }, J = () => (q.name = n()?.Common.All_groups, q), Me = () => (q.name = n()?.Keywords.Choose_group, q), Ne = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), Pe = (e, t) => e.gen(`/get/${t}/groups/`, [
527
+ }, J = () => (q.name = n()?.Common.All_groups, q), Fe = () => (q.name = n()?.Keywords.Choose_group, q), Ie = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), Le = (e, t) => e.gen(`/get/${t}/groups/`, [
528
528
  "id",
529
529
  "name",
530
530
  "folder_id",
@@ -532,12 +532,12 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
532
532
  ]).changeParams({
533
533
  folder_id_depth: !0,
534
534
  limit: 100
535
- }), Fe = (e, t) => e.gen(`/add/${t}/groups/`), Ie = (e, t) => e.gen(`/del/${t}/groups/`), Le = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Re = { class: "top-groupSelector_groupItem top-ellipsis1" }, ze = {
535
+ }), Re = (e, t) => e.gen(`/add/${t}/groups/`), ze = (e, t) => e.gen(`/del/${t}/groups/`), Be = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Ve = { class: "top-groupSelector_groupItem top-ellipsis1" }, He = {
536
536
  key: 0,
537
537
  class: "top-comment"
538
- }, Be = ["innerHTML"], Ve = ["innerHTML"], He = ["innerHTML"], Ue = /* @__PURE__ */ N({
538
+ }, Ue = ["innerHTML"], We = ["innerHTML"], Ge = ["innerHTML"], Ke = /* @__PURE__ */ M({
539
539
  __name: "groups",
540
- props: /*@__PURE__*/ P({
540
+ props: /*@__PURE__*/ N({
541
541
  groupId: {},
542
542
  group: {},
543
543
  projectId: {},
@@ -568,14 +568,14 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
568
568
  group: { required: !0 },
569
569
  groupModifiers: {}
570
570
  }),
571
- emits: /*@__PURE__*/ P([
571
+ emits: /*@__PURE__*/ N([
572
572
  "addGroup",
573
573
  "editGroup",
574
574
  "delGroup"
575
575
  ], ["update:groupId", "update:group"]),
576
576
  setup(e, { expose: n, emit: r }) {
577
- let i = e, a = r, o = V(e, "groupId"), s = V(e, "group"), c = i.client && !i.groups ? Pe(i.client, i.service) : void 0, l = i.client ? Fe(i.client, i.service) : void 0, u = i.client ? Ie(i.client, i.service) : void 0, d = i.client ? Le(i.client, i.service) : void 0, f = L(null), p = E(() => {
578
- if (i.groups !== void 0) return Ne(i.groups, i.on, i.folder);
577
+ let i = e, a = r, o = V(e, "groupId"), s = V(e, "group"), c = i.client && !i.groups ? Le(i.client, i.service) : void 0, l = i.client ? Re(i.client, i.service) : void 0, u = i.client ? ze(i.client, i.service) : void 0, d = i.client ? Be(i.client, i.service) : void 0, f = I(null), p = T(() => {
578
+ if (i.groups !== void 0) return Ie(i.groups, i.on, i.folder);
579
579
  }), m = t("folder_id", "EQUALS", [i.folder?.id ?? 0]);
580
580
  c?.changeParams({
581
581
  project_id: i.projectId,
@@ -587,16 +587,16 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
587
587
  }, g = (e = !1) => {
588
588
  f.value?.resetCache(e);
589
589
  };
590
- ke({
590
+ Me({
591
591
  projectId: () => i.projectId,
592
592
  folderId: () => i.folder?.id,
593
593
  canSelectAll: () => i.canSelectAll
594
594
  }, (e) => {
595
595
  if (e.projectId && (c?.changeParams({ project_id: i.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + i.projectId })), e.folderId && (m.values = [i.folder?.id ?? 0]), g(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && o.value !== null) {
596
596
  let e;
597
- i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = se(J()))), (i.autoselect === "placeholder" || !e) && (e = Me()), h(e);
597
+ i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = de(J()))), (i.autoselect === "placeholder" || !e) && (e = Fe()), h(e);
598
598
  }
599
- }, { immediate: !0 }), ke({
599
+ }, { immediate: !0 }), Me({
600
600
  modelGroup: s,
601
601
  modelGroupId: o
602
602
  }, async (e) => {
@@ -615,7 +615,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
615
615
  }
616
616
  }
617
617
  if (i.client && !i.groups && (o.value || o.value === 0 && !i.canSelectAll)) {
618
- let e = Pe(i.client, i.service).changeParams({
618
+ let e = Le(i.client, i.service).changeParams({
619
619
  project_id: i.projectId,
620
620
  id: o.value,
621
621
  filters: [m]
@@ -650,13 +650,13 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
650
650
  id: e.id,
651
651
  name: t
652
652
  }), f.value?.updateCacheItemById(e.id, { name: t })));
653
- }, b = async (e) => {
653
+ }, y = async (e) => {
654
654
  u && ((await u.changeParams({
655
655
  project_id: i.projectId,
656
656
  id: e.id
657
657
  }).call()).errors || (s.value.id === e.id && h(i.canSelectAll ? J() : K), a("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
658
658
  };
659
- return n({ resetCacheGroups: g }), (t, n) => (I(), D(C, {
659
+ return n({ resetCacheGroups: g }), (t, n) => (F(), E(C, {
660
660
  ref_key: "refSelector",
661
661
  ref: f,
662
662
  class: "top-groupSelector_group",
@@ -666,50 +666,50 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
666
666
  searchType: "inline",
667
667
  icon: e.addIcon ? "" : void 0,
668
668
  api: e.groups ? void 0 : B(c),
669
- apiSetSearchParams: (...e) => B(w)(...e, "name"),
669
+ apiSetSearchParams: (...e) => B(te)(...e, "name"),
670
670
  appendSearchToResult: !!e.canAdd,
671
671
  useAllItem: e.canSelectAll ? B(J)().name : !1,
672
672
  addChanger: e.addChanger,
673
673
  useCache: "",
674
674
  onAppendItem: _
675
- }, ne({
676
- item: U(({ item: n }) => [A("div", Re, [
677
- n.id === B(null) ? (I(), k("div", ze, z(t.$i18n.Common.Add) + ": ", 1)) : O("", !0),
678
- A("span", {
675
+ }, ie({
676
+ item: U(({ item: n }) => [k("div", Ve, [
677
+ n.id === B(null) ? (F(), O("div", He, z(t.$i18n.Common.Add) + ": ", 1)) : D("", !0),
678
+ k("span", {
679
679
  class: "top-groupSelector_groupItemName top-ellipsis1",
680
680
  innerHTML: n.name
681
- }, null, 8, Be),
682
- n.folder_path && e.showPath ? (I(), k("span", {
681
+ }, null, 8, Ue),
682
+ n.folder_path && e.showPath ? (F(), O("span", {
683
683
  key: 1,
684
684
  class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
685
685
  innerHTML: n.folder_path
686
- }, null, 8, Ve)) : O("", !0)
686
+ }, null, 8, We)) : D("", !0)
687
687
  ])]),
688
688
  _: 2
689
689
  }, [e.canEditAndDel && e.client ? {
690
690
  name: "actions",
691
- fn: U(({ item: r }) => [r.id ? (I(), k(T, { key: 0 }, [M(y, {
691
+ fn: U(({ item: r }) => [r.id ? (F(), O(w, { key: 0 }, [j(b, {
692
692
  submitText: t.$i18n.Common.Save,
693
693
  defaultValue: r.name,
694
694
  inputProps: { addCleaner: !1 },
695
695
  onSubmit: (e) => v(r, e)
696
696
  }, {
697
- opener: U(() => [...n[1] ||= [A("div", { "data-top-icon": "" }, null, -1)]]),
697
+ opener: U(() => [...n[1] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
698
698
  default: U(() => [...n[2] ||= []]),
699
699
  _: 1
700
700
  }, 8, [
701
701
  "submitText",
702
702
  "defaultValue",
703
703
  "onSubmit"
704
- ]), M(x, {
704
+ ]), j(ee, {
705
705
  isWarning: "",
706
706
  submitText: t.$i18n.Common.Delete,
707
- onSubmit: (e) => b(r)
707
+ onSubmit: (e) => y(r)
708
708
  }, {
709
- opener: U(() => [...n[3] ||= [A("div", { "data-top-icon": "" }, null, -1)]]),
710
- default: U(() => [A("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n.Aitracker.Delete_group_warning }, null, 8, He)]),
709
+ opener: U(() => [...n[3] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
710
+ default: U(() => [k("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n.Aitracker.Delete_group_warning }, null, 8, Ge)]),
711
711
  _: 1
712
- }, 8, ["submitText", "onSubmit"])], 64)) : O("", !0)]),
712
+ }, 8, ["submitText", "onSubmit"])], 64)) : D("", !0)]),
713
713
  key: "0"
714
714
  } : void 0]), 1032, [
715
715
  "modelValue",
@@ -722,9 +722,9 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
722
722
  "addChanger"
723
723
  ]));
724
724
  }
725
- }), We = { class: "top-groupSelector" }, Ge = /* @__PURE__ */ N({
725
+ }), qe = { class: "top-groupSelector" }, Je = /* @__PURE__ */ M({
726
726
  __name: "groupSelector",
727
- props: /*@__PURE__*/ P({
727
+ props: /*@__PURE__*/ N({
728
728
  folderId: {},
729
729
  folder: {},
730
730
  groupId: {},
@@ -772,17 +772,17 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
772
772
  group: { default: K },
773
773
  groupModifiers: {}
774
774
  }),
775
- emits: /*@__PURE__*/ P(["update:groups"], [
775
+ emits: /*@__PURE__*/ N(["update:groups"], [
776
776
  "update:folderId",
777
777
  "update:folder",
778
778
  "update:groupId",
779
779
  "update:group"
780
780
  ]),
781
781
  setup(e, { expose: t, emit: n }) {
782
- let r = e, i = L(null), a = V(e, "folderId"), o = V(e, "folder"), s = V(e, "groupId"), c = V(e, "group"), l = n;
783
- o.value = De(r.folders ?? { root: [G] }, r.canSelectAllGroups).get(a.value);
782
+ let r = e, i = I(null), a = V(e, "folderId"), o = V(e, "folder"), s = V(e, "groupId"), c = V(e, "group"), l = n;
783
+ o.value = Ae(r.folders ?? { root: [G] }, r.canSelectAllGroups).get(a.value);
784
784
  let u = r.groups?.find((e) => e.id === s.value);
785
- s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = J()), (r.autoselect === "placeholder" || !u) && (u = Me()), u ??= K, c.value = u;
785
+ s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = J()), (r.autoselect === "placeholder" || !u) && (u = Fe()), u ??= K, c.value = u;
786
786
  let d = (e) => {
787
787
  let t;
788
788
  r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
@@ -808,7 +808,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
808
808
  };
809
809
  return t({ resetCacheGroups: (e = !1) => {
810
810
  i.value?.resetCacheGroups(e);
811
- } }), (t, n) => (I(), k("div", We, [e.showFolders ? (I(), D(je, {
811
+ } }), (t, n) => (F(), O("div", qe, [e.showFolders ? (F(), E(Pe, {
812
812
  key: 0,
813
813
  folderId: a.value,
814
814
  "onUpdate:folderId": n[0] ||= (e) => a.value = e,
@@ -831,7 +831,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
831
831
  "addIcon",
832
832
  "client",
833
833
  "service"
834
- ])) : O("", !0), e.showGroups ? (I(), D(Ue, {
834
+ ])) : D("", !0), e.showGroups ? (F(), E(Ke, {
835
835
  key: 1,
836
836
  ref_key: "componentGroupsRef",
837
837
  ref: i,
@@ -871,46 +871,46 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
871
871
  "addIcon",
872
872
  "client",
873
873
  "service"
874
- ])) : O("", !0)]));
874
+ ])) : D("", !0)]));
875
875
  }
876
- }), Ke = (e) => ({
876
+ }), Ye = (e) => ({
877
877
  id: null,
878
878
  name: e,
879
879
  listItemProps: {
880
880
  type: "title",
881
881
  class: "top-projectSelector_item"
882
882
  }
883
- }), qe = {
883
+ }), Xe = {
884
884
  scheduledUpdate: !1,
885
885
  manualUpdate: !1,
886
886
  guestProjects: !1
887
- }, Je = (e, t) => {
887
+ }, Ze = (e, t) => {
888
888
  let r = [], i = {
889
- scheduledUpdate: Ke(n().Projects.Scheduled_update),
890
- manualUpdate: Ke(n().Projects.Manual_update),
891
- guestProjects: Ke(n().Projects.Guest_projects)
889
+ scheduledUpdate: Ye(n().Projects.Scheduled_update),
890
+ manualUpdate: Ye(n().Projects.Manual_update),
891
+ guestProjects: Ye(n().Projects.Guest_projects)
892
892
  }, a = t ? {
893
893
  scheduledUpdate: !1,
894
894
  manualUpdate: !1,
895
895
  guestProjects: !1
896
- } : qe;
896
+ } : Xe;
897
897
  for (let t of e) !a.scheduledUpdate && t.right?.startsWith("1") && t.on > 0 && (r.push(i.scheduledUpdate), a.scheduledUpdate = !0), !a.manualUpdate && t.right?.startsWith("1") && t.on === 0 && (r.push(i.manualUpdate), a.manualUpdate = !0), !a.guestProjects && t.right?.startsWith("0") && t.on >= 0 && (r.push(i.guestProjects), a.guestProjects = !0), r.push(t);
898
898
  return r;
899
- }, Ye = (e) => ({
899
+ }, Qe = (e) => ({
900
900
  ...e,
901
- externalLink: tt(e.url ?? ""),
901
+ externalLink: it(e.url ?? ""),
902
902
  listItemProps: {
903
903
  class: "top-projectSelector_item",
904
904
  attrs: { title: e.name }
905
905
  }
906
- }), Xe = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(qe).forEach((e) => qe[e] = !1), Je(e.map(Ye), n)), Ze = (e) => {
906
+ }), $e = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(Xe).forEach((e) => Xe[e] = !1), Ze(e.map(Qe), n)), et = (e) => {
907
907
  e = e.replace(/#.*/, "");
908
908
  let t = location.hash;
909
909
  return t = t.replace(/%22historyView%22:[^,]*,/, ""), t = t.replace(/%22modelsKeys%22:\[[^\]]*],/, ""), t = t.replace(/%22competitorsIds%22:\[[^\]]*],/, ""), t = t.replace(/%22searchersKeys%22:\[[^\]]*],/, ""), t = t.replace(/%22regionIndex%22:[^,]*,/, ""), t = t.replace(/%22regionsIndexes%22:\[[^\]]*],/, ""), t = t.replace(/%22folderId%22:[^,]*,/, ""), t = t.replace(/%22groupId%22:[^,]*,/, ""), t = t.replace(/%22tagsIds%22:\[[^\]]*],/, ""), /%22dataSort%22:\{[^}]*0000-00-00[^}]*}/.test(t) || (t = t.replace(/,?%22dataSort%22:\{[^}]*}(,?)/, "$1")), e + t;
910
- }, Qe = (e) => {
911
- location.href = $e(e);
912
- }, $e = (e) => {
913
- let t = et(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
910
+ }, tt = (e) => {
911
+ location.href = nt(e);
912
+ }, nt = (e) => {
913
+ let t = rt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
914
914
  n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
915
915
  "watcher",
916
916
  "indexing",
@@ -920,16 +920,16 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
920
920
  "adwords"
921
921
  ].includes(n[4]) && (i = n[4] + "/");
922
922
  let a = "https://" + t + "/" + r + e + "/" + i;
923
- return a = Ze(a), a;
924
- }, et = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, tt = (e) => {
923
+ return a = et(a), a;
924
+ }, rt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, it = (e) => {
925
925
  let t = e.startsWith("http") ? e : "https://" + e;
926
926
  return t = t.replace(/"/g, "%22"), t;
927
- }, nt = (e, n) => {
927
+ }, at = (e, n) => {
928
928
  let r = e.params.filters ?? [];
929
929
  r = r.filter((e) => e.name !== "GEN_SEARCH_STRING()");
930
- let i = _(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
930
+ let i = v(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
931
931
  n && r.push(t("GEN_SEARCH_STRING()", "REGEXP", [`(${a}|${o})`])), e.changeParams({ filters: r });
932
- }, rt = (n, i = !0) => {
932
+ }, ot = (n, i = !0) => {
933
933
  let a = n.gen("/get/projects_2/projects/", [
934
934
  "id",
935
935
  "user_id",
@@ -949,9 +949,9 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
949
949
  ]
950
950
  }), a.options.loadingShowSpinner = !1, i && (a.options.onApiLoaded = (e, t, n) => {
951
951
  let r = t.data.filters.length > 1, i = t.data.offset === 0, a = t.data.offset === void 0 || i && !r, o = r;
952
- e.result = Xe(e.result, a, o), n?.(e, t);
952
+ e.result = $e(e.result, a, o), n?.(e, t);
953
953
  }), a;
954
- }, it = (e) => {
954
+ }, st = (e) => {
955
955
  let t = () => ({
956
956
  userId: r.state.userId,
957
957
  projectsIds: [],
@@ -971,7 +971,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
971
971
  return { getNextProjectId: async (a, o = !1) => {
972
972
  if (n.isLoading) return;
973
973
  n.userId !== r.state.userId && (n = t());
974
- let s = rt(e, !1);
974
+ let s = ot(e, !1);
975
975
  s.changeParams({ limit: 1e3 });
976
976
  let c;
977
977
  for (n.isLoading = !0, n.needFind = !0; c = i(a, o), n.needFind && !c && n.nextOffset !== null;) {
@@ -982,11 +982,11 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
982
982
  }
983
983
  return n.isLoading = !1, c;
984
984
  } };
985
- }, at = (e) => e.gen("/add/projects_2/projects/"), ot = { class: "top-ellipsis1" }, st = /* @__PURE__ */ N({
985
+ }, ct = (e) => e.gen("/add/projects_2/projects/"), lt = { class: "top-ellipsis1" }, ut = /* @__PURE__ */ M({
986
986
  __name: "submenu",
987
987
  props: { id: {} },
988
988
  setup(e) {
989
- let t = e, i = n(), a = et(), o = (e) => {
989
+ let t = e, i = n(), a = rt(), o = (e) => {
990
990
  let t = [
991
991
  {
992
992
  href: `https://${a}/project/keywords/${e.id}/`,
@@ -1063,44 +1063,44 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1063
1063
  ].filter((e) => !Object.entries(r.state.closedByMod).some(([t, n]) => n && e.href.includes(`/${t}/`)));
1064
1064
  return e.right.includes("0") ? t.filter((t) => e.right[t.right] === "1") : t;
1065
1065
  };
1066
- return (e, n) => (I(), D(B(S), {
1066
+ return (e, n) => (F(), E(B(S), {
1067
1067
  id: t.id,
1068
1068
  class: "top-projectSelectorSubmenu",
1069
1069
  notch: !1,
1070
1070
  pos: "2"
1071
1071
  }, {
1072
- contentList: U(({ data: t }) => [t ? (I(), k(T, { key: 0 }, [(I(!0), k(T, null, R(o(t.projectItem), (t) => (I(), D(B(b), {
1072
+ contentList: U(({ data: t }) => [t ? (F(), O(w, { key: 0 }, [(F(!0), O(w, null, L(o(t.projectItem), (t) => (F(), E(B(x), {
1073
1073
  href: t.href,
1074
1074
  title: t.title,
1075
1075
  "data-top-icon": t.icon,
1076
1076
  "data-right": t.right
1077
1077
  }, {
1078
- default: U(() => [j(z(e.$core.state.isMobile ? t.title : ""), 1)]),
1078
+ default: U(() => [A(z(e.$core.state.isMobile ? t.title : ""), 1)]),
1079
1079
  _: 2
1080
1080
  }, 1032, [
1081
1081
  "href",
1082
1082
  "title",
1083
1083
  "data-top-icon",
1084
1084
  "data-right"
1085
- ]))), 256)), M(B(b), {
1085
+ ]))), 256)), j(B(x), {
1086
1086
  href: t.projectItem.externalLink,
1087
1087
  title: t.projectItem.externalLink,
1088
1088
  class: "top-ellipsis",
1089
1089
  "data-top-icon": "",
1090
1090
  target: "_blank"
1091
1091
  }, {
1092
- default: U(() => [A("span", ot, z(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
1092
+ default: U(() => [k("span", lt, z(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
1093
1093
  _: 2
1094
- }, 1032, ["href", "title"])], 64)) : O("", !0)]),
1094
+ }, 1032, ["href", "title"])], 64)) : D("", !0)]),
1095
1095
  _: 1
1096
1096
  }, 8, ["id"]));
1097
1097
  }
1098
- }), Y = "ui_project_selector_total", ct = 864e5, X = L(null), Z = fe(), lt = (e) => {
1098
+ }), Y = "ui_project_selector_total", dt = 864e5, X = I(null), Z = he(), ft = (e) => {
1099
1099
  localStorage.setItem(Y + ":" + r.state.userId, JSON.stringify({
1100
1100
  projectsTotal: e,
1101
- expiresAt: Date.now() + ct
1101
+ expiresAt: Date.now() + dt
1102
1102
  }));
1103
- }, ut = () => {
1103
+ }, pt = () => {
1104
1104
  let e = localStorage.getItem(Y + ":" + r.state.userId);
1105
1105
  if (!e) return;
1106
1106
  let { projectsTotal: t, expiresAt: n } = JSON.parse(e);
@@ -1109,14 +1109,14 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1109
1109
  return;
1110
1110
  }
1111
1111
  return t;
1112
- }, dt = () => {
1113
- X.value = null, Z.value = void 0, localStorage.removeItem(Y + ":" + r.state.userId), ee("/get/projects_2/projects/");
1114
- }, ft = { class: "top-projectSelector_itemText" }, pt = { class: "top-comment" }, mt = {
1112
+ }, mt = () => {
1113
+ X.value = null, Z.value = void 0, localStorage.removeItem(Y + ":" + r.state.userId), ne("/get/projects_2/projects/");
1114
+ }, ht = { class: "top-projectSelector_itemText" }, gt = { class: "top-comment" }, _t = {
1115
1115
  key: 0,
1116
1116
  class: "top-comment"
1117
- }, ht = ["href"], gt = 1e3, _t = /* @__PURE__ */ N({
1117
+ }, vt = ["href"], yt = 1e3, bt = /* @__PURE__ */ M({
1118
1118
  __name: "projectSelector",
1119
- props: /*@__PURE__*/ P({
1119
+ props: /*@__PURE__*/ N({
1120
1120
  modelValue: {},
1121
1121
  client: {},
1122
1122
  menuMode: { type: Boolean },
@@ -1137,13 +1137,13 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1137
1137
  }),
1138
1138
  emits: ["update:modelValue"],
1139
1139
  setup(e, { expose: t }) {
1140
- let i = n(), a = e, o = V(e, "modelValue"), s = rt(a.client), c = at(a.client), l = L(ut()), u = L(null), d = me(), f = E(() => a.placeholder ?? i.Projects.Select_project), h = E(() => !Z.value || !a.excludeProjectId ? Z.value : Z.value.filter((e) => e.id !== a.excludeProjectId)), { getNextProjectId: g } = it(a.client), _ = async (e = !1) => {
1140
+ let i = n(), a = e, o = V(e, "modelValue"), s = ot(a.client), c = ct(a.client), l = I(pt()), u = I(null), d = _e(), f = T(() => a.placeholder ?? i.Projects.Select_project), p = T(() => !Z.value || !a.excludeProjectId ? Z.value : Z.value.filter((e) => e.id !== a.excludeProjectId)), { getNextProjectId: g } = st(a.client), _ = async (e = !1) => {
1141
1141
  let t = o.value.id;
1142
1142
  if (!t) return;
1143
1143
  let n = await g(t, e);
1144
- n && Qe(n);
1145
- }, y = E(() => {
1146
- if (l.value || l.value === 0) return l.value < gt ? "static" : "api";
1144
+ n && tt(n);
1145
+ }, v = T(() => {
1146
+ if (l.value || l.value === 0) return l.value < yt ? "static" : "api";
1147
1147
  }), b = async () => {
1148
1148
  X.value ||= s.call();
1149
1149
  let e = await X.value;
@@ -1154,8 +1154,8 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1154
1154
  name: e.name
1155
1155
  }).call();
1156
1156
  if (!t.errors) {
1157
- if (Z.value && y.value === "static") {
1158
- let n = Ye({
1157
+ if (Z.value && v.value === "static") {
1158
+ let n = Qe({
1159
1159
  id: t.result,
1160
1160
  user_id: r.state.userId,
1161
1161
  name: e.name,
@@ -1167,39 +1167,39 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1167
1167
  ...Z.value.slice(0, i),
1168
1168
  n,
1169
1169
  ...Z.value.slice(i)
1170
- ], l.value && (l.value += 1, lt(l.value));
1170
+ ], l.value && (l.value += 1, ft(l.value));
1171
1171
  }
1172
- y.value === "api" && u.value?.resetCache(!0);
1172
+ v.value === "api" && u.value?.resetCache(!0);
1173
1173
  }
1174
- }, S = async () => {
1175
- if (Z.value || y.value === "api") return;
1174
+ }, ee = async () => {
1175
+ if (Z.value || v.value === "api") return;
1176
1176
  let e = await b();
1177
1177
  e.errors || (Z.value = e.result);
1178
- }, w = async () => {
1178
+ }, S = async () => {
1179
1179
  if (l.value) {
1180
1180
  let e = u.value?.popupOpenerRef?.$el;
1181
- e && e.addEventListener("pointerenter", () => S(), { once: !0 });
1181
+ e && e.addEventListener("pointerenter", () => ee(), { once: !0 });
1182
1182
  } else {
1183
- s.changeParams({ limit: gt });
1183
+ s.changeParams({ limit: yt });
1184
1184
  let e = await b();
1185
1185
  if (e.errors) return;
1186
- delete s.params.limit, l.value = e.total ?? void 0, !Z.value && y.value !== "api" && (Z.value = e.result), l.value && lt(l.value);
1186
+ delete s.params.limit, l.value = e.total ?? void 0, !Z.value && v.value !== "api" && (Z.value = e.result), l.value && ft(l.value);
1187
1187
  }
1188
1188
  };
1189
- return t({ goToNextProject: _ }), oe(async () => {
1190
- await w();
1189
+ return t({ goToNextProject: _ }), le(async () => {
1190
+ await S();
1191
1191
  }), (t, n) => {
1192
- let r = le("TopButton");
1193
- return I(), k(T, null, [(I(), D(C, {
1194
- key: y.value ?? "dummy",
1192
+ let r = fe("TopButton");
1193
+ return F(), O(w, null, [(F(), E(C, {
1194
+ key: v.value ?? "dummy",
1195
1195
  ref_key: "refSelector",
1196
1196
  ref: u,
1197
1197
  class: "top-projectSelector",
1198
1198
  modelValue: o.value,
1199
- "onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? B(Qe)(t.id) : o.value = t,
1200
- items: h.value,
1199
+ "onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? B(tt)(t.id) : o.value = t,
1200
+ items: p.value,
1201
1201
  itemsChunkSize: 100,
1202
- itemsIsLoading: y.value === "static" && B(Z) === void 0,
1202
+ itemsIsLoading: v.value === "static" && B(Z) === void 0,
1203
1203
  title: t.$i18n.Projects.Search_projects,
1204
1204
  modificator: e.modificator,
1205
1205
  searchFields: [
@@ -1209,29 +1209,29 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1209
1209
  ],
1210
1210
  placeholder: f.value,
1211
1211
  hasCloserBtn: "",
1212
- api: y.value === "api" ? B(s) : void 0,
1213
- apiSetSearchParams: y.value === "api" ? (...e) => B(nt)(...e) : void 0,
1212
+ api: v.value === "api" ? B(s) : void 0,
1213
+ apiSetSearchParams: v.value === "api" ? (...e) => B(at)(...e) : void 0,
1214
1214
  useCache: "",
1215
1215
  appendSearchToResult: "",
1216
1216
  appendSearchAllowDuplicate: "",
1217
- appendSearchToResultCond: B(p),
1217
+ appendSearchToResultCond: B(m),
1218
1218
  appendWithoutSelect: "",
1219
1219
  buttonProps: {
1220
1220
  ...e.buttonProps,
1221
- isProgress: !y.value,
1222
- disabled: !y.value
1221
+ isProgress: !v.value,
1222
+ disabled: !v.value
1223
1223
  },
1224
1224
  openerShortcut: e.openerShortcut,
1225
1225
  onAppendItem: x,
1226
- onOpen: S
1226
+ onOpen: ee
1227
1227
  }, {
1228
- item: U(({ item: i }) => [A("div", ft, [i.id ? (I(), k(T, { key: 0 }, [j(z(B(m)(i.name, 20)) + " ", 1), A("span", pt, " id " + z(i.id), 1)], 64)) : (I(), k(T, { key: 1 }, [i.listItemProps?.type ? O("", !0) : (I(), k("div", mt, z(t.$i18n.Projects.Add_project) + ": ", 1)), j(" " + z(i.name), 1)], 64))]), i.id ? (I(), k(T, { key: 0 }, [
1229
- e.menuMode ? (I(), k("a", {
1228
+ item: U(({ item: i }) => [k("div", ht, [i.id ? (F(), O(w, { key: 0 }, [A(z(B(h)(i.name, 20)) + " ", 1), k("span", gt, " id " + z(i.id), 1)], 64)) : (F(), O(w, { key: 1 }, [i.listItemProps?.type ? D("", !0) : (F(), O("div", _t, z(t.$i18n.Projects.Add_project) + ": ", 1)), A(" " + z(i.name), 1)], 64))]), i.id ? (F(), O(w, { key: 0 }, [
1229
+ e.menuMode ? (F(), O("a", {
1230
1230
  key: 0,
1231
1231
  class: "top-projectSelector_itemLink",
1232
- href: B($e)(i.id)
1233
- }, null, 8, ht)) : O("", !0),
1234
- t.$core.state.isMobile ? O("", !0) : (I(), D(r, {
1232
+ href: B(nt)(i.id)
1233
+ }, null, 8, vt)) : D("", !0),
1234
+ t.$core.state.isMobile ? D("", !0) : (F(), E(r, {
1235
1235
  key: 1,
1236
1236
  href: i.externalLink,
1237
1237
  "data-top-icon": "",
@@ -1239,20 +1239,20 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1239
1239
  target: "_blank",
1240
1240
  onClick: n[0] ||= W(() => {}, ["stop"])
1241
1241
  }, null, 8, ["href"])),
1242
- M(v, {
1242
+ j(y, {
1243
1243
  id: B(d),
1244
1244
  pos: "2",
1245
1245
  notch: !1,
1246
1246
  data: { projectItem: i }
1247
1247
  }, {
1248
- default: U(() => [M(r, {
1248
+ default: U(() => [j(r, {
1249
1249
  class: "top-popup_listMore",
1250
1250
  "data-top-icon": "",
1251
1251
  color: "theme"
1252
1252
  })]),
1253
1253
  _: 1
1254
1254
  }, 8, ["id", "data"])
1255
- ], 64)) : O("", !0)]),
1255
+ ], 64)) : D("", !0)]),
1256
1256
  _: 1
1257
1257
  }, 8, [
1258
1258
  "modelValue",
@@ -1266,43 +1266,43 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1266
1266
  "appendSearchToResultCond",
1267
1267
  "buttonProps",
1268
1268
  "openerShortcut"
1269
- ])), M(st, { id: B(d) }, null, 8, ["id"])], 64);
1269
+ ])), j(ut, { id: B(d) }, null, 8, ["id"])], 64);
1270
1270
  };
1271
1271
  }
1272
- }), vt = (e) => "-" + e, Q = (e) => e[0] === "-" ? e.substring(1) : e, yt = (e, t) => {
1272
+ }), xt = (e) => "-" + e, Q = (e) => e[0] === "-" ? e.substring(1) : e, St = (e, t) => {
1273
1273
  e = Q(e);
1274
1274
  let n = t.find((t) => t.id === e);
1275
1275
  if (n) return n;
1276
- }, bt = (e, t, n) => {
1276
+ }, Ct = (e, t, n) => {
1277
1277
  t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
1278
- let r = c.genElPopupOpener("div", t);
1278
+ let r = l.genElPopupOpener("div", t);
1279
1279
  return r.classList.add("top-tagSelector"), e.useTopButton && r.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || r.classList.add("top-tagSelector-custom"), e.mode === "filter" && r.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && r.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && r.classList.add("top-tagSelector-setter_several"), r.onclick = (t) => {
1280
1280
  t.preventDefault(), t.stopPropagation(), r.onclick = null;
1281
- let i = L(e.modelValue), a = {
1281
+ let i = I(e.modelValue), a = {
1282
1282
  model: i,
1283
1283
  mode: e.mode,
1284
1284
  targetId: e.targetId,
1285
1285
  filters: e.filters,
1286
1286
  payload: e.payload
1287
1287
  };
1288
- s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, re(e.modelValue) || H(i, () => {
1289
- e.modelValue = i.value, St(r, e, n);
1288
+ c(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, ae(e.modelValue) || H(i, () => {
1289
+ e.modelValue = i.value, Tt(r, e, n);
1290
1290
  }), r.click();
1291
- }, re(e.modelValue) ? H(e.modelValue, () => St(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1291
+ }, ae(e.modelValue) ? H(e.modelValue, () => Tt(r, e, n)) : c(r, "topTagSelectorRender", (t) => {
1292
1292
  e.modelValue = t;
1293
- let i = s(r, "topTagSelectorTarget");
1294
- i && (i.model.value = t), St(r, e, n);
1295
- }), St(r, e, n), r;
1296
- }, xt = (e, t) => {
1297
- s(e, "topTagSelectorRender")?.(t);
1298
- }, St = (e, t, r) => {
1293
+ let i = c(r, "topTagSelectorTarget");
1294
+ i && (i.model.value = t), Tt(r, e, n);
1295
+ }), Tt(r, e, n), r;
1296
+ }, wt = (e, t) => {
1297
+ c(e, "topTagSelectorRender")?.(t);
1298
+ }, Tt = (e, t, r) => {
1299
1299
  let i = B(t.modelValue);
1300
1300
  if (e.classList.toggle("top-tagSelector-selectedOne", !i.length || i.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", i.length > 5), t.mode === "setter" && t.filters) {
1301
1301
  e.innerHTML = `<div>${r}</div>`;
1302
1302
  return;
1303
1303
  }
1304
1304
  if (e.innerHTML = "", !i.length && t.mode === "filter") {
1305
- let t = Ct({
1305
+ let t = Et({
1306
1306
  id: "all",
1307
1307
  colorId: "",
1308
1308
  name: n().Common?.All_tags ?? "",
@@ -1311,18 +1311,18 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1311
1311
  e.append(t);
1312
1312
  }
1313
1313
  i.forEach((n) => {
1314
- let r = Ct({
1314
+ let r = Et({
1315
1315
  id: Q(n),
1316
- colorId: yt(n, t.tags)?.color_id ?? "",
1317
- name: yt(n, t.tags)?.name ?? "",
1316
+ colorId: St(n, t.tags)?.color_id ?? "",
1317
+ name: St(n, t.tags)?.name ?? "",
1318
1318
  state: Q(n) === n ? "selected" : "excluded"
1319
1319
  });
1320
1320
  e.append(r);
1321
1321
  });
1322
- }, Ct = (e) => {
1322
+ }, Et = (e) => {
1323
1323
  let t = document.createElement("div");
1324
1324
  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;
1325
- }, wt = [
1325
+ }, Dt = [
1326
1326
  {
1327
1327
  id: "1",
1328
1328
  name: "Without Tag",
@@ -1373,11 +1373,11 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1373
1373
  name: "Turquoise",
1374
1374
  color_id: "10"
1375
1375
  }
1376
- ], Tt = [
1376
+ ], Ot = [
1377
1377
  "data-tag_id",
1378
1378
  "data-tag_color_id",
1379
1379
  "title"
1380
- ], Et = /* @__PURE__ */ N({
1380
+ ], kt = /* @__PURE__ */ M({
1381
1381
  __name: "tagIcon",
1382
1382
  props: {
1383
1383
  id: {},
@@ -1386,8 +1386,8 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1386
1386
  state: {}
1387
1387
  },
1388
1388
  setup(e) {
1389
- return (t, n) => (I(), k("div", {
1390
- class: F({
1389
+ return (t, n) => (F(), O("div", {
1390
+ class: P({
1391
1391
  "top-tagSelector_tagIcon": !0,
1392
1392
  "top-tagSelector-active": !!e.state,
1393
1393
  "top-tagSelector-excluded": e.state === "excluded"
@@ -1395,11 +1395,11 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1395
1395
  "data-tag_id": e.id,
1396
1396
  "data-tag_color_id": e.colorId,
1397
1397
  title: e.name
1398
- }, null, 10, Tt));
1398
+ }, null, 10, Ot));
1399
1399
  }
1400
- }), Dt = ["contenteditable", "onKeydown"], Ot = /* @__PURE__ */ N({
1400
+ }), At = ["contenteditable", "onKeydown"], jt = /* @__PURE__ */ M({
1401
1401
  __name: "tagPopupListItem",
1402
- props: /*@__PURE__*/ P({
1402
+ props: /*@__PURE__*/ N({
1403
1403
  editable: { type: Boolean },
1404
1404
  disabled: { type: Boolean },
1405
1405
  canExclude: { type: Boolean },
@@ -1411,18 +1411,18 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1411
1411
  name: { required: !0 },
1412
1412
  nameModifiers: {}
1413
1413
  }),
1414
- emits: /*@__PURE__*/ P([
1414
+ emits: /*@__PURE__*/ N([
1415
1415
  "update:name",
1416
1416
  "unselect",
1417
1417
  "exclude",
1418
1418
  "select"
1419
1419
  ], ["update:name"]),
1420
1420
  setup(e, { emit: t }) {
1421
- let n = e, r = t, i = V(e, "name"), a = L(null), o = E(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
1421
+ let n = e, r = t, i = V(e, "name"), a = I(null), o = T(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
1422
1422
  contenteditable: s.value,
1423
1423
  onpaste: (e) => e.preventDefault()
1424
- }), s = L(!1), c = async () => {
1425
- s.value = !0, await ae(), a.value?.focus();
1424
+ }), s = I(!1), c = async () => {
1425
+ s.value = !0, await se(), a.value?.focus();
1426
1426
  }, l = () => {
1427
1427
  let e = a.value?.innerText;
1428
1428
  if (!e) return u();
@@ -1434,8 +1434,8 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1434
1434
  let t = "selected";
1435
1435
  n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
1436
1436
  };
1437
- return (t, n) => (I(), D(b, {
1438
- class: F({
1437
+ return (t, n) => (F(), E(x, {
1438
+ class: P({
1439
1439
  "top-tagSelector_tagListItem": !0,
1440
1440
  "top-tagSelector_tagListItem-inEdit": s.value,
1441
1441
  "top-tagSelector_tagListItem-disabled": e.disabled,
@@ -1446,7 +1446,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1446
1446
  onClick: W(d, ["stop"])
1447
1447
  }, {
1448
1448
  default: U(() => [
1449
- M(Et, {
1449
+ j(kt, {
1450
1450
  id: e.id,
1451
1451
  name: i.value,
1452
1452
  colorId: e.colorId,
@@ -1457,31 +1457,31 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1457
1457
  "colorId",
1458
1458
  "state"
1459
1459
  ]),
1460
- A("span", ie({
1460
+ k("span", oe({
1461
1461
  ref_key: "elName",
1462
1462
  ref: a,
1463
1463
  class: "top-tagSelector_tagListItemName",
1464
1464
  contenteditable: s.value ? "plaintext-only" : !1
1465
- }, o.value, { onKeydown: [ge(W(l, ["stop"]), ["enter"]), ge(W(u, ["stop"]), ["esc"])] }), z(i.value), 17, Dt),
1466
- e.editable ? (I(), k(T, { key: 0 }, [s.value ? (I(), k("span", {
1465
+ }, o.value, { onKeydown: [ye(W(l, ["stop"]), ["enter"]), ye(W(u, ["stop"]), ["esc"])] }), z(i.value), 17, At),
1466
+ e.editable ? (F(), O(w, { key: 0 }, [s.value ? (F(), O("span", {
1467
1467
  key: 1,
1468
1468
  "data-top-icon": "",
1469
1469
  class: "top-tagSelector_edit",
1470
1470
  onClick: W(l, ["stop"])
1471
- })) : (I(), k("span", {
1471
+ })) : (F(), O("span", {
1472
1472
  key: 0,
1473
1473
  "data-top-icon": "",
1474
1474
  class: "top-tagSelector_edit",
1475
1475
  onClick: c
1476
- }))], 64)) : O("", !0)
1476
+ }))], 64)) : D("", !0)
1477
1477
  ]),
1478
1478
  _: 1
1479
1479
  }, 8, ["class"]));
1480
1480
  }
1481
- }), kt = { key: 1 }, At = /* @__PURE__ */ N({
1481
+ }), Mt = { key: 1 }, Nt = /* @__PURE__ */ M({
1482
1482
  inheritAttrs: !1,
1483
1483
  __name: "popupOpener",
1484
- props: /*@__PURE__*/ P({
1484
+ props: /*@__PURE__*/ N({
1485
1485
  modelValue: {},
1486
1486
  id: {},
1487
1487
  tags: {},
@@ -1505,9 +1505,9 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1505
1505
  payload: n.payload
1506
1506
  };
1507
1507
  return (a, c) => {
1508
- let l = ue("top-data");
1509
- return I(), D(v, { id: e.id }, {
1510
- default: U(() => [he((I(), D(de(B(i)), ie({
1508
+ let l = pe("top-data");
1509
+ return F(), E(y, { id: e.id }, {
1510
+ default: U(() => [ve((F(), E(me(B(i)), oe({
1511
1511
  class: {
1512
1512
  "top-tagSelector": !0,
1513
1513
  "top-tagSelector-useTopButton": n.useTopButton,
@@ -1522,16 +1522,16 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1522
1522
  color: "theme",
1523
1523
  styling: e.styling
1524
1524
  }, t), {
1525
- [B(o)]: U(() => [!r.value.length && e.mode === "filter" ? (I(), D(Et, {
1525
+ [B(o)]: U(() => [!r.value.length && e.mode === "filter" ? (F(), E(kt, {
1526
1526
  key: 0,
1527
1527
  id: "all",
1528
1528
  colorId: "",
1529
1529
  name: a.$i18n.Common.All_tags ?? "",
1530
1530
  state: ""
1531
- }, null, 8, ["name"])) : O("", !0), e.mode === "setter" && e.filters ? (I(), k("div", kt, [ce(a.$slots, "default")])) : (I(!0), k(T, { key: 2 }, R(r.value, (t) => (I(), D(Et, {
1531
+ }, null, 8, ["name"])) : D("", !0), e.mode === "setter" && e.filters ? (F(), O("div", Mt, [R(a.$slots, "default")])) : (F(!0), O(w, { key: 2 }, L(r.value, (t) => (F(), E(kt, {
1532
1532
  id: B(Q)(t),
1533
- colorId: B(yt)(t, e.tags)?.color_id ?? "",
1534
- name: B(yt)(t, e.tags)?.name ?? "",
1533
+ colorId: B(St)(t, e.tags)?.color_id ?? "",
1534
+ name: B(St)(t, e.tags)?.name ?? "",
1535
1535
  state: B(Q)(t) === t ? "selected" : "excluded"
1536
1536
  }, null, 8, [
1537
1537
  "id",
@@ -1549,9 +1549,9 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1549
1549
  }, 8, ["id"]);
1550
1550
  };
1551
1551
  }
1552
- }), jt = /* @__PURE__ */ N({
1552
+ }), Pt = /* @__PURE__ */ M({
1553
1553
  __name: "tagSelector",
1554
- props: /*@__PURE__*/ P({
1554
+ props: /*@__PURE__*/ N({
1555
1555
  modelValue: {},
1556
1556
  tags: {},
1557
1557
  tagsEditable: { type: Boolean },
@@ -1572,32 +1572,32 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1572
1572
  }, {
1573
1573
  modelValue: { required: !0 },
1574
1574
  modelModifiers: {},
1575
- tags: { default: se(wt) },
1575
+ tags: { default: de(Dt) },
1576
1576
  tagsModifiers: {}
1577
1577
  }),
1578
- emits: /*@__PURE__*/ P([
1578
+ emits: /*@__PURE__*/ N([
1579
1579
  "selector",
1580
1580
  "setter",
1581
1581
  "tagsChanged"
1582
1582
  ], ["update:modelValue", "update:tags"]),
1583
1583
  setup(e, { emit: t }) {
1584
- let c = n(), l = e, u = V(e, "modelValue"), d = V(e, "tags"), f = t, p = i((e, t) => {
1584
+ let o = n(), l = e, u = V(e, "modelValue"), d = V(e, "tags"), f = t, p = i((e, t) => {
1585
1585
  f(e, t);
1586
1586
  }, l.emitDelay);
1587
1587
  l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
1588
- let m = l.id ?? "top-popup-id-" + Math.random(), h = L("add"), g = () => {
1589
- let e = " " + c.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
1588
+ let m = l.id ?? "top-popup-id-" + Math.random(), h = I("add"), g = () => {
1589
+ let e = " " + o.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
1590
1590
  return t.set("add", {
1591
1591
  value: "add",
1592
- title: c.Common.Add + e
1592
+ title: o.Common.Add + e
1593
1593
  }), t.set("replace", {
1594
1594
  value: "replace",
1595
- title: c.Common.Replace + e
1595
+ title: o.Common.Replace + e
1596
1596
  }), t.set("delete", {
1597
1597
  value: "delete",
1598
- title: c.Common.Delete + e
1598
+ title: o.Common.Delete + e
1599
1599
  }), t;
1600
- }, _ = fe({
1600
+ }, _ = he({
1601
1601
  model: u,
1602
1602
  mode: "filter",
1603
1603
  targetId: void 0,
@@ -1607,25 +1607,25 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1607
1607
  H(u, () => {
1608
1608
  p("selector", u.value);
1609
1609
  });
1610
- let v = E(() => {
1610
+ let v = T(() => {
1611
1611
  if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
1612
1612
  }), y = (e) => {
1613
1613
  if (e !== "all") {
1614
1614
  if (_.value.model.value.includes(e)) return "selected";
1615
- if (_.value.model.value.includes(vt(e))) return "excluded";
1615
+ if (_.value.model.value.includes(xt(e))) return "excluded";
1616
1616
  }
1617
1617
  return e === "all" && !_.value.model.value.length ? "selected" : "";
1618
- }, x = (e, t) => {
1619
- let n = vt(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
1618
+ }, b = (e, t) => {
1619
+ let n = xt(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
1620
1620
  t === "select" && r.push(e), t === "exclude" && r.push(n), _.value.mode === "setter" && _.value.targetId !== void 0 && l.requiredForSetter && (r.length || r.push("1"), r.length === 2 && _.value.model.value.length === 1 && _.value.model.value[0] === "1" && (r = r.filter((e) => e !== "1"))), l.singleMode && !_.value.filters && (r.length || (r = _.value.model.value), r.length > 1 && (r = [r[r.length - 1]])), r.sort((e, t) => l.tags ? l.tags.findIndex((t) => t.id === e) - l.tags.findIndex((e) => e.id === t) : 0), _.value.model.value = r, _.value.mode === "setter" && _.value.targetId !== void 0 && p("setter", {
1621
1621
  tagsIds: r,
1622
1622
  targetId: _.value.targetId,
1623
1623
  payload: _.value.payload
1624
1624
  });
1625
- }, C = E(() => {
1625
+ }, ee = T(() => {
1626
1626
  let e = "top-tagSelector_popup";
1627
1627
  return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
1628
- }), w = () => {
1628
+ }), C = () => {
1629
1629
  let e = prompt("", "New tag");
1630
1630
  if (!e || e === "New tag") return;
1631
1631
  let t = d.value.length + 1;
@@ -1634,8 +1634,8 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1634
1634
  name: e,
1635
1635
  color_id: String((t - 1) % 10 + 1)
1636
1636
  }), f("tagsChanged", d.value);
1637
- }, ee = (e) => {
1638
- if (_.value = s(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1637
+ }, te = (e) => {
1638
+ if (_.value = c(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1639
1639
  if (_.value.filters && (h.value = "add", _.value.model.value = []), !r.$?.ui.sortable) {
1640
1640
  console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
1641
1641
  return;
@@ -1654,10 +1654,10 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1654
1654
  }), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
1655
1655
  }
1656
1656
  });
1657
- }, te = (e) => {
1657
+ }, ne = (e) => {
1658
1658
  r.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
1659
1659
  };
1660
- return (t, n) => (I(), k(T, null, [M(At, {
1660
+ return (t, n) => (F(), O(w, null, [j(Nt, {
1661
1661
  modelValue: u.value,
1662
1662
  "onUpdate:modelValue": n[0] ||= (e) => u.value = e,
1663
1663
  id: B(m),
@@ -1671,23 +1671,23 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1671
1671
  "tags",
1672
1672
  "styling",
1673
1673
  "useTopButton"
1674
- ]), M(S, {
1674
+ ]), j(S, {
1675
1675
  id: B(m),
1676
- class: F(C.value),
1677
- onOpen: n[4] ||= (e) => ee(e),
1678
- onClose: n[5] ||= (e) => te(e),
1676
+ class: P(ee.value),
1677
+ onOpen: n[4] ||= (e) => te(e),
1678
+ onClose: n[5] ||= (e) => ne(e),
1679
1679
  "transition-duration": 50
1680
- }, ne({
1680
+ }, ie({
1681
1681
  contentList: U(() => [
1682
- _.value.mode === "filter" && !e.singleMode ? (I(), D(Ot, {
1682
+ _.value.mode === "filter" && !e.singleMode ? (F(), E(jt, {
1683
1683
  key: 0,
1684
1684
  id: "all",
1685
1685
  colorId: "",
1686
1686
  name: t.$i18n.Common.All_tags ?? "",
1687
1687
  state: _.value.model.value.length ? "" : "selected",
1688
1688
  onSelect: n[3] ||= (e) => _.value.model.value = []
1689
- }, null, 8, ["name", "state"])) : O("", !0),
1690
- (I(!0), k(T, null, R(d.value, (t) => (I(), D(Ot, {
1689
+ }, null, 8, ["name", "state"])) : D("", !0),
1690
+ (F(!0), O(w, null, L(d.value, (t) => (F(), E(jt, {
1691
1691
  key: t.id,
1692
1692
  id: t.id,
1693
1693
  colorId: t.color_id,
@@ -1696,9 +1696,9 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1696
1696
  canExclude: _.value.mode === "filter" && !e.singleMode,
1697
1697
  editable: e.tagsEditable,
1698
1698
  disabled: v.value && y(t.id) === "",
1699
- onUnselect: (e) => x(t.id, "unselect"),
1700
- onSelect: (e) => x(t.id, "select"),
1701
- onExclude: (e) => x(t.id, "exclude"),
1699
+ onUnselect: (e) => b(t.id, "unselect"),
1700
+ onSelect: (e) => b(t.id, "select"),
1701
+ onExclude: (e) => b(t.id, "exclude"),
1702
1702
  "onUpdate:name": (e) => {
1703
1703
  t.name = e, B(p)("tagsChanged", d.value);
1704
1704
  }
@@ -1715,19 +1715,19 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1715
1715
  "onExclude",
1716
1716
  "onUpdate:name"
1717
1717
  ]))), 128)),
1718
- e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (I(), D(b, {
1718
+ e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (F(), E(x, {
1719
1719
  key: 1,
1720
1720
  "data-top-icon": "",
1721
- onClick: W(w, ["stop"])
1721
+ onClick: W(C, ["stop"])
1722
1722
  }, {
1723
- default: U(() => [j(z(t.$i18n.Common.Add), 1)]),
1723
+ default: U(() => [A(z(t.$i18n.Common.Add), 1)]),
1724
1724
  _: 1
1725
- })) : O("", !0)
1725
+ })) : D("", !0)
1726
1726
  ]),
1727
1727
  _: 2
1728
1728
  }, [_.value.mode === "setter" && _.value.filters ? {
1729
1729
  name: "header",
1730
- fn: U(() => [M(o, {
1730
+ fn: U(() => [j(s, {
1731
1731
  modelValue: h.value,
1732
1732
  "onUpdate:modelValue": n[1] ||= (e) => h.value = e,
1733
1733
  options: g()
@@ -1735,23 +1735,214 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
1735
1735
  key: "0"
1736
1736
  } : void 0, _.value.mode === "setter" && _.value.filters ? {
1737
1737
  name: "footer",
1738
- fn: U(() => [M(a, { color: "theme" }, {
1739
- default: U(() => [j(z(t.$i18n.Common.Cancel), 1)]),
1738
+ fn: U(() => [j(a, { color: "theme" }, {
1739
+ default: U(() => [A(z(t.$i18n.Common.Cancel), 1)]),
1740
1740
  _: 1
1741
- }), M(a, { onClick: n[2] ||= (e) => B(p)("setter", {
1741
+ }), j(a, { onClick: n[2] ||= (e) => B(p)("setter", {
1742
1742
  tagsIds: _.value.model.value,
1743
1743
  filters: _.value.filters,
1744
1744
  filtersAction: h.value,
1745
1745
  payload: _.value.payload
1746
1746
  }) }, {
1747
- default: U(() => [j(z(h.value === "add" ? t.$i18n.Common.Add : "") + " " + z(h.value === "replace" ? t.$i18n.Common.Replace : "") + " " + z(h.value === "delete" ? t.$i18n.Common.Delete : ""), 1)]),
1747
+ default: U(() => [A(z(h.value === "add" ? t.$i18n.Common.Add : "") + " " + z(h.value === "replace" ? t.$i18n.Common.Replace : "") + " " + z(h.value === "delete" ? t.$i18n.Common.Delete : ""), 1)]),
1748
1748
  _: 1
1749
1749
  })]),
1750
1750
  key: "1"
1751
1751
  } : void 0]), 1032, ["id", "class"])], 64));
1752
1752
  }
1753
+ }), Ft = (e) => {
1754
+ let t = e.getPropertyValue("rule").trim();
1755
+ if (!t) return {};
1756
+ let n = t.match(/(?:^|\s)(\d*\.?\d+)px(?:\s|$)/), r = n ? Number.parseFloat(n[1]) : void 0;
1757
+ return {
1758
+ color: t.replace(n?.[0] ?? "", " ").replace(/\b(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)\b/, "").trim() || void 0,
1759
+ width: Number.isFinite(r) ? r : void 0
1760
+ };
1761
+ }, It = (e, t, n) => {
1762
+ let r = CSS.supports("rule", "1px solid") ? e.getPropertyValue(`${t}-rule-style`).trim() : "";
1763
+ return n ?? (r || e.getPropertyValue(`--flex-${t}-rule`).trim() || "solid");
1764
+ }, Lt = (e, t, n) => {
1765
+ let r = t.getBoundingClientRect(), i = r.width / (t.clientWidth || 1), a = r.height / (t.clientHeight || 1), o = n.flexDirection.startsWith("row"), s = n.flexDirection.endsWith("reverse"), c = o ? n.direction === "rtl" === s : !s;
1766
+ return Array.from(e.children).filter((e) => e instanceof HTMLElement && e !== t).flatMap((e, t) => {
1767
+ let n = getComputedStyle(e);
1768
+ if (n.display === "none" || n.position === "absolute" || n.position === "fixed") return [];
1769
+ let s = e.getBoundingClientRect();
1770
+ if (s.width === 0 || s.height === 0) return [];
1771
+ let l = {
1772
+ left: (s.left - r.left) / i,
1773
+ right: (s.right - r.left) / i,
1774
+ top: (s.top - r.top) / a,
1775
+ bottom: (s.bottom - r.top) / a
1776
+ }, u = o ? l.left : l.top, d = o ? l.right : l.bottom;
1777
+ return [{
1778
+ index: t,
1779
+ order: Number.parseInt(n.order, 10) || 0,
1780
+ box: l,
1781
+ mainStart: c ? u : -d,
1782
+ mainEnd: c ? d : -u,
1783
+ crossStart: o ? l.top : l.left,
1784
+ crossEnd: o ? l.bottom : l.right
1785
+ }];
1786
+ }).sort((e, t) => e.order - t.order || e.index - t.index);
1787
+ }, Rt = (e, t) => {
1788
+ let n = [];
1789
+ for (let r of e) {
1790
+ let e = n[n.length - 1];
1791
+ if (!e || t !== "nowrap" && r.mainStart < e.lastMainEnd - .5) {
1792
+ n.push({
1793
+ items: [r],
1794
+ crossStart: r.crossStart,
1795
+ crossEnd: r.crossEnd,
1796
+ lastMainEnd: r.mainEnd
1797
+ });
1798
+ continue;
1799
+ }
1800
+ e.items.push(r), e.crossStart = Math.min(e.crossStart, r.crossStart), e.crossEnd = Math.max(e.crossEnd, r.crossEnd), e.lastMainEnd = r.mainEnd;
1801
+ }
1802
+ return n;
1803
+ }, zt = (e, t, n, r) => {
1804
+ let i = getComputedStyle(e), a = Ft(i), o = t.clientWidth, s = t.clientHeight, c = window.devicePixelRatio || 1, l = Math.round(o * c), u = Math.round(s * c);
1805
+ if ((t.width !== l || t.height !== u) && (t.width = l, t.height = u), n.setTransform(c, 0, 0, c, 0, 0), n.clearRect(0, 0, o, s), o === 0 || s === 0) return;
1806
+ let d = Rt(Lt(e, t, i), i.flexWrap), f = i.flexDirection.startsWith("row"), p = Number.parseFloat(f ? i.paddingLeft : i.paddingTop) || 0, m = (f ? o : s) - (Number.parseFloat(f ? i.paddingRight : i.paddingBottom) || 0), h = CSS.supports("rule-inset", "0px") ? i.getPropertyValue("rule-inset").trim() : "", g = r.inset ?? (h || i.getPropertyValue("--flex-rule-inset").trim()), _ = (typeof g == "number" ? `${g}px` : g.trim()).replace(/^(.+?)\s*\/\s*\1$/, "$1").match(/^(-?\d*\.?\d+px|0)(?:\s+(-?\d*\.?\d+px|0))?$/), v = _ ? Number.parseFloat(_[1]) : 0, y = _ ? Number.parseFloat(_[2] ?? _[1]) : 0, b = It(i, "row", r.rowRule), x = It(i, "column", r.columnRule);
1807
+ n.strokeStyle = r.color ?? a.color ?? (i.getPropertyValue("--flex-rule-color").trim() || i.color), n.lineWidth = r.width ?? a.width ?? (Number.parseFloat(i.getPropertyValue("--flex-rule-width")) || 1), n.beginPath();
1808
+ for (let e of d) if ((f ? x : b) === "solid") for (let t = 1; t < e.items.length; t++) {
1809
+ let r = e.items[t - 1], a = e.items[t];
1810
+ if (a.mainStart < r.mainEnd - .5) continue;
1811
+ let o = (r.mainEnd + a.mainStart) / 2, s = (f ? i.direction === "rtl" !== i.flexDirection.endsWith("reverse") : i.flexDirection.endsWith("reverse")) ? -o : o, c = e.crossStart + v, l = e.crossEnd - y;
1812
+ c >= l || (f ? (n.moveTo(s, c), n.lineTo(s, l)) : (n.moveTo(c, s), n.lineTo(l, s)));
1813
+ }
1814
+ for (let e = 1; e < d.length; e++) {
1815
+ if ((f ? b : x) !== "solid") continue;
1816
+ let t = d[e - 1], r = d[e], i = t.crossEnd <= r.crossStart, a = r.crossEnd <= t.crossStart;
1817
+ if (!i && !a) continue;
1818
+ let o = i ? (t.crossEnd + r.crossStart) / 2 : (r.crossEnd + t.crossStart) / 2, s = p + v, c = m - y;
1819
+ s >= c || (f ? (n.moveTo(s, o), n.lineTo(c, o)) : (n.moveTo(o, s), n.lineTo(o, c)));
1820
+ }
1821
+ n.stroke();
1822
+ }, Bt = (e, t = {}) => {
1823
+ if (!t.force && CSS.supports("rule", "1px solid")) return () => {};
1824
+ if (!["flex", "inline-flex"].includes(getComputedStyle(e).display)) throw TypeError("polyfillFlexRule expects display: flex or inline-flex");
1825
+ let n = document.createElement("canvas");
1826
+ n.dataset.flexRuleOverlay = "", n.setAttribute("aria-hidden", "true"), Object.assign(n.style, {
1827
+ position: "absolute",
1828
+ inset: "0",
1829
+ width: "100%",
1830
+ height: "100%",
1831
+ pointerEvents: "none",
1832
+ zIndex: "1"
1833
+ });
1834
+ let r = e.style.position, i = getComputedStyle(e).position === "static";
1835
+ i && (e.style.position = "relative"), e.append(n);
1836
+ let a = n.getContext("2d");
1837
+ if (!a) throw n.remove(), i && (e.style.position = r), Error("Canvas 2D is unavailable");
1838
+ let o = 0, s = !1, c = () => {
1839
+ !o && !s && (o = requestAnimationFrame(() => {
1840
+ o = 0, zt(e, n, a, t);
1841
+ }));
1842
+ }, l = new ResizeObserver(c), u = () => {
1843
+ l.disconnect(), l.observe(e);
1844
+ for (let t of Array.from(e.children)) t instanceof HTMLElement && t !== n && l.observe(t);
1845
+ c();
1846
+ }, d = new MutationObserver((t) => {
1847
+ if (t.some((t) => t.type === "childList" && t.target === e)) {
1848
+ u();
1849
+ return;
1850
+ }
1851
+ c();
1852
+ });
1853
+ return d.observe(e, {
1854
+ childList: !0,
1855
+ subtree: !0,
1856
+ attributes: !0,
1857
+ attributeFilter: [
1858
+ "class",
1859
+ "style",
1860
+ "hidden",
1861
+ "dir"
1862
+ ]
1863
+ }), window.addEventListener("resize", c), window.addEventListener("scroll", c, !0), e.addEventListener("scroll", c), e.addEventListener("transitionend", c, !0), e.addEventListener("animationend", c, !0), u(), () => {
1864
+ s = !0, cancelAnimationFrame(o), d.disconnect(), l.disconnect(), window.removeEventListener("resize", c), window.removeEventListener("scroll", c, !0), e.removeEventListener("scroll", c), e.removeEventListener("transitionend", c, !0), e.removeEventListener("animationend", c, !0), n.remove(), i && (e.style.position = r);
1865
+ };
1866
+ }, Vt = {
1867
+ key: 0,
1868
+ class: "top-projectBarLeft"
1869
+ }, Ht = { class: "top-projectBarFilters" }, Ut = { class: "top-projectBarRight" }, Wt = {
1870
+ key: 1,
1871
+ class: "top-projectBarBottom"
1872
+ }, Gt = /* @__PURE__ */ M({
1873
+ __name: "projectBar",
1874
+ props: /*@__PURE__*/ N({
1875
+ styling: { default: "default" },
1876
+ isSticky: { type: Boolean },
1877
+ canChangeSticky: {
1878
+ type: Boolean,
1879
+ default: !1
1880
+ }
1881
+ }, {
1882
+ isSticky: {
1883
+ type: Boolean,
1884
+ default: !0
1885
+ },
1886
+ isStickyModifiers: {}
1887
+ }),
1888
+ emits: /*@__PURE__*/ N(["resize"], ["update:isSticky"]),
1889
+ setup(e, { emit: t, slots: n }) {
1890
+ let r = t, i = I(null), s = I("0px"), c = V(e, "isSticky"), l, u = () => {
1891
+ i.value && (s.value = `${i.value.getBoundingClientRect().height}px`);
1892
+ }, d = (e) => {
1893
+ let t = e[0];
1894
+ t && (u(), r("resize", t));
1895
+ };
1896
+ return le(() => {
1897
+ i.value && (u(), l = new ResizeObserver(d), l.observe(i.value), [i.value, ...i.value.querySelectorAll(".top-projectBarFilters, .top-regionSelector, .top-groupSelector")].forEach((e) => Bt(e)));
1898
+ }), ue(() => {
1899
+ l?.disconnect();
1900
+ }), (t, r) => (F(), O("div", {
1901
+ ref_key: "elBar",
1902
+ ref: i,
1903
+ class: P(["top-projectBar", {
1904
+ "top-projectBar": !0,
1905
+ "top-projectBar-sticky": c.value,
1906
+ ["top-projectBar-" + e.styling]: !0
1907
+ }]),
1908
+ style: ce({ "--topProjectBar-height": s.value })
1909
+ }, [
1910
+ n.left ? (F(), O("div", Vt, [R(t.$slots, "left")])) : D("", !0),
1911
+ k("div", Ht, [R(t.$slots, "default")]),
1912
+ k("div", Ut, [n.right ? R(t.$slots, "right", {}, void 0, void 0, 0) : D("", !0), j(B(S), {
1913
+ notch: !1,
1914
+ pos: "2"
1915
+ }, {
1916
+ opener: U(() => [j(B(a), {
1917
+ color: "theme",
1918
+ icon: "",
1919
+ title: t.$i18n.Common.Settings
1920
+ }, null, 8, ["title"])]),
1921
+ contentList: U(() => [
1922
+ R(t.$slots, "menuItems"),
1923
+ R(t.$slots, "menuAdditional"),
1924
+ e.canChangeSticky ? (F(), O(w, { key: 0 }, [j(B(x), { type: "title" }, {
1925
+ default: U(() => [A(z(t.$i18n.Common.View), 1)]),
1926
+ _: 1
1927
+ }), j(B(x), { type: "formControls" }, {
1928
+ default: U(() => [j(B(o), {
1929
+ modelValue: c.value,
1930
+ "onUpdate:modelValue": r[0] ||= (e) => c.value = e,
1931
+ name: "pin"
1932
+ }, {
1933
+ default: U(() => [A(z(t.$i18n.Common.Bar_pin), 1)]),
1934
+ _: 1
1935
+ }, 8, ["modelValue"])]),
1936
+ _: 1
1937
+ })], 64)) : D("", !0)
1938
+ ]),
1939
+ _: 3
1940
+ })]),
1941
+ n.bottom ? (F(), O("div", Wt, [R(t.$slots, "bottom")])) : D("", !0)
1942
+ ], 6));
1943
+ }
1753
1944
  });
1754
1945
  //#endregion
1755
- export { ye as TopCompetitorSelector, Ge as TopGroupSelector, _t as TopProjectSelector, Te as TopRegionSelector, jt as TopTagSelector, At as TopTagSelectorPopupOpener, Et as TopTagSelectorTagIcon, d as dialogRegionSelector, f as findRegion, bt as genElTopTagSelectorPopupOpener, u as genSearcherByKey, xt as renderElTopTagSelectorPopupOpener, dt as topProjectSelectorClearCache, be as useItemsFromCompetitors };
1946
+ export { Se as TopCompetitorSelector, Je as TopGroupSelector, Gt as TopProjectBar, bt as TopProjectSelector, Oe as TopRegionSelector, Pt as TopTagSelector, Nt as TopTagSelectorPopupOpener, kt as TopTagSelectorTagIcon, f as dialogRegionSelector, p as findRegion, Ct as genElTopTagSelectorPopupOpener, d as genSearcherByKey, wt as renderElTopTagSelectorPopupOpener, mt as topProjectSelectorClearCache, Ce as useItemsFromCompetitors };
1756
1947
 
1757
1948
  //# sourceMappingURL=project.js.map