@topvisor/ui 1.5.0-updates.1 → 1.5.0-updates.7

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 (116) hide show
  1. package/.chunks/api-CawzY1Cw.amd.js +1 -1
  2. package/.chunks/api-CawzY1Cw.amd.js.map +1 -1
  3. package/.chunks/app-CCX-gNqz.amd.js +1 -1
  4. package/.chunks/app-CCX-gNqz.amd.js.map +1 -1
  5. package/.chunks/datepicker-BTkZOq7d.amd.js +1 -1
  6. package/.chunks/datepicker-BTkZOq7d.amd.js.map +1 -1
  7. package/.chunks/dialog-DeM4SApg.amd.js +1 -1
  8. package/.chunks/dialog-DeM4SApg.amd.js.map +1 -1
  9. package/.chunks/dialog_regionSelectorRegions-CYrmaDt3.amd.js +1 -1
  10. package/.chunks/dialog_regionSelectorRegions-CYrmaDt3.amd.js.map +1 -1
  11. package/.chunks/dialogs-CMrERMI7.amd.js +1 -1
  12. package/.chunks/dialogs-CMrERMI7.amd.js.map +1 -1
  13. package/.chunks/field-CjkpGeA7.amd.js +1 -1
  14. package/.chunks/field-CjkpGeA7.amd.js.map +1 -1
  15. package/.chunks/forms-CbUt-6Ff.amd.js +1 -1
  16. package/.chunks/forms-CbUt-6Ff.amd.js.map +1 -1
  17. package/.chunks/formsExt-CrTmBhja.amd.js +1 -1
  18. package/.chunks/formsExt-CrTmBhja.amd.js.map +1 -1
  19. package/.chunks/lazy-CGswTOPj.amd.js +1 -1
  20. package/.chunks/lazy-CGswTOPj.amd.js.map +1 -1
  21. package/.chunks/mocker-CwZe-g4N.amd.js +1 -1
  22. package/.chunks/mocker-CwZe-g4N.amd.js.map +1 -1
  23. package/.chunks/notice-CslVdVNm.amd.js +2 -2
  24. package/.chunks/notice-CslVdVNm.amd.js.map +1 -1
  25. package/.chunks/popup-DrByVU-k.amd.js +1 -1
  26. package/.chunks/popup-DrByVU-k.amd.js.map +1 -1
  27. package/.chunks/popup-dNrN-eKi.amd.js +1 -1
  28. package/.chunks/popup-dNrN-eKi.amd.js.map +1 -1
  29. package/.chunks/punycode.es6-B-5kB2YI.amd.js +1 -1
  30. package/.chunks/punycode.es6-B-5kB2YI.amd.js.map +1 -1
  31. package/.chunks/store-DuQpSSLL.amd.js +1 -1
  32. package/.chunks/store-DuQpSSLL.amd.js.map +1 -1
  33. package/.chunks/utils-BwiXsV0S.amd.js +1 -1
  34. package/.chunks/utils-BwiXsV0S.amd.js.map +1 -1
  35. package/.chunks/utils-Dd0MZgyw.amd.js +1 -1
  36. package/.chunks/utils-Dd0MZgyw.amd.js.map +1 -1
  37. package/.chunks/worker-Db8YrEHo.amd.js +1 -1
  38. package/.chunks/worker-Db8YrEHo.amd.js.map +1 -1
  39. package/api/additional.amd.js +1 -1
  40. package/api/additional.amd.js.map +1 -1
  41. package/api/index.amd.js +1 -1
  42. package/api/index.amd.js.map +1 -1
  43. package/charts/charts.amd.js +1 -1
  44. package/charts/charts.amd.js.map +1 -1
  45. package/core/app.amd.js +1 -1
  46. package/core/app.amd.js.map +1 -1
  47. package/dialog/dialog.amd.js +1 -1
  48. package/dialog/dialog.amd.js.map +1 -1
  49. package/extra/extra.amd.js +1 -1
  50. package/extra/extra.amd.js.map +1 -1
  51. package/forms/forms.amd.js +1 -1
  52. package/forms/forms.amd.js.map +1 -1
  53. package/forms/helpers.amd.js +1 -1
  54. package/forms/helpers.amd.js.map +1 -1
  55. package/formsExt/formsExt.amd.js +1 -1
  56. package/formsExt/formsExt.amd.js.map +1 -1
  57. package/icomoon/demo-files/demo.amd.js +1 -1
  58. package/icomoon/demo-files/demo.amd.js.map +1 -1
  59. package/icomoon/demo.amd.js +1 -1
  60. package/icomoon/demo.amd.js.map +1 -1
  61. package/layout/layout.amd.js +1 -1
  62. package/layout/layout.amd.js.map +1 -1
  63. package/package.json +1 -1
  64. package/popup/popup.amd.js +1 -1
  65. package/popup/popup.amd.js.map +1 -1
  66. package/popup/worker.amd.js +1 -1
  67. package/popup/worker.amd.js.map +1 -1
  68. package/project/project.amd.js +1 -1
  69. package/project/project.amd.js.map +1 -1
  70. package/project/project.js +166 -185
  71. package/project/project.js.map +1 -1
  72. package/src/src/components/project/groupSelector/folders/types.d.ts +1 -1
  73. package/src/src/components/project/groupSelector/folders/utils.d.ts +35 -400
  74. package/src/src/components/project/groupSelector/groupSelector.vue.d.ts +1 -1
  75. package/src/src/components/project/groupSelector/groups/types.d.ts +1 -1
  76. package/src/src/components/project/groupSelector/groups/utils.d.ts +44 -757
  77. package/src/src/components/project/projectSelector/utils.d.ts +40 -39
  78. package/tabs/tabs.amd.js +1 -1
  79. package/tabs/tabs.amd.js.map +1 -1
  80. package/tabsView/tabsView.amd.js +1 -1
  81. package/tabsView/tabsView.amd.js.map +1 -1
  82. package/utils/check.amd.js +1 -1
  83. package/utils/check.amd.js.map +1 -1
  84. package/utils/clipboard.amd.js +4 -4
  85. package/utils/clipboard.amd.js.map +1 -1
  86. package/utils/date.amd.js +1 -1
  87. package/utils/date.amd.js.map +1 -1
  88. package/utils/device.amd.js +1 -1
  89. package/utils/device.amd.js.map +1 -1
  90. package/utils/dom.amd.js +1 -1
  91. package/utils/dom.amd.js.map +1 -1
  92. package/utils/image.amd.js +1 -1
  93. package/utils/image.amd.js.map +1 -1
  94. package/utils/keyboard.amd.js +1 -1
  95. package/utils/keyboard.amd.js.map +1 -1
  96. package/utils/lodash.amd.js +1 -1
  97. package/utils/lodash.amd.js.map +1 -1
  98. package/utils/number.amd.js +1 -1
  99. package/utils/number.amd.js.map +1 -1
  100. package/utils/price.amd.js +1 -1
  101. package/utils/price.amd.js.map +1 -1
  102. package/utils/route.amd.js +1 -1
  103. package/utils/route.amd.js.map +1 -1
  104. package/utils/scroll.amd.js +1 -1
  105. package/utils/scroll.amd.js.map +1 -1
  106. package/utils/searchers.amd.js +1 -1
  107. package/utils/searchers.amd.js.map +1 -1
  108. package/utils/store.amd.js +1 -1
  109. package/utils/store.amd.js.map +1 -1
  110. package/utils/string.amd.js +1 -1
  111. package/utils/string.amd.js.map +1 -1
  112. package/utils/system.amd.js +1 -1
  113. package/utils/system.amd.js.map +1 -1
  114. package/utils/url.amd.js +2 -2
  115. package/utils/url.amd.js.map +1 -1
  116. package/src/src/components/project/groupSelector/utils.d.ts +0 -37
