@yourgoods/ui-smart 0.51.4 → 0.51.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 oe, ref as T, reactive as Z, watch as Y, computed as b, toRefs as ce, createElementBlock as I, openBlock as y, createElementVNode as x, createCommentVNode as D, toDisplayString as _, createVNode as $, unref as u, isRef as ee, withCtx as G, createTextVNode as ie, Fragment as Ae, createBlock as H, resolveDynamicComponent as he, onMounted as Fe } from "vue";
2
- import { _ as ve, c as ke, u as Re, a as ze, P as Me, b as We } from "./useRateLimitToast-qlqaD0o6.js";
3
- import { C as F, _ as He, B as qe, p as W, g as je } from "./index-DqOAIUnd.js";
2
+ import { _ as ve, c as ke, u as Re, a as ze, P as Me, b as We } from "./useRateLimitToast-DlqIYV_M.js";
3
+ import { C as F, _ as He, B as qe, p as W, g as je } from "./index-dOnVTlJF.js";
4
4
  import { PInput as J, IconMailMd as pe, PButton as ne, IconEyeMd as Ve, 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-DqOAIUnd.js";
2
+ import { C as I, p as D, g as Ve } from "./index-dOnVTlJF.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
1
  import { createElementBlock as S, openBlock as v, createElementVNode as H, defineComponent as he, reactive as ve, watch as _, ref as O, toRefs as Ce, computed as I, createCommentVNode as B, createVNode as b, toDisplayString as G, createBlock as J, createTextVNode as Z, unref as r, isRef as le, withCtx as X, onMounted as We, Fragment as je } from "vue";
2
- import { _ as we, c as Ne, a as He, u as Ge, P as Oe, b as Je } from "./useRateLimitToast-qlqaD0o6.js";
2
+ import { _ as we, c as Ne, a as He, u as Ge, P as Oe, b as Je } from "./useRateLimitToast-DlqIYV_M.js";
3
3
  import { IconTelegramSm as Pe, PInput as se, IconPhoneMd as Re, IconMailMd as Ke, PButton as ze, PDialog as Qe, PTopBar as Xe, IconCrossMd as Ye, PTeleportContainer as Ze } from "@profeat/ui-kit";
4
- import { C as j, t as De, p as te, g as Ae } from "./index-DqOAIUnd.js";
4
+ import { C as j, t as De, p as te, g as Ae } from "./index-dOnVTlJF.js";
5
5
  const _e = {
6
6
  xmlns: "http://www.w3.org/2000/svg",
7
7
  width: "12",
@@ -63,10 +63,10 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
63
63
  const z = (h) => {
64
64
  const y = h.target;
65
65
  let i = ((y == null ? void 0 : y.value) ?? "").replace(/\D/g, "");
66
- i.length < 4 && u("on-clear-code-error"), i.length > 4 && (i = i.slice(0, 4)), x.value = i, y && y.value !== i && (y.value = i), i.length === 4 && i !== p.value && (p.value = i, u("on-match-code", { phone: e.value, code: i }));
66
+ i.length < 4 && u("on-clear-code-error"), i.length > 4 && (i = i.slice(0, 4)), k.value = i, y && y.value !== i && (y.value = i), i.length === 4 && i !== p.value && (p.value = i, u("on-match-code", { phone: e.value, code: i }));
67
67
  }, Y = () => u("on-send-code-again", { phone: c.phoneModel }), K = () => {
68
68
  u("on-send-only-sms", { phone: c.phoneModel });
69
- }, { phoneModel: e, codeModel: x, touched: P } = Ce(c), C = I(() => P.value.phone && !e.value.trim() ? "Введите телефон" : E.phoneError), D = I(() => E.isNotMatchCode ? "Неверный код" : P.value.code ? x.value.trim() ? E.codeError ?? null : "Введите код" : "");
69
+ }, { phoneModel: e, codeModel: k, touched: P } = Ce(c), C = I(() => P.value.phone && !e.value.trim() ? "Введите телефон" : E.phoneError), D = I(() => E.isNotMatchCode ? "Неверный код" : P.value.code ? k.value.trim() ? E.codeError ?? null : "Введите код" : "");
70
70
  return (h, y) => (v(), S("div", tt, [
71
71
  H("div", ot, [
72
72
  H("div", nt, G(h.hintText), 1),
@@ -98,8 +98,8 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
98
98
  ])) : B("", !0),
99
99
  h.showCode ? (v(), S("div", st, [
100
100
  b(r(se), {
101
- modelValue: r(x),
102
- "onUpdate:modelValue": y[4] || (y[4] = (i) => le(x) ? x.value = i : null),
101
+ modelValue: r(k),
102
+ "onUpdate:modelValue": y[4] || (y[4] = (i) => le(k) ? k.value = i : null),
103
103
  size: "large",
104
104
  "text-size": "medium",
105
105
  label: "Код",
@@ -189,7 +189,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
189
189
  }, e = I(() => {
190
190
  const l = p.phoneModel.trim().replace(/[()\-\s]/g, "");
191
191
  return /^\+?\d{10,15}$/.test(l);
192
- }), x = I(() => !e.value || !!f.value), P = async () => {
192
+ }), k = I(() => !e.value || !!f.value), P = async () => {
193
193
  var t;
194
194
  try {
195
195
  if (z("phone"), !e.value) {
@@ -254,7 +254,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
254
254
  c.value ? B("", !0) : (v(), S("div", ht, [
255
255
  b(r(ze), {
256
256
  style: { width: "100%" },
257
- disabled: x.value,
257
+ disabled: k.value,
258
258
  onClick: P
259
259
  }, {
260
260
  default: X(() => l[5] || (l[5] = [
@@ -351,7 +351,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
351
351
  }, e = I(() => {
352
352
  const l = p.phoneModel.trim().replace(/[()\-\s]/g, "");
353
353
  return /^\+?\d{10,15}$/.test(l);
354
- }), x = I(() => !e.value || !!f.value), P = async () => {
354
+ }), k = I(() => !e.value || !!f.value), P = async () => {
355
355
  var t;
356
356
  try {
357
357
  if (z("phone"), !e.value) {
@@ -405,7 +405,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
405
405
  label: "Телефон",
406
406
  type: "tel",
407
407
  error: A.value,
408
- disabled: t.disableAddPhone && c.value,
408
+ disabled: c.value,
409
409
  onBlur: l[1] || (l[1] = (s) => z("phone")),
410
410
  onInput: K
411
411
  }, null, 8, ["modelValue", "error", "disabled"]),
@@ -417,7 +417,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
417
417
  c.value ? B("", !0) : (v(), S("div", Tt, [
418
418
  b(r(ze), {
419
419
  style: { width: "100%" },
420
- disabled: x.value,
420
+ disabled: k.value,
421
421
  onClick: P
422
422
  }, {
423
423
  default: X(() => l[5] || (l[5] = [
@@ -463,7 +463,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
463
463
  ])) : B("", !0)
464
464
  ]));
465
465
  }
466
- }), kt = { class: "text-center w-full" }, xt = { class: "dialogTitle" }, Vt = {
466
+ }), xt = { class: "text-center w-full" }, kt = { class: "dialogTitle" }, Vt = {
467
467
  key: 0,
468
468
  class: "dialogDefaultContainer"
469
469
  }, $t = { key: 3 }, Bt = {
@@ -494,7 +494,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
494
494
  code: "",
495
495
  addPhone: "",
496
496
  addCode: ""
497
- }), x = O(j.OLD), P = O(null), C = O(!1), D = O(!1), h = O("tg"), y = I(() => h.value === "tg"), i = O(!1), { startTimer: L, remainingSeconds: ie, isAvailableForSendAgain: A, totalRateAttempts: Q, currentRateAttempt: t } = He(), { showRateLimitToast: l } = Je(c), { isEditFlow: s, getFlow: me } = Ge(O(u.mode)), re = I(() => A.value ? "Повторить" : `${ie.value}`), oe = O(ae), ue = I(() => oe.value === 0), Fe = (n) => new Promise((a) => setTimeout(a, n));
497
+ }), k = O(j.OLD), P = O(null), C = O(!1), D = O(!1), h = O("tg"), y = I(() => h.value === "tg"), i = O(!1), { startTimer: L, remainingSeconds: ie, isAvailableForSendAgain: A, totalRateAttempts: Q, currentRateAttempt: t } = He(), { showRateLimitToast: l } = Je(c), { isEditFlow: s, getFlow: me } = Ge(O(u.mode)), re = I(() => A.value ? "Повторить" : `${ie.value}`), oe = O(ae), ue = I(() => oe.value === 0), Fe = (n) => new Promise((a) => setTimeout(a, n));
498
498
  async function fe(n = "email") {
499
499
  var o;
500
500
  return (o = (await Ae("/users/profile/session/get-edit-session", { params: { field: n } })).data) == null ? void 0 : o.data;
@@ -505,12 +505,12 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
505
505
  field: n,
506
506
  oldValue: F(u.initialPhone)
507
507
  })).data) == null ? void 0 : $.data;
508
- return P.value = (o == null ? void 0 : o.sessionId) ?? null, x.value = (o == null ? void 0 : o.step) ?? j.OLD, e.oldPhone = (o == null ? void 0 : o.oldValue) ?? "", e.newPhone = (o == null ? void 0 : o.newValue) ?? "", o;
508
+ return P.value = (o == null ? void 0 : o.sessionId) ?? null, k.value = (o == null ? void 0 : o.step) ?? j.OLD, e.oldPhone = (o == null ? void 0 : o.oldValue) ?? "", e.newPhone = (o == null ? void 0 : o.newValue) ?? "", o;
509
509
  }
510
510
  async function Ue() {
511
511
  try {
512
512
  const n = await fe("phone");
513
- return P.value = n.sessionId, x.value = n.step, e.oldPhone = n.oldValue ?? "", n.sessionId ? n : await Te("phone");
513
+ return P.value = n.sessionId, k.value = n.step, e.oldPhone = n.oldValue ?? "", n.sessionId ? n : await Te("phone");
514
514
  } catch {
515
515
  return await Te("phone");
516
516
  }
@@ -561,8 +561,8 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
561
561
  if ((d === "tg" || d === "sms") && (h.value = d, d === "tg" && (i.value = !1)), (m == null ? void 0 : m.status) === 403 && ((N = m.data) != null && N.tooManyRequests)) {
562
562
  const M = (q = (R = m.data) == null ? void 0 : R.tooManyRequests) == null ? void 0 : q.type;
563
563
  h.value = M;
564
- const k = m.data.tooManyRequests;
565
- return k.restTimeSec > 0 ? (L(k.restTimeSec), Q.value = k.attempts.total, t.value = k.attempts.total - k.attempts.available, oe.value = k.attempts.available ?? ae) : A.value = !0, m;
564
+ const x = m.data.tooManyRequests;
565
+ return x.restTimeSec > 0 ? (L(x.restTimeSec), Q.value = x.attempts.total, t.value = x.attempts.total - x.attempts.available, oe.value = x.attempts.available ?? ae) : A.value = !0, m;
566
566
  }
567
567
  return m;
568
568
  } catch (g) {
@@ -581,27 +581,27 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
581
581
  C.value = !0;
582
582
  try {
583
583
  const M = await fe("phone");
584
- P.value = M.sessionId, x.value = M.step, e.oldPhone = M.oldValue ?? e.oldPhone, e.newPhone = M.newValue ?? e.newPhone;
585
- const k = await te("/users/profile/change/phone/match-code", {
584
+ P.value = M.sessionId, k.value = M.step, e.oldPhone = M.oldValue ?? e.oldPhone, e.newPhone = M.newValue ?? e.newPhone;
585
+ const x = await te("/users/profile/change/phone/match-code", {
586
586
  phone: a === j.NEW ? F(e.newPhone) : F(e.oldPhone),
587
587
  sessionId: P.value,
588
588
  code: n,
589
589
  step: a
590
- }), ne = ((o = k.data) == null ? void 0 : o.nextStep) ?? ((T = ($ = k.data) == null ? void 0 : $.data) == null ? void 0 : T.nextStep), pe = ((R = (N = k.data) == null ? void 0 : N.data) == null ? void 0 : R.rateLimit) ?? ((q = k.data) == null ? void 0 : q.rateLimit) ?? null;
591
- if (!(((W = k.data) == null ? void 0 : W.data.success) ?? ((w = k.data) == null ? void 0 : w.success))) {
590
+ }), ne = ((o = x.data) == null ? void 0 : o.nextStep) ?? ((T = ($ = x.data) == null ? void 0 : $.data) == null ? void 0 : T.nextStep), pe = ((R = (N = x.data) == null ? void 0 : N.data) == null ? void 0 : R.rateLimit) ?? ((q = x.data) == null ? void 0 : q.rateLimit) ?? null;
591
+ if (!(((W = x.data) == null ? void 0 : W.data.success) ?? ((w = x.data) == null ? void 0 : w.success))) {
592
592
  l(pe), D.value = !0;
593
593
  return;
594
594
  }
595
- if (!ne) return k;
596
- if (x.value = ne, ne === j.NEW) {
595
+ if (!ne) return x;
596
+ if (k.value = ne, ne === j.NEW) {
597
597
  const Ie = await fe("phone");
598
598
  e.oldPhone = Ie.oldValue ?? e.oldPhone, e.newPhone = Ie.newValue ?? e.newPhone, e.code = "";
599
599
  }
600
- return ne === j.COMPLETED && (e.code = "", c("update-phone-field", e.addPhone), c("submit-phone", { phone: e.oldPhone, code: n }), c("on-toast", { color: "success", text: "Номер телефона изменён" }), c("on-update-jwt", "phone", "edit", e.newPhone), P.value = null, c("close")), k;
600
+ return ne === j.COMPLETED && (e.code = "", c("update-phone-field", e.addPhone), c("submit-phone", { phone: e.oldPhone, code: n }), c("on-toast", { color: "success", text: "Номер телефона изменён" }), c("on-update-jwt", "phone", "edit", e.newPhone), P.value = null, c("close")), x;
601
601
  } catch (M) {
602
- const k = (m = (g = M == null ? void 0 : M.response) == null ? void 0 : g.data) == null ? void 0 : m.rateLimit;
603
- if (((d = M == null ? void 0 : M.response) == null ? void 0 : d.status) === 429 && k) {
604
- l(k), D.value = !0;
602
+ const x = (m = (g = M == null ? void 0 : M.response) == null ? void 0 : g.data) == null ? void 0 : m.rateLimit;
603
+ if (((d = M == null ? void 0 : M.response) == null ? void 0 : d.status) === 429 && x) {
604
+ l(x), D.value = !0;
605
605
  return;
606
606
  }
607
607
  throw M;
@@ -609,9 +609,9 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
609
609
  C.value = !1;
610
610
  }
611
611
  }, be = ({ code: n }) => Me(n, j.OLD);
612
- function ke(n) {
612
+ function xe(n) {
613
613
  }
614
- const xe = ({ code: n }) => Me(n, j.NEW);
614
+ const ke = ({ code: n }) => Me(n, j.NEW);
615
615
  function Ve(n) {
616
616
  }
617
617
  const ce = () => {
@@ -644,7 +644,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
644
644
  async function qe() {
645
645
  try {
646
646
  const n = await $e("phone");
647
- P.value = n.sessionId, x.value = n.step, e.addPhone = n.newValue ?? "", n.sessionId || await Be({ field: "phone", value: e.addPhone });
647
+ P.value = n.sessionId, k.value = n.step, e.addPhone = n.newValue ?? "", n.sessionId || await Be({ field: "phone", value: e.addPhone });
648
648
  } catch {
649
649
  await Be({ field: "phone", value: e.addPhone });
650
650
  }
@@ -705,9 +705,9 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
705
705
  phone: F(e.addPhone),
706
706
  sessionId: P.value,
707
707
  code: n
708
- }), M = ((a = d.data) == null ? void 0 : a.nextStep) ?? (($ = (o = d.data) == null ? void 0 : o.data) == null ? void 0 : $.nextStep), k = ((N = (T = d.data) == null ? void 0 : T.data) == null ? void 0 : N.rateLimit) ?? ((R = d.data) == null ? void 0 : R.rateLimit) ?? null;
708
+ }), M = ((a = d.data) == null ? void 0 : a.nextStep) ?? (($ = (o = d.data) == null ? void 0 : o.data) == null ? void 0 : $.nextStep), x = ((N = (T = d.data) == null ? void 0 : T.data) == null ? void 0 : N.rateLimit) ?? ((R = d.data) == null ? void 0 : R.rateLimit) ?? null;
709
709
  if (!(((q = d.data) == null ? void 0 : q.data.success) ?? ((W = d.data) == null ? void 0 : W.success))) {
710
- l(k), D.value = !0;
710
+ l(x), D.value = !0;
711
711
  return;
712
712
  }
713
713
  return M && M === j.COMPLETED && (e.code = "", c("update-phone-field", e.addPhone), c("submit-phone", { phone: e.addPhone, code: n }), c("on-update-jwt", "phone", "bind", e.addPhone), c("on-toast", { color: "success", text: "Номер телефона успешно привязан к аккаунту" }), P.value = null, c("close")), d;
@@ -734,7 +734,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
734
734
  }), V({
735
735
  localVisible: f,
736
736
  form: e,
737
- currentStep: x,
737
+ currentStep: k,
738
738
  loading: C,
739
739
  rateLimitText: re,
740
740
  isAvailable: ue,
@@ -744,8 +744,8 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
744
744
  sendContactCode: ee,
745
745
  sendBindContactCode: ge,
746
746
  handleOldCodeSuccess: be,
747
- handleOldCodeError: ke,
748
- handleNewCodeSuccess: xe,
747
+ handleOldCodeError: xe,
748
+ handleNewCodeSuccess: ke,
749
749
  handleNewCodeError: Ve,
750
750
  matchBindCode: Ee,
751
751
  matchBindCodeError: Le
@@ -762,7 +762,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
762
762
  "onClick:outside": ce
763
763
  }, {
764
764
  header: X(() => [
765
- H("div", kt, [
765
+ H("div", xt, [
766
766
  b(r(Xe), {
767
767
  "slot-left": !1,
768
768
  size: "small",
@@ -770,7 +770,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
770
770
  "no-padding": !1
771
771
  }, {
772
772
  title: X(() => [
773
- H("span", xt, G(r(s) ? Y.value : "Добавление номера телефона"), 1)
773
+ H("span", kt, G(r(s) ? Y.value : "Добавление номера телефона"), 1)
774
774
  ]),
775
775
  "right-button": X(() => [
776
776
  b(r(Ye), {
@@ -785,7 +785,7 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
785
785
  default: X(() => [
786
786
  r(s) ? (v(), S("div", Vt, [
787
787
  C.value ? (v(), J(Oe, { key: 0 })) : B("", !0),
788
- x.value === r(j).OLD ? (v(), J(dt, {
788
+ k.value === r(j).OLD ? (v(), J(dt, {
789
789
  key: 1,
790
790
  phone: e.oldPhone,
791
791
  "onUpdate:phone": a[0] || (a[0] = (o) => e.oldPhone = o),
@@ -801,8 +801,8 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
801
801
  onOnSendCodeAgain: a[3] || (a[3] = (o) => ee({ value: e.oldPhone, isOnlySms: !y.value && i.value })),
802
802
  onOnSendOnlySms: ye,
803
803
  onOnMatchCode: be,
804
- onOnMatchCodeError: ke
805
- }, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg", "product"])) : x.value === r(j).NEW ? (v(), J(ft, {
804
+ onOnMatchCodeError: xe
805
+ }, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg", "product"])) : k.value === r(j).NEW ? (v(), J(ft, {
806
806
  key: 2,
807
807
  phone: e.newPhone,
808
808
  "onUpdate:phone": a[4] || (a[4] = (o) => e.newPhone = o),
@@ -820,10 +820,10 @@ const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
820
820
  onOnSendCode: a[7] || (a[7] = (o) => ee({ value: e.newPhone })),
821
821
  onOnSendCodeAgain: a[8] || (a[8] = (o) => ee({ value: e.newPhone, isOnlySms: !y.value && i.value })),
822
822
  onOnSendOnlySms: ye,
823
- onOnMatchCode: xe,
823
+ onOnMatchCode: ke,
824
824
  onOnMatchCodeError: Ve,
825
825
  onOnClearCodeError: a[9] || (a[9] = (o) => D.value = !1)
826
- }, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg", "product"])) : x.value === r(j).COMPLETED ? (v(), S("div", $t, [
826
+ }, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg", "product"])) : k.value === r(j).COMPLETED ? (v(), S("div", $t, [
827
827
  H("p", null, G(z("Телефон успешно изменен")), 1)
828
828
  ])) : B("", !0)
829
829
  ])) : (v(), S("div", Bt, [
@@ -1,11 +1,11 @@
1
1
  import { ref as w, shallowRef as Le, defineComponent as H, defineAsyncComponent as J, watch as ze, createBlock as I, createCommentVNode as C, unref as m, openBlock as y, resolveDynamicComponent as Me, mergeProps as Re, computed as T, reactive as q, onMounted as Ge, createElementBlock as k, Fragment as me, createVNode as g, createElementVNode as Y, withCtx as F, toDisplayString as D, createTextVNode as _, Teleport as ue, Transition as je, withDirectives as Je, vShow as qe } from "vue";
2
2
  import Ye from "axios";
3
3
  import { PInputFileUploader as _e, PInput as L, IconFilledEditMd as z, PButton as de, PImageCropper as We, PToast as Ke, PTeleportContainer as pe, PToastContainer as Ze } from "@profeat/ui-kit";
4
- function He(l, r = 2) {
5
- if (l === 0)
4
+ function He(i, r = 2) {
5
+ if (i === 0)
6
6
  return "0 B";
7
- const n = 1024, u = ["B", "KB", "MB", "GB", "TB", "PB", "EB"], v = Math.floor(Math.log(l) / Math.log(n));
8
- return `${Number.parseFloat((l / n ** v).toFixed(r))} ${u[v]}`;
7
+ const n = 1024, s = ["B", "KB", "MB", "GB", "TB", "PB", "EB"], v = Math.floor(Math.log(i) / Math.log(n));
8
+ return `${Number.parseFloat((i / n ** v).toFixed(r))} ${s[v]}`;
9
9
  }
10
10
  const Qe = {
11
11
  "image/jpeg": "JPEG",
@@ -15,8 +15,8 @@ const Qe = {
15
15
  "application/zip": "ZIP Archive"
16
16
  // ...
17
17
  };
18
- function Xe(l) {
19
- return l.map((r) => {
18
+ function Xe(i) {
19
+ return i.map((r) => {
20
20
  var n;
21
21
  return Qe[r] || ((n = r.split("/")[1]) == null ? void 0 : n.toUpperCase());
22
22
  });
@@ -29,15 +29,16 @@ const Na = {
29
29
  VERIFY_EMAIL: "verify-email"
30
30
  };
31
31
  let K = null;
32
- function ea(l, r) {
32
+ function ea(i, r, n) {
33
33
  K = Ye.create({
34
34
  baseURL: r,
35
35
  headers: {
36
- Authorization: `Bearer ${l}`,
36
+ Authorization: `Bearer ${i}`,
37
+ "x-throttler-prefix": n ?? "throttler_profile_edit"
38
+ // здесь можно словить баг, который может быть сложно отследить, если будет передаваться пустой прелфикс
37
39
  // 'Content-Type': 'application/json',
38
- "x-throttler-prefix": "throttler_profile_edit"
39
40
  },
40
- validateStatus: (n) => n >= 200 && n < 300
41
+ validateStatus: (s) => s >= 200 && s < 300
41
42
  });
42
43
  }
43
44
  function Q() {
@@ -45,17 +46,17 @@ function Q() {
45
46
  throw new Error("Axios instance not initialized. Call initAxios(token, baseUrl) first.");
46
47
  return K;
47
48
  }
48
- async function Z(l, r, n) {
49
- return Q().post(l, r, n);
49
+ async function Z(i, r, n) {
50
+ return Q().post(i, r, n);
50
51
  }
51
- async function aa(l, r) {
52
- return Q().get(l, r);
52
+ async function aa(i, r) {
53
+ return Q().get(i, r);
53
54
  }
54
- async function ta(l, r) {
55
- return Q().delete(l, r);
55
+ async function ta(i, r) {
56
+ return Q().delete(i, r);
56
57
  }
57
- async function oa(l) {
58
- const r = await Z("/users/profile/me", l);
58
+ async function oa(i) {
59
+ const r = await Z("/users/profile/me", i);
59
60
  if (r.status !== 200 && r.status !== 201 || !r.data)
60
61
  throw new Error("Ошибка при получении профиля пользователя");
61
62
  return r.data;
@@ -65,13 +66,13 @@ function X() {
65
66
  return {
66
67
  currentDialog: M,
67
68
  dialogPayload: W,
68
- openDialog: (u, v) => {
69
- M.value = u, W.value = v ?? null;
69
+ openDialog: (s, v) => {
70
+ M.value = s, W.value = v ?? null;
70
71
  },
71
72
  closeDialog: () => {
72
73
  M.value = null, W.value = null;
73
74
  },
74
- isDialogOpen: (u) => M.value === u
75
+ isDialogOpen: (s) => M.value === s
75
76
  };
76
77
  }
77
78
  const na = {
@@ -215,22 +216,22 @@ const na = {
215
216
  disableAddPhone: { type: Boolean }
216
217
  },
217
218
  emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
218
- setup(l, { emit: r }) {
219
- const n = r, u = w(!0), { currentDialog: v, dialogPayload: c, closeDialog: U } = X(), i = {
220
- email: J(() => import("./ProfileEmailDialog-zxtkQheR.js")),
221
- phone: J(() => import("./ProfilePhoneDialog-nqRLEJxs.js")),
222
- password: J(() => import("./ProfilePasswordDialog-COOBJHuF.js"))
223
- }, s = ({ email: h }) => {
219
+ setup(i, { emit: r }) {
220
+ const n = r, s = w(!0), { currentDialog: v, dialogPayload: c, closeDialog: U } = X(), u = {
221
+ email: J(() => import("./ProfileEmailDialog-BzqSGu9T.js")),
222
+ phone: J(() => import("./ProfilePhoneDialog-DnQ9YIj0.js")),
223
+ password: J(() => import("./ProfilePasswordDialog-CgOw023B.js"))
224
+ }, l = ({ email: h }) => {
224
225
  n("update-email-field", h);
225
226
  }, p = ({ phone: h }) => {
226
227
  n("update-phone-field", h);
227
228
  };
228
229
  return ze(v, (h) => {
229
- u.value = !!h;
230
- }), (h, d) => m(v) ? (y(), I(Me(i[m(v)]), Re({
230
+ s.value = !!h;
231
+ }), (h, d) => m(v) ? (y(), I(Me(u[m(v)]), Re({
231
232
  key: 0,
232
- modelValue: u.value,
233
- "onUpdate:modelValue": d[0] || (d[0] = (f) => u.value = f),
233
+ modelValue: s.value,
234
+ "onUpdate:modelValue": d[0] || (d[0] = (f) => s.value = f),
234
235
  language: h.language,
235
236
  provider: h.provider,
236
237
  "disable-add-phone": h.disableAddPhone
@@ -238,7 +239,7 @@ const na = {
238
239
  onClose: m(U),
239
240
  onCleanInputErrors: d[1] || (d[1] = (f) => n("clean-input-errors")),
240
241
  onOnUpdateJwt: d[2] || (d[2] = (f, N, o) => n("on-update-jwt", f, N, o)),
241
- onSubmitEmail: s,
242
+ onSubmitEmail: l,
242
243
  onSubmitPhone: p,
243
244
  onOnPasswordError: d[3] || (d[3] = (f, N) => n("on-password-error", f, N)),
244
245
  onOnToast: d[4] || (d[4] = (f) => n("on-toast", f))
@@ -276,8 +277,8 @@ const na = {
276
277
  disableAddPhone: { type: Boolean }
277
278
  },
278
279
  emits: ["open-email-dialog", "open-phone-dialog", "open-password-dialog", "on-update-jwt", "on-password-error", "update-tokens"],
279
- setup(l, { emit: r }) {
280
- const n = l, u = r, v = T(() => n.language ?? "ru"), c = (e) => na[v.value][e] || e, { openDialog: U } = X(), i = q({ firstName: "", lastName: "" }), s = w({ firstName: "", lastName: "" }), p = q({ firstName: !1, lastName: !1, email: !1, phone: !1 }), h = w(""), d = w(""), f = w(""), N = w(!1), o = q({
280
+ setup(i, { emit: r }) {
281
+ const n = i, s = r, v = T(() => n.language ?? "ru"), c = (e) => na[v.value][e] || e, { openDialog: U } = X(), u = q({ firstName: "", lastName: "" }), l = w({ firstName: "", lastName: "" }), p = q({ firstName: !1, lastName: !1, email: !1, phone: !1 }), h = w(""), d = w(""), f = w(""), N = w(!1), o = q({
281
282
  value: null,
282
283
  loading: !1,
283
284
  accept: ["image/png", "image/jpeg"],
@@ -285,7 +286,7 @@ const na = {
285
286
  // 10 MB
286
287
  imageBinary: null,
287
288
  imageContent: ""
288
- }), B = w(""), S = w(!1), R = w(!0), G = w(!0), ee = w(void 0), ae = w(""), ce = T(() => oe(i.firstName, p.firstName)), fe = T(() => oe(i.lastName, p.lastName)), ge = T(() => p.email && !d.value.trim() ? "Введите e-mail" : ""), ve = T(() => p.phone && !f.value.trim() ? "Введите номер телефона" : ""), A = (e) => n.fields.some((a) => a.key === e), te = (e) => e && e.trim() ? "edit" : "bind", j = () => setTimeout(() => {
289
+ }), B = w(""), S = w(!1), R = w(!0), G = w(!0), ee = w(void 0), ae = w(""), ce = T(() => oe(u.firstName, p.firstName)), fe = T(() => oe(u.lastName, p.lastName)), ge = T(() => p.email && !d.value.trim() ? "Введите e-mail" : ""), ve = T(() => p.phone && !f.value.trim() ? "Введите номер телефона" : ""), A = (e) => n.fields.some((a) => a.key === e), te = (e) => e && e.trim() ? "edit" : "bind", j = () => setTimeout(() => {
289
290
  var e;
290
291
  return (e = document.activeElement) == null ? void 0 : e.blur();
291
292
  }, 0), he = T(() => !!(d.value && d.value.trim() !== "")), we = T(() => o.imageContent ? c("Загрузить другое фото") : c("Загрузить фото")), oe = (e, a) => {
@@ -293,25 +294,25 @@ const na = {
293
294
  const t = e.trim();
294
295
  return t ? t.length < 2 ? "Поле должно содержать минимум 2 символа" : "" : "Введите значение";
295
296
  }, ye = (e) => U("email", { mode: e ? "edit" : "bind", initialEmail: e }), Ee = () => {
296
- j(), p.email = !1, G.value = !1, u("open-email-dialog", d.value, te(d.value)), ye(d.value);
297
+ j(), p.email = !1, G.value = !1, s("open-email-dialog", d.value, te(d.value)), ye(d.value);
297
298
  }, be = () => {
298
- j(), p.phone = !1, R.value = !1, u("open-phone-dialog", f.value, te(f.value));
299
+ j(), p.phone = !1, R.value = !1, s("open-phone-dialog", f.value, te(f.value));
299
300
  }, Ne = async (e, a, t) => {
300
- e === "email" && t && (d.value = t), e === "phone" && t && (f.value = t), u("on-update-jwt");
301
+ e === "email" && t && (d.value = t), e === "phone" && t && (f.value = t), s("on-update-jwt");
301
302
  }, Pe = (e) => {
302
303
  f.value = e;
303
304
  }, Ce = (e) => {
304
305
  d.value = e;
305
306
  }, ke = (e, a) => {
306
- S.value = !0, u("on-password-error", e, a);
307
+ S.value = !0, s("on-password-error", e, a);
307
308
  }, Te = () => {
308
309
  R.value = !1, G.value = !1;
309
310
  }, V = (e) => {
310
311
  S.value = !0, ee.value = e.color ?? "", ae.value = e.text ?? "";
311
312
  }, x = (e) => {
312
313
  if (p[e] = !0, e === "firstName" || e === "lastName") {
313
- const a = i[e];
314
- a.length > 40 && (i[e] = a.slice(0, 40));
314
+ const a = u[e];
315
+ a.length > 40 && (u[e] = a.slice(0, 40));
315
316
  }
316
317
  }, Ue = (e) => {
317
318
  var $, O;
@@ -375,14 +376,14 @@ const na = {
375
376
  ));
376
377
  }, se = w(!1), le = async (e) => {
377
378
  var t, E;
378
- const a = (t = i[e]) == null ? void 0 : t.trim();
379
+ const a = (t = u[e]) == null ? void 0 : t.trim();
379
380
  if (a)
380
381
  try {
381
382
  se.value = !0;
382
383
  const b = (E = (await Z("/users/profile/update-name", { [e]: a })).data) == null ? void 0 : E.data;
383
- b != null && b.user && (i.firstName = b.user.firstName ?? i.firstName, i.lastName = b.user.lastName ?? i.lastName, s.value = {
384
- firstName: i.firstName,
385
- lastName: i.lastName
384
+ b != null && b.user && (u.firstName = b.user.firstName ?? u.firstName, u.lastName = b.user.lastName ?? u.lastName, l.value = {
385
+ firstName: u.firstName,
386
+ lastName: u.lastName
386
387
  });
387
388
  } catch (P) {
388
389
  throw P;
@@ -408,7 +409,7 @@ const na = {
408
409
  email: $,
409
410
  phoneNumber: O
410
411
  } = t;
411
- h.value = E ?? "", i.firstName = P ?? "", i.lastName = b ?? "", d.value = $ ?? "", f.value = O ?? "", o.imageContent = await Ve(), s.value = {
412
+ h.value = E ?? "", u.firstName = P ?? "", u.lastName = b ?? "", d.value = $ ?? "", f.value = O ?? "", o.imageContent = await Ve(), l.value = {
412
413
  firstName: P ?? "",
413
414
  lastName: b ?? ""
414
415
  };
@@ -434,14 +435,14 @@ const na = {
434
435
  }
435
436
  }
436
437
  const ie = T(() => {
437
- if (!s.value.firstName && !s.value.lastName)
438
+ if (!l.value.firstName && !l.value.lastName)
438
439
  return !1;
439
- const e = i.firstName.trim(), a = i.lastName.trim(), t = s.value.firstName.trim(), E = s.value.lastName.trim(), P = e !== t || a !== E, b = e.length >= 2 && a.length >= 2;
440
+ const e = u.firstName.trim(), a = u.lastName.trim(), t = l.value.firstName.trim(), E = l.value.lastName.trim(), P = e !== t || a !== E, b = e.length >= 2 && a.length >= 2;
440
441
  return P && b;
441
442
  }), $e = async () => {
442
443
  if (ie.value)
443
444
  try {
444
- await Promise.all([le("firstName"), le("lastName")]), u("on-update-jwt"), V({ color: "success", text: "Изменения сохранены" });
445
+ await Promise.all([le("firstName"), le("lastName")]), s("on-update-jwt"), V({ color: "success", text: "Изменения сохранены" });
445
446
  } catch (e) {
446
447
  console.error(e), V({
447
448
  color: "error",
@@ -449,12 +450,12 @@ const na = {
449
450
  });
450
451
  }
451
452
  }, Oe = () => {
452
- j(), u("open-password-dialog");
453
+ j(), s("open-password-dialog");
453
454
  };
454
455
  return Ge(async () => {
455
456
  if (!n.accessToken) throw new Error("Access token не передан в props");
456
457
  if (!n.requestUrl) throw new Error("auth-backend url не передан в props");
457
- ea(n.accessToken, n.requestUrl), await Se();
458
+ ea(n.accessToken, n.requestUrl, n.throttlerPrefix), await Se();
458
459
  }), (e, a) => (y(), k(me, null, [
459
460
  g(ra, {
460
461
  language: v.value,
@@ -495,8 +496,8 @@ const na = {
495
496
  }, 8, ["modelValue", "src", "loading", "label", "upload-limit"])) : C("", !0),
496
497
  A("firstName") ? (y(), k("div", ua, [
497
498
  g(m(L), {
498
- modelValue: i.firstName,
499
- "onUpdate:modelValue": a[2] || (a[2] = (t) => i.firstName = t),
499
+ modelValue: u.firstName,
500
+ "onUpdate:modelValue": a[2] || (a[2] = (t) => u.firstName = t),
500
501
  size: "large",
501
502
  label: c("Имя"),
502
503
  error: ce.value,
@@ -507,8 +508,8 @@ const na = {
507
508
  ])) : C("", !0),
508
509
  A("lastName") ? (y(), k("div", da, [
509
510
  g(m(L), {
510
- modelValue: i.lastName,
511
- "onUpdate:modelValue": a[5] || (a[5] = (t) => i.lastName = t),
511
+ modelValue: u.lastName,
512
+ "onUpdate:modelValue": a[5] || (a[5] = (t) => u.lastName = t),
512
513
  size: "large",
513
514
  label: c("Фамилия"),
514
515
  error: fe.value,
@@ -607,12 +608,12 @@ const na = {
607
608
  g(m(pe))
608
609
  ], 64));
609
610
  }
610
- }), ha = (l, r) => {
611
- const n = l.__vccOpts || l;
612
- for (const [u, v] of r)
613
- n[u] = v;
611
+ }), ha = (i, r) => {
612
+ const n = i.__vccOpts || i;
613
+ for (const [s, v] of r)
614
+ n[s] = v;
614
615
  return n;
615
- }, wa = /* @__PURE__ */ ha(va, [["__scopeId", "data-v-74ba6f97"]]), Ca = /* @__PURE__ */ H({
616
+ }, wa = /* @__PURE__ */ ha(va, [["__scopeId", "data-v-a56fcdbb"]]), Ca = /* @__PURE__ */ H({
616
617
  __name: "index",
617
618
  props: {
618
619
  throttlerPrefix: {},
@@ -626,32 +627,32 @@ const na = {
626
627
  disableAddPhone: { type: Boolean }
627
628
  },
628
629
  emits: ["on-update-jwt", "update-tokens"],
629
- setup(l, { emit: r }) {
630
- const n = r, { openDialog: u } = X(), v = (s, p) => {
631
- u("email", { initialEmail: s, mode: p });
632
- }, c = (s, p) => {
633
- u("phone", { initialPhone: s, mode: p });
630
+ setup(i, { emit: r }) {
631
+ const n = r, { openDialog: s } = X(), v = (l, p) => {
632
+ s("email", { initialEmail: l, mode: p });
633
+ }, c = (l, p) => {
634
+ s("phone", { initialPhone: l, mode: p });
634
635
  }, U = () => {
635
- u("password");
636
- }, i = (s, p, h) => {
637
- n("on-update-jwt", s, p, h);
636
+ s("password");
637
+ }, u = (l, p, h) => {
638
+ n("on-update-jwt", l, p, h);
638
639
  };
639
- return (s, p) => (y(), k(me, null, [
640
+ return (l, p) => (y(), k(me, null, [
640
641
  g(m(Ze)),
641
642
  g(wa, {
642
- "throttler-prefix": s.throttlerPrefix,
643
- provider: s.provider,
644
- "request-url": s.requestUrl,
645
- language: s.language,
646
- fields: s.fields,
647
- "access-token": s.accessToken,
648
- "refresh-token": s.refreshToken,
649
- "aws-storage-url": s.awsStorageUrl,
650
- "disable-add-phone": s.disableAddPhone,
643
+ "throttler-prefix": l.throttlerPrefix,
644
+ provider: l.provider,
645
+ "request-url": l.requestUrl,
646
+ language: l.language,
647
+ fields: l.fields,
648
+ "access-token": l.accessToken,
649
+ "refresh-token": l.refreshToken,
650
+ "aws-storage-url": l.awsStorageUrl,
651
+ "disable-add-phone": l.disableAddPhone,
651
652
  onOpenEmailDialog: v,
652
653
  onOpenPhoneDialog: c,
653
654
  onOpenPasswordDialog: U,
654
- onOnUpdateJwt: i
655
+ onOnUpdateJwt: u
655
656
  }, null, 8, ["throttler-prefix", "provider", "request-url", "language", "fields", "access-token", "refresh-token", "aws-storage-url", "disable-add-phone"]),
656
657
  g(m(pe))
657
658
  ], 64));
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".avatar-input[data-v-74ba6f97] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-74ba6f97] .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-DqOAIUnd.js";
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".avatar-input[data-v-a56fcdbb] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-a56fcdbb] .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-dOnVTlJF.js";
3
3
  export {
4
4
  o as PEditUserContact
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
- export declare function initAxios(token: string, baseUrl: string): void;
2
+ export declare function initAxios(token: string, baseUrl: string, throttlerPrefix?: string): void;
3
3
  /** axios-инстанс */
4
4
  export declare function getAxios(): AxiosInstance;
5
5
  export declare function post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<import('axios').AxiosResponse<T, any, {}>>;
@@ -1,6 +1,6 @@
1
1
  import { ref as n, defineComponent as L, createElementBlock as p, openBlock as v, normalizeClass as c, createVNode as w, unref as _, computed as T, renderSlot as d, createCommentVNode as h, createElementVNode as i, toDisplayString as y, createTextVNode as f } from "vue";
2
2
  import { PLoader as $ } from "@profeat/ui-kit";
3
- import { _ as b, g as C, p as R } from "./index-DqOAIUnd.js";
3
+ import { _ as b, g as C, p as R } from "./index-dOnVTlJF.js";
4
4
  function g(s) {
5
5
  const e = Math.floor(s / 60), a = s % 60;
6
6
  return `${String(e).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.51.4",
3
+ "version": "0.51.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",