@skyservice-developers/vue-dev-kit 1.5.12 → 2.0.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 (57) hide show
  1. package/README.md +96 -15
  2. package/dist/api-BOvdjB3h.js +266 -0
  3. package/dist/api-D5C6FvTr.cjs +1 -0
  4. package/dist/components/BaseTeleport.vue.d.ts +14 -0
  5. package/dist/components/Dialog.vue.d.ts +28 -0
  6. package/dist/components/DialogModal.vue.d.ts +28 -0
  7. package/dist/components/DialogNext.vue.d.ts +28 -0
  8. package/dist/components/Header.vue.d.ts +37 -0
  9. package/dist/components/Modal.vue.d.ts +30 -0
  10. package/dist/components/SkyButton.vue.d.ts +22 -0
  11. package/dist/components/SkySelect.vue.d.ts +16 -0
  12. package/dist/components/index.d.ts +8 -0
  13. package/dist/index.d.ts +3 -0
  14. package/dist/sdk/api.d.ts +54 -0
  15. package/dist/sdk/bridge.d.ts +43 -0
  16. package/dist/sdk/index.d.ts +6 -0
  17. package/dist/sdk/types.d.ts +73 -0
  18. package/dist/sdk/webview.d.ts +16 -0
  19. package/dist/sdk.cjs +1 -0
  20. package/dist/sdk.js +33 -0
  21. package/dist/style.css +1 -0
  22. package/dist/vue-dev-kit.cjs +1 -0
  23. package/dist/vue-dev-kit.js +903 -0
  24. package/package.json +32 -43
  25. package/dist/vue2/style.css +0 -1
  26. package/dist/vue2/vue-dev-kit.cjs +0 -1
  27. package/dist/vue2/vue-dev-kit.js +0 -2622
  28. package/dist/vue3/style.css +0 -1
  29. package/dist/vue3/vue-dev-kit.cjs +0 -1
  30. package/dist/vue3/vue-dev-kit.js +0 -2277
  31. package/src/index.js +0 -9
  32. package/src/shared/index.js +0 -1
  33. package/src/shared/types/index.d.ts +0 -72
  34. package/src/shared/utils/index.js +0 -2
  35. package/src/shared/utils/parentBridge.js +0 -84
  36. package/src/shared/utils/webviewCheck.js +0 -54
  37. package/src/styles/scrollbar.css +0 -17
  38. package/src/vue2/components/BaseTeleport.vue +0 -16
  39. package/src/vue2/components/Dialog.vue +0 -106
  40. package/src/vue2/components/DialogModal.vue +0 -439
  41. package/src/vue2/components/DialogNext.vue +0 -379
  42. package/src/vue2/components/Header.vue +0 -466
  43. package/src/vue2/components/Modal.vue +0 -252
  44. package/src/vue2/components/SkyButton.vue +0 -144
  45. package/src/vue2/components/SkySelect.vue +0 -327
  46. package/src/vue2/components/index.js +0 -6
  47. package/src/vue2/index.js +0 -2
  48. package/src/vue3/components/BaseTeleport.vue +0 -16
  49. package/src/vue3/components/Dialog.vue +0 -97
  50. package/src/vue3/components/DialogModal.vue +0 -458
  51. package/src/vue3/components/DialogNext.vue +0 -427
  52. package/src/vue3/components/Header.vue +0 -505
  53. package/src/vue3/components/Modal.vue +0 -253
  54. package/src/vue3/components/SkyButton.vue +0 -140
  55. package/src/vue3/components/SkySelect.vue +0 -266
  56. package/src/vue3/components/index.js +0 -8
  57. package/src/vue3/index.js +0 -2
