@topvisor/ui 1.0.21-pinia-1 → 1.0.22-selectorRegion-pr

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 (173) hide show
  1. package/.chunks/core-Cb1K4rks.es.js +196 -0
  2. package/.chunks/core-Cb1K4rks.es.js.map +1 -0
  3. package/.chunks/core-DOD2Zduv.amd.js +2 -0
  4. package/.chunks/core-DOD2Zduv.amd.js.map +1 -0
  5. package/.chunks/{datepicker-BC31NE5M.es.js → datepicker-BbLOzQtp.es.js} +2 -2
  6. package/.chunks/datepicker-BbLOzQtp.es.js.map +1 -0
  7. package/.chunks/{datepicker-CVoT5EME.amd.js → datepicker-DNOnzVIz.amd.js} +2 -2
  8. package/.chunks/datepicker-DNOnzVIz.amd.js.map +1 -0
  9. package/.chunks/dialog_selectorRegions-BYAZLdbp.es.js +140 -0
  10. package/.chunks/dialog_selectorRegions-BYAZLdbp.es.js.map +1 -0
  11. package/.chunks/dialog_selectorRegions-D1YE2mYS.amd.js +2 -0
  12. package/.chunks/dialog_selectorRegions-D1YE2mYS.amd.js.map +1 -0
  13. package/.chunks/{utils-C5sf4bZh.es.js → dialogs.vue_vue_type_script_setup_true_lang-DtLpQTwi.es.js} +72 -144
  14. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DtLpQTwi.es.js.map +1 -0
  15. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-xoE5yB6b.amd.js +2 -0
  16. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-xoE5yB6b.amd.js.map +1 -0
  17. package/.chunks/{forms-CxYSHZLL.amd.js → forms-Dv9L8-AZ.amd.js} +3 -3
  18. package/.chunks/forms-Dv9L8-AZ.amd.js.map +1 -0
  19. package/.chunks/{forms-CipZtprq.es.js → forms-LTK63Ugt.es.js} +28 -28
  20. package/.chunks/forms-LTK63Ugt.es.js.map +1 -0
  21. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CT6O_7Qy.amd.js → listItem.vue_vue_type_script_setup_true_lang-COGiIcDO.amd.js} +2 -2
  22. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-COGiIcDO.amd.js.map +1 -0
  23. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-uNNJJ4S0.es.js → listItem.vue_vue_type_script_setup_true_lang-UC3o5oK5.es.js} +7 -7
  24. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-UC3o5oK5.es.js.map +1 -0
  25. package/.chunks/{menu.vue_vue_type_style_index_0_lang-DAI_WcXI.amd.js → menu.vue_vue_type_style_index_0_lang-BFmZ4tvs.amd.js} +2 -2
  26. package/.chunks/menu.vue_vue_type_style_index_0_lang-BFmZ4tvs.amd.js.map +1 -0
  27. package/.chunks/{menu.vue_vue_type_style_index_0_lang-fU3LbpR7.es.js → menu.vue_vue_type_style_index_0_lang-hQu5BJPe.es.js} +5 -5
  28. package/.chunks/menu.vue_vue_type_style_index_0_lang-hQu5BJPe.es.js.map +1 -0
  29. package/.chunks/{notice-uzdQ-t3s.amd.js → notice-BoZG4Mg1.amd.js} +2 -2
  30. package/.chunks/notice-BoZG4Mg1.amd.js.map +1 -0
  31. package/.chunks/{notice-cCZZtLLu.es.js → notice-CYutIom0.es.js} +2 -2
  32. package/.chunks/notice-CYutIom0.es.js.map +1 -0
  33. package/.chunks/page.vue_vue_type_script_setup_true_lang-B2wjrf5z.es.js +143 -0
  34. package/.chunks/page.vue_vue_type_script_setup_true_lang-B2wjrf5z.es.js.map +1 -0
  35. package/.chunks/page.vue_vue_type_script_setup_true_lang-CffDh-th.amd.js +2 -0
  36. package/.chunks/page.vue_vue_type_script_setup_true_lang-CffDh-th.amd.js.map +1 -0
  37. package/.chunks/{popup-Bwknq6xI.amd.js → popup-Cg9w4Vy-.amd.js} +2 -2
  38. package/.chunks/popup-Cg9w4Vy-.amd.js.map +1 -0
  39. package/.chunks/{popup-BvhY5oAD.es.js → popup-ec_xLrTA.es.js} +2 -2
  40. package/.chunks/popup-ec_xLrTA.es.js.map +1 -0
  41. package/.chunks/store-CX_6ZXhO.es.js.map +1 -1
  42. package/.chunks/store-esTid5oI.amd.js.map +1 -1
  43. package/.chunks/{utils-C2OmmJkw.es.js → utils-BRLYX_ZC.es.js} +3 -3
  44. package/.chunks/utils-BRLYX_ZC.es.js.map +1 -0
  45. package/.chunks/utils-COoE8KP7.es.js +79 -0
  46. package/.chunks/utils-COoE8KP7.es.js.map +1 -0
  47. package/.chunks/utils-GpKurv7L.amd.js +2 -0
  48. package/.chunks/utils-GpKurv7L.amd.js.map +1 -0
  49. package/.chunks/utils-z5wL437D.amd.js +2 -0
  50. package/.chunks/utils-z5wL437D.amd.js.map +1 -0
  51. package/README.md +82 -82
  52. package/assets/core.css +1 -1
  53. package/assets/dialog_selectorRegions.css +1 -0
  54. package/assets/forms.css +1 -1
  55. package/assets/formsExt.css +1 -1
  56. package/charts/charts.amd.js +1 -1
  57. package/charts/charts.amd.js.map +1 -1
  58. package/charts/charts.js +1 -1
  59. package/charts/charts.js.map +1 -1
  60. package/components/project/project.d.ts +1 -1
  61. package/components/project/selectorRegion/dialog_selectorRegions/dialog_selectorRegions.vue.d.ts +4 -0
  62. package/components/project/selectorRegion/dialog_selectorRegions/types.d.ts +26 -0
  63. package/components/project/selectorRegion/selectorRegion.d.ts +0 -12
  64. package/components/project/selectorRegion/selectorRegion.vue.d.ts +1 -3
  65. package/components/project/selectorRegion/utils/utils.d.ts +9 -0
  66. package/core/app.amd.js +1 -1
  67. package/core/app.amd.js.map +1 -1
  68. package/core/app.js +122 -310
  69. package/core/app.js.map +1 -1
  70. package/core/utils/string.d.ts +3 -1
  71. package/dialog/dialog.amd.js +1 -1
  72. package/dialog/dialog.amd.js.map +1 -1
  73. package/dialog/dialog.js +22 -155
  74. package/dialog/dialog.js.map +1 -1
  75. package/forms/forms.amd.js +1 -1
  76. package/forms/forms.js +1 -1
  77. package/forms/helpers.amd.js.map +1 -1
  78. package/forms/helpers.js.map +1 -1
  79. package/formsExt/formsExt.amd.js +1 -1
  80. package/formsExt/formsExt.amd.js.map +1 -1
  81. package/formsExt/formsExt.js +2 -2
  82. package/formsExt/formsExt.js.map +1 -1
  83. package/icomoon/Read Me.txt +7 -7
  84. package/icomoon/Topvisor icons.json +6259 -6259
  85. package/icomoon/demo-files/demo.css +158 -158
  86. package/icomoon/demo-files/demo.js +30 -30
  87. package/icomoon/demo.html +3558 -3558
  88. package/icomoon/fonts/Topvisor-2.svg +276 -276
  89. package/icomoon/style.css +780 -780
  90. package/jquery-ui.min.css +5 -5
  91. package/layout/layout.amd.js +1 -1
  92. package/layout/layout.amd.js.map +1 -1
  93. package/layout/layout.js +1 -1
  94. package/layout/layout.js.map +1 -1
  95. package/package.json +33 -33
  96. package/popup/popup.amd.js +1 -1
  97. package/popup/popup.amd.js.map +1 -1
  98. package/popup/popup.js +2 -2
  99. package/popup/popup.js.map +1 -1
  100. package/popup/worker.amd.js +1 -1
  101. package/popup/worker.amd.js.map +1 -1
  102. package/popup/worker.js +2 -2
  103. package/popup/worker.js.map +1 -1
  104. package/project/project.amd.js +1 -1
  105. package/project/project.amd.js.map +1 -1
  106. package/project/project.js +517 -515
  107. package/project/project.js.map +1 -1
  108. package/require/css.amd.js +12 -12
  109. package/tabs/tabs.amd.js.map +1 -1
  110. package/tabs/tabs.js.map +1 -1
  111. package/tabsView/tabsView.amd.js +1 -1
  112. package/tabsView/tabsView.amd.js.map +1 -1
  113. package/tabsView/tabsView.js +1 -1
  114. package/tabsView/tabsView.js.map +1 -1
  115. package/utils/check.amd.js.map +1 -1
  116. package/utils/check.js.map +1 -1
  117. package/utils/clipboard.amd.js +1 -1
  118. package/utils/clipboard.amd.js.map +1 -1
  119. package/utils/clipboard.js +1 -1
  120. package/utils/clipboard.js.map +1 -1
  121. package/utils/date.amd.js +1 -1
  122. package/utils/date.js +2 -2
  123. package/utils/device.amd.js +1 -1
  124. package/utils/device.js +4 -4
  125. package/utils/dom.amd.js.map +1 -1
  126. package/utils/dom.js.map +1 -1
  127. package/utils/image.amd.js.map +1 -1
  128. package/utils/image.js.map +1 -1
  129. package/utils/keyboard.amd.js.map +1 -1
  130. package/utils/keyboard.js.map +1 -1
  131. package/utils/lodash.amd.js +1 -1
  132. package/utils/lodash.js +3 -3
  133. package/utils/number.amd.js.map +1 -1
  134. package/utils/number.js.map +1 -1
  135. package/utils/price.amd.js +1 -1
  136. package/utils/price.amd.js.map +1 -1
  137. package/utils/price.js +4 -4
  138. package/utils/price.js.map +1 -1
  139. package/utils/route.amd.js.map +1 -1
  140. package/utils/route.js.map +1 -1
  141. package/utils/scroll.amd.js.map +1 -1
  142. package/utils/scroll.js.map +1 -1
  143. package/utils/searchers.amd.js +1 -1
  144. package/utils/searchers.amd.js.map +1 -1
  145. package/utils/searchers.js +16 -12
  146. package/utils/searchers.js.map +1 -1
  147. package/utils/string.amd.js +1 -1
  148. package/utils/string.amd.js.map +1 -1
  149. package/utils/string.js +1 -1
  150. package/utils/string.js.map +1 -1
  151. package/utils/system.amd.js.map +1 -1
  152. package/utils/system.js.map +1 -1
  153. package/utils/url.amd.js.map +1 -1
  154. package/utils/url.js.map +1 -1
  155. package/web-types.json +130 -130
  156. package/.chunks/datepicker-BC31NE5M.es.js.map +0 -1
  157. package/.chunks/datepicker-CVoT5EME.amd.js.map +0 -1
  158. package/.chunks/forms-CipZtprq.es.js.map +0 -1
  159. package/.chunks/forms-CxYSHZLL.amd.js.map +0 -1
  160. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CT6O_7Qy.amd.js.map +0 -1
  161. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-uNNJJ4S0.es.js.map +0 -1
  162. package/.chunks/menu.vue_vue_type_style_index_0_lang-DAI_WcXI.amd.js.map +0 -1
  163. package/.chunks/menu.vue_vue_type_style_index_0_lang-fU3LbpR7.es.js.map +0 -1
  164. package/.chunks/notice-cCZZtLLu.es.js.map +0 -1
  165. package/.chunks/notice-uzdQ-t3s.amd.js.map +0 -1
  166. package/.chunks/popup-BvhY5oAD.es.js.map +0 -1
  167. package/.chunks/popup-Bwknq6xI.amd.js.map +0 -1
  168. package/.chunks/utils-BfdO2xlC.amd.js +0 -2
  169. package/.chunks/utils-BfdO2xlC.amd.js.map +0 -1
  170. package/.chunks/utils-C2OmmJkw.es.js.map +0 -1
  171. package/.chunks/utils-C3dsXIj9.amd.js +0 -2
  172. package/.chunks/utils-C3dsXIj9.amd.js.map +0 -1
  173. package/.chunks/utils-C5sf4bZh.es.js.map +0 -1
