@topvisor/ui 1.3.1 → 1.3.2-fixOptionGroup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/.chunks/{core-Cmk3j1ll.es.js → core-B21XhwFQ.es.js} +2 -2
  2. package/.chunks/{core-Cmk3j1ll.es.js.map → core-B21XhwFQ.es.js.map} +1 -1
  3. package/.chunks/{core-DWQI6OYD.amd.js → core-BmJ2TrP-.amd.js} +2 -2
  4. package/.chunks/{core-DWQI6OYD.amd.js.map → core-BmJ2TrP-.amd.js.map} +1 -1
  5. package/.chunks/{dialog_selectorRegions-JEsqs4cv.amd.js → dialog_selectorRegions-Coyq9vN8.amd.js} +2 -2
  6. package/.chunks/{dialog_selectorRegions-JEsqs4cv.amd.js.map → dialog_selectorRegions-Coyq9vN8.amd.js.map} +1 -1
  7. package/.chunks/{dialog_selectorRegions-eFMZwckA.es.js → dialog_selectorRegions-DL8hn_CE.es.js} +3 -3
  8. package/.chunks/{dialog_selectorRegions-eFMZwckA.es.js.map → dialog_selectorRegions-DL8hn_CE.es.js.map} +1 -1
  9. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CT1lMYWD.amd.js +2 -0
  10. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CT1lMYWD.amd.js.map +1 -0
  11. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-CuRb6ess.es.js → dialogs.vue_vue_type_script_setup_true_lang-DAe71cy7.es.js} +13 -13
  12. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DAe71cy7.es.js.map +1 -0
  13. package/.chunks/{page.vue_vue_type_script_setup_true_lang-Cy3k9hJN.amd.js → page.vue_vue_type_script_setup_true_lang-B6VX_UCE.amd.js} +2 -2
  14. package/.chunks/{page.vue_vue_type_script_setup_true_lang-Cy3k9hJN.amd.js.map → page.vue_vue_type_script_setup_true_lang-B6VX_UCE.amd.js.map} +1 -1
  15. package/.chunks/{page.vue_vue_type_script_setup_true_lang-CFR_XnIk.es.js → page.vue_vue_type_script_setup_true_lang-CxHeEJGt.es.js} +3 -3
  16. package/.chunks/{page.vue_vue_type_script_setup_true_lang-CFR_XnIk.es.js.map → page.vue_vue_type_script_setup_true_lang-CxHeEJGt.es.js.map} +1 -1
  17. package/.chunks/popupHint.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd.js +2 -0
  18. package/.chunks/popupHint.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd.js.map +1 -0
  19. package/.chunks/{utils-DOkSnf59.es.js → utils-CyNFJrZo.es.js} +30 -30
  20. package/.chunks/utils-CyNFJrZo.es.js.map +1 -0
  21. package/.chunks/{utils-7_bMpPkj.amd.js → utils-KMSovZjd.amd.js} +2 -2
  22. package/.chunks/{utils-7_bMpPkj.amd.js.map → utils-KMSovZjd.amd.js.map} +1 -1
  23. package/.chunks/{utils-CdePhhIZ.es.js → utils-avtpaWJ6.es.js} +2 -2
  24. package/.chunks/{utils-CdePhhIZ.es.js.map → utils-avtpaWJ6.es.js.map} +1 -1
  25. package/.chunks/utils-nEsZhunF.amd.js +2 -0
  26. package/.chunks/utils-nEsZhunF.amd.js.map +1 -0
  27. package/assets/formsExt.css +1 -1
  28. package/assets/layout.css +1 -1
  29. package/assets/{widgetInput.css → popupHint.css} +1 -1
  30. package/core/app.amd.js +1 -1
  31. package/core/app.js +3 -3
  32. package/dialog/dialog.amd.js +1 -1
  33. package/dialog/dialog.js +2 -2
  34. package/formsExt/formsExt.amd.js +1 -1
  35. package/formsExt/formsExt.amd.js.map +1 -1
  36. package/formsExt/formsExt.js +1 -1
  37. package/formsExt/formsExt.js.map +1 -1
  38. package/layout/layout.amd.js.map +1 -1
  39. package/layout/layout.js.map +1 -1
  40. package/package.json +1 -1
  41. package/popup/popup.amd.js +1 -1
  42. package/popup/popup.amd.js.map +1 -1
  43. package/popup/popup.js +141 -94
  44. package/popup/popup.js.map +1 -1
  45. package/project/project.amd.js +1 -1
  46. package/project/project.js +2 -2
  47. package/src/components/formsExt/libs/optionGroup/types.d.ts +0 -3
  48. package/src/components/popup/popup.d.ts +4 -3
  49. package/src/components/popup/popupHint/popupHint.vue.d.ts +17 -0
  50. package/src/components/popup/popupHint/types.d.ts +7 -0
  51. package/src/core/utils/check.d.ts +5 -1
  52. package/tabsView/tabsView.amd.js +1 -1
  53. package/tabsView/tabsView.amd.js.map +1 -1
  54. package/tabsView/tabsView.js +1 -1
  55. package/utils/check.amd.js +1 -1
  56. package/utils/check.amd.js.map +1 -1
  57. package/utils/check.js +14 -21
  58. package/utils/check.js.map +1 -1
  59. package/utils/searchers.amd.js +1 -1
  60. package/utils/searchers.js +2 -2
  61. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CuRb6ess.es.js.map +0 -1
  62. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DJoFuqCw.amd.js +0 -2
  63. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DJoFuqCw.amd.js.map +0 -1
  64. package/.chunks/utils-DOkSnf59.es.js.map +0 -1
  65. package/.chunks/utils-_O-2Zobt.amd.js +0 -2
  66. package/.chunks/utils-_O-2Zobt.amd.js.map +0 -1
  67. package/.chunks/widgetInput.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd.js +0 -2
  68. package/.chunks/widgetInput.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd.js.map +0 -1
  69. /package/src/components/popup/{alert/alert.vue.d.ts → popupAlert/popupAlert.vue.d.ts} +0 -0
  70. /package/src/components/popup/{alert → popupAlert}/types.d.ts +0 -0
  71. /package/src/components/popup/{confirm/confirm.vue.d.ts → popupConfirm/popupConfirm.vue.d.ts} +0 -0
  72. /package/src/components/popup/{confirm → popupConfirm}/types.d.ts +0 -0
  73. /package/src/components/popup/{prompt/prompt.vue.d.ts → popupPrompt/popupPrompt.vue.d.ts} +0 -0
  74. /package/src/components/popup/{prompt → popupPrompt}/types.d.ts +0 -0