@@ -0,0 +1,903 @@
1
+ import { ref as b, onUnmounted as P, computed as S, onMounted as D, openBlock as i, createElementBlock as r, createElementVNode as t, createCommentVNode as g, normalizeClass as E, renderSlot as x, toDisplayString as $, Fragment as G, renderList as Q, useSlots as Y, watch as F, nextTick as Z, createBlock as z, Teleport as U, normalizeStyle as W, createTextVNode as ee, resolveDynamicComponent as se, createSlots as ne, withCtx as X, withModifiers as ae, mergeProps as ie, onBeforeUnmount as de } from "vue";
2
+ import { A as ue, f as re, o as I, B as ce, c as _, y as fe, z as j, k as ye, r as H, e as ve, p as te, l as oe } from "./api-BOvdjB3h.js";
3
+ import { S as bt, g as wt, a as $t, b as St, d as xt, h as Bt, i as Ct, j as Et, m as Vt, n as Tt, q as It, s as Lt, t as Mt, u as Pt, v as Dt, w as zt, x as Ot, C as At } from "./api-BOvdjB3h.js";
4
+ import "ua-parser-js";
5
+ const L = (e, p) => {
6
+ const s = e.__vccOpts || e;
7
+ for (const [c, y] of p)
8
+ s[c] = y;
9
+ return s;
10
+ }, ke = { class: "sky-header-container" }, me = { class: "topmenubox" }, ge = { class: "header-left" }, pe = ["title"], he = {
11
+ width: "15",
12
+ height: "15",
13
+ viewBox: "0 0 451.847 451.847",
14
+ style: { transform: "rotate(90deg)" }
15
+ }, be = { class: "notPadding" }, we = { class: "topmenu-title" }, $e = {
16
+ key: 0,
17
+ class: "title-dropdown"
18
+ }, Se = { class: "title-dropdown-header" }, xe = ["onClick"], Be = { class: "pageName" }, Ce = { class: "pageVisit" }, Ee = {
19
+ key: 0,
20
+ class: "topmenu-description"
21
+ }, Ve = { class: "topmenubox-button" }, Te = {
22
+ __name: "Header",
23
+ props: {
24
+ title: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ subtitle: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ showBackButton: {
33
+ type: Boolean,
34
+ default: !0
35
+ },
36
+ backButtonTitle: {
37
+ type: String,
38
+ default: "Назад"
39
+ },
40
+ backEvent: {
41
+ type: Function,
42
+ default: null
43
+ },
44
+ dropdownItems: {
45
+ type: Array,
46
+ default: () => []
47
+ },
48
+ dropdownTitle: {
49
+ type: String,
50
+ default: "Останні відвідані розділи"
51
+ },
52
+ visitLabel: {
53
+ type: String,
54
+ default: "Останнє відвідування"
55
+ },
56
+ trackPageName: {
57
+ type: String,
58
+ default: ""
59
+ },
60
+ trackPagePath: {
61
+ type: String,
62
+ default: ""
63
+ },
64
+ appId: {
65
+ type: String,
66
+ default: ""
67
+ }
68
+ },
69
+ emits: ["back", "navigate"],
70
+ setup(e, { emit: p }) {
71
+ const s = e;
72
+ ue(s.appId || re());
73
+ const c = p, y = b(null), d = b(!1), k = b([]), a = b({});
74
+ I() && s.trackPageName && ce(
75
+ s.trackPageName,
76
+ s.trackPagePath || `/${s.trackPageName}`
77
+ );
78
+ const u = b(null);
79
+ I() && _("rocketMode").then(async (l) => {
80
+ u.value = l, await _("fallbackRocketMode") === null && fe("fallbackRocketMode", l === !0 || l === "true" ? "true" : "false"), j(!0);
81
+ }), P(() => {
82
+ M();
83
+ }), I() && ye("lang").then((l) => {
84
+ l != null && (a.value = l);
85
+ });
86
+ function m(l) {
87
+ try {
88
+ if (!l) return;
89
+ const f = typeof l == "string" ? JSON.parse(l) : l;
90
+ f != null && f.pages && (k.value = Object.values(f.pages));
91
+ } catch {
92
+ }
93
+ }
94
+ m(localStorage.componentStats), I() && _("componentStats").then((l) => {
95
+ l != null && (localStorage.setItem("componentStats", JSON.stringify(l)), m(l));
96
+ });
97
+ const h = S(() => [...s.dropdownItems.length ? s.dropdownItems : k.value].sort((f, T) => T.lastVisit - f.lastVisit)), w = () => {
98
+ h.value.length && (d.value = !d.value);
99
+ }, B = () => {
100
+ d.value = !1;
101
+ }, C = (l) => {
102
+ c("navigate", l.path), I() && H(l.path), B();
103
+ }, V = (l) => {
104
+ if (!l) return "";
105
+ const f = a.value[l] || l;
106
+ return f.charAt(0).toUpperCase() + f.slice(1);
107
+ }, n = (l) => {
108
+ const T = Date.now() - l, A = Math.floor(T / 1e3), N = Math.floor(A / 60), R = Math.floor(N / 60), K = Math.floor(R / 24);
109
+ return K > 0 ? `${K}д тому` : R > 0 ? `${R}год тому` : N > 0 ? `${N}хв тому` : `${A}с тому`;
110
+ }, o = (l) => {
111
+ y.value && !y.value.contains(l.target) && B();
112
+ };
113
+ D(() => {
114
+ document.addEventListener("click", o, !0);
115
+ }), P(() => {
116
+ document.removeEventListener("click", o, !0);
117
+ });
118
+ const v = S(() => s.backEvent || s.showBackButton && I()), M = () => {
119
+ if (u.value !== null) {
120
+ const l = u.value === !0 || u.value === "true";
121
+ j(l);
122
+ }
123
+ }, O = () => h.value.find((l) => l.name !== s.trackPageName && l.path), le = async () => {
124
+ if (s.backEvent)
125
+ return M(), s.backEvent();
126
+ let l = O();
127
+ if (!l && I()) {
128
+ const f = await _("componentStats");
129
+ f && (m(f), l = O());
130
+ }
131
+ M(), l ? H(l.path) : ve();
132
+ };
133
+ return (l, f) => (i(), r("header", ke, [
134
+ t("div", me, [
135
+ t("div", ge, [
136
+ v.value ? (i(), r("button", {
137
+ key: 0,
138
+ class: "btn-back",
139
+ onClick: le,
140
+ title: e.backButtonTitle
141
+ }, [
142
+ (i(), r("svg", he, [...f[0] || (f[0] = [
143
+ t("path", {
144
+ fill: "currentColor",
145
+ d: "M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"
146
+ }, null, -1)
147
+ ])]))
148
+ ], 8, pe)) : g("", !0),
149
+ t("div", {
150
+ ref_key: "dropdownRef",
151
+ ref: y,
152
+ class: "titleAndDesc"
153
+ }, [
154
+ t("button", {
155
+ class: E(["title-dropdown-toggle", { "title-dropdown-toggle-active": h.value.length }]),
156
+ onClick: w
157
+ }, [
158
+ x(l.$slots, "title", {}, () => [
159
+ t("h4", be, [
160
+ t("span", we, $(e.title), 1),
161
+ h.value.length ? (i(), r("svg", {
162
+ key: 0,
163
+ class: E(["arrow", { open: d.value }]),
164
+ width: "12",
165
+ height: "12",
166
+ viewBox: "0 0 451.847 451.847",
167
+ style: { "flex-shrink": "0" }
168
+ }, [...f[1] || (f[1] = [
169
+ t("path", {
170
+ fill: "currentColor",
171
+ d: "M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"
172
+ }, null, -1)
173
+ ])], 2)) : g("", !0)
174
+ ])
175
+ ], !0)
176
+ ], 2),
177
+ d.value && h.value.length ? (i(), r("div", $e, [
178
+ t("div", Se, $(e.dropdownTitle), 1),
179
+ f[2] || (f[2] = t("div", { class: "title-dropdown-divider" }, null, -1)),
180
+ (i(!0), r(G, null, Q(h.value, (T, A) => (i(), r("div", {
181
+ key: A,
182
+ class: "title-dropdown-item",
183
+ onClick: (N) => C(T)
184
+ }, [
185
+ t("p", Be, $(V(T.name)), 1),
186
+ t("small", Ce, " (" + $(e.visitLabel) + " " + $(n(T.lastVisit)) + ") ", 1)
187
+ ], 8, xe))), 128))
188
+ ])) : g("", !0),
189
+ x(l.$slots, "subtitle", {}, () => [
190
+ e.subtitle ? (i(), r("p", Ee, $(e.subtitle), 1)) : g("", !0)
191
+ ], !0)
192
+ ], 512)
193
+ ]),
194
+ t("div", Ve, [
195
+ f[3] || (f[3] = t("div", null, null, -1)),
196
+ x(l.$slots, "default", {}, void 0, !0),
197
+ f[4] || (f[4] = t("div", null, null, -1))
198
+ ])
199
+ ])
200
+ ]));
201
+ }
202
+ }, yt = /* @__PURE__ */ L(Te, [["__scopeId", "data-v-ad8f398f"]]), Ie = { class: "sky-dialog-overlay" }, Le = {
203
+ key: 0,
204
+ class: "sky-dialog-subtitle"
205
+ }, Me = ["title"], Pe = {
206
+ key: 0,
207
+ class: "sky-dialog-swipe-area"
208
+ }, De = {
209
+ key: 0,
210
+ class: "sky-dialog-footer"
211
+ }, ze = {
212
+ __name: "DialogModal",
213
+ props: {
214
+ modelValue: {
215
+ type: Boolean,
216
+ default: !1
217
+ },
218
+ title: {
219
+ type: String,
220
+ default: ""
221
+ },
222
+ subtitle: {
223
+ type: String,
224
+ default: ""
225
+ },
226
+ zIndex: {
227
+ type: [Number, String],
228
+ default: null
229
+ },
230
+ closeText: {
231
+ type: String,
232
+ default: "Закрити"
233
+ },
234
+ closeOnEsc: {
235
+ type: Boolean,
236
+ default: !0
237
+ },
238
+ hasButtons: {
239
+ type: Boolean,
240
+ default: null
241
+ }
242
+ },
243
+ emits: ["update:modelValue", "close", "save"],
244
+ setup(e, { emit: p }) {
245
+ const s = Y(), c = e, y = p, d = b(null), k = b(null), a = b(0), u = S(() => {
246
+ try {
247
+ return te();
248
+ } catch {
249
+ return !1;
250
+ }
251
+ }), m = S(() => {
252
+ try {
253
+ return oe();
254
+ } catch {
255
+ return !1;
256
+ }
257
+ }), h = S(() => c.hasButtons !== null ? c.hasButtons : !!s.buttons), w = () => {
258
+ y("update:modelValue", !1), y("close");
259
+ }, B = (o) => {
260
+ o.key === "Escape" && c.closeOnEsc && c.modelValue && w(), o.key === "Enter" && c.modelValue && y("save");
261
+ }, C = (o) => {
262
+ o.touches[0].clientX < 35 && (a.value = o.touches[0].clientX);
263
+ }, V = (o) => {
264
+ a.value > 0 && a.value < 35 && o.changedTouches[0].clientX - a.value > 50 && w(), a.value = 0;
265
+ }, n = () => {
266
+ if (!(!m.value || !d.value))
267
+ try {
268
+ if (typeof Android < "u" && Android.getDisplayCutoutTop) {
269
+ const o = Android.getDisplayCutoutTop();
270
+ if (o && window.devicePixelRatio > 1) {
271
+ const v = o / window.devicePixelRatio;
272
+ d.value.style.paddingTop = v + "px";
273
+ }
274
+ }
275
+ } catch {
276
+ }
277
+ };
278
+ return F(
279
+ () => c.modelValue,
280
+ (o) => {
281
+ o ? (document.body.style.overflow = "hidden", Z(() => {
282
+ n();
283
+ })) : document.body.style.overflow = "";
284
+ }
285
+ ), D(() => {
286
+ document.addEventListener("keydown", B), window.addEventListener("resize", n);
287
+ }), P(() => {
288
+ document.removeEventListener("keydown", B), window.removeEventListener("resize", n), document.body.style.overflow = "";
289
+ }), (o, v) => (i(), z(U, { to: "body" }, [
290
+ e.modelValue ? (i(), r("div", {
291
+ key: 0,
292
+ class: "sky-dialogbox sky-dialogbox-classic",
293
+ style: W([e.zIndex ? { "z-index": e.zIndex } : null])
294
+ }, [
295
+ t("div", Ie, [
296
+ t("div", {
297
+ ref_key: "dialogContent",
298
+ ref: d,
299
+ class: "sky-dialog-content"
300
+ }, [
301
+ t("div", {
302
+ class: E(["sky-dialog-title", { "sky-dialog-title-with-subtitle": e.subtitle }])
303
+ }, [
304
+ ee($(e.title) + " ", 1),
305
+ e.subtitle ? (i(), r("span", Le, $(e.subtitle), 1)) : g("", !0)
306
+ ], 2),
307
+ t("button", {
308
+ class: "sky-dialog-close",
309
+ title: e.closeText,
310
+ onClick: w
311
+ }, [...v[0] || (v[0] = [
312
+ t("svg", {
313
+ viewBox: "0 0 16 16",
314
+ width: "16",
315
+ height: "16"
316
+ }, [
317
+ t("line", {
318
+ x1: "1",
319
+ y1: "15",
320
+ x2: "15",
321
+ y2: "1",
322
+ stroke: "currentColor",
323
+ "stroke-width": "2"
324
+ }),
325
+ t("line", {
326
+ x1: "1",
327
+ y1: "1",
328
+ x2: "15",
329
+ y2: "15",
330
+ stroke: "currentColor",
331
+ "stroke-width": "2"
332
+ })
333
+ ], -1)
334
+ ])], 8, Me),
335
+ v[1] || (v[1] = t("div", { class: "sky-dialog-clearfix" }, null, -1)),
336
+ t("div", {
337
+ ref_key: "dialogPaper",
338
+ ref: k,
339
+ class: E(["sky-dialog-paper", { "sky-dialog-paper-no-footer": !h.value }]),
340
+ onTouchstart: C,
341
+ onTouchend: V
342
+ }, [
343
+ u.value ? (i(), r("div", Pe)) : g("", !0),
344
+ x(o.$slots, "default", {}, void 0, !0)
345
+ ], 34),
346
+ h.value ? (i(), r("div", De, [
347
+ x(o.$slots, "buttons", {}, void 0, !0)
348
+ ])) : g("", !0)
349
+ ], 512)
350
+ ])
351
+ ], 4)) : g("", !0)
352
+ ]));
353
+ }
354
+ }, J = /* @__PURE__ */ L(ze, [["__scopeId", "data-v-d1a407c7"]]), Oe = { class: "sky-dialog-overlay" }, Ae = { class: "sky-dialog-header" }, Ne = ["title"], _e = {
355
+ width: "15",
356
+ height: "15",
357
+ viewBox: "0 0 451.847 451.847",
358
+ style: { transform: "rotate(90deg)" }
359
+ }, Re = {
360
+ key: 0,
361
+ class: "sky-dialog-subtitle"
362
+ }, Xe = {
363
+ key: 0,
364
+ class: "sky-dialog-swipe-area"
365
+ }, Fe = {
366
+ key: 0,
367
+ class: "sky-dialog-footer"
368
+ }, Ue = {
369
+ __name: "DialogNext",
370
+ props: {
371
+ modelValue: {
372
+ type: Boolean,
373
+ default: !1
374
+ },
375
+ title: {
376
+ type: String,
377
+ default: ""
378
+ },
379
+ subtitle: {
380
+ type: String,
381
+ default: ""
382
+ },
383
+ zIndex: {
384
+ type: [Number, String],
385
+ default: null
386
+ },
387
+ closeText: {
388
+ type: String,
389
+ default: "Назад"
390
+ },
391
+ closeOnEsc: {
392
+ type: Boolean,
393
+ default: !0
394
+ },
395
+ hasButtons: {
396
+ type: Boolean,
397
+ default: null
398
+ }
399
+ },
400
+ emits: ["update:modelValue", "close", "save"],
401
+ setup(e, { emit: p }) {
402
+ const s = Y(), c = e, y = p, d = b(null), k = b(null), a = b(0), u = S(() => {
403
+ try {
404
+ return te();
405
+ } catch {
406
+ return !1;
407
+ }
408
+ }), m = S(() => {
409
+ try {
410
+ return oe();
411
+ } catch {
412
+ return !1;
413
+ }
414
+ }), h = S(() => c.hasButtons !== null ? c.hasButtons : !!s.buttons), w = () => {
415
+ y("update:modelValue", !1), y("close");
416
+ }, B = (o) => {
417
+ o.key === "Escape" && c.closeOnEsc && c.modelValue && w(), o.key === "Enter" && c.modelValue && y("save");
418
+ }, C = (o) => {
419
+ o.touches[0].clientX < 35 && (a.value = o.touches[0].clientX);
420
+ }, V = (o) => {
421
+ a.value > 0 && a.value < 35 && o.changedTouches[0].clientX - a.value > 50 && w(), a.value = 0;
422
+ }, n = () => {
423
+ if (!(!m.value || !d.value))
424
+ try {
425
+ if (typeof Android < "u" && Android.getDisplayCutoutTop) {
426
+ const o = Android.getDisplayCutoutTop();
427
+ if (o && window.devicePixelRatio > 1) {
428
+ const v = o / window.devicePixelRatio;
429
+ d.value.style.paddingTop = v + "px";
430
+ }
431
+ }
432
+ } catch {
433
+ }
434
+ };
435
+ return F(
436
+ () => c.modelValue,
437
+ (o) => {
438
+ o ? (document.body.style.overflow = "hidden", Z(() => {
439
+ n();
440
+ })) : document.body.style.overflow = "";
441
+ }
442
+ ), D(() => {
443
+ document.addEventListener("keydown", B), window.addEventListener("resize", n);
444
+ }), P(() => {
445
+ document.removeEventListener("keydown", B), window.removeEventListener("resize", n), document.body.style.overflow = "";
446
+ }), (o, v) => (i(), z(U, { to: "body" }, [
447
+ e.modelValue ? (i(), r("div", {
448
+ key: 0,
449
+ class: "sky-dialogbox sky-dialogbox-next",
450
+ style: W([e.zIndex ? { "z-index": e.zIndex } : null])
451
+ }, [
452
+ t("div", Oe, [
453
+ t("div", {
454
+ ref_key: "dialogContent",
455
+ ref: d,
456
+ class: "sky-dialog-content"
457
+ }, [
458
+ t("div", Ae, [
459
+ t("button", {
460
+ class: "sky-dialog-back",
461
+ title: e.closeText,
462
+ onClick: w
463
+ }, [
464
+ (i(), r("svg", _e, [...v[0] || (v[0] = [
465
+ t("path", {
466
+ fill: "currentColor",
467
+ d: "M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"
468
+ }, null, -1)
469
+ ])]))
470
+ ], 8, Ne),
471
+ t("div", {
472
+ class: E(["sky-dialog-title", { "sky-dialog-title-with-subtitle": e.subtitle }])
473
+ }, [
474
+ ee($(e.title) + " ", 1),
475
+ e.subtitle ? (i(), r("span", Re, $(e.subtitle), 1)) : g("", !0)
476
+ ], 2)
477
+ ]),
478
+ t("div", {
479
+ ref_key: "dialogPaper",
480
+ ref: k,
481
+ class: E(["sky-dialog-paper", { "sky-dialog-paper-no-footer": !h.value }]),
482
+ onTouchstart: C,
483
+ onTouchend: V
484
+ }, [
485
+ u.value ? (i(), r("div", Xe)) : g("", !0),
486
+ x(o.$slots, "default", {}, void 0, !0)
487
+ ], 34),
488
+ h.value ? (i(), r("div", Fe, [
489
+ x(o.$slots, "buttons", {}, void 0, !0)
490
+ ])) : g("", !0)
491
+ ], 512)
492
+ ])
493
+ ], 4)) : g("", !0)
494
+ ]));
495
+ }
496
+ }, q = /* @__PURE__ */ L(Ue, [["__scopeId", "data-v-c2e2d8f9"]]), vt = {
497
+ __name: "Dialog",
498
+ props: {
499
+ modelValue: {
500
+ type: Boolean,
501
+ default: !1
502
+ },
503
+ title: {
504
+ type: String,
505
+ default: ""
506
+ },
507
+ subtitle: {
508
+ type: String,
509
+ default: ""
510
+ },
511
+ zIndex: {
512
+ type: [Number, String],
513
+ default: null
514
+ },
515
+ closeText: {
516
+ type: String,
517
+ default: ""
518
+ },
519
+ closeOnEsc: {
520
+ type: Boolean,
521
+ default: !0
522
+ },
523
+ // Force specific mode (overrides URL parameter)
524
+ mode: {
525
+ type: String,
526
+ default: null,
527
+ // 'next' | 'classic' | null (auto-detect)
528
+ validator: (e) => [null, "next", "classic"].includes(e)
529
+ }
530
+ },
531
+ emits: ["update:modelValue", "close", "save"],
532
+ setup(e, { emit: p }) {
533
+ const s = e, c = p, y = S({
534
+ get: () => s.modelValue,
535
+ set: (a) => c("update:modelValue", a)
536
+ }), d = b(!0);
537
+ D(() => {
538
+ try {
539
+ new URLSearchParams(window.location.search).get("rocketMode") === "false" ? d.value = !1 : d.value = !0;
540
+ } catch {
541
+ d.value = !0;
542
+ }
543
+ });
544
+ const k = S(() => s.mode === "next" ? q : s.mode === "classic" ? J : d.value ? q : J);
545
+ return (a, u) => (i(), z(se(k.value), {
546
+ modelValue: y.value,
547
+ "onUpdate:modelValue": u[0] || (u[0] = (m) => y.value = m),
548
+ title: e.title,
549
+ subtitle: e.subtitle,
550
+ "z-index": e.zIndex,
551
+ "close-text": e.closeText,
552
+ "close-on-esc": e.closeOnEsc,
553
+ "has-buttons": !!a.$slots.buttons,
554
+ onClose: u[1] || (u[1] = (m) => a.$emit("close")),
555
+ onSave: u[2] || (u[2] = (m) => a.$emit("save"))
556
+ }, ne({
557
+ default: X(() => [
558
+ x(a.$slots, "default")
559
+ ]),
560
+ _: 2
561
+ }, [
562
+ a.$slots.buttons ? {
563
+ name: "buttons",
564
+ fn: X(() => [
565
+ x(a.$slots, "buttons")
566
+ ]),
567
+ key: "0"
568
+ } : void 0
569
+ ]), 1064, ["modelValue", "title", "subtitle", "z-index", "close-text", "close-on-esc", "has-buttons"]));
570
+ }
571
+ }, We = {
572
+ props: {
573
+ to: {
574
+ type: String,
575
+ default: "body"
576
+ }
577
+ }
578
+ };
579
+ function Ke(e, p, s, c, y, d) {
580
+ return i(), z(U, { to: s.to }, [
581
+ x(e.$slots, "default")
582
+ ], 8, ["to"]);
583
+ }
584
+ const je = /* @__PURE__ */ L(We, [["render", Ke]]), He = { class: "sky-modal-header" }, Je = ["title"], qe = {
585
+ width: "15",
586
+ height: "15",
587
+ viewBox: "0 0 451.847 451.847",
588
+ style: { transform: "rotate(90deg)" }
589
+ }, Ge = { class: "sky-modal-title-wrapper" }, Qe = { class: "sky-modal-title" }, Ye = {
590
+ key: 0,
591
+ class: "sky-modal-subtitle"
592
+ }, Ze = { class: "sky-modal-body" }, et = {
593
+ key: 0,
594
+ class: "sky-modal-footer"
595
+ }, tt = {
596
+ __name: "Modal",
597
+ props: {
598
+ modelValue: {
599
+ type: Boolean,
600
+ default: !1
601
+ },
602
+ title: {
603
+ type: String,
604
+ default: ""
605
+ },
606
+ subtitle: {
607
+ type: String,
608
+ default: ""
609
+ },
610
+ closeTitle: {
611
+ type: String,
612
+ default: "Закрити"
613
+ },
614
+ closeOnOverlay: {
615
+ type: Boolean,
616
+ default: !0
617
+ },
618
+ closeOnEsc: {
619
+ type: Boolean,
620
+ default: !0
621
+ },
622
+ width: {
623
+ type: String,
624
+ default: "100%"
625
+ },
626
+ height: {
627
+ type: String,
628
+ default: "100%"
629
+ }
630
+ },
631
+ emits: ["update:modelValue", "close"],
632
+ setup(e, { emit: p }) {
633
+ const s = e, c = p, y = S(() => ({
634
+ width: s.width,
635
+ height: s.height
636
+ })), d = () => {
637
+ c("update:modelValue", !1), c("close");
638
+ }, k = () => {
639
+ s.closeOnOverlay && d();
640
+ }, a = (u) => {
641
+ u.key === "Escape" && s.closeOnEsc && s.modelValue && d();
642
+ };
643
+ return F(
644
+ () => s.modelValue,
645
+ (u) => {
646
+ u ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
647
+ }
648
+ ), D(() => {
649
+ document.addEventListener("keydown", a);
650
+ }), P(() => {
651
+ document.removeEventListener("keydown", a), document.body.style.overflow = "";
652
+ }), (u, m) => (i(), z(je, { to: "body" }, {
653
+ default: X(() => [
654
+ e.modelValue ? (i(), r("div", {
655
+ key: 0,
656
+ class: "sky-modal-overlay",
657
+ onMousedown: ae(k, ["self"])
658
+ }, [
659
+ t("div", {
660
+ class: "sky-modal",
661
+ style: W(y.value)
662
+ }, [
663
+ t("div", He, [
664
+ t("button", {
665
+ class: "sky-modal-back",
666
+ onClick: d,
667
+ title: e.closeTitle
668
+ }, [
669
+ (i(), r("svg", qe, [...m[0] || (m[0] = [
670
+ t("path", {
671
+ fill: "currentColor",
672
+ d: "M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"
673
+ }, null, -1)
674
+ ])]))
675
+ ], 8, Je),
676
+ t("div", Ge, [
677
+ t("h4", Qe, $(e.title), 1),
678
+ e.subtitle ? (i(), r("div", Ye, $(e.subtitle), 1)) : g("", !0)
679
+ ])
680
+ ]),
681
+ t("div", Ze, [
682
+ x(u.$slots, "default", {}, void 0, !0)
683
+ ]),
684
+ u.$slots.footer ? (i(), r("div", et, [
685
+ m[1] || (m[1] = t("div", null, null, -1)),
686
+ x(u.$slots, "footer", {}, void 0, !0),
687
+ m[2] || (m[2] = t("div", null, null, -1))
688
+ ])) : g("", !0)
689
+ ], 4)
690
+ ], 32)) : g("", !0)
691
+ ]),
692
+ _: 3
693
+ }));
694
+ }
695
+ }, kt = /* @__PURE__ */ L(tt, [["__scopeId", "data-v-e16b0dc3"]]), ot = ["disabled"], lt = {
696
+ key: 0,
697
+ class: "sky-btn-spinner"
698
+ }, st = {
699
+ __name: "SkyButton",
700
+ props: {
701
+ variant: {
702
+ type: String,
703
+ default: "primary",
704
+ validator: (e) => ["primary", "danger", "secondary", "outline"].includes(e)
705
+ },
706
+ loading: {
707
+ type: Boolean,
708
+ default: !1
709
+ },
710
+ disabled: {
711
+ type: Boolean,
712
+ default: !1
713
+ },
714
+ block: {
715
+ type: Boolean,
716
+ default: !1
717
+ },
718
+ icon: {
719
+ type: Boolean,
720
+ default: !1
721
+ }
722
+ },
723
+ setup(e) {
724
+ return (p, s) => (i(), r("button", ie({
725
+ class: ["sky-btn", [
726
+ `sky-btn-${e.variant}`,
727
+ {
728
+ "sky-btn-block": e.block,
729
+ "sky-btn-loading": e.loading,
730
+ "sky-btn-icon": e.icon
731
+ }
732
+ ]],
733
+ disabled: e.disabled || e.loading
734
+ }, p.$attrs), [
735
+ e.loading ? (i(), r("span", lt)) : g("", !0),
736
+ x(p.$slots, "default", {}, void 0, !0)
737
+ ], 16, ot));
738
+ }
739
+ }, mt = /* @__PURE__ */ L(st, [["__scopeId", "data-v-0d61fbfd"]]), nt = ["disabled"], at = {
740
+ key: 0,
741
+ class: "sky-select-dropdown"
742
+ }, it = ["onClick", "onMouseenter"], dt = {
743
+ key: 0,
744
+ class: "sky-select-check",
745
+ viewBox: "0 0 16 16",
746
+ fill: "none",
747
+ "aria-hidden": "true"
748
+ }, ut = {
749
+ __name: "SkySelect",
750
+ props: {
751
+ modelValue: {
752
+ default: null
753
+ },
754
+ options: {
755
+ type: Array,
756
+ default: () => []
757
+ },
758
+ placeholder: {
759
+ type: String,
760
+ default: ""
761
+ },
762
+ disabled: {
763
+ type: Boolean,
764
+ default: !1
765
+ },
766
+ block: {
767
+ type: Boolean,
768
+ default: !1
769
+ }
770
+ },
771
+ emits: ["update:modelValue"],
772
+ setup(e, { emit: p }) {
773
+ const s = e, c = p, y = b(null), d = b(!1), k = b(-1), a = S(
774
+ () => s.options.map(
775
+ (n) => typeof n == "string" ? { label: n, value: n } : n
776
+ )
777
+ ), u = S(
778
+ () => a.value.find((n) => n.value === s.modelValue) ?? null
779
+ );
780
+ function m() {
781
+ s.disabled || (d.value ? w() : h());
782
+ }
783
+ function h() {
784
+ d.value = !0, k.value = a.value.findIndex((n) => n.value === s.modelValue), document.addEventListener("mousedown", C);
785
+ }
786
+ function w() {
787
+ d.value = !1, document.removeEventListener("mousedown", C);
788
+ }
789
+ function B(n) {
790
+ c("update:modelValue", n.value), w();
791
+ }
792
+ function C(n) {
793
+ var o;
794
+ (o = y.value) != null && o.contains(n.target) || w();
795
+ }
796
+ function V(n) {
797
+ if (!d.value) {
798
+ (n.key === "Enter" || n.key === " ") && (n.preventDefault(), h());
799
+ return;
800
+ }
801
+ n.key === "Escape" ? w() : n.key === "ArrowDown" ? (n.preventDefault(), k.value = Math.min(k.value + 1, a.value.length - 1)) : n.key === "ArrowUp" ? (n.preventDefault(), k.value = Math.max(k.value - 1, 0)) : n.key === "Enter" && (n.preventDefault(), k.value >= 0 && B(a.value[k.value]));
802
+ }
803
+ return de(() => {
804
+ document.removeEventListener("mousedown", C);
805
+ }), (n, o) => (i(), r("div", {
806
+ ref_key: "root",
807
+ ref: y,
808
+ class: E(["sky-select", {
809
+ "sky-select-block": e.block,
810
+ "sky-select-open": d.value,
811
+ "sky-select-disabled": e.disabled
812
+ }])
813
+ }, [
814
+ t("button", {
815
+ type: "button",
816
+ class: "sky-select-trigger",
817
+ disabled: e.disabled,
818
+ onClick: m,
819
+ onKeydown: V
820
+ }, [
821
+ t("span", {
822
+ class: E(["sky-select-value", { "sky-select-placeholder": u.value === null }])
823
+ }, $(u.value ? u.value.label : e.placeholder), 3),
824
+ o[0] || (o[0] = t("svg", {
825
+ class: "sky-select-chevron",
826
+ viewBox: "0 0 16 16",
827
+ fill: "none",
828
+ "aria-hidden": "true"
829
+ }, [
830
+ t("path", {
831
+ d: "M4 6l4 4 4-4",
832
+ stroke: "currentColor",
833
+ "stroke-width": "1.5",
834
+ "stroke-linecap": "round",
835
+ "stroke-linejoin": "round"
836
+ })
837
+ ], -1))
838
+ ], 40, nt),
839
+ d.value ? (i(), r("div", at, [
840
+ (i(!0), r(G, null, Q(a.value, (v, M) => (i(), r("div", {
841
+ key: v.value,
842
+ class: E(["sky-select-option", {
843
+ "sky-select-option-selected": v.value === e.modelValue,
844
+ "sky-select-option-focused": M === k.value
845
+ }]),
846
+ onClick: (O) => B(v),
847
+ onMouseenter: (O) => k.value = M
848
+ }, [
849
+ t("span", null, $(v.label), 1),
850
+ v.value === e.modelValue ? (i(), r("svg", dt, [...o[1] || (o[1] = [
851
+ t("path", {
852
+ d: "M3 8l4 4 6-6",
853
+ stroke: "currentColor",
854
+ "stroke-width": "1.5",
855
+ "stroke-linecap": "round",
856
+ "stroke-linejoin": "round"
857
+ }, null, -1)
858
+ ])])) : g("", !0)
859
+ ], 42, it))), 128))
860
+ ])) : g("", !0)
861
+ ], 2));
862
+ }
863
+ }, gt = /* @__PURE__ */ L(ut, [["__scopeId", "data-v-5ca23325"]]);
864
+ export {
865
+ je as BaseTeleport,
866
+ vt as Dialog,
867
+ J as DialogModal,
868
+ q as DialogNext,
869
+ yt as Header,
870
+ kt as Modal,
871
+ mt as SkyButton,
872
+ gt as SkySelect,
873
+ bt as SkyserviceAPI,
874
+ ve as exit,
875
+ wt as getBack,
876
+ $t as getCompany,
877
+ St as getLang,
878
+ _ as getLocalStorageData,
879
+ xt as getProductCategories,
880
+ re as getSenderId,
881
+ Bt as getStoreData,
882
+ Ct as getToken,
883
+ Et as getUser,
884
+ ye as getWindowData,
885
+ oe as isAndroidWebview,
886
+ Vt as isCefWebview,
887
+ Tt as isInIframe,
888
+ I as isInsideIframe,
889
+ te as isIosWebview,
890
+ It as isWebview,
891
+ H as navigate,
892
+ Lt as notify,
893
+ Mt as notifyError,
894
+ Pt as notifyWarn,
895
+ Dt as onMessage,
896
+ zt as openCrispChat,
897
+ Ot as openExternalLink,
898
+ fe as setLocalStorage,
899
+ j as setRocketMode,
900
+ ue as setSenderId,
901
+ ce as trackVisit,
902
+ At as webviewCheck
903
+ };