@yourgoods/ui-smart 0.50.1 → 0.51.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.
- package/dist/{ProfileEmailDialog-_xFNmM53.js → ProfileEmailDialog-CLM-pIRG.js} +306 -306
- package/dist/{ProfilePasswordDialog-BRL-NxyC.js → ProfilePasswordDialog-BY5VAdH3.js} +1 -1
- package/dist/{ProfilePhoneDialog-DJzWkfsA.js → ProfilePhoneDialog-BdAKmUji.js} +198 -185
- package/dist/components/PEditUserContact/PEditUserContact.vue.d.ts +2 -0
- package/dist/components/PEditUserContact/ProfileDialogs/DialogManager.vue.d.ts +2 -0
- package/dist/components/PEditUserContact/ProfileDialogs/DialogSegments/AddNewEmailContent.vue.d.ts +3 -1
- package/dist/components/PEditUserContact/ProfileDialogs/DialogSegments/AddNewPhoneContent.vue.d.ts +4 -1
- package/dist/components/PEditUserContact/ProfileDialogs/DialogSegments/NewEmailContent.vue.d.ts +4 -2
- package/dist/components/PEditUserContact/ProfileDialogs/DialogSegments/NewPhoneContent.vue.d.ts +3 -1
- package/dist/components/PEditUserContact/ProfileDialogs/DialogSegments/OldEmailContent.vue.d.ts +3 -1
- package/dist/components/PEditUserContact/ProfileDialogs/DialogSegments/OldPhoneContent.vue.d.ts +3 -1
- package/dist/components/PEditUserContact/ProfileDialogs/DialogSegments/ThrottlerTimer.vue.d.ts +31 -43
- package/dist/components/PEditUserContact/ProfileDialogs/ProfilePhoneDialog.vue.d.ts +1 -0
- package/dist/components/PEditUserContact/index.vue.d.ts +2 -0
- package/dist/{index-Dt-xD4lU.js → index-5nM1qYsp.js} +196 -190
- package/dist/index.js +2 -2
- package/dist/types.d.ts +10 -0
- package/dist/useRateLimitToast-BS-y9G79.js +151 -0
- package/dist/utils/url.d.ts +2 -0
- package/package.json +1 -1
- package/dist/useRateLimitToast-DID9XsBg.js +0 -134
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { createElementBlock as S, openBlock as
|
|
2
|
-
import {
|
|
3
|
-
import { IconTelegramSm as Pe, PInput as se, IconPhoneMd as
|
|
4
|
-
import { C as j, t as
|
|
1
|
+
import { createElementBlock as S, openBlock as v, createElementVNode as H, defineComponent as he, reactive as ve, watch as _, ref as D, 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 De, b as Je } from "./useRateLimitToast-BS-y9G79.js";
|
|
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 Oe, p as te, g as Ae } from "./index-5nM1qYsp.js";
|
|
5
5
|
const _e = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: "12",
|
|
8
8
|
height: "16",
|
|
9
9
|
fill: "none"
|
|
10
10
|
};
|
|
11
|
-
function et(U,
|
|
12
|
-
return
|
|
11
|
+
function et(U, V) {
|
|
12
|
+
return v(), S("svg", _e, V[0] || (V[0] = [
|
|
13
13
|
H("path", {
|
|
14
14
|
fill: "#1C7EF1",
|
|
15
15
|
"fill-rule": "evenodd",
|
|
@@ -18,13 +18,13 @@ function et(U, b) {
|
|
|
18
18
|
}, null, -1)
|
|
19
19
|
]));
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const de = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }, ot = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, nt = { class: "dialogDefaultContainerTextHint" }, at = { class: "chip" }, lt = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "input-wrapper"
|
|
24
24
|
}, st = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "input-wrapper"
|
|
27
|
-
},
|
|
27
|
+
}, dt = /* @__PURE__ */ he({
|
|
28
28
|
__name: "OldPhoneContent",
|
|
29
29
|
props: {
|
|
30
30
|
phone: {},
|
|
@@ -39,105 +39,107 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
39
39
|
isFinalLimit: { type: Boolean },
|
|
40
40
|
isNotMatchCode: { type: Boolean },
|
|
41
41
|
loading: { type: Boolean },
|
|
42
|
-
isTg: { type: Boolean }
|
|
42
|
+
isTg: { type: Boolean },
|
|
43
|
+
product: {}
|
|
43
44
|
},
|
|
44
45
|
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
|
-
setup(U, { emit:
|
|
46
|
-
const E = U, u =
|
|
46
|
+
setup(U, { emit: V }) {
|
|
47
|
+
const E = U, u = V, c = ve({
|
|
47
48
|
touched: { phone: !1, code: !1 },
|
|
48
49
|
phoneModel: E.phone,
|
|
49
50
|
codeModel: E.code
|
|
50
51
|
});
|
|
51
52
|
_(
|
|
52
53
|
() => c.phoneModel,
|
|
53
|
-
(
|
|
54
|
+
(h) => u("update:phone", h)
|
|
54
55
|
), _(
|
|
55
56
|
() => c.codeModel,
|
|
56
|
-
(
|
|
57
|
+
(h) => u("update:code", h)
|
|
57
58
|
);
|
|
58
|
-
const f = (
|
|
59
|
-
c.touched[
|
|
59
|
+
const f = (h) => {
|
|
60
|
+
c.touched[h] = !0;
|
|
60
61
|
};
|
|
61
|
-
let p =
|
|
62
|
-
const z = (
|
|
63
|
-
const y =
|
|
64
|
-
let
|
|
65
|
-
|
|
62
|
+
let p = D("");
|
|
63
|
+
const z = (h) => {
|
|
64
|
+
const y = h.target;
|
|
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
67
|
}, Y = () => u("on-send-code-again", { phone: c.phoneModel }), K = () => {
|
|
67
68
|
u("on-send-only-sms", { phone: c.phoneModel });
|
|
68
|
-
}, { phoneModel: e, codeModel:
|
|
69
|
-
return (
|
|
69
|
+
}, { phoneModel: e, codeModel: x, touched: P } = Ce(c), C = I(() => P.value.phone && !e.value.trim() ? "Введите телефон" : E.phoneError), O = I(() => E.isNotMatchCode ? "Неверный код" : P.value.code ? x.value.trim() ? E.codeError ?? null : "Введите код" : "");
|
|
70
|
+
return (h, y) => (v(), S("div", tt, [
|
|
70
71
|
H("div", ot, [
|
|
71
|
-
H("div", nt, G(
|
|
72
|
+
H("div", nt, G(h.hintText), 1),
|
|
72
73
|
H("div", at, [
|
|
73
|
-
|
|
74
|
+
h.isTg ? (v(), J(r(Pe), { key: 0 })) : (v(), J(r(de), {
|
|
74
75
|
key: 1,
|
|
75
76
|
style: { "margin-left": "5px" }
|
|
76
77
|
})),
|
|
77
|
-
Z(" " + G(
|
|
78
|
+
Z(" " + G(h.isTg ? "Telegram" : "СМС"), 1)
|
|
78
79
|
])
|
|
79
80
|
]),
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
h.showPhone ? (v(), S("div", lt, [
|
|
82
|
+
b(r(se), {
|
|
82
83
|
modelValue: r(e),
|
|
83
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
84
|
+
"onUpdate:modelValue": y[0] || (y[0] = (i) => le(e) ? e.value = i : null),
|
|
84
85
|
size: "large",
|
|
85
86
|
"text-size": "medium",
|
|
86
87
|
label: "Телефон",
|
|
87
88
|
type: "tel",
|
|
88
89
|
error: C.value,
|
|
89
90
|
disabled: !0,
|
|
90
|
-
onBlur: y[1] || (y[1] = (
|
|
91
|
-
onInput: y[2] || (y[2] = (
|
|
91
|
+
onBlur: y[1] || (y[1] = (i) => f("phone")),
|
|
92
|
+
onInput: y[2] || (y[2] = (i) => f("phone"))
|
|
92
93
|
}, null, 8, ["modelValue", "error"]),
|
|
93
|
-
|
|
94
|
+
b(r(Re), {
|
|
94
95
|
class: "icon-locked",
|
|
95
|
-
onClick: y[3] || (y[3] = (
|
|
96
|
+
onClick: y[3] || (y[3] = (i) => h.$emit("edit", "phone"))
|
|
96
97
|
})
|
|
97
98
|
])) : B("", !0),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
modelValue: r(
|
|
101
|
-
"onUpdate:modelValue": y[4] || (y[4] = (
|
|
99
|
+
h.showCode ? (v(), S("div", st, [
|
|
100
|
+
b(r(se), {
|
|
101
|
+
modelValue: r(x),
|
|
102
|
+
"onUpdate:modelValue": y[4] || (y[4] = (i) => le(x) ? x.value = i : null),
|
|
102
103
|
size: "large",
|
|
103
104
|
"text-size": "medium",
|
|
104
105
|
label: "Код",
|
|
105
106
|
type: "text",
|
|
106
|
-
error:
|
|
107
|
+
error: O.value,
|
|
107
108
|
onInput: z,
|
|
108
|
-
onBlur: y[5] || (y[5] = (
|
|
109
|
+
onBlur: y[5] || (y[5] = (i) => f("code"))
|
|
109
110
|
}, null, 8, ["modelValue", "error"])
|
|
110
111
|
])) : B("", !0),
|
|
111
|
-
|
|
112
|
-
loading:
|
|
113
|
-
"rate-limit-text":
|
|
114
|
-
"is-final-limit":
|
|
115
|
-
"on-send-again": Y
|
|
112
|
+
b(we, {
|
|
113
|
+
loading: h.loading,
|
|
114
|
+
"rate-limit-text": h.rateLimitText,
|
|
115
|
+
"is-final-limit": h.isFinalLimit,
|
|
116
|
+
"on-send-again": Y,
|
|
117
|
+
product: h.product
|
|
116
118
|
}, {
|
|
117
119
|
extra: X(() => [
|
|
118
|
-
|
|
120
|
+
h.isTg ? (v(), S("span", {
|
|
119
121
|
key: 0,
|
|
120
122
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
121
123
|
onClick: K
|
|
122
124
|
}, [
|
|
123
|
-
Z(G(
|
|
124
|
-
|
|
125
|
+
Z(G(h.sendCodeBySmsText) + " ", 1),
|
|
126
|
+
b(r(de), { style: { "margin-left": "5px" } })
|
|
125
127
|
])) : B("", !0)
|
|
126
128
|
]),
|
|
127
129
|
_: 1
|
|
128
|
-
}, 8, ["loading", "rate-limit-text", "is-final-limit"])
|
|
130
|
+
}, 8, ["loading", "rate-limit-text", "is-final-limit", "product"])
|
|
129
131
|
]));
|
|
130
132
|
}
|
|
131
133
|
}), F = (U) => {
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
134
|
-
if (
|
|
135
|
-
return `+7${
|
|
136
|
-
if (
|
|
137
|
-
return `+${
|
|
134
|
+
const V = U.replace(/\D/g, "");
|
|
135
|
+
if (V.length >= 10 && V.length <= 15) {
|
|
136
|
+
if (V.startsWith("8"))
|
|
137
|
+
return `+7${V.slice(1)}`;
|
|
138
|
+
if (V.startsWith("7"))
|
|
139
|
+
return `+${V}`;
|
|
138
140
|
}
|
|
139
|
-
return U.trim().startsWith("+") ? U.trim() : `+${
|
|
140
|
-
},
|
|
141
|
+
return U.trim().startsWith("+") ? U.trim() : `+${V}`;
|
|
142
|
+
}, it = { class: "dialogDefaultContainerInsideContent" }, rt = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, ut = { class: "dialogDefaultContainerTextHint" }, ct = {
|
|
141
143
|
key: 0,
|
|
142
144
|
class: "chip"
|
|
143
145
|
}, pt = {
|
|
@@ -163,11 +165,12 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
163
165
|
isFinalLimit: { type: Boolean },
|
|
164
166
|
isNotMatchCode: { type: Boolean, default: !1 },
|
|
165
167
|
loading: { type: Boolean },
|
|
166
|
-
isTg: { type: Boolean }
|
|
168
|
+
isTg: { type: Boolean },
|
|
169
|
+
product: {}
|
|
167
170
|
},
|
|
168
171
|
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"],
|
|
169
|
-
setup(U, { emit:
|
|
170
|
-
const E = U, u =
|
|
172
|
+
setup(U, { emit: V }) {
|
|
173
|
+
const E = U, u = V, c = D(!1), f = D(""), p = ve({
|
|
171
174
|
touched: { phone: !1, code: !1 },
|
|
172
175
|
phoneModel: "",
|
|
173
176
|
codeModel: ""
|
|
@@ -186,7 +189,7 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
186
189
|
}, e = I(() => {
|
|
187
190
|
const l = p.phoneModel.trim().replace(/[()\-\s]/g, "");
|
|
188
191
|
return /^\+?\d{10,15}$/.test(l);
|
|
189
|
-
}),
|
|
192
|
+
}), x = I(() => !e.value || !!f.value), P = async () => {
|
|
190
193
|
var t;
|
|
191
194
|
try {
|
|
192
195
|
if (z("phone"), !e.value) {
|
|
@@ -203,38 +206,38 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
203
206
|
console.error("Неизвестная ошибка при проверке доступности телефона:", l), f.value = "Это не похоже на номер телефона";
|
|
204
207
|
}
|
|
205
208
|
};
|
|
206
|
-
let C =
|
|
207
|
-
const
|
|
209
|
+
let C = D("");
|
|
210
|
+
const O = (t) => {
|
|
208
211
|
const l = t.target;
|
|
209
212
|
let s = ((l == null ? void 0 : l.value) ?? "").replace(/\D/g, "");
|
|
210
|
-
s.length < 4 && u("on-clear-code-error"), s.length > 4 && (s = s.slice(0, 4)), L.value = s, l && l.value !== s && (l.value = s), s.length === 4 && s !== C.value && (C.value = s, u("on-match-code", { phone:
|
|
211
|
-
},
|
|
213
|
+
s.length < 4 && u("on-clear-code-error"), s.length > 4 && (s = s.slice(0, 4)), L.value = s, l && l.value !== s && (l.value = s), s.length === 4 && s !== C.value && (C.value = s, u("on-match-code", { phone: i.value, code: s }));
|
|
214
|
+
}, h = () => {
|
|
212
215
|
u("on-send-code-again", { phone: p.phoneModel });
|
|
213
216
|
}, y = () => {
|
|
214
217
|
u("on-send-only-sms", { phone: p.phoneModel });
|
|
215
|
-
}, { phoneModel:
|
|
218
|
+
}, { phoneModel: i, codeModel: L, touched: ie } = Ce(p), A = I(() => {
|
|
216
219
|
if (f.value) return f.value;
|
|
217
220
|
if (p.touched.phone) {
|
|
218
221
|
if (!p.phoneModel.trim()) return "Введите номер телефона";
|
|
219
222
|
if (!e.value) return "Это не похоже на номер телефона";
|
|
220
223
|
}
|
|
221
224
|
return E.phoneError || "";
|
|
222
|
-
}), Q = I(() => E.isNotMatchCode ? "Неверный код" :
|
|
223
|
-
return (t, l) => (
|
|
225
|
+
}), Q = I(() => E.isNotMatchCode ? "Неверный код" : ie.value.code ? L.value.trim() ? E.codeError ?? null : "Введите код" : "");
|
|
226
|
+
return (t, l) => (v(), S("div", it, [
|
|
224
227
|
H("div", rt, [
|
|
225
228
|
H("div", ut, G(c.value ? "Чтобы продолжить, введите код подтверждения из" : t.hintText), 1),
|
|
226
|
-
c.value ? (
|
|
227
|
-
t.isTg ? (
|
|
229
|
+
c.value ? (v(), S("div", ct, [
|
|
230
|
+
t.isTg ? (v(), J(r(Pe), { key: 0 })) : (v(), J(r(de), {
|
|
228
231
|
key: 1,
|
|
229
232
|
style: { "margin-left": "5px" }
|
|
230
233
|
})),
|
|
231
234
|
Z(" " + G(t.isTg ? "Telegram" : "СМС"), 1)
|
|
232
235
|
])) : B("", !0)
|
|
233
236
|
]),
|
|
234
|
-
t.showPhone ? (
|
|
235
|
-
|
|
236
|
-
modelValue: r(
|
|
237
|
-
"onUpdate:modelValue": l[0] || (l[0] = (s) => le(
|
|
237
|
+
t.showPhone ? (v(), S("div", pt, [
|
|
238
|
+
b(r(se), {
|
|
239
|
+
modelValue: r(i),
|
|
240
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => le(i) ? i.value = s : null),
|
|
238
241
|
size: "large",
|
|
239
242
|
"text-size": "medium",
|
|
240
243
|
label: "Телефон",
|
|
@@ -243,15 +246,15 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
243
246
|
onBlur: l[1] || (l[1] = (s) => z("phone")),
|
|
244
247
|
onInput: K
|
|
245
248
|
}, null, 8, ["modelValue", "error"]),
|
|
246
|
-
|
|
249
|
+
b(r(Ke), {
|
|
247
250
|
class: "icon-locked",
|
|
248
251
|
onClick: l[2] || (l[2] = (s) => t.$emit("edit", "phone"))
|
|
249
252
|
})
|
|
250
253
|
])) : B("", !0),
|
|
251
|
-
c.value ? B("", !0) : (
|
|
252
|
-
|
|
254
|
+
c.value ? B("", !0) : (v(), S("div", ht, [
|
|
255
|
+
b(r(ze), {
|
|
253
256
|
style: { width: "100%" },
|
|
254
|
-
disabled:
|
|
257
|
+
disabled: x.value,
|
|
255
258
|
onClick: P
|
|
256
259
|
}, {
|
|
257
260
|
default: X(() => l[5] || (l[5] = [
|
|
@@ -261,8 +264,8 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
261
264
|
__: [5]
|
|
262
265
|
}, 8, ["disabled"])
|
|
263
266
|
])),
|
|
264
|
-
c.value ? (
|
|
265
|
-
|
|
267
|
+
c.value ? (v(), S("div", vt, [
|
|
268
|
+
b(r(se), {
|
|
266
269
|
modelValue: r(L),
|
|
267
270
|
"onUpdate:modelValue": l[3] || (l[3] = (s) => le(L) ? L.value = s : null),
|
|
268
271
|
size: "large",
|
|
@@ -270,29 +273,30 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
270
273
|
label: "Код",
|
|
271
274
|
type: "text",
|
|
272
275
|
error: Q.value,
|
|
273
|
-
onInput:
|
|
276
|
+
onInput: O,
|
|
274
277
|
onBlur: l[4] || (l[4] = (s) => z("code"))
|
|
275
278
|
}, null, 8, ["modelValue", "error"])
|
|
276
279
|
])) : B("", !0),
|
|
277
|
-
!t.loading && c.value ? (
|
|
278
|
-
|
|
280
|
+
!t.loading && c.value ? (v(), S("div", mt, [
|
|
281
|
+
b(we, {
|
|
279
282
|
loading: t.loading,
|
|
280
283
|
"rate-limit-text": t.rateLimitText,
|
|
281
284
|
"is-final-limit": t.isFinalLimit,
|
|
282
|
-
"on-send-again":
|
|
285
|
+
"on-send-again": h,
|
|
286
|
+
product: t.product
|
|
283
287
|
}, {
|
|
284
288
|
extra: X(() => [
|
|
285
|
-
t.isTg ? (
|
|
289
|
+
t.isTg ? (v(), S("span", {
|
|
286
290
|
key: 0,
|
|
287
291
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
288
292
|
onClick: y
|
|
289
293
|
}, [
|
|
290
294
|
Z(G(t.sendCodeBySmsText) + " ", 1),
|
|
291
|
-
|
|
295
|
+
b(r(de), { style: { "margin-left": "5px" } })
|
|
292
296
|
])) : B("", !0)
|
|
293
297
|
]),
|
|
294
298
|
_: 1
|
|
295
|
-
}, 8, ["loading", "rate-limit-text", "is-final-limit"])
|
|
299
|
+
}, 8, ["loading", "rate-limit-text", "is-final-limit", "product"])
|
|
296
300
|
])) : B("", !0)
|
|
297
301
|
]));
|
|
298
302
|
}
|
|
@@ -308,7 +312,7 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
308
312
|
}, St = {
|
|
309
313
|
key: 2,
|
|
310
314
|
class: "input-wrapper"
|
|
311
|
-
}, Mt = { key: 3 },
|
|
315
|
+
}, Mt = { key: 3 }, bt = /* @__PURE__ */ he({
|
|
312
316
|
__name: "AddNewPhoneContent",
|
|
313
317
|
props: {
|
|
314
318
|
phone: {},
|
|
@@ -322,11 +326,13 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
322
326
|
isFinalLimit: { type: Boolean },
|
|
323
327
|
isNotMatchCode: { type: Boolean },
|
|
324
328
|
loading: { type: Boolean },
|
|
325
|
-
isTg: { type: Boolean }
|
|
329
|
+
isTg: { type: Boolean },
|
|
330
|
+
product: {},
|
|
331
|
+
onDisableAddPhone: { type: Boolean }
|
|
326
332
|
},
|
|
327
333
|
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"],
|
|
328
|
-
setup(U, { emit:
|
|
329
|
-
const E = U, u =
|
|
334
|
+
setup(U, { emit: V }) {
|
|
335
|
+
const E = U, u = V, c = D(!1), f = D(""), p = ve({
|
|
330
336
|
touched: { phone: !1, code: !1 },
|
|
331
337
|
phoneModel: "",
|
|
332
338
|
codeModel: ""
|
|
@@ -345,7 +351,7 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
345
351
|
}, e = I(() => {
|
|
346
352
|
const l = p.phoneModel.trim().replace(/[()\-\s]/g, "");
|
|
347
353
|
return /^\+?\d{10,15}$/.test(l);
|
|
348
|
-
}),
|
|
354
|
+
}), x = I(() => !e.value || !!f.value), P = async () => {
|
|
349
355
|
var t;
|
|
350
356
|
try {
|
|
351
357
|
if (z("phone"), !e.value) {
|
|
@@ -363,15 +369,15 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
363
369
|
}
|
|
364
370
|
};
|
|
365
371
|
let C = "";
|
|
366
|
-
const
|
|
372
|
+
const O = (t) => {
|
|
367
373
|
const l = t.target;
|
|
368
374
|
let s = l.value.replace(/\D/g, "");
|
|
369
375
|
s.length < 4 && u("on-clear-code-error"), s.length > 4 && (s = s.slice(0, 4), l.value = s), p.codeModel = s, s.length === 4 && s !== C && (C = s, u("on-match-code", { phone: p.phoneModel, code: s }));
|
|
370
|
-
},
|
|
376
|
+
}, h = () => {
|
|
371
377
|
u("on-send-code-again", { phone: p.phoneModel });
|
|
372
378
|
}, y = () => {
|
|
373
379
|
u("on-send-only-sms", { phone: p.phoneModel });
|
|
374
|
-
}, { phoneModel:
|
|
380
|
+
}, { phoneModel: i, codeModel: L, touched: ie } = Ce(p), A = I(() => {
|
|
375
381
|
if (f.value) return f.value;
|
|
376
382
|
if (p.touched.phone) {
|
|
377
383
|
if (!p.phoneModel.trim()) return "Введите номер телефона";
|
|
@@ -379,38 +385,39 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
379
385
|
}
|
|
380
386
|
return E.phoneError || "";
|
|
381
387
|
}), Q = I(() => E.isNotMatchCode ? "Неверный код" : p.touched.code ? L.value.trim() ? E.codeError ?? null : "Введите код" : "");
|
|
382
|
-
return (t, l) => (
|
|
388
|
+
return (t, l) => (v(), S("div", yt, [
|
|
383
389
|
H("div", gt, [
|
|
384
390
|
H("div", Ct, G(c.value ? "Чтобы продолжить, введите код подтверждения из" : t.hintText), 1),
|
|
385
|
-
c.value ? (
|
|
386
|
-
t.isTg ? (
|
|
391
|
+
c.value ? (v(), S("div", wt, [
|
|
392
|
+
t.isTg ? (v(), J(r(Pe), { key: 0 })) : (v(), J(r(de), {
|
|
387
393
|
key: 1,
|
|
388
394
|
style: { "margin-left": "5px" }
|
|
389
395
|
})),
|
|
390
396
|
Z(" " + G(t.isTg ? "Telegram" : "СМС"), 1)
|
|
391
397
|
])) : B("", !0)
|
|
392
398
|
]),
|
|
393
|
-
t.showPhone ? (
|
|
394
|
-
|
|
395
|
-
modelValue: r(
|
|
396
|
-
"onUpdate:modelValue": l[0] || (l[0] = (s) => le(
|
|
399
|
+
t.showPhone ? (v(), S("div", Pt, [
|
|
400
|
+
b(r(se), {
|
|
401
|
+
modelValue: r(i),
|
|
402
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => le(i) ? i.value = s : null),
|
|
397
403
|
size: "large",
|
|
398
404
|
"text-size": "medium",
|
|
399
405
|
label: "Телефон",
|
|
400
406
|
type: "tel",
|
|
401
407
|
error: A.value,
|
|
408
|
+
disabled: !!t.onDisableAddPhone,
|
|
402
409
|
onBlur: l[1] || (l[1] = (s) => z("phone")),
|
|
403
410
|
onInput: K
|
|
404
|
-
}, null, 8, ["modelValue", "error"]),
|
|
405
|
-
|
|
411
|
+
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
412
|
+
b(r(Re), {
|
|
406
413
|
class: "icon-locked",
|
|
407
414
|
onClick: l[2] || (l[2] = (s) => t.$emit("edit", "phone"))
|
|
408
415
|
})
|
|
409
416
|
])) : B("", !0),
|
|
410
|
-
c.value ? B("", !0) : (
|
|
411
|
-
|
|
417
|
+
c.value ? B("", !0) : (v(), S("div", Tt, [
|
|
418
|
+
b(r(ze), {
|
|
412
419
|
style: { width: "100%" },
|
|
413
|
-
disabled:
|
|
420
|
+
disabled: x.value,
|
|
414
421
|
onClick: P
|
|
415
422
|
}, {
|
|
416
423
|
default: X(() => l[5] || (l[5] = [
|
|
@@ -420,8 +427,8 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
420
427
|
__: [5]
|
|
421
428
|
}, 8, ["disabled"])
|
|
422
429
|
])),
|
|
423
|
-
c.value ? (
|
|
424
|
-
|
|
430
|
+
c.value ? (v(), S("div", St, [
|
|
431
|
+
b(r(se), {
|
|
425
432
|
modelValue: r(L),
|
|
426
433
|
"onUpdate:modelValue": l[3] || (l[3] = (s) => le(L) ? L.value = s : null),
|
|
427
434
|
size: "large",
|
|
@@ -429,33 +436,34 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
429
436
|
label: "Код",
|
|
430
437
|
type: "text",
|
|
431
438
|
error: Q.value,
|
|
432
|
-
onInput:
|
|
439
|
+
onInput: O,
|
|
433
440
|
onBlur: l[4] || (l[4] = (s) => z("code"))
|
|
434
441
|
}, null, 8, ["modelValue", "error"])
|
|
435
442
|
])) : B("", !0),
|
|
436
|
-
c.value ? (
|
|
437
|
-
|
|
443
|
+
c.value ? (v(), S("div", Mt, [
|
|
444
|
+
b(we, {
|
|
438
445
|
loading: t.loading,
|
|
439
446
|
"rate-limit-text": t.rateLimitText,
|
|
440
447
|
"is-final-limit": t.isFinalLimit,
|
|
441
|
-
"on-send-again":
|
|
448
|
+
"on-send-again": h,
|
|
449
|
+
product: t.product
|
|
442
450
|
}, {
|
|
443
451
|
extra: X(() => [
|
|
444
|
-
t.isTg ? (
|
|
452
|
+
t.isTg ? (v(), S("span", {
|
|
445
453
|
key: 0,
|
|
446
454
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
447
455
|
onClick: y
|
|
448
456
|
}, [
|
|
449
457
|
Z(G(t.sendCodeBySmsText) + " ", 1),
|
|
450
|
-
|
|
458
|
+
b(r(de), { style: { "margin-left": "5px" } })
|
|
451
459
|
])) : B("", !0)
|
|
452
460
|
]),
|
|
453
461
|
_: 1
|
|
454
|
-
}, 8, ["loading", "rate-limit-text", "is-final-limit"])
|
|
462
|
+
}, 8, ["loading", "rate-limit-text", "is-final-limit", "product"])
|
|
455
463
|
])) : B("", !0)
|
|
456
464
|
]));
|
|
457
465
|
}
|
|
458
|
-
}), kt = { class: "text-center w-full" },
|
|
466
|
+
}), kt = { class: "text-center w-full" }, xt = { class: "dialogTitle" }, Vt = {
|
|
459
467
|
key: 0,
|
|
460
468
|
class: "dialogDefaultContainer"
|
|
461
469
|
}, $t = { key: 3 }, Bt = {
|
|
@@ -470,22 +478,23 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
470
478
|
initialPhone: { default: "" },
|
|
471
479
|
language: {},
|
|
472
480
|
provider: {},
|
|
481
|
+
onDisableAddPhone: { type: Boolean },
|
|
473
482
|
mode: { default: void 0 }
|
|
474
483
|
},
|
|
475
484
|
emits: ["update:modelValue", "submit-phone", "edit", "close", "clean-input-errors", "on-update-jwt", "update-phone-field", "on-toast"],
|
|
476
|
-
setup(U, { expose:
|
|
477
|
-
const u = U, c = E, f =
|
|
485
|
+
setup(U, { expose: V, emit: E }) {
|
|
486
|
+
const u = U, c = E, f = D(u.modelValue);
|
|
478
487
|
_(
|
|
479
488
|
() => u.modelValue,
|
|
480
489
|
(n) => f.value = n
|
|
481
490
|
), _(f, (n) => c("update:modelValue", n));
|
|
482
|
-
const p = I(() => u.language ?? "ru"), z = (n) =>
|
|
491
|
+
const p = I(() => u.language ?? "ru"), z = (n) => Oe[p.value] && Oe[p.value][n] || (u.title ?? n), Y = I(() => u.title ?? z("Смена номера телефона")), K = I(() => u.hintText ?? z("Чтобы продолжить, введите новый номер")), e = ve({
|
|
483
492
|
oldPhone: u.initialPhone ?? "",
|
|
484
493
|
newPhone: "",
|
|
485
494
|
code: "",
|
|
486
495
|
addPhone: "",
|
|
487
496
|
addCode: ""
|
|
488
|
-
}),
|
|
497
|
+
}), x = D(j.OLD), P = D(null), C = D(!1), O = D(!1), h = D("tg"), y = I(() => h.value === "tg"), i = D(!1), { startTimer: L, remainingSeconds: ie, isAvailableForSendAgain: A, totalRateAttempts: Q, currentRateAttempt: t } = He(), { showRateLimitToast: l } = Je(c), { isEditFlow: s, getFlow: me } = Ge(D(u.mode)), re = I(() => A.value ? "Повторить" : `${ie.value}`), oe = D(ae), ue = I(() => oe.value === 0), Fe = (n) => new Promise((a) => setTimeout(a, n));
|
|
489
498
|
async function fe(n = "email") {
|
|
490
499
|
var o;
|
|
491
500
|
return (o = (await Ae("/users/profile/session/get-edit-session", { params: { field: n } })).data) == null ? void 0 : o.data;
|
|
@@ -496,12 +505,12 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
496
505
|
field: n,
|
|
497
506
|
oldValue: F(u.initialPhone)
|
|
498
507
|
})).data) == null ? void 0 : $.data;
|
|
499
|
-
return P.value = (o == null ? void 0 : o.sessionId) ?? null,
|
|
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;
|
|
500
509
|
}
|
|
501
510
|
async function Ue() {
|
|
502
511
|
try {
|
|
503
512
|
const n = await fe("phone");
|
|
504
|
-
return P.value = n.sessionId,
|
|
513
|
+
return P.value = n.sessionId, x.value = n.step, e.oldPhone = n.oldValue ?? "", n.sessionId ? n : await Te("phone");
|
|
505
514
|
} catch {
|
|
506
515
|
return await Te("phone");
|
|
507
516
|
}
|
|
@@ -518,7 +527,7 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
518
527
|
},
|
|
519
528
|
{
|
|
520
529
|
headers: {
|
|
521
|
-
"x-only-sms":
|
|
530
|
+
"x-only-sms": i.value ?? !1
|
|
522
531
|
}
|
|
523
532
|
}
|
|
524
533
|
);
|
|
@@ -529,7 +538,7 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
529
538
|
return null;
|
|
530
539
|
}
|
|
531
540
|
}
|
|
532
|
-
const ye = async ({ phone: n }) => (
|
|
541
|
+
const ye = async ({ phone: n }) => (i.value = !0, await ee({ value: n, isOnlySms: !0 })), ee = async ({ value: n, isOnlySms: a, offLoading: o } = {}) => {
|
|
533
542
|
var $, T, N, R, q, W, w;
|
|
534
543
|
C.value = !0;
|
|
535
544
|
try {
|
|
@@ -548,10 +557,10 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
548
557
|
"x-only-sms": a ?? !1
|
|
549
558
|
}
|
|
550
559
|
}
|
|
551
|
-
),
|
|
552
|
-
if ((
|
|
560
|
+
), d = (T = ($ = m == null ? void 0 : m.data) == null ? void 0 : $.data) == null ? void 0 : T.deliveryType;
|
|
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)) {
|
|
553
562
|
const M = (q = (R = m.data) == null ? void 0 : R.tooManyRequests) == null ? void 0 : q.type;
|
|
554
|
-
|
|
563
|
+
h.value = M;
|
|
555
564
|
const k = m.data.tooManyRequests;
|
|
556
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;
|
|
557
566
|
}
|
|
@@ -559,20 +568,20 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
559
568
|
} catch (g) {
|
|
560
569
|
if ((g == null ? void 0 : g.status) === 403 && ((w = (W = g == null ? void 0 : g.response) == null ? void 0 : W.data) != null && w.tooManyRequests)) {
|
|
561
570
|
const m = g.response.data.tooManyRequests.type;
|
|
562
|
-
|
|
563
|
-
const
|
|
564
|
-
return
|
|
571
|
+
h.value = m;
|
|
572
|
+
const d = g.response.data.tooManyRequests;
|
|
573
|
+
return d.restTimeSec > 0 ? (L(d.restTimeSec), Q.value = d.attempts.total, t.value = d.attempts.total - d.attempts.available, oe.value = d.attempts.available ?? ae) : A.value = !0, g;
|
|
565
574
|
}
|
|
566
575
|
throw g;
|
|
567
576
|
} finally {
|
|
568
577
|
await Se(n ?? e.oldPhone), C.value = !1, o && (C.value = !1);
|
|
569
578
|
}
|
|
570
579
|
}, Me = async (n, a) => {
|
|
571
|
-
var o, $, T, N, R, q, W, w, g, m,
|
|
580
|
+
var o, $, T, N, R, q, W, w, g, m, d;
|
|
572
581
|
C.value = !0;
|
|
573
582
|
try {
|
|
574
583
|
const M = await fe("phone");
|
|
575
|
-
P.value = M.sessionId,
|
|
584
|
+
P.value = M.sessionId, x.value = M.step, e.oldPhone = M.oldValue ?? e.oldPhone, e.newPhone = M.newValue ?? e.newPhone;
|
|
576
585
|
const k = await te("/users/profile/change/phone/match-code", {
|
|
577
586
|
phone: a === j.NEW ? F(e.newPhone) : F(e.oldPhone),
|
|
578
587
|
sessionId: P.value,
|
|
@@ -580,30 +589,30 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
580
589
|
step: a
|
|
581
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;
|
|
582
591
|
if (!(((W = k.data) == null ? void 0 : W.data.success) ?? ((w = k.data) == null ? void 0 : w.success))) {
|
|
583
|
-
l(pe),
|
|
592
|
+
l(pe), O.value = !0;
|
|
584
593
|
return;
|
|
585
594
|
}
|
|
586
595
|
if (!ne) return k;
|
|
587
|
-
if (
|
|
596
|
+
if (x.value = ne, ne === j.NEW) {
|
|
588
597
|
const Ie = await fe("phone");
|
|
589
598
|
e.oldPhone = Ie.oldValue ?? e.oldPhone, e.newPhone = Ie.newValue ?? e.newPhone, e.code = "";
|
|
590
599
|
}
|
|
591
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;
|
|
592
601
|
} catch (M) {
|
|
593
602
|
const k = (m = (g = M == null ? void 0 : M.response) == null ? void 0 : g.data) == null ? void 0 : m.rateLimit;
|
|
594
|
-
if (((
|
|
595
|
-
l(k),
|
|
603
|
+
if (((d = M == null ? void 0 : M.response) == null ? void 0 : d.status) === 429 && k) {
|
|
604
|
+
l(k), O.value = !0;
|
|
596
605
|
return;
|
|
597
606
|
}
|
|
598
607
|
throw M;
|
|
599
608
|
} finally {
|
|
600
609
|
C.value = !1;
|
|
601
610
|
}
|
|
602
|
-
},
|
|
611
|
+
}, be = ({ code: n }) => Me(n, j.OLD);
|
|
603
612
|
function ke(n) {
|
|
604
613
|
}
|
|
605
|
-
const
|
|
606
|
-
function
|
|
614
|
+
const xe = ({ code: n }) => Me(n, j.NEW);
|
|
615
|
+
function Ve(n) {
|
|
607
616
|
}
|
|
608
617
|
const ce = () => {
|
|
609
618
|
c("close"), f.value = !1;
|
|
@@ -635,7 +644,7 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
635
644
|
async function qe() {
|
|
636
645
|
try {
|
|
637
646
|
const n = await $e("phone");
|
|
638
|
-
P.value = n.sessionId,
|
|
647
|
+
P.value = n.sessionId, x.value = n.step, e.addPhone = n.newValue ?? "", n.sessionId || await Be({ field: "phone", value: e.addPhone });
|
|
639
648
|
} catch {
|
|
640
649
|
await Be({ field: "phone", value: e.addPhone });
|
|
641
650
|
}
|
|
@@ -665,17 +674,17 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
665
674
|
}
|
|
666
675
|
}
|
|
667
676
|
), m = (N = (T = g == null ? void 0 : g.data) == null ? void 0 : T.data) == null ? void 0 : N.deliveryType;
|
|
668
|
-
(m === "tg" || m === "sms") && (
|
|
669
|
-
const
|
|
670
|
-
if (g.status === 403 &&
|
|
671
|
-
const M =
|
|
672
|
-
return
|
|
677
|
+
(m === "tg" || m === "sms") && (h.value = m, m === "tg" && (i.value = !1));
|
|
678
|
+
const d = (R = g.data) == null ? void 0 : R.tooManyRequests;
|
|
679
|
+
if (g.status === 403 && d) {
|
|
680
|
+
const M = d == null ? void 0 : d.type;
|
|
681
|
+
return h.value = M, d.restTimeSec > 0 ? (L(d.restTimeSec), Q.value = d.attempts.total, t.value = d.attempts.total - d.attempts.available, oe.value = d.attempts.available ?? ae) : A.value = !0, g;
|
|
673
682
|
}
|
|
674
683
|
return g;
|
|
675
684
|
} catch (w) {
|
|
676
685
|
if (console.error("sendContactCode catch error: ", w), (w == null ? void 0 : w.status) === 403 && ((W = (q = w == null ? void 0 : w.response) == null ? void 0 : q.data) != null && W.tooManyRequests)) {
|
|
677
686
|
const g = w.response.data.tooManyRequests.type;
|
|
678
|
-
|
|
687
|
+
h.value = g;
|
|
679
688
|
const m = w.response.data.tooManyRequests;
|
|
680
689
|
return m.restTimeSec > 0 ? (L(m.restTimeSec), Q.value = m.attempts.total, t.value = m.attempts.total - m.attempts.available, oe.value = m.attempts.available ?? ae, A.value = !1) : A.value = !0, w;
|
|
681
690
|
}
|
|
@@ -692,23 +701,23 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
692
701
|
const pe = await $e("phone");
|
|
693
702
|
P.value = pe.sessionId, e.addPhone = pe.newValue ?? e.addPhone;
|
|
694
703
|
}
|
|
695
|
-
const
|
|
704
|
+
const d = await te("/users/profile/bind/phone/match-code", {
|
|
696
705
|
phone: F(e.addPhone),
|
|
697
706
|
sessionId: P.value,
|
|
698
707
|
code: n
|
|
699
|
-
}), M = ((a =
|
|
700
|
-
if (!(((q =
|
|
701
|
-
l(k),
|
|
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;
|
|
709
|
+
if (!(((q = d.data) == null ? void 0 : q.data.success) ?? ((W = d.data) == null ? void 0 : W.success))) {
|
|
710
|
+
l(k), O.value = !0;
|
|
702
711
|
return;
|
|
703
712
|
}
|
|
704
|
-
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")),
|
|
705
|
-
} catch (
|
|
706
|
-
const M = (g = (w =
|
|
707
|
-
if (((m =
|
|
708
|
-
l(M),
|
|
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;
|
|
714
|
+
} catch (d) {
|
|
715
|
+
const M = (g = (w = d == null ? void 0 : d.response) == null ? void 0 : w.data) == null ? void 0 : g.rateLimit;
|
|
716
|
+
if (((m = d == null ? void 0 : d.response) == null ? void 0 : m.status) === 429 && M) {
|
|
717
|
+
l(M), O.value = !0;
|
|
709
718
|
return;
|
|
710
719
|
}
|
|
711
|
-
throw
|
|
720
|
+
throw d;
|
|
712
721
|
} finally {
|
|
713
722
|
C.value = !1;
|
|
714
723
|
}
|
|
@@ -722,10 +731,10 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
722
731
|
return;
|
|
723
732
|
}
|
|
724
733
|
(await Ue()).step === "old" && await ee({}), C.value = !1;
|
|
725
|
-
}),
|
|
734
|
+
}), V({
|
|
726
735
|
localVisible: f,
|
|
727
736
|
form: e,
|
|
728
|
-
currentStep:
|
|
737
|
+
currentStep: x,
|
|
729
738
|
loading: C,
|
|
730
739
|
rateLimitText: re,
|
|
731
740
|
isAvailable: ue,
|
|
@@ -734,14 +743,14 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
734
743
|
handleClose: ce,
|
|
735
744
|
sendContactCode: ee,
|
|
736
745
|
sendBindContactCode: ge,
|
|
737
|
-
handleOldCodeSuccess:
|
|
746
|
+
handleOldCodeSuccess: be,
|
|
738
747
|
handleOldCodeError: ke,
|
|
739
|
-
handleNewCodeSuccess:
|
|
740
|
-
handleNewCodeError:
|
|
748
|
+
handleNewCodeSuccess: xe,
|
|
749
|
+
handleNewCodeError: Ve,
|
|
741
750
|
matchBindCode: Ee,
|
|
742
751
|
matchBindCodeError: Le
|
|
743
|
-
}), (n, a) => (
|
|
744
|
-
|
|
752
|
+
}), (n, a) => (v(), S(je, null, [
|
|
753
|
+
b(r(Qe), {
|
|
745
754
|
modelValue: f.value,
|
|
746
755
|
"onUpdate:modelValue": [
|
|
747
756
|
a[15] || (a[15] = (o) => f.value = o),
|
|
@@ -754,17 +763,17 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
754
763
|
}, {
|
|
755
764
|
header: X(() => [
|
|
756
765
|
H("div", kt, [
|
|
757
|
-
|
|
766
|
+
b(r(Xe), {
|
|
758
767
|
"slot-left": !1,
|
|
759
768
|
size: "small",
|
|
760
769
|
borded: !0,
|
|
761
770
|
"no-padding": !1
|
|
762
771
|
}, {
|
|
763
772
|
title: X(() => [
|
|
764
|
-
H("span",
|
|
773
|
+
H("span", xt, G(r(s) ? Y.value : "Добавление номера телефона"), 1)
|
|
765
774
|
]),
|
|
766
775
|
"right-button": X(() => [
|
|
767
|
-
|
|
776
|
+
b(r(Ye), {
|
|
768
777
|
class: "cross",
|
|
769
778
|
onClick: ce
|
|
770
779
|
})
|
|
@@ -774,9 +783,9 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
774
783
|
])
|
|
775
784
|
]),
|
|
776
785
|
default: X(() => [
|
|
777
|
-
r(s) ? (
|
|
778
|
-
C.value ? (
|
|
779
|
-
|
|
786
|
+
r(s) ? (v(), S("div", Vt, [
|
|
787
|
+
C.value ? (v(), J(De, { key: 0 })) : B("", !0),
|
|
788
|
+
x.value === r(j).OLD ? (v(), J(dt, {
|
|
780
789
|
key: 1,
|
|
781
790
|
phone: e.oldPhone,
|
|
782
791
|
"onUpdate:phone": a[0] || (a[0] = (o) => e.oldPhone = o),
|
|
@@ -784,15 +793,16 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
784
793
|
"onUpdate:code": a[1] || (a[1] = (o) => e.code = o),
|
|
785
794
|
"rate-limit-text": re.value,
|
|
786
795
|
"is-final-limit": ue.value,
|
|
787
|
-
"is-not-match-code":
|
|
796
|
+
"is-not-match-code": O.value,
|
|
788
797
|
loading: C.value,
|
|
789
798
|
"is-tg": y.value,
|
|
799
|
+
product: n.provider,
|
|
790
800
|
onOnSendCode: a[2] || (a[2] = (o) => ee({ value: e.oldPhone })),
|
|
791
|
-
onOnSendCodeAgain: a[3] || (a[3] = (o) => ee({ value: e.oldPhone, isOnlySms: !y.value &&
|
|
801
|
+
onOnSendCodeAgain: a[3] || (a[3] = (o) => ee({ value: e.oldPhone, isOnlySms: !y.value && i.value })),
|
|
792
802
|
onOnSendOnlySms: ye,
|
|
793
|
-
onOnMatchCode:
|
|
803
|
+
onOnMatchCode: be,
|
|
794
804
|
onOnMatchCodeError: ke
|
|
795
|
-
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) :
|
|
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, {
|
|
796
806
|
key: 2,
|
|
797
807
|
phone: e.newPhone,
|
|
798
808
|
"onUpdate:phone": a[4] || (a[4] = (o) => e.newPhone = o),
|
|
@@ -803,21 +813,22 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
803
813
|
"hint-text": K.value,
|
|
804
814
|
"rate-limit-text": re.value,
|
|
805
815
|
"is-final-limit": ue.value,
|
|
806
|
-
"is-not-match-code":
|
|
816
|
+
"is-not-match-code": O.value,
|
|
807
817
|
loading: C.value,
|
|
808
818
|
"is-tg": y.value,
|
|
819
|
+
product: n.provider,
|
|
809
820
|
onOnSendCode: a[7] || (a[7] = (o) => ee({ value: e.newPhone })),
|
|
810
|
-
onOnSendCodeAgain: a[8] || (a[8] = (o) => ee({ value: e.newPhone, isOnlySms: !y.value &&
|
|
821
|
+
onOnSendCodeAgain: a[8] || (a[8] = (o) => ee({ value: e.newPhone, isOnlySms: !y.value && i.value })),
|
|
811
822
|
onOnSendOnlySms: ye,
|
|
812
|
-
onOnMatchCode:
|
|
813
|
-
onOnMatchCodeError:
|
|
814
|
-
onOnClearCodeError: a[9] || (a[9] = (o) =>
|
|
815
|
-
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) :
|
|
823
|
+
onOnMatchCode: xe,
|
|
824
|
+
onOnMatchCodeError: Ve,
|
|
825
|
+
onOnClearCodeError: a[9] || (a[9] = (o) => O.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, [
|
|
816
827
|
H("p", null, G(z("Телефон успешно изменен")), 1)
|
|
817
828
|
])) : B("", !0)
|
|
818
|
-
])) : (
|
|
819
|
-
C.value ? (
|
|
820
|
-
|
|
829
|
+
])) : (v(), S("div", Bt, [
|
|
830
|
+
C.value ? (v(), J(De, { key: 0 })) : B("", !0),
|
|
831
|
+
b(bt, {
|
|
821
832
|
phone: e.addPhone,
|
|
822
833
|
"onUpdate:phone": a[10] || (a[10] = (o) => e.addPhone = o),
|
|
823
834
|
oldPhone: e.oldPhone,
|
|
@@ -827,20 +838,22 @@ const ie = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
|
|
|
827
838
|
"hint-text": r(s) ? K.value : "Чтобы продолжить, введите новый номер",
|
|
828
839
|
"rate-limit-text": re.value,
|
|
829
840
|
"is-final-limit": ue.value,
|
|
830
|
-
"is-not-match-code":
|
|
841
|
+
"is-not-match-code": O.value,
|
|
831
842
|
loading: C.value,
|
|
832
843
|
"is-tg": y.value,
|
|
844
|
+
"on-disable-add-phone": n.onDisableAddPhone,
|
|
845
|
+
product: n.provider,
|
|
833
846
|
onOnSendCode: a[13] || (a[13] = (o) => ge({ value: e.addPhone, field: "phone" })),
|
|
834
|
-
onOnSendCodeAgain: a[14] || (a[14] = (o) => ge({ value: e.addPhone, field: "phone", isOnlySms: !y.value &&
|
|
847
|
+
onOnSendCodeAgain: a[14] || (a[14] = (o) => ge({ value: e.addPhone, field: "phone", isOnlySms: !y.value && i.value })),
|
|
835
848
|
onOnSendOnlySms: ye,
|
|
836
849
|
onOnMatchCode: Ee,
|
|
837
850
|
onOnMatchCodeError: Le
|
|
838
|
-
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])
|
|
851
|
+
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg", "on-disable-add-phone", "product"])
|
|
839
852
|
]))
|
|
840
853
|
]),
|
|
841
854
|
_: 1
|
|
842
855
|
}, 8, ["modelValue"]),
|
|
843
|
-
|
|
856
|
+
b(r(Ze))
|
|
844
857
|
], 64));
|
|
845
858
|
}
|
|
846
859
|
});
|