@@ -464,45 +464,30 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
464
464
  }, 8, ["data-count-compare-regions-indexes"])) : w("", !0)
465
465
  ], 2));
466
466
  }
467
- }), H = (e) => (e = e.replace(/"/g, "\""), e.replace(/'/g, "'")), Le = (e) => ({
468
- ...e,
469
- name: H(e.name),
470
- path: H(e.path)
471
- }), U = (e) => {
472
- let t = {
473
- ...e,
474
- name: H(e.name)
475
- };
476
- return "folder_path" in t && typeof t.folder_path == "string" && (t.folder_path = H(t.folder_path)), t;
477
- }, W = {
467
+ }), H = {
478
468
  id: 0,
479
469
  name: "/",
480
470
  path: "/"
481
471
  };
482
- function Re(t) {
472
+ function Le(t) {
483
473
  return t ? e()?.Common.All_folders : "/ (" + e()?.Keywords.Root_folder + ")";
484
474
  }
485
- var ze = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
486
- a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Re(t));
475
+ var Re = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
476
+ a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Le(t));
487
477
  let o = i > 1 ? "-".repeat(i - 1) + " " : "";
488
- o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), ze(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
489
- }), n), Be = (e, t) => {
490
- let n = e.gen(`/get/${t}/folders/`, [
491
- "id",
492
- "parent_id",
493
- "name",
494
- "path"
495
- ]).changeParams({
496
- orders: ["ord_path"],
497
- limit: 100
498
- });
499
- return n.options.onApiLoaded = (e, t, n) => {
500
- e.result &&= e.result.map((e) => Le(e)), n?.(e, t);
501
- }, n;
502
- };
478
+ o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Re(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
479
+ }), n), ze = (e, t) => e.gen(`/get/${t}/folders/`, [
480
+ "id",
481
+ "parent_id",
482
+ "name",
483
+ "path"
484
+ ]).changeParams({
485
+ orders: ["ord_path"],
486
+ limit: 100
487
+ });
503
488
  //#endregion
504
489
  //#region src/core/utils/composables/useWatch.ts
