@yourgoods/ui-smart 0.46.5 → 0.46.6

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.
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as ie, ref as x, reactive as Z, watch as Y, computed as V, toRefs as ce, createElementBlock as I, openBlock as w, createElementVNode as B, createCommentVNode as D, toDisplayString as ee, createVNode as $, unref as u, isRef as te, withCtx as G, createTextVNode as ne, Fragment as Fe, createBlock as _, resolveDynamicComponent as he, onMounted as Re } from "vue";
2
- import { T as ve, c as $e, u as ze, a as We, P as Te, b as He } from "./useRateLimitToast--LDSCeNe.js";
3
- import { C as R, _ as _e, B as qe, p as H, g as je } from "./index-BKwB1EH3.js";
2
+ import { T as ve, c as $e, u as ze, a as We, P as Te, b as He } from "./useRateLimitToast-Ml1JyBMo.js";
3
+ import { C as R, _ as _e, B as qe, p as H, g as je } from "./index-DW7ADhQu.js";
4
4
  import { PInput as J, IconMailMd as pe, PButton as se, IconEyeMd as Me, IconEyeClosedMd as be, PDialog as Ge, PTopBar as Ye, IconCrossMd as Je } from "@profeat/ui-kit";
5
5
  const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dialogDefaultContainerTextHint" }, Xe = {
6
6
  key: 0,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as ye, ref as a, reactive as _, computed as u, watch as Z, onMounted as Ce, createElementBlock as S, openBlock as g, Fragment as ge, createVNode as n, unref as o, withCtx as m, createCommentVNode as ee, createElementVNode as r, toDisplayString as V, createBlock as B, resolveDynamicComponent as $, createTextVNode as z } from "vue";
2
- import { C as I, p as D, g as Ve } from "./index-BKwB1EH3.js";
2
+ import { C as I, p as D, g as Ve } from "./index-DW7ADhQu.js";
3
3
  import { PDialog as be, PInput as M, IconEyeMd as O, IconEyeClosedMd as U, PButton as F, PTopBar as Te, IconCrossMd as Ie, PTeleportContainer as xe } from "@profeat/ui-kit";
