@topvisor/ui 1.6.1-searcherKey.1 → 1.6.1
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.
- package/.chunks/app-qGtdp_Vh.es.amd.js +2 -0
- package/.chunks/app-qGtdp_Vh.es.amd.js.map +1 -0
- package/.chunks/app-qGtdp_Vh.es.js +405 -0
- package/.chunks/app-qGtdp_Vh.es.js.map +1 -0
- package/.chunks/{datepicker-QBCcmy-4.es.amd.js → datepicker-MlbIM78m.es.amd.js} +2 -2
- package/.chunks/{datepicker-QBCcmy-4.es.amd.js.map → datepicker-MlbIM78m.es.amd.js.map} +1 -1
- package/.chunks/{datepicker-QBCcmy-4.es.js → datepicker-MlbIM78m.es.js} +2 -2
- package/.chunks/{datepicker-QBCcmy-4.es.js.map → datepicker-MlbIM78m.es.js.map} +1 -1
- package/.chunks/{dialog-yP5SpcG2.es.amd.js → dialog-C_1nmPXN.es.amd.js} +2 -2
- package/.chunks/{dialog-yP5SpcG2.es.amd.js.map → dialog-C_1nmPXN.es.amd.js.map} +1 -1
- package/.chunks/{dialog-yP5SpcG2.es.js → dialog-C_1nmPXN.es.js} +3 -3
- package/.chunks/{dialog-yP5SpcG2.es.js.map → dialog-C_1nmPXN.es.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-DHRahvlr.es.amd.js → dialog_regionSelectorRegions-BPUDeHdW.es.amd.js} +2 -2
- package/.chunks/{dialog_regionSelectorRegions-DHRahvlr.es.amd.js.map → dialog_regionSelectorRegions-BPUDeHdW.es.amd.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-DHRahvlr.es.js → dialog_regionSelectorRegions-BPUDeHdW.es.js} +4 -4
- package/.chunks/{dialog_regionSelectorRegions-DHRahvlr.es.js.map → dialog_regionSelectorRegions-BPUDeHdW.es.js.map} +1 -1
- package/.chunks/{forms-CwTz6NZs.es.amd.js → forms-dosApNxi.es.amd.js} +2 -2
- package/.chunks/forms-dosApNxi.es.amd.js.map +1 -0
- package/.chunks/{forms-CwTz6NZs.es.js → forms-dosApNxi.es.js} +6 -6
- package/.chunks/{forms-CwTz6NZs.es.js.map → forms-dosApNxi.es.js.map} +1 -1
- package/.chunks/{formsExt-UGuWA3IZ.es.amd.js → formsExt-D7XsRleI.es.amd.js} +2 -2
- package/.chunks/{formsExt-UGuWA3IZ.es.amd.js.map → formsExt-D7XsRleI.es.amd.js.map} +1 -1
- package/.chunks/{formsExt-UGuWA3IZ.es.js → formsExt-D7XsRleI.es.js} +3 -3
- package/.chunks/{formsExt-UGuWA3IZ.es.js.map → formsExt-D7XsRleI.es.js.map} +1 -1
- package/.chunks/{notice-CEtqqU-D.es.amd.js → notice-8nwvAJQm.es.amd.js} +2 -2
- package/.chunks/{notice-CEtqqU-D.es.amd.js.map → notice-8nwvAJQm.es.amd.js.map} +1 -1
- package/.chunks/{notice-CEtqqU-D.es.js → notice-8nwvAJQm.es.js} +2 -2
- package/.chunks/{notice-CEtqqU-D.es.js.map → notice-8nwvAJQm.es.js.map} +1 -1
- package/.chunks/{popup-Ctmqg87k.es.amd.js → popup-Bn5Wm8WI.es.amd.js} +2 -2
- package/.chunks/{popup-Ctmqg87k.es.amd.js.map → popup-Bn5Wm8WI.es.amd.js.map} +1 -1
- package/.chunks/{popup-Ctmqg87k.es.js → popup-Bn5Wm8WI.es.js} +3 -3
- package/.chunks/{popup-Ctmqg87k.es.js.map → popup-Bn5Wm8WI.es.js.map} +1 -1
- package/.chunks/{popup-DeoDmf_L.es.amd.js → popup-cAqd6Dj3.es.amd.js} +2 -2
- package/.chunks/{popup-DeoDmf_L.es.amd.js.map → popup-cAqd6Dj3.es.amd.js.map} +1 -1
- package/.chunks/{popup-DeoDmf_L.es.js → popup-cAqd6Dj3.es.js} +3 -3
- package/.chunks/{popup-DeoDmf_L.es.js.map → popup-cAqd6Dj3.es.js.map} +1 -1
- package/.chunks/{utils-B-9_dGm0.es.amd.js → utils-D46Z7je_.es.amd.js} +2 -2
- package/.chunks/{utils-B-9_dGm0.es.amd.js.map → utils-D46Z7je_.es.amd.js.map} +1 -1
- package/.chunks/{utils-B-9_dGm0.es.js → utils-D46Z7je_.es.js} +4 -4
- package/.chunks/{utils-B-9_dGm0.es.js.map → utils-D46Z7je_.es.js.map} +1 -1
- package/.chunks/{utils-3yIeyK6N.es.amd.js → utils-mBJcBhkk.es.amd.js} +2 -2
- package/.chunks/{utils-3yIeyK6N.es.amd.js.map → utils-mBJcBhkk.es.amd.js.map} +1 -1
- package/.chunks/{utils-3yIeyK6N.es.js → utils-mBJcBhkk.es.js} +2 -2
- package/.chunks/{utils-3yIeyK6N.es.js.map → utils-mBJcBhkk.es.js.map} +1 -1
- package/.chunks/{worker-2yAM4kZz.es.amd.js → worker-BfCrg4RI.es.amd.js} +2 -2
- package/.chunks/{worker-2yAM4kZz.es.amd.js.map → worker-BfCrg4RI.es.amd.js.map} +1 -1
- package/.chunks/{worker-2yAM4kZz.es.js → worker-BfCrg4RI.es.js} +3 -3
- package/.chunks/worker-BfCrg4RI.es.js.map +1 -0
- package/assets/project.css +1 -1
- package/autoload-css-manifest.amd.json +4 -4
- package/autoload-css-manifest.json +4 -4
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.js +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +3 -3
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.amd.js.map +1 -1
- package/dialog/dialog.js +2 -2
- package/forms/forms.amd.js +1 -1
- package/forms/forms.amd.js.map +1 -1
- package/forms/forms.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +1 -1
- package/icomoon/Topvisor icons.json +338 -287
- package/icomoon/demo.html +29 -1
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +2 -0
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +11 -5
- package/layout/layout.amd.js +1 -1
- package/layout/layout.amd.js.map +1 -1
- package/layout/layout.js +1 -1
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +620 -368
- package/project/project.js.map +1 -1
- package/schedule/schedule.amd.js +1 -1
- package/schedule/schedule.amd.js.map +1 -1
- package/schedule/schedule.js +2 -2
- package/src/components/project/project.d.ts +1 -0
- package/src/components/project/projectBar/types.d.ts +47 -0
- package/src/components/project/regionSelector/types.d.ts +0 -6
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +2 -2
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.amd.js.map +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.amd.js.map +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.amd.js.map +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.amd.js.map +1 -1
- package/utils/lodash.js +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.amd.js.map +1 -1
- package/utils/price.js +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.amd.js.map +1 -1
- package/utils/searchers.js +1 -1
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +1 -1
- package/.chunks/app-3wPEjUXe.es.amd.js +0 -2
- package/.chunks/app-3wPEjUXe.es.amd.js.map +0 -1
- package/.chunks/app-3wPEjUXe.es.js +0 -487
- package/.chunks/app-3wPEjUXe.es.js.map +0 -1
- package/.chunks/forms-CwTz6NZs.es.amd.js.map +0 -1
- package/.chunks/worker-2yAM4kZz.es.js.map +0 -1
package/project/project.js
CHANGED
|
@@ -6,21 +6,22 @@
|
|
|
6
6
|
/* end import css */
|
|
7
7
|
|
|
8
8
|
import { a as e, i as t } from "../.chunks/api-nVBtzTDk.es.js";
|
|
9
|
-
import { E as n, O as r, P as i, h as a,
|
|
10
|
-
import { storage as
|
|
11
|
-
import { t as
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { c as
|
|
19
|
-
import {
|
|
9
|
+
import { E as n, O as r, P as i, h as a, i as o, n as s } from "../.chunks/forms-dosApNxi.es.js";
|
|
10
|
+
import { storage as c } from "../utils/dom.js";
|
|
11
|
+
import { t as l } from "../.chunks/worker-BfCrg4RI.es.js";
|
|
12
|
+
import "../.chunks/app-qGtdp_Vh.es.js";
|
|
13
|
+
import { t as u } from "../.chunks/utils-mBJcBhkk.es.js";
|
|
14
|
+
import { validUrl as d } from "../utils/check.js";
|
|
15
|
+
import { ellipsis as f } from "../utils/string.js";
|
|
16
|
+
import { genRegionLabelData as p, getSearcherGIcon as m } from "../utils/searchers.js";
|
|
17
|
+
import { invertKeyboardLayout as h } from "../utils/keyboard.js";
|
|
18
|
+
import { c as g, n as _, o as v, r as y, s as b } from "../.chunks/popup-cAqd6Dj3.es.js";
|
|
19
|
+
import { c as x, d as S, f as C, p as ee } from "../.chunks/formsExt-D7XsRleI.es.js";
|
|
20
|
+
import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createSlots as te, createTextVNode as A, createVNode as j, defineComponent as M, isRef as ne, mergeModels as N, mergeProps as re, nextTick as ie, normalizeClass as P, normalizeStyle as ae, onMounted as oe, onUnmounted as se, openBlock as F, reactive as ce, ref as I, renderList as L, renderSlot as R, 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";
|
|
20
21
|
//#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__ */
|
|
22
|
+
var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, ye = /* @__PURE__ */ M({
|
|
22
23
|
__name: "competitorSelector",
|
|
23
|
-
props: /*@__PURE__*/
|
|
24
|
+
props: /*@__PURE__*/ N({
|
|
24
25
|
modelValue: {},
|
|
25
26
|
items: {},
|
|
26
27
|
showSelectAllItem: {
|
|
@@ -34,7 +35,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
34
35
|
}),
|
|
35
36
|
emits: ["update:modelValue"],
|
|
36
37
|
setup(e) {
|
|
37
|
-
let t = e, i = V(e, "modelValue"), o =
|
|
38
|
+
let t = e, i = V(e, "modelValue"), o = T(() => {
|
|
38
39
|
if (t.showSelectAllItem) return {
|
|
39
40
|
icon: t.selectAllItemIcon,
|
|
40
41
|
title: n().Common.Select_all,
|
|
@@ -42,23 +43,23 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
42
43
|
content: ""
|
|
43
44
|
};
|
|
44
45
|
});
|
|
45
|
-
return (t, n) => (
|
|
46
|
-
opener: U(() => [
|
|
46
|
+
return (t, n) => (F(), O("div", _e, [B(r).state.isMobile ? (F(), E(b, { key: 0 }, {
|
|
47
|
+
opener: U(() => [j(a, {
|
|
47
48
|
class: "top-competitorSelector_opener",
|
|
48
49
|
color: "theme",
|
|
49
50
|
icon: "",
|
|
50
51
|
icon2: ""
|
|
51
52
|
}, {
|
|
52
|
-
default: U(() => [
|
|
53
|
+
default: U(() => [A(z(e.items.find((e) => e.value === i.value?.[0])?.content), 1)]),
|
|
53
54
|
_: 1
|
|
54
55
|
})]),
|
|
55
|
-
contentList: U(() => [(
|
|
56
|
-
class:
|
|
56
|
+
contentList: U(() => [(F(!0), O(w, null, L(e.items, (e) => (F(), E(v, {
|
|
57
|
+
class: P({ "top-active": i.value?.includes(e.value) }),
|
|
57
58
|
"data-top-icon": e.icon,
|
|
58
59
|
title: e.title,
|
|
59
60
|
onClick: () => i.value = [e.value]
|
|
60
61
|
}, {
|
|
61
|
-
default: U(() => [
|
|
62
|
+
default: U(() => [k("span", ve, z(e.content), 1)]),
|
|
62
63
|
_: 2
|
|
63
64
|
}, 1032, [
|
|
64
65
|
"class",
|
|
@@ -67,7 +68,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
67
68
|
"onClick"
|
|
68
69
|
]))), 256))]),
|
|
69
70
|
_: 1
|
|
70
|
-
})) : (
|
|
71
|
+
})) : (F(), E(ee, {
|
|
71
72
|
key: 1,
|
|
72
73
|
modelValue: i.value,
|
|
73
74
|
"onUpdate:modelValue": n[0] ||= (e) => i.value = e,
|
|
@@ -82,23 +83,105 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
82
83
|
"selectAllItem"
|
|
83
84
|
]))]));
|
|
84
85
|
}
|
|
85
|
-
}), be = (e, t) =>
|
|
86
|
+
}), be = (e, t) => T(() => pe(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
|
|
86
87
|
value: e.id,
|
|
87
88
|
title: e.url + ` [${e.id}]`,
|
|
88
89
|
icon: e.id === pe(t) ? "" : "",
|
|
89
90
|
content: e.name
|
|
90
|
-
}))), xe =
|
|
91
|
+
}))), xe = {
|
|
92
|
+
0: "Yandex",
|
|
93
|
+
1: "Google",
|
|
94
|
+
4: "YouTube",
|
|
95
|
+
5: "Bing",
|
|
96
|
+
7: "Seznam",
|
|
97
|
+
8: "AppStore",
|
|
98
|
+
9: "GoogleStore",
|
|
99
|
+
20: "Yandex.com",
|
|
100
|
+
21: "Yandex.com.tr",
|
|
101
|
+
22: "YandexLive"
|
|
102
|
+
}, Se = {
|
|
103
|
+
alt: "",
|
|
104
|
+
key: -2,
|
|
105
|
+
name: "--",
|
|
106
|
+
index: -2
|
|
107
|
+
}, Ce = {
|
|
108
|
+
key: -2,
|
|
109
|
+
name: "--",
|
|
110
|
+
regions: [Se],
|
|
111
|
+
regionByIndex: /* @__PURE__ */ new Map([[-2, Se]])
|
|
112
|
+
}, G = {
|
|
113
|
+
alt: "",
|
|
114
|
+
key: -2,
|
|
115
|
+
name: "Autoselect",
|
|
116
|
+
index: -2
|
|
117
|
+
}, we = {
|
|
118
|
+
key: -2,
|
|
119
|
+
name: "Autoselect",
|
|
120
|
+
regions: [G],
|
|
121
|
+
regionByIndex: /* @__PURE__ */ new Map([[-2, G]])
|
|
122
|
+
}, Te = {
|
|
123
|
+
alt: "",
|
|
124
|
+
countryCode: "00",
|
|
125
|
+
depth: 1,
|
|
126
|
+
device: 0,
|
|
127
|
+
key: -1,
|
|
128
|
+
index: -1,
|
|
129
|
+
lang: "ru",
|
|
130
|
+
name: "Without region"
|
|
131
|
+
}, Ee = () => (G.name = n().Common.Autoselect, G), De = () => (Ee(), we.name = n().Common.Autoselect, console.log(we), we), Oe = () => (Te.name = n().Keywords.Without_region, Te), ke = [
|
|
132
|
+
4,
|
|
133
|
+
8,
|
|
134
|
+
9
|
|
135
|
+
], Ae = (e, t, n = []) => {
|
|
136
|
+
let r = Me(e, !1, n), i;
|
|
137
|
+
return r.forEach((n) => {
|
|
138
|
+
if ((t.searcher_key === void 0 || t.searcher_key == n.key) && n.regions && (n.regions.forEach((r) => {
|
|
139
|
+
if (!i && (t.key === void 0 || t.key == r.key) && (t.index === void 0 || t.index == r.index) && !(!e && (t.lang !== void 0 && t.lang != r.lang || t.device !== void 0 && t.device != r.device))) return r.searcher_key = n.key, i = r, !1;
|
|
140
|
+
}), i)) return !1;
|
|
141
|
+
}), i;
|
|
142
|
+
}, je = u(() => import("../.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.js")), Me = (e = "", t = !1, n = []) => {
|
|
143
|
+
let r;
|
|
144
|
+
return r = e === "volume" || e === "cost_forecast" ? Ne(n) : e === "project_relevant_url" ? Pe(n) : Fe(n, !0), t && r.set(-2, De()), r.size || r.set(-2, Ce), r;
|
|
145
|
+
}, Ne = (e) => {
|
|
146
|
+
e = e.filter((e) => r.state.forceSearchersKeysForKeywordsStats.includes(e.key));
|
|
147
|
+
let t = Fe(e, !1);
|
|
148
|
+
return r.state.forceSearchersKeysForKeywordsStats.forEach((e) => {
|
|
149
|
+
if (t.has(e)) return;
|
|
150
|
+
let n = {
|
|
151
|
+
key: e,
|
|
152
|
+
name: xe[e],
|
|
153
|
+
regions: [],
|
|
154
|
+
regionByIndex: /* @__PURE__ */ new Map()
|
|
155
|
+
};
|
|
156
|
+
t.set(n.key, n);
|
|
157
|
+
}), r.state.showGlobalRegionForKeywordsStats && t.forEach((e) => {
|
|
158
|
+
if (!e.regionByIndex) return;
|
|
159
|
+
let t = { ...Oe() };
|
|
160
|
+
e.regionByIndex.set(t.index, t);
|
|
161
|
+
}), t;
|
|
162
|
+
}, Pe = (e) => (e = e.filter((e) => !ke.includes(e.key)), Fe(e, !1)), Fe = (e, t) => {
|
|
163
|
+
let n = /* @__PURE__ */ new Map();
|
|
164
|
+
return e.forEach((e) => {
|
|
165
|
+
if (t && !e.enabled) return;
|
|
166
|
+
let r = { ...e };
|
|
167
|
+
r.regionByIndex = /* @__PURE__ */ new Map(), e.regions && e.regions.forEach((e) => {
|
|
168
|
+
if (t && !e.enabled) return;
|
|
169
|
+
let n = { ...e };
|
|
170
|
+
r.regionByIndex.set(n.index, n);
|
|
171
|
+
}), r.regionByIndex.size, (!e.regions || r.regionByIndex.size) && n.set(r.key, r);
|
|
172
|
+
}), n;
|
|
173
|
+
}, Ie = (e, t) => {
|
|
91
174
|
let r = n();
|
|
92
175
|
return {
|
|
93
|
-
searcherKey:
|
|
94
|
-
optionBySearcherKey:
|
|
176
|
+
searcherKey: I(t.value.keys().next().value ?? -2),
|
|
177
|
+
optionBySearcherKey: T(() => {
|
|
95
178
|
let n = /* @__PURE__ */ new Map();
|
|
96
179
|
if (t.value.forEach((t) => {
|
|
97
180
|
let r = {
|
|
98
181
|
value: t.key,
|
|
99
182
|
title: t.name
|
|
100
183
|
};
|
|
101
|
-
e.addSearcherIcon && (r.icon =
|
|
184
|
+
e.addSearcherIcon && (r.icon = m(t.key)), n.set(t.key, r);
|
|
102
185
|
}), e.addCompare && !n.has(-2)) {
|
|
103
186
|
let e = {
|
|
104
187
|
value: "",
|
|
@@ -115,10 +198,10 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
115
198
|
return n;
|
|
116
199
|
})
|
|
117
200
|
};
|
|
118
|
-
},
|
|
119
|
-
let r = n(), i =
|
|
201
|
+
}, Le = (e, t) => {
|
|
202
|
+
let r = n(), i = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), a = I(-2);
|
|
120
203
|
e.modelValue.length === 1 && (a.value = e.modelValue[0]), a.value === -2 && (a.value = i.value ? t.value?.regionByIndex.values().next().value?.key ?? -2 : t.value?.regionByIndex.keys().next().value ?? -2);
|
|
121
|
-
let o =
|
|
204
|
+
let o = T(() => {
|
|
122
205
|
let e = /* @__PURE__ */ new Map();
|
|
123
206
|
return t.value.regionByIndex?.forEach((t) => {
|
|
124
207
|
if (i.value) {
|
|
@@ -129,7 +212,7 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
129
212
|
e.has(t.key) || e.set(t.key, n);
|
|
130
213
|
return;
|
|
131
214
|
}
|
|
132
|
-
let n =
|
|
215
|
+
let n = p(t), r = [];
|
|
133
216
|
n.deviceLabel && r.push(n.deviceLabel), n.langLabel && r.push(n.langLabel), n.altLabel && r.push(n.altLabel);
|
|
134
217
|
let a = r.join(", ");
|
|
135
218
|
a &&= ` (${a})`;
|
|
@@ -157,15 +240,15 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
157
240
|
break;
|
|
158
241
|
}
|
|
159
242
|
let a = RegExp(` \\((${r.Common.Device_1}|${r.Common.Device_2})\\)`), c = o, l = 3;
|
|
160
|
-
t.indexOf(c) === -1 && (c = o.replace(/^[^a-zа-я]/i, "").replace(a, ""), l--), t.indexOf(c) === -1 && (c = o.replace(
|
|
243
|
+
t.indexOf(c) === -1 && (c = o.replace(/^[^a-zа-я]/i, "").replace(a, ""), l--), t.indexOf(c) === -1 && (c = o.replace(/ \/.*/, ""), l--), t.indexOf(c) === -1 && (c = o.replace(/ \/.*/, ""), c = c.replace(/^[^a-zа-я]/i, "").replace(a, ""), l--), t.indexOf(c) !== -1 && (l <= s || (s = l, i = e));
|
|
161
244
|
}
|
|
162
245
|
a.value = i;
|
|
163
246
|
}), {
|
|
164
247
|
regionIndex: a,
|
|
165
248
|
optionByRegionIndex: o
|
|
166
249
|
};
|
|
167
|
-
},
|
|
168
|
-
let r =
|
|
250
|
+
}, Re = (e, t, n) => {
|
|
251
|
+
let r = I([]), i = () => {
|
|
169
252
|
if (e.onlySearcher && t.value) {
|
|
170
253
|
r.value = Array.from(t.value.keys());
|
|
171
254
|
return;
|
|
@@ -182,49 +265,45 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
182
265
|
return H(r, () => {
|
|
183
266
|
a();
|
|
184
267
|
}), e.addCompare && i(), { regionsIndexes: r };
|
|
185
|
-
},
|
|
186
|
-
let t =
|
|
268
|
+
}, ze = (e) => {
|
|
269
|
+
let t = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = T(() => Me(e.forMode, e.autoRegion, e.searchers)), r = T(() => n.value.get(a.searcherKey.value) || Ce), i = T(() => {
|
|
187
270
|
let e = /* @__PURE__ */ new Set();
|
|
188
271
|
return n.value.forEach((t) => {
|
|
189
272
|
t.regionByIndex.forEach((t) => {
|
|
190
273
|
t.index !== -2 && e.add(t.index);
|
|
191
274
|
});
|
|
192
275
|
}), e;
|
|
193
|
-
}), a =
|
|
276
|
+
}), a = Ie(e, n), o = Le(e, r), s = Re(e, n, i);
|
|
194
277
|
H(n, () => {
|
|
195
278
|
if (e.onlySearcher ? s.regionsIndexes.value = Array.from(n.value.keys()) : s.regionsIndexes.value = s.regionsIndexes.value.filter((e) => i.value.has(e)), a.searcherKey.value === -1) return;
|
|
196
|
-
let
|
|
197
|
-
|
|
198
|
-
if (e.onlySearcher &&
|
|
199
|
-
|
|
279
|
+
let t = n.value.keys().next().value;
|
|
280
|
+
n.value.forEach((r) => {
|
|
281
|
+
if (e.onlySearcher && r.key === a.searcherKey.value) {
|
|
282
|
+
t = a.searcherKey.value;
|
|
200
283
|
return;
|
|
201
284
|
}
|
|
202
|
-
if (o.regionIndex.value &&
|
|
285
|
+
if (o.regionIndex.value && r.regionByIndex?.has(o.regionIndex.value) && (t = r.key), !e.onlySearcher) {
|
|
203
286
|
let e;
|
|
204
|
-
|
|
205
|
-
let
|
|
206
|
-
e?.has(-2) && !
|
|
287
|
+
t !== void 0 && (e = n.value.get(t)?.regionByIndex);
|
|
288
|
+
let i = n.value.get(r.key)?.regionByIndex;
|
|
289
|
+
e?.has(-2) && !i?.has(-2) && (t = r.key);
|
|
207
290
|
}
|
|
208
|
-
}),
|
|
209
|
-
let e = r.value?.regionByIndex.values().next().value;
|
|
210
|
-
if (!e) return;
|
|
211
|
-
o.regionIndex.value = t.value ? e.key : e.index;
|
|
212
|
-
}
|
|
291
|
+
}), t !== void 0 && (a.searcherKey.value = t), o.regionIndex.value !== void 0 && !(r.value?.regionByIndex)?.has(o.regionIndex.value) && (o.regionIndex.value = r.value?.regions?.keys().next().value);
|
|
213
292
|
}, { immediate: !0 });
|
|
214
293
|
let c = () => {
|
|
215
294
|
if (a.searcherKey.value !== -1 && a.searcherKey.value !== -2) return a.searcherKey.value;
|
|
216
|
-
},
|
|
295
|
+
}, l = () => {
|
|
217
296
|
if (e.onlySearcher || o.regionIndex.value === -2) return;
|
|
218
297
|
let n = o.regionIndex.value;
|
|
219
298
|
if (t.value && e.forMode) {
|
|
220
299
|
let t = o.regionIndex.value;
|
|
221
|
-
n =
|
|
300
|
+
n = Ae(e.forMode, {
|
|
222
301
|
searcher_key: c(),
|
|
223
302
|
key: t
|
|
224
303
|
}, e.searchers)?.index;
|
|
225
304
|
}
|
|
226
305
|
return n;
|
|
227
|
-
},
|
|
306
|
+
}, u = () => {
|
|
228
307
|
let e = c();
|
|
229
308
|
if (e !== void 0) return n.value.get(e);
|
|
230
309
|
};
|
|
@@ -234,20 +313,19 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
234
313
|
compare: s,
|
|
235
314
|
searcherByKey: n,
|
|
236
315
|
allRegionsIndexes: i,
|
|
237
|
-
getSearcher:
|
|
316
|
+
getSearcher: u,
|
|
238
317
|
getRegion: () => {
|
|
239
|
-
let e =
|
|
240
|
-
if (e !== void 0) return
|
|
318
|
+
let e = l();
|
|
319
|
+
if (e !== void 0) return u()?.regionByIndex?.get(e);
|
|
241
320
|
}
|
|
242
321
|
};
|
|
243
|
-
},
|
|
322
|
+
}, Be = /* @__PURE__ */ M({
|
|
244
323
|
__name: "regionSelector",
|
|
245
|
-
props: /*@__PURE__*/
|
|
324
|
+
props: /*@__PURE__*/ N({
|
|
246
325
|
projectId: {},
|
|
247
326
|
searchers: { default: () => [] },
|
|
248
327
|
modelValue: {},
|
|
249
328
|
modelValueSingle: {},
|
|
250
|
-
modelValueSearcherKey: {},
|
|
251
329
|
addCompare: { type: Boolean },
|
|
252
330
|
forMode: {},
|
|
253
331
|
autoRegion: { type: Boolean },
|
|
@@ -268,112 +346,95 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
268
346
|
modelValue: { required: !0 },
|
|
269
347
|
modelModifiers: {},
|
|
270
348
|
modelValueSingle: {},
|
|
271
|
-
modelValueSingleModifiers: {}
|
|
272
|
-
modelValueSearcherKey: {},
|
|
273
|
-
modelValueSearcherKeyModifiers: {}
|
|
349
|
+
modelValueSingleModifiers: {}
|
|
274
350
|
}),
|
|
275
|
-
emits: [
|
|
276
|
-
"update:modelValue",
|
|
277
|
-
"update:modelValueSingle",
|
|
278
|
-
"update:modelValueSearcherKey"
|
|
279
|
-
],
|
|
351
|
+
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
280
352
|
setup(e, { expose: t }) {
|
|
281
|
-
let n = e, r =
|
|
353
|
+
let n = e, r = T(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i = V(e, "modelValue"), o = V(e, "modelValueSingle"), { selectSearcher: c, selectRegion: l, compare: u, searcherByKey: d, allRegionsIndexes: f, getSearcher: p, getRegion: m } = ze(n), h = () => {
|
|
282
354
|
let e = [];
|
|
283
|
-
|
|
355
|
+
d.value.forEach((t) => {
|
|
284
356
|
(n.forMode === "project_relevant_url" || t.enabled) && t.regions.forEach((t) => {
|
|
285
357
|
(n.forMode === "project_relevant_url" || t.enabled) && t.index !== -1 && e.push(t);
|
|
286
358
|
});
|
|
287
|
-
}),
|
|
359
|
+
}), je.open("regions", {
|
|
288
360
|
regions: e,
|
|
289
|
-
regionsIndexes:
|
|
290
|
-
"@update:regionsIndexes": (e) =>
|
|
361
|
+
regionsIndexes: u.regionsIndexes.value,
|
|
362
|
+
"@update:regionsIndexes": (e) => u.regionsIndexes.value = e
|
|
291
363
|
});
|
|
292
364
|
};
|
|
293
365
|
return H([
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
], () => {
|
|
298
|
-
let e = i.value.some((e) => e !== -2);
|
|
299
|
-
if (r.value && !n.onlySearcher && c.value === void 0 && e) throw Error("При использовании `region.key` в `modelValue` необходимо передавать `modelValueSearcherKey`");
|
|
300
|
-
}, { immediate: !0 }), H([
|
|
301
|
-
u.regionIndex,
|
|
302
|
-
l.searcherKey,
|
|
303
|
-
f.regionsIndexes
|
|
366
|
+
l.regionIndex,
|
|
367
|
+
c.searcherKey,
|
|
368
|
+
u.regionsIndexes
|
|
304
369
|
], () => {
|
|
305
|
-
if (
|
|
306
|
-
if (JSON.stringify(i.value) === JSON.stringify(
|
|
307
|
-
i.value = [...
|
|
308
|
-
} else n.onlySearcher ? (i.value = [
|
|
309
|
-
!n.onlySearcher && !
|
|
310
|
-
}), H(
|
|
311
|
-
|
|
312
|
-
}), H(l.searcherKey, () => {
|
|
313
|
-
r.value && c.value !== void 0 && (c.value = l.searcherKey.value);
|
|
314
|
-
}), s.value && H(s, () => {
|
|
315
|
-
s.value && (i.value = [s.value]);
|
|
370
|
+
if (c.searcherKey.value === -1 && u.regionsIndexes.value.length) {
|
|
371
|
+
if (JSON.stringify(i.value) === JSON.stringify(u.regionsIndexes.value)) return;
|
|
372
|
+
i.value = [...u.regionsIndexes.value];
|
|
373
|
+
} else n.onlySearcher ? (i.value = [c.searcherKey.value], c.searcherKey.value === -2 && !n.autoRegion && (i.value.length = 0)) : (i.value = [l.regionIndex.value], l.regionIndex.value === -2 && !n.autoRegion && (i.value.length = 0));
|
|
374
|
+
!n.onlySearcher && !f.value.size && (c.searcherKey.value = -2);
|
|
375
|
+
}), o.value && H(o, () => {
|
|
376
|
+
o.value && (i.value = [o.value]);
|
|
316
377
|
}, { immediate: !0 }), H(i, () => {
|
|
317
|
-
if (i.value[0] && (
|
|
318
|
-
if (!i.value.length || i.value.length === 1 && !
|
|
319
|
-
let e =
|
|
320
|
-
e === -2 && !n.autoRegion && (e = void 0,
|
|
378
|
+
if (i.value[0] && (o.value = i.value[0]), n.onlySearcher) {
|
|
379
|
+
if (!i.value.length || i.value.length === 1 && !d.value.has(i.value[0]) || i.value.length === 1 && i.value[0] === -2 && !n.autoRegion) {
|
|
380
|
+
let e = d.value.keys().next().value;
|
|
381
|
+
e === -2 && !n.autoRegion && (e = void 0, o.value = -2), e === void 0 ? i.value.length = 0 : i.value = [e];
|
|
321
382
|
return;
|
|
322
383
|
}
|
|
323
|
-
if (i.value.length > 1 && JSON.stringify(i.value) !== JSON.stringify(
|
|
324
|
-
i.value = [...
|
|
384
|
+
if (i.value.length > 1 && JSON.stringify(i.value) !== JSON.stringify(u.regionsIndexes.value)) {
|
|
385
|
+
i.value = [...u.regionsIndexes.value];
|
|
325
386
|
return;
|
|
326
387
|
}
|
|
327
388
|
} else {
|
|
328
|
-
let e = [...new Set(i.value)], t =
|
|
329
|
-
if (r.value && (t =
|
|
389
|
+
let e = [...new Set(i.value)], t = d.value.values().next().value?.regionByIndex?.keys().next().value;
|
|
390
|
+
if (r.value && (t = d.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
391
|
else if (e.length === 1) {
|
|
331
|
-
let n =
|
|
332
|
-
r.value && (n = /* @__PURE__ */ new Set(),
|
|
392
|
+
let n = f.value;
|
|
393
|
+
r.value && (n = /* @__PURE__ */ new Set(), d.value.forEach((e) => {
|
|
333
394
|
e.regionByIndex.forEach((e) => {
|
|
334
395
|
e.index !== -2 && n.add(e.key);
|
|
335
396
|
});
|
|
336
397
|
})), n.has(e[0]) || (e = [], t !== void 0 && e.push(t));
|
|
337
|
-
} else e = e.filter((e) =>
|
|
398
|
+
} else e = e.filter((e) => f.value.has(e)), !e.length && t !== void 0 && e.push(t);
|
|
338
399
|
if (JSON.stringify(i.value) !== JSON.stringify(e)) {
|
|
339
400
|
i.value = e;
|
|
340
401
|
return;
|
|
341
402
|
}
|
|
342
403
|
}
|
|
343
|
-
if (i.value.length !== 1 || i.value[0] !== (n.onlySearcher ?
|
|
404
|
+
if (i.value.length !== 1 || i.value[0] !== (n.onlySearcher ? c.searcherKey.value : l.regionIndex.value)) {
|
|
344
405
|
if (n.onlySearcher) {
|
|
345
406
|
if (i.value.length === 1) {
|
|
346
|
-
|
|
407
|
+
c.searcherKey.value = i.value[0];
|
|
347
408
|
return;
|
|
348
409
|
}
|
|
349
|
-
|
|
410
|
+
c.searcherKey.value = -1;
|
|
350
411
|
return;
|
|
351
412
|
}
|
|
352
413
|
if (!i.value.length) return;
|
|
353
|
-
if (i.value.length === 1 &&
|
|
354
|
-
|
|
355
|
-
let e
|
|
356
|
-
|
|
357
|
-
for (let n of t.regionByIndex.values()) if ((r.value ? n.key : n.index) ===
|
|
414
|
+
if (i.value.length === 1 && c.searcherKey.value !== -1) {
|
|
415
|
+
l.regionIndex.value = i.value[0];
|
|
416
|
+
let e;
|
|
417
|
+
for (let t of d.value.values()) {
|
|
418
|
+
for (let n of t.regionByIndex.values()) if ((r.value ? n.key : n.index) === l.regionIndex.value) {
|
|
358
419
|
e = t.key;
|
|
359
420
|
break;
|
|
360
421
|
}
|
|
361
422
|
if (e !== void 0) break;
|
|
362
423
|
}
|
|
363
|
-
e !== void 0 && (
|
|
364
|
-
} else
|
|
424
|
+
e !== void 0 && (c.searcherKey.value = e);
|
|
425
|
+
} else c.searcherKey.value = -1, u.regionsIndexes.value = [...i.value];
|
|
365
426
|
}
|
|
366
427
|
}, { immediate: !0 }), t({
|
|
367
|
-
getSearcher:
|
|
368
|
-
getRegion:
|
|
369
|
-
}), (t, n) => (
|
|
428
|
+
getSearcher: p,
|
|
429
|
+
getRegion: m
|
|
430
|
+
}), (t, n) => (F(), O("div", { class: P({
|
|
370
431
|
"top-regionSelector": !0,
|
|
371
432
|
"top-regionSelector-onlySearcher": e.onlySearcher
|
|
372
433
|
}) }, [
|
|
373
|
-
|
|
374
|
-
options: B(
|
|
375
|
-
modelValue: B(
|
|
376
|
-
"onUpdate:modelValue": n[0] ||= (e) => B(
|
|
434
|
+
j(s, {
|
|
435
|
+
options: B(c).optionBySearcherKey.value,
|
|
436
|
+
modelValue: B(c).searcherKey.value,
|
|
437
|
+
"onUpdate:modelValue": n[0] ||= (e) => B(c).searcherKey.value = e,
|
|
377
438
|
name: "searcher_key",
|
|
378
439
|
addChanger: e.addChanger
|
|
379
440
|
}, null, 8, [
|
|
@@ -381,12 +442,12 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
381
442
|
"modelValue",
|
|
382
443
|
"addChanger"
|
|
383
444
|
]),
|
|
384
|
-
!e.onlySearcher && B(
|
|
445
|
+
!e.onlySearcher && B(c).searcherKey.value !== B(-1) ? (F(), E(s, {
|
|
385
446
|
key: 0,
|
|
386
447
|
class: "top-select-region",
|
|
387
|
-
options: B(
|
|
388
|
-
modelValue: B(
|
|
389
|
-
"onUpdate:modelValue": n[1] ||= (e) => B(
|
|
448
|
+
options: B(l).optionByRegionIndex.value,
|
|
449
|
+
modelValue: B(l).regionIndex.value,
|
|
450
|
+
"onUpdate:modelValue": n[1] ||= (e) => B(l).regionIndex.value = e,
|
|
390
451
|
name: r.value ? "region_key" : "region_index",
|
|
391
452
|
addChanger: e.addChanger,
|
|
392
453
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
@@ -396,31 +457,31 @@ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, y
|
|
|
396
457
|
"name",
|
|
397
458
|
"addChanger",
|
|
398
459
|
"data-top-icon"
|
|
399
|
-
])) :
|
|
400
|
-
e.addCompare && !e.onlySearcher && B(
|
|
460
|
+
])) : D("", !0),
|
|
461
|
+
e.addCompare && !e.onlySearcher && B(c).searcherKey.value === B(-1) ? (F(), E(a, {
|
|
401
462
|
key: 1,
|
|
402
463
|
name: "compare",
|
|
403
|
-
onClick:
|
|
404
|
-
"data-count-compare-regions-indexes": B(
|
|
464
|
+
onClick: h,
|
|
465
|
+
"data-count-compare-regions-indexes": B(u).regionsIndexes.value.length
|
|
405
466
|
}, {
|
|
406
|
-
default: U(() => [
|
|
467
|
+
default: U(() => [A(z(t.$i18n.Common.Selected_regions), 1)]),
|
|
407
468
|
_: 1
|
|
408
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
469
|
+
}, 8, ["data-count-compare-regions-indexes"])) : D("", !0)
|
|
409
470
|
], 2));
|
|
410
471
|
}
|
|
411
|
-
}),
|
|
472
|
+
}), K = {
|
|
412
473
|
id: 0,
|
|
413
474
|
name: "/",
|
|
414
475
|
path: "/"
|
|
415
476
|
};
|
|
416
|
-
function
|
|
477
|
+
function Ve(e) {
|
|
417
478
|
return e ? n()?.Common.All_folders : "/ (" + n()?.Keywords.Root_folder + ")";
|
|
418
479
|
}
|
|
419
|
-
var
|
|
420
|
-
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name =
|
|
480
|
+
var He = (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) => {
|
|
481
|
+
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Ve(t));
|
|
421
482
|
let o = i > 1 ? "-".repeat(i - 1) + " " : "";
|
|
422
|
-
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a),
|
|
423
|
-
}), n),
|
|
483
|
+
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), He(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);
|
|
484
|
+
}), n), Ue = (e, t) => e.gen(`/get/${t}/folders/`, [
|
|
424
485
|
"id",
|
|
425
486
|
"parent_id",
|
|
426
487
|
"name",
|
|
@@ -431,7 +492,7 @@ var De = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
|
|
|
431
492
|
});
|
|
432
493
|
//#endregion
|
|
433
494
|
//#region src/core/utils/composables/useWatch.ts
|
|
434
|
-
function
|
|
495
|
+
function We(e, t, n) {
|
|
435
496
|
let r = Object.keys(e), i = r.map((t) => e[t]);
|
|
436
497
|
return H(i, (e, n, i) => {
|
|
437
498
|
let a = {};
|
|
@@ -448,9 +509,9 @@ function ke(e, t, n) {
|
|
|
448
509
|
}
|
|
449
510
|
//#endregion
|
|
450
511
|
//#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
|
|
451
|
-
var
|
|
512
|
+
var Ge = ["innerHTML"], Ke = /* @__PURE__ */ M({
|
|
452
513
|
__name: "folders",
|
|
453
|
-
props: /*@__PURE__*/
|
|
514
|
+
props: /*@__PURE__*/ N({
|
|
454
515
|
folderId: {},
|
|
455
516
|
folder: {},
|
|
456
517
|
folders: {},
|
|
@@ -466,20 +527,20 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
466
527
|
}, {
|
|
467
528
|
folderId: { required: !0 },
|
|
468
529
|
folderIdModifiers: {},
|
|
469
|
-
folder: { default:
|
|
530
|
+
folder: { default: K },
|
|
470
531
|
folderModifiers: {}
|
|
471
532
|
}),
|
|
472
533
|
emits: ["update:folderId", "update:folder"],
|
|
473
534
|
setup(e) {
|
|
474
|
-
let t = e, n = V(e, "folderId"), r = V(e, "folder"), i = t.client && !t.folders ?
|
|
535
|
+
let t = e, n = V(e, "folderId"), r = V(e, "folder"), i = t.client && !t.folders ? Ue(t.client, t.service) : void 0, a = I(null);
|
|
475
536
|
H(() => t.projectId, () => {
|
|
476
537
|
i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
|
|
477
538
|
}, { immediate: !0 });
|
|
478
|
-
let o =
|
|
539
|
+
let o = T(() => He(t.folders ?? { root: [K] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
|
|
479
540
|
...e[0],
|
|
480
|
-
name:
|
|
541
|
+
name: Ve(!0)
|
|
481
542
|
}), e);
|
|
482
|
-
return
|
|
543
|
+
return We({
|
|
483
544
|
modelFolder: r,
|
|
484
545
|
modelFolderId: n
|
|
485
546
|
}, async (e) => {
|
|
@@ -489,8 +550,8 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
489
550
|
return;
|
|
490
551
|
}
|
|
491
552
|
let i = o.value.get(t.folderId);
|
|
492
|
-
i ||=
|
|
493
|
-
}, { immediate: !0 }), (t, n) => (
|
|
553
|
+
i ||= K, r.value = i, n.value = i.id;
|
|
554
|
+
}, { immediate: !0 }), (t, n) => (F(), E(x, {
|
|
494
555
|
class: "top-groupSelector_folder",
|
|
495
556
|
modelValue: r.value,
|
|
496
557
|
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
@@ -498,12 +559,12 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
498
559
|
"search-type": "inline",
|
|
499
560
|
icon: e.addIcon ? "" : void 0,
|
|
500
561
|
api: e.folders ? void 0 : B(i),
|
|
501
|
-
apiSetSearchParams: (...e) => B(
|
|
562
|
+
apiSetSearchParams: (...e) => B(S)(...e, "name"),
|
|
502
563
|
prepareItemsBeforeRender: s,
|
|
503
564
|
addChanger: e.addChanger,
|
|
504
565
|
useCache: ""
|
|
505
566
|
}, {
|
|
506
|
-
item: U(({ item: e }) => [
|
|
567
|
+
item: U(({ item: e }) => [k("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ge)]),
|
|
507
568
|
_: 1
|
|
508
569
|
}, 8, [
|
|
509
570
|
"modelValue",
|
|
@@ -514,17 +575,17 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
514
575
|
"addChanger"
|
|
515
576
|
]));
|
|
516
577
|
}
|
|
517
|
-
}),
|
|
578
|
+
}), q = {
|
|
518
579
|
id: -1,
|
|
519
580
|
name: "--",
|
|
520
|
-
folder_id:
|
|
521
|
-
folder_path:
|
|
522
|
-
},
|
|
581
|
+
folder_id: K.id,
|
|
582
|
+
folder_path: K.path
|
|
583
|
+
}, J = {
|
|
523
584
|
id: 0,
|
|
524
585
|
name: "All groups",
|
|
525
|
-
folder_id:
|
|
526
|
-
folder_path:
|
|
527
|
-
},
|
|
586
|
+
folder_id: K.id,
|
|
587
|
+
folder_path: K.path
|
|
588
|
+
}, Y = () => (J.name = n()?.Common.All_groups, J), qe = () => (J.name = n()?.Keywords.Choose_group, J), Je = (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), Ye = (e, t) => e.gen(`/get/${t}/groups/`, [
|
|
528
589
|
"id",
|
|
529
590
|
"name",
|
|
530
591
|
"folder_id",
|
|
@@ -532,12 +593,12 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
532
593
|
]).changeParams({
|
|
533
594
|
folder_id_depth: !0,
|
|
534
595
|
limit: 100
|
|
535
|
-
}),
|
|
596
|
+
}), Xe = (e, t) => e.gen(`/add/${t}/groups/`), Ze = (e, t) => e.gen(`/del/${t}/groups/`), Qe = (e, t) => e.gen(`/edit/${t}/groups/rename/`), $e = { class: "top-groupSelector_groupItem top-ellipsis1" }, et = {
|
|
536
597
|
key: 0,
|
|
537
598
|
class: "top-comment"
|
|
538
|
-
},
|
|
599
|
+
}, tt = ["innerHTML"], nt = ["innerHTML"], rt = ["innerHTML"], it = /* @__PURE__ */ M({
|
|
539
600
|
__name: "groups",
|
|
540
|
-
props: /*@__PURE__*/
|
|
601
|
+
props: /*@__PURE__*/ N({
|
|
541
602
|
groupId: {},
|
|
542
603
|
group: {},
|
|
543
604
|
projectId: {},
|
|
@@ -568,14 +629,14 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
568
629
|
group: { required: !0 },
|
|
569
630
|
groupModifiers: {}
|
|
570
631
|
}),
|
|
571
|
-
emits: /*@__PURE__*/
|
|
632
|
+
emits: /*@__PURE__*/ N([
|
|
572
633
|
"addGroup",
|
|
573
634
|
"editGroup",
|
|
574
635
|
"delGroup"
|
|
575
636
|
], ["update:groupId", "update:group"]),
|
|
576
637
|
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 ?
|
|
578
|
-
if (i.groups !== void 0) return
|
|
638
|
+
let i = e, a = r, o = V(e, "groupId"), s = V(e, "group"), c = i.client && !i.groups ? Ye(i.client, i.service) : void 0, l = i.client ? Xe(i.client, i.service) : void 0, u = i.client ? Ze(i.client, i.service) : void 0, d = i.client ? Qe(i.client, i.service) : void 0, f = I(null), p = T(() => {
|
|
639
|
+
if (i.groups !== void 0) return Je(i.groups, i.on, i.folder);
|
|
579
640
|
}), m = t("folder_id", "EQUALS", [i.folder?.id ?? 0]);
|
|
580
641
|
c?.changeParams({
|
|
581
642
|
project_id: i.projectId,
|
|
@@ -587,16 +648,16 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
587
648
|
}, g = (e = !1) => {
|
|
588
649
|
f.value?.resetCache(e);
|
|
589
650
|
};
|
|
590
|
-
|
|
651
|
+
We({
|
|
591
652
|
projectId: () => i.projectId,
|
|
592
653
|
folderId: () => i.folder?.id,
|
|
593
654
|
canSelectAll: () => i.canSelectAll
|
|
594
655
|
}, (e) => {
|
|
595
656
|
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
657
|
let e;
|
|
597
|
-
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e =
|
|
658
|
+
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = ce(Y()))), (i.autoselect === "placeholder" || !e) && (e = qe()), h(e);
|
|
598
659
|
}
|
|
599
|
-
}, { immediate: !0 }),
|
|
660
|
+
}, { immediate: !0 }), We({
|
|
600
661
|
modelGroup: s,
|
|
601
662
|
modelGroupId: o
|
|
602
663
|
}, async (e) => {
|
|
@@ -608,14 +669,14 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
608
669
|
if (!(i.canAdd && o.value === null)) {
|
|
609
670
|
if (i.groups) {
|
|
610
671
|
let e = p.value?.find((e) => e.id === o.value);
|
|
611
|
-
if (!e && i.canSelectAll && (e =
|
|
672
|
+
if (!e && i.canSelectAll && (e = Y()), e) h(e);
|
|
612
673
|
else {
|
|
613
674
|
let e = p.value?.[0];
|
|
614
|
-
e && !o.value ? h(e) : h(
|
|
675
|
+
e && !o.value ? h(e) : h(q);
|
|
615
676
|
}
|
|
616
677
|
}
|
|
617
678
|
if (i.client && !i.groups && (o.value || o.value === 0 && !i.canSelectAll)) {
|
|
618
|
-
let e =
|
|
679
|
+
let e = Ye(i.client, i.service).changeParams({
|
|
619
680
|
project_id: i.projectId,
|
|
620
681
|
id: o.value,
|
|
621
682
|
filters: [m]
|
|
@@ -623,17 +684,17 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
623
684
|
e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + i.projectId });
|
|
624
685
|
let t = await e.call();
|
|
625
686
|
if (!t.errors?.length && !t.result) return;
|
|
626
|
-
!t.errors && t.result[0] ? h(t.result[0]) : h(
|
|
687
|
+
!t.errors && t.result[0] ? h(t.result[0]) : h(q);
|
|
627
688
|
}
|
|
628
689
|
}
|
|
629
690
|
}
|
|
630
691
|
}, { immediate: !0 });
|
|
631
|
-
let
|
|
692
|
+
let v = async (e) => {
|
|
632
693
|
if (i.canAdd !== "api" || !l) return;
|
|
633
694
|
let t = s.value, n = await l.changeParams({
|
|
634
695
|
project_id: i.projectId,
|
|
635
696
|
names: [e.name],
|
|
636
|
-
to_id: i.folder?.id ??
|
|
697
|
+
to_id: i.folder?.id ?? K.id,
|
|
637
698
|
to_type: "in_folder_last"
|
|
638
699
|
}).call();
|
|
639
700
|
if (n.result) {
|
|
@@ -641,7 +702,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
641
702
|
h(e), a("addGroup", e);
|
|
642
703
|
} else h(t);
|
|
643
704
|
f.value?.resetCache(!0);
|
|
644
|
-
},
|
|
705
|
+
}, b = async (e, t) => {
|
|
645
706
|
d && ((await d.changeParams({
|
|
646
707
|
project_id: i.projectId,
|
|
647
708
|
id: e.id,
|
|
@@ -650,13 +711,13 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
650
711
|
id: e.id,
|
|
651
712
|
name: t
|
|
652
713
|
}), f.value?.updateCacheItemById(e.id, { name: t })));
|
|
653
|
-
},
|
|
714
|
+
}, C = async (e) => {
|
|
654
715
|
u && ((await u.changeParams({
|
|
655
716
|
project_id: i.projectId,
|
|
656
717
|
id: e.id
|
|
657
|
-
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ?
|
|
718
|
+
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ? Y() : q), a("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
|
|
658
719
|
};
|
|
659
|
-
return n({ resetCacheGroups: g }), (t, n) => (
|
|
720
|
+
return n({ resetCacheGroups: g }), (t, n) => (F(), E(x, {
|
|
660
721
|
ref_key: "refSelector",
|
|
661
722
|
ref: f,
|
|
662
723
|
class: "top-groupSelector_group",
|
|
@@ -666,50 +727,50 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
666
727
|
searchType: "inline",
|
|
667
728
|
icon: e.addIcon ? "" : void 0,
|
|
668
729
|
api: e.groups ? void 0 : B(c),
|
|
669
|
-
apiSetSearchParams: (...e) => B(
|
|
730
|
+
apiSetSearchParams: (...e) => B(S)(...e, "name"),
|
|
670
731
|
appendSearchToResult: !!e.canAdd,
|
|
671
|
-
useAllItem: e.canSelectAll ? B(
|
|
732
|
+
useAllItem: e.canSelectAll ? B(Y)().name : !1,
|
|
672
733
|
addChanger: e.addChanger,
|
|
673
734
|
useCache: "",
|
|
674
|
-
onAppendItem:
|
|
675
|
-
},
|
|
676
|
-
item: U(({ item: n }) => [
|
|
677
|
-
n.id === B(null) ? (
|
|
678
|
-
|
|
735
|
+
onAppendItem: v
|
|
736
|
+
}, te({
|
|
737
|
+
item: U(({ item: n }) => [k("div", $e, [
|
|
738
|
+
n.id === B(null) ? (F(), O("div", et, z(t.$i18n.Common.Add) + ": ", 1)) : D("", !0),
|
|
739
|
+
k("span", {
|
|
679
740
|
class: "top-groupSelector_groupItemName top-ellipsis1",
|
|
680
741
|
innerHTML: n.name
|
|
681
|
-
}, null, 8,
|
|
682
|
-
n.folder_path && e.showPath ? (
|
|
742
|
+
}, null, 8, tt),
|
|
743
|
+
n.folder_path && e.showPath ? (F(), O("span", {
|
|
683
744
|
key: 1,
|
|
684
745
|
class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
|
|
685
746
|
innerHTML: n.folder_path
|
|
686
|
-
}, null, 8,
|
|
747
|
+
}, null, 8, nt)) : D("", !0)
|
|
687
748
|
])]),
|
|
688
749
|
_: 2
|
|
689
750
|
}, [e.canEditAndDel && e.client ? {
|
|
690
751
|
name: "actions",
|
|
691
|
-
fn: U(({ item: r }) => [r.id ? (
|
|
752
|
+
fn: U(({ item: r }) => [r.id ? (F(), O(w, { key: 0 }, [j(_, {
|
|
692
753
|
submitText: t.$i18n.Common.Save,
|
|
693
754
|
defaultValue: r.name,
|
|
694
755
|
inputProps: { addCleaner: !1 },
|
|
695
|
-
onSubmit: (e) =>
|
|
756
|
+
onSubmit: (e) => b(r, e)
|
|
696
757
|
}, {
|
|
697
|
-
opener: U(() => [...n[1] ||= [
|
|
758
|
+
opener: U(() => [...n[1] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
|
|
698
759
|
default: U(() => [...n[2] ||= []]),
|
|
699
760
|
_: 1
|
|
700
761
|
}, 8, [
|
|
701
762
|
"submitText",
|
|
702
763
|
"defaultValue",
|
|
703
764
|
"onSubmit"
|
|
704
|
-
]),
|
|
765
|
+
]), j(y, {
|
|
705
766
|
isWarning: "",
|
|
706
767
|
submitText: t.$i18n.Common.Delete,
|
|
707
|
-
onSubmit: (e) =>
|
|
768
|
+
onSubmit: (e) => C(r)
|
|
708
769
|
}, {
|
|
709
|
-
opener: U(() => [...n[3] ||= [
|
|
710
|
-
default: U(() => [
|
|
770
|
+
opener: U(() => [...n[3] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
|
|
771
|
+
default: U(() => [k("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n.Aitracker.Delete_group_warning }, null, 8, rt)]),
|
|
711
772
|
_: 1
|
|
712
|
-
}, 8, ["submitText", "onSubmit"])], 64)) :
|
|
773
|
+
}, 8, ["submitText", "onSubmit"])], 64)) : D("", !0)]),
|
|
713
774
|
key: "0"
|
|
714
775
|
} : void 0]), 1032, [
|
|
715
776
|
"modelValue",
|
|
@@ -722,9 +783,9 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
722
783
|
"addChanger"
|
|
723
784
|
]));
|
|
724
785
|
}
|
|
725
|
-
}),
|
|
786
|
+
}), at = { class: "top-groupSelector" }, ot = /* @__PURE__ */ M({
|
|
726
787
|
__name: "groupSelector",
|
|
727
|
-
props: /*@__PURE__*/
|
|
788
|
+
props: /*@__PURE__*/ N({
|
|
728
789
|
folderId: {},
|
|
729
790
|
folder: {},
|
|
730
791
|
groupId: {},
|
|
@@ -769,20 +830,20 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
769
830
|
folderModifiers: {},
|
|
770
831
|
groupId: { required: !0 },
|
|
771
832
|
groupIdModifiers: {},
|
|
772
|
-
group: { default:
|
|
833
|
+
group: { default: q },
|
|
773
834
|
groupModifiers: {}
|
|
774
835
|
}),
|
|
775
|
-
emits: /*@__PURE__*/
|
|
836
|
+
emits: /*@__PURE__*/ N(["update:groups"], [
|
|
776
837
|
"update:folderId",
|
|
777
838
|
"update:folder",
|
|
778
839
|
"update:groupId",
|
|
779
840
|
"update:group"
|
|
780
841
|
]),
|
|
781
842
|
setup(e, { expose: t, emit: n }) {
|
|
782
|
-
let r = e, i =
|
|
783
|
-
o.value =
|
|
843
|
+
let r = e, i = I(null), a = V(e, "folderId"), o = V(e, "folder"), s = V(e, "groupId"), c = V(e, "group"), l = n;
|
|
844
|
+
o.value = He(r.folders ?? { root: [K] }, r.canSelectAllGroups).get(a.value);
|
|
784
845
|
let u = r.groups?.find((e) => e.id === s.value);
|
|
785
|
-
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u =
|
|
846
|
+
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = Y()), (r.autoselect === "placeholder" || !u) && (u = qe()), u ??= q, c.value = u;
|
|
786
847
|
let d = (e) => {
|
|
787
848
|
let t;
|
|
788
849
|
r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
|
|
@@ -808,7 +869,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
808
869
|
};
|
|
809
870
|
return t({ resetCacheGroups: (e = !1) => {
|
|
810
871
|
i.value?.resetCacheGroups(e);
|
|
811
|
-
} }), (t, n) => (
|
|
872
|
+
} }), (t, n) => (F(), O("div", at, [e.showFolders ? (F(), E(Ke, {
|
|
812
873
|
key: 0,
|
|
813
874
|
folderId: a.value,
|
|
814
875
|
"onUpdate:folderId": n[0] ||= (e) => a.value = e,
|
|
@@ -831,7 +892,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
831
892
|
"addIcon",
|
|
832
893
|
"client",
|
|
833
894
|
"service"
|
|
834
|
-
])) :
|
|
895
|
+
])) : D("", !0), e.showGroups ? (F(), E(it, {
|
|
835
896
|
key: 1,
|
|
836
897
|
ref_key: "componentGroupsRef",
|
|
837
898
|
ref: i,
|
|
@@ -871,46 +932,46 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
871
932
|
"addIcon",
|
|
872
933
|
"client",
|
|
873
934
|
"service"
|
|
874
|
-
])) :
|
|
935
|
+
])) : D("", !0)]));
|
|
875
936
|
}
|
|
876
|
-
}),
|
|
937
|
+
}), st = (e) => ({
|
|
877
938
|
id: null,
|
|
878
939
|
name: e,
|
|
879
940
|
listItemProps: {
|
|
880
941
|
type: "title",
|
|
881
942
|
class: "top-projectSelector_item"
|
|
882
943
|
}
|
|
883
|
-
}),
|
|
944
|
+
}), ct = {
|
|
884
945
|
scheduledUpdate: !1,
|
|
885
946
|
manualUpdate: !1,
|
|
886
947
|
guestProjects: !1
|
|
887
|
-
},
|
|
948
|
+
}, lt = (e, t) => {
|
|
888
949
|
let r = [], i = {
|
|
889
|
-
scheduledUpdate:
|
|
890
|
-
manualUpdate:
|
|
891
|
-
guestProjects:
|
|
950
|
+
scheduledUpdate: st(n().Projects.Scheduled_update),
|
|
951
|
+
manualUpdate: st(n().Projects.Manual_update),
|
|
952
|
+
guestProjects: st(n().Projects.Guest_projects)
|
|
892
953
|
}, a = t ? {
|
|
893
954
|
scheduledUpdate: !1,
|
|
894
955
|
manualUpdate: !1,
|
|
895
956
|
guestProjects: !1
|
|
896
|
-
} :
|
|
957
|
+
} : ct;
|
|
897
958
|
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
959
|
return r;
|
|
899
|
-
},
|
|
960
|
+
}, ut = (e) => ({
|
|
900
961
|
...e,
|
|
901
|
-
externalLink:
|
|
962
|
+
externalLink: gt(e.url ?? ""),
|
|
902
963
|
listItemProps: {
|
|
903
964
|
class: "top-projectSelector_item",
|
|
904
965
|
attrs: { title: e.name }
|
|
905
966
|
}
|
|
906
|
-
}),
|
|
967
|
+
}), dt = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(ct).forEach((e) => ct[e] = !1), lt(e.map(ut), n)), ft = (e) => {
|
|
907
968
|
e = e.replace(/#.*/, "");
|
|
908
969
|
let t = location.hash;
|
|
909
970
|
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
|
-
},
|
|
911
|
-
location.href =
|
|
912
|
-
},
|
|
913
|
-
let t =
|
|
971
|
+
}, pt = (e) => {
|
|
972
|
+
location.href = mt(e);
|
|
973
|
+
}, mt = (e) => {
|
|
974
|
+
let t = ht(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
|
|
914
975
|
n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
|
|
915
976
|
"watcher",
|
|
916
977
|
"indexing",
|
|
@@ -920,16 +981,16 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
920
981
|
"adwords"
|
|
921
982
|
].includes(n[4]) && (i = n[4] + "/");
|
|
922
983
|
let a = "https://" + t + "/" + r + e + "/" + i;
|
|
923
|
-
return a =
|
|
924
|
-
},
|
|
984
|
+
return a = ft(a), a;
|
|
985
|
+
}, ht = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, gt = (e) => {
|
|
925
986
|
let t = e.startsWith("http") ? e : "https://" + e;
|
|
926
987
|
return t = t.replace(/"/g, "%22"), t;
|
|
927
|
-
},
|
|
988
|
+
}, _t = (e, n) => {
|
|
928
989
|
let r = e.params.filters ?? [];
|
|
929
990
|
r = r.filter((e) => e.name !== "GEN_SEARCH_STRING()");
|
|
930
|
-
let i =
|
|
991
|
+
let i = h(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
|
|
931
992
|
n && r.push(t("GEN_SEARCH_STRING()", "REGEXP", [`(${a}|${o})`])), e.changeParams({ filters: r });
|
|
932
|
-
},
|
|
993
|
+
}, vt = (n, i = !0) => {
|
|
933
994
|
let a = n.gen("/get/projects_2/projects/", [
|
|
934
995
|
"id",
|
|
935
996
|
"user_id",
|
|
@@ -949,9 +1010,9 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
949
1010
|
]
|
|
950
1011
|
}), a.options.loadingShowSpinner = !1, i && (a.options.onApiLoaded = (e, t, n) => {
|
|
951
1012
|
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 =
|
|
1013
|
+
e.result = dt(e.result, a, o), n?.(e, t);
|
|
953
1014
|
}), a;
|
|
954
|
-
},
|
|
1015
|
+
}, yt = (e) => {
|
|
955
1016
|
let t = () => ({
|
|
956
1017
|
userId: r.state.userId,
|
|
957
1018
|
projectsIds: [],
|
|
@@ -971,7 +1032,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
971
1032
|
return { getNextProjectId: async (a, o = !1) => {
|
|
972
1033
|
if (n.isLoading) return;
|
|
973
1034
|
n.userId !== r.state.userId && (n = t());
|
|
974
|
-
let s =
|
|
1035
|
+
let s = vt(e, !1);
|
|
975
1036
|
s.changeParams({ limit: 1e3 });
|
|
976
1037
|
let c;
|
|
977
1038
|
for (n.isLoading = !0, n.needFind = !0; c = i(a, o), n.needFind && !c && n.nextOffset !== null;) {
|
|
@@ -982,11 +1043,11 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
982
1043
|
}
|
|
983
1044
|
return n.isLoading = !1, c;
|
|
984
1045
|
} };
|
|
985
|
-
},
|
|
1046
|
+
}, bt = (e) => e.gen("/add/projects_2/projects/"), xt = { class: "top-ellipsis1" }, St = /* @__PURE__ */ M({
|
|
986
1047
|
__name: "submenu",
|
|
987
1048
|
props: { id: {} },
|
|
988
1049
|
setup(e) {
|
|
989
|
-
let t = e, i = n(), a =
|
|
1050
|
+
let t = e, i = n(), a = ht(), o = (e) => {
|
|
990
1051
|
let t = [
|
|
991
1052
|
{
|
|
992
1053
|
href: `https://${a}/project/keywords/${e.id}/`,
|
|
@@ -1063,60 +1124,60 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1063
1124
|
].filter((e) => !Object.entries(r.state.closedByMod).some(([t, n]) => n && e.href.includes(`/${t}/`)));
|
|
1064
1125
|
return e.right.includes("0") ? t.filter((t) => e.right[t.right] === "1") : t;
|
|
1065
1126
|
};
|
|
1066
|
-
return (e, n) => (
|
|
1127
|
+
return (e, n) => (F(), E(B(b), {
|
|
1067
1128
|
id: t.id,
|
|
1068
1129
|
class: "top-projectSelectorSubmenu",
|
|
1069
1130
|
notch: !1,
|
|
1070
1131
|
pos: "2"
|
|
1071
1132
|
}, {
|
|
1072
|
-
contentList: U(({ data: t }) => [t ? (
|
|
1133
|
+
contentList: U(({ data: t }) => [t ? (F(), O(w, { key: 0 }, [(F(!0), O(w, null, L(o(t.projectItem), (t) => (F(), E(B(v), {
|
|
1073
1134
|
href: t.href,
|
|
1074
1135
|
title: t.title,
|
|
1075
1136
|
"data-top-icon": t.icon,
|
|
1076
1137
|
"data-right": t.right
|
|
1077
1138
|
}, {
|
|
1078
|
-
default: U(() => [
|
|
1139
|
+
default: U(() => [A(z(e.$core.state.isMobile ? t.title : ""), 1)]),
|
|
1079
1140
|
_: 2
|
|
1080
1141
|
}, 1032, [
|
|
1081
1142
|
"href",
|
|
1082
1143
|
"title",
|
|
1083
1144
|
"data-top-icon",
|
|
1084
1145
|
"data-right"
|
|
1085
|
-
]))), 256)),
|
|
1146
|
+
]))), 256)), j(B(v), {
|
|
1086
1147
|
href: t.projectItem.externalLink,
|
|
1087
1148
|
title: t.projectItem.externalLink,
|
|
1088
1149
|
class: "top-ellipsis",
|
|
1089
1150
|
"data-top-icon": "",
|
|
1090
1151
|
target: "_blank"
|
|
1091
1152
|
}, {
|
|
1092
|
-
default: U(() => [
|
|
1153
|
+
default: U(() => [k("span", xt, z(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
|
|
1093
1154
|
_: 2
|
|
1094
|
-
}, 1032, ["href", "title"])], 64)) :
|
|
1155
|
+
}, 1032, ["href", "title"])], 64)) : D("", !0)]),
|
|
1095
1156
|
_: 1
|
|
1096
1157
|
}, 8, ["id"]));
|
|
1097
1158
|
}
|
|
1098
|
-
}),
|
|
1099
|
-
localStorage.setItem(
|
|
1159
|
+
}), X = "ui_project_selector_total", Ct = 864e5, wt = I(null), Z = fe(), Tt = (e) => {
|
|
1160
|
+
localStorage.setItem(X + ":" + r.state.userId, JSON.stringify({
|
|
1100
1161
|
projectsTotal: e,
|
|
1101
|
-
expiresAt: Date.now() +
|
|
1162
|
+
expiresAt: Date.now() + Ct
|
|
1102
1163
|
}));
|
|
1103
|
-
},
|
|
1104
|
-
let e = localStorage.getItem(
|
|
1164
|
+
}, Et = () => {
|
|
1165
|
+
let e = localStorage.getItem(X + ":" + r.state.userId);
|
|
1105
1166
|
if (!e) return;
|
|
1106
1167
|
let { projectsTotal: t, expiresAt: n } = JSON.parse(e);
|
|
1107
1168
|
if (Date.now() > n) {
|
|
1108
|
-
localStorage.removeItem(
|
|
1169
|
+
localStorage.removeItem(X + ":" + r.state.userId);
|
|
1109
1170
|
return;
|
|
1110
1171
|
}
|
|
1111
1172
|
return t;
|
|
1112
|
-
},
|
|
1113
|
-
|
|
1114
|
-
},
|
|
1173
|
+
}, Dt = () => {
|
|
1174
|
+
wt.value = null, Z.value = void 0, localStorage.removeItem(X + ":" + r.state.userId), C("/get/projects_2/projects/");
|
|
1175
|
+
}, Ot = { class: "top-projectSelector_itemText" }, kt = { class: "top-comment" }, At = {
|
|
1115
1176
|
key: 0,
|
|
1116
1177
|
class: "top-comment"
|
|
1117
|
-
},
|
|
1178
|
+
}, jt = ["href"], Mt = 1e3, Nt = /* @__PURE__ */ M({
|
|
1118
1179
|
__name: "projectSelector",
|
|
1119
|
-
props: /*@__PURE__*/
|
|
1180
|
+
props: /*@__PURE__*/ N({
|
|
1120
1181
|
modelValue: {},
|
|
1121
1182
|
client: {},
|
|
1122
1183
|
menuMode: { type: Boolean },
|
|
@@ -1137,25 +1198,25 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1137
1198
|
}),
|
|
1138
1199
|
emits: ["update:modelValue"],
|
|
1139
1200
|
setup(e, { expose: t }) {
|
|
1140
|
-
let i = n(), a = e, o = V(e, "modelValue"), s =
|
|
1201
|
+
let i = n(), a = e, o = V(e, "modelValue"), s = vt(a.client), c = bt(a.client), l = I(Et()), u = I(null), p = me(), m = T(() => a.placeholder ?? i.Projects.Select_project), h = T(() => !Z.value || !a.excludeProjectId ? Z.value : Z.value.filter((e) => e.id !== a.excludeProjectId)), { getNextProjectId: _ } = yt(a.client), v = async (e = !1) => {
|
|
1141
1202
|
let t = o.value.id;
|
|
1142
1203
|
if (!t) return;
|
|
1143
|
-
let n = await
|
|
1144
|
-
n &&
|
|
1145
|
-
}, y =
|
|
1146
|
-
if (l.value || l.value === 0) return l.value <
|
|
1204
|
+
let n = await _(t, e);
|
|
1205
|
+
n && pt(n);
|
|
1206
|
+
}, y = T(() => {
|
|
1207
|
+
if (l.value || l.value === 0) return l.value < Mt ? "static" : "api";
|
|
1147
1208
|
}), b = async () => {
|
|
1148
|
-
|
|
1149
|
-
let e = await
|
|
1150
|
-
return
|
|
1151
|
-
},
|
|
1209
|
+
wt.value ||= s.call();
|
|
1210
|
+
let e = await wt.value;
|
|
1211
|
+
return wt.value = null, e;
|
|
1212
|
+
}, S = async (e) => {
|
|
1152
1213
|
let t = await c.changeParams({
|
|
1153
1214
|
url: e.name,
|
|
1154
1215
|
name: e.name
|
|
1155
1216
|
}).call();
|
|
1156
1217
|
if (!t.errors) {
|
|
1157
1218
|
if (Z.value && y.value === "static") {
|
|
1158
|
-
let n =
|
|
1219
|
+
let n = ut({
|
|
1159
1220
|
id: t.result,
|
|
1160
1221
|
user_id: r.state.userId,
|
|
1161
1222
|
name: e.name,
|
|
@@ -1167,36 +1228,36 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1167
1228
|
...Z.value.slice(0, i),
|
|
1168
1229
|
n,
|
|
1169
1230
|
...Z.value.slice(i)
|
|
1170
|
-
], l.value && (l.value += 1,
|
|
1231
|
+
], l.value && (l.value += 1, Tt(l.value));
|
|
1171
1232
|
}
|
|
1172
1233
|
y.value === "api" && u.value?.resetCache(!0);
|
|
1173
1234
|
}
|
|
1174
|
-
},
|
|
1235
|
+
}, C = async () => {
|
|
1175
1236
|
if (Z.value || y.value === "api") return;
|
|
1176
1237
|
let e = await b();
|
|
1177
1238
|
e.errors || (Z.value = e.result);
|
|
1178
|
-
},
|
|
1239
|
+
}, ee = async () => {
|
|
1179
1240
|
if (l.value) {
|
|
1180
1241
|
let e = u.value?.popupOpenerRef?.$el;
|
|
1181
|
-
e && e.addEventListener("pointerenter", () =>
|
|
1242
|
+
e && e.addEventListener("pointerenter", () => C(), { once: !0 });
|
|
1182
1243
|
} else {
|
|
1183
|
-
s.changeParams({ limit:
|
|
1244
|
+
s.changeParams({ limit: Mt });
|
|
1184
1245
|
let e = await b();
|
|
1185
1246
|
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 &&
|
|
1247
|
+
delete s.params.limit, l.value = e.total ?? void 0, !Z.value && y.value !== "api" && (Z.value = e.result), l.value && Tt(l.value);
|
|
1187
1248
|
}
|
|
1188
1249
|
};
|
|
1189
|
-
return t({ goToNextProject:
|
|
1190
|
-
await
|
|
1250
|
+
return t({ goToNextProject: v }), oe(async () => {
|
|
1251
|
+
await ee();
|
|
1191
1252
|
}), (t, n) => {
|
|
1192
1253
|
let r = le("TopButton");
|
|
1193
|
-
return
|
|
1254
|
+
return F(), O(w, null, [(F(), E(x, {
|
|
1194
1255
|
key: y.value ?? "dummy",
|
|
1195
1256
|
ref_key: "refSelector",
|
|
1196
1257
|
ref: u,
|
|
1197
1258
|
class: "top-projectSelector",
|
|
1198
1259
|
modelValue: o.value,
|
|
1199
|
-
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? B(
|
|
1260
|
+
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? B(pt)(t.id) : o.value = t,
|
|
1200
1261
|
items: h.value,
|
|
1201
1262
|
itemsChunkSize: 100,
|
|
1202
1263
|
itemsIsLoading: y.value === "static" && B(Z) === void 0,
|
|
@@ -1207,14 +1268,14 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1207
1268
|
"name",
|
|
1208
1269
|
"url"
|
|
1209
1270
|
],
|
|
1210
|
-
placeholder:
|
|
1271
|
+
placeholder: m.value,
|
|
1211
1272
|
hasCloserBtn: "",
|
|
1212
1273
|
api: y.value === "api" ? B(s) : void 0,
|
|
1213
|
-
apiSetSearchParams: y.value === "api" ? (...e) => B(
|
|
1274
|
+
apiSetSearchParams: y.value === "api" ? (...e) => B(_t)(...e) : void 0,
|
|
1214
1275
|
useCache: "",
|
|
1215
1276
|
appendSearchToResult: "",
|
|
1216
1277
|
appendSearchAllowDuplicate: "",
|
|
1217
|
-
appendSearchToResultCond: B(
|
|
1278
|
+
appendSearchToResultCond: B(d),
|
|
1218
1279
|
appendWithoutSelect: "",
|
|
1219
1280
|
buttonProps: {
|
|
1220
1281
|
...e.buttonProps,
|
|
@@ -1222,16 +1283,16 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1222
1283
|
disabled: !y.value
|
|
1223
1284
|
},
|
|
1224
1285
|
openerShortcut: e.openerShortcut,
|
|
1225
|
-
onAppendItem:
|
|
1226
|
-
onOpen:
|
|
1286
|
+
onAppendItem: S,
|
|
1287
|
+
onOpen: C
|
|
1227
1288
|
}, {
|
|
1228
|
-
item: U(({ item: i }) => [
|
|
1229
|
-
e.menuMode ? (
|
|
1289
|
+
item: U(({ item: i }) => [k("div", Ot, [i.id ? (F(), O(w, { key: 0 }, [A(z(B(f)(i.name, 20)) + " ", 1), k("span", kt, " id " + z(i.id), 1)], 64)) : (F(), O(w, { key: 1 }, [i.listItemProps?.type ? D("", !0) : (F(), O("div", At, z(t.$i18n.Projects.Add_project) + ": ", 1)), A(" " + z(i.name), 1)], 64))]), i.id ? (F(), O(w, { key: 0 }, [
|
|
1290
|
+
e.menuMode ? (F(), O("a", {
|
|
1230
1291
|
key: 0,
|
|
1231
1292
|
class: "top-projectSelector_itemLink",
|
|
1232
|
-
href: B(
|
|
1233
|
-
}, null, 8,
|
|
1234
|
-
t.$core.state.isMobile ?
|
|
1293
|
+
href: B(mt)(i.id)
|
|
1294
|
+
}, null, 8, jt)) : D("", !0),
|
|
1295
|
+
t.$core.state.isMobile ? D("", !0) : (F(), E(r, {
|
|
1235
1296
|
key: 1,
|
|
1236
1297
|
href: i.externalLink,
|
|
1237
1298
|
"data-top-icon": "",
|
|
@@ -1239,20 +1300,20 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1239
1300
|
target: "_blank",
|
|
1240
1301
|
onClick: n[0] ||= W(() => {}, ["stop"])
|
|
1241
1302
|
}, null, 8, ["href"])),
|
|
1242
|
-
|
|
1243
|
-
id: B(
|
|
1303
|
+
j(g, {
|
|
1304
|
+
id: B(p),
|
|
1244
1305
|
pos: "2",
|
|
1245
1306
|
notch: !1,
|
|
1246
1307
|
data: { projectItem: i }
|
|
1247
1308
|
}, {
|
|
1248
|
-
default: U(() => [
|
|
1309
|
+
default: U(() => [j(r, {
|
|
1249
1310
|
class: "top-popup_listMore",
|
|
1250
1311
|
"data-top-icon": "",
|
|
1251
1312
|
color: "theme"
|
|
1252
1313
|
})]),
|
|
1253
1314
|
_: 1
|
|
1254
1315
|
}, 8, ["id", "data"])
|
|
1255
|
-
], 64)) :
|
|
1316
|
+
], 64)) : D("", !0)]),
|
|
1256
1317
|
_: 1
|
|
1257
1318
|
}, 8, [
|
|
1258
1319
|
"modelValue",
|
|
@@ -1266,43 +1327,43 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1266
1327
|
"appendSearchToResultCond",
|
|
1267
1328
|
"buttonProps",
|
|
1268
1329
|
"openerShortcut"
|
|
1269
|
-
])),
|
|
1330
|
+
])), j(St, { id: B(p) }, null, 8, ["id"])], 64);
|
|
1270
1331
|
};
|
|
1271
1332
|
}
|
|
1272
|
-
}),
|
|
1333
|
+
}), Pt = (e) => "-" + e, Q = (e) => e[0] === "-" ? e.substring(1) : e, Ft = (e, t) => {
|
|
1273
1334
|
e = Q(e);
|
|
1274
1335
|
let n = t.find((t) => t.id === e);
|
|
1275
1336
|
if (n) return n;
|
|
1276
|
-
},
|
|
1337
|
+
}, It = (e, t, n) => {
|
|
1277
1338
|
t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
|
|
1278
|
-
let r =
|
|
1339
|
+
let r = l.genElPopupOpener("div", t);
|
|
1279
1340
|
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
1341
|
t.preventDefault(), t.stopPropagation(), r.onclick = null;
|
|
1281
|
-
let i =
|
|
1342
|
+
let i = I(e.modelValue), a = {
|
|
1282
1343
|
model: i,
|
|
1283
1344
|
mode: e.mode,
|
|
1284
1345
|
targetId: e.targetId,
|
|
1285
1346
|
filters: e.filters,
|
|
1286
1347
|
payload: e.payload
|
|
1287
1348
|
};
|
|
1288
|
-
|
|
1289
|
-
e.modelValue = i.value,
|
|
1349
|
+
c(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, ne(e.modelValue) || H(i, () => {
|
|
1350
|
+
e.modelValue = i.value, Rt(r, e, n);
|
|
1290
1351
|
}), r.click();
|
|
1291
|
-
},
|
|
1352
|
+
}, ne(e.modelValue) ? H(e.modelValue, () => Rt(r, e, n)) : c(r, "topTagSelectorRender", (t) => {
|
|
1292
1353
|
e.modelValue = t;
|
|
1293
|
-
let i =
|
|
1294
|
-
i && (i.model.value = t),
|
|
1295
|
-
}),
|
|
1296
|
-
},
|
|
1297
|
-
|
|
1298
|
-
},
|
|
1354
|
+
let i = c(r, "topTagSelectorTarget");
|
|
1355
|
+
i && (i.model.value = t), Rt(r, e, n);
|
|
1356
|
+
}), Rt(r, e, n), r;
|
|
1357
|
+
}, Lt = (e, t) => {
|
|
1358
|
+
c(e, "topTagSelectorRender")?.(t);
|
|
1359
|
+
}, Rt = (e, t, r) => {
|
|
1299
1360
|
let i = B(t.modelValue);
|
|
1300
1361
|
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
1362
|
e.innerHTML = `<div>${r}</div>`;
|
|
1302
1363
|
return;
|
|
1303
1364
|
}
|
|
1304
1365
|
if (e.innerHTML = "", !i.length && t.mode === "filter") {
|
|
1305
|
-
let t =
|
|
1366
|
+
let t = zt({
|
|
1306
1367
|
id: "all",
|
|
1307
1368
|
colorId: "",
|
|
1308
1369
|
name: n().Common?.All_tags ?? "",
|
|
@@ -1311,18 +1372,18 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1311
1372
|
e.append(t);
|
|
1312
1373
|
}
|
|
1313
1374
|
i.forEach((n) => {
|
|
1314
|
-
let r =
|
|
1375
|
+
let r = zt({
|
|
1315
1376
|
id: Q(n),
|
|
1316
|
-
colorId:
|
|
1317
|
-
name:
|
|
1377
|
+
colorId: Ft(n, t.tags)?.color_id ?? "",
|
|
1378
|
+
name: Ft(n, t.tags)?.name ?? "",
|
|
1318
1379
|
state: Q(n) === n ? "selected" : "excluded"
|
|
1319
1380
|
});
|
|
1320
1381
|
e.append(r);
|
|
1321
1382
|
});
|
|
1322
|
-
},
|
|
1383
|
+
}, zt = (e) => {
|
|
1323
1384
|
let t = document.createElement("div");
|
|
1324
1385
|
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
|
-
},
|
|
1386
|
+
}, Bt = [
|
|
1326
1387
|
{
|
|
1327
1388
|
id: "1",
|
|
1328
1389
|
name: "Without Tag",
|
|
@@ -1373,11 +1434,11 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1373
1434
|
name: "Turquoise",
|
|
1374
1435
|
color_id: "10"
|
|
1375
1436
|
}
|
|
1376
|
-
],
|
|
1437
|
+
], Vt = [
|
|
1377
1438
|
"data-tag_id",
|
|
1378
1439
|
"data-tag_color_id",
|
|
1379
1440
|
"title"
|
|
1380
|
-
],
|
|
1441
|
+
], Ht = /* @__PURE__ */ M({
|
|
1381
1442
|
__name: "tagIcon",
|
|
1382
1443
|
props: {
|
|
1383
1444
|
id: {},
|
|
@@ -1386,8 +1447,8 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1386
1447
|
state: {}
|
|
1387
1448
|
},
|
|
1388
1449
|
setup(e) {
|
|
1389
|
-
return (t, n) => (
|
|
1390
|
-
class:
|
|
1450
|
+
return (t, n) => (F(), O("div", {
|
|
1451
|
+
class: P({
|
|
1391
1452
|
"top-tagSelector_tagIcon": !0,
|
|
1392
1453
|
"top-tagSelector-active": !!e.state,
|
|
1393
1454
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
@@ -1395,11 +1456,11 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1395
1456
|
"data-tag_id": e.id,
|
|
1396
1457
|
"data-tag_color_id": e.colorId,
|
|
1397
1458
|
title: e.name
|
|
1398
|
-
}, null, 10,
|
|
1459
|
+
}, null, 10, Vt));
|
|
1399
1460
|
}
|
|
1400
|
-
}),
|
|
1461
|
+
}), Ut = ["contenteditable", "onKeydown"], Wt = /* @__PURE__ */ M({
|
|
1401
1462
|
__name: "tagPopupListItem",
|
|
1402
|
-
props: /*@__PURE__*/
|
|
1463
|
+
props: /*@__PURE__*/ N({
|
|
1403
1464
|
editable: { type: Boolean },
|
|
1404
1465
|
disabled: { type: Boolean },
|
|
1405
1466
|
canExclude: { type: Boolean },
|
|
@@ -1411,18 +1472,18 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1411
1472
|
name: { required: !0 },
|
|
1412
1473
|
nameModifiers: {}
|
|
1413
1474
|
}),
|
|
1414
|
-
emits: /*@__PURE__*/
|
|
1475
|
+
emits: /*@__PURE__*/ N([
|
|
1415
1476
|
"update:name",
|
|
1416
1477
|
"unselect",
|
|
1417
1478
|
"exclude",
|
|
1418
1479
|
"select"
|
|
1419
1480
|
], ["update:name"]),
|
|
1420
1481
|
setup(e, { emit: t }) {
|
|
1421
|
-
let n = e, r = t, i = V(e, "name"), a =
|
|
1482
|
+
let n = e, r = t, i = V(e, "name"), a = I(null), o = T(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
|
|
1422
1483
|
contenteditable: s.value,
|
|
1423
1484
|
onpaste: (e) => e.preventDefault()
|
|
1424
|
-
}), s =
|
|
1425
|
-
s.value = !0, await
|
|
1485
|
+
}), s = I(!1), c = async () => {
|
|
1486
|
+
s.value = !0, await ie(), a.value?.focus();
|
|
1426
1487
|
}, l = () => {
|
|
1427
1488
|
let e = a.value?.innerText;
|
|
1428
1489
|
if (!e) return u();
|
|
@@ -1434,8 +1495,8 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1434
1495
|
let t = "selected";
|
|
1435
1496
|
n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
|
|
1436
1497
|
};
|
|
1437
|
-
return (t, n) => (
|
|
1438
|
-
class:
|
|
1498
|
+
return (t, n) => (F(), E(v, {
|
|
1499
|
+
class: P({
|
|
1439
1500
|
"top-tagSelector_tagListItem": !0,
|
|
1440
1501
|
"top-tagSelector_tagListItem-inEdit": s.value,
|
|
1441
1502
|
"top-tagSelector_tagListItem-disabled": e.disabled,
|
|
@@ -1446,7 +1507,7 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1446
1507
|
onClick: W(d, ["stop"])
|
|
1447
1508
|
}, {
|
|
1448
1509
|
default: U(() => [
|
|
1449
|
-
|
|
1510
|
+
j(Ht, {
|
|
1450
1511
|
id: e.id,
|
|
1451
1512
|
name: i.value,
|
|
1452
1513
|
colorId: e.colorId,
|
|
@@ -1457,31 +1518,31 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1457
1518
|
"colorId",
|
|
1458
1519
|
"state"
|
|
1459
1520
|
]),
|
|
1460
|
-
|
|
1521
|
+
k("span", re({
|
|
1461
1522
|
ref_key: "elName",
|
|
1462
1523
|
ref: a,
|
|
1463
1524
|
class: "top-tagSelector_tagListItemName",
|
|
1464
1525
|
contenteditable: s.value ? "plaintext-only" : !1
|
|
1465
|
-
}, o.value, { onKeydown: [ge(W(l, ["stop"]), ["enter"]), ge(W(u, ["stop"]), ["esc"])] }), z(i.value), 17,
|
|
1466
|
-
e.editable ? (
|
|
1526
|
+
}, o.value, { onKeydown: [ge(W(l, ["stop"]), ["enter"]), ge(W(u, ["stop"]), ["esc"])] }), z(i.value), 17, Ut),
|
|
1527
|
+
e.editable ? (F(), O(w, { key: 0 }, [s.value ? (F(), O("span", {
|
|
1467
1528
|
key: 1,
|
|
1468
1529
|
"data-top-icon": "",
|
|
1469
1530
|
class: "top-tagSelector_edit",
|
|
1470
1531
|
onClick: W(l, ["stop"])
|
|
1471
|
-
})) : (
|
|
1532
|
+
})) : (F(), O("span", {
|
|
1472
1533
|
key: 0,
|
|
1473
1534
|
"data-top-icon": "",
|
|
1474
1535
|
class: "top-tagSelector_edit",
|
|
1475
1536
|
onClick: c
|
|
1476
|
-
}))], 64)) :
|
|
1537
|
+
}))], 64)) : D("", !0)
|
|
1477
1538
|
]),
|
|
1478
1539
|
_: 1
|
|
1479
1540
|
}, 8, ["class"]));
|
|
1480
1541
|
}
|
|
1481
|
-
}),
|
|
1542
|
+
}), Gt = { key: 1 }, Kt = /* @__PURE__ */ M({
|
|
1482
1543
|
inheritAttrs: !1,
|
|
1483
1544
|
__name: "popupOpener",
|
|
1484
|
-
props: /*@__PURE__*/
|
|
1545
|
+
props: /*@__PURE__*/ N({
|
|
1485
1546
|
modelValue: {},
|
|
1486
1547
|
id: {},
|
|
1487
1548
|
tags: {},
|
|
@@ -1506,8 +1567,8 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1506
1567
|
};
|
|
1507
1568
|
return (a, c) => {
|
|
1508
1569
|
let l = ue("top-data");
|
|
1509
|
-
return
|
|
1510
|
-
default: U(() => [he((
|
|
1570
|
+
return F(), E(g, { id: e.id }, {
|
|
1571
|
+
default: U(() => [he((F(), E(de(B(i)), re({
|
|
1511
1572
|
class: {
|
|
1512
1573
|
"top-tagSelector": !0,
|
|
1513
1574
|
"top-tagSelector-useTopButton": n.useTopButton,
|
|
@@ -1522,16 +1583,16 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1522
1583
|
color: "theme",
|
|
1523
1584
|
styling: e.styling
|
|
1524
1585
|
}, t), {
|
|
1525
|
-
[B(o)]: U(() => [!r.value.length && e.mode === "filter" ? (
|
|
1586
|
+
[B(o)]: U(() => [!r.value.length && e.mode === "filter" ? (F(), E(Ht, {
|
|
1526
1587
|
key: 0,
|
|
1527
1588
|
id: "all",
|
|
1528
1589
|
colorId: "",
|
|
1529
1590
|
name: a.$i18n.Common.All_tags ?? "",
|
|
1530
1591
|
state: ""
|
|
1531
|
-
}, null, 8, ["name"])) :
|
|
1592
|
+
}, null, 8, ["name"])) : D("", !0), e.mode === "setter" && e.filters ? (F(), O("div", Gt, [R(a.$slots, "default")])) : (F(!0), O(w, { key: 2 }, L(r.value, (t) => (F(), E(Ht, {
|
|
1532
1593
|
id: B(Q)(t),
|
|
1533
|
-
colorId: B(
|
|
1534
|
-
name: B(
|
|
1594
|
+
colorId: B(Ft)(t, e.tags)?.color_id ?? "",
|
|
1595
|
+
name: B(Ft)(t, e.tags)?.name ?? "",
|
|
1535
1596
|
state: B(Q)(t) === t ? "selected" : "excluded"
|
|
1536
1597
|
}, null, 8, [
|
|
1537
1598
|
"id",
|
|
@@ -1549,9 +1610,9 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1549
1610
|
}, 8, ["id"]);
|
|
1550
1611
|
};
|
|
1551
1612
|
}
|
|
1552
|
-
}),
|
|
1613
|
+
}), qt = /* @__PURE__ */ M({
|
|
1553
1614
|
__name: "tagSelector",
|
|
1554
|
-
props: /*@__PURE__*/
|
|
1615
|
+
props: /*@__PURE__*/ N({
|
|
1555
1616
|
modelValue: {},
|
|
1556
1617
|
tags: {},
|
|
1557
1618
|
tagsEditable: { type: Boolean },
|
|
@@ -1572,30 +1633,30 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1572
1633
|
}, {
|
|
1573
1634
|
modelValue: { required: !0 },
|
|
1574
1635
|
modelModifiers: {},
|
|
1575
|
-
tags: { default:
|
|
1636
|
+
tags: { default: ce(Bt) },
|
|
1576
1637
|
tagsModifiers: {}
|
|
1577
1638
|
}),
|
|
1578
|
-
emits: /*@__PURE__*/
|
|
1639
|
+
emits: /*@__PURE__*/ N([
|
|
1579
1640
|
"selector",
|
|
1580
1641
|
"setter",
|
|
1581
1642
|
"tagsChanged"
|
|
1582
1643
|
], ["update:modelValue", "update:tags"]),
|
|
1583
1644
|
setup(e, { emit: t }) {
|
|
1584
|
-
let
|
|
1645
|
+
let o = n(), l = e, u = V(e, "modelValue"), d = V(e, "tags"), f = t, p = i((e, t) => {
|
|
1585
1646
|
f(e, t);
|
|
1586
1647
|
}, l.emitDelay);
|
|
1587
1648
|
l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
|
|
1588
|
-
let m = l.id ?? "top-popup-id-" + Math.random(), h =
|
|
1589
|
-
let e = " " +
|
|
1649
|
+
let m = l.id ?? "top-popup-id-" + Math.random(), h = I("add"), g = () => {
|
|
1650
|
+
let e = " " + o.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
|
|
1590
1651
|
return t.set("add", {
|
|
1591
1652
|
value: "add",
|
|
1592
|
-
title:
|
|
1653
|
+
title: o.Common.Add + e
|
|
1593
1654
|
}), t.set("replace", {
|
|
1594
1655
|
value: "replace",
|
|
1595
|
-
title:
|
|
1656
|
+
title: o.Common.Replace + e
|
|
1596
1657
|
}), t.set("delete", {
|
|
1597
1658
|
value: "delete",
|
|
1598
|
-
title:
|
|
1659
|
+
title: o.Common.Delete + e
|
|
1599
1660
|
}), t;
|
|
1600
1661
|
}, _ = fe({
|
|
1601
1662
|
model: u,
|
|
@@ -1607,25 +1668,25 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1607
1668
|
H(u, () => {
|
|
1608
1669
|
p("selector", u.value);
|
|
1609
1670
|
});
|
|
1610
|
-
let
|
|
1671
|
+
let y = T(() => {
|
|
1611
1672
|
if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
|
|
1612
|
-
}),
|
|
1673
|
+
}), x = (e) => {
|
|
1613
1674
|
if (e !== "all") {
|
|
1614
1675
|
if (_.value.model.value.includes(e)) return "selected";
|
|
1615
|
-
if (_.value.model.value.includes(
|
|
1676
|
+
if (_.value.model.value.includes(Pt(e))) return "excluded";
|
|
1616
1677
|
}
|
|
1617
1678
|
return e === "all" && !_.value.model.value.length ? "selected" : "";
|
|
1618
|
-
},
|
|
1619
|
-
let n =
|
|
1679
|
+
}, S = (e, t) => {
|
|
1680
|
+
let n = Pt(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
|
|
1620
1681
|
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
1682
|
tagsIds: r,
|
|
1622
1683
|
targetId: _.value.targetId,
|
|
1623
1684
|
payload: _.value.payload
|
|
1624
1685
|
});
|
|
1625
|
-
}, C =
|
|
1686
|
+
}, C = T(() => {
|
|
1626
1687
|
let e = "top-tagSelector_popup";
|
|
1627
1688
|
return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
|
|
1628
|
-
}),
|
|
1689
|
+
}), ee = () => {
|
|
1629
1690
|
let e = prompt("", "New tag");
|
|
1630
1691
|
if (!e || e === "New tag") return;
|
|
1631
1692
|
let t = d.value.length + 1;
|
|
@@ -1634,8 +1695,8 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1634
1695
|
name: e,
|
|
1635
1696
|
color_id: String((t - 1) % 10 + 1)
|
|
1636
1697
|
}), f("tagsChanged", d.value);
|
|
1637
|
-
},
|
|
1638
|
-
if (_.value =
|
|
1698
|
+
}, k = (e) => {
|
|
1699
|
+
if (_.value = c(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1639
1700
|
if (_.value.filters && (h.value = "add", _.value.model.value = []), !r.$?.ui.sortable) {
|
|
1640
1701
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
1641
1702
|
return;
|
|
@@ -1654,10 +1715,10 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1654
1715
|
}), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
|
|
1655
1716
|
}
|
|
1656
1717
|
});
|
|
1657
|
-
},
|
|
1718
|
+
}, M = (e) => {
|
|
1658
1719
|
r.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
|
|
1659
1720
|
};
|
|
1660
|
-
return (t, n) => (
|
|
1721
|
+
return (t, n) => (F(), O(w, null, [j(Kt, {
|
|
1661
1722
|
modelValue: u.value,
|
|
1662
1723
|
"onUpdate:modelValue": n[0] ||= (e) => u.value = e,
|
|
1663
1724
|
id: B(m),
|
|
@@ -1671,34 +1732,34 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1671
1732
|
"tags",
|
|
1672
1733
|
"styling",
|
|
1673
1734
|
"useTopButton"
|
|
1674
|
-
]),
|
|
1735
|
+
]), j(b, {
|
|
1675
1736
|
id: B(m),
|
|
1676
|
-
class:
|
|
1677
|
-
onOpen: n[4] ||= (e) =>
|
|
1678
|
-
onClose: n[5] ||= (e) =>
|
|
1737
|
+
class: P(C.value),
|
|
1738
|
+
onOpen: n[4] ||= (e) => k(e),
|
|
1739
|
+
onClose: n[5] ||= (e) => M(e),
|
|
1679
1740
|
"transition-duration": 50
|
|
1680
|
-
},
|
|
1741
|
+
}, te({
|
|
1681
1742
|
contentList: U(() => [
|
|
1682
|
-
_.value.mode === "filter" && !e.singleMode ? (
|
|
1743
|
+
_.value.mode === "filter" && !e.singleMode ? (F(), E(Wt, {
|
|
1683
1744
|
key: 0,
|
|
1684
1745
|
id: "all",
|
|
1685
1746
|
colorId: "",
|
|
1686
1747
|
name: t.$i18n.Common.All_tags ?? "",
|
|
1687
1748
|
state: _.value.model.value.length ? "" : "selected",
|
|
1688
1749
|
onSelect: n[3] ||= (e) => _.value.model.value = []
|
|
1689
|
-
}, null, 8, ["name", "state"])) :
|
|
1690
|
-
(
|
|
1750
|
+
}, null, 8, ["name", "state"])) : D("", !0),
|
|
1751
|
+
(F(!0), O(w, null, L(d.value, (t) => (F(), E(Wt, {
|
|
1691
1752
|
key: t.id,
|
|
1692
1753
|
id: t.id,
|
|
1693
1754
|
colorId: t.color_id,
|
|
1694
1755
|
name: t.name,
|
|
1695
|
-
state:
|
|
1756
|
+
state: x(t.id),
|
|
1696
1757
|
canExclude: _.value.mode === "filter" && !e.singleMode,
|
|
1697
1758
|
editable: e.tagsEditable,
|
|
1698
|
-
disabled:
|
|
1699
|
-
onUnselect: (e) =>
|
|
1700
|
-
onSelect: (e) =>
|
|
1701
|
-
onExclude: (e) =>
|
|
1759
|
+
disabled: y.value && x(t.id) === "",
|
|
1760
|
+
onUnselect: (e) => S(t.id, "unselect"),
|
|
1761
|
+
onSelect: (e) => S(t.id, "select"),
|
|
1762
|
+
onExclude: (e) => S(t.id, "exclude"),
|
|
1702
1763
|
"onUpdate:name": (e) => {
|
|
1703
1764
|
t.name = e, B(p)("tagsChanged", d.value);
|
|
1704
1765
|
}
|
|
@@ -1715,19 +1776,19 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1715
1776
|
"onExclude",
|
|
1716
1777
|
"onUpdate:name"
|
|
1717
1778
|
]))), 128)),
|
|
1718
|
-
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (
|
|
1779
|
+
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (F(), E(v, {
|
|
1719
1780
|
key: 1,
|
|
1720
1781
|
"data-top-icon": "",
|
|
1721
|
-
onClick: W(
|
|
1782
|
+
onClick: W(ee, ["stop"])
|
|
1722
1783
|
}, {
|
|
1723
|
-
default: U(() => [
|
|
1784
|
+
default: U(() => [A(z(t.$i18n.Common.Add), 1)]),
|
|
1724
1785
|
_: 1
|
|
1725
|
-
})) :
|
|
1786
|
+
})) : D("", !0)
|
|
1726
1787
|
]),
|
|
1727
1788
|
_: 2
|
|
1728
1789
|
}, [_.value.mode === "setter" && _.value.filters ? {
|
|
1729
1790
|
name: "header",
|
|
1730
|
-
fn: U(() => [
|
|
1791
|
+
fn: U(() => [j(s, {
|
|
1731
1792
|
modelValue: h.value,
|
|
1732
1793
|
"onUpdate:modelValue": n[1] ||= (e) => h.value = e,
|
|
1733
1794
|
options: g()
|
|
@@ -1735,23 +1796,214 @@ var Ae = ["innerHTML"], je = /* @__PURE__ */ N({
|
|
|
1735
1796
|
key: "0"
|
|
1736
1797
|
} : void 0, _.value.mode === "setter" && _.value.filters ? {
|
|
1737
1798
|
name: "footer",
|
|
1738
|
-
fn: U(() => [
|
|
1739
|
-
default: U(() => [
|
|
1799
|
+
fn: U(() => [j(a, { color: "theme" }, {
|
|
1800
|
+
default: U(() => [A(z(t.$i18n.Common.Cancel), 1)]),
|
|
1740
1801
|
_: 1
|
|
1741
|
-
}),
|
|
1802
|
+
}), j(a, { onClick: n[2] ||= (e) => B(p)("setter", {
|
|
1742
1803
|
tagsIds: _.value.model.value,
|
|
1743
1804
|
filters: _.value.filters,
|
|
1744
1805
|
filtersAction: h.value,
|
|
1745
1806
|
payload: _.value.payload
|
|
1746
1807
|
}) }, {
|
|
1747
|
-
default: U(() => [
|
|
1808
|
+
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
1809
|
_: 1
|
|
1749
1810
|
})]),
|
|
1750
1811
|
key: "1"
|
|
1751
1812
|
} : void 0]), 1032, ["id", "class"])], 64));
|
|
1752
1813
|
}
|
|
1814
|
+
}), Jt = (e) => {
|
|
1815
|
+
let t = e.getPropertyValue("rule").trim();
|
|
1816
|
+
if (!t) return {};
|
|
1817
|
+
let n = t.match(/(?:^|\s)(\d*\.?\d+)px(?:\s|$)/), r = n ? Number.parseFloat(n[1]) : void 0;
|
|
1818
|
+
return {
|
|
1819
|
+
color: t.replace(n?.[0] ?? "", " ").replace(/\b(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)\b/, "").trim() || void 0,
|
|
1820
|
+
width: Number.isFinite(r) ? r : void 0
|
|
1821
|
+
};
|
|
1822
|
+
}, Yt = (e, t, n) => {
|
|
1823
|
+
let r = CSS.supports("rule", "1px solid") ? e.getPropertyValue(`${t}-rule-style`).trim() : "";
|
|
1824
|
+
return n ?? (r || e.getPropertyValue(`--flex-${t}-rule`).trim() || "solid");
|
|
1825
|
+
}, Xt = (e, t, n) => {
|
|
1826
|
+
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;
|
|
1827
|
+
return Array.from(e.children).filter((e) => e instanceof HTMLElement && e !== t).flatMap((e, t) => {
|
|
1828
|
+
let n = getComputedStyle(e);
|
|
1829
|
+
if (n.display === "none" || n.position === "absolute" || n.position === "fixed") return [];
|
|
1830
|
+
let s = e.getBoundingClientRect();
|
|
1831
|
+
if (s.width === 0 || s.height === 0) return [];
|
|
1832
|
+
let l = {
|
|
1833
|
+
left: (s.left - r.left) / i,
|
|
1834
|
+
right: (s.right - r.left) / i,
|
|
1835
|
+
top: (s.top - r.top) / a,
|
|
1836
|
+
bottom: (s.bottom - r.top) / a
|
|
1837
|
+
}, u = o ? l.left : l.top, d = o ? l.right : l.bottom;
|
|
1838
|
+
return [{
|
|
1839
|
+
index: t,
|
|
1840
|
+
order: Number.parseInt(n.order, 10) || 0,
|
|
1841
|
+
box: l,
|
|
1842
|
+
mainStart: c ? u : -d,
|
|
1843
|
+
mainEnd: c ? d : -u,
|
|
1844
|
+
crossStart: o ? l.top : l.left,
|
|
1845
|
+
crossEnd: o ? l.bottom : l.right
|
|
1846
|
+
}];
|
|
1847
|
+
}).sort((e, t) => e.order - t.order || e.index - t.index);
|
|
1848
|
+
}, Zt = (e, t) => {
|
|
1849
|
+
let n = [];
|
|
1850
|
+
for (let r of e) {
|
|
1851
|
+
let e = n[n.length - 1];
|
|
1852
|
+
if (!e || t !== "nowrap" && r.mainStart < e.lastMainEnd - .5) {
|
|
1853
|
+
n.push({
|
|
1854
|
+
items: [r],
|
|
1855
|
+
crossStart: r.crossStart,
|
|
1856
|
+
crossEnd: r.crossEnd,
|
|
1857
|
+
lastMainEnd: r.mainEnd
|
|
1858
|
+
});
|
|
1859
|
+
continue;
|
|
1860
|
+
}
|
|
1861
|
+
e.items.push(r), e.crossStart = Math.min(e.crossStart, r.crossStart), e.crossEnd = Math.max(e.crossEnd, r.crossEnd), e.lastMainEnd = r.mainEnd;
|
|
1862
|
+
}
|
|
1863
|
+
return n;
|
|
1864
|
+
}, Qt = (e, t, n, r) => {
|
|
1865
|
+
let i = getComputedStyle(e), a = Jt(i), o = t.clientWidth, s = t.clientHeight, c = window.devicePixelRatio || 1, l = Math.round(o * c), u = Math.round(s * c);
|
|
1866
|
+
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;
|
|
1867
|
+
let d = Zt(Xt(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 = Yt(i, "row", r.rowRule), x = Yt(i, "column", r.columnRule);
|
|
1868
|
+
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();
|
|
1869
|
+
for (let e of d) if ((f ? x : b) === "solid") for (let t = 1; t < e.items.length; t++) {
|
|
1870
|
+
let r = e.items[t - 1], a = e.items[t];
|
|
1871
|
+
if (a.mainStart < r.mainEnd - .5) continue;
|
|
1872
|
+
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;
|
|
1873
|
+
c >= l || (f ? (n.moveTo(s, c), n.lineTo(s, l)) : (n.moveTo(c, s), n.lineTo(l, s)));
|
|
1874
|
+
}
|
|
1875
|
+
for (let e = 1; e < d.length; e++) {
|
|
1876
|
+
if ((f ? b : x) !== "solid") continue;
|
|
1877
|
+
let t = d[e - 1], r = d[e], i = t.crossEnd <= r.crossStart, a = r.crossEnd <= t.crossStart;
|
|
1878
|
+
if (!i && !a) continue;
|
|
1879
|
+
let o = i ? (t.crossEnd + r.crossStart) / 2 : (r.crossEnd + t.crossStart) / 2, s = p + v, c = m - y;
|
|
1880
|
+
s >= c || (f ? (n.moveTo(s, o), n.lineTo(c, o)) : (n.moveTo(o, s), n.lineTo(o, c)));
|
|
1881
|
+
}
|
|
1882
|
+
n.stroke();
|
|
1883
|
+
}, $t = (e, t = {}) => {
|
|
1884
|
+
if (!t.force && CSS.supports("rule", "1px solid")) return () => {};
|
|
1885
|
+
if (!["flex", "inline-flex"].includes(getComputedStyle(e).display)) throw TypeError("polyfillFlexRule expects display: flex or inline-flex");
|
|
1886
|
+
let n = document.createElement("canvas");
|
|
1887
|
+
n.dataset.flexRuleOverlay = "", n.setAttribute("aria-hidden", "true"), Object.assign(n.style, {
|
|
1888
|
+
position: "absolute",
|
|
1889
|
+
inset: "0",
|
|
1890
|
+
width: "100%",
|
|
1891
|
+
height: "100%",
|
|
1892
|
+
pointerEvents: "none",
|
|
1893
|
+
zIndex: "1"
|
|
1894
|
+
});
|
|
1895
|
+
let r = e.style.position, i = getComputedStyle(e).position === "static";
|
|
1896
|
+
i && (e.style.position = "relative"), e.append(n);
|
|
1897
|
+
let a = n.getContext("2d");
|
|
1898
|
+
if (!a) throw n.remove(), i && (e.style.position = r), Error("Canvas 2D is unavailable");
|
|
1899
|
+
let o = 0, s = !1, c = () => {
|
|
1900
|
+
!o && !s && (o = requestAnimationFrame(() => {
|
|
1901
|
+
o = 0, Qt(e, n, a, t);
|
|
1902
|
+
}));
|
|
1903
|
+
}, l = new ResizeObserver(c), u = () => {
|
|
1904
|
+
l.disconnect(), l.observe(e);
|
|
1905
|
+
for (let t of Array.from(e.children)) t instanceof HTMLElement && t !== n && l.observe(t);
|
|
1906
|
+
c();
|
|
1907
|
+
}, d = new MutationObserver((t) => {
|
|
1908
|
+
if (t.some((t) => t.type === "childList" && t.target === e)) {
|
|
1909
|
+
u();
|
|
1910
|
+
return;
|
|
1911
|
+
}
|
|
1912
|
+
c();
|
|
1913
|
+
});
|
|
1914
|
+
return d.observe(e, {
|
|
1915
|
+
childList: !0,
|
|
1916
|
+
subtree: !0,
|
|
1917
|
+
attributes: !0,
|
|
1918
|
+
attributeFilter: [
|
|
1919
|
+
"class",
|
|
1920
|
+
"style",
|
|
1921
|
+
"hidden",
|
|
1922
|
+
"dir"
|
|
1923
|
+
]
|
|
1924
|
+
}), window.addEventListener("resize", c), window.addEventListener("scroll", c, !0), e.addEventListener("scroll", c), e.addEventListener("transitionend", c, !0), e.addEventListener("animationend", c, !0), u(), () => {
|
|
1925
|
+
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);
|
|
1926
|
+
};
|
|
1927
|
+
}, en = {
|
|
1928
|
+
key: 0,
|
|
1929
|
+
class: "top-projectBarLeft"
|
|
1930
|
+
}, tn = { class: "top-projectBarFilters" }, nn = { class: "top-projectBarRight" }, rn = {
|
|
1931
|
+
key: 1,
|
|
1932
|
+
class: "top-projectBarBottom"
|
|
1933
|
+
}, an = /* @__PURE__ */ M({
|
|
1934
|
+
__name: "projectBar",
|
|
1935
|
+
props: /*@__PURE__*/ N({
|
|
1936
|
+
styling: { default: "default" },
|
|
1937
|
+
isSticky: { type: Boolean },
|
|
1938
|
+
canChangeSticky: {
|
|
1939
|
+
type: Boolean,
|
|
1940
|
+
default: !1
|
|
1941
|
+
}
|
|
1942
|
+
}, {
|
|
1943
|
+
isSticky: {
|
|
1944
|
+
type: Boolean,
|
|
1945
|
+
default: !0
|
|
1946
|
+
},
|
|
1947
|
+
isStickyModifiers: {}
|
|
1948
|
+
}),
|
|
1949
|
+
emits: /*@__PURE__*/ N(["resize"], ["update:isSticky"]),
|
|
1950
|
+
setup(e, { emit: t, slots: n }) {
|
|
1951
|
+
let r = t, i = I(null), s = I("0px"), c = V(e, "isSticky"), l, u = () => {
|
|
1952
|
+
i.value && (s.value = `${i.value.getBoundingClientRect().height}px`);
|
|
1953
|
+
}, d = (e) => {
|
|
1954
|
+
let t = e[0];
|
|
1955
|
+
t && (u(), r("resize", t));
|
|
1956
|
+
};
|
|
1957
|
+
return oe(() => {
|
|
1958
|
+
i.value && (u(), l = new ResizeObserver(d), l.observe(i.value), [i.value, ...i.value.querySelectorAll(".top-projectBarFilters, .top-regionSelector, .top-groupSelector")].forEach((e) => $t(e)));
|
|
1959
|
+
}), se(() => {
|
|
1960
|
+
l?.disconnect();
|
|
1961
|
+
}), (t, r) => (F(), O("div", {
|
|
1962
|
+
ref_key: "elBar",
|
|
1963
|
+
ref: i,
|
|
1964
|
+
class: P(["top-projectBar", {
|
|
1965
|
+
"top-projectBar": !0,
|
|
1966
|
+
"top-projectBar-sticky": c.value,
|
|
1967
|
+
["top-projectBar-" + e.styling]: !0
|
|
1968
|
+
}]),
|
|
1969
|
+
style: ae({ "--topProjectBar-height": s.value })
|
|
1970
|
+
}, [
|
|
1971
|
+
n.left ? (F(), O("div", en, [R(t.$slots, "left")])) : D("", !0),
|
|
1972
|
+
k("div", tn, [R(t.$slots, "default")]),
|
|
1973
|
+
k("div", nn, [n.right ? R(t.$slots, "right", {}, void 0, void 0, 0) : D("", !0), j(B(b), {
|
|
1974
|
+
notch: !1,
|
|
1975
|
+
pos: "2"
|
|
1976
|
+
}, {
|
|
1977
|
+
opener: U(() => [j(B(a), {
|
|
1978
|
+
color: "theme",
|
|
1979
|
+
icon: "",
|
|
1980
|
+
title: t.$i18n.Common.Settings
|
|
1981
|
+
}, null, 8, ["title"])]),
|
|
1982
|
+
contentList: U(() => [
|
|
1983
|
+
R(t.$slots, "menuItems"),
|
|
1984
|
+
R(t.$slots, "menuAdditional"),
|
|
1985
|
+
e.canChangeSticky ? (F(), O(w, { key: 0 }, [j(B(v), { type: "title" }, {
|
|
1986
|
+
default: U(() => [A(z(t.$i18n.Common.View), 1)]),
|
|
1987
|
+
_: 1
|
|
1988
|
+
}), j(B(v), { type: "formControls" }, {
|
|
1989
|
+
default: U(() => [j(B(o), {
|
|
1990
|
+
modelValue: c.value,
|
|
1991
|
+
"onUpdate:modelValue": r[0] ||= (e) => c.value = e,
|
|
1992
|
+
name: "pin"
|
|
1993
|
+
}, {
|
|
1994
|
+
default: U(() => [A(z(t.$i18n.Common.Bar_pin), 1)]),
|
|
1995
|
+
_: 1
|
|
1996
|
+
}, 8, ["modelValue"])]),
|
|
1997
|
+
_: 1
|
|
1998
|
+
})], 64)) : D("", !0)
|
|
1999
|
+
]),
|
|
2000
|
+
_: 3
|
|
2001
|
+
})]),
|
|
2002
|
+
n.bottom ? (F(), O("div", rn, [R(t.$slots, "bottom")])) : D("", !0)
|
|
2003
|
+
], 6));
|
|
2004
|
+
}
|
|
1753
2005
|
});
|
|
1754
2006
|
//#endregion
|
|
1755
|
-
export { ye as TopCompetitorSelector,
|
|
2007
|
+
export { ye as TopCompetitorSelector, ot as TopGroupSelector, an as TopProjectBar, Nt as TopProjectSelector, Be as TopRegionSelector, qt as TopTagSelector, Kt as TopTagSelectorPopupOpener, Ht as TopTagSelectorTagIcon, je as dialogRegionSelector, Ae as findRegion, It as genElTopTagSelectorPopupOpener, Me as genSearcherByKey, Lt as renderElTopTagSelectorPopupOpener, Dt as topProjectSelectorClearCache, be as useItemsFromCompetitors };
|
|
1756
2008
|
|
|
1757
2009
|
//# sourceMappingURL=project.js.map
|