@voxie/contacts.js 0.2.3 → 0.2.4
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/contacts.js +51 -50
- package/package.json +1 -1
package/dist/contacts.js
CHANGED
|
@@ -130,12 +130,12 @@ function de(t, n) {
|
|
|
130
130
|
}
|
|
131
131
|
return t[1] && n[1] ? t[1] > n[1] ? 1 : t[1] < n[1] ? -1 : 0 : !t[1] && n[1] ? 1 : t[1] && !n[1] ? -1 : 0;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
return
|
|
133
|
+
function F(t) {
|
|
134
|
+
return F = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
135
135
|
return typeof n;
|
|
136
136
|
} : function(n) {
|
|
137
137
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
138
|
-
},
|
|
138
|
+
}, F(t);
|
|
139
139
|
}
|
|
140
140
|
function L(t, n) {
|
|
141
141
|
if (!(t instanceof n))
|
|
@@ -150,7 +150,7 @@ function ie(t, n) {
|
|
|
150
150
|
function D(t, n, e) {
|
|
151
151
|
return n && ie(t.prototype, n), e && ie(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
152
152
|
}
|
|
153
|
-
var
|
|
153
|
+
var Tt = "1.2.0", Ft = "1.7.35", ae = " ext. ", Ot = /^\d+$/, m = /* @__PURE__ */ function() {
|
|
154
154
|
function t(n) {
|
|
155
155
|
L(this, t), Dt(n), this.metadata = n, Je.call(this, n);
|
|
156
156
|
}
|
|
@@ -532,9 +532,9 @@ function Dt(t) {
|
|
|
532
532
|
throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(B(t) ? "an object of shape: { " + Object.keys(t).join(", ") + " }" : "a " + Mt(t) + ": " + t, "."));
|
|
533
533
|
}
|
|
534
534
|
var B = function(n) {
|
|
535
|
-
return
|
|
535
|
+
return F(n) === "object";
|
|
536
536
|
}, Mt = function(n) {
|
|
537
|
-
return
|
|
537
|
+
return F(n);
|
|
538
538
|
};
|
|
539
539
|
function Q(t, n) {
|
|
540
540
|
if (n = new m(n), n.hasCountry(t))
|
|
@@ -546,17 +546,17 @@ function Bt(t, n) {
|
|
|
546
546
|
}
|
|
547
547
|
function Je(t) {
|
|
548
548
|
var n = t.version;
|
|
549
|
-
typeof n == "number" ? (this.v1 = n === 1, this.v2 = n === 2, this.v3 = n === 3, this.v4 = n === 4) : n ? de(n,
|
|
549
|
+
typeof n == "number" ? (this.v1 = n === 1, this.v2 = n === 2, this.v3 = n === 3, this.v4 = n === 4) : n ? de(n, Tt) === -1 ? this.v2 = !0 : de(n, Ft) === -1 ? this.v3 = !0 : this.v4 = !0 : this.v1 = !0;
|
|
550
550
|
}
|
|
551
|
-
var
|
|
551
|
+
var jt = ";ext=", P = function(n) {
|
|
552
552
|
return "([".concat(b, "]{1,").concat(n, "})");
|
|
553
553
|
};
|
|
554
554
|
function ze(t) {
|
|
555
|
-
var n = "20", e = "15", r = "9", d = "6", i = "[ \xA0\\t,]*", a = "[:\\.\uFF0E]?[ \xA0\\t,-]*", o = "#?", $ = "(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)", u = "(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)", l = "[- ]+", s = "[ \xA0\\t]*", f = "(?:,{2}|;)", c =
|
|
555
|
+
var n = "20", e = "15", r = "9", d = "6", i = "[ \xA0\\t,]*", a = "[:\\.\uFF0E]?[ \xA0\\t,-]*", o = "#?", $ = "(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)", u = "(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)", l = "[- ]+", s = "[ \xA0\\t]*", f = "(?:,{2}|;)", c = jt + P(n), y = i + $ + a + P(n) + o, v = i + u + a + P(r) + o, g = l + P(d) + "#", E = s + f + a + P(e) + o, A = s + "(?:,)+" + a + P(r) + o;
|
|
556
556
|
return c + "|" + y + "|" + v + "|" + g + "|" + E + "|" + A;
|
|
557
557
|
}
|
|
558
|
-
var
|
|
559
|
-
"^" +
|
|
558
|
+
var Gt = "[" + b + "]{" + q + "}", Ut = "[" + k + "]{0,1}(?:[" + x + "]*[" + b + "]){3,}[" + x + b + "]*", Ht = new RegExp("^[" + k + "]{0,1}(?:[" + x + "]*[" + b + "]){1,2}$", "i"), Wt = Ut + "(?:" + ze() + ")?", Vt = new RegExp(
|
|
559
|
+
"^" + Gt + "$|^" + Wt + "$",
|
|
560
560
|
"i"
|
|
561
561
|
);
|
|
562
562
|
function qe(t) {
|
|
@@ -926,17 +926,17 @@ function ee(t, n, e) {
|
|
|
926
926
|
e = new m(e), e.selectNumberingPlan(t.country, t.countryCallingCode);
|
|
927
927
|
var r = n.v2 ? t.nationalNumber : t.phone;
|
|
928
928
|
if (!!C(r, e.nationalNumberPattern())) {
|
|
929
|
-
if (
|
|
930
|
-
return e.type("MOBILE") && e.type("MOBILE").pattern() === "" || !e.type("MOBILE") ||
|
|
929
|
+
if (j(r, "FIXED_LINE", e))
|
|
930
|
+
return e.type("MOBILE") && e.type("MOBILE").pattern() === "" || !e.type("MOBILE") || j(r, "MOBILE", e) ? "FIXED_LINE_OR_MOBILE" : "FIXED_LINE";
|
|
931
931
|
for (var d = fn(hn), i; !(i = d()).done; ) {
|
|
932
932
|
var a = i.value;
|
|
933
|
-
if (
|
|
933
|
+
if (j(r, a, e))
|
|
934
934
|
return a;
|
|
935
935
|
}
|
|
936
936
|
}
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function j(t, n, e) {
|
|
940
940
|
return n = e.type(n), !n || !n.pattern() || n.possibleLengths() && n.possibleLengths().indexOf(t.length) < 0 ? !1 : C(t, n.pattern());
|
|
941
941
|
}
|
|
942
942
|
function gn(t, n, e) {
|
|
@@ -1037,9 +1037,9 @@ function xn(t, n, e, r) {
|
|
|
1037
1037
|
var d = r.countryCallingCode(), i = e.v2 ? t.nationalNumber : t.phone, a;
|
|
1038
1038
|
switch (n) {
|
|
1039
1039
|
case "NATIONAL":
|
|
1040
|
-
return i ? (a = R(i, t.carrierCode, "NATIONAL", r, e),
|
|
1040
|
+
return i ? (a = R(i, t.carrierCode, "NATIONAL", r, e), G(a, t.ext, r, e.formatExtension)) : "";
|
|
1041
1041
|
case "INTERNATIONAL":
|
|
1042
|
-
return i ? (a = R(i, null, "INTERNATIONAL", r, e), a = "+".concat(d, " ").concat(a),
|
|
1042
|
+
return i ? (a = R(i, null, "INTERNATIONAL", r, e), a = "+".concat(d, " ").concat(a), G(a, t.ext, r, e.formatExtension)) : "+".concat(d);
|
|
1043
1043
|
case "E.164":
|
|
1044
1044
|
return "+".concat(d).concat(i);
|
|
1045
1045
|
case "RFC3966":
|
|
@@ -1051,7 +1051,7 @@ function xn(t, n, e, r) {
|
|
|
1051
1051
|
if (!e.fromCountry)
|
|
1052
1052
|
return;
|
|
1053
1053
|
var o = Cn(i, t.carrierCode, d, e.fromCountry, r);
|
|
1054
|
-
return
|
|
1054
|
+
return G(o, t.ext, r, e.formatExtension);
|
|
1055
1055
|
default:
|
|
1056
1056
|
throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(n, '"'));
|
|
1057
1057
|
}
|
|
@@ -1077,7 +1077,7 @@ function Nn(t, n) {
|
|
|
1077
1077
|
return d;
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function G(t, n, e, r) {
|
|
1081
1081
|
return n ? r(t, n, e) : t;
|
|
1082
1082
|
}
|
|
1083
1083
|
function Cn(t, n, e, r, d) {
|
|
@@ -1323,11 +1323,11 @@ function ut(t, n, e, r) {
|
|
|
1323
1323
|
}
|
|
1324
1324
|
return {};
|
|
1325
1325
|
}
|
|
1326
|
-
function
|
|
1326
|
+
function Tn(t, n) {
|
|
1327
1327
|
var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
1328
1328
|
if (e)
|
|
1329
1329
|
return (e = e.call(t)).next.bind(e);
|
|
1330
|
-
if (Array.isArray(t) || (e =
|
|
1330
|
+
if (Array.isArray(t) || (e = Fn(t)) || n && t && typeof t.length == "number") {
|
|
1331
1331
|
e && (t = e);
|
|
1332
1332
|
var r = 0;
|
|
1333
1333
|
return function() {
|
|
@@ -1337,7 +1337,7 @@ function Fn(t, n) {
|
|
|
1337
1337
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1338
1338
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function Fn(t, n) {
|
|
1341
1341
|
if (!!t) {
|
|
1342
1342
|
if (typeof t == "string")
|
|
1343
1343
|
return Ce(t, n);
|
|
@@ -1364,7 +1364,7 @@ function lt(t, n, e) {
|
|
|
1364
1364
|
}
|
|
1365
1365
|
function Rn(t, n, e) {
|
|
1366
1366
|
e = new m(e);
|
|
1367
|
-
for (var r =
|
|
1367
|
+
for (var r = Tn(t), d; !(d = r()).done; ) {
|
|
1368
1368
|
var i = d.value;
|
|
1369
1369
|
if (e.country(i), e.leadingDigits()) {
|
|
1370
1370
|
if (n && n.search(e.leadingDigits()) === 0)
|
|
@@ -1380,7 +1380,7 @@ var kn = 250, Ln = new RegExp("[" + k + b + "]"), Dn = new RegExp("[^" + b + "#]
|
|
|
1380
1380
|
function Mn(t, n, e) {
|
|
1381
1381
|
if (n = n || {}, e = new m(e), n.defaultCountry && !e.hasCountry(n.defaultCountry))
|
|
1382
1382
|
throw n.v2 ? new N("INVALID_COUNTRY") : new Error("Unknown country: ".concat(n.defaultCountry));
|
|
1383
|
-
var r =
|
|
1383
|
+
var r = jn(t, n.v2, n.extract), d = r.number, i = r.ext, a = r.error;
|
|
1384
1384
|
if (!d) {
|
|
1385
1385
|
if (n.v2)
|
|
1386
1386
|
throw a === "TOO_SHORT" ? new N("TOO_SHORT") : new N("NOT_A_NUMBER");
|
|
@@ -1415,7 +1415,7 @@ function Mn(t, n, e) {
|
|
|
1415
1415
|
possible: c ? !0 : !!(n.extended === !0 && e.possibleLengths() && tt(u, e)),
|
|
1416
1416
|
phone: u,
|
|
1417
1417
|
ext: i
|
|
1418
|
-
} : c ?
|
|
1418
|
+
} : c ? Gn($, u, i) : {};
|
|
1419
1419
|
}
|
|
1420
1420
|
function Bn(t, n, e) {
|
|
1421
1421
|
if (!!t) {
|
|
@@ -1431,7 +1431,7 @@ function Bn(t, n, e) {
|
|
|
1431
1431
|
return t.slice(r).replace(Dn, "");
|
|
1432
1432
|
}
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function jn(t, n, e) {
|
|
1435
1435
|
if (t && t.indexOf("tel:") === 0)
|
|
1436
1436
|
return ln(t);
|
|
1437
1437
|
var r = Bn(t, e, n);
|
|
@@ -1446,7 +1446,7 @@ function Gn(t, n, e) {
|
|
|
1446
1446
|
number: r
|
|
1447
1447
|
};
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1449
|
+
function Gn(t, n, e) {
|
|
1450
1450
|
var r = {
|
|
1451
1451
|
country: t,
|
|
1452
1452
|
phone: n
|
|
@@ -1742,29 +1742,29 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1742
1742
|
function ar(t, n) {
|
|
1743
1743
|
if (!!t) {
|
|
1744
1744
|
if (typeof t == "string")
|
|
1745
|
-
return
|
|
1745
|
+
return Te(t, n);
|
|
1746
1746
|
var e = Object.prototype.toString.call(t).slice(8, -1);
|
|
1747
1747
|
if (e === "Object" && t.constructor && (e = t.constructor.name), e === "Map" || e === "Set")
|
|
1748
1748
|
return Array.from(t);
|
|
1749
1749
|
if (e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))
|
|
1750
|
-
return
|
|
1750
|
+
return Te(t, n);
|
|
1751
1751
|
}
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1753
|
+
function Te(t, n) {
|
|
1754
1754
|
(n == null || n > t.length) && (n = t.length);
|
|
1755
1755
|
for (var e = 0, r = new Array(n); e < n; e++)
|
|
1756
1756
|
r[e] = t[e];
|
|
1757
1757
|
return r;
|
|
1758
1758
|
}
|
|
1759
1759
|
var p = "x", U = new RegExp(p);
|
|
1760
|
-
function
|
|
1760
|
+
function T(t, n) {
|
|
1761
1761
|
if (n < 1)
|
|
1762
1762
|
return "";
|
|
1763
1763
|
for (var e = ""; n > 1; )
|
|
1764
1764
|
n & 1 && (e += t), n >>= 1, t += t;
|
|
1765
1765
|
return e + t;
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1767
|
+
function Fe(t, n) {
|
|
1768
1768
|
return t[n] === ")" && n++, or(t.slice(0, n));
|
|
1769
1769
|
}
|
|
1770
1770
|
function or(t) {
|
|
@@ -2144,20 +2144,20 @@ function Pr(t, n) {
|
|
|
2144
2144
|
if (!(t instanceof n))
|
|
2145
2145
|
throw new TypeError("Cannot call a class as a function");
|
|
2146
2146
|
}
|
|
2147
|
-
function
|
|
2147
|
+
function je(t, n) {
|
|
2148
2148
|
for (var e = 0; e < n.length; e++) {
|
|
2149
2149
|
var r = n[e];
|
|
2150
2150
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
|
|
2151
2151
|
}
|
|
2152
2152
|
}
|
|
2153
2153
|
function Er(t, n, e) {
|
|
2154
|
-
return n &&
|
|
2154
|
+
return n && je(t.prototype, n), e && je(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
2155
2155
|
}
|
|
2156
|
-
var J = "9", wr = 15, Sr =
|
|
2156
|
+
var J = "9", wr = 15, Sr = T(J, wr), Ir = /[- ]/, Ar = function() {
|
|
2157
2157
|
return /\[([^\[\]])*\]/g;
|
|
2158
2158
|
}, _r = function() {
|
|
2159
2159
|
return /\d(?=[^,}][^,}])/g;
|
|
2160
|
-
},
|
|
2160
|
+
}, Tr = new RegExp("[" + x + "]*\\$1[" + x + "]*(\\$\\d[" + x + "]*)*$"), Ge = 3, Fr = /* @__PURE__ */ function() {
|
|
2161
2161
|
function t(n) {
|
|
2162
2162
|
n.state;
|
|
2163
2163
|
var e = n.metadata;
|
|
@@ -2206,7 +2206,7 @@ var J = "9", wr = 15, Sr = F(J, wr), Ir = /[- ]/, Ar = function() {
|
|
|
2206
2206
|
}, {
|
|
2207
2207
|
key: "narrowDownMatchingFormats",
|
|
2208
2208
|
value: function(e) {
|
|
2209
|
-
var r = this, d = e.nationalSignificantNumber, i = e.nationalPrefix, a = e.international, o = d, $ = o.length -
|
|
2209
|
+
var r = this, d = e.nationalSignificantNumber, i = e.nationalPrefix, a = e.international, o = d, $ = o.length - Ge;
|
|
2210
2210
|
$ < 0 && ($ = 0), this.matchingFormats = this.matchingFormats.filter(function(u) {
|
|
2211
2211
|
return r.formatSuits(u, a, i) && r.formatMatches(u, o, $);
|
|
2212
2212
|
}), this.chosenFormat && this.matchingFormats.indexOf(this.chosenFormat) === -1 && this.resetFormat();
|
|
@@ -2224,7 +2224,7 @@ var J = "9", wr = 15, Sr = F(J, wr), Ir = /[- ]/, Ar = function() {
|
|
|
2224
2224
|
return !0;
|
|
2225
2225
|
d = Math.min(d, i - 1);
|
|
2226
2226
|
var a = e.leadingDigitsPatterns()[d];
|
|
2227
|
-
if (r.length <
|
|
2227
|
+
if (r.length < Ge)
|
|
2228
2228
|
try {
|
|
2229
2229
|
return new Nr(a).match(r, {
|
|
2230
2230
|
allowOverflow: !0
|
|
@@ -2244,7 +2244,7 @@ var J = "9", wr = 15, Sr = F(J, wr), Ir = /[- ]/, Ar = function() {
|
|
|
2244
2244
|
value: function(e) {
|
|
2245
2245
|
for (var r = this, d = function() {
|
|
2246
2246
|
var u = a.value;
|
|
2247
|
-
return r.chosenFormat === u ? "break" :
|
|
2247
|
+
return r.chosenFormat === u ? "break" : Tr.test(r.getFormatFormat(u, e.international)) ? r.createTemplateForFormat(u, e) ? (r.chosenFormat = u, "break") : (r.matchingFormats = r.matchingFormats.filter(function(l) {
|
|
2248
2248
|
return l !== u;
|
|
2249
2249
|
}), "continue") : "continue";
|
|
2250
2250
|
}, i = Me(this.matchingFormats.slice()), a; !(a = i()).done; ) {
|
|
@@ -2282,13 +2282,13 @@ var J = "9", wr = 15, Sr = F(J, wr), Ir = /[- ]/, Ar = function() {
|
|
|
2282
2282
|
spacing: !1
|
|
2283
2283
|
}) : ""; d < i.length + e.getDigitsWithoutInternationalPrefix().length; )
|
|
2284
2284
|
r = this.template.indexOf(p, r + 1), d++;
|
|
2285
|
-
return
|
|
2285
|
+
return Fe(this.template, r + 1);
|
|
2286
2286
|
}
|
|
2287
2287
|
}
|
|
2288
2288
|
}, {
|
|
2289
2289
|
key: "setNationalNumberTemplate",
|
|
2290
2290
|
value: function(e, r) {
|
|
2291
|
-
this.nationalNumberTemplate = e, this.populatedNationalNumberTemplate = e, this.populatedNationalNumberTemplatePosition = -1, r.international ? this.template = this.getInternationalPrefixBeforeCountryCallingCode(r).replace(/[\d\+]/g, p) +
|
|
2291
|
+
this.nationalNumberTemplate = e, this.populatedNationalNumberTemplate = e, this.populatedNationalNumberTemplatePosition = -1, r.international ? this.template = this.getInternationalPrefixBeforeCountryCallingCode(r).replace(/[\d\+]/g, p) + T(p, r.callingCode.length) + " " + e : this.template = e;
|
|
2292
2292
|
}
|
|
2293
2293
|
}, {
|
|
2294
2294
|
key: "getTemplateForFormat",
|
|
@@ -2310,7 +2310,7 @@ var J = "9", wr = 15, Sr = F(J, wr), Ir = /[- ]/, Ar = function() {
|
|
|
2310
2310
|
f = f.replace(/\d/, p), v--;
|
|
2311
2311
|
}
|
|
2312
2312
|
var g = u.replace(new RegExp($), f).replace(new RegExp(J, "g"), p);
|
|
2313
|
-
return c || (o ? g =
|
|
2313
|
+
return c || (o ? g = T(p, o.length) + " " + g : a && (g = T(p, a.length) + this.getSeparatorAfterNationalPrefix(e) + g)), i && (g = rt(g)), g;
|
|
2314
2314
|
}
|
|
2315
2315
|
}
|
|
2316
2316
|
}, {
|
|
@@ -2321,7 +2321,7 @@ var J = "9", wr = 15, Sr = F(J, wr), Ir = /[- ]/, Ar = function() {
|
|
|
2321
2321
|
this.resetFormat();
|
|
2322
2322
|
return;
|
|
2323
2323
|
}
|
|
2324
|
-
return this.populatedNationalNumberTemplate = r[0], this.populatedNationalNumberTemplatePosition = r[1],
|
|
2324
|
+
return this.populatedNationalNumberTemplate = r[0], this.populatedNationalNumberTemplatePosition = r[1], Fe(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1);
|
|
2325
2325
|
}
|
|
2326
2326
|
}, {
|
|
2327
2327
|
key: "shouldTryNationalPrefixFormattingRule",
|
|
@@ -2396,7 +2396,7 @@ function He(t, n) {
|
|
|
2396
2396
|
function Mr(t, n, e) {
|
|
2397
2397
|
return n && He(t.prototype, n), e && He(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
2398
2398
|
}
|
|
2399
|
-
var Br = "[" + x + b + "]+",
|
|
2399
|
+
var Br = "[" + x + b + "]+", jr = new RegExp("^" + Br + "$", "i"), Gr = "(?:[" + k + "][" + x + b + "]*|[" + x + b + "]+)", Ur = new RegExp("[^" + x + b + "]+.*$"), Hr = /[^\d\[\]]/, Wr = /* @__PURE__ */ function() {
|
|
2400
2400
|
function t(n) {
|
|
2401
2401
|
var e = n.defaultCountry, r = n.defaultCallingCode, d = n.metadata, i = n.onNationalSignificantNumberChange;
|
|
2402
2402
|
Dr(this, t), this.defaultCountry = e, this.defaultCallingCode = r, this.metadata = d, this.onNationalSignificantNumberChange = i;
|
|
@@ -2542,7 +2542,7 @@ var Br = "[" + x + b + "]+", Gr = new RegExp("^" + Br + "$", "i"), jr = "(?:[" +
|
|
|
2542
2542
|
}]), t;
|
|
2543
2543
|
}();
|
|
2544
2544
|
function Vr(t) {
|
|
2545
|
-
var n = t.search(
|
|
2545
|
+
var n = t.search(Gr);
|
|
2546
2546
|
if (!(n < 0)) {
|
|
2547
2547
|
t = t.slice(n);
|
|
2548
2548
|
var e;
|
|
@@ -2555,7 +2555,7 @@ function Kr(t) {
|
|
|
2555
2555
|
}
|
|
2556
2556
|
function Xr(t) {
|
|
2557
2557
|
var n = Kr(t), e = ct(n, 2), r = e[0], d = e[1];
|
|
2558
|
-
return
|
|
2558
|
+
return jr.test(r) || (r = ""), [r, d];
|
|
2559
2559
|
}
|
|
2560
2560
|
function z(t) {
|
|
2561
2561
|
return z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
@@ -2666,7 +2666,7 @@ var ht = /* @__PURE__ */ function() {
|
|
|
2666
2666
|
onCallingCodeChange: function(d, i) {
|
|
2667
2667
|
e.metadata.selectNumberingPlan(i, d), e.formatter.reset(e.metadata.numberingPlan, e.state), e.parser.reset(e.metadata.numberingPlan);
|
|
2668
2668
|
}
|
|
2669
|
-
}), this.formatter = new
|
|
2669
|
+
}), this.formatter = new Fr({
|
|
2670
2670
|
state: this.state,
|
|
2671
2671
|
metadata: this.metadata
|
|
2672
2672
|
}), this.parser = new Wr({
|
|
@@ -3128,7 +3128,7 @@ class te {
|
|
|
3128
3128
|
constructor(n, e) {
|
|
3129
3129
|
h(this, "authorization");
|
|
3130
3130
|
h(this, "connectBaseUri");
|
|
3131
|
-
this.authorization = n, this.connectBaseUri = e
|
|
3131
|
+
this.authorization = n, this.connectBaseUri = e;
|
|
3132
3132
|
}
|
|
3133
3133
|
static init(n) {
|
|
3134
3134
|
var e;
|
|
@@ -3140,9 +3140,10 @@ class te {
|
|
|
3140
3140
|
async capture(n, e) {
|
|
3141
3141
|
try {
|
|
3142
3142
|
const r = td(n, "US");
|
|
3143
|
-
return r.isPossible() ? (
|
|
3143
|
+
return r.isPossible() ? (await rd(`${this.connectBaseUri}/capture/contact`, {
|
|
3144
3144
|
headers: {
|
|
3145
|
-
Authorization: this.authorization
|
|
3145
|
+
Authorization: this.authorization,
|
|
3146
|
+
"Content-Type": "application/json"
|
|
3146
3147
|
},
|
|
3147
3148
|
method: "POST",
|
|
3148
3149
|
body: JSON.stringify({
|
package/package.json
CHANGED