4
4
  function ke(b) {
5
5
  return { showPasswordRateLimitToast: (P) => {
@@ -1,7 +1,7 @@
1
- import { createElementBlock as P, openBlock as p, createElementVNode as W, defineComponent as he, reactive as ve, watch as Z, ref as L, toRefs as Ce, computed as E, createCommentVNode as B, createVNode as T, toDisplayString as H, createBlock as G, createTextVNode as Y, unref as d, isRef as ne, withCtx as Q, onMounted as qe, Fragment as He } from "vue";
2
- import { T as we, c as Ne, a as Ge, u as Je, P as Oe, b as Ke } from "./useRateLimitToast--LDSCeNe.js";
1
+ import { createElementBlock as P, openBlock as p, createElementVNode as q, defineComponent as he, reactive as ve, watch as Z, ref as L, toRefs as Ce, computed as E, createCommentVNode as $, createVNode as T, toDisplayString as H, createBlock as G, createTextVNode as Y, unref as d, isRef as ne, withCtx as Q, onMounted as qe, Fragment as He } from "vue";
2
+ import { T as we, c as Ne, a as Ge, u as Je, P as Oe, b as Ke } from "./useRateLimitToast-Ml1JyBMo.js";
3
3
  import { IconTelegramSm as Pe, PInput as ae, IconPhoneMd as Qe, IconMailMd as ze, PButton as Fe, PDialog as Xe, PTopBar as Ye, IconCrossMd as Ze, PTeleportContainer as _e } from "@profeat/ui-kit";
4
- import { C as q, t as De, p as oe, g as Ae } from "./index-BKwB1EH3.js";
4
+ import { C as j, t as De, p as oe, g as Ae } from "./index-DW7ADhQu.js";
5
5
  const et = {
6
6
  xmlns: "http://www.w3.org/2000/svg",
7
7
  width: "12",
@@ -10,7 +10,7 @@ const et = {
10
10
  };
11
11
  function tt(R, x) {
12
12
  return p(), P("svg", et, x[0] || (x[0] = [
13
- W("path", {
13
+ q("path", {
14
14
  fill: "#1C7EF1",
15
15
  "fill-rule": "evenodd",
16
16
  d: "M1 0a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1zm1.5 2a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5zM6 13a1 1 0 1 0 0 2 1 1 0 0 0 0-2",
@@ -43,34 +43,34 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
43
43
  },
44
44
  emits: ["update:phone", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code-again", "on-send-only-sms", "on-clear-code-error"],
45
45
  setup(R, { emit: x }) {
46
- const $ = R, i = x, c = ve({
46
+ const B = R, i = x, u = ve({
47
47
  touched: { phone: !1, code: !1 },
48
- phoneModel: $.phone,
49
- codeModel: $.code
48
+ phoneModel: B.phone,
49
+ codeModel: B.code
50
50
  });
51
51
  Z(
52
- () => c.phoneModel,
52
+ () => u.phoneModel,
53
53
  (v) => i("update:phone", v)
54
54
  ), Z(
55
- () => c.codeModel,
55
+ () => u.codeModel,
56
56
  (v) => i("update:code", v)
57
57
  );
58
58
  const h = (v) => {
59
- c.touched[v] = !0;
59
+ u.touched[v] = !0;
60
60
  };
61
- let u = L("");
61
+ let c = L("");
62
62
  const F = (v) => {
63
63
  i("on-clear-code-error");
64
64
  const m = v.target;
65
65
  let r = ((m == null ? void 0 : m.value) ?? "").replace(/\D/g, "");
66
- r.length > 4 && (r = r.slice(0, 4)), M.value = r, m && m.value !== r && (m.value = r), r.length === 4 && r !== u.value && (u.value = r, i("on-match-code", { phone: e.value, code: r }));
67
- }, X = () => i("on-send-code-again", { phone: c.phoneModel }), J = () => {
68
- console.debug("onSendCodeViaSms"), i("on-send-only-sms", { phone: c.phoneModel });
69
- }, { phoneModel: e, codeModel: M, touched: C } = Ce(c), f = E(() => C.value.phone && !e.value.trim() ? "Введите телефон" : $.phoneError), O = E(() => $.isNotMatchCode ? "Неверный код" : C.value.code ? M.value.trim() ? $.codeError ?? null : "Введите код" : "");
66
+ r.length > 4 && (r = r.slice(0, 4)), M.value = r, m && m.value !== r && (m.value = r), r.length === 4 && r !== c.value && (c.value = r, i("on-match-code", { phone: e.value, code: r }));
67
+ }, X = () => i("on-send-code-again", { phone: u.phoneModel }), J = () => {
68
+ console.debug("onSendCodeViaSms"), i("on-send-only-sms", { phone: u.phoneModel });
69
+ }, { phoneModel: e, codeModel: M, touched: C } = Ce(u), f = E(() => C.value.phone && !e.value.trim() ? "Введите телефон" : B.phoneError), O = E(() => B.isNotMatchCode ? "Неверный код" : C.value.code ? M.value.trim() ? B.codeError ?? null : "Введите код" : "");
70
70
  return (v, m) => (p(), P("div", ot, [
71
- W("div", nt, [
72
- W("div", at, H(v.hintText), 1),
73
- W("div", lt, [
71
+ q("div", nt, [
72
+ q("div", at, H(v.hintText), 1),
73
+ q("div", lt, [
74
74
  v.isTg ? (p(), G(d(Pe), { key: 0 })) : (p(), G(d(le), {
75
75
  key: 1,
76
76
  style: { "margin-left": "5px" }
@@ -95,7 +95,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
95
95
  class: "icon-locked",
96
96
  onClick: m[3] || (m[3] = (r) => v.$emit("edit", "phone"))
97
97
  })
98
- ])) : B("", !0),
98
+ ])) : $("", !0),
99
99
  v.showCode ? (p(), P("div", dt, [
100
100
  T(d(ae), {
101
101
  modelValue: d(M),
@@ -108,7 +108,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
108
108
  onInput: F,
109
109
  onBlur: m[5] || (m[5] = (r) => h("code"))
110
110
  }, null, 8, ["modelValue", "error"])
111
- ])) : B("", !0),
111
+ ])) : $("", !0),
112
112
  T(we, {
113
113
  loading: v.loading,
114
114
  "rate-limit-text": v.rateLimitText,
@@ -123,7 +123,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
123
123
  }, [
124
124
  Y(H(v.sendCodeBySmsText) + " ", 1),
125
125
  T(d(le), { style: { "margin-left": "5px" } })
126
- ])) : B("", !0)
126
+ ])) : $("", !0)
127
127
  ]),
128
128
  _: 1
129
129
  }, 8, ["loading", "rate-limit-text", "is-final-limit"])
@@ -168,24 +168,24 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
168
168
  },
169
169
  emits: ["update:phone", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code", "on-send-code-again", "on-send-only-sms", "on-clear-code-error"],
170
170
  setup(R, { emit: x }) {
171
- const $ = R, i = x, c = L(!1), h = L(""), u = ve({
171
+ const B = R, i = x, u = L(!1), h = L(""), c = ve({
172
172
  touched: { phone: !1, code: !1 },
173
173
  phoneModel: "",
174
174
  codeModel: ""
175
175
  });
176
176
  Z(
177
- () => u.phoneModel,
177
+ () => c.phoneModel,
178
178
  (o) => {
179
179
  i("update:phone", o), h.value = "";
180
180
  }
181
181
  ), Z(
182
- () => u.codeModel,
182
+ () => c.codeModel,
183
183
  (o) => i("update:code", o)
184
184
  );
185
- const F = (o) => u.touched[o] = !0, X = (o) => u.touched[o] = !1, J = () => {
185
+ const F = (o) => c.touched[o] = !0, X = (o) => c.touched[o] = !1, J = () => {
186
186
  h.value = "", X("phone");
187
187
  }, e = E(() => {
188
- const n = u.phoneModel.trim().replace(/[()\-\s]/g, "");
188
+ const n = c.phoneModel.trim().replace(/[()\-\s]/g, "");
189
189
  return /^\+?\d{10,15}$/.test(n);
190
190
  }), M = E(() => !e.value || !!h.value), C = async () => {
191
191
  var o;
@@ -194,7 +194,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
194
194
  h.value = "Это не похоже на номер телефона";
195
195
  return;
196
196
  }
197
- const n = await Ne(void 0, U(u.phoneModel)), { data: s } = n.data;
197
+ const n = await Ne(void 0, U(c.phoneModel)), { data: s } = n.data;
198
198
  if (console.debug("result for checkAvailability: ", {
199
199
  res: n,
200
200
  data: s
@@ -202,7 +202,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
202
202
  h.value = "Такой номер уже используется";
203
203
  return;
204
204
  }
205
- h.value = "", i("on-send-code", { phone: u.phoneModel, prevPhone: $.oldPhone, offLoading: !0 }), c.value = !0;
205
+ h.value = "", i("on-send-code", { phone: c.phoneModel, prevPhone: B.oldPhone, offLoading: !0 }), u.value = !0;
206
206
  } catch (n) {
207
207
  console.error("Неизвестная ошибка при проверке доступности телефона:", n), h.value = "Это не похоже на номер телефона";
208
208
  }
@@ -214,27 +214,27 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
214
214
  let s = ((n == null ? void 0 : n.value) ?? "").replace(/\D/g, "");
215
215
  s.length > 4 && (s = s.slice(0, 4)), I.value = s, n && n.value !== s && (n.value = s), s.length === 4 && s !== f.value && (f.value = s, i("on-match-code", { phone: r.value, code: s }));
216
216
  }, v = () => {
217
- i("on-send-code-again", { phone: u.phoneModel });
217
+ i("on-send-code-again", { phone: c.phoneModel });
218
218
  }, m = () => {
219
- console.debug("onSendCodeViaSms"), i("on-send-only-sms", { phone: u.phoneModel });
220
- }, { phoneModel: r, codeModel: I, touched: se } = Ce(u), j = E(() => {
219
+ console.debug("onSendCodeViaSms"), i("on-send-only-sms", { phone: c.phoneModel });
220
+ }, { phoneModel: r, codeModel: I, touched: se } = Ce(c), W = E(() => {
221
221
  if (h.value) return h.value;
222
- if (u.touched.phone) {
223
- if (!u.phoneModel.trim()) return "Введите номер телефона";
222
+ if (c.touched.phone) {
223
+ if (!c.phoneModel.trim()) return "Введите номер телефона";
224
224
  if (!e.value) return "Это не похоже на номер телефона";
225
225
  }
226
- return $.phoneError || "";
227
- }), _ = E(() => $.isNotMatchCode ? "Неверный код" : se.value.code ? I.value.trim() ? $.codeError ?? null : "Введите код" : "");
226
+ return B.phoneError || "";
227
+ }), _ = E(() => B.isNotMatchCode ? "Неверный код" : se.value.code ? I.value.trim() ? B.codeError ?? null : "Введите код" : "");
228
228
  return (o, n) => (p(), P("div", rt, [
229
- W("div", ut, [
230
- W("div", ct, H(c.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
231
- c.value ? (p(), P("div", pt, [
229
+ q("div", ut, [
230
+ q("div", ct, H(u.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
231
+ u.value ? (p(), P("div", pt, [
232
232
  o.isTg ? (p(), G(d(Pe), { key: 0 })) : (p(), G(d(le), {
233
233
  key: 1,
234
234
  style: { "margin-left": "5px" }
235
235
  })),
236
236
  Y(" " + H(o.isTg ? "Telegram" : "СМС"), 1)
237
- ])) : B("", !0)
237
+ ])) : $("", !0)
238
238
  ]),
239
239
  o.showPhone ? (p(), P("div", ht, [
240
240
  T(d(ae), {
@@ -244,7 +244,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
244
244
  "text-size": "medium",
245
245
  label: "Телефон",
246
246
  type: "tel",
247
- error: j.value,
247
+ error: W.value,
248
248
  onBlur: n[1] || (n[1] = (s) => F("phone")),
249
249
  onInput: J
250
250
  }, null, 8, ["modelValue", "error"]),
@@ -252,8 +252,8 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
252
252
  class: "icon-locked",
253
253
  onClick: n[2] || (n[2] = (s) => o.$emit("edit", "phone"))
254
254
  })
255
- ])) : B("", !0),
256
- c.value ? B("", !0) : (p(), P("div", vt, [
255
+ ])) : $("", !0),
256
+ u.value ? $("", !0) : (p(), P("div", vt, [
257
257
  T(d(Fe), {
258
258
  style: { width: "100%" },
259
259
  disabled: M.value,
@@ -266,7 +266,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
266
266
  __: [5]
267
267
  }, 8, ["disabled"])
268
268
  ])),
269
- c.value ? (p(), P("div", mt, [
269
+ u.value ? (p(), P("div", mt, [
270
270
  T(d(ae), {
271
271
  modelValue: d(I),
272
272
  "onUpdate:modelValue": n[3] || (n[3] = (s) => ne(I) ? I.value = s : null),
@@ -278,8 +278,8 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
278
278
  onInput: O,
279
279
  onBlur: n[4] || (n[4] = (s) => F("code"))
280
280
  }, null, 8, ["modelValue", "error"])
281
- ])) : B("", !0),
282
- !o.loading && c.value ? (p(), P("div", ft, [
281
+ ])) : $("", !0),
282
+ !o.loading && u.value ? (p(), P("div", ft, [
283
283
  T(we, {
284
284
  loading: o.loading,
285
285
  "rate-limit-text": o.rateLimitText,
@@ -294,14 +294,17 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
294
294
  }, [
295
295
  Y(H(o.sendCodeBySmsText) + " ", 1),
296
296
  T(d(le), { style: { "margin-left": "5px" } })
297
- ])) : B("", !0)
297
+ ])) : $("", !0)
298
298
  ]),
299
299
  _: 1
300
300
  }, 8, ["loading", "rate-limit-text", "is-final-limit"])
301
- ])) : B("", !0)
301
+ ])) : $("", !0)
302
302
  ]));
303
303
  }
304
- }), yt = { class: "dialogDefaultContainerInsideContent" }, Ct = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, wt = { class: "dialogDefaultContainerTextHint" }, Pt = { class: "chip" }, Tt = {
304
+ }), yt = { class: "dialogDefaultContainerInsideContent" }, Ct = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, wt = { class: "dialogDefaultContainerTextHint" }, Pt = {
305
+ key: 0,
306
+ class: "chip"
307
+ }, Tt = {
305
308
  key: 0,
306
309
  class: "input-wrapper"
307
310
  }, St = {
@@ -328,24 +331,24 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
328
331
  },
329
332
  emits: ["update:phone", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code", "on-send-code-again", "on-send-only-sms", "on-clear-code-error"],
330
333
  setup(R, { emit: x }) {
331
- const $ = R, i = x, c = L(!1), h = L(""), u = ve({
334
+ const B = R, i = x, u = L(!1), h = L(""), c = ve({
332
335
  touched: { phone: !1, code: !1 },
333
336
  phoneModel: "",
334
337
  codeModel: ""
335
338
  });
336
339
  Z(
337
- () => u.phoneModel,
340
+ () => c.phoneModel,
338
341
  (o) => {
339
342
  i("update:phone", o), h.value = "";
340
343
  }
341
344
  ), Z(
342
- () => u.codeModel,
345
+ () => c.codeModel,
343
346
  (o) => i("update:code", o)
344
347
  );
345
- const F = (o) => u.touched[o] = !0, X = (o) => u.touched[o] = !1, J = () => {
348
+ const F = (o) => c.touched[o] = !0, X = (o) => c.touched[o] = !1, J = () => {
346
349
  h.value = "", X("phone");
347
350
  }, e = E(() => {
348
- const n = u.phoneModel.trim().replace(/[()\-\s]/g, "");
351
+ const n = c.phoneModel.trim().replace(/[()\-\s]/g, "");
349
352
  return /^\+?\d{10,15}$/.test(n);
350
353
  }), M = E(() => !e.value || !!h.value), C = async () => {
351
354
  var o;
@@ -354,12 +357,12 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
354
357
  h.value = "Это не похоже на номер телефона";
355
358
  return;
356
359
  }
357
- const n = await Ne(void 0, U(u.phoneModel)), { data: s } = n.data;
360
+ const n = await Ne(void 0, U(c.phoneModel)), { data: s } = n.data;
358
361
  if (!(((o = s.data[0]) == null ? void 0 : o.available) ?? !1)) {
359
362
  h.value = "Такой номер уже используется";
360
363
  return;
361
364
  }
362
- h.value = "", i("on-send-code", { phone: u.phoneModel, prevPhone: $.oldPhone, offLoading: !0 }), c.value = !0;
365
+ h.value = "", i("on-send-code", { phone: c.phoneModel, prevPhone: B.oldPhone, offLoading: !0 }), u.value = !0;
363
366
  } catch (n) {
364
367
  console.error("Неизвестная ошибка при проверке доступности телефона:", n), h.value = "Это не похоже на номер телефона";
365
368
  }
@@ -369,29 +372,29 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
369
372
  i("on-clear-code-error");
370
373
  const n = o.target;
371
374
  let s = n.value.replace(/\D/g, "");
372
- s.length > 4 && (s = s.slice(0, 4), n.value = s), u.codeModel = s, s.length === 4 && s !== f && (f = s, i("on-match-code", { phone: u.phoneModel, code: s }));
375
+ s.length > 4 && (s = s.slice(0, 4), n.value = s), c.codeModel = s, s.length === 4 && s !== f && (f = s, i("on-match-code", { phone: c.phoneModel, code: s }));
373
376
  }, v = () => {
374
- i("on-send-code-again", { phone: u.phoneModel });
377
+ i("on-send-code-again", { phone: c.phoneModel });
375
378
  }, m = () => {
376
- console.debug("onSendCodeViaSms"), i("on-send-only-sms", { phone: u.phoneModel });
377
- }, { phoneModel: r, codeModel: I, touched: se } = Ce(u), j = E(() => {
379
+ console.debug("onSendCodeViaSms"), i("on-send-only-sms", { phone: c.phoneModel });
380
+ }, { phoneModel: r, codeModel: I, touched: se } = Ce(c), W = E(() => {
378
381
  if (h.value) return h.value;
379
- if (u.touched.phone) {
380
- if (!u.phoneModel.trim()) return "Введите номер телефона";
382
+ if (c.touched.phone) {
383
+ if (!c.phoneModel.trim()) return "Введите номер телефона";
381
384
  if (!e.value) return "Это не похоже на номер телефона";
382
385
  }
383
- return $.phoneError || "";
384
- }), _ = E(() => $.isNotMatchCode ? "Неверный код" : u.touched.code ? I.value.trim() ? $.codeError ?? null : "Введите код" : "");
386
+ return B.phoneError || "";
387
+ }), _ = E(() => B.isNotMatchCode ? "Неверный код" : c.touched.code ? I.value.trim() ? B.codeError ?? null : "Введите код" : "");
385
388
  return (o, n) => (p(), P("div", yt, [
386
- W("div", Ct, [
387
- W("div", wt, H(c.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
388
- W("div", Pt, [
389
+ q("div", Ct, [
390
+ q("div", wt, H(u.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
391
+ u.value ? (p(), P("div", Pt, [
389
392
  o.isTg ? (p(), G(d(Pe), { key: 0 })) : (p(), G(d(le), {
390
393
  key: 1,
391
394
  style: { "margin-left": "5px" }
392
395
  })),
393
396
  Y(" " + H(o.isTg ? "Telegram" : "СМС"), 1)
394
- ])
397
+ ])) : $("", !0)
395
398
  ]),
396
399
  o.showPhone ? (p(), P("div", Tt, [
397
400
  T(d(ae), {
@@ -401,7 +404,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
401
404
  "text-size": "medium",
402
405
  label: "Телефон",
403
406
  type: "tel",
404
- error: j.value,
407
+ error: W.value,
405
408
  onBlur: n[1] || (n[1] = (s) => F("phone")),
406
409
  onInput: J
407
410
  }, null, 8, ["modelValue", "error"]),
@@ -409,8 +412,8 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
409
412
  class: "icon-locked",
410
413
  onClick: n[2] || (n[2] = (s) => o.$emit("edit", "phone"))
411
414
  })
412
- ])) : B("", !0),
413
- c.value ? B("", !0) : (p(), P("div", St, [
415
+ ])) : $("", !0),
416
+ u.value ? $("", !0) : (p(), P("div", St, [
414
417
  T(d(Fe), {
415
418
  style: { width: "100%" },
416
419
  disabled: M.value,
@@ -423,7 +426,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
423
426
  __: [5]
424
427
  }, 8, ["disabled"])
425
428
  ])),
426
- c.value ? (p(), P("div", Mt, [
429
+ u.value ? (p(), P("div", Mt, [
427
430
  T(d(ae), {
428
431
  modelValue: d(I),
429
432
  "onUpdate:modelValue": n[3] || (n[3] = (s) => ne(I) ? I.value = s : null),
@@ -435,8 +438,8 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
435
438
  onInput: O,
436
439
  onBlur: n[4] || (n[4] = (s) => F("code"))
437
440
  }, null, 8, ["modelValue", "error"])
438
- ])) : B("", !0),
439
- c.value ? (p(), P("div", xt, [
441
+ ])) : $("", !0),
442
+ u.value ? (p(), P("div", xt, [
440
443
  T(we, {
441
444
  loading: o.loading,
442
445
  "rate-limit-text": o.rateLimitText,
@@ -451,11 +454,11 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
451
454
  }, [
452
455
  Y(H(o.sendCodeBySmsText) + " ", 1),
453
456
  T(d(le), { style: { "margin-left": "5px" } })
454
- ])) : B("", !0)
457
+ ])) : $("", !0)
455
458
  ]),
456
459
  _: 1
457
460
  }, 8, ["loading", "rate-limit-text", "is-final-limit"])
458
- ])) : B("", !0)
461
+ ])) : $("", !0)
459
462
  ]));
460
463
  }
461
464
  }), kt = { class: "text-center w-full" }, Vt = { class: "dialogTitle" }, $t = {
@@ -476,19 +479,19 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
476
479
  mode: { default: void 0 }
477
480
  },
478
481
  emits: ["update:modelValue", "submit-phone", "edit", "close", "clean-input-errors", "on-update-jwt", "update-phone-field", "on-toast"],
479
- setup(R, { expose: x, emit: $ }) {
480
- const i = R, c = $, h = L(i.modelValue);
482
+ setup(R, { expose: x, emit: B }) {
483
+ const i = R, u = B, h = L(i.modelValue);
481
484
  Z(
482
485
  () => i.modelValue,
483
486
  (a) => h.value = a
484
- ), Z(h, (a) => c("update:modelValue", a));
485
- const u = E(() => i.language ?? "ru"), F = (a) => De[u.value] && De[u.value][a] || (i.title ?? a), X = E(() => i.title ?? F("Смена номера телефона")), J = E(() => i.hintText ?? F("Чтобы продолжить, введите новый номер")), e = ve({
487
+ ), Z(h, (a) => u("update:modelValue", a));
488
+ const c = E(() => i.language ?? "ru"), F = (a) => De[c.value] && De[c.value][a] || (i.title ?? a), X = E(() => i.title ?? F("Смена номера телефона")), J = E(() => i.hintText ?? F("Чтобы продолжить, введите новый номер")), e = ve({
486
489
  oldPhone: i.initialPhone ?? "",
487
490
  newPhone: "",
488
491
  code: "",
489
492
  addPhone: "",
490
493
  addCode: ""
491
- }), M = L(q.OLD), C = L(null), f = L(!1), O = L(!1), v = L("tg"), m = E(() => v.value === "tg"), r = L(!1), { startTimer: I, remainingSeconds: se, isAvailableForSendAgain: j, totalRateAttempts: _, currentRateAttempt: o } = Ge(), { showRateLimitToast: n } = Ke(c), { isEditFlow: s, getFlow: me } = Je(L(i.mode)), de = E(() => j.value ? "Повторить" : `${se.value}`), ie = L(pe), re = E(() => ie.value === 0), Ue = (a) => new Promise((l) => setTimeout(l, a));
494
+ }), M = L(j.OLD), C = L(null), f = L(!1), O = L(!1), v = L("tg"), m = E(() => v.value === "tg"), r = L(!1), { startTimer: I, remainingSeconds: se, isAvailableForSendAgain: W, totalRateAttempts: _, currentRateAttempt: o } = Ge(), { showRateLimitToast: n } = Ke(u), { isEditFlow: s, getFlow: me } = Je(L(i.mode)), de = E(() => W.value ? "Повторить" : `${se.value}`), ie = L(pe), re = E(() => ie.value === 0), Ue = (a) => new Promise((l) => setTimeout(l, a));
492
495
  async function fe(a = "email") {
493
496
  var t;
494
497
  return (t = (await Ae("/users/profile/session/get-edit-session", { params: { field: a } })).data) == null ? void 0 : t.data;
@@ -499,7 +502,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
499
502
  field: a,
500
503
  oldValue: U(i.initialPhone)
501
504
  })).data) == null ? void 0 : b.data;