package/core/app.js CHANGED
@@ -1,359 +1,171 @@
1
- import { C as r, E as N, T as M, f as H, g as C, h as F, j as R, k as V, l as G, m as j, n as x, o as B, p as J, q as W, r as Y, s as q } from "../.chunks/forms-CipZtprq.es.js";
2
- import { t as Ut, a as Pt, u as At } from "../.chunks/forms-CipZtprq.es.js";
3
- import { defineAsyncComponent as z, watch as k } from "vue";
4
- import { TopPopupWorker as d } from "../popup/worker.js";
5
- import { T as Q, _ as K } from "../.chunks/utils-C5sf4bZh.es.js";
6
- import { a as Dt, b as Nt } from "../.chunks/utils-C5sf4bZh.es.js";
7
- import { isVisible as I } from "../utils/dom.js";
8
- import { guestLinkToClipboard as X } from "../utils/clipboard.js";
9
- import { camelToSnakeCase as Z } from "../utils/string.js";
10
- import { getHash as tt, setHash as et } from "../utils/route.js";
11
- class ot {
12
- static isInited = !1;
13
- /**
14
- * Добавить глобальные обработчики
15
- *
16
- * Добавляются на страницу один раз и навсегда
17
- */
18
- static init() {
19
- this.isInited || (this.isInited = !0, document.addEventListener("mouseover", (t) => {
20
- var e;
21
- !(t.target instanceof HTMLElement) || !((e = t.target.dataset) != null && e.topPopupOpenByHover) || t.target.click();
22
- }), document.addEventListener("scroll", () => {
23
- r.state.isMobile || r.state.isMobileUA || d.getAll().forEach((t) => d.close(t));
24
- }), N.addOnReize((t) => {
25
- r.state.isMobile && t.topEvent.widthDiff && d.getAll().forEach((e) => d.close(e));
26
- }), document.addEventListener("click", this.onclick));
27
- }
28
- /**
29
- * Глобальный обработчик кликов
30
- *
31
- * Обрабатывает клики на открытие Popup
32
- */
33
- static async onclick(t) {
34
- var s, i, n, a, c;
35
- if (!(t.target instanceof HTMLElement)) return;
36
- let e;
37
- switch (!0) {
38
- case !!((s = t.target.dataset) != null && s.topPopup):
39
- e = t.target;
40
- break;
41
- case !!((i = t.target.parentElement) != null && i.dataset.topPopup):
42
- e = t.target.parentElement;
43
- break;
44
- case !!((a = (n = t.target.parentElement) == null ? void 0 : n.parentElement) != null && a.dataset.topPopup):
45
- e = (c = t.target.parentElement) == null ? void 0 : c.parentElement;
46
- break;
47
- }
48
- e && (e.dataset.topPopupDisabled || e.dataset.topPopupOpened || (t.preventDefault(), await d.openByOpener(e)));
49
- }
50
- }
51
- let v;
52
- const st = {
53
- mounted: async (o, t) => {
54
- v || (v = (await import("../utils/dom.js")).storage);
55
- const e = t.arg, s = t.value;
56
- v(o, e, s);
57
- }
58
- };
59
- let E, u = [], b;
60
- const it = async () => {
61
- const { isVisible: o } = await import("../utils/dom.js");
62
- if (u = u.filter(o), !u.length) return;
63
- u[0].focus(), u = [];
64
- }, O = async (o) => {
65
- E || (E = await import("../utils/lodash.js")), b || (b = E.debounce(it, 30)), u.push(o), b();
66
- }, nt = {
67
- mounted: function(o, t) {
68
- o.__TOP_V_FOCUS_VALUE = t.value ?? !0, (t.value ?? !0) && O(o);
69
- },
70
- updated: function(o, t) {
71
- t.modifiers.onupdate && o.__TOP_V_FOCUS_VALUE !== (t.value ?? !0) && (o.__TOP_V_FOCUS_VALUE = t.value ?? !0, (t.value ?? !0) && O(o));
72
- }
73
- };
74
- let m, S;
75
- const D = (o) => (typeof o == "boolean" || (o ? o = { ...o } : o = {}, o.behavior ??= "smooth", o.block ??= "nearest", o.inline ??= "nearest"), o);
76
- let g, _;
77
- const at = async () => {
78
- if (!g) return;
79
- const o = await L(g);
80
- o.isVisible && g.scrollIntoView(o.scrollIntoViewOptions);
81
- }, U = async (o) => {
82
- S || (S = await import("../utils/lodash.js")), _ || (_ = S.debounce(at, 30)), g = o, _();
83
- }, L = async (o, t) => {
84
- m || (m = await import("../utils/dom.js"));
85
- let e = m.storage(o, "v-top-scrollIntoView");
86
- return e || (e = {
87
- isVisible: I(o),
88
- scrollIntoViewOptions: D(t)
89
- }, m.storage(o, "v-top-scrollIntoView", e)), e;
90
- }, rt = {
91
- async mounted(o, t) {
92
- await L(o, t.value), t.modifiers.immediate && U(o);
93
- },
94
- async updated(o, t) {
95
- const e = await L(o, t.value);
96
- e.scrollIntoViewOptions = D(t.value);
97
- const s = I(o);
98
- s && e.isVisible !== s && U(o), e.isVisible = s;
99
- }
100
- };
101
- let p;
102
- const ct = {
103
- async mounted(o) {
104
- p || (p = await import("../utils/scroll.js")), p.connectScrollShadow(o);
105
- },
106
- async unmounted(o) {
107
- p || (p = await import("../utils/scroll.js")), p.unconnectScrollShadow(o);
108
- }
109
- };
110
- let f;
111
- const lt = {
112
- mounted(o, t, e) {
113
- const s = t.value || "top-sticky";
114
- f = new IntersectionObserver((i) => {
115
- let n = i[0].intersectionRatio < 1;
116
- n && t.modifiers.bottom && i[0].intersectionRect.y === 0 && (n = !1), o.classList.toggle(s, n);
117
- }, {
118
- threshold: [1]
119
- }), f.observe(o);
120
- },
121
- unmounted(o, t, e) {
122
- f == null || f.disconnect();
123
- }
124
- };
125
- let P = !1, h;
126
- const T = /* @__PURE__ */ new Map(), pt = (o, t) => {
127
- const { distance: e, percent: s } = o.directiveSwipUpOptions, i = o.getBoundingClientRect().top, n = t * s / 100 / e, a = (t - i) / n;
128
- a <= e ? o.style.transform = `translateY(${e - a}px)` : o.style.transform = "translateY(0px)";
129
- }, dt = (o) => {
130
- let t = window.innerHeight;
131
- window.addEventListener("scroll", () => {
132
- T.forEach((e) => pt(e, t));
133
- }, { passive: !0 }), h = new IntersectionObserver((e) => {
134
- t = window.innerHeight, e.forEach((s) => {
135
- const i = s.target;
136
- if (s.intersectionRatio < 0.1 ? T.delete(i) : T.set(i, i), s.intersectionRatio === 0) {
137
- const { distance: n } = i.directiveSwipUpOptions;
138
- i.style.transform = `translateY(${n}px)`;
139
- }
140
- });
141
- }, {
142
- threshold: 0.1
143
- });
144
- }, ut = {
145
- mounted(o, t, e) {
146
- var s, i;
147
- r.state.isMobileUA || (o.directiveSwipUpOptions = {
148
- distance: ((s = t.value) == null ? void 0 : s.distance) ?? 100,
149
- // количество px на которые блок изначально смещен вниз,
150
- percent: ((i = t.value) == null ? void 0 : i.percent) ?? 30
151
- // процент высоты экрана поднявшись на который блок закончит подплытие
152
- }, P || (dt(), P = !0), h.observe(o));
153
- },
154
- unmounted(o, t, e) {
155
- T.delete(o), h == null || h.unobserve(o);
156
- }
157
- }, y = (o) => {
158
- var t, e;
159
- if (!((e = (t = r.$) == null ? void 0 : t.ui) != null && e.tooltip)) {
160
- console.info("Для работы v-top-tooltip требуется глобальная загрузка jQuery UI Tooltip");
161
- return;
162
- }
163
- return r.$(o);
164
- }, A = (o, t) => {
165
- var s;
166
- const e = o.value ?? {};
167
- return e.content ??= (s = t.props) == null ? void 0 : s.title, e.content = String(e.content).replace(/\r\n|\r|\n/g, "<br>"), e.position ??= {
168
- my: "bottom-18px",
169
- at: "top center"
170
- }, e;
171
- }, ft = {
172
- mounted(o, t, e) {
173
- var s;
174
- (s = y(o)) == null || s.tooltip(A(t, e));
175
- },
176
- updated(o, t, e, s) {
177
- var a;
178
- const i = A(t, e), n = (a = y(o)) == null ? void 0 : a.tooltip("instance");
179
- n && (n.options = {
180
- ...n.options,
181
- ...i
182
- });
183
- },
184
- unmounted(o, t, e) {
185
- var s;
186
- (s = y(o)) == null || s.tooltip("destroy");
187
- }
188
- }, ht = z(() => import("../.chunks/notice-cCZZtLLu.es.js"));
189
- window.vd = console.log;
190
- const yt = {
191
- install: (o, t) => {
192
- o.config.globalProperties.$core = r, o.config.globalProperties.$vd = console.log;
193
- for (const e in t)
194
- r.state[e] = t[e];
195
- t.widthForMobile && (r.widthForMobile = t.widthForMobile), t.themeName && (r.themeName = t.themeName), r._setState(), t.topPopupOptions && (d.options = t.topPopupOptions), ot.init(), Q.init(t.topDialogOptions), o.directive("top-data", st), o.directive("top-focus", nt), o.directive("top-scroll-into-view", rt), o.directive("top-scroll-shadow", ct), o.directive("top-sticky", lt), o.directive("top-swim-up", ut), o.directive("top-tooltip", ft), o.component("TopAvatar", M), o.component("TopButton", H), o.component("TopCheckbox", C), o.component("TopControlLabel", F), o.component("TopHint", R), o.component("TopInput", V), o.component("TopInputDate", G), o.component("TopInputRange", j), o.component("TopLoadbar", x), o.component("TopRadio", B), o.component("TopSelect", J), o.component("TopSwitcher", W), o.component("TopTextarea", Y), o.component("TopNotice", ht), o.component("TopDialogs", K);
196
- }
197
- };
198
- class mt {
199
- #e;
1
+ import { d } from "../.chunks/forms-LTK63Ugt.es.js";
2
+ import { C as P, i as T, u as b, a as y } from "../.chunks/forms-LTK63Ugt.es.js";
3
+ import { c as G } from "../.chunks/core-Cb1K4rks.es.js";
4
+ import { watch as p } from "vue";
5
+ import { guestLinkToClipboard as f } from "../utils/clipboard.js";
6
+ import { camelToSnakeCase as g } from "../utils/string.js";
7
+ import { getHash as m, setHash as l } from "../utils/route.js";
8
+ import { u as A, a as D } from "../.chunks/utils-COoE8KP7.es.js";
9
+ import { T as j } from "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-DtLpQTwi.es.js";
10
+ class u {
11
+ #s;
200
12
  #t;
201
13
  /**
202
14
  * @deprecated
203
15
  */
204
- #o;
205
- #s;
206
- #c;
16
+ #e;
17
+ #a;
18
+ #h;
207
19
  #i = [];
208
- #n = [];
209
- #l = [];
210
- #a = [];
211
- constructor(t) {
212
- var s;
213
- this.#t = t.store, this.#e = this.#t.$id, this.#o = t.options.Page, this.#s = t.options.user, this.#c = t.options.Api, this.#i = t.options.tpaNamesUrlHash || [], this.#n = t.options.tpaNamesStorage || [], this.#l = t.options.tpaNamesStorageLocal || [], this.#a = t.options.tpaNamesGuestLink || [], t.store.genGuestLink = (i, n) => this.genGuestLink(i, n), (s = this.#s.guest_data) != null && s.data || (this.#d(), this.#d(!0), this.#h()), this.#T(), this.#w();
214
- const e = q(() => {
215
- this.#m(), this.#g();
20
+ #o = [];
21
+ #c = [];
22
+ #r = [];
23
+ constructor(s) {
24
+ var t;
25
+ this.#t = s.store, this.#s = this.#t.$id, this.#e = s.options.Page, this.#a = s.options.user, this.#h = s.options.Api, this.#i = s.options.tpaNamesUrlHash || [], this.#o = s.options.tpaNamesStorage || [], this.#c = s.options.tpaNamesStorageLocal || [], this.#r = s.options.tpaNamesGuestLink || [], s.store.genGuestLink = (a, i) => this.genGuestLink(a, i), (t = this.#a.guest_data) != null && t.data || (this.#d(), this.#d(!0), this.#m()), this.#S(), this.#E();
26
+ const e = d(() => {
27
+ this.#l(), this.#u();
216
28
  });
217
- t.store.$subscribe(e);
29
+ s.store.$subscribe(e);
218
30
  }
219
31
  /**
220
32
  * Сгенерировать гостевую ссылку
221
33
  *
222
34
  * Метод, путь к которому указан в url, должен возвращать сгенерированную ссылку
223
35
  */
224
- async genGuestLink(t, e) {
225
- const s = this.#u();
226
- e = Object.assign(e, Object.fromEntries(s));
227
- const i = await this.#c.gen(t, "fetchColumn").call({}, e);
228
- i != null && i.errors || await X(i.result);
36
+ async genGuestLink(s, e) {
37
+ const t = this.#f();
38
+ e = Object.assign(e, Object.fromEntries(t));
39
+ const a = await this.#h.gen(s, "fetchColumn").call({}, e);
40
+ a != null && a.errors || await f(a.result);
229
41
  }
230
42
  /**
231
43
  * Сгенерировать опции для гостевой ссылки
232
44
  */
233
- #u() {
234
- const t = /* @__PURE__ */ new Map();
235
- return this.#a.forEach((e) => {
236
- const s = Z(e);
237
- t.set(s, this.#t[e]);
238
- }), t;
45
+ #f() {
46
+ const s = /* @__PURE__ */ new Map();
47
+ return this.#r.forEach((e) => {
48
+ const t = g(e);
49
+ s.set(t, this.#t[e]);
50
+ }), s;
239
51
  }
240
52
  /**
241
53
  * Установить опции из объекта без фиксации состояния
242
54
  */
243
- #r(t) {
244
- t.forEach((e, s) => {
245
- const i = this.#t[s];
246
- if (e != null && i !== void 0 && e != null && e.constructor && e.constructor === i.constructor) {
247
- if (s.indexOf("date") === 0 && !Array.isArray(e)) {
55
+ #n(s) {
56
+ s.forEach((e, t) => {
57
+ const a = this.#t[t];
58
+ if (e != null && a !== void 0 && e != null && e.constructor && e.constructor === a.constructor) {
59
+ if (t.indexOf("date") === 0 && !Array.isArray(e)) {
248
60
  if (typeof e == "string" && !/\d\d\d\d-\d\d-\d\d/.test(e))
249
61
  return;
250
62
  }
251
- this.#t[s] = e;
63
+ this.#t[t] = e;
252
64
  }
253
65
  });
254
66
  }
255
67
  /**
256
68
  * Сгенерировать Map объект с опциями со значениями в виде json строк
257
69
  */
258
- #f(t) {
70
+ #g(s) {
259
71
  const e = /* @__PURE__ */ new Map();
260
- return t.forEach((s, i) => {
261
- s !== null && (s = JSON.stringify(s), e.set(i, s));
72
+ return s.forEach((t, a) => {
73
+ t !== null && (t = JSON.stringify(t), e.set(a, t));
262
74
  }), e;
263
75
  }
264
76
  /**
265
77
  * Сгенерировать Map объект с опциями со значениями в оригинальном виде
266
78
  */
267
- #p(t) {
79
+ #p(s) {
268
80
  const e = /* @__PURE__ */ new Map();
269
- return t.forEach((s, i) => {
270
- if (!(s == null || s === "false")) {
81
+ return s.forEach((t, a) => {
82
+ if (!(t == null || t === "false")) {
271
83
  try {
272
- if (typeof s == "string" && !/^\d\d\d\d-\d\d-\d\d$/.test(s) && (s = JSON.parse(s)), s == null || s === "false") return;
84
+ if (typeof t == "string" && !/^\d\d\d\d-\d\d-\d\d$/.test(t) && (t = JSON.parse(t)), t == null || t === "false") return;
273
85
  } catch {
274
86
  }
275
- e.set(i, s);
87
+ e.set(a, t);
276
88
  }
277
89
  }), e;
278
90
  }
279
91
  /**
280
92
  * Установить опции из хеша адреса страницы
281
93
  */
282
- #h() {
283
- let t;
94
+ #m() {
95
+ let s;
284
96
  try {
285
- t = JSON.parse(tt(this.#e));
97
+ s = JSON.parse(m(this.#s));
286
98
  } catch {
287
99
  }
288
- if (!t) return;
100
+ if (!s) return;
289
101
  const e = /* @__PURE__ */ new Map();
290
- this.#i.forEach((s) => {
291
- const i = t[s];
292
- i && e.set(s, i);
293
- }), this.#r(e);
102
+ this.#i.forEach((t) => {
103
+ const a = s[t];
104
+ a && e.set(t, a);
105
+ }), this.#n(e);
294
106
  }
295
107
  /**
296
108
  * Сохранить опции в хеш адреса страницы
297
109
  */
298
- #m() {
299
- const t = /* @__PURE__ */ new Map();
300
- this.#i.forEach((i) => {
301
- const n = this.#t[i];
302
- t.set(i, n);
110
+ #l() {
111
+ const s = /* @__PURE__ */ new Map();
112
+ this.#i.forEach((a) => {
113
+ const i = this.#t[a];
114
+ s.set(a, i);
303
115
  });
304
- const e = Object.fromEntries(t), s = JSON.stringify(e);
305
- et(this.#e, s);
116
+ const e = Object.fromEntries(s), t = JSON.stringify(e);
117
+ l(this.#s, t);
306
118
  }
307
119
  /**
308
120
  * Установить опции из localStorage
309
121
  * @param isLocal - сохранить с учетом адреса страницы
310
122
  */
311
- #d(t = !1) {
123
+ #d(s = !1) {
312
124
  const e = /* @__PURE__ */ new Map();
313
- let s = "state:" + this.#e;
314
- t && (s = "state:" + this.#e + ":" + location.pathname), this.#n.forEach((n) => {
315
- const a = localStorage.getItem(s + ":" + n);
316
- e.set(n, a);
125
+ let t = "state:" + this.#s;
126
+ s && (t = "state:" + this.#s + ":" + location.pathname), this.#o.forEach((i) => {
127
+ const o = localStorage.getItem(t + ":" + i);
128
+ e.set(i, o);
317
129
  });
318
- const i = this.#p(e);
319
- this.#r(i);
130
+ const a = this.#p(e);
131
+ this.#n(a);
320
132
  }
321
133
  /**
322
134
  * Сохранить опции в localStorage
323
135
  * @param isLocal - сохранить с учетом адреса страницы
324
136
  */
325
- #g(t = !1) {
137
+ #u(s = !1) {
326
138
  const e = /* @__PURE__ */ new Map();
327
- let s = this.#n, i = "state:" + this.#e;
328
- t && (s = this.#l, i = "state:" + this.#e + ":" + location.pathname), s.forEach((a) => {
329
- const c = this.#t[a];
330
- e.set(a, c);
139
+ let t = this.#o, a = "state:" + this.#s;
140
+ s && (t = this.#c, a = "state:" + this.#s + ":" + location.pathname), t.forEach((o) => {
141
+ const r = this.#t[o];
142
+ e.set(o, r);
331
143
  });
332
- const n = this.#f(e);
333
- s.forEach((a) => {
334
- const c = n.get(a);
335
- localStorage.setItem(i + ":" + a, c);
144
+ const i = this.#g(e);
145
+ t.forEach((o) => {
146
+ const r = i.get(o);
147
+ localStorage.setItem(a + ":" + o, r);
336
148
  });
337
149
  }
338
150
  /**
339
151
  * Установить опции из гостевой ссылки
340
152
  */
341
- #T() {
342
- var n, a, c;
343
- const t = (a = (n = this.#s) == null ? void 0 : n.guest_data) == null ? void 0 : a.data;
344
- if (!t) return;
345
- this.#s.id === -1 && (this.#s.positionsReverseDates = t.positionsReverseDates);
153
+ #S() {
154
+ var i, o, r;
155
+ const s = (o = (i = this.#a) == null ? void 0 : i.guest_data) == null ? void 0 : o.data;
156
+ if (!s) return;
157
+ this.#a.id === -1 && (this.#a.positionsReverseDates = s.positionsReverseDates);
346
158
  const e = /* @__PURE__ */ new Map();
347
- this.#a.forEach((l) => {
348
- const w = t[l];
349
- e.set(l, w);
159
+ this.#r.forEach((n) => {
160
+ const h = s[n];
161
+ e.set(n, h);
350
162
  });
351
- const s = this.#p(e);
352
- this.#r(s);
353
- const i = $(".mod_guest_title");
354
- if (((c = this.#t.competitorsIds) == null ? void 0 : c.length) === 1 && this.#o.page.data.competitors) {
355
- let l = this.#o.page.data.competitors.filter((w) => w.id === t.competitorsIds[0]);
356
- l.length && ($("a", i).attr("href", "http://" + l[0].url), $("a", i).text(l[0].name));
163
+ const t = this.#p(e);
164
+ this.#n(t);
165
+ const a = $(".mod_guest_title");
166
+ if (((r = this.#t.competitorsIds) == null ? void 0 : r.length) === 1 && this.#e.page.data.competitors) {
167
+ let n = this.#e.page.data.competitors.filter((h) => h.id === s.competitorsIds[0]);
168
+ n.length && ($("a", a).attr("href", "http://" + n[0].url), $("a", a).text(n[0].name));
357
169
  }
358
170
  }
359
171
  /**
@@ -363,40 +175,40 @@ class mt {
363
175
  *
364
176
  * Входные параметры могут меняться пользоваталем и устаревать
365
177
  */
366
- #w() {
367
- this.#t.regionsIndexes && k(this.#t.regionsIndexes, (t) => {
368
- if (!t.length) return;
369
- t.forEach((i, n) => t[n] = i);
370
- const e = TplProjectSelectorRegion.genSearchersMap(), s = [];
371
- e.forEach((i) => {
372
- i.regions.forEach((n) => {
373
- n.index !== -1 && s.push(n.index);
178
+ #E() {
179
+ this.#t.regionsIndexes && p(this.#t.regionsIndexes, (s) => {
180
+ if (!s.length) return;
181
+ s.forEach((a, i) => s[i] = a);
182
+ const e = TplProjectSelectorRegion.genSearchersMap(), t = [];
183
+ e.forEach((a) => {
184
+ a.regions.forEach((i) => {
185
+ i.index !== -1 && t.push(i.index);
374
186
  });
375
- }), this.#t.regionsIndexes = t.filter((i) => s.includes(i));
376
- }, { immediate: !0 }), this.#t.competitorsIds && k(this.#t.competitorsIds, (t) => {
377
- if (!t.length) return;
378
- t.forEach((s, i) => t[i] = s);
379
- const e = [this.#o.page.data.project.id];
380
- this.#o.page.data.project.competitors.forEach((s) => {
381
- s.on >= 0 && e.push(s.id);
382
- }), this.#t.competitorsIds = t.filter((s) => e.includes(s));
187
+ }), this.#t.regionsIndexes = s.filter((a) => t.includes(a));
188
+ }, { immediate: !0 }), this.#t.competitorsIds && p(this.#t.competitorsIds, (s) => {
189
+ if (!s.length) return;
190
+ s.forEach((t, a) => s[a] = t);
191
+ const e = [this.#e.page.data.project.id];
192
+ this.#e.page.data.project.competitors.forEach((t) => {
193
+ t.on >= 0 && e.push(t.id);
194
+ }), this.#t.competitorsIds = s.filter((t) => e.includes(t));
383
195
  }, { immediate: !0 });
384
196
  }
385
197
  }
386
- const Lt = (o) => {
387
- var e, s, i, n;
388
- const t = o;
389
- !((e = t.options.tpaNamesUrlHash) != null && e.length) && !((s = t.options.tpaNamesStorage) != null && s.length) && !((i = t.options.tpaNamesStorageLocal) != null && i.length) && !((n = t.options.tpaNamesGuestLink) != null && n.length) || new mt(t);
198
+ const w = (c) => {
199
+ var e, t, a, i;
200
+ const s = c;
201
+ !((e = s.options.tpaNamesUrlHash) != null && e.length) && !((t = s.options.tpaNamesStorage) != null && t.length) && !((a = s.options.tpaNamesStorageLocal) != null && a.length) && !((i = s.options.tpaNamesGuestLink) != null && i.length) || new u(s);
390
202
  };
391
203
  export {
392
- r as Core,
393
- Q as TopDialogWorker,
394
- yt as corePlugin,
395
- Ut as i18nPlugin,
396
- Lt as piniaTPAPlugin,
397
- Dt as useAsyncTopDialog,
398
- Pt as useI18n,
399
- At as useI18nLang,
400
- Nt as useTopDialog
204
+ P as Core,
205
+ j as TopDialogWorker,
206
+ G as corePlugin,
207
+ T as i18nPlugin,
208
+ w as piniaTPAPlugin,
209
+ A as useAsyncTopDialog,
210
+ b as useI18n,
211
+ y as useI18nLang,
212
+ D as useTopDialog
401
213
  };
402
214
  //# sourceMappingURL=app.js.map