package/popup/popup.js CHANGED
@@ -1,11 +1,11 @@
1
- import { _ as P } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js";
2
- import { b as E, a as F } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js";
3
- import { _ as H } from "../.chunks/widgetInput.vue_vue_type_script_setup_true_lang-Cr_jgOW4.es.js";
4
- /* empty css */
5
- import { defineComponent as S, createBlock as V, openBlock as g, mergeProps as O, createSlots as D, withCtx as t, renderSlot as r, createVNode as f, createTextVNode as y, toDisplayString as v, unref as d, ref as L, watch as W } from "vue";
6
- import { c as T } from "../.chunks/forms-BWoAyEVH.es.js";
7
- const M = /* @__PURE__ */ S({
8
- __name: "alert",
1
+ import { _ as T } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js";
2
+ import { b as J, a as Q } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js";
3
+ import { _ as g } from "../.chunks/widgetInput.vue_vue_type_script_setup_true_lang-Cr_jgOW4.es.js";
4
+ /* empty css */
5
+ import { defineComponent as b, createBlock as L, openBlock as P, mergeProps as k, createSlots as S, withCtx as t, renderSlot as l, createVNode as C, createTextVNode as y, toDisplayString as c, unref as v, ref as O, watch as w, resolveDirective as A, withDirectives as W } from "vue";
6
+ import { c as B, f as I } from "../.chunks/forms-BWoAyEVH.es.js";
7
+ const j = /* @__PURE__ */ b({
8
+ __name: "popupAlert",
9
9
  props: {
10
10
  submitText: {},
11
11
  id: {},
@@ -19,24 +19,24 @@ const M = /* @__PURE__ */ S({
19
19
  data: {}
20
20
  },
21
21
  emits: ["open", "close", "scrollContentList"],
22
- setup($) {
23
- const C = $, {
24
- submitText: a,
25
- ...u
26
- } = C;
27
- return (o, s) => (g(), V(P, O({ class: "top-popupAlert" }, u, {
28
- onOpen: s[0] || (s[0] = (l) => o.$emit("open", l)),
29
- onClose: s[1] || (s[1] = (l) => o.$emit("close", l)),
30
- onScrollContentList: s[2] || (s[2] = (...l) => o.$emit("scrollContentList", ...l))
31
- }), D({
22
+ setup(f) {
23
+ const d = f, {
24
+ submitText: r,
25
+ ...i
26
+ } = d;
27
+ return (o, e) => (P(), L(T, k({ class: "top-popupAlert" }, i, {
28
+ onOpen: e[0] || (e[0] = (s) => o.$emit("open", s)),
29
+ onClose: e[1] || (e[1] = (s) => o.$emit("close", s)),
30
+ onScrollContentList: e[2] || (e[2] = (...s) => o.$emit("scrollContentList", ...s))
31
+ }), S({
32
32
  opener: t(() => [
33
- r(o.$slots, "opener")
33
+ l(o.$slots, "opener")
34
34
  ]),
35
35
  footer: t(() => [
36
- r(o.$slots, "footer"),
37
- f(T, null, {
36
+ l(o.$slots, "footer"),
37
+ C(B, null, {
38
38
  default: t(() => [
39
- y(v(d(a) || o.$i18n.Common.Close), 1)
39
+ y(c(v(r) || o.$i18n.Common.Close), 1)
40
40
  ]),
41
41
  _: 1
42
42
  })
@@ -46,21 +46,21 @@ const M = /* @__PURE__ */ S({
46
46
  o.$slots.header ? {
47
47
  name: "header",
48
48
  fn: t(() => [
49
- r(o.$slots, "header")
49
+ l(o.$slots, "header")
50
50
  ]),
51
51
  key: "0"
52
52
  } : void 0,
53
53
  o.$slots.default ? {
54
54
  name: "content",
55
55
  fn: t(() => [
56
- r(o.$slots, "default")
56
+ l(o.$slots, "default")
57
57
  ]),
58
58
  key: "1"
59
59
  } : void 0
60
60
  ]), 1040));
61
61
  }
62
- }), U = /* @__PURE__ */ S({
63
- __name: "confirm",
62
+ }), q = /* @__PURE__ */ b({
63
+ __name: "popupConfirm",
64
64
  props: {
65
65
  cancelText: {},
66
66
  submitText: {},
@@ -76,67 +76,67 @@ const M = /* @__PURE__ */ S({
76
76
  data: {}
77
77
  },
78
78
  emits: ["open", "close", "scrollContentList", "submit"],
79
- setup($, { emit: C }) {
80
- const a = $, u = C, o = L(!1), s = () => {
81
- o.value = !0, u("submit");
82
- }, l = (n) => {
79
+ setup(f, { emit: d }) {
80
+ const r = f, i = d, o = O(!1), e = () => {
81
+ o.value = !0, i("submit");
82
+ }, s = (p) => {
83
83
  if (o.value) {
84
84
  o.value = !1;
85
85
  return;
86
86
  }
87
- u("close", n);
87
+ i("close", p);
88
88
  }, {
89
- submitText: c,
90
- cancelText: b,
91
- isWarning: B,
92
- ...k
93
- } = a;
94
- return (n, p) => (g(), V(P, O({ class: "top-popupConfirm" }, k, {
95
- onOpen: p[0] || (p[0] = (e) => n.$emit("open", e)),
96
- onClose: p[1] || (p[1] = (e) => l(e)),
97
- onScrollContentList: p[2] || (p[2] = (...e) => n.$emit("scrollContentList", ...e))
98
- }), D({
89
+ submitText: a,
90
+ cancelText: V,
91
+ isWarning: H,
92
+ ...D
93
+ } = r;
94
+ return (p, u) => (P(), L(T, k({ class: "top-popupConfirm" }, D, {
95
+ onOpen: u[0] || (u[0] = (n) => p.$emit("open", n)),
96
+ onClose: u[1] || (u[1] = (n) => s(n)),
97
+ onScrollContentList: u[2] || (u[2] = (...n) => p.$emit("scrollContentList", ...n))
98
+ }), S({
99
99
  opener: t(() => [
100
- r(n.$slots, "opener")
100
+ l(p.$slots, "opener")
101
101
  ]),
102
102
  footer: t(() => [
103
- r(n.$slots, "footer"),
104
- f(T, { color: "theme" }, {
103
+ l(p.$slots, "footer"),
104
+ C(B, { color: "theme" }, {
105
105
  default: t(() => [
106
- y(v(d(b) || n.$i18n.Common.Cancel), 1)
106
+ y(c(v(V) || p.$i18n.Common.Cancel), 1)
107
107
  ]),
108
108
  _: 1
109
109
  }),
110
- f(T, {
111
- onClick: s,
112
- color: d(B) ? "red" : "blue"
110
+ C(B, {
111
+ onClick: e,
112
+ color: v(H) ? "red" : "blue"
113
113
  }, {
114
114
  default: t(() => [
115
- y(v(d(c) || n.$i18n.Common.Continue), 1)
115
+ y(c(v(a) || p.$i18n.Common.Continue), 1)
116
116
  ]),
117
117
  _: 1
118
118
  }, 8, ["color"])
119
119
  ]),
120
120
  _: 2
121
121
  }, [
122
- n.$slots.header ? {
122
+ p.$slots.header ? {
123
123
  name: "header",
124
124
  fn: t(() => [
125
- r(n.$slots, "header")
125
+ l(p.$slots, "header")
126
126
  ]),
127
127
  key: "0"
128
128
  } : void 0,
129
- n.$slots.default ? {
129
+ p.$slots.default ? {
130
130
  name: "content",
131
131
  fn: t(() => [
132
- r(n.$slots, "default")
132
+ l(p.$slots, "default")
133
133
  ]),
134
134
  key: "1"
135
135
  } : void 0
136
136
  ]), 1040));
137
137
  }
138
- }), j = /* @__PURE__ */ S({
139
- __name: "prompt",
138
+ }), z = /* @__PURE__ */ b({
139
+ __name: "popupPrompt",
140
140
  props: {
141
141
  submitText: {},
142
142
  cancelText: {},
@@ -152,62 +152,62 @@ const M = /* @__PURE__ */ S({
152
152
  data: {}
153
153
  },
154
154
  emits: ["open", "close", "scrollContentList", "submit"],
155
- setup($, { emit: C }) {
156
- const a = $, u = C, o = () => l.value = a.defaultValue ?? "", s = L(!1), l = L();
157
- W(() => a.defaultValue, () => o(), { immediate: !0 });
158
- const c = () => {
159
- s.value = !0;
160
- }, b = (e) => {
161
- if (s.value) {
162
- s.value = !1, u("submit", l.value), o();
155
+ setup(f, { emit: d }) {
156
+ const r = f, i = d, o = () => s.value = r.defaultValue ?? "", e = O(!1), s = O();
157
+ w(() => r.defaultValue, () => o(), { immediate: !0 });
158
+ const a = () => {
159
+ e.value = !0;
160
+ }, V = (n) => {
161
+ if (e.value) {
162
+ e.value = !1, i("submit", s.value), o();
163
163
  return;
164
164
  }
165
- o(), u("close", e);
165
+ o(), i("close", n);
166
166
  }, {
167
- submitText: B,
168
- cancelText: k,
169
- defaultValue: n,
170
- ...p
171
- } = a;
172
- return (e, i) => (g(), V(P, O({ class: "top-popupPrompt" }, p, {
173
- onOpen: i[1] || (i[1] = (m) => e.$emit("open", m)),
174
- onClose: i[2] || (i[2] = (m) => b(m)),
175
- onScrollContentList: i[3] || (i[3] = (...m) => e.$emit("scrollContentList", ...m))
176
- }), D({
167
+ submitText: H,
168
+ cancelText: D,
169
+ defaultValue: p,
170
+ ...u
171
+ } = r;
172
+ return (n, m) => (P(), L(T, k({ class: "top-popupPrompt" }, u, {
173
+ onOpen: m[1] || (m[1] = ($) => n.$emit("open", $)),
174
+ onClose: m[2] || (m[2] = ($) => V($)),
175
+ onScrollContentList: m[3] || (m[3] = (...$) => n.$emit("scrollContentList", ...$))
176
+ }), S({
177
177
  opener: t(() => [
178
- r(e.$slots, "opener")
178
+ l(n.$slots, "opener")
179
179
  ]),
180
180
  footer: t(() => [
181
- r(e.$slots, "footer"),
182
- f(T, { color: "theme" }, {
181
+ l(n.$slots, "footer"),
182
+ C(B, { color: "theme" }, {
183
183
  default: t(() => [
184
- y(v(d(k) || e.$i18n.Common.Cancel), 1)
184
+ y(c(v(D) || n.$i18n.Common.Cancel), 1)
185
185
  ]),
186
186
  _: 1
187
187
  }),
188
- f(T, { onClick: c }, {
188
+ C(B, { onClick: a }, {
189
189
  default: t(() => [
190
- y(v(d(B) || e.$i18n.Common.OK), 1)
190
+ y(c(v(H) || n.$i18n.Common.OK), 1)
191
191
  ]),
192
192
  _: 1
193
193
  })
194
194
  ]),
195
195
  _: 2
196
196
  }, [
197
- e.$slots.header ? {
197
+ n.$slots.header ? {
198
198
  name: "header",
199
199
  fn: t(() => [
200
- r(e.$slots, "header")
200
+ l(n.$slots, "header")
201
201
  ]),
202
202
  key: "0"
203
203
  } : void 0,
204
- e.$slots.default ? {
204
+ n.$slots.default ? {
205
205
  name: "content",
206
206
  fn: t(() => [
207
- r(e.$slots, "default"),
208
- f(H, {
209
- modelValue: l.value,
210
- "onUpdate:modelValue": i[0] || (i[0] = (m) => l.value = m),
207
+ l(n.$slots, "default"),
208
+ C(g, {
209
+ modelValue: s.value,
210
+ "onUpdate:modelValue": m[0] || (m[0] = ($) => s.value = $),
211
211
  modelModifiers: { trim: !0 }
212
212
  }, null, 8, ["modelValue"])
213
213
  ]),
@@ -215,14 +215,61 @@ const M = /* @__PURE__ */ S({
215
215
  } : void 0
216
216
  ]), 1040));
217
217
  }
218
+ }), E = /* @__PURE__ */ b({
219
+ __name: "popupHint",
220
+ props: {
221
+ hint: {},
222
+ id: {},
223
+ class: {},
224
+ transitionDuration: {},
225
+ footerSupportLink: {},
226
+ pos: {},
227
+ notch: { type: Boolean },
228
+ openByHover: { type: Boolean },
229
+ posBy: {},
230
+ data: {}
231
+ },
232
+ setup(f) {
233
+ const d = f, {
234
+ hint: r,
235
+ ...i
236
+ } = d;
237
+ return (o, e) => {
238
+ const s = A("top-tooltip");
239
+ return P(), L(T, k({ class: "top-popupHint" }, i, {
240
+ onOpen: e[0] || (e[0] = (a) => o.$emit("open", a)),
241
+ onClose: e[1] || (e[1] = (a) => o.$emit("close", a)),
242
+ onScrollContentList: e[2] || (e[2] = (...a) => o.$emit("scrollContentList", ...a))
243
+ }), S({
244
+ opener: t(() => [
245
+ W(C(I, {
246
+ hint: v(r),
247
+ class: "top-popupHint_opener"
248
+ }, null, 8, ["hint"]), [
249
+ [s]
250
+ ])
251
+ ]),
252
+ _: 2
253
+ }, [
254
+ o.$slots.default ? {
255
+ name: "content",
256
+ fn: t(() => [
257
+ l(o.$slots, "default")
258
+ ]),
259
+ key: "0"
260
+ } : void 0
261
+ ]), 1040);
262
+ };
263
+ }
218
264
  });
219
265
  export {
220
- P as TopPopup,
221
- M as TopPopupAlert,
222
- U as TopPopupConfirm,
223
- E as TopPopupListItem,
224
- F as TopPopupOpener,
225
- j as TopPopupPrompt,
226
- H as TopPopupWidgetInput
266
+ T as TopPopup,
267
+ j as TopPopupAlert,
268
+ q as TopPopupConfirm,
269
+ E as TopPopupHint,
270
+ J as TopPopupListItem,
271
+ Q as TopPopupOpener,
272
+ z as TopPopupPrompt,
273
+ g as TopPopupWidgetInput
227
274
  };
228
275
  //# sourceMappingURL=popup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popup.js","sources":["../../src/components/popup/alert/alert.vue","../../src/components/popup/confirm/confirm.vue","../../src/components/popup/prompt/prompt.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '@/components/popup/popup/popup.vue';\n\nconst props = defineProps<Props<T>>();\n\ndefineEmits<Emits<T>>();\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupAlert\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"$emit('close', $event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия Popup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton>\n\t\t\t\t{{ submitText || $i18n.Common.Close }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport { ref } from 'vue';\nimport type { PopupEvent } from '@/components/popup/popup/types';\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '@/components/popup/popup/popup.vue';\n\nconst props = defineProps<Props<T>>();\n\nconst emit = defineEmits<Emits<T>>();\n\nconst isSubmit = ref(false);\n\nconst onSubmit = () => {\n\tisSubmit.value = true;\n\n\temit('submit');\n};\n\nconst onClose = (popupEvent: PopupEvent<T>) => {\n\tif (isSubmit.value) {\n\t\tisSubmit.value = false;\n\n\t\treturn;\n\t}\n\n\temit('close', popupEvent);\n};\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\tcancelText,\n\tisWarning,\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupConfirm\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"onClose($event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия TopPopup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton color=\"theme\">\n\t\t\t\t{{ cancelText || $i18n.Common.Cancel }}\n\t\t\t</TopButton>\n\n\t\t\t<TopButton\n\t\t\t\t@click=\"onSubmit\"\n\t\t\t\t:color=\"isWarning ? 'red' : 'blue'\"\n\t\t\t>\n\t\t\t\t{{ submitText || $i18n.Common.Continue }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport { ref, watch } from 'vue';\nimport type { PopupEvent } from '@/components/popup/popup/types';\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '@/components/popup/popup/popup.vue';\nimport TopPopupWidgetInput from '@/components/popup/popup/widgetInput.vue';\n\nconst props = defineProps<Props<T>>();\n\nconst emit = defineEmits<Emits<T>>();\n\nconst reset = () => localValue.value = props.defaultValue ?? '';\n\nconst isSubmit = ref(false);\n\nconst localValue = ref();\nwatch(() => props.defaultValue, () => reset(), { immediate: true });\n\nconst onSubmit = () => {\n\tisSubmit.value = true;\n};\n\nconst onClose = (popupEvent: PopupEvent<T>) => {\n\tif (isSubmit.value) {\n\t\tisSubmit.value = false;\n\n\t\temit('submit', localValue.value);\n\n\t\treset();\n\n\t\treturn;\n\t}\n\n\treset();\n\n\temit('close', popupEvent);\n};\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\tcancelText,\n\tdefaultValue,\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupPrompt\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"onClose($event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия TopPopup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\n\t\t\t<TopPopupWidgetInput v-model.trim=\"localValue\"/>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton color=\"theme\">\n\t\t\t\t{{ cancelText || $i18n.Common.Cancel }}\n\t\t\t</TopButton>\n\n\t\t\t<TopButton @click=\"onSubmit\">\n\t\t\t\t{{ submitText || $i18n.Common.OK }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n"],"names":["props","__props","submitText","propsPopup","_openBlock","_createBlock","TopPopup","_mergeProps","_cache","$event","$emit","args","_renderSlot","_ctx","_createVNode","TopButton","_createTextVNode","_toDisplayString","_unref","$i18n","$slots","emit","__emit","isSubmit","ref","onSubmit","onClose","popupEvent","cancelText","isWarning","reset","localValue","watch","defaultValue","TopPopupWidgetInput"],"mappings":"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"}
1
+ {"version":3,"file":"popup.js","sources":["../../src/components/popup/popupAlert/popupAlert.vue","../../src/components/popup/popupConfirm/popupConfirm.vue","../../src/components/popup/popupPrompt/popupPrompt.vue","../../src/components/popup/popupHint/popupHint.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '@/components/popup/popup/popup.vue';\n\nconst props = defineProps<Props<T>>();\n\ndefineEmits<Emits<T>>();\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupAlert\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"$emit('close', $event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия Popup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton>\n\t\t\t\t{{ submitText || $i18n.Common.Close }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport { ref } from 'vue';\nimport type { PopupEvent } from '@/components/popup/popup/types';\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '@/components/popup/popup/popup.vue';\n\nconst props = defineProps<Props<T>>();\n\nconst emit = defineEmits<Emits<T>>();\n\nconst isSubmit = ref(false);\n\nconst onSubmit = () => {\n\tisSubmit.value = true;\n\n\temit('submit');\n};\n\nconst onClose = (popupEvent: PopupEvent<T>) => {\n\tif (isSubmit.value) {\n\t\tisSubmit.value = false;\n\n\t\treturn;\n\t}\n\n\temit('close', popupEvent);\n};\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\tcancelText,\n\tisWarning,\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupConfirm\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"onClose($event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия TopPopup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton color=\"theme\">\n\t\t\t\t{{ cancelText || $i18n.Common.Cancel }}\n\t\t\t</TopButton>\n\n\t\t\t<TopButton\n\t\t\t\t@click=\"onSubmit\"\n\t\t\t\t:color=\"isWarning ? 'red' : 'blue'\"\n\t\t\t>\n\t\t\t\t{{ submitText || $i18n.Common.Continue }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport { ref, watch } from 'vue';\nimport type { PopupEvent } from '@/components/popup/popup/types';\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '@/components/popup/popup/popup.vue';\nimport TopPopupWidgetInput from '@/components/popup/popup/widgetInput.vue';\n\nconst props = defineProps<Props<T>>();\n\nconst emit = defineEmits<Emits<T>>();\n\nconst reset = () => localValue.value = props.defaultValue ?? '';\n\nconst isSubmit = ref(false);\n\nconst localValue = ref();\nwatch(() => props.defaultValue, () => reset(), { immediate: true });\n\nconst onSubmit = () => {\n\tisSubmit.value = true;\n};\n\nconst onClose = (popupEvent: PopupEvent<T>) => {\n\tif (isSubmit.value) {\n\t\tisSubmit.value = false;\n\n\t\temit('submit', localValue.value);\n\n\t\treset();\n\n\t\treturn;\n\t}\n\n\treset();\n\n\temit('close', popupEvent);\n};\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\tcancelText,\n\tdefaultValue,\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupPrompt\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"onClose($event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия TopPopup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\n\t\t\t<TopPopupWidgetInput v-model.trim=\"localValue\"/>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton color=\"theme\">\n\t\t\t\t{{ cancelText || $i18n.Common.Cancel }}\n\t\t\t</TopButton>\n\n\t\t\t<TopButton @click=\"onSubmit\">\n\t\t\t\t{{ submitText || $i18n.Common.OK }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport TopPopup from '@/components/popup/popup/popup.vue';\nimport TopHint from '@/components/forms/hint/hint.vue';\nimport type { Props } from './types';\n\nconst props = defineProps<Props<T>>();\n\nconst {\n\thint,\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupHint\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"$emit('close', $event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- Элемент для открытия Popup -->\n\t\t\t<TopHint\n\t\t\t\t:hint=\"hint\"\n\t\t\t\tclass=\"top-popupHint_opener\"\n\t\t\t\tv-top-tooltip\n\t\t\t/>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\t\t</template>\n\t</TopPopup>\n</template>\n\n<style>\n.top-popupHint_opener {\n\tcursor: pointer;\n}\n\n.top-popupHint_opener.top-active {\n\tcolor: var(--color-text-2);\n}\n</style>\n"],"names":["props","__props","submitText","propsPopup","_openBlock","_createBlock","TopPopup","_mergeProps","_cache","$event","$emit","args","_renderSlot","_ctx","_createVNode","TopButton","_createTextVNode","_toDisplayString","_unref","$i18n","$slots","emit","__emit","isSubmit","ref","onSubmit","onClose","popupEvent","cancelText","isWarning","reset","localValue","watch","defaultValue","TopPopupWidgetInput","hint","TopHint"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAKA,UAAMA,IAAQC,GAKR;AAAA,MACL,YAAAC;AAAA,MACA,GAAGC;AAAA,IAAA,IACUH;sBAKbI,EAAA,GAAAC,EA8BWC,GA9BXC,EA8BW,EA7BV,OAAM,iBAAA,GACJJ,GAAU;AAAA,MACX,QAAIK,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEC,EAAAA,MAAK,QAASD,CAAM;AAAA,MAC1B,SAAKD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEC,EAAAA,MAAK,SAAUD,CAAM;AAAA,MAC5B,qBAAiBD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAMG,MAASD,EAAAA,8BAA8BC,CAAI;AAAA,IAAA;MAExD,UAEV,MAA2B;AAAA,QAA3BC,EAA2BC,EAAA,QAAA,QAAA;AAAA,MAAA;MAajB,UAEV,MAA2B;AAAA,QAA3BD,EAA2BC,EAAA,QAAA,QAAA;AAAA,QAE3BC,EAEYC,GAAA,MAAA;AAAA,qBADX,MAAsC;AAAA,YAAnCC,EAAAC,EAAAC,EAAAhB,CAAA,KAAciB,EAAAA,MAAM,OAAO,KAAK,GAAA,CAAA;AAAA,UAAA;;;;;;MAfbC,EAAAA,OAAO;cAApB;AAAA,cAEV,MAA2B;AAAA,UAA3BR,EAA2BC,EAAA,QAAA,QAAA;AAAA,QAAA;;;MAGHO,EAAAA,OAAO;cAArB;AAAA,cAEV,MAAa;AAAA,UAAbR,EAAaC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;AC9BhB,UAAMb,IAAQC,GAERoB,IAAOC,GAEPC,IAAWC,EAAI,EAAK,GAEpBC,IAAW,MAAM;AACtB,MAAAF,EAAS,QAAQ,IAEjBF,EAAK,QAAQ;AAAA,IACd,GAEMK,IAAU,CAACC,MAA8B;AAC9C,UAAIJ,EAAS,OAAO;AACnB,QAAAA,EAAS,QAAQ;AAEjB;AAAA,MACD;AAEA,MAAAF,EAAK,SAASM,CAAU;AAAA,IACzB,GAGM;AAAA,MACL,YAAAzB;AAAA,MACA,YAAA0B;AAAA,MACA,WAAAC;AAAA,MACA,GAAG1B;AAAA,IAAA,IACUH;sBAKbI,EAAA,GAAAC,EAqCWC,GArCXC,EAqCW,EApCV,OAAM,mBAAA,GACJJ,GAAU;AAAA,MACX,QAAIK,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEC,EAAAA,MAAK,QAASD,CAAM;AAAA,MAC1B,SAAKD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEiB,EAAQjB,CAAM;AAAA,MACrB,qBAAiBD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAMG,MAASD,EAAAA,8BAA8BC,CAAI;AAAA,IAAA;MAExD,UAEV,MAA2B;AAAA,QAA3BC,EAA2BC,EAAA,QAAA,QAAA;AAAA,MAAA;MAajB,UAEV,MAA2B;AAAA,QAA3BD,EAA2BC,EAAA,QAAA,QAAA;AAAA,QAE3BC,EAEYC,GAAA,EAFD,OAAM,WAAO;AAAA,qBACvB,MAAuC;AAAA,YAApCC,EAAAC,EAAAC,EAAAU,CAAA,KAAcT,EAAAA,MAAM,OAAO,MAAM,GAAA,CAAA;AAAA,UAAA;;;QAGrCL,EAKYC,GAAA;AAAA,UAJV,SAAOU;AAAA,UACP,OAAOP,EAAAW,CAAA,IAAS,QAAA;AAAA,QAAA;qBAEjB,MAAyC;AAAA,YAAtCb,EAAAC,EAAAC,EAAAhB,CAAA,KAAciB,EAAAA,MAAM,OAAO,QAAQ,GAAA,CAAA;AAAA,UAAA;;;;;;MAtBhBC,EAAAA,OAAO;cAApB;AAAA,cAEV,MAA2B;AAAA,UAA3BR,EAA2BC,EAAA,QAAA,QAAA;AAAA,QAAA;;;MAGHO,EAAAA,OAAO;cAArB;AAAA,cAEV,MAAa;AAAA,UAAbR,EAAaC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;ACnDhB,UAAMb,IAAQC,GAERoB,IAAOC,GAEPQ,IAAQ,MAAMC,EAAW,QAAQ/B,EAAM,gBAAgB,IAEvDuB,IAAWC,EAAI,EAAK,GAEpBO,IAAaP,EAAA;AACnB,IAAAQ,EAAM,MAAMhC,EAAM,cAAc,MAAM8B,KAAS,EAAE,WAAW,IAAM;AAElE,UAAML,IAAW,MAAM;AACtB,MAAAF,EAAS,QAAQ;AAAA,IAClB,GAEMG,IAAU,CAACC,MAA8B;AAC9C,UAAIJ,EAAS,OAAO;AACnB,QAAAA,EAAS,QAAQ,IAEjBF,EAAK,UAAUU,EAAW,KAAK,GAE/BD,EAAA;AAEA;AAAA,MACD;AAEA,MAAAA,EAAA,GAEAT,EAAK,SAASM,CAAU;AAAA,IACzB,GAGM;AAAA,MACL,YAAAzB;AAAA,MACA,YAAA0B;AAAA,MACA,cAAAK;AAAA,MACA,GAAG9B;AAAA,IAAA,IACUH;sBAKbI,EAAA,GAAAC,EAoCWC,GApCXC,EAoCW,EAnCV,OAAM,kBAAA,GACJJ,GAAU;AAAA,MACX,QAAIK,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEC,EAAAA,MAAK,QAASD,CAAM;AAAA,MAC1B,SAAKD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEiB,EAAQjB,CAAM;AAAA,MACrB,qBAAiBD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAMG,MAASD,EAAAA,8BAA8BC,CAAI;AAAA,IAAA;MAExD,UAEV,MAA2B;AAAA,QAA3BC,EAA2BC,EAAA,QAAA,QAAA;AAAA,MAAA;MAejB,UAEV,MAA2B;AAAA,QAA3BD,EAA2BC,EAAA,QAAA,QAAA;AAAA,QAE3BC,EAEYC,GAAA,EAFD,OAAM,WAAO;AAAA,qBACvB,MAAuC;AAAA,YAApCC,EAAAC,EAAAC,EAAAU,CAAA,KAAcT,EAAAA,MAAM,OAAO,MAAM,GAAA,CAAA;AAAA,UAAA;;;QAGrCL,EAEYC,GAAA,EAFA,SAAOU,KAAQ;AAAA,qBAC1B,MAAmC;AAAA,YAAhCT,EAAAC,EAAAC,EAAAhB,CAAA,KAAciB,EAAAA,MAAM,OAAO,EAAE,GAAA,CAAA;AAAA,UAAA;;;;;;MArBVC,EAAAA,OAAO;cAApB;AAAA,cAEV,MAA2B;AAAA,UAA3BR,EAA2BC,EAAA,QAAA,QAAA;AAAA,QAAA;;;MAGHO,EAAAA,OAAO;cAArB;AAAA,cAEV,MAAa;AAAA,UAAbR,EAAaC,EAAA,QAAA,SAAA;AAAA,UAEbC,EAAgDoB,GAAA;AAAA,wBAAbH,EAAA;AAAA,0DAAAA,EAAU,QAAAtB;AAAA,4BAAxB,EAAA,MAAA,GAAA;AAAA,UAAA;;;;;;;;;;;;;;;;;;;;;AClExB,UAAMT,IAAQC,GAER;AAAA,MACL,MAAAkC;AAAA,MACA,GAAGhC;AAAA,IAAA,IACUH;;;AAKb,aAAAI,EAAA,GAAAC,EAoBWC,GApBXC,EAoBW,EAnBV,OAAM,gBAAA,GACJJ,GAAU;AAAA,QACX,QAAIK,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEC,EAAAA,MAAK,QAASD,CAAM;AAAA,QAC1B,SAAKD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEC,EAAAA,MAAK,SAAUD,CAAM;AAAA,QAC5B,qBAAiBD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAMG,MAASD,EAAAA,8BAA8BC,CAAI;AAAA,MAAA;QAExD,UAEV,MAIE;AAAA,YAJFG,EAIEsB,GAAA;AAAA,YAHA,MAAMlB,EAAAiB,CAAA;AAAA,YACP,OAAM;AAAA,UAAA;;;;;;QAKiBf,EAAAA,OAAO;gBAArB;AAAA,gBAEV,MAAa;AAAA,YAAbR,EAAaC,EAAA,QAAA,SAAA;AAAA,UAAA;;;;;;;"}
@@ -1,2 +1,2 @@
1
- define(["require","exports","vue","../.chunks/forms-BfDSGwrU.amd","../.chunks/listItem.vue_vue_type_script_setup_true_lang-R7J0Cawj.amd","../.chunks/menu.vue_vue_type_style_index_0_lang-JZ-QwyLO.amd","../.chunks/utils-7_bMpPkj.amd","../utils/searchers.amd","../utils/dom.amd","../popup/worker.amd","../require/css.amd!../assets/project.css"],(function(ne,V,e,x,E,oe,le,P,_,ae){"use strict";if(typeof e>"u")var e=window.Vue;const re={class:"top-selectorCompetitors"},ie={class:"top-ellipsis1"},de=e.defineComponent({__name:"selectorCompetitors",props:e.mergeModels({modelValue:{},items:{},showSelectAllItem:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const l=n,r=e.useModel(n,"modelValue"),t=e.computed(()=>{if(l.showSelectAllItem)return{icon:"",title:x.useI18n().Common.Select_all,value:"all",content:""}});return(d,o)=>(e.openBlock(),e.createElementBlock("div",re,[e.unref(x.Core).state.isMobile?(e.openBlock(),e.createBlock(E._sfc_main,{key:0},{opener:e.withCtx(()=>[e.createVNode(x._sfc_main$1,{class:"top-selectorCompetitors_opener",color:"theme",icon:"",icon2:""},{default:e.withCtx(()=>{var a;return[e.createTextVNode(e.toDisplayString((a=d.items.find(s=>{var v;return s.value===((v=r.value)==null?void 0:v[0])}))==null?void 0:a.content),1)]}),_:1})]),contentList:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,a=>{var s;return e.openBlock(),e.createBlock(E._sfc_main$2,{class:e.normalizeClass({"top-active":(s=r.value)==null?void 0:s.includes(a.value)}),"data-top-icon":a.icon,title:a.title,onClick:()=>r.value=[a.value]},{default:e.withCtx(()=>[e.createElementVNode("span",ie,e.toDisplayString(a.content),1)]),_:2},1032,["class","data-top-icon","title","onClick"])}),256))]),_:1})):(e.openBlock(),e.createBlock(oe._sfc_main,{key:1,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value=a),items:d.items,isMultiple:!0,styling:"bar",canBeEmptyMultiple:!1,selectAllItem:t.value},null,8,["modelValue","items","selectAllItem"]))]))}}),ue=(n,l)=>e.computed(()=>e.toValue(n).filter(d=>d.on>=0||d.id===l).map(d=>({value:d.id,title:d.url+` [${d.id}]`,icon:d.id===e.toValue(l)?"":"",content:d.name}))),w=-1,p=-2,R=-1,se={0:"Yandex",1:"Google",4:"YouTube",5:"Bing",7:"Seznam",8:"AppStore",9:"GoogleStore",20:"Yandex.com",21:"Yandex.com.tr"},J={key:p,name:"--",index:p},G={key:p,name:"--",regions:[J],regionByIndex:new Map([[p,J]])},A={key:p,name:"Autoselect",index:p},U={key:p,name:"Autoselect",regions:[A],regionByIndex:new Map([[p,A]])},Y={countryCode:"00",depth:1,device:0,key:R,index:R,lang:"ru",name:"Without region"},ce=()=>(A.name=x.useI18n().Common.Autoselect,A),ge=()=>(ce(),U.name=x.useI18n().Common.Autoselect,console.log(U),U),fe=()=>(Y.name=x.useI18n().Keywords.Without_region,Y),z=(n=!1,l=!1,r=[])=>{let t;return n?t=me(r):t=W(r),l&&t.set(p,ge()),t.size||t.set(p,G),t},W=(n,l=!0,r=[],t=!1)=>{const d=new Map;return n.forEach(o=>{if(!o.enabled||t&&typeof o.key=="number"&&o.key>1)return;const a={...o};a.regionByIndex=new Map,o.regions&&o.regions.forEach(s=>{if(l&&!s.enabled)return;const v={...s};a.regionByIndex.set(v.index,v)}),!a.regionByIndex.size&&r.length,(!o.regions||a.regionByIndex.size||r.length)&&typeof a.key=="number"&&d.set(a.key,a)}),r.forEach(o=>{if(d.has(o))return;const a={key:o,name:se[o],regions:[],regionByIndex:new Map};d.set(a.key,a)}),d},me=n=>{const l=W(n,!1,[0,1],!0);if(l.has(2)){const r=l.get(2);r&&(r.regionByIndex=new Map)}return l.forEach(r=>{if(!r.regionByIndex)return;const t={...fe()};r.regionByIndex.set(t.index,t)}),l},H=(n,l,r=[])=>{const t=z(n,!1,r);let d;return t.forEach(o=>{if(!(l.searcher_key!==void 0&&l.searcher_key!=o.key)&&o.regions&&(o.regions.forEach(a=>{if(!d&&!(l.key!==void 0&&l.key!=a.key)&&!(l.index!==void 0&&l.index!=a.index)&&!(!n&&(l.lang!==void 0&&l.lang!=a.lang||l.device!==void 0&&l.device!=a.device)))return a.searcher_key=o.key,d=a,!1}),d))return!1}),d},Q=le.useAsyncTopDialog(()=>new Promise((n,l)=>ne(["../.chunks/dialog_selectorRegions-JEsqs4cv.amd"],n,l))),ve=(n,l)=>{const r=x.useI18n(),t=e.ref(l.value.keys().next().value??p),d=e.computed(()=>{const o=new Map;if(l.value.forEach(a=>{let s={value:a.key,title:a.name};n.addSearcherIcon&&(s.icon=P.getSearcherGIcon(a.key)),o.set(a.key,s)}),n.addCompare&&!o.has(p)){const a={value:"",title:"--------------------",disabled:!0};o.set(a.value,a);const s={value:w,title:r.Common.Compare};o.set(s.value,s)}return o});return{searcherKey:t,optionBySearcherKey:d}},ye=(n,l)=>{var o,a,s;const r=x.useI18n(),t=e.ref(p);n.modelValue.length===1&&(t.value=n.modelValue[0]),t.value===p&&(n.forFrequency?t.value=((a=(o=l.value)==null?void 0:o.regionByIndex.values().next().value)==null?void 0:a.key)??p:t.value=((s=l.value)==null?void 0:s.regionByIndex.keys().next().value)??p);const d=e.computed(()=>{var h;const v=new Map;return(h=l.value.regionByIndex)==null||h.forEach(k=>{let i=k.name;if(n.forFrequency){const I={value:k.key,title:i};v.has(k.key)||v.set(k.key,I);return}k.device&&(i+=" ("+r.Common["Device_"+k.device]+")");const f=P.getLangLabel(l.value.key||0,k.lang??"");f&&(i+=" / "+f);const c={value:k.index,title:i,icon:k.device?P.getDeviceGIcon(k.device):void 0};v.set(k.index,c)}),v});return e.watch(d,(v,h)=>{var c;if(n.onlySearcher||t.value!==void 0&&v.get(t.value))return;let k=v.keys().next().value;if(t.value===p||k===p){t.value=k;return}let i=((c=h==null?void 0:h.get(t.value))==null?void 0:c.title)||"",f=-1;for(const[I,B]of v.entries()){const C=B.title;if(typeof C!="string"||typeof I=="string")break;if(C===i){k=I;break}const T=new RegExp(` \\((${r.Common.Device_1}|${r.Common.Device_2})\\)`);let m=i,u=3;C.indexOf(m)===-1&&(m=i.replace(/^[^a-zа-я]/i,"").replace(T,""),u--),C.indexOf(m)===-1&&(m=i.replace(/ \/.*/,""),u--),C.indexOf(m)===-1&&(m=i.replace(/ \/.*/,""),m=m.replace(/^[^a-zа-я]/i,"").replace(T,""),u--),C.indexOf(m)!==-1&&(u<=f||(f=u,k=I))}t.value=k}),{regionIndex:t,optionByRegionIndex:d}},pe=(n,l,r)=>{const t=e.ref([]),d=()=>{if(n.onlySearcher&&l.value){t.value=Array.from(l.value.keys());return}let a=[];if(n.modelValue.length>1)a=[...n.modelValue];else try{a=JSON.parse(localStorage.getItem("ui:project:regionSelector"+n.projectId+":regionsIndexes"))??[]}catch{}a.length&&(a=a.filter(s=>r.value.has(s))),a.length||(a=Array.from(r.value)),t.value=[...a]},o=()=>{t.value.length?localStorage.setItem("ui:project:regionSelector:"+n.projectId+":regionsIndexes",JSON.stringify(t.value)):localStorage.removeItem("ui:project:regionSelector:"+n.projectId+":regionsIndexes")};return e.watch(t,()=>{o()}),n.addCompare&&d(),{regionsIndexes:t}},he=n=>{const l=e.computed(()=>z(n.forFrequency,n.autoRegion,n.searchers)),r=e.computed(()=>l.value.get(d.searcherKey.value)||G),t=e.computed(()=>{const i=new Set;return l.value.forEach(f=>{f.regionByIndex.forEach(c=>{c.index!==R&&c.index!==p&&i.add(c.index)})}),i}),d=ve(n,l),o=ye(n,r),a=pe(n,l,t);e.watch(l,()=>{var f,c,I,B;if(n.onlySearcher?a.regionsIndexes.value=Array.from(l.value.keys()):a.regionsIndexes.value=a.regionsIndexes.value.filter(C=>t.value.has(C)),d.searcherKey.value===w)return;let i=l.value.keys().next().value;l.value.forEach(C=>{var T,m,u;if(n.onlySearcher&&C.key===d.searcherKey.value){i=d.searcherKey.value;return}if(o.regionIndex.value&&((T=C.regionByIndex)!=null&&T.has(o.regionIndex.value))&&(i=C.key),!n.onlySearcher){let g;i!==void 0&&(g=(m=l.value.get(i))==null?void 0:m.regionByIndex);const y=(u=l.value.get(C.key))==null?void 0:u.regionByIndex;g!=null&&g.has(p)&&!(y!=null&&y.has(p))&&(i=C.key)}}),i!==void 0&&(d.searcherKey.value=i),o.regionIndex.value!==void 0&&!((c=(f=r.value)==null?void 0:f.regionByIndex)!=null&&c.has(o.regionIndex.value))&&(o.regionIndex.value=(B=(I=r.value)==null?void 0:I.regions)==null?void 0:B.keys().next().value)},{immediate:!0});const s=()=>{if(!(d.searcherKey.value===w||d.searcherKey.value===p))return d.searcherKey.value},v=()=>{if(n.onlySearcher||o.regionIndex.value===p)return;let i=o.regionIndex.value;if(n.forFrequency){const f=o.regionIndex.value,c=H(n.forFrequency,{searcher_key:s(),key:f},n.searchers);i=c==null?void 0:c.index}return i},h=()=>{const i=s();if(i!==void 0)return l.value.get(i)};return{selectSearcher:d,selectRegion:o,compare:a,searcherByKey:l,allRegionsIndexes:t,getSearcher:h,getRegion:()=>{var f,c;const i=v();if(i!==void 0)return(c=(f=h())==null?void 0:f.regionByIndex)==null?void 0:c.get(i)}}},ke=e.defineComponent({__name:"selectorRegion",props:e.mergeModels({projectId:{},searchers:{default:()=>[]},modelValue:{},modelValueSingle:{},addCompare:{type:Boolean},forFrequency:{type:Boolean},autoRegion:{type:Boolean},onlySearcher:{type:Boolean},addChanger:{type:Boolean,default:!0},addSearcherIcon:{type:Boolean,default:!0},addRegionIcon:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{},modelValueSingle:{},modelValueSingleModifiers:{}}),emits:["update:modelValue","update:modelValueSingle"],setup(n,{expose:l}){const r=n,t=e.useModel(n,"modelValue"),d=e.useModel(n,"modelValueSingle"),{selectSearcher:o,selectRegion:a,compare:s,searcherByKey:v,allRegionsIndexes:h,getSearcher:k,getRegion:i}=he(r),f=()=>{const c=[];v.value.forEach(I=>{I.enabled&&I.regions.forEach(B=>{B.enabled&&c.push(B)})}),Q.open("selectorRegions",{regions:c,regionsIndexes:s.regionsIndexes.value,"@update:regionsIndexes":I=>s.regionsIndexes.value=I})};return e.watch([a.regionIndex,o.searcherKey,s.regionsIndexes],()=>{if(o.searcherKey.value===w&&s.regionsIndexes.value.length){if(JSON.stringify(t.value)===JSON.stringify(s.regionsIndexes.value))return;t.value=[...s.regionsIndexes.value]}else r.onlySearcher?(t.value=[o.searcherKey.value],o.searcherKey.value===p&&!r.autoRegion&&(t.value.length=0)):(t.value=[a.regionIndex.value],a.regionIndex.value===p&&!r.autoRegion&&(t.value.length=0));!r.onlySearcher&&!h.value.size&&(o.searcherKey.value=p)}),d.value&&e.watch(d,()=>{d.value&&(t.value=[d.value])},{immediate:!0}),e.watch(t,()=>{var c,I,B,C,T;if(t.value[0]&&(d.value=t.value[0]),r.onlySearcher){if(!t.value.length||t.value.length===1&&!v.value.has(t.value[0])||t.value.length===1&&t.value[0]===p&&!r.autoRegion){let m=v.value.keys().next().value;m===p&&!r.autoRegion&&(m=void 0,d.value=p),m!==void 0?t.value=[m]:t.value.length=0;return}if(t.value.length>1&&JSON.stringify(t.value)!==JSON.stringify(s.regionsIndexes.value)){t.value=[...s.regionsIndexes.value];return}}else{let m=[...new Set(t.value)],u=(I=(c=v.value.values().next().value)==null?void 0:c.regionByIndex)==null?void 0:I.keys().next().value;if(r.forFrequency&&(u=(T=(C=(B=v.value.values().next().value)==null?void 0:B.regionByIndex)==null?void 0:C.values().next().value)==null?void 0:T.key),u===p&&!r.autoRegion&&(u=void 0,d.value=p),!m.length)u!==void 0&&m.push(u);else if(m.length===1){let g=h.value;r.forFrequency&&(g=new Set,v.value.forEach(y=>{y.regionByIndex.forEach(S=>{S.index!==R&&S.index!==p&&g.add(S.key)})})),g.has(m[0])||(m=[],u!==void 0&&m.push(u))}else m=m.filter(g=>h.value.has(g)),!m.length&&u!==void 0&&m.push(u);if(JSON.stringify(t.value)!==JSON.stringify(m)){t.value=m;return}}if(!(t.value.length===1&&t.value[0]===(r.onlySearcher?o.searcherKey.value:a.regionIndex.value)))if(r.onlySearcher){if(t.value.length===1){o.searcherKey.value=t.value[0];return}o.searcherKey.value=w;return}else{if(!t.value.length)return;if(t.value.length===1&&o.searcherKey.value!==w){a.regionIndex.value=t.value[0];let m;for(const u of v.value.values()){for(const g of u.regionByIndex.values())if((r.forFrequency?g.key:g.index)===a.regionIndex.value){m=u.key;break}if(m!==void 0)break}m!==void 0&&(o.searcherKey.value=m)}else o.searcherKey.value=w,s.regionsIndexes.value=[...t.value]}},{immediate:!0}),l({getSearcher:k,getRegion:i}),(c,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-selectorRegion":!0,"top-selectorRegion-onlySearcher":c.onlySearcher})},[e.createVNode(x._sfc_main$9,{options:e.unref(o).optionBySearcherKey.value,modelValue:e.unref(o).searcherKey.value,"onUpdate:modelValue":I[0]||(I[0]=B=>e.unref(o).searcherKey.value=B),name:"searcher_key",addChanger:c.addChanger},null,8,["options","modelValue","addChanger"]),!c.onlySearcher&&e.unref(o).searcherKey.value!==e.unref(w)?(e.openBlock(),e.createBlock(x._sfc_main$9,{key:0,class:"top-select-region",options:e.unref(a).optionByRegionIndex.value,modelValue:e.unref(a).regionIndex.value,"onUpdate:modelValue":I[1]||(I[1]=B=>e.unref(a).regionIndex.value=B),name:c.forFrequency?"region_key":"region_index",addChanger:c.addChanger,"data-top-icon":c.addRegionIcon?"":void 0},null,8,["options","modelValue","name","addChanger","data-top-icon"])):e.createCommentVNode("",!0),c.addCompare&&!c.onlySearcher&&e.unref(o).searcherKey.value===e.unref(w)?(e.openBlock(),e.createBlock(x._sfc_main$1,{key:1,name:"compare",onClick:f,"data-count-compare-regions-indexes":e.unref(s).regionsIndexes.value.length},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.$i18n.Common.Selected_regions),1)]),_:1},8,["data-count-compare-regions-indexes"])):e.createCommentVNode("",!0)],2))}}),X=n=>"-"+n,K=n=>n[0]==="-"?n.substring(1):n,O=(n,l)=>{n=K(n);const r=l.find(t=>t.id===n);if(r)return r},Se=(n,l,r)=>{l||(l={id:n.id}),l.id=n.id;const t=ae.TopPopupWorker.genElPopupOpener("div",l);return t.classList.add("top-tagSelector"),n.useTopButton&&t.classList.add("top-button","top-color_theme"),n.mode==="filter"&&t.classList.add("top-tagSelector-filter"),n.mode==="setter"&&!n.filters&&t.classList.add("top-tagSelector-setter_single"),n.mode==="setter"&&n.filters&&t.classList.add("top-tagSelector-setter_several"),t.onclick=d=>{d.preventDefault(),d.stopPropagation(),t.onclick=null;const o=e.ref(n.modelValue),a={model:o,mode:n.mode,targetId:n.targetId,filters:n.filters,payload:n.payload};_.storage(t,"topTagSelectorTarget",a),delete t.dataset.topPopupDisabled,e.isRef(n.modelValue)||e.watch(o,()=>{n.modelValue=o.value,D(t,n,r)}),t.click()},e.isRef(n.modelValue)?e.watch(n.modelValue,()=>D(t,n,r)):_.storage(t,"topTagSelectorRender",d=>{n.modelValue=d;const o=_.storage(t,"topTagSelectorTarget");o&&(o.model.value=d),D(t,n,r)}),D(t,n,r),t},Ie=(n,l)=>{var r;(r=_.storage(n,"topTagSelectorRender"))==null||r(l)},D=(n,l,r)=>{var d;const t=e.unref(l.modelValue);if(n.classList.toggle("top-tagSelector-selectedOne",!t.length||t.length===1),n.classList.toggle("top-tagSelector-toTwoLine",t.length>5),l.mode==="setter"&&l.filters){n.innerHTML=`<div>${r}</div>`;return}if(n.innerHTML="",!t.length&&l.mode==="filter"){const o=Z({id:"all",colorId:"",name:((d=x.useI18n().Common)==null?void 0:d.All_tags)??"",state:""});n.append(o)}t.forEach(o=>{var s,v;const a=Z({id:K(o),colorId:((s=O(o,l.tags))==null?void 0:s.color_id)??"",name:((v=O(o,l.tags))==null?void 0:v.name)??"",state:K(o)===o?"selected":"excluded"});n.append(a)})},Z=n=>{const l=document.createElement("div");return l.classList.add("top-tagSelector_tagIcon"),l.classList.toggle("top-tagSelector-active",!!n.state),l.classList.toggle("top-tagSelector-excluded",n.state==="excluded"),l.dataset.tag_id=n.id,l.dataset.tag_color_id=n.colorId,l.title=n.name,l},xe=[{id:"1",name:"Without Tag",color_id:"1"},{id:"2",name:"Red",color_id:"2"},{id:"3",name:"Orange",color_id:"3"},{id:"4",name:"Yellow",color_id:"4"},{id:"5",name:"Blue",color_id:"5"},{id:"6",name:"Purple",color_id:"6"},{id:"7",name:"Green",color_id:"7"},{id:"8",name:"Magenta",color_id:"8"},{id:"9",name:"Dark blue",color_id:"9"},{id:"10",name:"Turquoise",color_id:"10"}],Ce=["data-tag_id","data-tag_color_id","title"],F=e.defineComponent({__name:"tagIcon",props:{id:{},colorId:{},name:{},state:{}},setup(n){return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tagSelector_tagIcon":!0,"top-tagSelector-active":!!l.state,"top-tagSelector-excluded":l.state==="excluded"}),"data-tag_id":l.id,"data-tag_color_id":l.colorId,title:l.name},null,10,Ce))}}),Be=["contenteditable","onKeydown"],ee=e.defineComponent({__name:"tagPopupListItem",props:e.mergeModels({editable:{type:Boolean},disabled:{type:Boolean},canExclude:{type:Boolean},id:{},colorId:{},name:{},state:{}},{name:{required:!0},nameModifiers:{}}),emits:e.mergeModels(["update:name","unselect","exclude","select"],["update:name"]),setup(n,{emit:l}){const r=n,t=l,d=e.useModel(n,"name"),o=e.ref(null),a=e.computed(()=>navigator.userAgent.indexOf("Firefox")!=-1?{contenteditable:s.value,onpaste:f=>f.preventDefault()}:{}),s=e.ref(!1),v=async()=>{var f;s.value=!0,await e.nextTick(),(f=o.value)==null||f.focus()},h=()=>{var c;const f=(c=o.value)==null?void 0:c.innerText;if(!f)return k();o.value&&(o.value.innerText=f),s.value=!1,t("update:name",f)},k=async()=>{o.value&&(o.value.innerText=r.name),s.value=!1},i=f=>{if(s.value||r.disabled)return;let c="selected";r.canExclude&&(f.ctrlKey||f.metaKey)&&(c="excluded"),r.state==c&&(c=""),c===""&&t("unselect"),c==="selected"&&t("select"),c==="excluded"&&t("exclude")};return(f,c)=>(e.openBlock(),e.createBlock(E._sfc_main$2,{class:e.normalizeClass({"top-tagSelector_tagListItem":!0,"top-tagSelector_tagListItem-inEdit":s.value,"top-tagSelector_tagListItem-disabled":f.disabled,"top-tagSelector_tagListItem-canExclude":f.canExclude,"top-tagSelector-active":!!f.state,"top-tagSelector-excluded":f.state==="excluded"}),onClick:e.withModifiers(i,["stop"])},{default:e.withCtx(()=>[e.createVNode(F,{id:f.id,name:d.value,colorId:f.colorId,state:f.state},null,8,["id","name","colorId","state"]),e.createElementVNode("span",e.mergeProps({ref_key:"elName",ref:o,class:"top-tagSelector_tagListItemName",contenteditable:s.value?"plaintext-only":!1},a.value,{onKeydown:[e.withKeys(e.withModifiers(h,["stop"]),["enter"]),e.withKeys(e.withModifiers(k,["stop"]),["esc"])]}),e.toDisplayString(d.value),17,Be),f.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value?(e.openBlock(),e.createElementBlock("span",{key:1,"data-top-icon":"",class:"top-tagSelector_edit",onClick:e.withModifiers(h,["stop"])})):(e.openBlock(),e.createElementBlock("span",{key:0,"data-top-icon":"",class:"top-tagSelector_edit",onClick:v}))],64)):e.createCommentVNode("",!0)]),_:1},8,["class"]))}}),Ve={key:1},te=e.defineComponent({inheritAttrs:!1,__name:"popupOpener",props:e.mergeModels({modelValue:{},id:{},tags:{},mode:{},targetId:{},filters:{},useTopButton:{type:Boolean},payload:{},styling:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const l=n,r=e.useModel(n,"modelValue"),t=l.useTopButton?x._sfc_main$1:"div",d=l.useTopButton?"html":"default",o={model:r,mode:l.mode,targetId:l.targetId,filters:l.filters,payload:l.payload};return(a,s)=>{const v=e.resolveDirective("top-data");return e.openBlock(),e.createBlock(E._sfc_main$1,{id:a.id},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),e.mergeProps({class:{"top-tagSelector":!0,"top-tagSelector-filter":l.mode==="filter","top-tagSelector-setter_single":l.mode==="setter"&&!a.filters,"top-tagSelector-setter_several":l.mode==="setter"&&a.filters,"top-tagSelector-selectedOne":!r.value.length||r.value.length===1,"top-tagSelector-toTwoLine":r.value.length>5},color:"theme",styling:a.styling},a.$attrs),{[e.unref(d)]:e.withCtx(()=>[!r.value.length&&a.mode==="filter"?(e.openBlock(),e.createBlock(F,{key:0,id:"all",colorId:"",name:a.$i18n.Common.All_tags??"",state:""},null,8,["name"])):e.createCommentVNode("",!0),a.mode==="setter"&&a.filters?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(a.$slots,"default")])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(r.value,h=>{var k,i;return e.openBlock(),e.createBlock(F,{id:e.unref(K)(h),colorId:((k=e.unref(O)(h,a.tags))==null?void 0:k.color_id)??"",name:((i=e.unref(O)(h,a.tags))==null?void 0:i.name)??"",state:e.unref(K)(h)===h?"selected":"excluded"},null,8,["id","colorId","name","state"])}),256))]),_:2},1040,["class","styling"])),[[v,o,"topTagSelectorTarget"]])]),_:3},8,["id"])}}}),Te=e.defineComponent({__name:"tagSelector",props:e.mergeModels({modelValue:{},tags:{},tagsEditable:{type:Boolean},tagsMax:{default:10},id:{},singleMode:{type:Boolean},requiredForSetter:{type:Boolean,default:!0},maxTagsForSetter:{},emitDelay:{default:500},styling:{}},{modelValue:{required:!0},modelModifiers:{},tags:{default:e.reactive(xe)},tagsModifiers:{}}),emits:e.mergeModels(["selector","setter","tagsChanged"],["update:modelValue","update:tags"]),setup(n,{emit:l}){const r=x.useI18n(),t=n,d=e.useModel(n,"modelValue"),o=e.useModel(n,"tags"),a=l,s=x.debounce((u,g)=>{a(u,g)},t.emitDelay);t.singleMode&&!d.value.length&&(d.value=[o.value[0].id]);const v=t.id??"top-popup-id-"+Math.random(),h=e.ref("add"),k=()=>{var y;const u=" "+((y=r.Common.Tags)==null?void 0:y.toLowerCase()),g=new Map;return g.set("add",{value:"add",title:r.Common.Add+u}),g.set("replace",{value:"replace",title:r.Common.Replace+u}),g.set("delete",{value:"delete",title:r.Common.Delete+u}),g};let i=e.shallowRef({model:d,mode:"filter",targetId:void 0,filters:void 0,payload:void 0});e.watch(d,()=>{s("selector",d.value)});const f=e.computed(()=>{if(i.value.mode==="setter"&&t.maxTagsForSetter&&!i.value.filters)return i.value.model.value.length>=t.maxTagsForSetter}),c=u=>{if(u!=="all"){if(i.value.model.value.includes(u))return"selected";if(i.value.model.value.includes(X(u)))return"excluded"}return u==="all"&&!i.value.model.value.length?"selected":""},I=(u,g)=>{const y=X(u);let S=i.value.model.value.filter(M=>M!==u&&M!==y);g==="select"&&S.push(u),g==="exclude"&&S.push(y),i.value.mode==="setter"&&i.value.targetId!==void 0&&t.requiredForSetter&&(S.length||S.push("1"),S.length===2&&i.value.model.value.length===1&&i.value.model.value[0]==="1"&&(S=S.filter(M=>M!=="1"))),t.singleMode&&!i.value.filters&&(S.length||(S=i.value.model.value),S.length>1&&(S=[S[S.length-1]])),S.sort((M,N)=>{if(!t.tags)return 0;const q=t.tags.findIndex(b=>b.id===M),L=t.tags.findIndex(b=>b.id===N);return q-L}),i.value.model.value=S,i.value.mode==="setter"&&i.value.targetId!==void 0&&s("setter",{tagsIds:S,targetId:i.value.targetId,payload:i.value.payload})},B=e.computed(()=>{let u="top-tagSelector_popup";return i.value.mode==="filter"&&(u+=" top-tagSelector_popup-filter"),i.value.mode==="setter"&&(u+=" top-tagSelector_popup-setter"),u}),C=()=>{const u=prompt("","New tag");if(!u||u==="New tag")return;const g=o.value.length+1;o.value.push({id:String(g),name:u,color_id:String((g-1)%10+1)}),a("tagsChanged",o.value)},T=u=>{var g;if(i.value=_.storage(u.elPopupOpener,"topTagSelectorTarget"),!i.value)throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");if(i.value.filters&&(h.value="add",i.value.model.value=[]),!((g=x.Core.$)!=null&&g.ui.sortable)){console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");return}!x.Core.state.isMobile&&!x.Core.state.isMobileUA&&o.value&&$(u.elPopup).sortable({items:'li:has([data-tag_id]:not([data-tag_id="all"]))',cancel:'[contenteditable="plaintext-only"], [contenteditable="true"]',distance:10,stop:function(y,S){if(!o.value)return;const M=$(S.item).parent().find("[data-tag_id]"),N=[];M.each((q,L)=>{if(!o.value)return;const b=$(L).attr("data-tag_id");N.push(b)}),o.value.sort((q,L)=>{const b=N.findIndex(j=>j===q.id),we=N.findIndex(j=>j===L.id);return b-we}),s("tagsChanged",o.value)}})},m=u=>{var g;(g=x.Core.$)!=null&&g.ui.sortable&&$(u.elPopup).data("ui-sortable")&&$(u.elPopup).sortable("destroy")};return(u,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(te,{class:"top-as-selector",modelValue:d.value,"onUpdate:modelValue":g[0]||(g[0]=y=>d.value=y),id:e.unref(v),tags:o.value,styling:u.styling,mode:"filter",useTopButton:""},null,8,["modelValue","id","tags","styling"]),e.createVNode(E._sfc_main,{id:e.unref(v),class:e.normalizeClass(B.value),onOpen:g[4]||(g[4]=y=>T(y)),onClose:g[5]||(g[5]=y=>m(y)),"transition-duration":50},e.createSlots({contentList:e.withCtx(()=>[e.unref(i).mode==="filter"&&!u.singleMode?(e.openBlock(),e.createBlock(ee,{key:0,id:"all",colorId:"",name:u.$i18n.Common.All_tags??"",state:e.unref(i).model.value.length?"":"selected",onSelect:g[3]||(g[3]=y=>e.unref(i).model.value=[])},null,8,["name","state"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,y=>(e.openBlock(),e.createBlock(ee,{key:y.id,id:y.id,colorId:y.color_id,name:y.name,state:c(y.id),canExclude:e.unref(i).mode==="filter"&&!u.singleMode,editable:u.tagsEditable,disabled:f.value&&c(y.id)==="",onUnselect:S=>I(y.id,"unselect"),onSelect:S=>I(y.id,"select"),onExclude:S=>I(y.id,"exclude"),"onUpdate:name":S=>{y.name=S,e.unref(s)("tagsChanged",o.value)}},null,8,["id","colorId","name","state","canExclude","editable","disabled","onUnselect","onSelect","onExclude","onUpdate:name"]))),128)),u.tagsEditable&&o.value.length<u.tagsMax&&o.value.length<20?(e.openBlock(),e.createBlock(E._sfc_main$2,{key:1,"data-top-icon":"",onClick:e.withModifiers(C,["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.$i18n.Common.Add),1)]),_:1})):e.createCommentVNode("",!0)]),_:2},[e.unref(i).mode==="setter"&&e.unref(i).filters?{name:"header",fn:e.withCtx(()=>[e.createVNode(x._sfc_main$9,{modelValue:h.value,"onUpdate:modelValue":g[1]||(g[1]=y=>h.value=y),options:k()},null,8,["modelValue","options"])]),key:"0"}:void 0,e.unref(i).mode==="setter"&&e.unref(i).filters?{name:"footer",fn:e.withCtx(()=>[e.createVNode(x._sfc_main$1,{color:"theme"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.$i18n.Common.Cancel),1)]),_:1}),e.createVNode(x._sfc_main$1,{onClick:g[2]||(g[2]=y=>e.unref(s)("setter",{tagsIds:e.unref(i).model.value,filters:e.unref(i).filters,filtersAction:h.value,payload:e.unref(i).payload}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value==="add"?u.$i18n.Common.Add:"")+" "+e.toDisplayString(h.value==="replace"?u.$i18n.Common.Replace:"")+" "+e.toDisplayString(h.value==="delete"?u.$i18n.Common.Remove:""),1)]),_:1})]),key:"1"}:void 0]),1032,["id","class"])],64))}});V.TopSelectorCompetitors=de,V.TopSelectorRegion=ke,V.TopTagSelector=Te,V.TopTagSelectorPopupOpener=te,V.TopTagSelectorTagIcon=F,V.dialogSelectorRegions=Q,V.findRegion=H,V.genElTopTagSelectorPopupOpener=Se,V.genSearcherByKey=z,V.renderElTopTagSelectorPopupOpener=Ie,V.useItemsFromCompetitors=ue,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
1
+ define(["require","exports","vue","../.chunks/forms-BfDSGwrU.amd","../.chunks/listItem.vue_vue_type_script_setup_true_lang-R7J0Cawj.amd","../.chunks/menu.vue_vue_type_style_index_0_lang-JZ-QwyLO.amd","../.chunks/utils-KMSovZjd.amd","../utils/searchers.amd","../utils/dom.amd","../popup/worker.amd","../require/css.amd!../assets/project.css"],(function(ne,V,e,x,E,oe,le,P,_,ae){"use strict";if(typeof e>"u")var e=window.Vue;const re={class:"top-selectorCompetitors"},ie={class:"top-ellipsis1"},de=e.defineComponent({__name:"selectorCompetitors",props:e.mergeModels({modelValue:{},items:{},showSelectAllItem:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const l=n,r=e.useModel(n,"modelValue"),t=e.computed(()=>{if(l.showSelectAllItem)return{icon:"",title:x.useI18n().Common.Select_all,value:"all",content:""}});return(d,o)=>(e.openBlock(),e.createElementBlock("div",re,[e.unref(x.Core).state.isMobile?(e.openBlock(),e.createBlock(E._sfc_main,{key:0},{opener:e.withCtx(()=>[e.createVNode(x._sfc_main$1,{class:"top-selectorCompetitors_opener",color:"theme",icon:"",icon2:""},{default:e.withCtx(()=>{var a;return[e.createTextVNode(e.toDisplayString((a=d.items.find(s=>{var v;return s.value===((v=r.value)==null?void 0:v[0])}))==null?void 0:a.content),1)]}),_:1})]),contentList:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,a=>{var s;return e.openBlock(),e.createBlock(E._sfc_main$2,{class:e.normalizeClass({"top-active":(s=r.value)==null?void 0:s.includes(a.value)}),"data-top-icon":a.icon,title:a.title,onClick:()=>r.value=[a.value]},{default:e.withCtx(()=>[e.createElementVNode("span",ie,e.toDisplayString(a.content),1)]),_:2},1032,["class","data-top-icon","title","onClick"])}),256))]),_:1})):(e.openBlock(),e.createBlock(oe._sfc_main,{key:1,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value=a),items:d.items,isMultiple:!0,styling:"bar",canBeEmptyMultiple:!1,selectAllItem:t.value},null,8,["modelValue","items","selectAllItem"]))]))}}),ue=(n,l)=>e.computed(()=>e.toValue(n).filter(d=>d.on>=0||d.id===l).map(d=>({value:d.id,title:d.url+` [${d.id}]`,icon:d.id===e.toValue(l)?"":"",content:d.name}))),w=-1,p=-2,R=-1,se={0:"Yandex",1:"Google",4:"YouTube",5:"Bing",7:"Seznam",8:"AppStore",9:"GoogleStore",20:"Yandex.com",21:"Yandex.com.tr"},J={key:p,name:"--",index:p},G={key:p,name:"--",regions:[J],regionByIndex:new Map([[p,J]])},A={key:p,name:"Autoselect",index:p},U={key:p,name:"Autoselect",regions:[A],regionByIndex:new Map([[p,A]])},Y={countryCode:"00",depth:1,device:0,key:R,index:R,lang:"ru",name:"Without region"},ce=()=>(A.name=x.useI18n().Common.Autoselect,A),ge=()=>(ce(),U.name=x.useI18n().Common.Autoselect,console.log(U),U),me=()=>(Y.name=x.useI18n().Keywords.Without_region,Y),z=(n=!1,l=!1,r=[])=>{let t;return n?t=fe(r):t=W(r),l&&t.set(p,ge()),t.size||t.set(p,G),t},W=(n,l=!0,r=[],t=!1)=>{const d=new Map;return n.forEach(o=>{if(!o.enabled||t&&typeof o.key=="number"&&o.key>1)return;const a={...o};a.regionByIndex=new Map,o.regions&&o.regions.forEach(s=>{if(l&&!s.enabled)return;const v={...s};a.regionByIndex.set(v.index,v)}),!a.regionByIndex.size&&r.length,(!o.regions||a.regionByIndex.size||r.length)&&typeof a.key=="number"&&d.set(a.key,a)}),r.forEach(o=>{if(d.has(o))return;const a={key:o,name:se[o],regions:[],regionByIndex:new Map};d.set(a.key,a)}),d},fe=n=>{const l=W(n,!1,[0,1],!0);if(l.has(2)){const r=l.get(2);r&&(r.regionByIndex=new Map)}return l.forEach(r=>{if(!r.regionByIndex)return;const t={...me()};r.regionByIndex.set(t.index,t)}),l},H=(n,l,r=[])=>{const t=z(n,!1,r);let d;return t.forEach(o=>{if(!(l.searcher_key!==void 0&&l.searcher_key!=o.key)&&o.regions&&(o.regions.forEach(a=>{if(!d&&!(l.key!==void 0&&l.key!=a.key)&&!(l.index!==void 0&&l.index!=a.index)&&!(!n&&(l.lang!==void 0&&l.lang!=a.lang||l.device!==void 0&&l.device!=a.device)))return a.searcher_key=o.key,d=a,!1}),d))return!1}),d},Q=le.useAsyncTopDialog(()=>new Promise((n,l)=>ne(["../.chunks/dialog_selectorRegions-Coyq9vN8.amd"],n,l))),ve=(n,l)=>{const r=x.useI18n(),t=e.ref(l.value.keys().next().value??p),d=e.computed(()=>{const o=new Map;if(l.value.forEach(a=>{let s={value:a.key,title:a.name};n.addSearcherIcon&&(s.icon=P.getSearcherGIcon(a.key)),o.set(a.key,s)}),n.addCompare&&!o.has(p)){const a={value:"",title:"--------------------",disabled:!0};o.set(a.value,a);const s={value:w,title:r.Common.Compare};o.set(s.value,s)}return o});return{searcherKey:t,optionBySearcherKey:d}},ye=(n,l)=>{var o,a,s;const r=x.useI18n(),t=e.ref(p);n.modelValue.length===1&&(t.value=n.modelValue[0]),t.value===p&&(n.forFrequency?t.value=((a=(o=l.value)==null?void 0:o.regionByIndex.values().next().value)==null?void 0:a.key)??p:t.value=((s=l.value)==null?void 0:s.regionByIndex.keys().next().value)??p);const d=e.computed(()=>{var h;const v=new Map;return(h=l.value.regionByIndex)==null||h.forEach(k=>{let i=k.name;if(n.forFrequency){const I={value:k.key,title:i};v.has(k.key)||v.set(k.key,I);return}k.device&&(i+=" ("+r.Common["Device_"+k.device]+")");const m=P.getLangLabel(l.value.key||0,k.lang??"");m&&(i+=" / "+m);const c={value:k.index,title:i,icon:k.device?P.getDeviceGIcon(k.device):void 0};v.set(k.index,c)}),v});return e.watch(d,(v,h)=>{var c;if(n.onlySearcher||t.value!==void 0&&v.get(t.value))return;let k=v.keys().next().value;if(t.value===p||k===p){t.value=k;return}let i=((c=h==null?void 0:h.get(t.value))==null?void 0:c.title)||"",m=-1;for(const[I,B]of v.entries()){const C=B.title;if(typeof C!="string"||typeof I=="string")break;if(C===i){k=I;break}const T=new RegExp(` \\((${r.Common.Device_1}|${r.Common.Device_2})\\)`);let f=i,u=3;C.indexOf(f)===-1&&(f=i.replace(/^[^a-zа-я]/i,"").replace(T,""),u--),C.indexOf(f)===-1&&(f=i.replace(/ \/.*/,""),u--),C.indexOf(f)===-1&&(f=i.replace(/ \/.*/,""),f=f.replace(/^[^a-zа-я]/i,"").replace(T,""),u--),C.indexOf(f)!==-1&&(u<=m||(m=u,k=I))}t.value=k}),{regionIndex:t,optionByRegionIndex:d}},pe=(n,l,r)=>{const t=e.ref([]),d=()=>{if(n.onlySearcher&&l.value){t.value=Array.from(l.value.keys());return}let a=[];if(n.modelValue.length>1)a=[...n.modelValue];else try{a=JSON.parse(localStorage.getItem("ui:project:regionSelector"+n.projectId+":regionsIndexes"))??[]}catch{}a.length&&(a=a.filter(s=>r.value.has(s))),a.length||(a=Array.from(r.value)),t.value=[...a]},o=()=>{t.value.length?localStorage.setItem("ui:project:regionSelector:"+n.projectId+":regionsIndexes",JSON.stringify(t.value)):localStorage.removeItem("ui:project:regionSelector:"+n.projectId+":regionsIndexes")};return e.watch(t,()=>{o()}),n.addCompare&&d(),{regionsIndexes:t}},he=n=>{const l=e.computed(()=>z(n.forFrequency,n.autoRegion,n.searchers)),r=e.computed(()=>l.value.get(d.searcherKey.value)||G),t=e.computed(()=>{const i=new Set;return l.value.forEach(m=>{m.regionByIndex.forEach(c=>{c.index!==R&&c.index!==p&&i.add(c.index)})}),i}),d=ve(n,l),o=ye(n,r),a=pe(n,l,t);e.watch(l,()=>{var m,c,I,B;if(n.onlySearcher?a.regionsIndexes.value=Array.from(l.value.keys()):a.regionsIndexes.value=a.regionsIndexes.value.filter(C=>t.value.has(C)),d.searcherKey.value===w)return;let i=l.value.keys().next().value;l.value.forEach(C=>{var T,f,u;if(n.onlySearcher&&C.key===d.searcherKey.value){i=d.searcherKey.value;return}if(o.regionIndex.value&&((T=C.regionByIndex)!=null&&T.has(o.regionIndex.value))&&(i=C.key),!n.onlySearcher){let g;i!==void 0&&(g=(f=l.value.get(i))==null?void 0:f.regionByIndex);const y=(u=l.value.get(C.key))==null?void 0:u.regionByIndex;g!=null&&g.has(p)&&!(y!=null&&y.has(p))&&(i=C.key)}}),i!==void 0&&(d.searcherKey.value=i),o.regionIndex.value!==void 0&&!((c=(m=r.value)==null?void 0:m.regionByIndex)!=null&&c.has(o.regionIndex.value))&&(o.regionIndex.value=(B=(I=r.value)==null?void 0:I.regions)==null?void 0:B.keys().next().value)},{immediate:!0});const s=()=>{if(!(d.searcherKey.value===w||d.searcherKey.value===p))return d.searcherKey.value},v=()=>{if(n.onlySearcher||o.regionIndex.value===p)return;let i=o.regionIndex.value;if(n.forFrequency){const m=o.regionIndex.value,c=H(n.forFrequency,{searcher_key:s(),key:m},n.searchers);i=c==null?void 0:c.index}return i},h=()=>{const i=s();if(i!==void 0)return l.value.get(i)};return{selectSearcher:d,selectRegion:o,compare:a,searcherByKey:l,allRegionsIndexes:t,getSearcher:h,getRegion:()=>{var m,c;const i=v();if(i!==void 0)return(c=(m=h())==null?void 0:m.regionByIndex)==null?void 0:c.get(i)}}},ke=e.defineComponent({__name:"selectorRegion",props:e.mergeModels({projectId:{},searchers:{default:()=>[]},modelValue:{},modelValueSingle:{},addCompare:{type:Boolean},forFrequency:{type:Boolean},autoRegion:{type:Boolean},onlySearcher:{type:Boolean},addChanger:{type:Boolean,default:!0},addSearcherIcon:{type:Boolean,default:!0},addRegionIcon:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{},modelValueSingle:{},modelValueSingleModifiers:{}}),emits:["update:modelValue","update:modelValueSingle"],setup(n,{expose:l}){const r=n,t=e.useModel(n,"modelValue"),d=e.useModel(n,"modelValueSingle"),{selectSearcher:o,selectRegion:a,compare:s,searcherByKey:v,allRegionsIndexes:h,getSearcher:k,getRegion:i}=he(r),m=()=>{const c=[];v.value.forEach(I=>{I.enabled&&I.regions.forEach(B=>{B.enabled&&c.push(B)})}),Q.open("selectorRegions",{regions:c,regionsIndexes:s.regionsIndexes.value,"@update:regionsIndexes":I=>s.regionsIndexes.value=I})};return e.watch([a.regionIndex,o.searcherKey,s.regionsIndexes],()=>{if(o.searcherKey.value===w&&s.regionsIndexes.value.length){if(JSON.stringify(t.value)===JSON.stringify(s.regionsIndexes.value))return;t.value=[...s.regionsIndexes.value]}else r.onlySearcher?(t.value=[o.searcherKey.value],o.searcherKey.value===p&&!r.autoRegion&&(t.value.length=0)):(t.value=[a.regionIndex.value],a.regionIndex.value===p&&!r.autoRegion&&(t.value.length=0));!r.onlySearcher&&!h.value.size&&(o.searcherKey.value=p)}),d.value&&e.watch(d,()=>{d.value&&(t.value=[d.value])},{immediate:!0}),e.watch(t,()=>{var c,I,B,C,T;if(t.value[0]&&(d.value=t.value[0]),r.onlySearcher){if(!t.value.length||t.value.length===1&&!v.value.has(t.value[0])||t.value.length===1&&t.value[0]===p&&!r.autoRegion){let f=v.value.keys().next().value;f===p&&!r.autoRegion&&(f=void 0,d.value=p),f!==void 0?t.value=[f]:t.value.length=0;return}if(t.value.length>1&&JSON.stringify(t.value)!==JSON.stringify(s.regionsIndexes.value)){t.value=[...s.regionsIndexes.value];return}}else{let f=[...new Set(t.value)],u=(I=(c=v.value.values().next().value)==null?void 0:c.regionByIndex)==null?void 0:I.keys().next().value;if(r.forFrequency&&(u=(T=(C=(B=v.value.values().next().value)==null?void 0:B.regionByIndex)==null?void 0:C.values().next().value)==null?void 0:T.key),u===p&&!r.autoRegion&&(u=void 0,d.value=p),!f.length)u!==void 0&&f.push(u);else if(f.length===1){let g=h.value;r.forFrequency&&(g=new Set,v.value.forEach(y=>{y.regionByIndex.forEach(S=>{S.index!==R&&S.index!==p&&g.add(S.key)})})),g.has(f[0])||(f=[],u!==void 0&&f.push(u))}else f=f.filter(g=>h.value.has(g)),!f.length&&u!==void 0&&f.push(u);if(JSON.stringify(t.value)!==JSON.stringify(f)){t.value=f;return}}if(!(t.value.length===1&&t.value[0]===(r.onlySearcher?o.searcherKey.value:a.regionIndex.value)))if(r.onlySearcher){if(t.value.length===1){o.searcherKey.value=t.value[0];return}o.searcherKey.value=w;return}else{if(!t.value.length)return;if(t.value.length===1&&o.searcherKey.value!==w){a.regionIndex.value=t.value[0];let f;for(const u of v.value.values()){for(const g of u.regionByIndex.values())if((r.forFrequency?g.key:g.index)===a.regionIndex.value){f=u.key;break}if(f!==void 0)break}f!==void 0&&(o.searcherKey.value=f)}else o.searcherKey.value=w,s.regionsIndexes.value=[...t.value]}},{immediate:!0}),l({getSearcher:k,getRegion:i}),(c,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-selectorRegion":!0,"top-selectorRegion-onlySearcher":c.onlySearcher})},[e.createVNode(x._sfc_main$9,{options:e.unref(o).optionBySearcherKey.value,modelValue:e.unref(o).searcherKey.value,"onUpdate:modelValue":I[0]||(I[0]=B=>e.unref(o).searcherKey.value=B),name:"searcher_key",addChanger:c.addChanger},null,8,["options","modelValue","addChanger"]),!c.onlySearcher&&e.unref(o).searcherKey.value!==e.unref(w)?(e.openBlock(),e.createBlock(x._sfc_main$9,{key:0,class:"top-select-region",options:e.unref(a).optionByRegionIndex.value,modelValue:e.unref(a).regionIndex.value,"onUpdate:modelValue":I[1]||(I[1]=B=>e.unref(a).regionIndex.value=B),name:c.forFrequency?"region_key":"region_index",addChanger:c.addChanger,"data-top-icon":c.addRegionIcon?"":void 0},null,8,["options","modelValue","name","addChanger","data-top-icon"])):e.createCommentVNode("",!0),c.addCompare&&!c.onlySearcher&&e.unref(o).searcherKey.value===e.unref(w)?(e.openBlock(),e.createBlock(x._sfc_main$1,{key:1,name:"compare",onClick:m,"data-count-compare-regions-indexes":e.unref(s).regionsIndexes.value.length},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.$i18n.Common.Selected_regions),1)]),_:1},8,["data-count-compare-regions-indexes"])):e.createCommentVNode("",!0)],2))}}),X=n=>"-"+n,K=n=>n[0]==="-"?n.substring(1):n,O=(n,l)=>{n=K(n);const r=l.find(t=>t.id===n);if(r)return r},Se=(n,l,r)=>{l||(l={id:n.id}),l.id=n.id;const t=ae.TopPopupWorker.genElPopupOpener("div",l);return t.classList.add("top-tagSelector"),n.useTopButton&&t.classList.add("top-button","top-color_theme"),n.mode==="filter"&&t.classList.add("top-tagSelector-filter"),n.mode==="setter"&&!n.filters&&t.classList.add("top-tagSelector-setter_single"),n.mode==="setter"&&n.filters&&t.classList.add("top-tagSelector-setter_several"),t.onclick=d=>{d.preventDefault(),d.stopPropagation(),t.onclick=null;const o=e.ref(n.modelValue),a={model:o,mode:n.mode,targetId:n.targetId,filters:n.filters,payload:n.payload};_.storage(t,"topTagSelectorTarget",a),delete t.dataset.topPopupDisabled,e.isRef(n.modelValue)||e.watch(o,()=>{n.modelValue=o.value,D(t,n,r)}),t.click()},e.isRef(n.modelValue)?e.watch(n.modelValue,()=>D(t,n,r)):_.storage(t,"topTagSelectorRender",d=>{n.modelValue=d;const o=_.storage(t,"topTagSelectorTarget");o&&(o.model.value=d),D(t,n,r)}),D(t,n,r),t},Ie=(n,l)=>{var r;(r=_.storage(n,"topTagSelectorRender"))==null||r(l)},D=(n,l,r)=>{var d;const t=e.unref(l.modelValue);if(n.classList.toggle("top-tagSelector-selectedOne",!t.length||t.length===1),n.classList.toggle("top-tagSelector-toTwoLine",t.length>5),l.mode==="setter"&&l.filters){n.innerHTML=`<div>${r}</div>`;return}if(n.innerHTML="",!t.length&&l.mode==="filter"){const o=Z({id:"all",colorId:"",name:((d=x.useI18n().Common)==null?void 0:d.All_tags)??"",state:""});n.append(o)}t.forEach(o=>{var s,v;const a=Z({id:K(o),colorId:((s=O(o,l.tags))==null?void 0:s.color_id)??"",name:((v=O(o,l.tags))==null?void 0:v.name)??"",state:K(o)===o?"selected":"excluded"});n.append(a)})},Z=n=>{const l=document.createElement("div");return l.classList.add("top-tagSelector_tagIcon"),l.classList.toggle("top-tagSelector-active",!!n.state),l.classList.toggle("top-tagSelector-excluded",n.state==="excluded"),l.dataset.tag_id=n.id,l.dataset.tag_color_id=n.colorId,l.title=n.name,l},xe=[{id:"1",name:"Without Tag",color_id:"1"},{id:"2",name:"Red",color_id:"2"},{id:"3",name:"Orange",color_id:"3"},{id:"4",name:"Yellow",color_id:"4"},{id:"5",name:"Blue",color_id:"5"},{id:"6",name:"Purple",color_id:"6"},{id:"7",name:"Green",color_id:"7"},{id:"8",name:"Magenta",color_id:"8"},{id:"9",name:"Dark blue",color_id:"9"},{id:"10",name:"Turquoise",color_id:"10"}],Ce=["data-tag_id","data-tag_color_id","title"],F=e.defineComponent({__name:"tagIcon",props:{id:{},colorId:{},name:{},state:{}},setup(n){return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tagSelector_tagIcon":!0,"top-tagSelector-active":!!l.state,"top-tagSelector-excluded":l.state==="excluded"}),"data-tag_id":l.id,"data-tag_color_id":l.colorId,title:l.name},null,10,Ce))}}),Be=["contenteditable","onKeydown"],ee=e.defineComponent({__name:"tagPopupListItem",props:e.mergeModels({editable:{type:Boolean},disabled:{type:Boolean},canExclude:{type:Boolean},id:{},colorId:{},name:{},state:{}},{name:{required:!0},nameModifiers:{}}),emits:e.mergeModels(["update:name","unselect","exclude","select"],["update:name"]),setup(n,{emit:l}){const r=n,t=l,d=e.useModel(n,"name"),o=e.ref(null),a=e.computed(()=>navigator.userAgent.indexOf("Firefox")!=-1?{contenteditable:s.value,onpaste:m=>m.preventDefault()}:{}),s=e.ref(!1),v=async()=>{var m;s.value=!0,await e.nextTick(),(m=o.value)==null||m.focus()},h=()=>{var c;const m=(c=o.value)==null?void 0:c.innerText;if(!m)return k();o.value&&(o.value.innerText=m),s.value=!1,t("update:name",m)},k=async()=>{o.value&&(o.value.innerText=r.name),s.value=!1},i=m=>{if(s.value||r.disabled)return;let c="selected";r.canExclude&&(m.ctrlKey||m.metaKey)&&(c="excluded"),r.state==c&&(c=""),c===""&&t("unselect"),c==="selected"&&t("select"),c==="excluded"&&t("exclude")};return(m,c)=>(e.openBlock(),e.createBlock(E._sfc_main$2,{class:e.normalizeClass({"top-tagSelector_tagListItem":!0,"top-tagSelector_tagListItem-inEdit":s.value,"top-tagSelector_tagListItem-disabled":m.disabled,"top-tagSelector_tagListItem-canExclude":m.canExclude,"top-tagSelector-active":!!m.state,"top-tagSelector-excluded":m.state==="excluded"}),onClick:e.withModifiers(i,["stop"])},{default:e.withCtx(()=>[e.createVNode(F,{id:m.id,name:d.value,colorId:m.colorId,state:m.state},null,8,["id","name","colorId","state"]),e.createElementVNode("span",e.mergeProps({ref_key:"elName",ref:o,class:"top-tagSelector_tagListItemName",contenteditable:s.value?"plaintext-only":!1},a.value,{onKeydown:[e.withKeys(e.withModifiers(h,["stop"]),["enter"]),e.withKeys(e.withModifiers(k,["stop"]),["esc"])]}),e.toDisplayString(d.value),17,Be),m.editable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value?(e.openBlock(),e.createElementBlock("span",{key:1,"data-top-icon":"",class:"top-tagSelector_edit",onClick:e.withModifiers(h,["stop"])})):(e.openBlock(),e.createElementBlock("span",{key:0,"data-top-icon":"",class:"top-tagSelector_edit",onClick:v}))],64)):e.createCommentVNode("",!0)]),_:1},8,["class"]))}}),Ve={key:1},te=e.defineComponent({inheritAttrs:!1,__name:"popupOpener",props:e.mergeModels({modelValue:{},id:{},tags:{},mode:{},targetId:{},filters:{},useTopButton:{type:Boolean},payload:{},styling:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const l=n,r=e.useModel(n,"modelValue"),t=l.useTopButton?x._sfc_main$1:"div",d=l.useTopButton?"html":"default",o={model:r,mode:l.mode,targetId:l.targetId,filters:l.filters,payload:l.payload};return(a,s)=>{const v=e.resolveDirective("top-data");return e.openBlock(),e.createBlock(E._sfc_main$1,{id:a.id},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),e.mergeProps({class:{"top-tagSelector":!0,"top-tagSelector-filter":l.mode==="filter","top-tagSelector-setter_single":l.mode==="setter"&&!a.filters,"top-tagSelector-setter_several":l.mode==="setter"&&a.filters,"top-tagSelector-selectedOne":!r.value.length||r.value.length===1,"top-tagSelector-toTwoLine":r.value.length>5},color:"theme",styling:a.styling},a.$attrs),{[e.unref(d)]:e.withCtx(()=>[!r.value.length&&a.mode==="filter"?(e.openBlock(),e.createBlock(F,{key:0,id:"all",colorId:"",name:a.$i18n.Common.All_tags??"",state:""},null,8,["name"])):e.createCommentVNode("",!0),a.mode==="setter"&&a.filters?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(a.$slots,"default")])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(r.value,h=>{var k,i;return e.openBlock(),e.createBlock(F,{id:e.unref(K)(h),colorId:((k=e.unref(O)(h,a.tags))==null?void 0:k.color_id)??"",name:((i=e.unref(O)(h,a.tags))==null?void 0:i.name)??"",state:e.unref(K)(h)===h?"selected":"excluded"},null,8,["id","colorId","name","state"])}),256))]),_:2},1040,["class","styling"])),[[v,o,"topTagSelectorTarget"]])]),_:3},8,["id"])}}}),Te=e.defineComponent({__name:"tagSelector",props:e.mergeModels({modelValue:{},tags:{},tagsEditable:{type:Boolean},tagsMax:{default:10},id:{},singleMode:{type:Boolean},requiredForSetter:{type:Boolean,default:!0},maxTagsForSetter:{},emitDelay:{default:500},styling:{}},{modelValue:{required:!0},modelModifiers:{},tags:{default:e.reactive(xe)},tagsModifiers:{}}),emits:e.mergeModels(["selector","setter","tagsChanged"],["update:modelValue","update:tags"]),setup(n,{emit:l}){const r=x.useI18n(),t=n,d=e.useModel(n,"modelValue"),o=e.useModel(n,"tags"),a=l,s=x.debounce((u,g)=>{a(u,g)},t.emitDelay);t.singleMode&&!d.value.length&&(d.value=[o.value[0].id]);const v=t.id??"top-popup-id-"+Math.random(),h=e.ref("add"),k=()=>{var y;const u=" "+((y=r.Common.Tags)==null?void 0:y.toLowerCase()),g=new Map;return g.set("add",{value:"add",title:r.Common.Add+u}),g.set("replace",{value:"replace",title:r.Common.Replace+u}),g.set("delete",{value:"delete",title:r.Common.Delete+u}),g};let i=e.shallowRef({model:d,mode:"filter",targetId:void 0,filters:void 0,payload:void 0});e.watch(d,()=>{s("selector",d.value)});const m=e.computed(()=>{if(i.value.mode==="setter"&&t.maxTagsForSetter&&!i.value.filters)return i.value.model.value.length>=t.maxTagsForSetter}),c=u=>{if(u!=="all"){if(i.value.model.value.includes(u))return"selected";if(i.value.model.value.includes(X(u)))return"excluded"}return u==="all"&&!i.value.model.value.length?"selected":""},I=(u,g)=>{const y=X(u);let S=i.value.model.value.filter(M=>M!==u&&M!==y);g==="select"&&S.push(u),g==="exclude"&&S.push(y),i.value.mode==="setter"&&i.value.targetId!==void 0&&t.requiredForSetter&&(S.length||S.push("1"),S.length===2&&i.value.model.value.length===1&&i.value.model.value[0]==="1"&&(S=S.filter(M=>M!=="1"))),t.singleMode&&!i.value.filters&&(S.length||(S=i.value.model.value),S.length>1&&(S=[S[S.length-1]])),S.sort((M,N)=>{if(!t.tags)return 0;const q=t.tags.findIndex(b=>b.id===M),L=t.tags.findIndex(b=>b.id===N);return q-L}),i.value.model.value=S,i.value.mode==="setter"&&i.value.targetId!==void 0&&s("setter",{tagsIds:S,targetId:i.value.targetId,payload:i.value.payload})},B=e.computed(()=>{let u="top-tagSelector_popup";return i.value.mode==="filter"&&(u+=" top-tagSelector_popup-filter"),i.value.mode==="setter"&&(u+=" top-tagSelector_popup-setter"),u}),C=()=>{const u=prompt("","New tag");if(!u||u==="New tag")return;const g=o.value.length+1;o.value.push({id:String(g),name:u,color_id:String((g-1)%10+1)}),a("tagsChanged",o.value)},T=u=>{var g;if(i.value=_.storage(u.elPopupOpener,"topTagSelectorTarget"),!i.value)throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");if(i.value.filters&&(h.value="add",i.value.model.value=[]),!((g=x.Core.$)!=null&&g.ui.sortable)){console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");return}!x.Core.state.isMobile&&!x.Core.state.isMobileUA&&o.value&&$(u.elPopup).sortable({items:'li:has([data-tag_id]:not([data-tag_id="all"]))',cancel:'[contenteditable="plaintext-only"], [contenteditable="true"]',distance:10,stop:function(y,S){if(!o.value)return;const M=$(S.item).parent().find("[data-tag_id]"),N=[];M.each((q,L)=>{if(!o.value)return;const b=$(L).attr("data-tag_id");N.push(b)}),o.value.sort((q,L)=>{const b=N.findIndex(j=>j===q.id),we=N.findIndex(j=>j===L.id);return b-we}),s("tagsChanged",o.value)}})},f=u=>{var g;(g=x.Core.$)!=null&&g.ui.sortable&&$(u.elPopup).data("ui-sortable")&&$(u.elPopup).sortable("destroy")};return(u,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(te,{class:"top-as-selector",modelValue:d.value,"onUpdate:modelValue":g[0]||(g[0]=y=>d.value=y),id:e.unref(v),tags:o.value,styling:u.styling,mode:"filter",useTopButton:""},null,8,["modelValue","id","tags","styling"]),e.createVNode(E._sfc_main,{id:e.unref(v),class:e.normalizeClass(B.value),onOpen:g[4]||(g[4]=y=>T(y)),onClose:g[5]||(g[5]=y=>f(y)),"transition-duration":50},e.createSlots({contentList:e.withCtx(()=>[e.unref(i).mode==="filter"&&!u.singleMode?(e.openBlock(),e.createBlock(ee,{key:0,id:"all",colorId:"",name:u.$i18n.Common.All_tags??"",state:e.unref(i).model.value.length?"":"selected",onSelect:g[3]||(g[3]=y=>e.unref(i).model.value=[])},null,8,["name","state"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,y=>(e.openBlock(),e.createBlock(ee,{key:y.id,id:y.id,colorId:y.color_id,name:y.name,state:c(y.id),canExclude:e.unref(i).mode==="filter"&&!u.singleMode,editable:u.tagsEditable,disabled:m.value&&c(y.id)==="",onUnselect:S=>I(y.id,"unselect"),onSelect:S=>I(y.id,"select"),onExclude:S=>I(y.id,"exclude"),"onUpdate:name":S=>{y.name=S,e.unref(s)("tagsChanged",o.value)}},null,8,["id","colorId","name","state","canExclude","editable","disabled","onUnselect","onSelect","onExclude","onUpdate:name"]))),128)),u.tagsEditable&&o.value.length<u.tagsMax&&o.value.length<20?(e.openBlock(),e.createBlock(E._sfc_main$2,{key:1,"data-top-icon":"",onClick:e.withModifiers(C,["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.$i18n.Common.Add),1)]),_:1})):e.createCommentVNode("",!0)]),_:2},[e.unref(i).mode==="setter"&&e.unref(i).filters?{name:"header",fn:e.withCtx(()=>[e.createVNode(x._sfc_main$9,{modelValue:h.value,"onUpdate:modelValue":g[1]||(g[1]=y=>h.value=y),options:k()},null,8,["modelValue","options"])]),key:"0"}:void 0,e.unref(i).mode==="setter"&&e.unref(i).filters?{name:"footer",fn:e.withCtx(()=>[e.createVNode(x._sfc_main$1,{color:"theme"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.$i18n.Common.Cancel),1)]),_:1}),e.createVNode(x._sfc_main$1,{onClick:g[2]||(g[2]=y=>e.unref(s)("setter",{tagsIds:e.unref(i).model.value,filters:e.unref(i).filters,filtersAction:h.value,payload:e.unref(i).payload}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value==="add"?u.$i18n.Common.Add:"")+" "+e.toDisplayString(h.value==="replace"?u.$i18n.Common.Replace:"")+" "+e.toDisplayString(h.value==="delete"?u.$i18n.Common.Remove:""),1)]),_:1})]),key:"1"}:void 0]),1032,["id","class"])],64))}});V.TopSelectorCompetitors=de,V.TopSelectorRegion=ke,V.TopTagSelector=Te,V.TopTagSelectorPopupOpener=te,V.TopTagSelectorTagIcon=F,V.dialogSelectorRegions=Q,V.findRegion=H,V.genElTopTagSelectorPopupOpener=Se,V.genSearcherByKey=z,V.renderElTopTagSelectorPopupOpener=Ie,V.useItemsFromCompetitors=ue,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=project.amd.js.map
@@ -3,7 +3,7 @@ import { defineComponent as P, mergeModels as N, useModel as D, computed as E, c
3
3
  import { u as R, C as J, c as H, o as re, d as Ae } from "../.chunks/forms-BWoAyEVH.es.js";
4
4
  import { _ as Ie, b as ue, a as Re } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js";
5
5
  import { _ as Oe } from "../.chunks/menu.vue_vue_type_style_index_0_lang-HDPVVgzy.es.js";
6
- import { u as Ne } from "../.chunks/utils-CdePhhIZ.es.js";
6
+ import { u as Ne } from "../.chunks/utils-avtpaWJ6.es.js";
7
7
  import { getSearcherGIcon as De, getLangLabel as Fe, getDeviceGIcon as qe } from "../utils/searchers.js";
8
8
  import { storage as W } from "../utils/dom.js";
9
9
  import { TopPopupWorker as Pe } from "../popup/worker.js";
@@ -170,7 +170,7 @@ const Ue = { class: "top-selectorCompetitors" }, je = { class: "top-ellipsis1" }
170
170
  }), i))
171
171
  return !1;
172
172
  }), i;
173
- }, Qe = Ne(() => import("../.chunks/dialog_selectorRegions-eFMZwckA.es.js")), Xe = (t, l) => {
173
+ }, Qe = Ne(() => import("../.chunks/dialog_selectorRegions-DL8hn_CE.es.js")), Xe = (t, l) => {
174
174
  const o = R(), e = F(l.value.keys().next().value ?? p), i = E(() => {
175
175
  const a = /* @__PURE__ */ new Map();
176
176
  if (l.value.forEach((n) => {
@@ -1,8 +1,5 @@
1
1
  import { Size } from '../../../forms/helpers';
2
2
  export interface Props {
3
- /**
4
- * test
5
- */
6
3
  modelValue: Item['value'] | Item['value'][];
7
4
  items: Item[];
8
5
  size?: Size;
@@ -2,6 +2,7 @@ export { default as TopPopup } from './popup/popup.vue';
2
2
  export { default as TopPopupOpener } from './popup/opener.vue';
3
3
  export { default as TopPopupListItem } from './popup/listItem.vue';
4
4
  export { default as TopPopupWidgetInput } from './popup/widgetInput.vue';
5
- export { default as TopPopupAlert } from './alert/alert.vue';
6
- export { default as TopPopupConfirm } from './confirm/confirm.vue';
7
- export { default as TopPopupPrompt } from './prompt/prompt.vue';
5
+ export { default as TopPopupAlert } from './popupAlert/popupAlert.vue';
6
+ export { default as TopPopupConfirm } from './popupConfirm/popupConfirm.vue';
7
+ export { default as TopPopupPrompt } from './popupPrompt/popupPrompt.vue';
8
+ export { default as TopPopupHint } from './popupHint/popupHint.vue';
@@ -0,0 +1,17 @@
1
+ import { Props } from './types';
2
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
3
+ declare const _default: <T extends Record<string, any> | undefined = undefined>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & Props<T> & Partial<{}>> & PublicProps;
5
+ expose(exposed: ShallowUnwrapRef<{}>): void;
6
+ attrs: any;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ emit: {};
11
+ }>) => VNode & {
12
+ __ctx?: Awaited<typeof __VLS_setup>;
13
+ };
14
+ export default _default;
15
+ type __VLS_PrettifyLocal<T> = {
16
+ [K in keyof T]: T[K];
17
+ } & {};
@@ -0,0 +1,7 @@
1
+ import { Props as PopupProps } from '../popup/types';
2
+ export interface Props<T extends Record<string, any> | undefined = undefined> extends PopupProps<T> {
3
+ /**
4
+ * Подсказка при наведении
5
+ */
6
+ hint: string;
7
+ }