502
- C.value = (t == null ? void 0 : t.sessionId) ?? null, M.value = (t == null ? void 0 : t.step) ?? q.OLD, e.oldPhone = (t == null ? void 0 : t.oldValue) ?? "", e.newPhone = (t == null ? void 0 : t.newValue) ?? "";
505
+ C.value = (t == null ? void 0 : t.sessionId) ?? null, M.value = (t == null ? void 0 : t.step) ?? j.OLD, e.oldPhone = (t == null ? void 0 : t.oldValue) ?? "", e.newPhone = (t == null ? void 0 : t.newValue) ?? "";
503
506
  }
504
507
  async function Re() {
505
508
  try {
@@ -527,7 +530,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
527
530
  );
528
531
  await Ue(1e3);
529
532
  const w = (t = b.data) == null ? void 0 : t.data;
530
- return w ? (w.restTimeSec > 0 ? (I(w.restTimeSec), j.value = !1, _.value = w.attempts.total, o.value = w.attempts.total - w.attempts.available, ie.value = w.attempts.available ?? pe) : j.value = !0, w) : null;
533
+ return w ? (w.restTimeSec > 0 ? (I(w.restTimeSec), W.value = !1, _.value = w.attempts.total, o.value = w.attempts.total - w.attempts.available, ie.value = w.attempts.available ?? pe) : W.value = !0, w) : null;
531
534
  } catch {
532
535
  return null;
533
536
  }
