@topvisor/ui 0.9.26-dev → 0.9.27-dev

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 (212) hide show
  1. package/.chunks/{datepicker-C0rB8tdN.amd.js → datepicker-34kJtztn.amd.js} +2 -2
  2. package/.chunks/{datepicker-C0rB8tdN.amd.js.map → datepicker-34kJtztn.amd.js.map} +1 -1
  3. package/.chunks/{datepicker-BMrdz1zd.es.js → datepicker-DwZTG-k0.es.js} +3 -4
  4. package/.chunks/{datepicker-BMrdz1zd.es.js.map → datepicker-DwZTG-k0.es.js.map} +1 -1
  5. package/.chunks/forms-1ZAO_mt8.es.js +1179 -0
  6. package/.chunks/forms-1ZAO_mt8.es.js.map +1 -0
  7. package/.chunks/forms-D_IeAEJM.amd.js +3 -0
  8. package/.chunks/forms-D_IeAEJM.amd.js.map +1 -0
  9. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CHYNz0kA.es.js → listItem.vue_vue_type_script_setup_true_lang-DsAW8MMm.es.js} +38 -38
  10. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-DsAW8MMm.es.js.map +1 -0
  11. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-HVMrwfs6.amd.js +2 -0
  12. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-HVMrwfs6.amd.js.map +1 -0
  13. package/.chunks/menu-C-SkDk9B.amd.js +2 -0
  14. package/.chunks/menu-C-SkDk9B.amd.js.map +1 -0
  15. package/.chunks/menu-CBKYqQZZ.es.js +120 -0
  16. package/.chunks/menu-CBKYqQZZ.es.js.map +1 -0
  17. package/.chunks/{popup-CyJ0WBUB.amd.js → popup-7Bt5JEDW.amd.js} +2 -2
  18. package/.chunks/{popup-CyJ0WBUB.amd.js.map → popup-7Bt5JEDW.amd.js.map} +1 -1
  19. package/.chunks/{popup-B2BoAirk.es.js → popup-D0tRWEp2.es.js} +9 -16
  20. package/.chunks/{popup-B2BoAirk.es.js.map → popup-D0tRWEp2.es.js.map} +1 -1
  21. package/.chunks/{widgetInput-Ce8a61St.amd.js → widgetInput-CeUAGCKd.amd.js} +2 -2
  22. package/.chunks/widgetInput-CeUAGCKd.amd.js.map +1 -0
  23. package/.chunks/{widgetInput-pNYn7i5g.es.js → widgetInput-CmVe9G3z.es.js} +2 -2
  24. package/.chunks/{widgetInput-pNYn7i5g.es.js.map → widgetInput-CmVe9G3z.es.js.map} +1 -1
  25. package/assets/forms.css +1 -1
  26. package/assets/formsExt.css +1 -1
  27. package/assets/menu.css +1 -0
  28. package/assets/project.css +1 -0
  29. package/core/core.amd.js +1 -1
  30. package/core/core.js +1 -1
  31. package/forms/forms.amd.js +1 -1
  32. package/forms/forms.js +8 -8
  33. package/formsExt/formsExt.amd.js +1 -1
  34. package/formsExt/formsExt.amd.js.map +1 -1
  35. package/formsExt/formsExt.js +248 -357
  36. package/formsExt/formsExt.js.map +1 -1
  37. package/icomoon/demo.html +16 -2
  38. package/icomoon/fonts/Topvisor-2.svg +1 -0
  39. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  40. package/icomoon/fonts/Topvisor-2.woff +0 -0
  41. package/icomoon/selection.json +1 -1
  42. package/icomoon/style.css +6 -3
  43. package/package.json +2 -2
  44. package/popup/popup.amd.js +1 -1
  45. package/popup/popup.js +2 -2
  46. package/popup/worker.amd.js +1 -1
  47. package/popup/worker.amd.js.map +1 -1
  48. package/popup/worker.d.ts +2 -0
  49. package/popup/worker.js +4 -6
  50. package/popup/worker.js.map +1 -1
  51. package/project/project.amd.js +2 -0
  52. package/project/project.amd.js.map +1 -0
  53. package/project/project.d.ts +1 -0
  54. package/project/project.js +93 -0
  55. package/project/project.js.map +1 -0
  56. package/src/components/forms/avatar/avatar.stories.d.ts +16 -15
  57. package/src/components/forms/avatar/avatar.vue.d.ts +5 -4
  58. package/src/components/forms/button/button.d.ts +2 -2
  59. package/src/components/forms/button/button.stories.d.ts +59 -58
  60. package/src/components/forms/button/button.vue.d.ts +7 -6
  61. package/src/components/forms/checkbox/checkbox.stories.d.ts +35 -34
  62. package/src/components/forms/checkbox/checkbox.vue.d.ts +16 -16
  63. package/src/components/forms/controlLabel/controlLabel.stories.d.ts +13 -13
  64. package/src/components/forms/controlLabel/controlLabel.vue.d.ts +3 -2
  65. package/src/components/forms/hint/hint.stories.d.ts +44 -44
  66. package/src/components/forms/hint/hint.vue.d.ts +3 -2
  67. package/src/components/forms/input/input.d.ts +2 -2
  68. package/src/components/forms/input/input.stories.d.ts +64 -63
  69. package/src/components/forms/input/input.vue.d.ts +7 -6
  70. package/src/components/forms/inputDate/inputDate.d.ts +2 -1
  71. package/src/components/forms/inputDate/inputDate.stories.d.ts +31 -30
  72. package/src/components/forms/inputDate/inputDate.vue.d.ts +5 -4
  73. package/src/components/forms/inputRange/inputRange.stories.d.ts +93 -92
  74. package/src/components/forms/inputRange/inputRange.vue.d.ts +1 -1
  75. package/src/components/forms/loadbar/loadbar.stories.d.ts +1 -1
  76. package/src/components/forms/loadbar/loadbar.vue.d.ts +1 -1
  77. package/src/components/forms/radio/radio.stories.d.ts +33 -32
  78. package/src/components/forms/radio/radio.vue.d.ts +4 -3
  79. package/src/components/forms/select/select.d.ts +2 -2
  80. package/src/components/forms/select/select.stories.d.ts +24 -23
  81. package/src/components/forms/select/select.vue.d.ts +22 -22
  82. package/src/components/forms/select/stories/exampleOptions.d.ts +2 -1
  83. package/src/components/forms/switcher/switcher.stories.d.ts +33 -32
  84. package/src/components/forms/switcher/switcher.vue.d.ts +4 -3
  85. package/src/components/forms/textarea/textarea.stories.d.ts +25 -24
  86. package/src/components/forms/textarea/textarea.vue.d.ts +5 -4
  87. package/src/components/formsExt/editArea/editArea.d.ts +2 -1
  88. package/src/components/formsExt/editArea/editArea.stories.d.ts +47 -46
  89. package/src/components/formsExt/editArea/editArea.vue.d.ts +5 -4
  90. package/src/components/formsExt/editInput/editInput.d.ts +3 -2
  91. package/src/components/formsExt/editInput/editInput.stories.d.ts +21 -20
  92. package/src/components/formsExt/editInput/editInput.vue.d.ts +4 -3
  93. package/src/components/formsExt/menu/menu.d.ts +2 -1
  94. package/src/components/formsExt/menu/menu.stories.d.ts +16 -15
  95. package/src/components/formsExt/menu/menu.vue.d.ts +16 -15
  96. package/src/components/formsExt/menu/stories/items.d.ts +2 -1
  97. package/src/components/formsExt/radioGroup/radioGroup.d.ts +2 -2
  98. package/src/components/formsExt/radioGroup/radioGroup.stories.d.ts +16 -15
  99. package/src/components/formsExt/radioGroup/radioGroup.vue.d.ts +14 -14
  100. package/src/components/formsExt/selector2/api.d.ts +3 -2
  101. package/src/components/formsExt/selector2/itemMulti.vue.d.ts +4 -3
  102. package/src/components/formsExt/selector2/selector2.d.ts +2 -2
  103. package/src/components/formsExt/selector2/selector2.stories.d.ts +67 -66
  104. package/src/components/formsExt/selector2/selector2.vue.d.ts +33 -32
  105. package/src/components/popup/lib/popup.d.ts +2 -4
  106. package/src/components/popup/lib/worker.d.ts +2 -1
  107. package/src/components/popup/popup/listItem.vue.d.ts +4 -3
  108. package/src/components/popup/popup/opener.vue.d.ts +6 -5
  109. package/src/components/popup/popup/popup.stories.d.ts +217 -216
  110. package/src/components/popup/popup/popup.vue.d.ts +8 -7
  111. package/src/components/popup/popup/widgetInput.vue.d.ts +28 -28
  112. package/src/components/project/project.d.ts +1 -0
  113. package/src/components/project/selectorCompetitors/selectorCompetitors.d.ts +20 -0
  114. package/src/components/project/selectorCompetitors/selectorCompetitors.stories.d.ts +42 -0
  115. package/src/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +24 -0
  116. package/src/components/project/selectorCompetitors/stories/items.d.ts +4 -0
  117. package/src/components/tabs/tabs/content.vue.d.ts +3 -2
  118. package/src/components/tabs/tabs/tab.vue.d.ts +3 -2
  119. package/src/components/tabs/tabs/tabs.stories.d.ts +184 -184
  120. package/src/components/tabs/tabs/tabs.vue.d.ts +3 -2
  121. package/src/components/tabsView/tabsView/menu.vue.d.ts +6 -6
  122. package/src/components/tabsView/tabsView/menuDelimeter.vue.d.ts +1 -1
  123. package/src/components/tabsView/tabsView/menuItem.vue.d.ts +5 -4
  124. package/src/components/tabsView/tabsView/menuTitle.vue.d.ts +3 -2
  125. package/src/components/tabsView/tabsView/store.d.ts +23 -22
  126. package/src/components/tabsView/tabsView/tabsView.d.ts +2 -1
  127. package/src/components/tabsView/tabsView/tabsView.stories.d.ts +94 -94
  128. package/src/components/tabsView/tabsView/tabsView.vue.d.ts +12 -12
  129. package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuItem.stories.d.ts +92 -92
  130. package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuTitle.stories.d.ts +44 -44
  131. package/src/core/core/core.d.ts +3 -3
  132. package/src/core/core/page.d.ts +4 -0
  133. package/src/core/core/state.d.ts +4 -0
  134. package/src/core/utils/check.d.ts +22 -0
  135. package/src/core/utils/date.d.ts +30 -12
  136. package/src/core/utils/device.d.ts +34 -1
  137. package/src/core/utils/dom.d.ts +23 -27
  138. package/src/core/utils/image.d.ts +6 -0
  139. package/src/core/utils/keyboard.d.ts +3 -0
  140. package/src/core/utils/number.d.ts +7 -0
  141. package/src/core/utils/price.d.ts +8 -0
  142. package/src/core/utils/scroll.d.ts +4 -0
  143. package/src/core/utils/store/localStorage.d.ts +2 -1
  144. package/src/core/utils/store/plugin.d.ts +3 -2
  145. package/src/core/utils/store/store.d.ts +3 -11
  146. package/src/core/utils/string.d.ts +80 -0
  147. package/src/core/utils/url.d.ts +32 -0
  148. package/tabs/tabs.amd.js +1 -1
  149. package/tabs/tabs.js +1 -1
  150. package/tabsView/tabsView.amd.js +1 -1
  151. package/tabsView/tabsView.amd.js.map +1 -1
  152. package/tabsView/tabsView.js +6 -10
  153. package/tabsView/tabsView.js.map +1 -1
  154. package/utils/check.amd.js +2 -0
  155. package/utils/check.amd.js.map +1 -0
  156. package/utils/check.d.ts +1 -0
  157. package/utils/check.js +26 -0
  158. package/utils/check.js.map +1 -0
  159. package/utils/css.amd.js.map +1 -1
  160. package/utils/css.js +1 -2
  161. package/utils/css.js.map +1 -1
  162. package/utils/date.amd.js +1 -1
  163. package/utils/date.js +8 -5
  164. package/utils/device.amd.js +1 -1
  165. package/utils/device.js +11 -7
  166. package/utils/dom.amd.js.map +1 -1
  167. package/utils/dom.js.map +1 -1
  168. package/utils/image.amd.js +2 -0
  169. package/utils/image.amd.js.map +1 -0
  170. package/utils/image.d.ts +1 -0
  171. package/utils/image.js +8 -0
  172. package/utils/image.js.map +1 -0
  173. package/utils/keyboard.amd.js.map +1 -1
  174. package/utils/keyboard.js.map +1 -1
  175. package/utils/number.amd.js +2 -0
  176. package/utils/number.amd.js.map +1 -0
  177. package/utils/number.d.ts +1 -0
  178. package/utils/number.js +9 -0
  179. package/utils/number.js.map +1 -0
  180. package/utils/price.amd.js +2 -0
  181. package/utils/price.amd.js.map +1 -0
  182. package/utils/price.d.ts +1 -0
  183. package/utils/price.js +10 -0
  184. package/utils/price.js.map +1 -0
  185. package/utils/route.amd.js.map +1 -1
  186. package/utils/route.js.map +1 -1
  187. package/utils/scroll.amd.js +1 -1
  188. package/utils/scroll.amd.js.map +1 -1
  189. package/utils/scroll.js +21 -15
  190. package/utils/scroll.js.map +1 -1
  191. package/utils/string.amd.js +2 -0
  192. package/utils/string.amd.js.map +1 -0
  193. package/utils/string.d.ts +1 -0
  194. package/utils/string.js +138 -0
  195. package/utils/string.js.map +1 -0
  196. package/utils/system.amd.js.map +1 -1
  197. package/utils/system.js.map +1 -1
  198. package/utils/url.amd.js +3 -0
  199. package/utils/url.amd.js.map +1 -0
  200. package/utils/url.d.ts +1 -0
  201. package/utils/url.js +176 -0
  202. package/utils/url.js.map +1 -0
  203. package/utils/window.amd.js +1 -1
  204. package/utils/window.js +1 -1
  205. package/.chunks/forms-C4UtO06K.es.js +0 -1026
  206. package/.chunks/forms-C4UtO06K.es.js.map +0 -1
  207. package/.chunks/forms-DujTMzoW.amd.js +0 -3
  208. package/.chunks/forms-DujTMzoW.amd.js.map +0 -1
  209. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CHYNz0kA.es.js.map +0 -1
  210. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Ob3185Bq.amd.js +0 -2
  211. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Ob3185Bq.amd.js.map +0 -1
  212. package/.chunks/widgetInput-Ce8a61St.amd.js.map +0 -1