505
- function Ve(e, t, n) {
490
+ function Be(e, t, n) {
506
491
  let r = Object.keys(e);
507
492
  return R(r.map((t) => e[t]), (e, n, i) => {
508
493
  let a = {};
@@ -518,8 +503,8 @@ function Ve(e, t, n) {
518
503
  }, n);
519
504
  }
520
505
  //#endregion
521
- //#region src/components/project/groupSelector/folders/folders.vue
522
- var He = /* @__PURE__ */ k({
506
+ //#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
507
+ var Ve = ["innerHTML"], He = /* @__PURE__ */ k({
523
508
  __name: "folders",
524
509
  props: /* @__PURE__ */ A({
525
510
  folderId: {},
@@ -537,20 +522,17 @@ var He = /* @__PURE__ */ k({
537
522
  }, {
538
523
  folderId: { required: !0 },
539
524
  folderIdModifiers: {},
540
- folder: { default: W },
525
+ folder: { default: H },
541
526
  folderModifiers: {}
542
527
  }),
543
528
  emits: ["update:folderId", "update:folder"],
544
529
  setup(e) {
545
- let t = e, n = L(e, "folderId"), r = L(e, "folder"), i = t.client && !t.folders && t.service ? Be(t.client, t.service) : void 0, a = N(null), o = S(() => {
546
- let e = ze(t.folders ?? { root: [W] }, t.canSelectAll), n = /* @__PURE__ */ new Map();
547
- return e.forEach((e, t) => {
548
- n.set(t, Le(e));
549
- }), n;
550
- });
551
- return R(() => t.projectId, () => {
530
+ let t = e, n = L(e, "folderId"), r = L(e, "folder"), i = t.client && !t.folders ? ze(t.client, t.service) : void 0, a = N(null);
531
+ R(() => t.projectId, () => {
552
532
  i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
553
- }, { immediate: !0 }), Ve({
533
+ }, { immediate: !0 });
534
+ let o = S(() => Re(t.folders ?? { root: [H] }, t.canSelectAll));
535
+ return Be({
554
536
  modelFolder: r,
555
537
  modelFolderId: n
556
538
  }, async (e) => {
@@ -560,7 +542,7 @@ var He = /* @__PURE__ */ k({
560
542
  return;
561
543
  }
562
544
  let i = o.value.get(t.folderId);
563
- i ||= W, r.value = i, n.value = i.id;
545
+ i ||= H, r.value = i, n.value = i.id;
564
546
  }, { immediate: !0 }), (t, n) => (M(), C(y, {
565
547
  class: "top-groupSelector_folder",
566
548
  modelValue: r.value,
@@ -572,7 +554,10 @@ var He = /* @__PURE__ */ k({
572
554
  apiSetSearchParams: (...e) => I(b)(...e, "name"),
573
555
  addChanger: e.addChanger,
574
556
  useCache: ""
575
- }, null, 8, [
557
+ }, {
558
+ item: z(({ item: e }) => [E("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ve)]),
559
+ _: 1
560
+ }, 8, [
576
561
  "modelValue",
577
562
  "items",
578
563
  "icon",
@@ -581,36 +566,28 @@ var He = /* @__PURE__ */ k({
581
566
  "addChanger"
582
567
  ]));
583
568
  }
584
- }), G = {
569
+ }), U = {
585
570
  id: -1,
586
571
  name: "--",
587
- folder_id: W.id,
588
- folder_path: W.path
589
- }, K = {
572
+ folder_id: H.id,
573
+ folder_path: H.path
574
+ }, W = {
590
575
  id: 0,
591
576
  name: "All groups",
592
- folder_id: W.id,
593
- folder_path: W.path
594
- }, q = () => (K.name = e()?.Common.All_groups, K), Ue = () => (K.name = e()?.Keywords.Choose_group, K), We = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), Ge = (e, t) => {
595
- let n = e.gen(`/get/${t}/groups/`, [
596
- "id",
597
- "name",
598
- "folder_id",
599
- "folder_path"
600
- ]).changeParams({
601
- folder_id_depth: !0,
602
- limit: 100
603
- });
604
- return n.options.onApiLoaded = (e, t, n) => {
605
- e.result &&= e.result.map((e) => U(e)), n?.(e, t);
606
- }, n;
607
- }, Ke = (e, t) => e.gen(`/add/${t}/groups/`), qe = { class: "top-groupSelector_groupItem" }, Je = {
577
+ folder_id: H.id,
578
+ folder_path: H.path
579
+ }, G = () => (W.name = e()?.Common.All_groups, W), Ue = () => (W.name = e()?.Keywords.Choose_group, W), We = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), Ge = (e, t) => e.gen(`/get/${t}/groups/`, [
580
+ "id",
581
+ "name",
582
+ "folder_id",
583
+ "folder_path"
584
+ ]).changeParams({
585
+ folder_id_depth: !0,
586
+ limit: 100
587
+ }), Ke = (e, t) => e.gen(`/add/${t}/groups/`), qe = { class: "top-groupSelector_groupItem" }, Je = {
608
588
  key: 0,
609
589
  class: "top-comment"
610
- }, Ye = {
611
- key: 1,
612
- class: "top-groupSelector_groupItemFolderPath"
613
- }, Xe = /* @__PURE__ */ k({
590
+ }, Ye = ["innerHTML"], Xe = ["innerHTML"], Ze = /* @__PURE__ */ k({
614
591
  __name: "groups",
615
592
  props: /* @__PURE__ */ A({
616
593
  groupId: {},
@@ -644,29 +621,25 @@ var He = /* @__PURE__ */ k({
644
621
  }),
645
622
  emits: /* @__PURE__ */ A(["addGroup"], ["update:groupId", "update:group"]),
646
623
  setup(e, { emit: t }) {
647
- let n = e, r = t, i = L(e, "groupId"), a = L(e, "group"), s = n.client && !n.groups && n.service ? Ge(n.client, n.service) : void 0, c = n.client && n.service ? Ke(n.client, n.service) : void 0, l = N(null), u = N(void 0), d = o("folder_id", "EQUALS", [n.folder?.id ?? 0]);
624
+ let n = e, r = t, i = L(e, "groupId"), a = L(e, "group"), s = n.client && !n.groups ? Ge(n.client, n.service) : void 0, c = n.client ? Ke(n.client, n.service) : void 0, l = N(null), u = N(void 0), d = o("folder_id", "EQUALS", [n.folder?.id ?? 0]);
648
625
  s?.changeParams({
649
626
  project_id: n.projectId,
650
627
  folder_id_depth: !0,
651
628
  filters: [d]
652
629
  }), n.on !== void 0 && s?.params.filters?.push(o("on", "EQUALS", [Number(n.on)]));
653
- let f = S(() => {
654
- let e = u.value ?? n.groups;
655
- if (e) return e.map((e) => U(e));
656
- }), p = (e) => {
657
- let t = U(e);
658
- a.value = t, i.value = t.id;
630
+ let f = (e) => {
631
+ a.value = e, i.value = e.id;
659
632
  };
660
- Ve({
633
+ Be({
661
634
  projectId: () => n.projectId,
662
635
  folderId: () => n.folder?.id,
663
636
  canSelectAll: () => n.canSelectAll
664
637
  }, (e) => {
665
638
  if (e.projectId && (s?.changeParams({ project_id: n.projectId }), s?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + n.projectId })), e.folderId && (d.values = [n.folder?.id ?? 0], n.groups && (u.value = We(n.groups, n.on, n.folder))), l.value?.resetCache(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && i.value !== null) {
666
639
  let e;
667
- n.autoselect === "first" && (e = u.value?.[0], n.canSelectAll && (e = oe(q()))), (n.autoselect === "placeholder" || !e) && (e = Ue()), p(e);
640
+ n.autoselect === "first" && (e = u.value?.[0], n.canSelectAll && (e = oe(G()))), (n.autoselect === "placeholder" || !e) && (e = Ue()), f(e);
668
641
  }
669
- }, { immediate: !0 }), Ve({
642
+ }, { immediate: !0 }), Be({
670
643
  modelGroup: a,
671
644
  modelGroupId: i
672
645
  }, async (e) => {
@@ -678,13 +651,13 @@ var He = /* @__PURE__ */ k({
678
651
  if (!(n.canAdd && i.value === null)) {
679
652
  if (n.groups) {
680
653
  let e = u.value?.find((e) => e.id === i.value);
681
- if (!e && n.canSelectAll && (e = q()), e) p(e);
654
+ if (!e && n.canSelectAll && (e = G()), e) f(e);
682
655
  else {
683
656
  let e = u.value?.[0];
684
- e && !i.value ? p(e) : p(G);
657
+ e && !i.value ? f(e) : f(U);
685
658
  }
686
659
  }
687
- if (n.client && !n.groups && n.service && (i.value || i.value === 0 && !n.canSelectAll)) {
660
+ if (n.client && !n.groups && (i.value || i.value === 0 && !n.canSelectAll)) {
688
661
  let e = Ge(n.client, n.service).changeParams({
689
662
  project_id: n.projectId,
690
663
  id: i.value,
@@ -693,20 +666,24 @@ var He = /* @__PURE__ */ k({
693
666
  e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + n.projectId });
694
667
  let t = await e.call();
695
668
  if (!t.errors?.length && !t.result) return;
696
- !t.errors && t.result[0] ? p(t.result[0]) : p(G);
669
+ !t.errors && t.result[0] ? f(t.result[0]) : f(U);
697
670
  }
698
671
  }
699
672
  }
700
673
  }, { immediate: !0 });
701
- let m = async (e) => {
674
+ let p = async (e) => {
702
675
  if (n.canAdd !== "api" || !c) return;
703
676
  let t = a.value, i = await c.changeParams({
704
677
  project_id: n.projectId,
705
678
  names: [e.name],
706
- to_id: n.folder?.id ?? W.id,
679
+ to_id: n.folder?.id ?? H.id,
707
680
  to_type: "in_folder_last"
708
681
  }).call();
709
- i.result ? (p(i.result), r("addGroup", i.result)) : p(t), l.value?.resetCache(!0);
682
+ if (i.result) {
683
+ let e = i.result[0];
684
+ f(e), r("addGroup", e);
685
+ } else f(t);
686
+ l.value?.resetCache(!0);
710
687
  };
711
688
  return (t, n) => (M(), C(y, {
712
689
  ref_key: "refSelector",
@@ -714,21 +691,25 @@ var He = /* @__PURE__ */ k({
714
691
  class: "top-groupSelector_group",
715
692
  modelValue: a.value,
716
693
  "onUpdate:modelValue": n[0] ||= (e) => a.value = e,
717
- items: f.value,
694
+ items: u.value ?? e.groups,
718
695
  searchType: "inline",
719
696
  icon: e.addIcon ? "" : void 0,
720
697
  api: e.groups ? void 0 : I(s),
721
698
  apiSetSearchParams: (...e) => I(b)(...e, "name"),
722
699
  appendSearchToResult: !!e.canAdd,
723
- useAllItem: e.canSelectAll ? I(q)().name : !1,
700
+ useAllItem: e.canSelectAll ? I(G)().name : !1,
724
701
  addChanger: e.addChanger,
725
702
  useCache: "",
726
- onAppendItem: m
703
+ onAppendItem: p
727
704
  }, {
728
705
  item: z(({ item: n }) => [E("div", qe, [
729
706
  n.id === I(null) ? (M(), T("div", Je, F(t.$i18n.Common.Add) + ": ", 1)) : w("", !0),
730
- E("span", null, F(n.name), 1),
731
- n.folder_path && e.showPath ? (M(), T("span", Ye, F(n.folder_path), 1)) : w("", !0)
707
+ E("span", { innerHTML: n.name }, null, 8, Ye),
708
+ n.folder_path && e.showPath ? (M(), T("span", {
709
+ key: 1,
710
+ class: "top-groupSelector_groupItemFolderPath",
711
+ innerHTML: n.folder_path
712
+ }, null, 8, Xe)) : w("", !0)
732
713
  ])]),
733
714
  _: 1
734
715
  }, 8, [
@@ -742,7 +723,7 @@ var He = /* @__PURE__ */ k({
742
723
  "addChanger"
743
724
  ]));
744
725
  }
745
- }), Ze = { class: "top-groupSelector" }, Qe = /* @__PURE__ */ k({
726
+ }), Qe = { class: "top-groupSelector" }, $e = /* @__PURE__ */ k({
746
727
  __name: "groupSelector",
747
728
  props: /* @__PURE__ */ A({
748
729
  folderId: {},
@@ -784,7 +765,7 @@ var He = /* @__PURE__ */ k({
784
765
  folderModifiers: {},
785
766
  groupId: { required: !0 },
786
767
  groupIdModifiers: {},
787
- group: { default: G },
768
+ group: { default: U },
788
769
  groupModifiers: {}
789
770
  }),
790
771
  emits: /* @__PURE__ */ A(["update:groups"], [
@@ -795,14 +776,14 @@ var He = /* @__PURE__ */ k({
795
776
  ]),
796
777
  setup(e, { emit: t }) {
797
778
  let n = e, r = L(e, "folderId"), i = L(e, "folder"), a = L(e, "groupId"), o = L(e, "group"), s = t;
798
- i.value = ze(n.folders ?? { root: [W] }, n.canSelectAllGroups).get(r.value), i.value &&= Le(i.value);
779
+ i.value = Re(n.folders ?? { root: [H] }, n.canSelectAllGroups).get(r.value);
799
780
  let c = n.groups?.find((e) => e.id === a.value);
800
- a.value || (c = n.groups?.[0]), n.canSelectAllGroups && !c && (c = q()), (n.autoselect === "placeholder" || !c) && (c = Ue()), c ??= G, o.value = c, o.value = U(o.value);
781
+ a.value || (c = n.groups?.[0]), n.canSelectAllGroups && !c && (c = G()), n.canSelectAllGroups && !c && (c = G()), (n.autoselect === "placeholder" || !c) && (c = Ue()), c ??= U, o.value = c;
801
782
  let l = (e) => {
802
783
  let t;
803
784
  n.groups && e && (t = [...n.groups, e]), s("update:groups", t);
804
785
  };
805
- return (t, n) => (M(), T("div", Ze, [e.showFolders ? (M(), C(He, {
786
+ return (t, n) => (M(), T("div", Qe, [e.showFolders ? (M(), C(He, {
806
787
  key: 0,
807
788
  folderId: r.value,
808
789
  "onUpdate:folderId": n[0] ||= (e) => r.value = e,
@@ -825,7 +806,7 @@ var He = /* @__PURE__ */ k({
825
806
  "addIcon",
826
807
  "client",
827
808
  "service"
828
- ])) : w("", !0), e.showGroups ? (M(), C(Xe, {
809
+ ])) : w("", !0), e.showGroups ? (M(), C(Ze, {
829
810
  key: 1,
830
811
  groupId: a.value,
831
812
  "onUpdate:groupId": n[2] ||= (e) => a.value = e,
@@ -861,39 +842,39 @@ var He = /* @__PURE__ */ k({
861
842
  "service"
862
843
  ])) : w("", !0)]));
863
844
  }
864
- }), $e = (e) => ({
845
+ }), et = (e) => ({
865
846
  id: null,
866
847
  name: e,
867
848
  listItemProps: { type: "title" }
868
- }), et = {
849
+ }), tt = {
869
850
  scheduledUpdate: !1,
870
851
  manualUpdate: !1,
871
852
  guestProjects: !1
872
- }, tt = (t, n) => {
853
+ }, nt = (t, n) => {
873
854
  let r = [], i = {
874
- scheduledUpdate: $e(e().Projects.Scheduled_update),
875
- manualUpdate: $e(e().Projects.Manual_update),
876
- guestProjects: $e(e().Projects.Guest_projects)
855
+ scheduledUpdate: et(e().Projects.Scheduled_update),
856
+ manualUpdate: et(e().Projects.Manual_update),
857
+ guestProjects: et(e().Projects.Guest_projects)
877
858
  }, a = n ? {
878
859
  scheduledUpdate: !1,
879
860
  manualUpdate: !1,
880
861
  guestProjects: !1
881
- } : et;
862
+ } : tt;
882
863
  for (let e of t) !a.scheduledUpdate && e.right?.startsWith("1") && e.on > 0 && (r.push(i.scheduledUpdate), a.scheduledUpdate = !0), !a.manualUpdate && e.right?.startsWith("1") && e.on === 0 && (r.push(i.manualUpdate), a.manualUpdate = !0), !a.guestProjects && e.right?.startsWith("0") && e.on >= 0 && (r.push(i.guestProjects), a.guestProjects = !0), r.push(e);
883
864
  return r;
884
- }, nt = (e) => e.map((e) => ({
865
+ }, rt = (e) => e.map((e) => ({
885
866
  ...e,
886
867
  listItemProps: { attrs: { title: e.name } }
887
- })), rt = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(et).forEach((e) => et[e] = !1), tt(nt(e), n)), it = (e) => {
868
+ })), it = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(tt).forEach((e) => tt[e] = !1), nt(rt(e), n)), at = (e) => {
888
869
  e = e.replace(/#.*/, "");
889
870
  let t = location.hash;
890
871
  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:\{[^}]*},/, "")), e + t;
891
- }, at = (e, t) => {
872
+ }, ot = (e, t) => {
892
873
  t && t.target instanceof HTMLElement && c.close(t.target.closest(".top-popup-wrapper"));
893
- let n = it(e);
874
+ let n = at(e);
894
875
  location.href = n;
895
- }, ot = (e) => {
896
- let t = st(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
876
+ }, st = (e) => {
877
+ let t = ct(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
897
878
  return n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
898
879
  "watcher",
899
880
  "indexing",
@@ -902,15 +883,15 @@ var He = /* @__PURE__ */ k({
902
883
  "direct",
903
884
  "adwords"
904
885
  ].includes(n[4]) && (i = n[4] + "/"), "https://" + t + "/" + r + e + "/" + i;
905
- }, st = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, ct = (e) => {
886
+ }, ct = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, lt = (e) => {
906
887
  let t = e.startsWith("http") ? e : "http://" + e;
907
888
  return t = t.replace(/"/g, "%22"), t;
908
- }, lt = (e, t) => {
889
+ }, ut = (e, t) => {
909
890
  let n = e.params.filters ?? [];
910
891
  n = n.filter((e) => e.name !== "GEN_SEARCH_STRING()");
911
892
  let r = h(t), i = t.replace(/([[^$.|?*+()])/g, "\\$1"), a = r.replace(/([[^$.|?*+()])/g, "\\$1");
912
893
  t && n.push(o("GEN_SEARCH_STRING()", "REGEXP", [`(${i}|${a})`])), e.changeParams({ filters: n });
913
- }, ut = (e, t, n) => {
894
+ }, dt = (e, t, n) => {
914
895
  let r = e.gen("/get/projects_2/projects/", [
915
896
  "id",
916
897
  "user_id",
@@ -930,14 +911,14 @@ var He = /* @__PURE__ */ k({
930
911
  ]
931
912
  }, r.options.onApiLoaded = (e, t, n) => {
932
913
  let r = t.data.filters.length === 1 && t.data.offset === 0 || t.data.limit === 1e3, i = t.data.limit === 100 && t.data.filters.length > 1 ? !0 : void 0;
933
- e.result = rt(e.result, r, i), n?.(e, t);
914
+ e.result = it(e.result, r, i), n?.(e, t);
934
915
  }, r;
935
- }, dt = (e) => e.gen("/add/projects_2/projects/"), ft = { class: "top-projectSelectorSubmenu_item" }, pt = [
916
+ }, ft = (e) => e.gen("/add/projects_2/projects/"), pt = { class: "top-projectSelectorSubmenu_item" }, mt = [
936
917
  "href",
937
918
  "title",
938
919
  "data-top-icon",
939
920
  "data-right"
940
- ], mt = { class: "top-projectSelectorSubmenu_item" }, ht = ["href"], gt = /* @__PURE__ */ k({
921
+ ], ht = { class: "top-projectSelectorSubmenu_item" }, gt = ["href"], _t = /* @__PURE__ */ k({
941
922
  __name: "submenu",
942
923
  props: {
943
924
  id: {},
@@ -945,7 +926,7 @@ var He = /* @__PURE__ */ k({
945
926
  url: {}
946
927
  },
947
928
  setup(t) {
948
- let n = t, r = e(), i = st(), a = [
929
+ let n = t, r = e(), i = ct(), a = [
949
930
  {
950
931
  href: `https://${i}/project/keywords/${n.id}/`,
951
932
  title: r.Common.Menu_phrases,
@@ -1025,40 +1006,40 @@ var He = /* @__PURE__ */ k({
1025
1006
  "data-top-icon": "",
1026
1007
  color: "theme"
1027
1008
  })]),
1028
- contentList: z(() => [(M(!0), T(x, null, P(o.value, (e) => (M(), T("li", ft, [E("a", {
1009
+ contentList: z(() => [(M(!0), T(x, null, P(o.value, (e) => (M(), T("li", pt, [E("a", {
1029
1010
  href: e.href,
1030
1011
  title: e.title,
1031
1012
  "data-top-icon": e.icon,
1032
1013
  "data-right": e.right
1033
- }, null, 8, pt)]))), 256)), E("li", mt, [E("a", {
1014
+ }, null, 8, mt)]))), 256)), E("li", ht, [E("a", {
1034
1015
  href: t.url,
1035
1016
  "data-top-icon": "",
1036
1017
  target: "_blank"
1037
- }, null, 8, ht)])]),
1018
+ }, null, 8, gt)])]),
1038
1019
  _: 1
1039
1020
  });
1040
1021
  };
1041
1022
  }
1042
- }), J = "ui_project_selector_total:", _t = 1440 * 60 * 1e3, Y = de(), vt = N(0), X = N(null), yt = (e, t) => {
1043
- localStorage.setItem(J + e, JSON.stringify({
1023
+ }), K = "ui_project_selector_total:", vt = 1440 * 60 * 1e3, q = de(), yt = N(0), J = N(null), bt = (e, t) => {
1024
+ localStorage.setItem(K + e, JSON.stringify({
1044
1025
  projectsTotal: t,
1045
- expiresAt: Date.now() + _t
1026
+ expiresAt: Date.now() + vt
1046
1027
  }));
1047
- }, bt = (e) => {
1048
- let t = localStorage.getItem(J + e);
1028
+ }, xt = (e) => {
1029
+ let t = localStorage.getItem(K + e);
1049
1030
  if (!t) return;
1050
1031
  let { projectsTotal: n, expiresAt: r } = JSON.parse(t);
1051
1032
  if (Date.now() > r) {
1052
- localStorage.removeItem(J + e);
1033
+ localStorage.removeItem(K + e);
1053
1034
  return;
1054
1035
  }
1055
1036
  return n;
1056
- }, xt = (e, t = !0) => {
1057
- Y.value = void 0, localStorage.removeItem(J + e), t && vt.value++;
1058
- }, St = { class: "top-projectSelector_item" }, Ct = { class: "top-projectSelector_itemText" }, wt = { class: "top-comment" }, Tt = {
1037
+ }, St = (e, t = !0) => {
1038
+ q.value = void 0, localStorage.removeItem(K + e), t && yt.value++;
1039
+ }, Ct = { class: "top-projectSelector_item" }, wt = { class: "top-projectSelector_itemText" }, Tt = { class: "top-comment" }, Et = {
1059
1040
  key: 0,
1060
1041
  class: "top-comment"
1061
- }, Et = ["href", "onClick"], Dt = 1e3, Ot = /* @__PURE__ */ k({
1042
+ }, Dt = ["href", "onClick"], Ot = 1e3, kt = /* @__PURE__ */ k({
1062
1043
  __name: "projectSelector",
1063
1044
  props: /* @__PURE__ */ A({
1064
1045
  modelValue: {},
@@ -1083,33 +1064,33 @@ var He = /* @__PURE__ */ k({
1083
1064
  setup(t) {
1084
1065
  let n = e();
1085
1066
  if (!window.mo?.user?.id) throw Error("TopProjectSelector: не удалось определить userId. Компонент требует авторизованного пользователя (см. window.mo.user.id)");
1086
- let r = window.mo.user.id, i = t, a = L(t, "modelValue"), o = ut(i.client, r), s = dt(i.client), c = N(bt(r)), d = N(null), f = S(() => i.placeholder ?? n.Projects.Select_project), p = S(() => !Y.value || !i.excludeProjectId ? Y.value : Y.value.filter((e) => e.id !== i.excludeProjectId)), m = S(() => {
1087
- if (!(!c.value && c.value !== 0)) return c.value < Dt ? "static" : "api";
1067
+ let r = window.mo.user.id, i = t, a = L(t, "modelValue"), o = dt(i.client, r), s = ft(i.client), c = N(xt(r)), d = N(null), f = S(() => i.placeholder ?? n.Projects.Select_project), p = S(() => !q.value || !i.excludeProjectId ? q.value : q.value.filter((e) => e.id !== i.excludeProjectId)), m = S(() => {
1068
+ if (!(!c.value && c.value !== 0)) return c.value < Ot ? "static" : "api";
1088
1069
  });
1089
- R(vt, () => {
1070
+ R(yt, () => {
1090
1071
  _();
1091
1072
  }), R(a, () => {
1092
- !a.value.id || !i.addLinksToProjects || at(ot(a.value.id));
1073
+ !a.value.id || !i.addLinksToProjects || ot(st(a.value.id));
1093
1074
  });
1094
1075
  let h = async () => {
1095
- X.value ||= ut(i.client, r, { limit: Dt }).call();
1096
- let e = await X.value;
1076
+ J.value ||= dt(i.client, r, { limit: Ot }).call();
1077
+ let e = await J.value;
1097
1078
  if (e.errors) {
1098
- X.value = null;
1079
+ J.value = null;
1099
1080
  return;
1100
1081
  }
1101
- return X.value = null, e;
1082
+ return J.value = null, e;
1102
1083
  }, ee = async () => {
1103
1084
  if (c.value) return;
1104
1085
  let e = await h();
1105
- e && (c.value = e.total, m.value === "static" && !Y.value && (Y.value = e.result), c.value && yt(r, c.value));
1086
+ e && (c.value = e.total, m.value === "static" && !q.value && (q.value = e.result), c.value && bt(r, c.value));
1106
1087
  }, g = async (e) => {
1107
1088
  let t = await s.changeParams({
1108
1089
  url: e.name,
1109
1090
  name: e.name
1110
1091
  }).call();
1111
1092
  if (!t.errors) {
1112
- if (Y.value && m.value === "static") {
1093
+ if (q.value && m.value === "static") {
1113
1094
  let n = {
1114
1095
  id: Number(t.result),
1115
1096
  user_id: r,
@@ -1118,21 +1099,21 @@ var He = /* @__PURE__ */ k({
1118
1099
  on: 0,
1119
1100
  right: "11111111111111111111",
1120
1101
  listItemProps: { attrs: { title: e.name } }
1121
- }, i = Y.value.findIndex((e) => e.on === 0);
1122
- Y.value = [
1123
- ...Y.value.slice(0, i),
1102
+ }, i = q.value.findIndex((e) => e.on === 0);
1103
+ q.value = [
1104
+ ...q.value.slice(0, i),
1124
1105
  n,
1125
- ...Y.value.slice(i)
1126
- ], c.value && (c.value += 1, yt(r, c.value));
1106
+ ...q.value.slice(i)
1107
+ ], c.value && (c.value += 1, bt(r, c.value));
1127
1108
  }
1128
- m.value === "api" && xt(r);
1109
+ m.value === "api" && St(r);
1129
1110
  }
1130
1111
  }, _ = () => {
1131
1112
  m.value === "api" && d.value?.resetCache(!0);
1132
1113
  }, v = async () => {
1133
- if (Y.value || m.value !== "static") return;
1114
+ if (q.value || m.value !== "static") return;
1134
1115
  let e = await h();
1135
- e && (Y.value = e.result);
1116
+ e && (q.value = e.result);
1136
1117
  };
1137
1118
  return ae(async () => {
1138
1119
  await ee();
@@ -1155,7 +1136,7 @@ var He = /* @__PURE__ */ k({
1155
1136
  placeholder: f.value,
1156
1137
  hasCloserBtn: "",
1157
1138
  api: m.value === "api" ? I(o) : void 0,
1158
- apiSetSearchParams: m.value === "api" ? (...e) => I(lt)(...e) : void 0,
1139
+ apiSetSearchParams: m.value === "api" ? (...e) => I(ut)(...e) : void 0,
1159
1140
  useCache: "",
1160
1141
  appendSearchToResult: "",
1161
1142
  appendSearchAllowDuplicate: "",
@@ -1166,26 +1147,26 @@ var He = /* @__PURE__ */ k({
1166
1147
  onAppendItem: g,
1167
1148
  onOpen: v
1168
1149
  }, {
1169
- item: z(({ item: i }) => [E("div", St, [E("div", Ct, [i.id ? (M(), T(x, { key: 0 }, [D(F(I(u)(i.name, 20)) + " ", 1), E("span", wt, " id " + F(i.id), 1)], 64)) : (M(), T(x, { key: 1 }, [i.listItemProps?.type ? w("", !0) : (M(), T("div", Tt, F(e.$i18n.Projects.Add_project) + ": ", 1)), D(" " + F(i.name), 1)], 64))]), i.id ? (M(), T(x, { key: 0 }, [
1150
+ item: z(({ item: i }) => [E("div", Ct, [E("div", wt, [i.id ? (M(), T(x, { key: 0 }, [D(F(I(u)(i.name, 20)) + " ", 1), E("span", Tt, " id " + F(i.id), 1)], 64)) : (M(), T(x, { key: 1 }, [i.listItemProps?.type ? w("", !0) : (M(), T("div", Et, F(e.$i18n.Projects.Add_project) + ": ", 1)), D(" " + F(i.name), 1)], 64))]), i.id ? (M(), T(x, { key: 0 }, [
1170
1151
  t.addLinksToProjects ? (M(), T("a", {
1171
1152
  key: 0,
1172
1153
  class: "top-projectSelector_itemLink",
1173
- href: I(ot)(i.id),
1174
- onClick: B((e) => I(at)(I(ot)(i.id), e), ["prevent", "stop"])
1175
- }, null, 8, Et)) : w("", !0),
1154
+ href: I(st)(i.id),
1155
+ onClick: B((e) => I(ot)(I(st)(i.id), e), ["prevent", "stop"])
1156
+ }, null, 8, Dt)) : w("", !0),
1176
1157
  e.$core.state.isMobile ? w("", !0) : (M(), C(r, {
1177
1158
  key: 1,
1178
1159
  class: "top-projectSelector_itemExtLink",
1179
- href: I(ct)(i.url),
1160
+ href: I(lt)(i.url),
1180
1161
  "data-top-icon": "",
1181
1162
  color: "theme",
1182
1163
  target: "_blank",
1183
1164
  onClick: n[0] ||= B(() => {}, ["stop"])
1184
1165
  }, null, 8, ["href"])),
1185
- O(gt, {
1166
+ O(_t, {
1186
1167
  id: i.id,
1187
1168
  right: i.right ?? void 0,
1188
- url: I(ct)(i.url)
1169
+ url: I(lt)(i.url)
1189
1170
  }, null, 8, [
1190
1171
  "id",
1191
1172
  "right",
@@ -1207,11 +1188,11 @@ var He = /* @__PURE__ */ k({
1207
1188
  ]);
1208
1189
  };
1209
1190
  }
1210
- }), kt = (e) => "-" + e, Z = (e) => e[0] === "-" ? e.substring(1) : e, Q = (e, t) => {
1211
- e = Z(e);
1191
+ }), At = (e) => "-" + e, Y = (e) => e[0] === "-" ? e.substring(1) : e, X = (e, t) => {
1192
+ e = Y(e);
1212
1193
  let n = t.find((t) => t.id === e);
1213
1194
  if (n) return n;
1214
- }, At = (e, t, n) => {
1195
+ }, jt = (e, t, n) => {
1215
1196
  t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
1216
1197
  let r = c.genElPopupOpener("div", t);
1217
1198
  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) => {
@@ -1224,16 +1205,16 @@ var He = /* @__PURE__ */ k({
1224
1205
  filters: e.filters,
1225
1206
  payload: e.payload
1226
1207
  }), delete r.dataset.topPopupDisabled, ne(e.modelValue) || R(i, () => {
1227
- e.modelValue = i.value, Mt(r, e, n);
1208
+ e.modelValue = i.value, Z(r, e, n);
1228
1209
  }), r.click();
1229
- }, ne(e.modelValue) ? R(e.modelValue, () => Mt(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1210
+ }, ne(e.modelValue) ? R(e.modelValue, () => Z(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1230
1211
  e.modelValue = t;
1231
1212
  let i = s(r, "topTagSelectorTarget");
1232
- i && (i.model.value = t), Mt(r, e, n);
1233
- }), Mt(r, e, n), r;
1234
- }, jt = (e, t) => {
1213
+ i && (i.model.value = t), Z(r, e, n);
1214
+ }), Z(r, e, n), r;
1215
+ }, Mt = (e, t) => {
1235
1216
  s(e, "topTagSelectorRender")?.(t);
1236
- }, Mt = (t, n, r) => {
1217
+ }, Z = (t, n, r) => {
1237
1218
  let i = I(n.modelValue);
1238
1219
  if (t.classList.toggle("top-tagSelector-selectedOne", !i.length || i.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", i.length > 5), n.mode === "setter" && n.filters) {
1239
1220
  t.innerHTML = `<div>${r}</div>`;
@@ -1250,10 +1231,10 @@ var He = /* @__PURE__ */ k({
1250
1231
  }
1251
1232
  i.forEach((e) => {
1252
1233
  let r = Nt({
1253
- id: Z(e),
1254
- colorId: Q(e, n.tags)?.color_id ?? "",
1255
- name: Q(e, n.tags)?.name ?? "",
1256
- state: Z(e) === e ? "selected" : "excluded"
1234
+ id: Y(e),
1235
+ colorId: X(e, n.tags)?.color_id ?? "",
1236
+ name: X(e, n.tags)?.name ?? "",
1237
+ state: Y(e) === e ? "selected" : "excluded"
1257
1238
  });
1258
1239
  t.append(r);
1259
1240
  });
@@ -1315,7 +1296,7 @@ var He = /* @__PURE__ */ k({
1315
1296
  "data-tag_id",
1316
1297
  "data-tag_color_id",
1317
1298
  "title"
1318
- ], It = /* @__PURE__ */ k({
1299
+ ], Q = /* @__PURE__ */ k({
1319
1300
  __name: "tagIcon",
1320
1301
  props: {
1321
1302
  id: {},
@@ -1335,7 +1316,7 @@ var He = /* @__PURE__ */ k({
1335
1316
  title: e.name
1336
1317
  }, null, 10, Ft));
1337
1318
  }
1338
- }), Lt = ["contenteditable", "onKeydown"], Rt = /* @__PURE__ */ k({
1319
+ }), It = ["contenteditable", "onKeydown"], Lt = /* @__PURE__ */ k({
1339
1320
  __name: "tagPopupListItem",
1340
1321
  props: /* @__PURE__ */ A({
1341
1322
  editable: { type: Boolean },
@@ -1384,7 +1365,7 @@ var He = /* @__PURE__ */ k({
1384
1365
  onClick: B(d, ["stop"])
1385
1366
  }, {
1386
1367
  default: z(() => [
1387
- O(It, {
1368
+ O(Q, {
1388
1369
  id: e.id,
1389
1370
  name: i.value,
1390
1371
  colorId: e.colorId,
@@ -1400,7 +1381,7 @@ var He = /* @__PURE__ */ k({
1400
1381
  ref: a,
1401
1382
  class: "top-tagSelector_tagListItemName",
1402
1383
  contenteditable: s.value ? "plaintext-only" : !1
1403
- }, o.value, { onKeydown: [me(B(l, ["stop"]), ["enter"]), me(B(u, ["stop"]), ["esc"])] }), F(i.value), 17, Lt),
1384
+ }, o.value, { onKeydown: [me(B(l, ["stop"]), ["enter"]), me(B(u, ["stop"]), ["esc"])] }), F(i.value), 17, It),
1404
1385
  e.editable ? (M(), T(x, { key: 0 }, [s.value ? (M(), T("span", {
1405
1386
  key: 1,
1406
1387
  "data-top-icon": "",
@@ -1416,7 +1397,7 @@ var He = /* @__PURE__ */ k({
1416
1397
  _: 1
1417
1398
  }, 8, ["class"]));
1418
1399
  }
1419
- }), zt = { key: 1 }, Bt = /* @__PURE__ */ k({
1400
+ }), Rt = { key: 1 }, zt = /* @__PURE__ */ k({
1420
1401
  inheritAttrs: !1,
1421
1402
  __name: "popupOpener",
1422
1403
  props: /* @__PURE__ */ A({
@@ -1460,17 +1441,17 @@ var He = /* @__PURE__ */ k({
1460
1441
  color: "theme",
1461
1442
  styling: e.styling
1462
1443
  }, r.$attrs), {
1463
- [I(a)]: z(() => [!n.value.length && e.mode === "filter" ? (M(), C(It, {
1444
+ [I(a)]: z(() => [!n.value.length && e.mode === "filter" ? (M(), C(Q, {
1464
1445
  key: 0,
1465
1446
  id: "all",
1466
1447
  colorId: "",
1467
1448
  name: r.$i18n.Common.All_tags ?? "",
1468
1449
  state: ""
1469
- }, null, 8, ["name"])) : w("", !0), e.mode === "setter" && e.filters ? (M(), T("div", zt, [se(r.$slots, "default")])) : (M(!0), T(x, { key: 2 }, P(n.value, (t) => (M(), C(It, {
1470
- id: I(Z)(t),
1471
- colorId: I(Q)(t, e.tags)?.color_id ?? "",
1472
- name: I(Q)(t, e.tags)?.name ?? "",
1473
- state: I(Z)(t) === t ? "selected" : "excluded"
1450
+ }, null, 8, ["name"])) : w("", !0), e.mode === "setter" && e.filters ? (M(), T("div", Rt, [se(r.$slots, "default")])) : (M(!0), T(x, { key: 2 }, P(n.value, (t) => (M(), C(Q, {
1451
+ id: I(Y)(t),
1452
+ colorId: I(X)(t, e.tags)?.color_id ?? "",
1453
+ name: I(X)(t, e.tags)?.name ?? "",
1454
+ state: I(Y)(t) === t ? "selected" : "excluded"
1474
1455
  }, null, 8, [
1475
1456
  "id",
1476
1457
  "colorId",
@@ -1487,7 +1468,7 @@ var He = /* @__PURE__ */ k({
1487
1468
  }, 8, ["id"]);
1488
1469
  };
1489
1470
  }
1490
- }), Vt = /* @__PURE__ */ k({
1471
+ }), Bt = /* @__PURE__ */ k({
1491
1472
  __name: "tagSelector",
1492
1473
  props: /* @__PURE__ */ A({
1493
1474
  modelValue: {},
@@ -1550,11 +1531,11 @@ var He = /* @__PURE__ */ k({
1550
1531
  }), b = (e) => {
1551
1532
  if (e !== "all") {
1552
1533
  if (v.value.model.value.includes(e)) return "selected";
1553
- if (v.value.model.value.includes(kt(e))) return "excluded";
1534
+ if (v.value.model.value.includes(At(e))) return "excluded";
1554
1535
  }
1555
1536
  return e === "all" && !v.value.model.value.length ? "selected" : "";
1556
1537
  }, E = (e, t) => {
1557
- let n = kt(e), r = v.value.model.value.filter((t) => t !== e && t !== n);
1538
+ let n = At(e), r = v.value.model.value.filter((t) => t !== e && t !== n);
1558
1539
  t === "select" && r.push(e), t === "exclude" && r.push(n), v.value.mode === "setter" && v.value.targetId !== void 0 && l.requiredForSetter && (r.length || r.push("1"), r.length === 2 && v.value.model.value.length === 1 && v.value.model.value[0] === "1" && (r = r.filter((e) => e !== "1"))), l.singleMode && !v.value.filters && (r.length || (r = v.value.model.value), r.length > 1 && (r = [r[r.length - 1]])), r.sort((e, t) => l.tags ? l.tags.findIndex((t) => t.id === e) - l.tags.findIndex((e) => e.id === t) : 0), v.value.model.value = r, v.value.mode === "setter" && v.value.targetId !== void 0 && p("setter", {
1559
1540
  tagsIds: r,
1560
1541
  targetId: v.value.targetId,
@@ -1595,7 +1576,7 @@ var He = /* @__PURE__ */ k({
1595
1576
  }, re = (e) => {
1596
1577
  t.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
1597
1578
  };
1598
- return (e, t) => (M(), T(x, null, [O(Bt, {
1579
+ return (e, t) => (M(), T(x, null, [O(zt, {
1599
1580
  modelValue: u.value,
1600
1581
  "onUpdate:modelValue": t[0] ||= (e) => u.value = e,
1601
1582
  id: I(m),
@@ -1617,7 +1598,7 @@ var He = /* @__PURE__ */ k({
1617
1598
  "transition-duration": 50
1618
1599
  }, te({
1619
1600
  contentList: z(() => [
1620
- I(v).mode === "filter" && !a.singleMode ? (M(), C(Rt, {
1601
+ I(v).mode === "filter" && !a.singleMode ? (M(), C(Lt, {
1621
1602
  key: 0,
1622
1603
  id: "all",
1623
1604
  colorId: "",
@@ -1625,7 +1606,7 @@ var He = /* @__PURE__ */ k({
1625
1606
  state: I(v).model.value.length ? "" : "selected",
1626
1607
  onSelect: t[3] ||= (e) => I(v).model.value = []
1627
1608
  }, null, 8, ["name", "state"])) : w("", !0),
1628
- (M(!0), T(x, null, P(d.value, (e) => (M(), C(Rt, {
1609
+ (M(!0), T(x, null, P(d.value, (e) => (M(), C(Lt, {
1629
1610
  key: e.id,
1630
1611
  id: e.id,
1631
1612
  colorId: e.color_id,
@@ -1690,6 +1671,6 @@ var He = /* @__PURE__ */ k({
1690
1671
  }
1691
1672
  });
1692
1673
  //#endregion
1693
- export { _e as TopCompetitorSelector, Qe as TopGroupSelector, Ot as TopProjectSelector, Ie as TopRegionSelector, Vt as TopTagSelector, Bt as TopTagSelectorPopupOpener, It as TopTagSelectorTagIcon, xt as clearCache, je as dialogRegionSelector, Ae as findRegion, At as genElTopTagSelectorPopupOpener, De as genSearcherByKey, jt as renderElTopTagSelectorPopupOpener, ve as useItemsFromCompetitors };
1674
+ export { _e as TopCompetitorSelector, $e as TopGroupSelector, kt as TopProjectSelector, Ie as TopRegionSelector, Bt as TopTagSelector, zt as TopTagSelectorPopupOpener, Q as TopTagSelectorTagIcon, St as clearCache, je as dialogRegionSelector, Ae as findRegion, jt as genElTopTagSelectorPopupOpener, De as genSearcherByKey, Mt as renderElTopTagSelectorPopupOpener, ve as useItemsFromCompetitors };
1694
1675
 
1695
1676
  //# sourceMappingURL=project.js.map