@@ -559,7 +562,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
559
562
  const K = (N = (A = g.data) == null ? void 0 : A.tooManyRequests) == null ? void 0 : N.type;
560
563
  v.value = K;
561
564
  const y = g.data.tooManyRequests;
562
- return y.restTimeSec > 0 ? (I(y.restTimeSec), _.value = y.attempts.total, o.value = y.attempts.total - y.attempts.available, ie.value = y.attempts.available ?? pe) : j.value = !0, g;
565
+ return y.restTimeSec > 0 ? (I(y.restTimeSec), _.value = y.attempts.total, o.value = y.attempts.total - y.attempts.available, ie.value = y.attempts.available ?? pe) : W.value = !0, g;
563
566
  }
564
567
  return console.debug("sendContactCode after обработка 403 tooManyRequests", g), g;
565
568
  } catch (k) {
@@ -574,7 +577,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
574
577
  const V = await fe("phone");
575
578
  C.value = V.sessionId, M.value = V.step, e.oldPhone = V.oldValue ?? e.oldPhone, e.newPhone = V.newValue ?? e.newPhone;
576
579
  const z = await oe("/users/profile/change/phone/match-code", {
577
- phone: l === q.NEW ? U(e.newPhone) : U(e.oldPhone),
580
+ phone: l === j.NEW ? U(e.newPhone) : U(e.oldPhone),
578
581
  sessionId: C.value,
579
582
  code: a,
580
583
  step: l
@@ -584,11 +587,11 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
584
587
  return;
585
588
  }
586
589
  if (!te) return z;
587
- if (M.value = te, te === q.NEW) {
590
+ if (M.value = te, te === j.NEW) {
588
591
  const Le = await fe("phone");
589
592
  e.oldPhone = Le.oldValue ?? e.oldPhone, e.newPhone = Le.newValue ?? e.newPhone, e.code = "";
590
593
  }
591
- return te === q.COMPLETED && (e.code = "", c("update-phone-field", e.addPhone), c("submit-phone", { phone: e.oldPhone, code: a }), c("on-toast", { color: "success", text: "Номер телефона изменён" }), c("on-update-jwt", "phone", "edit", e.newPhone), C.value = null, c("close")), z;
594
+ return te === j.COMPLETED && (e.code = "", u("update-phone-field", e.addPhone), u("submit-phone", { phone: e.oldPhone, code: a }), u("on-toast", { color: "success", text: "Номер телефона изменён" }), u("on-update-jwt", "phone", "edit", e.newPhone), C.value = null, u("close")), z;
592
595
  } catch (V) {
593
596
  const z = (K = (S = V == null ? void 0 : V.response) == null ? void 0 : S.data) == null ? void 0 : K.rateLimit;
594
597
  if (((y = V == null ? void 0 : V.response) == null ? void 0 : y.status) === 429 && z) {
@@ -599,14 +602,14 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
599
602
  } finally {
600
603
  f.value = !1;
601
604
  }
602
- }, xe = ({ code: a }) => Me(a, q.OLD);
605
+ }, xe = ({ code: a }) => Me(a, j.OLD);
603
606
  function be(a) {
604
607
  }
605
- const ke = ({ code: a }) => Me(a, q.NEW);
608
+ const ke = ({ code: a }) => Me(a, j.NEW);
606
609
  function Ve(a) {
607
610
  }
608
611
  const ue = () => {
609
- c("close"), h.value = !1;
612
+ u("close"), h.value = !1;
610
613
  };
611
614
  async function $e(a = "phone") {
612
615
  var t;
@@ -669,12 +672,12 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
669
672
  const S = (A = k.data) == null ? void 0 : A.tooManyRequests;
670
673
  if (k.status === 403 && S) {
671
674
  const K = S == null ? void 0 : S.type;
672
- return v.value = K, S.restTimeSec > 0 ? (I(S.restTimeSec), _.value = S.attempts.total, o.value = S.attempts.total - S.attempts.available, ie.value = S.attempts.available ?? pe) : j.value = !0, k;
675
+ return v.value = K, S.restTimeSec > 0 ? (I(S.restTimeSec), _.value = S.attempts.total, o.value = S.attempts.total - S.attempts.available, ie.value = S.attempts.available ?? pe) : W.value = !0, k;
673
676
  }
674
677
  return k;
675
678
  } finally {
676
679
  const N = await Se(a ?? e.addPhone);
677
- N && N.restTimeSec > 0 ? (I(N.restTimeSec), j.value = !1) : j.value = !0, b && (f.value = !1);
680
+ N && N.restTimeSec > 0 ? (I(N.restTimeSec), W.value = !1) : W.value = !0, b && (f.value = !1);
678
681
  }
679
682
  }, Ee = async ({ code: a }) => {
680
683
  var l, t, b, w, D, A, N, k, g, S, K;
@@ -693,7 +696,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
693
696
  O.value = !0;
694
697
  return;
695
698
  }