@@ -0,0 +1,1179 @@
1
+ import { insertToPage as ie } from "../utils/css.js";
2
+ import { reactive as Y, defineComponent as y, useCssVars as oe, computed as b, openBlock as u, createElementBlock as m, createElementVNode as _, createCommentVNode as g, createBlock as M, resolveDynamicComponent as le, normalizeClass as w, withCtx as D, renderSlot as k, createTextVNode as de, toDisplayString as W, mergeModels as C, useModel as se, withDirectives as T, vModelCheckbox as ne, onUnmounted as pe, ref as ue, unref as B, mergeProps as A, vModelRadio as ce, resolveDirective as me, vModelText as ae, watch as fe, Fragment as O, renderList as X, vModelSelect as he, withKeys as be, withModifiers as ge } from "vue";
3
+ const re = ["../assets/forms.css"].map((t) => import.meta.resolve(t));
4
+ await ie(re);
5
+ function we() {
6
+ return "devicePixelRatio" in window && window.devicePixelRatio > 1;
7
+ }
8
+ function ve() {
9
+ return !!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|IEMobile|Opera Mini/i);
10
+ }
11
+ function ye() {
12
+ return navigator.userAgent.indexOf("Topvisor_App") != -1;
13
+ }
14
+ function _e() {
15
+ return navigator.userAgent.indexOf("Mac OS X") !== -1;
16
+ }
17
+ function eo() {
18
+ const t = /Chrome|Android/.test(navigator.userAgent);
19
+ let e = /Safari/.test(navigator.userAgent);
20
+ return t && e && (e = !1), e;
21
+ }
22
+ function to() {
23
+ return _e() ? "⌘" : "Ctrl";
24
+ }
25
+ const oo = () => $(document).scrollTop(), so = () => $(document), no = () => [document], $e = () => {
26
+ const t = [
27
+ ["iOS", /(iPhone|iPad)/i],
28
+ ["Android", /(Android)/i],
29
+ ["Windows Phone", /(IEMobile)/i],
30
+ ["Windows 3.11", /Win16/i],
31
+ ["Windows 95", /(Windows 95)|(Win95)|(Windows_95)/i],
32
+ ["Windows 98", /(Windows 98)|(Win98)/i],
33
+ ["Windows 2000", /(Windows NT 5.0)|(Windows 2000)/i],
34
+ ["Windows XP", /(Windows NT 5.1)|(Windows XP)/i],
35
+ ["Windows Server 2003", /(Windows NT 5.2)/i],
36
+ ["Windows Vista", /(Windows NT 6.0)/i],
37
+ ["Windows 7", /(Windows NT 6.1)/i],
38
+ ["Windows 8", /(Windows NT 6.[23])|(Windows 8)/i],
39
+ ["Windows 10", /(Windows NT 10)/i],
40
+ ["Windows NT 4.0", /(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)/i],
41
+ ["Windows ME", /Windows ME/i],
42
+ ["Windows", /Windows/i],
43
+ ["Open BSD", /OpenBSD/i],
44
+ ["Sun OS", /SunOS/i],
45
+ ["Linux", /(Linux)|(X11)/i],
46
+ ["Macintosh", /(Mac_PowerPC)|(Macintosh)|(Mac OS X 10.4)|(Mac OS X 10.5)|(Mac OS X 10.6)/i],
47
+ ["QNX", /QNX/i],
48
+ ["BeOS", /BeOS/i],
49
+ ["OS/2", /OS\/2/i]
50
+ ];
51
+ let e = "";
52
+ for (let s = 0; s < t.length; s++)
53
+ if (t[s][1].test(navigator.userAgent)) {
54
+ e = t[s][0];
55
+ break;
56
+ }
57
+ return e;
58
+ }, ao = async () => {
59
+ var e;
60
+ let t = $e();
61
+ if (t === "Windows 10") {
62
+ const s = await ((e = navigator == null ? void 0 : navigator.userAgentData) == null ? void 0 : e.getHighEntropyValues(["platformVersion"]));
63
+ s && s.platformVersion >= "13" && (t = "Windows 11");
64
+ }
65
+ return t;
66
+ };
67
+ class q {
68
+ /**
69
+ * Проверить скрыта страница или нет
70
+ */
71
+ static isHidden = () => document.hidden;
72
+ }
73
+ const Se = 100;
74
+ let G;
75
+ const I = /* @__PURE__ */ new Map(), R = {
76
+ width: window.innerWidth,
77
+ height: window.innerHeight
78
+ };
79
+ function ke(t) {
80
+ I.set(t, t);
81
+ }
82
+ function Me(t) {
83
+ I.delete(t);
84
+ }
85
+ function Ve(t) {
86
+ clearTimeout(G), G = setTimeout(function() {
87
+ t.topEvent = {
88
+ widthDiff: R.width - window.innerWidth,
89
+ hightDiff: R.height - window.innerHeight
90
+ }, R.width = window.innerWidth, R.height = window.innerHeight, I.forEach((e) => e(t));
91
+ }, Se);
92
+ }
93
+ window.addEventListener("resize", Ve);
94
+ const We = {
95
+ addOnReize: ke,
96
+ removeOnResize: Me
97
+ };
98
+ var ee;
99
+ const Te = {
100
+ widthForMobile: 900,
101
+ dateFormat: "Y-m-d",
102
+ /**
103
+ * Для Москвы: +0300
104
+ */
105
+ gmt: (ee = (/* @__PURE__ */ new Date()).toString().match(/GMT(\S+)/)) == null ? void 0 : ee[1]
106
+ };
107
+ var te;
108
+ const Be = {
109
+ /**
110
+ * Device by size
111
+ * @see widthForMobile
112
+ */
113
+ isMobile: !1,
114
+ /**
115
+ * Device by user agent
116
+ */
117
+ isMobileUA: !1,
118
+ /**
119
+ * true, если плотность пикселей экрана больше 1
120
+ */
121
+ isRetina: !1,
122
+ /**
123
+ * true, елси это приложение
124
+ */
125
+ isApp: !1,
126
+ /**
127
+ * true при горизонтальном расположении устройства
128
+ */
129
+ isLandscape: !0,
130
+ /**
131
+ * true при вертикальном расположении устройства
132
+ */
133
+ isPortrait: !1,
134
+ size: 0,
135
+ // См. core.options
136
+ dateFormat: "Y-m-d",
137
+ // См. core.options
138
+ gmt: (te = (/* @__PURE__ */ new Date()).toString().match(/GMT(\S+)/)) == null ? void 0 : te[1],
139
+ /**
140
+ * true, если страница скрыта
141
+ */
142
+ isHidden: !1
143
+ }, H = (t) => {
144
+ var e, s;
145
+ if (!((s = (e = p.$) == null ? void 0 : e.ui) != null && s.tooltip)) {
146
+ console.info("Для работы v-top-tooltip требуется глобальная загрузка jQuery UI Tooltip");
147
+ return;
148
+ }
149
+ return p.$(t);
150
+ }, K = (t, e) => {
151
+ var n;
152
+ const s = t.value ?? {};
153
+ return s.content ??= (n = e.props) == null ? void 0 : n.title, s.content = String(s.content).replace(/\r\n|\r|\n/g, "<br>"), s.position ??= {
154
+ my: "bottom-18px",
155
+ at: "top center"
156
+ }, s;
157
+ }, Le = {
158
+ mounted(t, e, s) {
159
+ var n;
160
+ (n = H(t)) == null || n.tooltip(K(e, s));
161
+ },
162
+ updated(t, e, s, n) {
163
+ var i;
164
+ const a = K(e, s), o = (i = H(t)) == null ? void 0 : i.tooltip("instance");
165
+ o && (o.options = {
166
+ ...o.options,
167
+ ...a
168
+ });
169
+ },
170
+ unmounted(t, e, s) {
171
+ var n;
172
+ (n = H(t)) == null || n.tooltip("destroy");
173
+ }
174
+ }, Ee = {
175
+ mounted: function(t, e) {
176
+ (e.value || e.value === void 0) && t.focus();
177
+ }
178
+ };
179
+ let E;
180
+ const ze = {
181
+ mounted(t, e, s) {
182
+ const n = e.value || "top-sticky";
183
+ E = new IntersectionObserver((a) => {
184
+ let o = a[0].intersectionRatio < 1;
185
+ o && e.arg === "bottom" && a[0].intersectionRect.y === 0 && (o = !1), t.classList.toggle(n, o);
186
+ }, {
187
+ threshold: [1]
188
+ }), E.observe(t);
189
+ },
190
+ unmounted(t, e, s) {
191
+ E == null || E.disconnect();
192
+ }
193
+ };
194
+ let Q = !1, z, F;
195
+ const P = /* @__PURE__ */ new Map(), De = (t, e) => {
196
+ const { distance: s, percent: n } = F, a = t.getBoundingClientRect().top, o = e * n / 100 / s, i = (e - a) / o;
197
+ i <= s ? t.style.transform = `translateY(${s - i}px)` : t.style.transform = "translateY(0px)";
198
+ }, Ne = (t) => {
199
+ let e = window.innerHeight;
200
+ window.addEventListener("scroll", () => {
201
+ P.forEach((s) => De(s, e));
202
+ }, { passive: !0 }), z = new IntersectionObserver((s) => {
203
+ e = window.innerHeight, s.forEach((n) => {
204
+ const a = n.target;
205
+ if (n.intersectionRatio < 0.1 ? P.delete(a) : P.set(a, a), n.intersectionRatio === 0) {
206
+ const { distance: o, percent: i } = F;
207
+ a.style.transform = `translateY(${o}px)`;
208
+ }
209
+ });
210
+ }, {
211
+ threshold: 0.1
212
+ });
213
+ }, Re = {
214
+ mounted(t, e, s) {
215
+ var i;
216
+ if (p.state.isMobileUA) return;
217
+ const n = (i = e.arg) == null ? void 0 : i.split(":");
218
+ let a = Number((n == null ? void 0 : n[0]) ?? 100), o = Number((n == null ? void 0 : n[1]) ?? 30);
219
+ F = {
220
+ distance: a,
221
+ percent: o
222
+ }, Q || (Ne(), Q = !0), z.observe(t);
223
+ },
224
+ unmounted(t, e, s) {
225
+ P.delete(t), z == null || z.unobserve(t);
226
+ }
227
+ }, Pe = () => typeof window > "u" ? {} : window, J = Pe();
228
+ class p {
229
+ /**
230
+ * Настройки словаря
231
+ */
232
+ static L = Y({
233
+ Not_date: "Not date"
234
+ });
235
+ static page = J.page ?? {};
236
+ static Page = q;
237
+ static options = Te;
238
+ static state = Y({ ...Be });
239
+ static matchMediaIsMobile;
240
+ static $ = J.$;
241
+ /**
242
+ * Добавить на страницу стили, используется для загрузки стилей из js
243
+ *
244
+ * Условная загрузка стилей m и pc отключена в пользу производительсности, стили грузятся всегда, но применяются по условию
245
+ * @param style - css стили в строке
246
+ * @param type - если указать 'm' или 'pc', то стили будут применяться по условию в зависимости от настройки this.options.widthForMobile
247
+ */
248
+ static appendStyle(e, s = "") {
249
+ let n = "all";
250
+ s === "m" && (n = "(max-width: " + this.options.widthForMobile + "px)"), s === "pc" && (n = "(min-width: " + this.options.widthForMobile + "px)");
251
+ const a = document.createElement("style");
252
+ a.innerHTML = e, a.media = n, document.head.append(a);
253
+ }
254
+ /**
255
+ * Установить как плагин в прилоежнии Vue
256
+ * Core.state является общим для всех приложений Vue на странице
257
+ * Core.options является общим для всех приложений Vue на странице
258
+ * @param app - Vue App
259
+ * @param {typeof options} options - параметры UI
260
+ */
261
+ static install(e, s) {
262
+ p.defineOptions(s), e.provide("top-core", p), this.installDirectives(e);
263
+ }
264
+ static installDirectives(e) {
265
+ e.directive("top-tooltip", Le), e.directive("top-focus", Ee), e.directive("top-sticky", ze), e.directive("top-swim-up", Re);
266
+ }
267
+ /**
268
+ * Установить конфигурацию UI
269
+ * @param {typeof options} options
270
+ */
271
+ static defineOptions(e) {
272
+ e != null && e.widthForMobile && (this.options.widthForMobile = e.widthForMobile), e != null && e.dateFormat && (this.options.dateFormat = e.dateFormat), e != null && e.gmt && (this.options.gmt = e.gmt), p.setState();
273
+ }
274
+ static setState() {
275
+ p.matchMediaIsMobile = window.matchMedia(`(max-width: ${p.options.widthForMobile}px)`), p.state.isMobileUA = ve(), p.state.isRetina = we(), p.state.isApp = ye(), p.state.dateFormat = this.options.dateFormat, p.state.gmt = this.options.gmt, p.state.isHidden = q.isHidden(), p.setStateByWindowSize(), We.addOnReize(p.onResize), p.onResize(), p.saveToCookie();
276
+ }
277
+ static onResize() {
278
+ p.setStateByWindowSize(), document.documentElement.style.setProperty("--100vh", window.innerHeight + "px");
279
+ }
280
+ static setStateByWindowSize() {
281
+ var e;
282
+ p.state.isMobile = !!((e = p.matchMediaIsMobile) != null && e.matches), p.state.isLandscape = window.innerWidth > window.innerHeight, p.state.isPortrait = !p.state.isLandscape, p.state.size = window.innerWidth > window.innerHeight ? window.innerWidth : window.innerHeight, p.saveToCookie();
283
+ }
284
+ /**
285
+ * Сохранить информацию об устройстве в cookie
286
+ */
287
+ static saveToCookie() {
288
+ const e = [
289
+ 1,
290
+ window.innerWidth,
291
+ window.innerHeight,
292
+ window.devicePixelRatio,
293
+ Number(p.state.isMobile),
294
+ Number(p.state.isRetina)
295
+ ];
296
+ document.cookie = "device=" + e.join(",") + "; path=/;";
297
+ }
298
+ }
299
+ const V = window.L ?? {}, io = (t, e, s) => {
300
+ switch (new Date(t, e, s).getDay()) {
301
+ case 0:
302
+ return V.Vs + ".";
303
+ case 1:
304
+ return V.Pn + ".";
305
+ case 2:
306
+ return V.Vt + ".";
307
+ case 3:
308
+ return V.Sr + ".";
309
+ case 4:
310
+ return V.Ct + ".";
311
+ case 5:
312
+ return V.Pt + ".";
313
+ case 6:
314
+ return V.Sb + ".";
315
+ default:
316
+ return "";
317
+ }
318
+ }, ro = (t, e = !0, s = 2) => {
319
+ let n = String(t.getFullYear()), a = String(t.getDate()).padStart(2, "0"), o = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getHours()).padStart(2, "0"), l = String(t.getMinutes()).padStart(2, "0"), f = String(t.getSeconds()).padStart(2, "0"), r = n + "-" + o + "-" + a;
320
+ return s >= 1 && (r += " " + i), s >= 2 && (r += ":" + l), s === 3 && (r += ":" + f), e && (r = L(r, s)), r;
321
+ };
322
+ function lo(t) {
323
+ return t.indexOf("T") === -1 && (t.length == 10 && (t += " 00:00:00"), t = t.replace(" ", "T") + p.state.gmt), new Date(t);
324
+ }
325
+ function Ae(t, e = !0, s = 0) {
326
+ let n;
327
+ t != null ? n = new Date(t) : n = /* @__PURE__ */ new Date();
328
+ const a = n.getFullYear(), o = String(n.getMonth() + 1).padStart(2, "0"), i = n.getDate().toString().padStart(2, "0"), l = n.getHours().toString().padStart(2, "0"), f = n.getMinutes().toString().padStart(2, "0"), r = n.getSeconds().toString().padStart(2, "0");
329
+ return n = a + "-" + o + "-" + i, s && (n += " "), s >= 1 && (n += l), s >= 2 && (n += ":" + f), s >= 3 && (n += ":" + r), e && (n = L(n, s)), n;
330
+ }
331
+ function po(t, e = !0) {
332
+ const n = (/* @__PURE__ */ new Date()).getTimezoneOffset() / 60 * -1 * 60 * 60 * 1e3, a = 3 * 60 * 60 * 1e3;
333
+ let o;
334
+ t !== void 0 ? o = new Date(t) : o = /* @__PURE__ */ new Date(), o.setTime(o.getTime() - n + a);
335
+ let i = String(o.getFullYear()), l = String(o.getDate()).padStart(2, "0"), f = String(o.getMonth() + 1).padStart(2, "0"), r = String(o.getHours()).padStart(2, "0"), d = String(o.getMinutes()).padStart(2, "0"), c = String(o.getSeconds()).padStart(2, "0"), h = i + "-" + f + "-" + l + " " + r + ":" + d + ":" + c;
336
+ return e && (h = L(h)), h;
337
+ }
338
+ function L(t, e = 2, s, n = p.L.Not_date) {
339
+ if (typeof t == "string" && (!t || t.substring(0, 10) === "0000-00-00") && n && n !== "0000-00-00")
340
+ return n;
341
+ s || (s = p.state.dateFormat.toLowerCase().toLowerCase().replace("m", "mm").replace("y", "yy").replace("d", "dd"));
342
+ let a;
343
+ if (t instanceof Date)
344
+ a = t;
345
+ else {
346
+ let i = t.substring(0, 10);
347
+ if (i.length === 7 && (i += "-01"), i += " 00:00", i = i.replace(/-/g, "/"), a = new Date(i), isNaN(Number(a))) return n;
348
+ }
349
+ let o = "";
350
+ if (s && window.$ && (o = $.datepicker.formatDate(s, a)), e && typeof t == "string" && t.length > 10 || e && t instanceof Date) {
351
+ let i = "";
352
+ if (t instanceof Date)
353
+ i = (/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", {
354
+ hour12: !1,
355
+ hour: "numeric",
356
+ minute: e >= 2 ? "numeric" : void 0,
357
+ second: e >= 3 ? "numeric" : void 0
358
+ });
359
+ else
360
+ switch (e) {
361
+ case 1:
362
+ i = t.substring(11, 13);
363
+ break;
364
+ case 2:
365
+ i = t.substring(11, 16);
366
+ break;
367
+ case 3:
368
+ i = t.substring(11, 19);
369
+ break;
370
+ }
371
+ o += " " + i;
372
+ }
373
+ return o = o.trim(), o;
374
+ }
375
+ function Z(t, e = p.L.Not_date) {
376
+ if (!t)
377
+ return e;
378
+ if (t.match(/\d\d\d\d-\d\d-\d\d/))
379
+ return t;
380
+ const s = p.state.dateFormat.toLowerCase(), n = t.split(/\W/), a = s.split(/\W/);
381
+ let o = "", i = "", l = "";
382
+ a.forEach((r, d) => {
383
+ switch (r) {
384
+ case "d":
385
+ o = n[d];
386
+ break;
387
+ case "m":
388
+ i = n[d];
389
+ break;
390
+ case "y":
391
+ l = n[d];
392
+ break;
393
+ }
394
+ });
395
+ let f = l + "-" + i + "-" + o;
396
+ return f.match(/\d\d\d\d-\d\d-\d\d/) || (console.info("Неверный формат даты, будет возращена текущая дата, " + f), f = Ae((/* @__PURE__ */ new Date()).getTime(), !1).substring(0, 10)), f;
397
+ }
398
+ const Oe = { class: "top-avatar" }, He = ["src", "title"], Ce = ["title"], Ie = /* @__PURE__ */ y({
399
+ __name: "avatar",
400
+ props: {
401
+ size: { default: 64 },
402
+ image: {},
403
+ nickname: {},
404
+ isOnline: { type: Boolean },
405
+ lastActiveTime: {},
406
+ i18n: { default: () => ({
407
+ Online: "Online",
408
+ LastSeen: "Last seen"
409
+ }) }
410
+ },
411
+ setup(t) {
412
+ oe((a) => ({
413
+ "5365dc30": a.size + "px"
414
+ }));
415
+ const e = t, s = b(() => {
416
+ var a, o;
417
+ if (e.isOnline)
418
+ return (a = e.i18n) == null ? void 0 : a.Online;
419
+ if (e.lastActiveTime)
420
+ return ((o = e.i18n) == null ? void 0 : o.LastSeen) + ": " + L(e.lastActiveTime, 2);
421
+ }), n = b(() => e.nickname ? e.nickname + (s.value ? `
422
+ ${s.value}` : "") : s.value);
423
+ return (a, o) => (u(), m("div", Oe, [
424
+ _("img", {
425
+ class: "top-avatar_image",
426
+ src: a.image,
427
+ title: n.value,
428
+ alt: ""
429
+ }, null, 8, He),
430
+ a.isOnline ? (u(), m("div", {
431
+ key: 0,
432
+ class: "top-avatar_status",
433
+ title: s.value
434
+ }, null, 8, Ce)) : g("", !0)
435
+ ]));
436
+ }
437
+ }), Fe = {
438
+ "top-avatar": "top-avatar",
439
+ "top-avatar_image": "top-avatar_image",
440
+ "top-avatar_status": "top-avatar_status"
441
+ }, v = (t, e) => {
442
+ const s = t.__vccOpts || t;
443
+ for (const [n, a] of e)
444
+ s[n] = a;
445
+ return s;
446
+ }, Ue = {
447
+ $style: Fe
448
+ }, uo = /* @__PURE__ */ v(Ie, [["__cssModules", Ue]]), Ye = {
449
+ key: 0,
450
+ class: "top-ellipsis"
451
+ }, Xe = /* @__PURE__ */ y({
452
+ __name: "button",
453
+ props: {
454
+ color: { default: "blue" },
455
+ styling: { default: "" },
456
+ size: { default: "s" },
457
+ name: {},
458
+ title: {},
459
+ icon: {},
460
+ icon2: {},
461
+ href: {},
462
+ disabled: { type: Boolean },
463
+ isSubmit: { type: Boolean },
464
+ isActive: { type: Boolean },
465
+ isProgress: { type: Boolean }
466
+ },
467
+ setup(t) {
468
+ const e = t, s = b(() => e.href ? "a" : "button"), n = b(() => e.isSubmit ? "submit" : void 0);
469
+ return (a, o) => (u(), M(le(s.value), {
470
+ class: w({
471
+ "top-active": a.isActive,
472
+ "top-disabled": a.disabled,
473
+ "top-forms-focusable": !a.disabled,
474
+ "top-button": !0,
475
+ "top-button-progress": a.isProgress,
476
+ [`top-size_${a.size}`]: !!a.size,
477
+ [`top-color_${a.color}`]: !0,
478
+ [`top-style_${a.styling}`]: !!a.styling,
479
+ "top-button-withoutText": !a.$slots.default
480
+ }),
481
+ name: a.name,
482
+ title: a.title,
483
+ href: a.href,
484
+ type: n.value,
485
+ "data-top-icon": a.icon || void 0,
486
+ "data-top-icon2": a.icon2 || void 0,
487
+ disabled: a.disabled || void 0,
488
+ inProgress: a.isProgress
489
+ }, {
490
+ default: D(() => [
491
+ a.$slots.default ? (u(), m("span", Ye, [
492
+ k(a.$slots, "default", {}, () => [
493
+ de(W(a.icon ? "" : "Button"), 1)
494
+ ])
495
+ ])) : g("", !0),
496
+ k(a.$slots, "html")
497
+ ]),
498
+ _: 3
499
+ }, 8, ["class", "name", "title", "href", "type", "data-top-icon", "data-top-icon2", "disabled", "inProgress"]));
500
+ }
501
+ }), qe = "_progress_1hqxk_1", Ge = {
502
+ "top-button": "top-button",
503
+ "top-active": "top-active",
504
+ "top-button-progress": "top-button-progress",
505
+ progress: qe,
506
+ "top-button-withoutText": "top-button-withoutText",
507
+ "top-color_blue": "top-color_blue",
508
+ "top-color_green": "top-color_green",
509
+ "top-color_orange": "top-color_orange",
510
+ "top-color_red": "top-color_red",
511
+ "top-color_pink": "top-color_pink",
512
+ "top-color_theme": "top-color_theme",
513
+ "top-style_outline": "top-style_outline",
514
+ "top-style_soft": "top-style_soft",
515
+ "top-style_transparent": "top-style_transparent",
516
+ "top-size_l": "top-size_l",
517
+ "top-size_xl": "top-size_xl"
518
+ }, Ke = {
519
+ $style: Ge
520
+ }, co = /* @__PURE__ */ v(Xe, [["__cssModules", Ke]]), Qe = { class: "top-forms-optionLabel" }, Je = /* @__PURE__ */ y({
521
+ __name: "controlLabel",
522
+ props: {
523
+ description: {},
524
+ disabled: { type: Boolean }
525
+ },
526
+ setup(t) {
527
+ return (e, s) => (u(), m("div", Qe, [
528
+ _("div", {
529
+ class: w({
530
+ "top-forms-optionLabel_title": !0,
531
+ "top-forms-optionLabel_title-disabled": e.disabled
532
+ })
533
+ }, [
534
+ k(e.$slots, "default")
535
+ ], 2),
536
+ e.description ? (u(), m("div", {
537
+ key: 0,
538
+ class: w(["top-forms-optionLabel_description", { "top-forms-optionLabel_description-disabled": e.disabled }])
539
+ }, W(e.description), 3)) : g("", !0)
540
+ ]));
541
+ }
542
+ }), Ze = {
543
+ "top-forms-optionLabel": "top-forms-optionLabel",
544
+ "top-forms-optionLabel_title": "top-forms-optionLabel_title",
545
+ "top-forms-optionLabel_title-disabled": "top-forms-optionLabel_title-disabled",
546
+ "top-forms-optionLabel_description": "top-forms-optionLabel_description",
547
+ "top-forms-optionLabel_description-disabled": "top-forms-optionLabel_description-disabled"
548
+ }, je = {
549
+ $style: Ze
550
+ }, U = /* @__PURE__ */ v(Je, [["__cssModules", je]]), xe = ["name", "value", "indeterminate", "disabled"], et = /* @__PURE__ */ y({
551
+ __name: "checkbox",
552
+ props: /* @__PURE__ */ C({
553
+ modelValue: { type: [Boolean, Array, Set] },
554
+ name: {},
555
+ value: {},
556
+ description: {},
557
+ disabled: { type: Boolean },
558
+ indeterminate: { type: Boolean },
559
+ isError: { type: Boolean }
560
+ }, {
561
+ modelValue: { type: [Boolean, Array, Set] },
562
+ modelModifiers: {}
563
+ }),
564
+ emits: ["update:modelValue"],
565
+ setup(t) {
566
+ const e = se(t, "modelValue");
567
+ return (s, n) => (u(), m("label", {
568
+ class: w({
569
+ "top-forms-optionWrapper": !0,
570
+ "top-checkbox": !0,
571
+ ["top-checkbox_" + s.name]: !!s.name,
572
+ "top-disabled": s.disabled,
573
+ "top-error": s.isError && !s.disabled
574
+ })
575
+ }, [
576
+ T(_("input", {
577
+ type: "checkbox",
578
+ class: w({
579
+ "top-forms-focusable": !s.disabled,
580
+ "top-forms-option": !0,
581
+ "top-checkbox_input": !0,
582
+ "top-error": s.isError && !s.disabled
583
+ }),
584
+ name: s.name,
585
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => e.value = a),
586
+ value: s.value,
587
+ indeterminate: s.indeterminate,
588
+ disabled: s.disabled
589
+ }, null, 10, xe), [
590
+ [ne, e.value]
591
+ ]),
592
+ s.$slots.default ? (u(), M(U, {
593
+ key: 0,
594
+ description: s.description,
595
+ disabled: s.disabled
596
+ }, {
597
+ default: D(() => [
598
+ k(s.$slots, "default")
599
+ ]),
600
+ _: 3
601
+ }, 8, ["description", "disabled"])) : g("", !0)
602
+ ], 2));
603
+ }
604
+ }), tt = {
605
+ "top-checkbox": "top-checkbox",
606
+ "top-checkbox_input": "top-checkbox_input",
607
+ "top-error": "top-error"
608
+ }, ot = {
609
+ $style: tt
610
+ }, mo = /* @__PURE__ */ v(et, [["__cssModules", ot]]), st = ["title"], nt = /* @__PURE__ */ y({
611
+ __name: "hint",
612
+ props: {
613
+ hint: {}
614
+ },
615
+ setup(t) {
616
+ return (e, s) => (u(), m("span", {
617
+ class: "top-hint",
618
+ "data-top-icon": "",
619
+ title: e.hint
620
+ }, null, 8, st));
621
+ }
622
+ }), at = {
623
+ "top-hint": "top-hint"
624
+ }, it = {
625
+ $style: at
626
+ }, rt = /* @__PURE__ */ v(nt, [["__cssModules", it]]), lt = ["modelValue"], dt = !!document.documentElement.ontouchstart && !!document.createElement("input").showPicker;
627
+ let j = (t) => {
628
+ };
629
+ const pt = /* @__PURE__ */ y({
630
+ __name: "inputDate",
631
+ props: {
632
+ modelValue: {},
633
+ name: {},
634
+ disabled: { type: Boolean },
635
+ readonly: { type: Boolean },
636
+ modificator: {},
637
+ size: {},
638
+ isError: { type: Boolean },
639
+ isLoading: { type: Boolean },
640
+ icon: {},
641
+ icon2: { default: "" },
642
+ addCleaner: { type: Boolean },
643
+ title: {},
644
+ captionType: {}
645
+ },
646
+ emits: ["update:modelValue"],
647
+ setup(t, { emit: e }) {
648
+ const s = t, n = e;
649
+ pe(() => {
650
+ o && o.datepicker("destroy");
651
+ });
652
+ const a = ue();
653
+ let o;
654
+ const i = b({
655
+ get() {
656
+ return L(s.modelValue, 2, void 0, "0000-00-00");
657
+ },
658
+ set(d) {
659
+ d = Z(d, "0000-00-00"), n("update:modelValue", d);
660
+ }
661
+ });
662
+ let l = (d) => {
663
+ j(d);
664
+ }, f = (d) => {
665
+ const c = Z(d.target.value), h = L(c);
666
+ if (!h || h === p.L.Not_date || d.target.value !== h) {
667
+ d.target.value = i.value;
668
+ return;
669
+ }
670
+ i.value = d.target.value;
671
+ };
672
+ async function r(d) {
673
+ const c = await import("./datepicker-DwZTG-k0.es.js");
674
+ j = c.oninput, o = c.connectDatepicker(d.target, {
675
+ onSelect: () => f(d)
676
+ }), o && o.datepicker("show");
677
+ }
678
+ return (d, c) => B(dt) ? (u(), M(B(x), A({ key: 0 }, d.$props, {
679
+ modelValue: i.value,
680
+ readonly: "",
681
+ onClick: c[1] || (c[1] = (h) => a.value.showPicker())
682
+ }), {
683
+ default: D(() => [
684
+ _("input", {
685
+ ref_key: "el",
686
+ ref: a,
687
+ type: "date",
688
+ class: "top-input_input-date",
689
+ modelValue: d.modelValue,
690
+ onChange: c[0] || (c[0] = (h) => i.value = h.target.value),
691
+ tabindex: "-1"
692
+ }, null, 40, lt)
693
+ ]),
694
+ _: 1
695
+ }, 16, ["modelValue"])) : (u(), M(B(x), A({ key: 1 }, d.$props, {
696
+ modelValue: i.value,
697
+ "onUpdate:modelValue": c[2] || (c[2] = (h) => h === "" ? i.value = "" : ""),
698
+ onInput: B(l),
699
+ onFocusOnce: r,
700
+ onChange: B(f),
701
+ modificator: "datepicker"
702
+ }), null, 16, ["modelValue", "onInput", "onChange"]));
703
+ }
704
+ }), ut = {
705
+ "top-input-datepicker": "top-input-datepicker",
706
+ "top-input_input-date": "top-input_input-date"
707
+ }, ct = {
708
+ $style: ut
709
+ }, fo = /* @__PURE__ */ v(pt, [["__cssModules", ct]]), mt = { class: "top-inputRange" }, ft = /* @__PURE__ */ _("span", { class: "top-inputRange_dash" }, " — ", -1), ht = /* @__PURE__ */ y({
710
+ __name: "inputRange",
711
+ setup(t) {
712
+ return (e, s) => (u(), m("div", mt, [
713
+ k(e.$slots, "from"),
714
+ ft,
715
+ k(e.$slots, "to")
716
+ ]));
717
+ }
718
+ }), bt = {
719
+ "top-inputRange": "top-inputRange",
720
+ "top-inputRange_dash": "top-inputRange_dash",
721
+ "top-input": "top-input"
722
+ }, gt = {
723
+ $style: bt
724
+ }, ho = /* @__PURE__ */ v(ht, [["__cssModules", gt]]), wt = ["name", "value", "disabled"], vt = /* @__PURE__ */ y({
725
+ __name: "radio",
726
+ props: {
727
+ modelValue: {},
728
+ value: {},
729
+ name: {},
730
+ description: {},
731
+ disabled: { type: Boolean },
732
+ isError: { type: Boolean }
733
+ },
734
+ emits: ["update:modelValue"],
735
+ setup(t, { emit: e }) {
736
+ const s = t, n = e, a = b({
737
+ get() {
738
+ return s.modelValue;
739
+ },
740
+ set(o) {
741
+ n("update:modelValue", o);
742
+ }
743
+ });
744
+ return (o, i) => (u(), m("label", {
745
+ class: w({
746
+ "top-forms-optionWrapper": !0,
747
+ "top-radio": !0,
748
+ ["top-radio_" + o.name]: o.name !== "",
749
+ "top-disabled": o.disabled,
750
+ "top-error": o.isError && !o.disabled
751
+ })
752
+ }, [
753
+ T(_("input", {
754
+ type: "radio",
755
+ class: w({
756
+ "top-forms-focusable": !o.disabled,
757
+ "top-forms-option": !0,
758
+ "top-radio_input": !0,
759
+ "top-error": o.isError && !o.disabled
760
+ }),
761
+ "onUpdate:modelValue": i[0] || (i[0] = (l) => a.value = l),
762
+ name: o.name,
763
+ value: o.value,
764
+ disabled: o.disabled
765
+ }, null, 10, wt), [
766
+ [ce, a.value]
767
+ ]),
768
+ o.$slots.default ? (u(), M(U, {
769
+ key: 0,
770
+ description: o.description,
771
+ disabled: o.disabled
772
+ }, {
773
+ default: D(() => [
774
+ k(o.$slots, "default")
775
+ ]),
776
+ _: 3
777
+ }, 8, ["description", "disabled"])) : g("", !0)
778
+ ], 2));
779
+ }
780
+ }), yt = {
781
+ "top-radio": "top-radio",
782
+ "top-radio_input": "top-radio_input",
783
+ "top-error": "top-error"
784
+ }, _t = {
785
+ $style: yt
786
+ }, bo = /* @__PURE__ */ v(vt, [["__cssModules", _t]]), $t = ["name", "value", "disabled"], St = /* @__PURE__ */ y({
787
+ __name: "switcher",
788
+ props: {
789
+ modelValue: { type: [Boolean, Array, Set] },
790
+ name: {},
791
+ value: {},
792
+ description: {},
793
+ disabled: { type: Boolean },
794
+ isError: { type: Boolean }
795
+ },
796
+ emits: ["update:modelValue"],
797
+ setup(t, { emit: e }) {
798
+ const s = t, n = e, a = b({
799
+ get() {
800
+ return s.modelValue;
801
+ },
802
+ set(o) {
803
+ n("update:modelValue", o);
804
+ }
805
+ });
806
+ return (o, i) => (u(), m("label", {
807
+ class: w({
808
+ "top-forms-optionWrapper": !0,
809
+ "top-checkboxSwitcher": !0,
810
+ "top-disabled": o.disabled,
811
+ "top-error": o.isError && !o.disabled
812
+ })
813
+ }, [
814
+ T(_("input", {
815
+ type: "checkbox",
816
+ class: w({
817
+ "top-forms-focusable": !o.disabled,
818
+ "top-forms-option": !0,
819
+ "top-checkboxSwitcher_input": !0,
820
+ "top-error": o.isError && !o.disabled
821
+ }),
822
+ "onUpdate:modelValue": i[0] || (i[0] = (l) => a.value = l),
823
+ name: o.name,
824
+ value: o.value,
825
+ disabled: o.disabled
826
+ }, null, 10, $t), [
827
+ [ne, a.value]
828
+ ]),
829
+ o.$slots.default ? (u(), M(U, {
830
+ key: 0,
831
+ description: o.description,
832
+ disabled: o.disabled
833
+ }, {
834
+ default: D(() => [
835
+ k(o.$slots, "default")
836
+ ]),
837
+ _: 3
838
+ }, 8, ["description", "disabled"])) : g("", !0)
839
+ ], 2));
840
+ }
841
+ }), kt = {
842
+ "top-checkboxSwitcher": "top-checkboxSwitcher",
843
+ "top-checkboxSwitcher_input": "top-checkboxSwitcher_input",
844
+ "top-error": "top-error"
845
+ }, Mt = {
846
+ $style: kt
847
+ }, go = /* @__PURE__ */ v(St, [["__cssModules", Mt]]), Vt = ["name", "placeholder", "disabled", "readonly", "rows"], Wt = {
848
+ key: 0,
849
+ class: "top-textarea_pseudoContent"
850
+ }, Tt = /* @__PURE__ */ y({
851
+ inheritAttrs: !1,
852
+ __name: "textarea",
853
+ props: {
854
+ modelValue: {},
855
+ name: {},
856
+ placeholder: {},
857
+ rows: { default: 5 },
858
+ minHeight: { default: 120 },
859
+ expandable: { type: Boolean },
860
+ disabled: { type: Boolean },
861
+ readonly: { type: Boolean },
862
+ isError: { type: Boolean },
863
+ hint: {}
864
+ },
865
+ emits: ["update:modelValue"],
866
+ setup(t, { emit: e }) {
867
+ oe((o) => ({
868
+ c35baa86: o.minHeight + "px"
869
+ }));
870
+ const s = t, n = e, a = b({
871
+ get() {
872
+ return s.modelValue;
873
+ },
874
+ set(o) {
875
+ n("update:modelValue", o);
876
+ }
877
+ });
878
+ return (o, i) => {
879
+ const l = me("top-tooltip");
880
+ return u(), m("label", {
881
+ class: w({
882
+ "top-textarea": !0,
883
+ ["top-textarea-" + o.name]: o.name,
884
+ "top-disabled": o.disabled
885
+ })
886
+ }, [
887
+ T(_("textarea", A({
888
+ type: "text",
889
+ class: {
890
+ "top-forms-focusable": !o.disabled,
891
+ "top-textarea_textarea": !0,
892
+ "top-textarea_textarea-expandable": o.expandable,
893
+ "top-error": o.isError
894
+ },
895
+ autocomplete: "off_always",
896
+ name: o.name,
897
+ placeholder: o.placeholder,
898
+ disabled: o.disabled,
899
+ readonly: o.readonly,
900
+ rows: o.expandable ? void 0 : o.rows
901
+ }, o.$attrs, {
902
+ "onUpdate:modelValue": i[0] || (i[0] = (f) => a.value = f)
903
+ }), null, 16, Vt), [
904
+ [ae, a.value]
905
+ ]),
906
+ o.expandable ? (u(), m("div", Wt, W(a.value + " "), 1)) : g("", !0),
907
+ o.hint ? T((u(), M(rt, {
908
+ key: 1,
909
+ class: "top-textarea_hint",
910
+ hint: o.hint
911
+ }, null, 8, ["hint"])), [
912
+ [l]
913
+ ]) : g("", !0)
914
+ ], 2);
915
+ };
916
+ }
917
+ }), Bt = {
918
+ "top-textarea": "top-textarea",
919
+ "top-textarea_textarea": "top-textarea_textarea",
920
+ "top-textarea_textarea-expandable": "top-textarea_textarea-expandable",
921
+ "top-textarea_pseudoContent": "top-textarea_pseudoContent",
922
+ "top-textarea_hint": "top-textarea_hint"
923
+ }, Lt = {
924
+ $style: Bt
925
+ }, wo = /* @__PURE__ */ v(Tt, [["__cssModules", Lt]]), Et = ["data-value", "data-top-icon", "data-top-icon2"], zt = ["name", "disabled"], Dt = ["label", "disabled"], Nt = ["value", "selected", "disabled"], Rt = ["value", "selected", "disabled"], Pt = {
926
+ key: 1,
927
+ class: "top-formsCaption"
928
+ }, At = /* @__PURE__ */ y({
929
+ __name: "select",
930
+ props: /* @__PURE__ */ C({
931
+ modelValue: {},
932
+ options: {},
933
+ name: {},
934
+ disabled: { type: Boolean },
935
+ icon: {},
936
+ size: { default: "s" },
937
+ addChanger: { type: Boolean },
938
+ title: {},
939
+ isError: { type: Boolean }
940
+ }, {
941
+ modelValue: {
942
+ required: !0
943
+ },
944
+ modelModifiers: {}
945
+ }),
946
+ emits: /* @__PURE__ */ C(["update:modelValue"], ["update:modelValue"]),
947
+ setup(t, { emit: e }) {
948
+ const s = t, n = se(t, "modelValue"), a = b(() => {
949
+ const r = /* @__PURE__ */ new Map();
950
+ return s.options.forEach((d, c) => {
951
+ if (typeof d == "string" && (d = i(c, d)), d.children) {
952
+ const h = /* @__PURE__ */ new Map();
953
+ d.children.forEach((S, N) => {
954
+ typeof S == "string" && (S = i(N, S)), h.set(S.value, S);
955
+ }), d = { ...d }, d.children = h, r.set(d.value, d);
956
+ } else
957
+ r.set(d.value, d);
958
+ }), r;
959
+ }), o = b(() => {
960
+ const r = /* @__PURE__ */ new Map();
961
+ return a.value.forEach((d) => {
962
+ if (!d.disabled) {
963
+ if (d.children) {
964
+ d.children.forEach((c) => {
965
+ c.disabled || r.set(c.value, c);
966
+ });
967
+ return;
968
+ }
969
+ r.set(d.value, d);
970
+ }
971
+ }), r;
972
+ }), i = (r, d) => ({
973
+ value: r,
974
+ title: d
975
+ });
976
+ fe([
977
+ () => s.modelValue,
978
+ o
979
+ ], () => {
980
+ (n.value === null || n.value === void 0) && o.value.size && (console.warn("Пожалуйста, не передавайте в компонент Select значения null и undefined"), n.value = o.value.keys().next().value);
981
+ }, { immediate: !0 });
982
+ const l = b(() => {
983
+ var r;
984
+ return (r = o.value.get(n.value)) == null ? void 0 : r.icon;
985
+ }), f = () => {
986
+ const r = [...o.value.keys()], c = (r.indexOf(n.value) + 1) % r.length;
987
+ n.value = r[c];
988
+ };
989
+ return (r, d) => (u(), m("label", {
990
+ class: w({
991
+ "top-select": !0,
992
+ ["top-select-" + r.name]: r.name,
993
+ ["top-size_" + r.size]: !0,
994
+ "top-formsCaptionWrapper": !!r.title,
995
+ "top-select-error": r.isError,
996
+ "top-disabled": r.disabled
997
+ }),
998
+ "data-value": n.value,
999
+ "data-top-icon": r.icon,
1000
+ "data-top-icon2": l.value
1001
+ }, [
1002
+ T(_("select", {
1003
+ class: w({
1004
+ "top-forms-focusable": !r.disabled,
1005
+ "top-select_select": !0,
1006
+ "top-select_arrow": !0,
1007
+ "top-error": r.isError
1008
+ }),
1009
+ name: r.name,
1010
+ disabled: r.disabled,
1011
+ "onUpdate:modelValue": d[0] || (d[0] = (c) => n.value = c)
1012
+ }, [
1013
+ (u(!0), m(O, null, X(a.value, ([c, h]) => (u(), m(O, null, [
1014
+ h.children ? (u(), m("optgroup", {
1015
+ key: "group_" + c,
1016
+ label: h.title,
1017
+ disabled: h.disabled
1018
+ }, [
1019
+ (u(!0), m(O, null, X(h.children, ([S, N]) => (u(), m("option", {
1020
+ key: S,
1021
+ value: S,
1022
+ selected: S === n.value,
1023
+ disabled: N.disabled
1024
+ }, W(N.title), 9, Nt))), 128))
1025
+ ], 8, Dt)) : (u(), m("option", {
1026
+ key: c ?? void 0,
1027
+ value: c,
1028
+ selected: c === n.value,
1029
+ disabled: h.disabled
1030
+ }, W(h.title), 9, Rt))
1031
+ ], 64))), 256))
1032
+ ], 10, zt), [
1033
+ [he, n.value]
1034
+ ]),
1035
+ r.addChanger && o.value.size && !r.disabled ? (u(), m("span", {
1036
+ key: 0,
1037
+ class: "top-changer",
1038
+ onClick: f
1039
+ })) : g("", !0),
1040
+ r.title ? (u(), m("span", Pt, W(r.title), 1)) : g("", !0)
1041
+ ], 10, Et));
1042
+ }
1043
+ }), Ot = {
1044
+ "top-select": "top-select",
1045
+ "top-select-error": "top-select-error",
1046
+ "top-select_select": "top-select_select",
1047
+ "top-changer": "top-changer"
1048
+ }, Ht = {
1049
+ $style: Ot
1050
+ }, vo = /* @__PURE__ */ v(At, [["__cssModules", Ht]]), Ct = {
1051
+ "top-loadbar": "top-loadbar"
1052
+ }, It = {}, Ft = { class: "top-loadbar" };
1053
+ function Ut(t, e) {
1054
+ return u(), m("div", Ft);
1055
+ }
1056
+ const Yt = {
1057
+ $style: Ct
1058
+ }, Xt = /* @__PURE__ */ v(It, [["render", Ut], ["__cssModules", Yt]]), qt = ["data-top-icon", "data-top-icon2"], Gt = ["name", "title", "placeholder", "disabled", "readonly"], Kt = {
1059
+ key: 2,
1060
+ class: "top-formsCaption"
1061
+ }, Qt = /* @__PURE__ */ y({
1062
+ inheritAttrs: !1,
1063
+ __name: "input",
1064
+ props: {
1065
+ modelValue: {},
1066
+ name: {},
1067
+ disabled: { type: Boolean },
1068
+ readonly: { type: Boolean },
1069
+ modificator: {},
1070
+ size: { default: "s" },
1071
+ isError: { type: Boolean },
1072
+ isLoading: { type: Boolean },
1073
+ icon: {},
1074
+ icon2: {},
1075
+ addCleaner: { type: Boolean },
1076
+ title: {},
1077
+ captionType: { default: "" }
1078
+ },
1079
+ emits: ["update:modelValue"],
1080
+ setup(t, { emit: e }) {
1081
+ const s = t, n = e, a = b({
1082
+ get() {
1083
+ return s.modelValue;
1084
+ },
1085
+ set(l) {
1086
+ n("update:modelValue", l);
1087
+ }
1088
+ }), o = b(() => s.addCleaner && !s.title || s.captionType !== "" ? "" : s.title), i = (l) => {
1089
+ s.modelValue && l.stopPropagation(), n("update:modelValue", "");
1090
+ };
1091
+ return (l, f) => (u(), m("label", {
1092
+ class: w({
1093
+ "top-input": !0,
1094
+ ["top-size_" + l.size]: !0,
1095
+ "top-disabled": l.disabled,
1096
+ ["top-input-" + l.modificator]: !!l.modificator,
1097
+ "top-input-withCleaner": l.addCleaner && a.value && a.value !== "0000-00-00",
1098
+ "top-formsCaptionWrapper": l.captionType !== "",
1099
+ "top-formsCaptionWrapper-always": l.captionType === "top"
1100
+ }),
1101
+ "data-top-icon": l.icon,
1102
+ "data-top-icon2": l.icon2
1103
+ }, [
1104
+ l.isLoading ? (u(), M(B(Xt), { key: 0 })) : g("", !0),
1105
+ T(_("input", A({
1106
+ type: "text",
1107
+ class: {
1108
+ "top-input_input": !0,
1109
+ ["top-input_input-" + l.modificator]: !!l.modificator,
1110
+ "top-forms-focusable": !l.disabled,
1111
+ "top-error": l.isError
1112
+ },
1113
+ autocomplete: "off_always",
1114
+ name: l.name,
1115
+ "onUpdate:modelValue": f[0] || (f[0] = (r) => a.value = r),
1116
+ title: l.title,
1117
+ placeholder: o.value,
1118
+ disabled: l.disabled,
1119
+ readonly: l.readonly,
1120
+ onKeydown: f[1] || (f[1] = be((r) => (l.addCleaner || !!l.$slots.btn) && i(r), ["esc"]))
1121
+ }, l.$attrs), null, 16, Gt), [
1122
+ [ae, a.value]
1123
+ ]),
1124
+ l.addCleaner && a.value && a.value !== "0000-00-00" ? (u(), m("span", {
1125
+ key: 1,
1126
+ class: "top-input_cleaner",
1127
+ "data-top-icon": "",
1128
+ onClick: ge(i, ["prevent"])
1129
+ })) : g("", !0),
1130
+ l.captionType !== "" ? (u(), m("span", Kt, W(l.title), 1)) : g("", !0),
1131
+ k(l.$slots, "default")
1132
+ ], 10, qt));
1133
+ }
1134
+ }), Jt = {
1135
+ "top-input": "top-input",
1136
+ "top-input_input": "top-input_input",
1137
+ "top-input-withCleaner": "top-input-withCleaner",
1138
+ "top-input_cleaner": "top-input_cleaner",
1139
+ "top-loadbar": "top-loadbar"
1140
+ }, Zt = {
1141
+ $style: Jt
1142
+ }, x = /* @__PURE__ */ v(Qt, [["__cssModules", Zt]]);
1143
+ export {
1144
+ co as B,
1145
+ p as C,
1146
+ We as E,
1147
+ rt as H,
1148
+ x as I,
1149
+ Xt as L,
1150
+ wo as T,
1151
+ J as _,
1152
+ v as a,
1153
+ we as b,
1154
+ ve as c,
1155
+ L as d,
1156
+ ye as e,
1157
+ _e as f,
1158
+ to as g,
1159
+ oo as h,
1160
+ eo as i,
1161
+ so as j,
1162
+ no as k,
1163
+ ao as l,
1164
+ io as m,
1165
+ ro as n,
1166
+ Ae as o,
1167
+ po as p,
1168
+ Z as q,
1169
+ uo as r,
1170
+ lo as s,
1171
+ mo as t,
1172
+ U as u,
1173
+ fo as v,
1174
+ ho as w,
1175
+ bo as x,
1176
+ go as y,
1177
+ vo as z
1178
+ };
1179
+ //# sourceMappingURL=forms-1ZAO_mt8.es.js.map