696
- return V && V === q.COMPLETED && (e.code = "", c("update-phone-field", e.addPhone), c("submit-phone", { phone: e.addPhone, code: a }), c("on-update-jwt", "phone", "bind", e.addPhone), c("on-toast", { color: "success", text: "Номер телефона успешно привязан к аккаунту" }), C.value = null, c("close")), y;
699
+ return V && V === j.COMPLETED && (e.code = "", u("update-phone-field", e.addPhone), u("submit-phone", { phone: e.addPhone, code: a }), u("on-update-jwt", "phone", "bind", e.addPhone), u("on-toast", { color: "success", text: "Номер телефона успешно привязан к аккаунту" }), C.value = null, u("close")), y;
697
700
  } catch (y) {
698
701
  const V = (S = (g = y == null ? void 0 : y.response) == null ? void 0 : g.data) == null ? void 0 : S.rateLimit;
699
702
  if (((K = y == null ? void 0 : y.response) == null ? void 0 : K.status) === 429 && V) {
@@ -745,7 +748,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
745
748
  "onClick:outside": ue
746
749
  }, {
747
750
  header: Q(() => [
748
- W("div", kt, [
751
+ q("div", kt, [
749
752
  T(d(Ye), {
750
753
  "slot-left": !1,
751
754
  size: "small",
@@ -753,7 +756,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
753
756
  "no-padding": !1
754
757
  }, {
755
758
  title: Q(() => [
756
- W("span", Vt, H(d(s) ? X.value : "Добавление номера телефона"), 1)
759
+ q("span", Vt, H(d(s) ? X.value : "Добавление номера телефона"), 1)
757
760
  ]),
758
761
  "right-button": Q(() => [
759
762
  T(d(Ze), {
@@ -767,8 +770,8 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
767
770
  ]),
768
771
  default: Q(() => [
769
772
  d(s) ? (p(), P("div", $t, [
770
- f.value ? (p(), G(Oe, { key: 0 })) : B("", !0),
771
- M.value === d(q).OLD ? (p(), G(it, {
773
+ f.value ? (p(), G(Oe, { key: 0 })) : $("", !0),
774
+ M.value === d(j).OLD ? (p(), G(it, {
772
775
  key: 1,
773
776
  phone: e.oldPhone,
774
777
  "onUpdate:phone": l[0] || (l[0] = (t) => e.oldPhone = t),
@@ -784,7 +787,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
784
787
  onOnSendOnlySms: ge,
785
788
  onOnMatchCode: xe,
786
789
  onOnMatchCodeError: be
787
- }, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(q).NEW ? (p(), G(gt, {
790
+ }, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(j).NEW ? (p(), G(gt, {
788
791
  key: 2,
789
792
  phone: e.newPhone,
790
793
  "onUpdate:phone": l[4] || (l[4] = (t) => e.newPhone = t),
@@ -804,11 +807,11 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
804
807
  onOnMatchCode: ke,
805
808
  onOnMatchCodeError: Ve,
806
809
  onOnClearCodeError: l[9] || (l[9] = (t) => O.value = !1)
807
- }, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(q).COMPLETED ? (p(), P("div", Bt, [
808
- W("p", null, H(F("Телефон успешно изменен")), 1)
809
- ])) : B("", !0)
810
+ }, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(j).COMPLETED ? (p(), P("div", Bt, [
811
+ q("p", null, H(F("Телефон успешно изменен")), 1)
812
+ ])) : $("", !0)
810
813
  ])) : (p(), P("div", Et, [
811
- f.value ? (p(), G(Oe, { key: 0 })) : B("", !0),
814
+ f.value ? (p(), G(Oe, { key: 0 })) : $("", !0),
812
815
  T(bt, {
813
816
  phone: e.addPhone,
814
817
  "onUpdate:phone": l[10] || (l[10] = (t) => e.addPhone = t),
@@ -216,9 +216,9 @@ const ra = {
216
216
  emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
217
217
  setup(s, { emit: n }) {
218
218
  const r = n, u = h(!0), { currentDialog: v, dialogPayload: p, closeDialog: U } = X(), l = {
219
- email: q(() => import("./ProfileEmailDialog-anbTLDAX.js")),
220
- phone: q(() => import("./ProfilePhoneDialog-Cu_Ug6x9.js")),
221
- password: q(() => import("./ProfilePasswordDialog-CeKV-Qzk.js"))
219
+ email: q(() => import("./ProfileEmailDialog-Cwnt9uWm.js")),
220
+ phone: q(() => import("./ProfilePhoneDialog-BmTMMKvs.js")),
221
+ password: q(() => import("./ProfilePasswordDialog-BxLfRPXi.js"))
222
222
  }, i = ({ email: y }) => {
223
223
  r("update-email-field", y);
224
224
  }, c = ({ phone: y }) => {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".avatar-input[data-v-965c8738] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-965c8738] .p-input-file:hover .overlay{visibility:visible}.icon-locked{pointer-events:auto;position:absolute;right:1rem;top:1rem;color:#b6c7d6}.input-wrapper{position:relative;width:100%}.dialogTitle{z-index:10;width:100%;font-size:16px;font-weight:600;line-height:24px;text-align:center;color:#2b3238}.dialogDefaultContainer{display:flex;align-items:flex-start;flex-direction:column;width:100%;gap:32px;margin-top:16px;padding:10px 16px}.dialogDefaultContainerTextHint{font-weight:400;font-size:14px;line-height:20px;text-align:center;color:#1b1b1b}.dialogDefaultContainerRateLimitText{font-weight:600;font-size:14px;line-height:20px;color:#d0dbe4}.dialogDefaultContainerInsideContent{width:100%;display:flex;flex-direction:column;gap:24px}.dialogDefaultContainerRateLimitTextActive{color:#1c7ef1;cursor:pointer}.dialogDefaultContainerSendCodeBySmsText{color:#1c7ef1;cursor:pointer;font-size:14px;font-weight:600;display:flex;align-items:center;text-align:center}.chip{display:flex;align-items:center;justify-content:center;flex-direction:row;gap:4px;height:24px;font-size:12px;font-weight:600;color:#1b1b1b;padding:4px;line-height:16px;background-color:#b6d7ff4d;border-radius:4px;text-align:center;margin-left:5px}.cross{cursor:pointer;text-align:end}.finalLimitWrapper{display:flex;flex-direction:column;align-items:center;padding:12px 0;gap:12px;width:440px;min-height:94px;background:#e4606026;border-radius:8px}.finalLimitText{text-align:center;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#5d7285}.finalLimitLink{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:20px;color:#1c7ef1;text-align:center;cursor:pointer;text-decoration:none}.finalLimitLink:hover{text-decoration:underline}.toastWrapper{position:fixed;bottom:1rem;right:1rem;z-index:9999}.toast{width:100%}.base-container{margin-top:1.5rem;display:flex;flex-direction:column;gap:1.25rem;width:490px;height:428px}.icon-disabled{pointer-events:none;position:absolute;right:1rem;top:1rem;color:#b6c7d6}.centered-overlay{position:absolute;left:50%;top:50%;z-index:1000;height:100%;width:100%;transform:translate(-50%,-50%)}.buttons-container{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-start}.buttons-container PButton{flex:1 1 100%}._loaderOverlay_cpu73_1[data-v-9e697525]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background:#ffffffb3;border-radius:16px;z-index:99}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { a as o } from "./index-BKwB1EH3.js";
2
+ import { a as o } from "./index-DW7ADhQu.js";
3
3
  export {
4
4
  o as PEditUserContact
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import { ref as l, defineComponent as L, createElementBlock as f, openBlock as v, normalizeClass as r, createVNode as E, unref as F, computed as T, renderSlot as d, createCommentVNode as $, createElementVNode as o, toDisplayString as y, createTextVNode as p } from "vue";
2
2
  import { PLoader as w } from "@profeat/ui-kit";
3
- import { _ as g, g as R, p as h } from "./index-BKwB1EH3.js";
3
+ import { _ as g, g as R, p as h } from "./index-DW7ADhQu.js";
4
4
  function C(e) {
5
5
  const t = Math.floor(e / 60), a = e % 60;
6
6
  return `${String(t).padStart(2, "0")}:${String(a).padStart(2, "0")}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yourgoods/ui-smart",
3
- "version": "0.46.5",
3
+ "version": "0.46.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",