@wazo/sdk 0.47.7 → 0.48.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/wazo-sdk.js CHANGED
@@ -1102,7 +1102,7 @@
1102
1102
  }();
1103
1103
  exports1.VariableType = VariableType;
1104
1104
  },
1105
- "./node_modules/.pnpm/jsrsasign@11.1.1/node_modules/jsrsasign/lib/jsrsasign.js": function(__unused_webpack_module, exports1) {
1105
+ "./node_modules/.pnpm/jsrsasign@11.1.3/node_modules/jsrsasign/lib/jsrsasign.js": function(__unused_webpack_module, exports1) {
1106
1106
  var navigator1 = {};
1107
1107
  navigator1.userAgent = false;
1108
1108
  var window1 = {};
@@ -3566,7 +3566,7 @@
3566
3566
  }
3567
3567
  function bnpDivRemTo(n, h, g) {
3568
3568
  var w = n.abs();
3569
- if (w.t <= 0) return;
3569
+ if (w.t <= 0) throw "BigInteger divide by zero";
3570
3570
  var k = this.abs();
3571
3571
  if (k.t < w.t) {
3572
3572
  if (null != h) h.fromInt(0);
@@ -4161,6 +4161,7 @@
4161
4161
  Barrett.prototype.mulTo = barrettMulTo;
4162
4162
  Barrett.prototype.sqrTo = barrettSqrTo;
4163
4163
  function bnModPow(q, f) {
4164
+ if (q.signum() < 0) return this.modInverse(f).modPow(q.negate(), f);
4164
4165
  var o = q.bitLength(), h, b = nbv(1), v;
4165
4166
  if (o <= 0) return b;
4166
4167
  h = o < 18 ? 1 : o < 48 ? 3 : o < 144 ? 4 : o < 768 ? 5 : 6;
@@ -4261,50 +4262,52 @@
4261
4262
  }
4262
4263
  return b;
4263
4264
  }
4264
- function bnModInverse(f) {
4265
- var j = f.isEven();
4266
- if (this.isEven() && j || 0 == f.signum()) return BigInteger.ZERO;
4267
- var i = f.clone(), h = this.clone();
4268
- var g = nbv(1), e = nbv(0), l = nbv(0), k = nbv(1);
4269
- while(0 != i.signum()){
4270
- while(i.isEven()){
4271
- i.rShiftTo(1, i);
4272
- if (j) {
4273
- if (!g.isEven() || !e.isEven()) {
4274
- g.addTo(this, g);
4275
- e.subTo(f, e);
4265
+ function bnModInverse(e) {
4266
+ if (0 == e.signum()) return BigInteger.ZERO;
4267
+ var j = this.mod(e);
4268
+ var n = e.isEven();
4269
+ if (j.isEven() && n || 0 == j.signum()) return BigInteger.ZERO;
4270
+ var l = e.clone(), k = j.clone();
4271
+ var i = nbv(1), h = nbv(0), g = nbv(0), f = nbv(1);
4272
+ while(0 != l.signum()){
4273
+ while(l.isEven()){
4274
+ l.rShiftTo(1, l);
4275
+ if (n) {
4276
+ if (!i.isEven() || !h.isEven()) {
4277
+ i.addTo(j, i);
4278
+ h.subTo(e, h);
4276
4279
  }
4277
- g.rShiftTo(1, g);
4278
- } else if (!e.isEven()) e.subTo(f, e);
4279
- e.rShiftTo(1, e);
4280
- }
4281
- while(h.isEven()){
4280
+ i.rShiftTo(1, i);
4281
+ } else if (!h.isEven()) h.subTo(e, h);
4282
4282
  h.rShiftTo(1, h);
4283
- if (j) {
4284
- if (!l.isEven() || !k.isEven()) {
4285
- l.addTo(this, l);
4286
- k.subTo(f, k);
4287
- }
4288
- l.rShiftTo(1, l);
4289
- } else if (!k.isEven()) k.subTo(f, k);
4283
+ }
4284
+ while(k.isEven()){
4290
4285
  k.rShiftTo(1, k);
4286
+ if (n) {
4287
+ if (!g.isEven() || !f.isEven()) {
4288
+ g.addTo(j, g);
4289
+ f.subTo(e, f);
4290
+ }
4291
+ g.rShiftTo(1, g);
4292
+ } else if (!f.isEven()) f.subTo(e, f);
4293
+ f.rShiftTo(1, f);
4291
4294
  }
4292
- if (i.compareTo(h) >= 0) {
4293
- i.subTo(h, i);
4294
- if (j) g.subTo(l, g);
4295
- e.subTo(k, e);
4295
+ if (l.compareTo(k) >= 0) {
4296
+ l.subTo(k, l);
4297
+ if (n) i.subTo(g, i);
4298
+ h.subTo(f, h);
4296
4299
  } else {
4297
- h.subTo(i, h);
4298
- if (j) l.subTo(g, l);
4299
- k.subTo(e, k);
4300
+ k.subTo(l, k);
4301
+ if (n) g.subTo(i, g);
4302
+ f.subTo(h, f);
4300
4303
  }
4301
4304
  }
4302
- if (0 != h.compareTo(BigInteger.ONE)) return BigInteger.ZERO;
4303
- if (k.compareTo(f) >= 0) return k.subtract(f);
4304
- if (!(k.signum() < 0)) return k;
4305
- k.addTo(f, k);
4306
- if (k.signum() < 0) return k.add(f);
4307
- return k;
4305
+ if (0 != k.compareTo(BigInteger.ONE)) return BigInteger.ZERO;
4306
+ if (f.compareTo(e) >= 0) return f.subtract(e);
4307
+ if (!(f.signum() < 0)) return f;
4308
+ f.addTo(e, f);
4309
+ if (f.signum() < 0) return f.add(e);
4310
+ return f;
4308
4311
  }
4309
4312
  var lowprimes = [
4310
4313
  2,
@@ -4478,6 +4481,7 @@
4478
4481
  ];
4479
4482
  var lplim = 67108864 / lowprimes[lowprimes.length - 1];
4480
4483
  function bnIsProbablePrime(e) {
4484
+ if (this.signum() <= 0) return false;
4481
4485
  var d, b = this.abs();
4482
4486
  if (1 == b.t && b[0] <= lowprimes[lowprimes.length - 1]) {
4483
4487
  for(d = 0; d < lowprimes.length; ++d)if (b[0] == lowprimes[d]) return true;
@@ -4494,6 +4498,7 @@
4494
4498
  return b.millerRabin(e);
4495
4499
  }
4496
4500
  function bnpMillerRabin(f) {
4501
+ if (this.signum() <= 0) return false;
4497
4502
  var g = this.subtract(BigInteger.ONE);
4498
4503
  var c = g.getLowestSetBit();
4499
4504
  if (c <= 0) return false;
@@ -4562,6 +4567,16 @@
4562
4567
  BigInteger.prototype.gcd = bnGCD;
4563
4568
  BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
4564
4569
  BigInteger.prototype.square = bnSquare;
4570
+ BigInteger.prototype.sqrt = function() {
4571
+ var c = BigInteger.ZERO.setBit(this.bitLength() / 2);
4572
+ var a = c;
4573
+ for(;;){
4574
+ var b = c.add(this.divide(c)).shiftRight(1);
4575
+ if (b.equals(c) || b.equals(a)) return b;
4576
+ a = c;
4577
+ c = b;
4578
+ }
4579
+ };
4565
4580
  /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
4566
4581
  */ function Arcfour() {
4567
4582
  this.i = 0;
@@ -4625,6 +4640,11 @@
4625
4640
  for(t = 0; t < z.length; ++t)rng_pool[rng_pptr++] = 255 & z.charCodeAt(t);
4626
4641
  }
4627
4642
  }
4643
+ if (rng_pptr < rng_psize && "undefined" != typeof globalThis && globalThis.crypto && globalThis.crypto.getRandomValues) {
4644
+ var ga = new Uint8Array(rng_psize - rng_pptr);
4645
+ globalThis.crypto.getRandomValues(ga);
4646
+ for(t = 0; t < ga.length; ++t)rng_pool[rng_pptr++] = ga[t];
4647
+ }
4628
4648
  while(rng_pptr < rng_psize){
4629
4649
  t = Math.floor(65536 * Math.random());
4630
4650
  rng_pool[rng_pptr++] = t >>> 8;
@@ -5883,6 +5903,7 @@
5883
5903
  var c, f, g;
5884
5904
  c = l.getVidx(e, k);
5885
5905
  f = 2 * l.getVblen(e, k);
5906
+ if (c + f > e.length) throw new Error("too short ASN.1 value");
5886
5907
  if ("03" == e.substr(k, 2)) {
5887
5908
  c += 2;
5888
5909
  f -= 2;
@@ -5891,6 +5912,7 @@
5891
5912
  var d = c;
5892
5913
  while(g <= f){
5893
5914
  var b = l.getTLVblen(e, d);
5915
+ if (b <= 0) throw new Error("malformed ASN.1: invalid TLV length");
5894
5916
  g += b;
5895
5917
  if (g <= f) j.push(d);
5896
5918
  d += b;
@@ -11790,6 +11812,23 @@
11790
11812
  if (a.substr(0, 1) > "7") return "00" + a;
11791
11813
  return a;
11792
11814
  }
11815
+ function timingSafeEqual(b, a) {
11816
+ if ("string" != typeof b || "string" != typeof a) throw new Error("arguments shall be string");
11817
+ if (b.length !== a.length) throw new Error("input strings must have the same length");
11818
+ if ("function" == typeof Buffer && void 0 !== crypto) {
11819
+ if (void 0 !== crypto.timingSafeEqual) return crypto.timingSafeEqual(Buffer.from(b), Buffer.from(a));
11820
+ if (void 0 !== crypto.subtle && crypto.subtle.timingSafeEqual) return crypto.subtle.timingSafeEqual(Buffer.from(b), Buffer.from(a));
11821
+ }
11822
+ return timingSafeEqualImpl(b, a);
11823
+ }
11824
+ function timingSafeEqualImpl(c, a) {
11825
+ if ("string" != typeof c || "string" != typeof a) throw new Error("arguments shall be string");
11826
+ if (c.length !== a.length) throw new Error("input strings must have the same length");
11827
+ const e = a.slice();
11828
+ var d = 0;
11829
+ for(var b = 0; b < c.length; b++)d |= c.charCodeAt(b) ^ e.charCodeAt(b);
11830
+ return 0 === d;
11831
+ }
11793
11832
  function oidtohex(g) {
11794
11833
  var f = function(a) {
11795
11834
  var l = a.toString(16);
@@ -13018,8 +13057,8 @@
13018
13057
  var D = o[1];
13019
13058
  var C = n.substr(0, i.bitLength() / 4);
13020
13059
  var u = new BigInteger(C, 16);
13021
- if (BigInteger.ZERO.compareTo(h) > 0 || h.compareTo(i) > 0) throw "invalid DSA signature";
13022
- if (BigInteger.ZERO.compareTo(D) >= 0 || D.compareTo(i) > 0) throw "invalid DSA signature";
13060
+ if (BigInteger.ZERO.compareTo(h) >= 0 || h.compareTo(i) >= 0) throw "invalid DSA signature";
13061
+ if (BigInteger.ZERO.compareTo(D) >= 0 || D.compareTo(i) >= 0) throw "invalid DSA signature";
13023
13062
  var A = D.modInverse(i);
13024
13063
  var l = u.multiply(A).mod(i);
13025
13064
  var j = h.multiply(A).mod(i);
@@ -16095,69 +16134,77 @@
16095
16134
  var v = hextob64u(y);
16096
16135
  return b + "." + v;
16097
16136
  };
16098
- KJUR.jws.JWS.verify = function(w, B, n) {
16099
- var x = KJUR, q = x.jws, t = q.JWS, i = t.readSafeJSONString, e = x.crypto, p = e.ECDSA, s = e.Mac, d = e.Signature, m;
16100
- m = RSAKey;
16101
- if (!isBase64URLDot(w)) return false;
16102
- var y = w.split(".");
16103
- if (3 !== y.length) return false;
16104
- var f = y[0];
16105
- var r = y[1];
16106
- var c = f + "." + r;
16107
- var A = b64utohex(y[2]);
16108
- var l = i(b64utoutf8(y[0]));
16109
- var k = null;
16110
- var z = null;
16111
- if (void 0 === l.alg) throw "algorithm not specified in header";
16112
- k = l.alg;
16113
- z = k.substr(0, 2);
16114
- if (null != n && "[object Array]" === Object.prototype.toString.call(n) && n.length > 0) {
16115
- var b = ":" + n.join(":") + ":";
16116
- if (-1 == b.indexOf(":" + k + ":")) throw "algorithm '" + k + "' not accepted in the list";
16117
- }
16118
- if ("none" != k && null === B) throw "key shall be specified to verify.";
16119
- if ("string" == typeof B && -1 != B.indexOf("-----BEGIN ")) B = KEYUTIL.getKey(B);
16120
- if ("RS" == z || "PS" == z) {
16121
- if (!(B instanceof m)) throw "key shall be a RSAKey obj for RS* and PS* algs";
16122
- }
16123
- if ("ES" == z) {
16124
- if (!(B instanceof p)) throw "key shall be a ECDSA obj for ES* algs";
16125
- }
16126
- var u = null;
16127
- if (void 0 === t.jwsalg2sigalg[l.alg]) throw "unsupported alg name: " + k;
16128
- u = t.jwsalg2sigalg[k];
16129
- if ("none" == u) throw "not supported";
16130
- if ("Hmac" == u.substr(0, 4)) {
16131
- var o = null;
16132
- if (void 0 === B) throw "hexadecimal key shall be specified for HMAC";
16133
- var j = new s({
16134
- alg: u,
16135
- pass: B
16137
+ KJUR.jws.JWS.verify = function(A, F, o) {
16138
+ var B = KJUR, t = B.jws, w = t.JWS, j = w.readSafeJSONString, e = B.crypto, s = e.ECDSA, v = e.Mac, d = e.Signature, n;
16139
+ n = RSAKey;
16140
+ if (!isBase64URLDot(A)) return false;
16141
+ var C = A.split(".");
16142
+ if (3 !== C.length) return false;
16143
+ var f = C[0];
16144
+ var u = C[1];
16145
+ var c = f + "." + u;
16146
+ var E = b64utohex(C[2]);
16147
+ var m = j(b64utoutf8(C[0]));
16148
+ var l = null;
16149
+ var D = null;
16150
+ if (void 0 === m.alg) throw "algorithm not specified in header";
16151
+ l = m.alg;
16152
+ D = l.substr(0, 2);
16153
+ if (null != o && "[object Array]" === Object.prototype.toString.call(o) && o.length > 0) {
16154
+ var b = ":" + o.join(":") + ":";
16155
+ if (-1 == b.indexOf(":" + l + ":")) throw "algorithm '" + l + "' not accepted in the list";
16156
+ }
16157
+ if ("none" != l && null === F) throw "key shall be specified to verify.";
16158
+ if ("string" == typeof F && -1 != F.indexOf("-----BEGIN ")) F = KEYUTIL.getKey(F);
16159
+ if ("RS" == D || "PS" == D) {
16160
+ if (!(F instanceof n)) throw "key shall be a RSAKey obj for RS* and PS* algs";
16161
+ }
16162
+ if ("ES" == D) {
16163
+ if (!(F instanceof s)) throw "key shall be a ECDSA obj for ES* algs";
16164
+ }
16165
+ var y = null;
16166
+ if (void 0 === w.jwsalg2sigalg[m.alg]) throw new Error("unsupported alg name: " + l);
16167
+ y = w.jwsalg2sigalg[l];
16168
+ if (void 0 !== m.crit) {
16169
+ if (!Array.isArray(m.crit) || 0 === m.crit.length) throw new Error("wrong critical header");
16170
+ for(var x = 0; x < m.crit.length; x++){
16171
+ var r = m.crit[x];
16172
+ if ("string" != typeof r || 0 === r.length) throw new Error("wrong critical header");
16173
+ if (void 0 === m[r]) throw new Error("critical header '" + r + "' missing");
16174
+ }
16175
+ }
16176
+ if ("none" == y) throw new Error("not supported");
16177
+ if ("Hmac" == y.substr(0, 4)) {
16178
+ var q = null;
16179
+ if (void 0 === F) throw new Error("hexadecimal key shall be specified for HMAC");
16180
+ var k = new v({
16181
+ alg: y,
16182
+ pass: F
16136
16183
  });
16137
- j.updateString(c);
16138
- o = j.doFinal();
16139
- return A == o;
16184
+ k.updateString(c);
16185
+ q = k.doFinal();
16186
+ return timingSafeEqual(E, q);
16140
16187
  }
16141
- if (-1 != u.indexOf("withECDSA")) {
16188
+ if (-1 != y.indexOf("withECDSA")) {
16142
16189
  var h = null;
16143
16190
  try {
16144
- h = p.concatSigToASN1Sig(A);
16145
- } catch (v) {
16191
+ h = s.concatSigToASN1Sig(E);
16192
+ } catch (z) {
16146
16193
  return false;
16147
16194
  }
16148
16195
  var g = new d({
16149
- alg: u
16196
+ alg: y
16150
16197
  });
16151
- g.init(B);
16198
+ g.init(F);
16152
16199
  g.updateString(c);
16153
16200
  return g.verify(h);
16154
16201
  }
16155
16202
  var g = new d({
16156
- alg: u
16203
+ alg: y
16157
16204
  });
16158
- g.init(B);
16205
+ g.init(F);
16159
16206
  g.updateString(c);
16160
- return g.verify(A);
16207
+ return g.verify(E);
16161
16208
  };
16162
16209
  KJUR.jws.JWS.parse = function(g) {
16163
16210
  var c = g.split(".");
@@ -16278,23 +16325,23 @@
16278
16325
  return a[1];
16279
16326
  };
16280
16327
  KJUR.jws.JWS.getJWKthumbprint = function(d) {
16281
- if ("RSA" !== d.kty && "EC" !== d.kty && "oct" !== d.kty) throw "unsupported algorithm for JWK Thumprint";
16328
+ if ("RSA" !== d.kty && "EC" !== d.kty && "oct" !== d.kty) throw new Error("unsupported algorithm for JWK Thumprint");
16282
16329
  var a = "{";
16283
16330
  if ("RSA" === d.kty) {
16284
- if ("string" != typeof d.n || "string" != typeof d.e) throw "wrong n and e value for RSA key";
16331
+ if ("string" != typeof d.n || "string" != typeof d.e) throw new Error("wrong n and e value for RSA key");
16285
16332
  a += '"e":"' + d.e + '",';
16286
16333
  a += '"kty":"' + d.kty + '",';
16287
16334
  a += '"n":"' + d.n + '"}';
16288
16335
  } else if ("EC" === d.kty) {
16289
- if ("string" != typeof d.crv || "string" != typeof d.x || "string" != typeof d.y) throw "wrong crv, x and y value for EC key";
16336
+ if ("string" != typeof d.crv || "string" != typeof d.x || "string" != typeof d.y) throw new Error("wrong crv, x and y value for EC key");
16290
16337
  a += '"crv":"' + d.crv + '",';
16291
16338
  a += '"kty":"' + d.kty + '",';
16292
16339
  a += '"x":"' + d.x + '",';
16293
16340
  a += '"y":"' + d.y + '"}';
16294
16341
  } else if ("oct" === d.kty) {
16295
- if ("string" != typeof d.k) throw "wrong k value for oct(symmetric) key";
16296
- a += '"kty":"' + d.kty + '",';
16297
- a += '"k":"' + d.k + '"}';
16342
+ if ("string" != typeof d.k) throw new Error("wrong k value for oct(symmetric) key");
16343
+ a += '"k":"' + d.k + '",';
16344
+ a += '"kty":"' + d.kty + '"}';
16298
16345
  }
16299
16346
  var b = rstrtohex(a);
16300
16347
  var c = KJUR.crypto.Util.hashHex(b, "sha256");
@@ -32635,7 +32682,7 @@
32635
32682
  return sdp.join('\r\n') + '\r\n';
32636
32683
  };
32637
32684
  },
32638
- "./node_modules/.pnpm/sdp@3.2.0/node_modules/sdp/sdp.js": function(module1) {
32685
+ "./node_modules/.pnpm/sdp@3.2.2/node_modules/sdp/sdp.js": function(module1) {
32639
32686
  "use strict";
32640
32687
  const SDPUtils = {};
32641
32688
  SDPUtils.generateIdentifier = function() {
@@ -32711,7 +32758,7 @@
32711
32758
  const type = candidate.type;
32712
32759
  sdp.push('typ');
32713
32760
  sdp.push(type);
32714
- if ('host' !== type && candidate.relatedAddress && candidate.relatedPort) {
32761
+ if ('host' !== type && candidate.relatedAddress && void 0 !== candidate.relatedPort) {
32715
32762
  sdp.push('raddr');
32716
32763
  sdp.push(candidate.relatedAddress);
32717
32764
  sdp.push('rport');
@@ -33465,7 +33512,7 @@
33465
33512
  default: ()=>WebRTCPhone,
33466
33513
  events: ()=>WebRTCPhone_events
33467
33514
  });
33468
- const base64_version = '3.7.7';
33515
+ const base64_version = '3.7.8';
33469
33516
  const VERSION = base64_version;
33470
33517
  const _hasBuffer = 'function' == typeof Buffer;
33471
33518
  const _TD = 'function' == typeof TextDecoder ? new TextDecoder() : void 0;
@@ -33530,12 +33577,15 @@
33530
33577
  asc = asc.replace(/\s+/g, '');
33531
33578
  if (!b64re.test(asc)) throw new TypeError('malformed base64.');
33532
33579
  asc += '=='.slice(2 - (3 & asc.length));
33533
- let u24, bin = '', r1, r2;
33580
+ let u24, r1, r2;
33581
+ let binArray = [];
33534
33582
  for(let i = 0; i < asc.length;){
33535
33583
  u24 = b64tab[asc.charAt(i++)] << 18 | b64tab[asc.charAt(i++)] << 12 | (r1 = b64tab[asc.charAt(i++)]) << 6 | (r2 = b64tab[asc.charAt(i++)]);
33536
- bin += 64 === r1 ? _fromCC(u24 >> 16 & 255) : 64 === r2 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255) : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, 255 & u24);
33584
+ if (64 === r1) binArray.push(_fromCC(u24 >> 16 & 255));
33585
+ else if (64 === r2) binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255));
33586
+ else binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255, 255 & u24));
33537
33587
  }
33538
- return bin;
33588
+ return binArray.join('');
33539
33589
  };
33540
33590
  const _atob = 'function' == typeof atob ? (asc)=>atob(_tidyB64(asc)) : _hasBuffer ? (asc)=>Buffer.from(asc, 'base64').toString('binary') : atobPolyfill;
33541
33591
  const _toUint8Array = _hasBuffer ? (a)=>_U8Afrom(Buffer.from(a, 'base64')) : (a)=>_U8Afrom(_atob(a).split('').map((c)=>c.charCodeAt(0)));
@@ -36536,7 +36586,7 @@
36536
36586
  const AGENTD_VERSION = '1.0';
36537
36587
  const WEBHOOKD_VERSION = '1.0';
36538
36588
  const AMID_VERSION = '1.0';
36539
- var jsrsasign = __webpack_require__("./node_modules/.pnpm/jsrsasign@11.1.1/node_modules/jsrsasign/lib/jsrsasign.js");
36589
+ var jsrsasign = __webpack_require__("./node_modules/.pnpm/jsrsasign@11.1.3/node_modules/jsrsasign/lib/jsrsasign.js");
36540
36590
  const swarmPublicKey = `-----BEGIN PUBLIC KEY-----
36541
36591
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmkXOuNfY8u5xoTiIhkb8
36542
36592
  djnbIwG/Wrz3vpo8BZir8L5e1a1nSy740qBjP7ZINBQoALDhFfmdOfJnCyEGiHuz
@@ -39811,7 +39861,7 @@ and limitations under the License.
39811
39861
  if ('object' != typeof window1 || window1.AudioContext) return;
39812
39862
  window1.AudioContext = window1.webkitAudioContext;
39813
39863
  }
39814
- var sdp_sdp = __webpack_require__("./node_modules/.pnpm/sdp@3.2.0/node_modules/sdp/sdp.js");
39864
+ var sdp_sdp = __webpack_require__("./node_modules/.pnpm/sdp@3.2.2/node_modules/sdp/sdp.js");
39815
39865
  var sdp_default = /*#__PURE__*/ __webpack_require__.n(sdp_sdp);
39816
39866
  function shimRTCIceCandidate(window1) {
39817
39867
  if (!window1.RTCIceCandidate || window1.RTCIceCandidate && 'foundation' in window1.RTCIceCandidate.prototype) return;
@@ -51877,6 +51927,13 @@ and limitations under the License.
51877
51927
  });
51878
51928
  const isConference = this.isConference(currentSessionId);
51879
51929
  setTimeout(()=>{
51930
+ if (session.state === session_state_SessionState.Terminated || session.state === session_state_SessionState.Terminating) {
51931
+ web_rtc_client_logger.info('ICE reconnect reinvite skipped, session no longer active', {
51932
+ sessionId: currentSessionId,
51933
+ state: session.state
51934
+ });
51935
+ return;
51936
+ }
51880
51937
  this.reinvite(session, null, isConference, false, true);
51881
51938
  }, this.iceReconnectDelay);
51882
51939
  } else {
@@ -52959,6 +53016,13 @@ and limitations under the License.
52959
53016
  isUpgrade
52960
53017
  });
52961
53018
  setTimeout(()=>{
53019
+ if (!sipSession || sipSession.state !== session_state_SessionState.Established) {
53020
+ WebRTCPhone_logger.info('Reinvite track-update message skipped, session not Established', {
53021
+ id: callSession ? callSession.getId() : null,
53022
+ state: sipSession?.state
53023
+ });
53024
+ return;
53025
+ }
52962
53026
  this.sendMessage(sipSession, JSON.stringify({
52963
53027
  type: MESSAGE_TYPE_SIGNAL,
52964
53028
  content: {
@@ -57346,13 +57410,13 @@ and limitations under the License.
57346
57410
  0,
57347
57411
  [
57348
57412
  [
57349
- "(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",
57413
+ "(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",
57350
57414
  [
57351
57415
  9
57352
57416
  ]
57353
57417
  ],
57354
57418
  [
57355
- "4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",
57419
+ "4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",
57356
57420
  [
57357
57421
  9
57358
57422
  ]
@@ -57624,7 +57688,7 @@ and limitations under the License.
57624
57688
  BF: [
57625
57689
  "226",
57626
57690
  "00",
57627
- "[025-7]\\d{7}",
57691
+ "[024-7]\\d{7}",
57628
57692
  [
57629
57693
  8
57630
57694
  ],
@@ -57633,7 +57697,7 @@ and limitations under the License.
57633
57697
  "(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
57634
57698
  "$1 $2 $3 $4",
57635
57699
  [
57636
- "[025-7]"
57700
+ "[024-7]"
57637
57701
  ]
57638
57702
  ]
57639
57703
  ]
@@ -57754,7 +57818,7 @@ and limitations under the License.
57754
57818
  BJ: [
57755
57819
  "229",
57756
57820
  "00",
57757
- "(?:01\\d|[24-689])\\d{7}",
57821
+ "(?:01\\d|8)\\d{7}",
57758
57822
  [
57759
57823
  8,
57760
57824
  10
@@ -57764,7 +57828,7 @@ and limitations under the License.
57764
57828
  "(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
57765
57829
  "$1 $2 $3 $4",
57766
57830
  [
57767
- "[24-689]"
57831
+ "8"
57768
57832
  ]
57769
57833
  ],
57770
57834
  [
@@ -57779,7 +57843,7 @@ and limitations under the License.
57779
57843
  BL: [
57780
57844
  "590",
57781
57845
  "00",
57782
- "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",
57846
+ "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",
57783
57847
  [
57784
57848
  9
57785
57849
  ],
@@ -57792,15 +57856,17 @@ and limitations under the License.
57792
57856
  0,
57793
57857
  [
57794
57858
  [
57795
- "590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"
57859
+ "(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"
57796
57860
  ],
57797
57861
  [
57798
- "(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"
57862
+ "(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"
57799
57863
  ],
57800
57864
  [
57801
57865
  "80[0-5]\\d{6}"
57802
57866
  ],
57803
- 0,
57867
+ [
57868
+ "8[129]\\d{7}"
57869
+ ],
57804
57870
  0,
57805
57871
  0,
57806
57872
  0,
@@ -57959,7 +58025,7 @@ and limitations under the License.
57959
58025
  BT: [
57960
58026
  "975",
57961
58027
  "00",
57962
- "[17]\\d{7}|[2-8]\\d{6}",
58028
+ "[178]\\d{7}|[2-8]\\d{6}",
57963
58029
  [
57964
58030
  7,
57965
58031
  8
@@ -57969,14 +58035,14 @@ and limitations under the License.
57969
58035
  "(\\d)(\\d{3})(\\d{3})",
57970
58036
  "$1 $2 $3",
57971
58037
  [
57972
- "[2-68]|7[246]"
58038
+ "[2-6]|7[246]|8[2-4]"
57973
58039
  ]
57974
58040
  ],
57975
58041
  [
57976
58042
  "(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
57977
58043
  "$1 $2 $3 $4",
57978
58044
  [
57979
- "1[67]|7"
58045
+ "1[67]|[78]"
57980
58046
  ]
57981
58047
  ]
57982
58048
  ]
@@ -58142,7 +58208,7 @@ and limitations under the License.
58142
58208
  0,
58143
58209
  [
58144
58210
  [
58145
- "(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",
58211
+ "(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",
58146
58212
  [
58147
58213
  10
58148
58214
  ]
@@ -58166,7 +58232,7 @@ and limitations under the License.
58166
58232
  ]
58167
58233
  ],
58168
58234
  [
58169
- "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",
58235
+ "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",
58170
58236
  [
58171
58237
  10
58172
58238
  ]
@@ -58214,7 +58280,7 @@ and limitations under the License.
58214
58280
  ]
58215
58281
  ],
58216
58282
  [
58217
- "4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",
58283
+ "4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",
58218
58284
  [
58219
58285
  9
58220
58286
  ]
@@ -58319,7 +58385,7 @@ and limitations under the License.
58319
58385
  CF: [
58320
58386
  "236",
58321
58387
  "00",
58322
- "(?:[27]\\d{3}|8776)\\d{4}",
58388
+ "8776\\d{4}|(?:[27]\\d|61)\\d{6}",
58323
58389
  [
58324
58390
  8
58325
58391
  ],
@@ -58328,7 +58394,7 @@ and limitations under the License.
58328
58394
  "(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
58329
58395
  "$1 $2 $3 $4",
58330
58396
  [
58331
- "[278]"
58397
+ "[26-8]"
58332
58398
  ]
58333
58399
  ]
58334
58400
  ]
@@ -58453,6 +58519,13 @@ and limitations under the License.
58453
58519
  ],
58454
58520
  "($1)"
58455
58521
  ],
58522
+ [
58523
+ "(\\d{3})(\\d{3})(\\d{3})",
58524
+ "$1 $2 $3",
58525
+ [
58526
+ "60|809"
58527
+ ]
58528
+ ],
58456
58529
  [
58457
58530
  "(\\d{2})(\\d{3})(\\d{4})",
58458
58531
  "$1 $2 $3",
@@ -58472,14 +58545,14 @@ and limitations under the License.
58472
58545
  "(\\d)(\\d{4})(\\d{4})",
58473
58546
  "$1 $2 $3",
58474
58547
  [
58475
- "9[2-9]"
58548
+ "9(?:10|[2-9])"
58476
58549
  ]
58477
58550
  ],
58478
58551
  [
58479
58552
  "(\\d{2})(\\d{3})(\\d{4})",
58480
58553
  "$1 $2 $3",
58481
58554
  [
58482
- "3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"
58555
+ "3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"
58483
58556
  ],
58484
58557
  "($1)"
58485
58558
  ],
@@ -58674,7 +58747,7 @@ and limitations under the License.
58674
58747
  "(\\d{3})(\\d{7})",
58675
58748
  "$1 $2",
58676
58749
  [
58677
- "3[0-357]|91"
58750
+ "3[0-357]|9[14]"
58678
58751
  ]
58679
58752
  ],
58680
58753
  [
@@ -58841,7 +58914,7 @@ and limitations under the License.
58841
58914
  ]
58842
58915
  ],
58843
58916
  [
58844
- "4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",
58917
+ "4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",
58845
58918
  [
58846
58919
  9
58847
58920
  ]
@@ -59071,7 +59144,7 @@ and limitations under the License.
59071
59144
  "$1 $2",
59072
59145
  [
59073
59146
  "15[03568]",
59074
- "15(?:[0568]|31)"
59147
+ "15(?:[0568]|3[13])"
59075
59148
  ],
59076
59149
  "0$1"
59077
59150
  ],
@@ -59349,7 +59422,28 @@ and limitations under the License.
59349
59422
  0,
59350
59423
  0,
59351
59424
  0,
59352
- "528[89]"
59425
+ 0,
59426
+ [
59427
+ [
59428
+ "528[89]\\d{5}"
59429
+ ],
59430
+ [
59431
+ "(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"
59432
+ ],
59433
+ [
59434
+ "80[0-7]\\d{6}"
59435
+ ],
59436
+ [
59437
+ "89\\d{7}"
59438
+ ],
59439
+ 0,
59440
+ 0,
59441
+ 0,
59442
+ 0,
59443
+ [
59444
+ "(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"
59445
+ ]
59446
+ ]
59353
59447
  ],
59354
59448
  ER: [
59355
59449
  "291",
@@ -59708,13 +59802,13 @@ and limitations under the License.
59708
59802
  ],
59709
59803
  "0",
59710
59804
  0,
59711
- 0,
59805
+ "0|180020",
59712
59806
  0,
59713
59807
  0,
59714
59808
  0,
59715
59809
  [
59716
59810
  [
59717
- "(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",
59811
+ "(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",
59718
59812
  [
59719
59813
  9,
59720
59814
  10
@@ -59825,7 +59919,7 @@ and limitations under the License.
59825
59919
  GF: [
59826
59920
  "594",
59827
59921
  "00",
59828
- "(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",
59922
+ "(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",
59829
59923
  [
59830
59924
  9
59831
59925
  ],
@@ -59834,7 +59928,7 @@ and limitations under the License.
59834
59928
  "(\\d{3})(\\d{2})(\\d{2})(\\d{2})",
59835
59929
  "$1 $2 $3 $4",
59836
59930
  [
59837
- "[5-7]|9[47]"
59931
+ "[5-7]|80[6-9]|9[47]"
59838
59932
  ],
59839
59933
  "0$1"
59840
59934
  ],
@@ -59861,7 +59955,7 @@ and limitations under the License.
59861
59955
  0,
59862
59956
  "0",
59863
59957
  0,
59864
- "([25-9]\\d{5})$|0",
59958
+ "([25-9]\\d{5})$|0|180020",
59865
59959
  "1481$1",
59866
59960
  0,
59867
59961
  0,
@@ -59918,7 +60012,7 @@ and limitations under the License.
59918
60012
  GH: [
59919
60013
  "233",
59920
60014
  "00",
59921
- "(?:[235]\\d{3}|800)\\d{5}",
60015
+ "[235]\\d{8}|800\\d{5,6}",
59922
60016
  [
59923
60017
  8,
59924
60018
  9
@@ -59936,7 +60030,7 @@ and limitations under the License.
59936
60030
  "(\\d{2})(\\d{3})(\\d{4})",
59937
60031
  "$1 $2 $3",
59938
60032
  [
59939
- "[235]"
60033
+ "[2358]"
59940
60034
  ],
59941
60035
  "0$1"
59942
60036
  ]
@@ -60022,7 +60116,7 @@ and limitations under the License.
60022
60116
  GP: [
60023
60117
  "590",
60024
60118
  "00",
60025
- "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",
60119
+ "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",
60026
60120
  [
60027
60121
  9
60028
60122
  ],
@@ -60031,7 +60125,7 @@ and limitations under the License.
60031
60125
  "(\\d{3})(\\d{2})(\\d{2})(\\d{2})",
60032
60126
  "$1 $2 $3 $4",
60033
60127
  [
60034
- "[5-79]"
60128
+ "[5-79]|80[6-9]"
60035
60129
  ],
60036
60130
  "0$1"
60037
60131
  ],
@@ -60052,15 +60146,17 @@ and limitations under the License.
60052
60146
  0,
60053
60147
  [
60054
60148
  [
60055
- "590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"
60149
+ "(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"
60056
60150
  ],
60057
60151
  [
60058
- "(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"
60152
+ "(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"
60059
60153
  ],
60060
60154
  [
60061
60155
  "80[0-5]\\d{6}"
60062
60156
  ],
60063
- 0,
60157
+ [
60158
+ "8[129]\\d{7}"
60159
+ ],
60064
60160
  0,
60065
60161
  0,
60066
60162
  0,
@@ -60358,7 +60454,7 @@ and limitations under the License.
60358
60454
  HT: [
60359
60455
  "509",
60360
60456
  "00",
60361
- "(?:[2-489]\\d|55)\\d{6}",
60457
+ "[2-589]\\d{7}",
60362
60458
  [
60363
60459
  8
60364
60460
  ],
@@ -60677,7 +60773,7 @@ and limitations under the License.
60677
60773
  0,
60678
60774
  "0",
60679
60775
  0,
60680
- "([25-8]\\d{5})$|0",
60776
+ "([25-8]\\d{5})$|0|180020",
60681
60777
  "1624$1",
60682
60778
  0,
60683
60779
  "74576|(?:16|7[56])24"
@@ -60740,9 +60836,9 @@ and limitations under the License.
60740
60836
  "(\\d{3})(\\d{3})(\\d{4})",
60741
60837
  "$1 $2 $3",
60742
60838
  [
60743
- "1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]",
60744
- "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]",
60745
- "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"
60839
+ "1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]",
60840
+ "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]",
60841
+ "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"
60746
60842
  ],
60747
60843
  "0$1",
60748
60844
  1
@@ -60751,9 +60847,9 @@ and limitations under the License.
60751
60847
  "(\\d{4})(\\d{3})(\\d{3})",
60752
60848
  "$1 $2 $3",
60753
60849
  [
60754
- "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807",
60755
- "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]",
60756
- "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"
60850
+ "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807",
60851
+ "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]",
60852
+ "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"
60757
60853
  ],
60758
60854
  "0$1",
60759
60855
  1
@@ -60762,7 +60858,7 @@ and limitations under the License.
60762
60858
  "(\\d{5})(\\d{5})",
60763
60859
  "$1 $2",
60764
60860
  [
60765
- "[6-9]"
60861
+ "16|[6-9]"
60766
60862
  ],
60767
60863
  "0$1",
60768
60864
  1
@@ -60771,8 +60867,8 @@ and limitations under the License.
60771
60867
  "(\\d{4})(\\d{2,4})(\\d{4})",
60772
60868
  "$1 $2 $3",
60773
60869
  [
60774
- "1(?:6|8[06])",
60775
- "1(?:6|8[06]0)"
60870
+ "18[06]",
60871
+ "18[06]0"
60776
60872
  ],
60777
60873
  0,
60778
60874
  1
@@ -60926,7 +61022,7 @@ and limitations under the License.
60926
61022
  IT: [
60927
61023
  "39",
60928
61024
  "00",
60929
- "0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",
61025
+ "0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",
60930
61026
  [
60931
61027
  6,
60932
61028
  7,
@@ -61005,7 +61101,7 @@ and limitations under the License.
61005
61101
  "(\\d{3})(\\d{4})(\\d{4,5})",
61006
61102
  "$1 $2 $3",
61007
61103
  [
61008
- "3"
61104
+ "[03]"
61009
61105
  ]
61010
61106
  ]
61011
61107
  ],
@@ -61017,15 +61113,7 @@ and limitations under the License.
61017
61113
  0,
61018
61114
  [
61019
61115
  [
61020
- "0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}",
61021
- [
61022
- 6,
61023
- 7,
61024
- 8,
61025
- 9,
61026
- 10,
61027
- 11
61028
- ]
61116
+ "0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"
61029
61117
  ],
61030
61118
  [
61031
61119
  "3[2-9]\\d{7,8}|(?:31|43)\\d{8}",
@@ -61091,7 +61179,7 @@ and limitations under the License.
61091
61179
  0,
61092
61180
  "0",
61093
61181
  0,
61094
- "([0-24-8]\\d{5})$|0",
61182
+ "([0-24-8]\\d{5})$|0|180020",
61095
61183
  "1534$1",
61096
61184
  0,
61097
61185
  0,
@@ -61141,7 +61229,7 @@ and limitations under the License.
61141
61229
  JO: [
61142
61230
  "962",
61143
61231
  "00",
61144
- "(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",
61232
+ "(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",
61145
61233
  [
61146
61234
  8,
61147
61235
  9
@@ -61175,7 +61263,7 @@ and limitations under the License.
61175
61263
  "(\\d)(\\d{4})(\\d{4})",
61176
61264
  "$1 $2 $3",
61177
61265
  [
61178
- "7"
61266
+ "[47]"
61179
61267
  ],
61180
61268
  "0$1"
61181
61269
  ]
@@ -61185,7 +61273,7 @@ and limitations under the License.
61185
61273
  JP: [
61186
61274
  "81",
61187
61275
  "010",
61188
- "00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",
61276
+ "00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",
61189
61277
  [
61190
61278
  8,
61191
61279
  9,
@@ -61229,8 +61317,8 @@ and limitations under the License.
61229
61317
  "(\\d)(\\d{4})(\\d{4})",
61230
61318
  "$1-$2-$3",
61231
61319
  [
61232
- "[36]|4(?:2[09]|7[01])",
61233
- "[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"
61320
+ "3|4(?:2[09]|7[01])|6[1-9]",
61321
+ "3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"
61234
61322
  ],
61235
61323
  "0$1"
61236
61324
  ],
@@ -61264,14 +61352,14 @@ and limitations under the License.
61264
61352
  "(\\d{2})(\\d{4})(\\d{4})",
61265
61353
  "$1-$2-$3",
61266
61354
  [
61267
- "[257-9]"
61355
+ "[25-9]"
61268
61356
  ],
61269
61357
  "0$1"
61270
61358
  ]
61271
61359
  ],
61272
61360
  "0",
61273
61361
  0,
61274
- "(000[259]\\d{6})$|(?:(?:003768)0?)|0",
61362
+ "(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0",
61275
61363
  "$1"
61276
61364
  ],
61277
61365
  KE: [
@@ -61574,7 +61662,7 @@ and limitations under the License.
61574
61662
  KZ: [
61575
61663
  "7",
61576
61664
  "810",
61577
- "(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",
61665
+ "8\\d{13}|[78]\\d{9}",
61578
61666
  [
61579
61667
  10,
61580
61668
  14
@@ -61585,7 +61673,7 @@ and limitations under the License.
61585
61673
  0,
61586
61674
  0,
61587
61675
  0,
61588
- "33|7",
61676
+ "7",
61589
61677
  0,
61590
61678
  "8~10"
61591
61679
  ],
@@ -61639,7 +61727,7 @@ and limitations under the License.
61639
61727
  "(\\d)(\\d{3})(\\d{3})",
61640
61728
  "$1 $2 $3",
61641
61729
  [
61642
- "[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"
61730
+ "[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"
61643
61731
  ],
61644
61732
  "0$1"
61645
61733
  ],
@@ -61741,7 +61829,7 @@ and limitations under the License.
61741
61829
  LR: [
61742
61830
  "231",
61743
61831
  "00",
61744
- "(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",
61832
+ "(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",
61745
61833
  [
61746
61834
  7,
61747
61835
  8,
@@ -61881,7 +61969,14 @@ and limitations under the License.
61881
61969
  "(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})",
61882
61970
  "$1 $2 $3 $4",
61883
61971
  [
61884
- "2(?:[0367]|4[3-8])"
61972
+ "20"
61973
+ ]
61974
+ ],
61975
+ [
61976
+ "(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})",
61977
+ "$1 $2 $3 $4",
61978
+ [
61979
+ "[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"
61885
61980
  ]
61886
61981
  ],
61887
61982
  [
@@ -61909,14 +62004,7 @@ and limitations under the License.
61909
62004
  "(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})",
61910
62005
  "$1 $2 $3 $4 $5",
61911
62006
  [
61912
- "2(?:[0367]|4[3-8])"
61913
- ]
61914
- ],
61915
- [
61916
- "(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})",
61917
- "$1 $2 $3 $4",
61918
- [
61919
- "[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"
62007
+ "20"
61920
62008
  ]
61921
62009
  ]
61922
62010
  ],
@@ -61927,7 +62015,7 @@ and limitations under the License.
61927
62015
  LV: [
61928
62016
  "371",
61929
62017
  "00",
61930
- "(?:[268]\\d|90)\\d{6}",
62018
+ "(?:[268]\\d|78|90)\\d{6}",
61931
62019
  [
61932
62020
  8
61933
62021
  ],
@@ -61936,7 +62024,7 @@ and limitations under the License.
61936
62024
  "(\\d{2})(\\d{3})(\\d{3})",
61937
62025
  "$1 $2 $3",
61938
62026
  [
61939
- "[269]|8[01]"
62027
+ "[2679]|8[01]"
61940
62028
  ]
61941
62029
  ]
61942
62030
  ]
@@ -61968,19 +62056,11 @@ and limitations under the License.
61968
62056
  9
61969
62057
  ],
61970
62058
  [
61971
- [
61972
- "(\\d{3})(\\d{2})(\\d{2})(\\d{2})",
61973
- "$1 $2 $3 $4",
61974
- [
61975
- "5[45]"
61976
- ],
61977
- "0$1"
61978
- ],
61979
62059
  [
61980
62060
  "(\\d{4})(\\d{5})",
61981
62061
  "$1-$2",
61982
62062
  [
61983
- "5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"
62063
+ "892"
61984
62064
  ],
61985
62065
  "0$1"
61986
62066
  ],
@@ -61988,15 +62068,15 @@ and limitations under the License.
61988
62068
  "(\\d{2})(\\d{7})",
61989
62069
  "$1-$2",
61990
62070
  [
61991
- "8"
62071
+ "8(?:0[0-7]|9)"
61992
62072
  ],
61993
62073
  "0$1"
61994
62074
  ],
61995
62075
  [
61996
- "(\\d{3})(\\d{6})",
61997
- "$1-$2",
62076
+ "(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
62077
+ "$1 $2 $3 $4 $5",
61998
62078
  [
61999
- "[5-7]"
62079
+ "[5-8]"
62000
62080
  ],
62001
62081
  "0$1"
62002
62082
  ]
@@ -62006,33 +62086,12 @@ and limitations under the License.
62006
62086
  0,
62007
62087
  0,
62008
62088
  0,
62009
- 0,
62010
- [
62011
- [
62012
- "5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"
62013
- ],
62014
- [
62015
- "(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-467]|5[0-3]|8[0-7]))\\d{6}"
62016
- ],
62017
- [
62018
- "80[0-7]\\d{6}"
62019
- ],
62020
- [
62021
- "89\\d{7}"
62022
- ],
62023
- 0,
62024
- 0,
62025
- 0,
62026
- 0,
62027
- [
62028
- "(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"
62029
- ]
62030
- ]
62089
+ "[5-8]"
62031
62090
  ],
62032
62091
  MC: [
62033
62092
  "377",
62034
62093
  "00",
62035
- "(?:[3489]|6\\d)\\d{7}",
62094
+ "(?:[3489]|[67]\\d)\\d{7}",
62036
62095
  [
62037
62096
  8,
62038
62097
  9
@@ -62057,7 +62116,7 @@ and limitations under the License.
62057
62116
  "(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
62058
62117
  "$1 $2 $3 $4 $5",
62059
62118
  [
62060
- "6"
62119
+ "[67]"
62061
62120
  ],
62062
62121
  "0$1"
62063
62122
  ]
@@ -62122,7 +62181,7 @@ and limitations under the License.
62122
62181
  MF: [
62123
62182
  "590",
62124
62183
  "00",
62125
- "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",
62184
+ "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",
62126
62185
  [
62127
62186
  9
62128
62187
  ],
@@ -62135,15 +62194,17 @@ and limitations under the License.
62135
62194
  0,
62136
62195
  [
62137
62196
  [
62138
- "590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"
62197
+ "(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"
62139
62198
  ],
62140
62199
  [
62141
- "(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"
62200
+ "(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"
62142
62201
  ],
62143
62202
  [
62144
62203
  "80[0-5]\\d{6}"
62145
62204
  ],
62146
- 0,
62205
+ [
62206
+ "8[129]\\d{7}"
62207
+ ],
62147
62208
  0,
62148
62209
  0,
62149
62210
  0,
@@ -62347,7 +62408,7 @@ and limitations under the License.
62347
62408
  "(\\d{2})(\\d{2})(\\d{4})",
62348
62409
  "$1 $2 $3",
62349
62410
  [
62350
- "[12]1"
62411
+ "11|2[16]"
62351
62412
  ],
62352
62413
  "0$1"
62353
62414
  ],
@@ -62429,7 +62490,7 @@ and limitations under the License.
62429
62490
  MQ: [
62430
62491
  "596",
62431
62492
  "00",
62432
- "(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",
62493
+ "7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",
62433
62494
  [
62434
62495
  9
62435
62496
  ],
@@ -63528,8 +63589,8 @@ and limitations under the License.
63528
63589
  "(\\d{2})(\\d{2})(\\d{3})",
63529
63590
  "$1 $2 $3",
63530
63591
  [
63531
- "(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1",
63532
- "(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"
63592
+ "30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1",
63593
+ "30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"
63533
63594
  ]
63534
63595
  ],
63535
63596
  [
@@ -63565,7 +63626,7 @@ and limitations under the License.
63565
63626
  PM: [
63566
63627
  "508",
63567
63628
  "00",
63568
- "[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",
63629
+ "[78]\\d{8}|[2-9]\\d{5}",
63569
63630
  [
63570
63631
  6,
63571
63632
  9
@@ -63575,7 +63636,7 @@ and limitations under the License.
63575
63636
  "(\\d{2})(\\d{2})(\\d{2})",
63576
63637
  "$1 $2 $3",
63577
63638
  [
63578
- "[45]"
63639
+ "[2-9]"
63579
63640
  ],
63580
63641
  "0$1"
63581
63642
  ],
@@ -63692,7 +63753,7 @@ and limitations under the License.
63692
63753
  PY: [
63693
63754
  "595",
63694
63755
  "00",
63695
- "59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",
63756
+ "[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",
63696
63757
  [
63697
63758
  6,
63698
63759
  7,
@@ -63714,7 +63775,7 @@ and limitations under the License.
63714
63775
  "(\\d{2})(\\d{5})",
63715
63776
  "$1 $2",
63716
63777
  [
63717
- "[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"
63778
+ "3[289]|4[246-8]|61|7[1-3]|8[1-36]"
63718
63779
  ],
63719
63780
  "(0$1)"
63720
63781
  ],
@@ -63819,7 +63880,7 @@ and limitations under the License.
63819
63880
  0,
63820
63881
  [
63821
63882
  [
63822
- "26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"
63883
+ "2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"
63823
63884
  ],
63824
63885
  [
63825
63886
  "(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"
@@ -63991,7 +64052,7 @@ and limitations under the License.
63991
64052
  0,
63992
64053
  0,
63993
64054
  0,
63994
- "3[04-689]|[489]",
64055
+ "[3489]",
63995
64056
  0,
63996
64057
  "8~10"
63997
64058
  ],
@@ -64032,7 +64093,7 @@ and limitations under the License.
64032
64093
  SA: [
64033
64094
  "966",
64034
64095
  "00",
64035
- "92\\d{7}|(?:[15]|8\\d)\\d{8}",
64096
+ "(?:[15]\\d|800|92)\\d{7}",
64036
64097
  [
64037
64098
  9,
64038
64099
  10
@@ -64061,14 +64122,6 @@ and limitations under the License.
64061
64122
  ],
64062
64123
  "0$1"
64063
64124
  ],
64064
- [
64065
- "(\\d{3})(\\d{3})(\\d{3,4})",
64066
- "$1 $2 $3",
64067
- [
64068
- "81"
64069
- ],
64070
- "0$1"
64071
- ],
64072
64125
  [
64073
64126
  "(\\d{3})(\\d{3})(\\d{4})",
64074
64127
  "$1 $2 $3",
@@ -64431,7 +64484,7 @@ and limitations under the License.
64431
64484
  ],
64432
64485
  [
64433
64486
  "(\\d)(\\d{3})(\\d{3})(\\d{2})",
64434
- "$1/$2 $3 $4",
64487
+ "$1 $2 $3 $4",
64435
64488
  [
64436
64489
  "2"
64437
64490
  ],
@@ -64447,7 +64500,7 @@ and limitations under the License.
64447
64500
  ],
64448
64501
  [
64449
64502
  "(\\d{2})(\\d{3})(\\d{2})(\\d{2})",
64450
- "$1/$2 $3 $4",
64503
+ "$1 $2 $3 $4",
64451
64504
  [
64452
64505
  "[3-5]"
64453
64506
  ],
@@ -64587,7 +64640,7 @@ and limitations under the License.
64587
64640
  SR: [
64588
64641
  "597",
64589
64642
  "00",
64590
- "(?:[2-5]|68|[78]\\d|90)\\d{5}",
64643
+ "(?:[2-5]|[6-9]\\d)\\d{5}",
64591
64644
  [
64592
64645
  6,
64593
64646
  7
@@ -64655,7 +64708,7 @@ and limitations under the License.
64655
64708
  SV: [
64656
64709
  "503",
64657
64710
  "00",
64658
- "[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",
64711
+ "[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",
64659
64712
  [
64660
64713
  7,
64661
64714
  8,
@@ -64673,7 +64726,7 @@ and limitations under the License.
64673
64726
  "(\\d{4})(\\d{4})",
64674
64727
  "$1 $2",
64675
64728
  [
64676
- "[267]"
64729
+ "[25-7]"
64677
64730
  ]
64678
64731
  ],
64679
64732
  [
@@ -64703,7 +64756,7 @@ and limitations under the License.
64703
64756
  SY: [
64704
64757
  "963",
64705
64758
  "00",
64706
- "[1-39]\\d{8}|[1-5]\\d{7}",
64759
+ "[1-359]\\d{8}|[1-5]\\d{7}",
64707
64760
  [
64708
64761
  8,
64709
64762
  9
@@ -64713,7 +64766,7 @@ and limitations under the License.
64713
64766
  "(\\d{2})(\\d{3})(\\d{3,4})",
64714
64767
  "$1 $2 $3",
64715
64768
  [
64716
- "[1-5]"
64769
+ "[1-4]|5[1-3]"
64717
64770
  ],
64718
64771
  "0$1",
64719
64772
  1
@@ -64722,7 +64775,7 @@ and limitations under the License.
64722
64775
  "(\\d{3})(\\d{3})(\\d{3})",
64723
64776
  "$1 $2 $3",
64724
64777
  [
64725
- "9"
64778
+ "[59]"
64726
64779
  ],
64727
64780
  "0$1",
64728
64781
  1
@@ -64788,7 +64841,7 @@ and limitations under the License.
64788
64841
  TD: [
64789
64842
  "235",
64790
64843
  "00|16",
64791
- "(?:22|[689]\\d|77)\\d{6}",
64844
+ "(?:22|[3689]\\d|77)\\d{6}",
64792
64845
  [
64793
64846
  8
64794
64847
  ],
@@ -64797,7 +64850,7 @@ and limitations under the License.
64797
64850
  "(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
64798
64851
  "$1 $2 $3 $4",
64799
64852
  [
64800
- "[26-9]"
64853
+ "[236-9]"
64801
64854
  ]
64802
64855
  ]
64803
64856
  ],
@@ -64867,7 +64920,7 @@ and limitations under the License.
64867
64920
  TJ: [
64868
64921
  "992",
64869
64922
  "810",
64870
- "[0-57-9]\\d{8}",
64923
+ "(?:[0-57-9]\\d|66)\\d{7}",
64871
64924
  [
64872
64925
  9
64873
64926
  ],
@@ -64898,7 +64951,7 @@ and limitations under the License.
64898
64951
  "(\\d{2})(\\d{3})(\\d{4})",
64899
64952
  "$1 $2 $3",
64900
64953
  [
64901
- "[0-57-9]"
64954
+ "\\d"
64902
64955
  ]
64903
64956
  ]
64904
64957
  ],
@@ -65062,9 +65115,9 @@ and limitations under the License.
65062
65115
  "(\\d{3})(\\d{3})(\\d{2})(\\d{2})",
65063
65116
  "$1 $2 $3 $4",
65064
65117
  [
65065
- "5(?:[0-59]|61)",
65066
- "5(?:[0-59]|61[06])",
65067
- "5(?:[0-59]|61[06]1)"
65118
+ "5(?:[0-579]|61)",
65119
+ "5(?:[0-579]|61[06])",
65120
+ "5(?:[0-579]|61[06]1)"
65068
65121
  ],
65069
65122
  "0$1",
65070
65123
  1
@@ -65158,11 +65211,35 @@ and limitations under the License.
65158
65211
  ],
65159
65212
  "0$1"
65160
65213
  ],
65214
+ [
65215
+ "(\\d{3})(\\d{5})",
65216
+ "$1 $2",
65217
+ [
65218
+ "826"
65219
+ ],
65220
+ "0$1"
65221
+ ],
65222
+ [
65223
+ "(\\d{3})(\\d{2})(\\d{3})",
65224
+ "$1 $2 $3",
65225
+ [
65226
+ "83"
65227
+ ],
65228
+ "0$1"
65229
+ ],
65230
+ [
65231
+ "(\\d{2})(\\d{2})(\\d{4})",
65232
+ "$1 $2 $3",
65233
+ [
65234
+ "82"
65235
+ ],
65236
+ "0$1"
65237
+ ],
65161
65238
  [
65162
65239
  "(\\d{2})(\\d{3})(\\d{3,4})",
65163
65240
  "$1 $2 $3",
65164
65241
  [
65165
- "[258]0"
65242
+ "[25]0|37|49|8[09]"
65166
65243
  ],
65167
65244
  "0$1"
65168
65245
  ],
@@ -65170,8 +65247,8 @@ and limitations under the License.
65170
65247
  "(\\d)(\\d{3,4})(\\d{4})",
65171
65248
  "$1 $2 $3",
65172
65249
  [
65173
- "[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]",
65174
- "[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"
65250
+ "[23568]|4(?:0[02-48]|[1-478])|7[1-9]",
65251
+ "[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"
65175
65252
  ],
65176
65253
  "0$1"
65177
65254
  ],
@@ -65369,7 +65446,7 @@ and limitations under the License.
65369
65446
  0,
65370
65447
  [
65371
65448
  [
65372
- "(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[0-468]))\\d{4}|(?:2742|305[3-9]|472[247-9]|505[2-57-9]|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"
65449
+ "(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"
65373
65450
  ],
65374
65451
  [
65375
65452
  ""
@@ -65381,21 +65458,17 @@ and limitations under the License.
65381
65458
  "900[2-9]\\d{6}"
65382
65459
  ],
65383
65460
  [
65384
- "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"
65385
- ],
65386
- 0,
65387
- 0,
65388
- 0,
65389
- [
65390
- "305209\\d{4}"
65461
+ "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"
65391
65462
  ]
65392
65463
  ]
65393
65464
  ],
65394
65465
  UY: [
65395
65466
  "598",
65396
65467
  "0(?:0|1[3-9]\\d)",
65397
- "0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",
65468
+ "0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",
65398
65469
  [
65470
+ 4,
65471
+ 5,
65399
65472
  6,
65400
65473
  7,
65401
65474
  8,
@@ -65406,6 +65479,13 @@ and limitations under the License.
65406
65479
  13
65407
65480
  ],
65408
65481
  [
65482
+ [
65483
+ "(\\d{4,5})",
65484
+ "$1",
65485
+ [
65486
+ "21"
65487
+ ]
65488
+ ],
65409
65489
  [
65410
65490
  "(\\d{3})(\\d{3,4})",
65411
65491
  "$1 $2",
@@ -65787,7 +65867,7 @@ and limitations under the License.
65787
65867
  YT: [
65788
65868
  "262",
65789
65869
  "00",
65790
- "7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",
65870
+ "(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",
65791
65871
  [
65792
65872
  9
65793
65873
  ],
@@ -65800,7 +65880,7 @@ and limitations under the License.
65800
65880
  0,
65801
65881
  [
65802
65882
  [
65803
- "269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"
65883
+ "26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"
65804
65884
  ],
65805
65885
  [
65806
65886
  "(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"
@@ -66236,7 +66316,7 @@ and limitations under the License.
66236
66316
  "(\\d{2})(\\d{4})(\\d{4})",
66237
66317
  "$1 $2 $3",
66238
66318
  [
66239
- "10|23|3(?:[15]|4[57])|4|51"
66319
+ "10|23|3(?:[15]|4[57])|4|5[12]"
66240
66320
  ]
66241
66321
  ],
66242
66322
  [
@@ -66263,7 +66343,7 @@ and limitations under the License.
66263
66343
  [
66264
66344
  0,
66265
66345
  [
66266
- "342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",
66346
+ "342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",
66267
66347
  [
66268
66348
  7,
66269
66349
  8,
@@ -66437,142 +66517,133 @@ and limitations under the License.
66437
66517
  var TILDES = "~\u2053\u223C\uFF5E";
66438
66518
  var VALID_PUNCTUATION = "".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES);
66439
66519
  var PLUS_CHARS = "+\uFF0B";
66440
- function _typeof(obj) {
66441
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
66442
- return typeof obj;
66443
- } : function(obj) {
66444
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
66445
- }, _typeof(obj);
66520
+ function _typeof(o) {
66521
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
66522
+ return typeof o;
66523
+ } : function(o) {
66524
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
66525
+ }, _typeof(o);
66446
66526
  }
66447
- function _defineProperties(target, props) {
66448
- for(var i = 0; i < props.length; i++){
66449
- var descriptor = props[i];
66450
- descriptor.enumerable = descriptor.enumerable || false;
66451
- descriptor.configurable = true;
66452
- if ("value" in descriptor) descriptor.writable = true;
66453
- Object.defineProperty(target, descriptor.key, descriptor);
66527
+ function _defineProperties(e, r) {
66528
+ for(var t = 0; t < r.length; t++){
66529
+ var o = r[t];
66530
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
66454
66531
  }
66455
66532
  }
66456
- function _createClass(Constructor, protoProps, staticProps) {
66457
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
66458
- if (staticProps) _defineProperties(Constructor, staticProps);
66459
- Object.defineProperty(Constructor, "prototype", {
66460
- writable: false
66461
- });
66462
- return Constructor;
66533
+ function _createClass(e, r, t) {
66534
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
66535
+ writable: !1
66536
+ }), e;
66463
66537
  }
66464
- function _classCallCheck(instance, Constructor) {
66465
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
66538
+ function _toPropertyKey(t) {
66539
+ var i = _toPrimitive(t, "string");
66540
+ return "symbol" == _typeof(i) ? i : i + "";
66466
66541
  }
66467
- function _inherits(subClass, superClass) {
66468
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function");
66469
- subClass.prototype = Object.create(superClass && superClass.prototype, {
66470
- constructor: {
66471
- value: subClass,
66472
- writable: true,
66473
- configurable: true
66474
- }
66475
- });
66476
- Object.defineProperty(subClass, "prototype", {
66477
- writable: false
66478
- });
66479
- if (superClass) ParseError_setPrototypeOf(subClass, superClass);
66542
+ function _toPrimitive(t, r) {
66543
+ if ("object" != _typeof(t) || !t) return t;
66544
+ var e = t[Symbol.toPrimitive];
66545
+ if (void 0 !== e) {
66546
+ var i = e.call(t, r || "default");
66547
+ if ("object" != _typeof(i)) return i;
66548
+ throw new TypeError("@@toPrimitive must return a primitive value.");
66549
+ }
66550
+ return ("string" === r ? String : Number)(t);
66480
66551
  }
66481
- function _createSuper(Derived) {
66482
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
66483
- return function() {
66484
- var Super = ParseError_getPrototypeOf(Derived), result;
66485
- if (hasNativeReflectConstruct) {
66486
- var NewTarget = ParseError_getPrototypeOf(this).constructor;
66487
- result = Reflect.construct(Super, arguments, NewTarget);
66488
- } else result = Super.apply(this, arguments);
66489
- return _possibleConstructorReturn(this, result);
66490
- };
66552
+ function _classCallCheck(a, n) {
66553
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
66491
66554
  }
66492
- function _possibleConstructorReturn(self, call) {
66493
- if (call && ("object" === _typeof(call) || "function" == typeof call)) return call;
66494
- if (void 0 !== call) throw new TypeError("Derived constructors may only return object or undefined");
66495
- return _assertThisInitialized(self);
66555
+ function _callSuper(t, o, e) {
66556
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, ParseError_isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
66496
66557
  }
66497
- function _assertThisInitialized(self) {
66498
- if (void 0 === self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
66499
- return self;
66558
+ function _possibleConstructorReturn(t, e) {
66559
+ if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
66560
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
66561
+ return _assertThisInitialized(t);
66500
66562
  }
66501
- function ParseError_wrapNativeSuper(Class) {
66502
- var _cache = "function" == typeof Map ? new Map() : void 0;
66503
- ParseError_wrapNativeSuper = function(Class) {
66504
- if (null === Class || !_isNativeFunction(Class)) return Class;
66505
- if ("function" != typeof Class) throw new TypeError("Super expression must either be null or a function");
66506
- if (void 0 !== _cache) {
66507
- if (_cache.has(Class)) return _cache.get(Class);
66508
- _cache.set(Class, Wrapper);
66563
+ function _assertThisInitialized(e) {
66564
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
66565
+ return e;
66566
+ }
66567
+ function _inherits(t, e) {
66568
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
66569
+ t.prototype = Object.create(e && e.prototype, {
66570
+ constructor: {
66571
+ value: t,
66572
+ writable: !0,
66573
+ configurable: !0
66574
+ }
66575
+ }), Object.defineProperty(t, "prototype", {
66576
+ writable: !1
66577
+ }), e && _setPrototypeOf(t, e);
66578
+ }
66579
+ function ParseError_wrapNativeSuper(t) {
66580
+ var r = "function" == typeof Map ? new Map() : void 0;
66581
+ return ParseError_wrapNativeSuper = function(t) {
66582
+ if (null === t || !_isNativeFunction(t)) return t;
66583
+ if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
66584
+ if (void 0 !== r) {
66585
+ if (r.has(t)) return r.get(t);
66586
+ r.set(t, Wrapper);
66509
66587
  }
66510
66588
  function Wrapper() {
66511
- return ParseError_construct(Class, arguments, ParseError_getPrototypeOf(this).constructor);
66589
+ return _construct(t, arguments, _getPrototypeOf(this).constructor);
66512
66590
  }
66513
- Wrapper.prototype = Object.create(Class.prototype, {
66591
+ return Wrapper.prototype = Object.create(t.prototype, {
66514
66592
  constructor: {
66515
66593
  value: Wrapper,
66516
- enumerable: false,
66517
- writable: true,
66518
- configurable: true
66594
+ enumerable: !1,
66595
+ writable: !0,
66596
+ configurable: !0
66519
66597
  }
66520
- });
66521
- return ParseError_setPrototypeOf(Wrapper, Class);
66522
- };
66523
- return ParseError_wrapNativeSuper(Class);
66598
+ }), _setPrototypeOf(Wrapper, t);
66599
+ }, ParseError_wrapNativeSuper(t);
66524
66600
  }
66525
- function ParseError_construct(Parent, args, Class) {
66526
- ParseError_construct = _isNativeReflectConstruct() ? Reflect.construct : function(Parent, args, Class) {
66527
- var a = [
66528
- null
66529
- ];
66530
- a.push.apply(a, args);
66531
- var Constructor = Function.bind.apply(Parent, a);
66532
- var instance = new Constructor();
66533
- if (Class) ParseError_setPrototypeOf(instance, Class.prototype);
66534
- return instance;
66535
- };
66536
- return ParseError_construct.apply(null, arguments);
66601
+ function _construct(t, e, r) {
66602
+ if (ParseError_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
66603
+ var o = [
66604
+ null
66605
+ ];
66606
+ o.push.apply(o, e);
66607
+ var p = new (t.bind.apply(t, o))();
66608
+ return r && _setPrototypeOf(p, r.prototype), p;
66537
66609
  }
66538
- function _isNativeReflectConstruct() {
66539
- if ("undefined" == typeof Reflect || !Reflect.construct) return false;
66540
- if (Reflect.construct.sham) return false;
66541
- if ("function" == typeof Proxy) return true;
66610
+ function ParseError_isNativeReflectConstruct() {
66542
66611
  try {
66543
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
66544
- return true;
66545
- } catch (e) {
66546
- return false;
66547
- }
66612
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
66613
+ } catch (t) {}
66614
+ return (ParseError_isNativeReflectConstruct = function() {
66615
+ return !!t;
66616
+ })();
66548
66617
  }
66549
- function _isNativeFunction(fn) {
66550
- return -1 !== Function.toString.call(fn).indexOf("[native code]");
66618
+ function _isNativeFunction(t) {
66619
+ try {
66620
+ return -1 !== Function.toString.call(t).indexOf("[native code]");
66621
+ } catch (n) {
66622
+ return "function" == typeof t;
66623
+ }
66551
66624
  }
66552
- function ParseError_setPrototypeOf(o, p) {
66553
- ParseError_setPrototypeOf = Object.setPrototypeOf || function(o, p) {
66554
- o.__proto__ = p;
66555
- return o;
66556
- };
66557
- return ParseError_setPrototypeOf(o, p);
66625
+ function _setPrototypeOf(t, e) {
66626
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
66627
+ return t.__proto__ = e, t;
66628
+ }, _setPrototypeOf(t, e);
66558
66629
  }
66559
- function ParseError_getPrototypeOf(o) {
66560
- ParseError_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) {
66561
- return o.__proto__ || Object.getPrototypeOf(o);
66562
- };
66563
- return ParseError_getPrototypeOf(o);
66630
+ function _getPrototypeOf(t) {
66631
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
66632
+ return t.__proto__ || Object.getPrototypeOf(t);
66633
+ }, _getPrototypeOf(t);
66564
66634
  }
66565
66635
  var ParseError_ParseError = /*#__PURE__*/ function(_Error) {
66566
- _inherits(ParseError, _Error);
66567
- var _super = _createSuper(ParseError);
66568
66636
  function ParseError(code) {
66569
66637
  var _this;
66570
66638
  _classCallCheck(this, ParseError);
66571
- _this = _super.call(this, code);
66572
- Object.setPrototypeOf(_assertThisInitialized(_this), ParseError.prototype);
66639
+ _this = _callSuper(this, ParseError, [
66640
+ code
66641
+ ]);
66642
+ Object.setPrototypeOf(_this, ParseError.prototype);
66573
66643
  _this.name = _this.constructor.name;
66574
66644
  return _this;
66575
66645
  }
66646
+ _inherits(ParseError, _Error);
66576
66647
  return _createClass(ParseError);
66577
66648
  }(/*#__PURE__*/ ParseError_wrapNativeSuper(Error));
66578
66649
  function semver_compare(a, b) {
@@ -66595,32 +66666,40 @@ and limitations under the License.
66595
66666
  function isObject_isObject(object) {
66596
66667
  return null != object && object.constructor === objectConstructor;
66597
66668
  }
66598
- function metadata_typeof(obj) {
66599
- return metadata_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
66600
- return typeof obj;
66601
- } : function(obj) {
66602
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
66603
- }, metadata_typeof(obj);
66669
+ function metadata_typeof(o) {
66670
+ return metadata_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
66671
+ return typeof o;
66672
+ } : function(o) {
66673
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
66674
+ }, metadata_typeof(o);
66604
66675
  }
66605
- function metadata_classCallCheck(instance, Constructor) {
66606
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
66676
+ function metadata_classCallCheck(a, n) {
66677
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
66607
66678
  }
66608
- function metadata_defineProperties(target, props) {
66609
- for(var i = 0; i < props.length; i++){
66610
- var descriptor = props[i];
66611
- descriptor.enumerable = descriptor.enumerable || false;
66612
- descriptor.configurable = true;
66613
- if ("value" in descriptor) descriptor.writable = true;
66614
- Object.defineProperty(target, descriptor.key, descriptor);
66679
+ function metadata_defineProperties(e, r) {
66680
+ for(var t = 0; t < r.length; t++){
66681
+ var o = r[t];
66682
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, metadata_toPropertyKey(o.key), o);
66615
66683
  }
66616
66684
  }
66617
- function metadata_createClass(Constructor, protoProps, staticProps) {
66618
- if (protoProps) metadata_defineProperties(Constructor.prototype, protoProps);
66619
- if (staticProps) metadata_defineProperties(Constructor, staticProps);
66620
- Object.defineProperty(Constructor, "prototype", {
66621
- writable: false
66622
- });
66623
- return Constructor;
66685
+ function metadata_createClass(e, r, t) {
66686
+ return r && metadata_defineProperties(e.prototype, r), t && metadata_defineProperties(e, t), Object.defineProperty(e, "prototype", {
66687
+ writable: !1
66688
+ }), e;
66689
+ }
66690
+ function metadata_toPropertyKey(t) {
66691
+ var i = metadata_toPrimitive(t, "string");
66692
+ return "symbol" == metadata_typeof(i) ? i : i + "";
66693
+ }
66694
+ function metadata_toPrimitive(t, r) {
66695
+ if ("object" != metadata_typeof(t) || !t) return t;
66696
+ var e = t[Symbol.toPrimitive];
66697
+ if (void 0 !== e) {
66698
+ var i = e.call(t, r || "default");
66699
+ if ("object" != metadata_typeof(i)) return i;
66700
+ throw new TypeError("@@toPrimitive must return a primitive value.");
66701
+ }
66702
+ return ("string" === r ? String : Number)(t);
66624
66703
  }
66625
66704
  var V3 = '1.2.0';
66626
66705
  var V4 = '1.7.35';
@@ -66633,7 +66712,7 @@ and limitations under the License.
66633
66712
  this.metadata = metadata;
66634
66713
  setVersion.call(this, metadata);
66635
66714
  }
66636
- metadata_createClass(Metadata, [
66715
+ return metadata_createClass(Metadata, [
66637
66716
  {
66638
66717
  key: "getCountries",
66639
66718
  value: function() {
@@ -66826,7 +66905,6 @@ and limitations under the License.
66826
66905
  }
66827
66906
  }
66828
66907
  ]);
66829
- return Metadata;
66830
66908
  }();
66831
66909
  var metadata_NumberingPlan = /*#__PURE__*/ function() {
66832
66910
  function NumberingPlan(metadata, globalMetadataObject) {
@@ -66835,7 +66913,7 @@ and limitations under the License.
66835
66913
  this.metadata = metadata;
66836
66914
  setVersion.call(this, globalMetadataObject.metadata);
66837
66915
  }
66838
- metadata_createClass(NumberingPlan, [
66916
+ return metadata_createClass(NumberingPlan, [
66839
66917
  {
66840
66918
  key: "callingCode",
66841
66919
  value: function() {
@@ -66973,7 +67051,6 @@ and limitations under the License.
66973
67051
  }
66974
67052
  }
66975
67053
  ]);
66976
- return NumberingPlan;
66977
67054
  }();
66978
67055
  var metadata_Format = /*#__PURE__*/ function() {
66979
67056
  function Format(format, metadata) {
@@ -66981,7 +67058,7 @@ and limitations under the License.
66981
67058
  this._format = format;
66982
67059
  this.metadata = metadata;
66983
67060
  }
66984
- metadata_createClass(Format, [
67061
+ return metadata_createClass(Format, [
66985
67062
  {
66986
67063
  key: "pattern",
66987
67064
  value: function() {
@@ -67031,7 +67108,6 @@ and limitations under the License.
67031
67108
  }
67032
67109
  }
67033
67110
  ]);
67034
- return Format;
67035
67111
  }();
67036
67112
  var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/;
67037
67113
  var metadata_Type = /*#__PURE__*/ function() {
@@ -67040,7 +67116,7 @@ and limitations under the License.
67040
67116
  this.type = type;
67041
67117
  this.metadata = metadata;
67042
67118
  }
67043
- metadata_createClass(Type, [
67119
+ return metadata_createClass(Type, [
67044
67120
  {
67045
67121
  key: "pattern",
67046
67122
  value: function() {
@@ -67056,7 +67132,6 @@ and limitations under the License.
67056
67132
  }
67057
67133
  }
67058
67134
  ]);
67059
- return Type;
67060
67135
  }();
67061
67136
  function metadata_getType(types, type) {
67062
67137
  switch(type){
@@ -67091,7 +67166,7 @@ and limitations under the License.
67091
67166
  };
67092
67167
  function metadata_getCountryCallingCode(country, metadata) {
67093
67168
  metadata = new metadata_Metadata(metadata);
67094
- if (metadata.hasCountry(country)) return metadata.country(country).countryCallingCode();
67169
+ if (metadata.hasCountry(country)) return metadata.selectNumberingPlan(country).countryCallingCode();
67095
67170
  throw new Error("Unknown country: ".concat(country));
67096
67171
  }
67097
67172
  function setVersion(metadata) {
@@ -67158,36 +67233,34 @@ and limitations under the License.
67158
67233
  i++;
67159
67234
  }
67160
67235
  }
67161
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
67162
- var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"];
67163
- if (it) return (it = it.call(o)).next.bind(it);
67164
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && "number" == typeof o.length) {
67165
- if (it) o = it;
67166
- var i = 0;
67236
+ function _createForOfIteratorHelperLoose(r, e) {
67237
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
67238
+ if (t) return (t = t.call(r)).next.bind(t);
67239
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
67240
+ t && (r = t);
67241
+ var o = 0;
67167
67242
  return function() {
67168
- if (i >= o.length) return {
67169
- done: true
67170
- };
67171
- return {
67172
- done: false,
67173
- value: o[i++]
67243
+ return o >= r.length ? {
67244
+ done: !0
67245
+ } : {
67246
+ done: !1,
67247
+ value: r[o++]
67174
67248
  };
67175
67249
  };
67176
67250
  }
67177
67251
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
67178
67252
  }
67179
- function _unsupportedIterableToArray(o, minLen) {
67180
- if (!o) return;
67181
- if ("string" == typeof o) return _arrayLikeToArray(o, minLen);
67182
- var n = Object.prototype.toString.call(o).slice(8, -1);
67183
- if ("Object" === n && o.constructor) n = o.constructor.name;
67184
- if ("Map" === n || "Set" === n) return Array.from(o);
67185
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
67253
+ function _unsupportedIterableToArray(r, a) {
67254
+ if (r) {
67255
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
67256
+ var t = ({}).toString.call(r).slice(8, -1);
67257
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
67258
+ }
67186
67259
  }
67187
- function _arrayLikeToArray(arr, len) {
67188
- if (null == len || len > arr.length) len = arr.length;
67189
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
67190
- return arr2;
67260
+ function _arrayLikeToArray(r, a) {
67261
+ (null == a || a > r.length) && (a = r.length);
67262
+ for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
67263
+ return n;
67191
67264
  }
67192
67265
  var DIGITS = {
67193
67266
  0: '0',
@@ -67243,36 +67316,34 @@ and limitations under the License.
67243
67316
  }
67244
67317
  return result;
67245
67318
  }
67246
- function parseIncompletePhoneNumber_createForOfIteratorHelperLoose(o, allowArrayLike) {
67247
- var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"];
67248
- if (it) return (it = it.call(o)).next.bind(it);
67249
- if (Array.isArray(o) || (it = parseIncompletePhoneNumber_unsupportedIterableToArray(o)) || allowArrayLike && o && "number" == typeof o.length) {
67250
- if (it) o = it;
67251
- var i = 0;
67319
+ function parseIncompletePhoneNumber_createForOfIteratorHelperLoose(r, e) {
67320
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
67321
+ if (t) return (t = t.call(r)).next.bind(t);
67322
+ if (Array.isArray(r) || (t = parseIncompletePhoneNumber_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
67323
+ t && (r = t);
67324
+ var o = 0;
67252
67325
  return function() {
67253
- if (i >= o.length) return {
67254
- done: true
67255
- };
67256
- return {
67257
- done: false,
67258
- value: o[i++]
67326
+ return o >= r.length ? {
67327
+ done: !0
67328
+ } : {
67329
+ done: !1,
67330
+ value: r[o++]
67259
67331
  };
67260
67332
  };
67261
67333
  }
67262
67334
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
67263
67335
  }
67264
- function parseIncompletePhoneNumber_unsupportedIterableToArray(o, minLen) {
67265
- if (!o) return;
67266
- if ("string" == typeof o) return parseIncompletePhoneNumber_arrayLikeToArray(o, minLen);
67267
- var n = Object.prototype.toString.call(o).slice(8, -1);
67268
- if ("Object" === n && o.constructor) n = o.constructor.name;
67269
- if ("Map" === n || "Set" === n) return Array.from(o);
67270
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return parseIncompletePhoneNumber_arrayLikeToArray(o, minLen);
67336
+ function parseIncompletePhoneNumber_unsupportedIterableToArray(r, a) {
67337
+ if (r) {
67338
+ if ("string" == typeof r) return parseIncompletePhoneNumber_arrayLikeToArray(r, a);
67339
+ var t = ({}).toString.call(r).slice(8, -1);
67340
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? parseIncompletePhoneNumber_arrayLikeToArray(r, a) : void 0;
67341
+ }
67271
67342
  }
67272
- function parseIncompletePhoneNumber_arrayLikeToArray(arr, len) {
67273
- if (null == len || len > arr.length) len = arr.length;
67274
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
67275
- return arr2;
67343
+ function parseIncompletePhoneNumber_arrayLikeToArray(r, a) {
67344
+ (null == a || a > r.length) && (a = r.length);
67345
+ for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
67346
+ return n;
67276
67347
  }
67277
67348
  function parseIncompletePhoneNumber(string) {
67278
67349
  var result = '';
@@ -67282,46 +67353,44 @@ and limitations under the License.
67282
67353
  }
67283
67354
  return result;
67284
67355
  }
67285
- function parsePhoneNumberCharacter(character, prevParsedCharacters, emitEvent) {
67356
+ function parsePhoneNumberCharacter(character, prevParsedCharacters, eventListener) {
67286
67357
  if ('+' === character) {
67287
67358
  if (prevParsedCharacters) {
67288
- if ('function' == typeof emitEvent) emitEvent('end');
67359
+ if ('function' == typeof eventListener) eventListener('end');
67289
67360
  return;
67290
67361
  }
67291
67362
  return '+';
67292
67363
  }
67293
67364
  return parseDigit(character);
67294
67365
  }
67295
- function mergeArrays_createForOfIteratorHelperLoose(o, allowArrayLike) {
67296
- var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"];
67297
- if (it) return (it = it.call(o)).next.bind(it);
67298
- if (Array.isArray(o) || (it = mergeArrays_unsupportedIterableToArray(o)) || allowArrayLike && o && "number" == typeof o.length) {
67299
- if (it) o = it;
67300
- var i = 0;
67366
+ function mergeArrays_createForOfIteratorHelperLoose(r, e) {
67367
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
67368
+ if (t) return (t = t.call(r)).next.bind(t);
67369
+ if (Array.isArray(r) || (t = mergeArrays_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
67370
+ t && (r = t);
67371
+ var o = 0;
67301
67372
  return function() {
67302
- if (i >= o.length) return {
67303
- done: true
67304
- };
67305
- return {
67306
- done: false,
67307
- value: o[i++]
67373
+ return o >= r.length ? {
67374
+ done: !0
67375
+ } : {
67376
+ done: !1,
67377
+ value: r[o++]
67308
67378
  };
67309
67379
  };
67310
67380
  }
67311
67381
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
67312
67382
  }
67313
- function mergeArrays_unsupportedIterableToArray(o, minLen) {
67314
- if (!o) return;
67315
- if ("string" == typeof o) return mergeArrays_arrayLikeToArray(o, minLen);
67316
- var n = Object.prototype.toString.call(o).slice(8, -1);
67317
- if ("Object" === n && o.constructor) n = o.constructor.name;
67318
- if ("Map" === n || "Set" === n) return Array.from(o);
67319
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return mergeArrays_arrayLikeToArray(o, minLen);
67383
+ function mergeArrays_unsupportedIterableToArray(r, a) {
67384
+ if (r) {
67385
+ if ("string" == typeof r) return mergeArrays_arrayLikeToArray(r, a);
67386
+ var t = ({}).toString.call(r).slice(8, -1);
67387
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? mergeArrays_arrayLikeToArray(r, a) : void 0;
67388
+ }
67320
67389
  }
67321
- function mergeArrays_arrayLikeToArray(arr, len) {
67322
- if (null == len || len > arr.length) len = arr.length;
67323
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
67324
- return arr2;
67390
+ function mergeArrays_arrayLikeToArray(r, a) {
67391
+ (null == a || a > r.length) && (a = r.length);
67392
+ for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
67393
+ return n;
67325
67394
  }
67326
67395
  function mergeArrays(a, b) {
67327
67396
  var merged = a.slice();
@@ -67333,15 +67402,19 @@ and limitations under the License.
67333
67402
  return a - b;
67334
67403
  });
67335
67404
  }
67336
- function checkNumberLength(nationalNumber, metadata) {
67337
- return checkNumberLengthForType(nationalNumber, void 0, metadata);
67405
+ function checkNumberLength(nationalNumber, country, metadata) {
67406
+ return checkNumberLengthForType(nationalNumber, country, void 0, metadata);
67338
67407
  }
67339
- function checkNumberLengthForType(nationalNumber, type, metadata) {
67408
+ function checkNumberLengthForType(nationalNumber, country, type, metadata) {
67409
+ if (country) {
67410
+ metadata = new metadata_Metadata(metadata.metadata);
67411
+ metadata.selectNumberingPlan(country);
67412
+ }
67340
67413
  var type_info = metadata.type(type);
67341
67414
  var possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths();
67342
67415
  if (!possible_lengths) return 'IS_POSSIBLE';
67343
67416
  if ('FIXED_LINE_OR_MOBILE' === type) {
67344
- if (!metadata.type('FIXED_LINE')) return checkNumberLengthForType(nationalNumber, 'MOBILE', metadata);
67417
+ if (!metadata.type('FIXED_LINE')) return checkNumberLengthForType(nationalNumber, country, 'MOBILE', metadata);
67345
67418
  var mobile_type = metadata.type('MOBILE');
67346
67419
  if (mobile_type) possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths());
67347
67420
  } else if (type && !type_info) return 'INVALID_LENGTH';
@@ -67362,58 +67435,56 @@ and limitations under the License.
67362
67435
  if (!input.phone) return false;
67363
67436
  if (input.country) {
67364
67437
  if (!metadata.hasCountry(input.country)) throw new Error("Unknown country: ".concat(input.country));
67365
- metadata.country(input.country);
67438
+ metadata.selectNumberingPlan(input.country);
67366
67439
  } else {
67367
67440
  if (!input.countryCallingCode) throw new Error('Invalid phone number object passed');
67368
67441
  metadata.selectNumberingPlan(input.countryCallingCode);
67369
67442
  }
67370
67443
  }
67371
- if (metadata.possibleLengths()) return isPossibleNumber(input.phone || input.nationalNumber, metadata);
67444
+ if (metadata.possibleLengths()) return isPossibleNumber(input.phone || input.nationalNumber, input.country, metadata);
67372
67445
  if (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) return true;
67373
67446
  throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.');
67374
67447
  }
67375
- function isPossibleNumber(nationalNumber, metadata) {
67376
- switch(checkNumberLength(nationalNumber, metadata)){
67448
+ function isPossibleNumber(nationalNumber, country, metadata) {
67449
+ switch(checkNumberLength(nationalNumber, country, metadata)){
67377
67450
  case 'IS_POSSIBLE':
67378
67451
  return true;
67379
67452
  default:
67380
67453
  return false;
67381
67454
  }
67382
67455
  }
67383
- function matchesEntirely(text, regular_expression) {
67456
+ function matchesEntirely(text, regularExpressionText) {
67384
67457
  text = text || '';
67385
- return new RegExp('^(?:' + regular_expression + ')$').test(text);
67458
+ return new RegExp('^(?:' + regularExpressionText + ')$').test(text);
67386
67459
  }
67387
- function getNumberType_createForOfIteratorHelperLoose(o, allowArrayLike) {
67388
- var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"];
67389
- if (it) return (it = it.call(o)).next.bind(it);
67390
- if (Array.isArray(o) || (it = getNumberType_unsupportedIterableToArray(o)) || allowArrayLike && o && "number" == typeof o.length) {
67391
- if (it) o = it;
67392
- var i = 0;
67460
+ function getNumberType_createForOfIteratorHelperLoose(r, e) {
67461
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
67462
+ if (t) return (t = t.call(r)).next.bind(t);
67463
+ if (Array.isArray(r) || (t = getNumberType_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
67464
+ t && (r = t);
67465
+ var o = 0;
67393
67466
  return function() {
67394
- if (i >= o.length) return {
67395
- done: true
67396
- };
67397
- return {
67398
- done: false,
67399
- value: o[i++]
67467
+ return o >= r.length ? {
67468
+ done: !0
67469
+ } : {
67470
+ done: !1,
67471
+ value: r[o++]
67400
67472
  };
67401
67473
  };
67402
67474
  }
67403
67475
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
67404
67476
  }
67405
- function getNumberType_unsupportedIterableToArray(o, minLen) {
67406
- if (!o) return;
67407
- if ("string" == typeof o) return getNumberType_arrayLikeToArray(o, minLen);
67408
- var n = Object.prototype.toString.call(o).slice(8, -1);
67409
- if ("Object" === n && o.constructor) n = o.constructor.name;
67410
- if ("Map" === n || "Set" === n) return Array.from(o);
67411
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return getNumberType_arrayLikeToArray(o, minLen);
67477
+ function getNumberType_unsupportedIterableToArray(r, a) {
67478
+ if (r) {
67479
+ if ("string" == typeof r) return getNumberType_arrayLikeToArray(r, a);
67480
+ var t = ({}).toString.call(r).slice(8, -1);
67481
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? getNumberType_arrayLikeToArray(r, a) : void 0;
67482
+ }
67412
67483
  }
67413
- function getNumberType_arrayLikeToArray(arr, len) {
67414
- if (null == len || len > arr.length) len = arr.length;
67415
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
67416
- return arr2;
67484
+ function getNumberType_arrayLikeToArray(r, a) {
67485
+ (null == a || a > r.length) && (a = r.length);
67486
+ for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
67487
+ return n;
67417
67488
  }
67418
67489
  var NON_FIXED_LINE_PHONE_TYPES = [
67419
67490
  'MOBILE',
@@ -67445,10 +67516,10 @@ and limitations under the License.
67445
67516
  }
67446
67517
  }
67447
67518
  function isNumberTypeEqualTo(nationalNumber, type, metadata) {
67448
- type = metadata.type(type);
67449
- if (!type || !type.pattern()) return false;
67450
- if (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) return false;
67451
- return matchesEntirely(nationalNumber, type.pattern());
67519
+ var typeDefinition = metadata.type(type);
67520
+ if (!typeDefinition || !typeDefinition.pattern()) return false;
67521
+ if (typeDefinition.possibleLengths() && typeDefinition.possibleLengths().indexOf(nationalNumber.length) < 0) return false;
67522
+ return matchesEntirely(nationalNumber, typeDefinition.pattern());
67452
67523
  }
67453
67524
  function isValidNumber(input, options, metadata) {
67454
67525
  options = options || {};
@@ -67520,14 +67591,75 @@ and limitations under the License.
67520
67591
  nationalNumber: number
67521
67592
  };
67522
67593
  }
67523
- function extractNationalNumber(number, metadata) {
67594
+ function getCountryByNationalNumber_createForOfIteratorHelperLoose(r, e) {
67595
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
67596
+ if (t) return (t = t.call(r)).next.bind(t);
67597
+ if (Array.isArray(r) || (t = getCountryByNationalNumber_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
67598
+ t && (r = t);
67599
+ var o = 0;
67600
+ return function() {
67601
+ return o >= r.length ? {
67602
+ done: !0
67603
+ } : {
67604
+ done: !1,
67605
+ value: r[o++]
67606
+ };
67607
+ };
67608
+ }
67609
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
67610
+ }
67611
+ function getCountryByNationalNumber_unsupportedIterableToArray(r, a) {
67612
+ if (r) {
67613
+ if ("string" == typeof r) return getCountryByNationalNumber_arrayLikeToArray(r, a);
67614
+ var t = ({}).toString.call(r).slice(8, -1);
67615
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? getCountryByNationalNumber_arrayLikeToArray(r, a) : void 0;
67616
+ }
67617
+ }
67618
+ function getCountryByNationalNumber_arrayLikeToArray(r, a) {
67619
+ (null == a || a > r.length) && (a = r.length);
67620
+ for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
67621
+ return n;
67622
+ }
67623
+ function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
67624
+ var countries = _ref.countries, metadata = _ref.metadata;
67625
+ metadata = new metadata_Metadata(metadata);
67626
+ for(var _iterator = getCountryByNationalNumber_createForOfIteratorHelperLoose(countries), _step; !(_step = _iterator()).done;){
67627
+ var country = _step.value;
67628
+ metadata.selectNumberingPlan(country);
67629
+ if (metadata.leadingDigits()) {
67630
+ if (nationalPhoneNumber && 0 === nationalPhoneNumber.search(metadata.leadingDigits())) return country;
67631
+ } else if (getNumberType({
67632
+ phone: nationalPhoneNumber,
67633
+ country: country
67634
+ }, void 0, metadata.metadata)) return country;
67635
+ }
67636
+ }
67637
+ var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;
67638
+ function getCountryByCallingCode(callingCode, _ref) {
67639
+ var nationalPhoneNumber = _ref.nationalNumber, metadata = _ref.metadata;
67640
+ if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {
67641
+ if (metadata.isNonGeographicCallingCode(callingCode)) return '001';
67642
+ }
67643
+ var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode);
67644
+ if (!possibleCountries) return;
67645
+ if (1 === possibleCountries.length) return possibleCountries[0];
67646
+ return getCountryByNationalNumber(nationalPhoneNumber, {
67647
+ countries: possibleCountries,
67648
+ metadata: metadata.metadata
67649
+ });
67650
+ }
67651
+ function extractNationalNumber(number, country, metadata) {
67524
67652
  var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(number, metadata), carrierCode = _extractNationalNumbe.carrierCode, nationalNumber = _extractNationalNumbe.nationalNumber;
67525
67653
  if (nationalNumber !== number) {
67526
67654
  if (!shouldHaveExtractedNationalPrefix(number, nationalNumber, metadata)) return {
67527
67655
  nationalNumber: number
67528
67656
  };
67529
- if (metadata.possibleLengths()) {
67530
- if (!isPossibleIncompleteNationalNumber(nationalNumber, metadata)) return {
67657
+ if (metadata.numberingPlan.possibleLengths()) {
67658
+ if (!country) country = getCountryByCallingCode(metadata.numberingPlan.callingCode(), {
67659
+ nationalNumber: nationalNumber,
67660
+ metadata: metadata
67661
+ });
67662
+ if (!isPossibleIncompleteNationalNumber(nationalNumber, country, metadata)) return {
67531
67663
  nationalNumber: number
67532
67664
  };
67533
67665
  }
@@ -67541,8 +67673,8 @@ and limitations under the License.
67541
67673
  if (matchesEntirely(nationalNumberBefore, metadata.nationalNumberPattern()) && !matchesEntirely(nationalNumberAfter, metadata.nationalNumberPattern())) return false;
67542
67674
  return true;
67543
67675
  }
67544
- function isPossibleIncompleteNationalNumber(nationalNumber, metadata) {
67545
- switch(checkNumberLength(nationalNumber, metadata)){
67676
+ function isPossibleIncompleteNationalNumber(nationalNumber, country, metadata) {
67677
+ switch(checkNumberLength(nationalNumber, country, metadata)){
67546
67678
  case 'TOO_SHORT':
67547
67679
  case 'INVALID_LENGTH':
67548
67680
  return false;
@@ -67550,15 +67682,15 @@ and limitations under the License.
67550
67682
  return true;
67551
67683
  }
67552
67684
  }
67553
- function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, callingCode, metadata) {
67554
- var countryCallingCode = country ? metadata_getCountryCallingCode(country, metadata) : callingCode;
67685
+ function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, defaultCountry, defaultCallingCode, metadata) {
67686
+ var countryCallingCode = country || defaultCountry ? metadata_getCountryCallingCode(country || defaultCountry, metadata) : defaultCallingCode;
67555
67687
  if (0 === number.indexOf(countryCallingCode)) {
67556
67688
  metadata = new metadata_Metadata(metadata);
67557
- metadata.selectNumberingPlan(country, callingCode);
67689
+ metadata.selectNumberingPlan(country || defaultCountry, countryCallingCode);
67558
67690
  var possibleShorterNumber = number.slice(countryCallingCode.length);
67559
- var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, metadata), possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber;
67560
- var _extractNationalNumbe2 = extractNationalNumber(number, metadata), nationalNumber = _extractNationalNumbe2.nationalNumber;
67561
- if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || 'TOO_LONG' === checkNumberLength(nationalNumber, metadata)) return {
67691
+ var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, country, metadata), possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber;
67692
+ var _extractNationalNumbe2 = extractNationalNumber(number, country, metadata), nationalNumber = _extractNationalNumbe2.nationalNumber;
67693
+ if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || 'TOO_LONG' === checkNumberLength(nationalNumber, country, metadata)) return {
67562
67694
  countryCallingCode: countryCallingCode,
67563
67695
  number: possibleShorterNumber
67564
67696
  };
@@ -67567,17 +67699,17 @@ and limitations under the License.
67567
67699
  number: number
67568
67700
  };
67569
67701
  }
67570
- function extractCountryCallingCode_extractCountryCallingCode(number, country, callingCode, metadata) {
67702
+ function extractCountryCallingCode_extractCountryCallingCode(number, country, defaultCountry, defaultCallingCode, metadata) {
67571
67703
  if (!number) return {};
67572
67704
  var isNumberWithIddPrefix;
67573
67705
  if ('+' !== number[0]) {
67574
- var numberWithoutIDD = stripIddPrefix(number, country, callingCode, metadata);
67706
+ var numberWithoutIDD = stripIddPrefix(number, country || defaultCountry, defaultCallingCode, metadata);
67575
67707
  if (numberWithoutIDD && numberWithoutIDD !== number) {
67576
67708
  isNumberWithIddPrefix = true;
67577
67709
  number = '+' + numberWithoutIDD;
67578
67710
  } else {
67579
- if (country || callingCode) {
67580
- var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, callingCode, metadata), countryCallingCode = _extractCountryCallin.countryCallingCode, shorterNumber = _extractCountryCallin.number;
67711
+ if (country || defaultCountry || defaultCallingCode) {
67712
+ var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, defaultCountry, defaultCallingCode, metadata), countryCallingCode = _extractCountryCallin.countryCallingCode, shorterNumber = _extractCountryCallin.number;
67581
67713
  if (countryCallingCode) return {
67582
67714
  countryCallingCodeSource: 'FROM_NUMBER_WITHOUT_PLUS_SIGN',
67583
67715
  countryCallingCode: countryCallingCode,
@@ -67630,79 +67762,17 @@ and limitations under the License.
67630
67762
  if ('+' !== number[0]) throw new Error("\"formatRFC3966()\" expects \"number\" to be in E.164 format.");
67631
67763
  return "tel:".concat(number).concat(ext ? ';ext=' + ext : '');
67632
67764
  }
67633
- function format_createForOfIteratorHelperLoose(o, allowArrayLike) {
67634
- var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"];
67635
- if (it) return (it = it.call(o)).next.bind(it);
67636
- if (Array.isArray(o) || (it = format_unsupportedIterableToArray(o)) || allowArrayLike && o && "number" == typeof o.length) {
67637
- if (it) o = it;
67638
- var i = 0;
67639
- return function() {
67640
- if (i >= o.length) return {
67641
- done: true
67642
- };
67643
- return {
67644
- done: false,
67645
- value: o[i++]
67646
- };
67647
- };
67648
- }
67649
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
67650
- }
67651
- function format_unsupportedIterableToArray(o, minLen) {
67652
- if (!o) return;
67653
- if ("string" == typeof o) return format_arrayLikeToArray(o, minLen);
67654
- var n = Object.prototype.toString.call(o).slice(8, -1);
67655
- if ("Object" === n && o.constructor) n = o.constructor.name;
67656
- if ("Map" === n || "Set" === n) return Array.from(o);
67657
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return format_arrayLikeToArray(o, minLen);
67658
- }
67659
- function format_arrayLikeToArray(arr, len) {
67660
- if (null == len || len > arr.length) len = arr.length;
67661
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
67662
- return arr2;
67663
- }
67664
- function ownKeys(object, enumerableOnly) {
67665
- var keys = Object.keys(object);
67666
- if (Object.getOwnPropertySymbols) {
67667
- var symbols = Object.getOwnPropertySymbols(object);
67668
- enumerableOnly && (symbols = symbols.filter(function(sym) {
67669
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
67670
- })), keys.push.apply(keys, symbols);
67671
- }
67672
- return keys;
67673
- }
67674
- function _objectSpread(target) {
67675
- for(var i = 1; i < arguments.length; i++){
67676
- var source = null != arguments[i] ? arguments[i] : {};
67677
- i % 2 ? ownKeys(Object(source), !0).forEach(function(key) {
67678
- _defineProperty(target, key, source[key]);
67679
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
67680
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
67681
- });
67682
- }
67683
- return target;
67684
- }
67685
- function _defineProperty(obj, key, value) {
67686
- if (key in obj) Object.defineProperty(obj, key, {
67687
- value: value,
67688
- enumerable: true,
67689
- configurable: true,
67690
- writable: true
67691
- });
67692
- else obj[key] = value;
67693
- return obj;
67694
- }
67695
67765
  var DEFAULT_OPTIONS = {
67696
67766
  formatExtension: function(formattedNumber, extension, metadata) {
67697
67767
  return "".concat(formattedNumber).concat(metadata.ext()).concat(extension);
67698
67768
  }
67699
67769
  };
67700
67770
  function formatNumber(input, format, options, metadata) {
67701
- options = options ? _objectSpread(_objectSpread({}, DEFAULT_OPTIONS), options) : DEFAULT_OPTIONS;
67771
+ options = options ? merge({}, DEFAULT_OPTIONS, options) : DEFAULT_OPTIONS;
67702
67772
  metadata = new metadata_Metadata(metadata);
67703
67773
  if (input.country && '001' !== input.country) {
67704
67774
  if (!metadata.hasCountry(input.country)) throw new Error("Unknown country: ".concat(input.country));
67705
- metadata.country(input.country);
67775
+ metadata.selectNumberingPlan(input.country);
67706
67776
  } else {
67707
67777
  if (!input.countryCallingCode) return input.phone || '';
67708
67778
  metadata.selectNumberingPlan(input.countryCallingCode);
@@ -67730,6 +67800,7 @@ and limitations under the License.
67730
67800
  case 'IDD':
67731
67801
  if (!options.fromCountry) return;
67732
67802
  var formattedNumber = formatIDD(nationalNumber, input.carrierCode, countryCallingCode, options.fromCountry, metadata);
67803
+ if (!formattedNumber) return;
67733
67804
  return addExtension(formattedNumber, input.ext, metadata, options.formatExtension);
67734
67805
  default:
67735
67806
  throw new Error("Unknown \"format\" argument passed to \"formatNumber()\": \"".concat(format, "\""));
@@ -67745,15 +67816,14 @@ and limitations under the License.
67745
67816
  metadata: metadata
67746
67817
  });
67747
67818
  }
67748
- function chooseFormatForNumber(availableFormats, nationalNnumber) {
67749
- for(var _iterator = format_createForOfIteratorHelperLoose(availableFormats), _step; !(_step = _iterator()).done;){
67750
- var format = _step.value;
67819
+ function chooseFormatForNumber(availableFormats, nationalNumber) {
67820
+ return pickFirstMatchingElement(availableFormats, function(format) {
67751
67821
  if (format.leadingDigitsPatterns().length > 0) {
67752
67822
  var lastLeadingDigitsPattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1];
67753
- if (0 !== nationalNnumber.search(lastLeadingDigitsPattern)) continue;
67823
+ if (0 !== nationalNumber.search(lastLeadingDigitsPattern)) return false;
67754
67824
  }
67755
- if (matchesEntirely(nationalNnumber, format.pattern())) return format;
67756
- }
67825
+ return matchesEntirely(nationalNumber, format.pattern());
67826
+ });
67757
67827
  }
67758
67828
  function addExtension(formattedNumber, ext, metadata, formatExtension) {
67759
67829
  return ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber;
@@ -67768,74 +67838,101 @@ and limitations under the License.
67768
67838
  var iddPrefix = getIddPrefix(fromCountry, void 0, metadata.metadata);
67769
67839
  if (iddPrefix) return "".concat(iddPrefix, " ").concat(countryCallingCode, " ").concat(formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata));
67770
67840
  }
67771
- function PhoneNumber_ownKeys(object, enumerableOnly) {
67772
- var keys = Object.keys(object);
67841
+ function merge() {
67842
+ var i = 1;
67843
+ for(var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++)objects[_key] = arguments[_key];
67844
+ while(i < objects.length){
67845
+ if (objects[i]) for(var key in objects[i])objects[0][key] = objects[i][key];
67846
+ i++;
67847
+ }
67848
+ return objects[0];
67849
+ }
67850
+ function pickFirstMatchingElement(elements, testFunction) {
67851
+ var i = 0;
67852
+ while(i < elements.length){
67853
+ if (testFunction(elements[i])) return elements[i];
67854
+ i++;
67855
+ }
67856
+ }
67857
+ function PhoneNumber_typeof(o) {
67858
+ return PhoneNumber_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
67859
+ return typeof o;
67860
+ } : function(o) {
67861
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
67862
+ }, PhoneNumber_typeof(o);
67863
+ }
67864
+ function ownKeys(e, r) {
67865
+ var t = Object.keys(e);
67773
67866
  if (Object.getOwnPropertySymbols) {
67774
- var symbols = Object.getOwnPropertySymbols(object);
67775
- enumerableOnly && (symbols = symbols.filter(function(sym) {
67776
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
67777
- })), keys.push.apply(keys, symbols);
67867
+ var o = Object.getOwnPropertySymbols(e);
67868
+ r && (o = o.filter(function(r) {
67869
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
67870
+ })), t.push.apply(t, o);
67778
67871
  }
67779
- return keys;
67872
+ return t;
67780
67873
  }
67781
- function PhoneNumber_objectSpread(target) {
67782
- for(var i = 1; i < arguments.length; i++){
67783
- var source = null != arguments[i] ? arguments[i] : {};
67784
- i % 2 ? PhoneNumber_ownKeys(Object(source), !0).forEach(function(key) {
67785
- PhoneNumber_defineProperty(target, key, source[key]);
67786
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : PhoneNumber_ownKeys(Object(source)).forEach(function(key) {
67787
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
67874
+ function _objectSpread(e) {
67875
+ for(var r = 1; r < arguments.length; r++){
67876
+ var t = null != arguments[r] ? arguments[r] : {};
67877
+ r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
67878
+ _defineProperty(e, r, t[r]);
67879
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
67880
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
67788
67881
  });
67789
67882
  }
67790
- return target;
67883
+ return e;
67791
67884
  }
67792
- function PhoneNumber_defineProperty(obj, key, value) {
67793
- if (key in obj) Object.defineProperty(obj, key, {
67794
- value: value,
67795
- enumerable: true,
67796
- configurable: true,
67797
- writable: true
67798
- });
67799
- else obj[key] = value;
67800
- return obj;
67885
+ function _defineProperty(e, r, t) {
67886
+ return (r = PhoneNumber_toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
67887
+ value: t,
67888
+ enumerable: !0,
67889
+ configurable: !0,
67890
+ writable: !0
67891
+ }) : e[r] = t, e;
67801
67892
  }
67802
- function PhoneNumber_classCallCheck(instance, Constructor) {
67803
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
67893
+ function PhoneNumber_classCallCheck(a, n) {
67894
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
67804
67895
  }
67805
- function PhoneNumber_defineProperties(target, props) {
67806
- for(var i = 0; i < props.length; i++){
67807
- var descriptor = props[i];
67808
- descriptor.enumerable = descriptor.enumerable || false;
67809
- descriptor.configurable = true;
67810
- if ("value" in descriptor) descriptor.writable = true;
67811
- Object.defineProperty(target, descriptor.key, descriptor);
67896
+ function PhoneNumber_defineProperties(e, r) {
67897
+ for(var t = 0; t < r.length; t++){
67898
+ var o = r[t];
67899
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, PhoneNumber_toPropertyKey(o.key), o);
67812
67900
  }
67813
67901
  }
67814
- function PhoneNumber_createClass(Constructor, protoProps, staticProps) {
67815
- if (protoProps) PhoneNumber_defineProperties(Constructor.prototype, protoProps);
67816
- if (staticProps) PhoneNumber_defineProperties(Constructor, staticProps);
67817
- Object.defineProperty(Constructor, "prototype", {
67818
- writable: false
67819
- });
67820
- return Constructor;
67902
+ function PhoneNumber_createClass(e, r, t) {
67903
+ return r && PhoneNumber_defineProperties(e.prototype, r), t && PhoneNumber_defineProperties(e, t), Object.defineProperty(e, "prototype", {
67904
+ writable: !1
67905
+ }), e;
67821
67906
  }
67822
- var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;
67907
+ function PhoneNumber_toPropertyKey(t) {
67908
+ var i = PhoneNumber_toPrimitive(t, "string");
67909
+ return "symbol" == PhoneNumber_typeof(i) ? i : i + "";
67910
+ }
67911
+ function PhoneNumber_toPrimitive(t, r) {
67912
+ if ("object" != PhoneNumber_typeof(t) || !t) return t;
67913
+ var e = t[Symbol.toPrimitive];
67914
+ if (void 0 !== e) {
67915
+ var i = e.call(t, r || "default");
67916
+ if ("object" != PhoneNumber_typeof(i)) return i;
67917
+ throw new TypeError("@@toPrimitive must return a primitive value.");
67918
+ }
67919
+ return ("string" === r ? String : Number)(t);
67920
+ }
67921
+ var PhoneNumber_USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;
67823
67922
  var PhoneNumber_PhoneNumber = /*#__PURE__*/ function() {
67824
67923
  function PhoneNumber(countryOrCountryCallingCode, nationalNumber, metadata) {
67825
67924
  PhoneNumber_classCallCheck(this, PhoneNumber);
67826
67925
  if (!countryOrCountryCallingCode) throw new TypeError('First argument is required');
67827
67926
  if ('string' != typeof countryOrCountryCallingCode) throw new TypeError('First argument must be a string');
67828
- if ('string' == typeof countryOrCountryCallingCode) {
67829
- if ('+' === countryOrCountryCallingCode[0] && !nationalNumber) throw new TypeError('`metadata` argument not passed');
67830
- if (isObject_isObject(nationalNumber) && isObject_isObject(nationalNumber.countries)) {
67831
- metadata = nationalNumber;
67832
- var e164Number = countryOrCountryCallingCode;
67833
- if (!E164_NUMBER_REGEXP.test(e164Number)) throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');
67834
- var _extractCountryCallin = extractCountryCallingCode_extractCountryCallingCode(e164Number, void 0, void 0, metadata), _countryCallingCode = _extractCountryCallin.countryCallingCode, number = _extractCountryCallin.number;
67835
- nationalNumber = number;
67836
- countryOrCountryCallingCode = _countryCallingCode;
67837
- if (!nationalNumber) throw new Error('Invalid `number` argument passed: too short');
67838
- }
67927
+ if ('+' === countryOrCountryCallingCode[0] && !nationalNumber) throw new TypeError('`metadata` argument not passed');
67928
+ if (isObject_isObject(nationalNumber) && isObject_isObject(nationalNumber.countries)) {
67929
+ metadata = nationalNumber;
67930
+ var e164Number = countryOrCountryCallingCode;
67931
+ if (!E164_NUMBER_REGEXP.test(e164Number)) throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');
67932
+ var _extractCountryCallin = extractCountryCallingCode_extractCountryCallingCode(e164Number, void 0, void 0, void 0, metadata), _countryCallingCode = _extractCountryCallin.countryCallingCode, number = _extractCountryCallin.number;
67933
+ nationalNumber = number;
67934
+ countryOrCountryCallingCode = _countryCallingCode;
67935
+ if (!nationalNumber) throw new Error('Invalid `number` argument passed: too short');
67839
67936
  }
67840
67937
  if (!nationalNumber) throw new TypeError('`nationalNumber` argument is required');
67841
67938
  if ('string' != typeof nationalNumber) throw new TypeError('`nationalNumber` argument must be a string');
@@ -67849,7 +67946,7 @@ and limitations under the License.
67849
67946
  return metadata;
67850
67947
  };
67851
67948
  }
67852
- PhoneNumber_createClass(PhoneNumber, [
67949
+ return PhoneNumber_createClass(PhoneNumber, [
67853
67950
  {
67854
67951
  key: "setExt",
67855
67952
  value: function(ext) {
@@ -67905,7 +68002,7 @@ and limitations under the License.
67905
68002
  {
67906
68003
  key: "format",
67907
68004
  value: function(_format, options) {
67908
- return formatNumber(this, _format, options ? PhoneNumber_objectSpread(PhoneNumber_objectSpread({}, options), {}, {
68005
+ return formatNumber(this, _format, options ? _objectSpread(_objectSpread({}, options), {}, {
67909
68006
  v2: true
67910
68007
  }) : {
67911
68008
  v2: true
@@ -67931,7 +68028,6 @@ and limitations under the License.
67931
68028
  }
67932
68029
  }
67933
68030
  ]);
67934
- return PhoneNumber;
67935
68031
  }();
67936
68032
  var PhoneNumber_isCountryCode = function(value) {
67937
68033
  return /^[A-Z]{2}$/.test(value);
@@ -67946,7 +68042,7 @@ and limitations under the License.
67946
68042
  countryCallingCode = metadata.countryCallingCode();
67947
68043
  } else {
67948
68044
  countryCallingCode = countryOrCountryCallingCode;
67949
- if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {
68045
+ if (PhoneNumber_USE_NON_GEOGRAPHIC_COUNTRY_CODE) {
67950
68046
  if (metadata.isNonGeographicCallingCode(countryCallingCode)) country = '001';
67951
68047
  }
67952
68048
  }
@@ -67956,66 +68052,6 @@ and limitations under the License.
67956
68052
  };
67957
68053
  }
67958
68054
  var E164_NUMBER_REGEXP = /^\+\d+$/;
67959
- function getCountryByNationalNumber_createForOfIteratorHelperLoose(o, allowArrayLike) {
67960
- var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"];
67961
- if (it) return (it = it.call(o)).next.bind(it);
67962
- if (Array.isArray(o) || (it = getCountryByNationalNumber_unsupportedIterableToArray(o)) || allowArrayLike && o && "number" == typeof o.length) {
67963
- if (it) o = it;
67964
- var i = 0;
67965
- return function() {
67966
- if (i >= o.length) return {
67967
- done: true
67968
- };
67969
- return {
67970
- done: false,
67971
- value: o[i++]
67972
- };
67973
- };
67974
- }
67975
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
67976
- }
67977
- function getCountryByNationalNumber_unsupportedIterableToArray(o, minLen) {
67978
- if (!o) return;
67979
- if ("string" == typeof o) return getCountryByNationalNumber_arrayLikeToArray(o, minLen);
67980
- var n = Object.prototype.toString.call(o).slice(8, -1);
67981
- if ("Object" === n && o.constructor) n = o.constructor.name;
67982
- if ("Map" === n || "Set" === n) return Array.from(o);
67983
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return getCountryByNationalNumber_arrayLikeToArray(o, minLen);
67984
- }
67985
- function getCountryByNationalNumber_arrayLikeToArray(arr, len) {
67986
- if (null == len || len > arr.length) len = arr.length;
67987
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
67988
- return arr2;
67989
- }
67990
- function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
67991
- var countries = _ref.countries, metadata = (_ref.defaultCountry, _ref.metadata);
67992
- metadata = new metadata_Metadata(metadata);
67993
- for(var _iterator = getCountryByNationalNumber_createForOfIteratorHelperLoose(countries), _step; !(_step = _iterator()).done;){
67994
- var country = _step.value;
67995
- metadata.country(country);
67996
- if (metadata.leadingDigits()) {
67997
- if (nationalPhoneNumber && 0 === nationalPhoneNumber.search(metadata.leadingDigits())) return country;
67998
- } else if (getNumberType({
67999
- phone: nationalPhoneNumber,
68000
- country: country
68001
- }, void 0, metadata.metadata)) return country;
68002
- }
68003
- }
68004
- var getCountryByCallingCode_USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;
68005
- function getCountryByCallingCode(callingCode, _ref) {
68006
- var nationalPhoneNumber = _ref.nationalNumber, defaultCountry = _ref.defaultCountry, metadata = _ref.metadata;
68007
- if (getCountryByCallingCode_USE_NON_GEOGRAPHIC_COUNTRY_CODE) {
68008
- if (metadata.isNonGeographicCallingCode(callingCode)) return '001';
68009
- }
68010
- var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode);
68011
- if (!possibleCountries) return;
68012
- if (1 === possibleCountries.length) return possibleCountries[0];
68013
- return getCountryByNationalNumber(nationalPhoneNumber, {
68014
- countries: possibleCountries,
68015
- defaultCountry: defaultCountry,
68016
- metadata: metadata.metadata
68017
- });
68018
- }
68019
68055
  var PLUS_SIGN = '+';
68020
68056
  var RFC3966_VISUAL_SEPARATOR_ = '[\\-\\.\\(\\)]?';
68021
68057
  var RFC3966_PHONE_DIGIT_ = "([" + VALID_DIGITS + "]|" + RFC3966_VISUAL_SEPARATOR_ + ')';
@@ -68110,7 +68146,7 @@ and limitations under the License.
68110
68146
  countryCallingCode: countryCallingCode,
68111
68147
  carrierCode: carrierCode,
68112
68148
  valid: valid,
68113
- possible: !!valid || !!(true === options.extended && metadata.possibleLengths() && isPossibleNumber(nationalNumber, metadata)) || false,
68149
+ possible: !!valid || !!(true === options.extended && metadata.possibleLengths() && isPossibleNumber(nationalNumber, country, metadata)) || false,
68114
68150
  phone: nationalNumber,
68115
68151
  ext: ext
68116
68152
  };
@@ -68154,7 +68190,7 @@ and limitations under the License.
68154
68190
  return result;
68155
68191
  }
68156
68192
  function parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {
68157
- var _extractCountryCallin = extractCountryCallingCode_extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), defaultCountry, defaultCallingCode, metadata.metadata), countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource, countryCallingCode = _extractCountryCallin.countryCallingCode, number = _extractCountryCallin.number;
68193
+ var _extractCountryCallin = extractCountryCallingCode_extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), void 0, defaultCountry, defaultCallingCode, metadata.metadata), countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource, countryCallingCode = _extractCountryCallin.countryCallingCode, number = _extractCountryCallin.number;
68158
68194
  var country;
68159
68195
  if (countryCallingCode) metadata.selectNumberingPlan(countryCallingCode);
68160
68196
  else {
@@ -68170,15 +68206,14 @@ and limitations under the License.
68170
68206
  countryCallingCodeSource: countryCallingCodeSource,
68171
68207
  countryCallingCode: countryCallingCode
68172
68208
  };
68173
- var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), metadata), nationalNumber = _extractNationalNumbe.nationalNumber, carrierCode = _extractNationalNumbe.carrierCode;
68209
+ var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), country, metadata), nationalNumber = _extractNationalNumbe.nationalNumber, carrierCode = _extractNationalNumbe.carrierCode;
68174
68210
  var exactCountry = getCountryByCallingCode(countryCallingCode, {
68175
68211
  nationalNumber: nationalNumber,
68176
- defaultCountry: defaultCountry,
68177
68212
  metadata: metadata
68178
68213
  });
68179
68214
  if (exactCountry) {
68180
68215
  country = exactCountry;
68181
- '001' === exactCountry || metadata.country(country);
68216
+ '001' === exactCountry || metadata.selectNumberingPlan(country);
68182
68217
  }
68183
68218
  return {
68184
68219
  country: country,
@@ -68188,118 +68223,152 @@ and limitations under the License.
68188
68223
  carrierCode: carrierCode
68189
68224
  };
68190
68225
  }
68191
- function parsePhoneNumberWithError_ownKeys(object, enumerableOnly) {
68192
- var keys = Object.keys(object);
68226
+ function parsePhoneNumberWithError_typeof(o) {
68227
+ return parsePhoneNumberWithError_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
68228
+ return typeof o;
68229
+ } : function(o) {
68230
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
68231
+ }, parsePhoneNumberWithError_typeof(o);
68232
+ }
68233
+ function parsePhoneNumberWithError_ownKeys(e, r) {
68234
+ var t = Object.keys(e);
68193
68235
  if (Object.getOwnPropertySymbols) {
68194
- var symbols = Object.getOwnPropertySymbols(object);
68195
- enumerableOnly && (symbols = symbols.filter(function(sym) {
68196
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
68197
- })), keys.push.apply(keys, symbols);
68236
+ var o = Object.getOwnPropertySymbols(e);
68237
+ r && (o = o.filter(function(r) {
68238
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
68239
+ })), t.push.apply(t, o);
68198
68240
  }
68199
- return keys;
68241
+ return t;
68200
68242
  }
68201
- function parsePhoneNumberWithError_objectSpread(target) {
68202
- for(var i = 1; i < arguments.length; i++){
68203
- var source = null != arguments[i] ? arguments[i] : {};
68204
- i % 2 ? parsePhoneNumberWithError_ownKeys(Object(source), !0).forEach(function(key) {
68205
- parsePhoneNumberWithError_defineProperty(target, key, source[key]);
68206
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : parsePhoneNumberWithError_ownKeys(Object(source)).forEach(function(key) {
68207
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
68243
+ function parsePhoneNumberWithError_objectSpread(e) {
68244
+ for(var r = 1; r < arguments.length; r++){
68245
+ var t = null != arguments[r] ? arguments[r] : {};
68246
+ r % 2 ? parsePhoneNumberWithError_ownKeys(Object(t), !0).forEach(function(r) {
68247
+ parsePhoneNumberWithError_defineProperty(e, r, t[r]);
68248
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : parsePhoneNumberWithError_ownKeys(Object(t)).forEach(function(r) {
68249
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
68208
68250
  });
68209
68251
  }
68210
- return target;
68252
+ return e;
68211
68253
  }
68212
- function parsePhoneNumberWithError_defineProperty(obj, key, value) {
68213
- if (key in obj) Object.defineProperty(obj, key, {
68214
- value: value,
68215
- enumerable: true,
68216
- configurable: true,
68217
- writable: true
68218
- });
68219
- else obj[key] = value;
68220
- return obj;
68254
+ function parsePhoneNumberWithError_defineProperty(e, r, t) {
68255
+ return (r = parsePhoneNumberWithError_toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
68256
+ value: t,
68257
+ enumerable: !0,
68258
+ configurable: !0,
68259
+ writable: !0
68260
+ }) : e[r] = t, e;
68261
+ }
68262
+ function parsePhoneNumberWithError_toPropertyKey(t) {
68263
+ var i = parsePhoneNumberWithError_toPrimitive(t, "string");
68264
+ return "symbol" == parsePhoneNumberWithError_typeof(i) ? i : i + "";
68265
+ }
68266
+ function parsePhoneNumberWithError_toPrimitive(t, r) {
68267
+ if ("object" != parsePhoneNumberWithError_typeof(t) || !t) return t;
68268
+ var e = t[Symbol.toPrimitive];
68269
+ if (void 0 !== e) {
68270
+ var i = e.call(t, r || "default");
68271
+ if ("object" != parsePhoneNumberWithError_typeof(i)) return i;
68272
+ throw new TypeError("@@toPrimitive must return a primitive value.");
68273
+ }
68274
+ return ("string" === r ? String : Number)(t);
68221
68275
  }
68222
68276
  function parsePhoneNumberWithError(text, options, metadata) {
68223
68277
  return parse_parse(text, parsePhoneNumberWithError_objectSpread(parsePhoneNumberWithError_objectSpread({}, options), {}, {
68224
68278
  v2: true
68225
68279
  }), metadata);
68226
68280
  }
68227
- function normalizeArguments_ownKeys(object, enumerableOnly) {
68228
- var keys = Object.keys(object);
68281
+ function normalizeArguments_typeof(o) {
68282
+ return normalizeArguments_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
68283
+ return typeof o;
68284
+ } : function(o) {
68285
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
68286
+ }, normalizeArguments_typeof(o);
68287
+ }
68288
+ function normalizeArguments_ownKeys(e, r) {
68289
+ var t = Object.keys(e);
68229
68290
  if (Object.getOwnPropertySymbols) {
68230
- var symbols = Object.getOwnPropertySymbols(object);
68231
- enumerableOnly && (symbols = symbols.filter(function(sym) {
68232
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
68233
- })), keys.push.apply(keys, symbols);
68291
+ var o = Object.getOwnPropertySymbols(e);
68292
+ r && (o = o.filter(function(r) {
68293
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
68294
+ })), t.push.apply(t, o);
68234
68295
  }
68235
- return keys;
68296
+ return t;
68236
68297
  }
68237
- function normalizeArguments_objectSpread(target) {
68238
- for(var i = 1; i < arguments.length; i++){
68239
- var source = null != arguments[i] ? arguments[i] : {};
68240
- i % 2 ? normalizeArguments_ownKeys(Object(source), !0).forEach(function(key) {
68241
- normalizeArguments_defineProperty(target, key, source[key]);
68242
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : normalizeArguments_ownKeys(Object(source)).forEach(function(key) {
68243
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
68298
+ function normalizeArguments_objectSpread(e) {
68299
+ for(var r = 1; r < arguments.length; r++){
68300
+ var t = null != arguments[r] ? arguments[r] : {};
68301
+ r % 2 ? normalizeArguments_ownKeys(Object(t), !0).forEach(function(r) {
68302
+ normalizeArguments_defineProperty(e, r, t[r]);
68303
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : normalizeArguments_ownKeys(Object(t)).forEach(function(r) {
68304
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
68244
68305
  });
68245
68306
  }
68246
- return target;
68307
+ return e;
68247
68308
  }
68248
- function normalizeArguments_defineProperty(obj, key, value) {
68249
- if (key in obj) Object.defineProperty(obj, key, {
68250
- value: value,
68251
- enumerable: true,
68252
- configurable: true,
68253
- writable: true
68254
- });
68255
- else obj[key] = value;
68256
- return obj;
68309
+ function normalizeArguments_defineProperty(e, r, t) {
68310
+ return (r = normalizeArguments_toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
68311
+ value: t,
68312
+ enumerable: !0,
68313
+ configurable: !0,
68314
+ writable: !0
68315
+ }) : e[r] = t, e;
68316
+ }
68317
+ function normalizeArguments_toPropertyKey(t) {
68318
+ var i = normalizeArguments_toPrimitive(t, "string");
68319
+ return "symbol" == normalizeArguments_typeof(i) ? i : i + "";
68320
+ }
68321
+ function normalizeArguments_toPrimitive(t, r) {
68322
+ if ("object" != normalizeArguments_typeof(t) || !t) return t;
68323
+ var e = t[Symbol.toPrimitive];
68324
+ if (void 0 !== e) {
68325
+ var i = e.call(t, r || "default");
68326
+ if ("object" != normalizeArguments_typeof(i)) return i;
68327
+ throw new TypeError("@@toPrimitive must return a primitive value.");
68328
+ }
68329
+ return ("string" === r ? String : Number)(t);
68257
68330
  }
68258
- function normalizeArguments_slicedToArray(arr, i) {
68259
- return normalizeArguments_arrayWithHoles(arr) || normalizeArguments_iterableToArrayLimit(arr, i) || normalizeArguments_unsupportedIterableToArray(arr, i) || normalizeArguments_nonIterableRest();
68331
+ function normalizeArguments_slicedToArray(r, e) {
68332
+ return normalizeArguments_arrayWithHoles(r) || normalizeArguments_iterableToArrayLimit(r, e) || normalizeArguments_unsupportedIterableToArray(r, e) || normalizeArguments_nonIterableRest();
68260
68333
  }
68261
68334
  function normalizeArguments_nonIterableRest() {
68262
68335
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
68263
68336
  }
68264
- function normalizeArguments_unsupportedIterableToArray(o, minLen) {
68265
- if (!o) return;
68266
- if ("string" == typeof o) return normalizeArguments_arrayLikeToArray(o, minLen);
68267
- var n = Object.prototype.toString.call(o).slice(8, -1);
68268
- if ("Object" === n && o.constructor) n = o.constructor.name;
68269
- if ("Map" === n || "Set" === n) return Array.from(o);
68270
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return normalizeArguments_arrayLikeToArray(o, minLen);
68337
+ function normalizeArguments_unsupportedIterableToArray(r, a) {
68338
+ if (r) {
68339
+ if ("string" == typeof r) return normalizeArguments_arrayLikeToArray(r, a);
68340
+ var t = ({}).toString.call(r).slice(8, -1);
68341
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? normalizeArguments_arrayLikeToArray(r, a) : void 0;
68342
+ }
68271
68343
  }
68272
- function normalizeArguments_arrayLikeToArray(arr, len) {
68273
- if (null == len || len > arr.length) len = arr.length;
68274
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
68275
- return arr2;
68344
+ function normalizeArguments_arrayLikeToArray(r, a) {
68345
+ (null == a || a > r.length) && (a = r.length);
68346
+ for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
68347
+ return n;
68276
68348
  }
68277
- function normalizeArguments_iterableToArrayLimit(arr, i) {
68278
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
68279
- if (null == _i) return;
68280
- var _arr = [];
68281
- var _n = true;
68282
- var _d = false;
68283
- var _s, _e;
68284
- try {
68285
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
68286
- _arr.push(_s.value);
68287
- if (i && _arr.length === i) break;
68288
- }
68289
- } catch (err) {
68290
- _d = true;
68291
- _e = err;
68292
- } finally{
68349
+ function normalizeArguments_iterableToArrayLimit(r, l) {
68350
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
68351
+ if (null != t) {
68352
+ var e, n, i, u, a = [], f = !0, o = !1;
68293
68353
  try {
68294
- if (!_n && null != _i["return"]) _i["return"]();
68354
+ if (i = (t = t.call(r)).next, 0 === l) {
68355
+ if (Object(t) !== t) return;
68356
+ f = !1;
68357
+ } else for(; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
68358
+ } catch (r) {
68359
+ o = !0, n = r;
68295
68360
  } finally{
68296
- if (_d) throw _e;
68361
+ try {
68362
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
68363
+ } finally{
68364
+ if (o) throw n;
68365
+ }
68297
68366
  }
68367
+ return a;
68298
68368
  }
68299
- return _arr;
68300
68369
  }
68301
- function normalizeArguments_arrayWithHoles(arr) {
68302
- if (Array.isArray(arr)) return arr;
68370
+ function normalizeArguments_arrayWithHoles(r) {
68371
+ if (Array.isArray(r)) return r;
68303
68372
  }
68304
68373
  function normalizeArguments(args) {
68305
68374
  var _Array$prototype$slic = Array.prototype.slice.call(args), _Array$prototype$slic2 = normalizeArguments_slicedToArray(_Array$prototype$slic, 4), arg_1 = _Array$prototype$slic2[0], arg_2 = _Array$prototype$slic2[1], arg_3 = _Array$prototype$slic2[2], arg_4 = _Array$prototype$slic2[3];
@@ -68340,25 +68409,40 @@ and limitations under the License.
68340
68409
  function exports_parsePhoneNumberWithError_parsePhoneNumberWithError() {
68341
68410
  return withMetadataArgument(parsePhoneNumberWithError_parsePhoneNumberWithError, arguments);
68342
68411
  }
68343
- function AsYouTypeState_classCallCheck(instance, Constructor) {
68344
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
68412
+ function AsYouTypeState_typeof(o) {
68413
+ return AsYouTypeState_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
68414
+ return typeof o;
68415
+ } : function(o) {
68416
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
68417
+ }, AsYouTypeState_typeof(o);
68418
+ }
68419
+ function AsYouTypeState_classCallCheck(a, n) {
68420
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
68345
68421
  }
68346
- function AsYouTypeState_defineProperties(target, props) {
68347
- for(var i = 0; i < props.length; i++){
68348
- var descriptor = props[i];
68349
- descriptor.enumerable = descriptor.enumerable || false;
68350
- descriptor.configurable = true;
68351
- if ("value" in descriptor) descriptor.writable = true;
68352
- Object.defineProperty(target, descriptor.key, descriptor);
68422
+ function AsYouTypeState_defineProperties(e, r) {
68423
+ for(var t = 0; t < r.length; t++){
68424
+ var o = r[t];
68425
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, AsYouTypeState_toPropertyKey(o.key), o);
68353
68426
  }
68354
68427
  }
68355
- function AsYouTypeState_createClass(Constructor, protoProps, staticProps) {
68356
- if (protoProps) AsYouTypeState_defineProperties(Constructor.prototype, protoProps);
68357
- if (staticProps) AsYouTypeState_defineProperties(Constructor, staticProps);
68358
- Object.defineProperty(Constructor, "prototype", {
68359
- writable: false
68360
- });
68361
- return Constructor;
68428
+ function AsYouTypeState_createClass(e, r, t) {
68429
+ return r && AsYouTypeState_defineProperties(e.prototype, r), t && AsYouTypeState_defineProperties(e, t), Object.defineProperty(e, "prototype", {
68430
+ writable: !1
68431
+ }), e;
68432
+ }
68433
+ function AsYouTypeState_toPropertyKey(t) {
68434
+ var i = AsYouTypeState_toPrimitive(t, "string");
68435
+ return "symbol" == AsYouTypeState_typeof(i) ? i : i + "";
68436
+ }
68437
+ function AsYouTypeState_toPrimitive(t, r) {
68438
+ if ("object" != AsYouTypeState_typeof(t) || !t) return t;
68439
+ var e = t[Symbol.toPrimitive];
68440
+ if (void 0 !== e) {
68441
+ var i = e.call(t, r || "default");
68442
+ if ("object" != AsYouTypeState_typeof(i)) return i;
68443
+ throw new TypeError("@@toPrimitive must return a primitive value.");
68444
+ }
68445
+ return ("string" === r ? String : Number)(t);
68362
68446
  }
68363
68447
  var AsYouTypeState_AsYouTypeState = /*#__PURE__*/ function() {
68364
68448
  function AsYouTypeState(_ref) {
@@ -68367,7 +68451,7 @@ and limitations under the License.
68367
68451
  this.onCountryChange = onCountryChange;
68368
68452
  this.onCallingCodeChange = onCallingCodeChange;
68369
68453
  }
68370
- AsYouTypeState_createClass(AsYouTypeState, [
68454
+ return AsYouTypeState_createClass(AsYouTypeState, [
68371
68455
  {
68372
68456
  key: "reset",
68373
68457
  value: function(_ref2) {
@@ -68385,10 +68469,10 @@ and limitations under the License.
68385
68469
  key: "resetNationalSignificantNumber",
68386
68470
  value: function() {
68387
68471
  this.nationalSignificantNumber = this.getNationalDigits();
68388
- this.nationalSignificantNumberMatchesInput = true;
68472
+ this.nationalSignificantNumberIsModified = false;
68389
68473
  this.nationalPrefix = void 0;
68390
68474
  this.carrierCode = void 0;
68391
- this.complexPrefixBeforeNationalSignificantNumber = void 0;
68475
+ this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = void 0;
68392
68476
  }
68393
68477
  },
68394
68478
  {
@@ -68457,38 +68541,35 @@ and limitations under the License.
68457
68541
  }
68458
68542
  }
68459
68543
  ]);
68460
- return AsYouTypeState;
68461
68544
  }();
68462
- function AsYouTypeFormatter_util_createForOfIteratorHelperLoose(o, allowArrayLike) {
68463
- var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"];
68464
- if (it) return (it = it.call(o)).next.bind(it);
68465
- if (Array.isArray(o) || (it = AsYouTypeFormatter_util_unsupportedIterableToArray(o)) || allowArrayLike && o && "number" == typeof o.length) {
68466
- if (it) o = it;
68467
- var i = 0;
68545
+ function AsYouTypeFormatter_util_createForOfIteratorHelperLoose(r, e) {
68546
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
68547
+ if (t) return (t = t.call(r)).next.bind(t);
68548
+ if (Array.isArray(r) || (t = AsYouTypeFormatter_util_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
68549
+ t && (r = t);
68550
+ var o = 0;
68468
68551
  return function() {
68469
- if (i >= o.length) return {
68470
- done: true
68471
- };
68472
- return {
68473
- done: false,
68474
- value: o[i++]
68552
+ return o >= r.length ? {
68553
+ done: !0
68554
+ } : {
68555
+ done: !1,
68556
+ value: r[o++]
68475
68557
  };
68476
68558
  };
68477
68559
  }
68478
68560
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
68479
68561
  }
68480
- function AsYouTypeFormatter_util_unsupportedIterableToArray(o, minLen) {
68481
- if (!o) return;
68482
- if ("string" == typeof o) return AsYouTypeFormatter_util_arrayLikeToArray(o, minLen);
68483
- var n = Object.prototype.toString.call(o).slice(8, -1);
68484
- if ("Object" === n && o.constructor) n = o.constructor.name;
68485
- if ("Map" === n || "Set" === n) return Array.from(o);
68486
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return AsYouTypeFormatter_util_arrayLikeToArray(o, minLen);
68562
+ function AsYouTypeFormatter_util_unsupportedIterableToArray(r, a) {
68563
+ if (r) {
68564
+ if ("string" == typeof r) return AsYouTypeFormatter_util_arrayLikeToArray(r, a);
68565
+ var t = ({}).toString.call(r).slice(8, -1);
68566
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? AsYouTypeFormatter_util_arrayLikeToArray(r, a) : void 0;
68567
+ }
68487
68568
  }
68488
- function AsYouTypeFormatter_util_arrayLikeToArray(arr, len) {
68489
- if (null == len || len > arr.length) len = arr.length;
68490
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
68491
- return arr2;
68569
+ function AsYouTypeFormatter_util_arrayLikeToArray(r, a) {
68570
+ (null == a || a > r.length) && (a = r.length);
68571
+ for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
68572
+ return n;
68492
68573
  }
68493
68574
  var DIGIT_PLACEHOLDER = 'x';
68494
68575
  var DIGIT_PLACEHOLDER_MATCHER = new RegExp(DIGIT_PLACEHOLDER);
@@ -68545,8 +68626,8 @@ and limitations under the License.
68545
68626
  getSeparatorAfterNationalPrefix: getSeparatorAfterNationalPrefix
68546
68627
  });
68547
68628
  }
68548
- function canFormatCompleteNumber(nationalSignificantNumber, metadata) {
68549
- return 'IS_POSSIBLE' === checkNumberLength(nationalSignificantNumber, metadata);
68629
+ function canFormatCompleteNumber(nationalSignificantNumber, country, metadata) {
68630
+ return 'IS_POSSIBLE' === checkNumberLength(nationalSignificantNumber, country, metadata);
68550
68631
  }
68551
68632
  function formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, _ref2) {
68552
68633
  var metadata = _ref2.metadata, shouldTryNationalPrefixFormattingRule = _ref2.shouldTryNationalPrefixFormattingRule, getSeparatorAfterNationalPrefix = _ref2.getSeparatorAfterNationalPrefix;
@@ -68575,38 +68656,53 @@ and limitations under the License.
68575
68656
  });
68576
68657
  if (!useNationalPrefixFormattingRule) {
68577
68658
  if (state.nationalPrefix) formattedNationalNumber = state.nationalPrefix + getSeparatorAfterNationalPrefix(format) + formattedNationalNumber;
68578
- else if (state.complexPrefixBeforeNationalSignificantNumber) formattedNationalNumber = state.complexPrefixBeforeNationalSignificantNumber + ' ' + formattedNationalNumber;
68659
+ else if (state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix) formattedNationalNumber = state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix + ' ' + formattedNationalNumber;
68579
68660
  }
68580
68661
  if (isValidFormattedNationalNumber(formattedNationalNumber, state)) return formattedNationalNumber;
68581
68662
  }
68582
68663
  function isValidFormattedNationalNumber(formattedNationalNumber, state) {
68583
68664
  return parseDigits(formattedNationalNumber) === state.getNationalDigits();
68584
68665
  }
68585
- function AsYouTypeFormatter_PatternParser_classCallCheck(instance, Constructor) {
68586
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
68666
+ function AsYouTypeFormatter_PatternParser_typeof(o) {
68667
+ return AsYouTypeFormatter_PatternParser_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
68668
+ return typeof o;
68669
+ } : function(o) {
68670
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
68671
+ }, AsYouTypeFormatter_PatternParser_typeof(o);
68587
68672
  }
68588
- function AsYouTypeFormatter_PatternParser_defineProperties(target, props) {
68589
- for(var i = 0; i < props.length; i++){
68590
- var descriptor = props[i];
68591
- descriptor.enumerable = descriptor.enumerable || false;
68592
- descriptor.configurable = true;
68593
- if ("value" in descriptor) descriptor.writable = true;
68594
- Object.defineProperty(target, descriptor.key, descriptor);
68673
+ function AsYouTypeFormatter_PatternParser_classCallCheck(a, n) {
68674
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
68675
+ }
68676
+ function AsYouTypeFormatter_PatternParser_defineProperties(e, r) {
68677
+ for(var t = 0; t < r.length; t++){
68678
+ var o = r[t];
68679
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, AsYouTypeFormatter_PatternParser_toPropertyKey(o.key), o);
68595
68680
  }
68596
68681
  }
68597
- function AsYouTypeFormatter_PatternParser_createClass(Constructor, protoProps, staticProps) {
68598
- if (protoProps) AsYouTypeFormatter_PatternParser_defineProperties(Constructor.prototype, protoProps);
68599
- if (staticProps) AsYouTypeFormatter_PatternParser_defineProperties(Constructor, staticProps);
68600
- Object.defineProperty(Constructor, "prototype", {
68601
- writable: false
68602
- });
68603
- return Constructor;
68682
+ function AsYouTypeFormatter_PatternParser_createClass(e, r, t) {
68683
+ return r && AsYouTypeFormatter_PatternParser_defineProperties(e.prototype, r), t && AsYouTypeFormatter_PatternParser_defineProperties(e, t), Object.defineProperty(e, "prototype", {
68684
+ writable: !1
68685
+ }), e;
68686
+ }
68687
+ function AsYouTypeFormatter_PatternParser_toPropertyKey(t) {
68688
+ var i = AsYouTypeFormatter_PatternParser_toPrimitive(t, "string");
68689
+ return "symbol" == AsYouTypeFormatter_PatternParser_typeof(i) ? i : i + "";
68690
+ }
68691
+ function AsYouTypeFormatter_PatternParser_toPrimitive(t, r) {
68692
+ if ("object" != AsYouTypeFormatter_PatternParser_typeof(t) || !t) return t;
68693
+ var e = t[Symbol.toPrimitive];
68694
+ if (void 0 !== e) {
68695
+ var i = e.call(t, r || "default");
68696
+ if ("object" != AsYouTypeFormatter_PatternParser_typeof(i)) return i;
68697
+ throw new TypeError("@@toPrimitive must return a primitive value.");
68698
+ }
68699
+ return ("string" === r ? String : Number)(t);
68604
68700
  }
68605
68701
  var AsYouTypeFormatter_PatternParser_PatternParser = /*#__PURE__*/ function() {
68606
68702
  function PatternParser() {
68607
68703
  AsYouTypeFormatter_PatternParser_classCallCheck(this, PatternParser);
68608
68704
  }
68609
- AsYouTypeFormatter_PatternParser_createClass(PatternParser, [
68705
+ return AsYouTypeFormatter_PatternParser_createClass(PatternParser, [
68610
68706
  {
68611
68707
  key: "parse",
68612
68708
  value: function(pattern) {
@@ -68713,7 +68809,6 @@ and limitations under the License.
68713
68809
  }
68714
68810
  }
68715
68811
  ]);
68716
- return PatternParser;
68717
68812
  }();
68718
68813
  function parseOneOfSet(pattern) {
68719
68814
  var values = [];
@@ -68739,63 +68834,76 @@ and limitations under the License.
68739
68834
  if (1 === array.length) return array[0];
68740
68835
  return array;
68741
68836
  }
68742
- function AsYouTypeFormatter_PatternMatcher_createForOfIteratorHelperLoose(o, allowArrayLike) {
68743
- var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"];
68744
- if (it) return (it = it.call(o)).next.bind(it);
68745
- if (Array.isArray(o) || (it = AsYouTypeFormatter_PatternMatcher_unsupportedIterableToArray(o)) || allowArrayLike && o && "number" == typeof o.length) {
68746
- if (it) o = it;
68747
- var i = 0;
68837
+ function AsYouTypeFormatter_PatternMatcher_createForOfIteratorHelperLoose(r, e) {
68838
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
68839
+ if (t) return (t = t.call(r)).next.bind(t);
68840
+ if (Array.isArray(r) || (t = AsYouTypeFormatter_PatternMatcher_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
68841
+ t && (r = t);
68842
+ var o = 0;
68748
68843
  return function() {
68749
- if (i >= o.length) return {
68750
- done: true
68751
- };
68752
- return {
68753
- done: false,
68754
- value: o[i++]
68844
+ return o >= r.length ? {
68845
+ done: !0
68846
+ } : {
68847
+ done: !1,
68848
+ value: r[o++]
68755
68849
  };
68756
68850
  };
68757
68851
  }
68758
68852
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
68759
68853
  }
68760
- function AsYouTypeFormatter_PatternMatcher_unsupportedIterableToArray(o, minLen) {
68761
- if (!o) return;
68762
- if ("string" == typeof o) return AsYouTypeFormatter_PatternMatcher_arrayLikeToArray(o, minLen);
68763
- var n = Object.prototype.toString.call(o).slice(8, -1);
68764
- if ("Object" === n && o.constructor) n = o.constructor.name;
68765
- if ("Map" === n || "Set" === n) return Array.from(o);
68766
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return AsYouTypeFormatter_PatternMatcher_arrayLikeToArray(o, minLen);
68854
+ function AsYouTypeFormatter_PatternMatcher_unsupportedIterableToArray(r, a) {
68855
+ if (r) {
68856
+ if ("string" == typeof r) return AsYouTypeFormatter_PatternMatcher_arrayLikeToArray(r, a);
68857
+ var t = ({}).toString.call(r).slice(8, -1);
68858
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? AsYouTypeFormatter_PatternMatcher_arrayLikeToArray(r, a) : void 0;
68859
+ }
68860
+ }
68861
+ function AsYouTypeFormatter_PatternMatcher_arrayLikeToArray(r, a) {
68862
+ (null == a || a > r.length) && (a = r.length);
68863
+ for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
68864
+ return n;
68767
68865
  }
68768
- function AsYouTypeFormatter_PatternMatcher_arrayLikeToArray(arr, len) {
68769
- if (null == len || len > arr.length) len = arr.length;
68770
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
68771
- return arr2;
68866
+ function AsYouTypeFormatter_PatternMatcher_typeof(o) {
68867
+ return AsYouTypeFormatter_PatternMatcher_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
68868
+ return typeof o;
68869
+ } : function(o) {
68870
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
68871
+ }, AsYouTypeFormatter_PatternMatcher_typeof(o);
68772
68872
  }
68773
- function AsYouTypeFormatter_PatternMatcher_classCallCheck(instance, Constructor) {
68774
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
68873
+ function AsYouTypeFormatter_PatternMatcher_classCallCheck(a, n) {
68874
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
68775
68875
  }
68776
- function AsYouTypeFormatter_PatternMatcher_defineProperties(target, props) {
68777
- for(var i = 0; i < props.length; i++){
68778
- var descriptor = props[i];
68779
- descriptor.enumerable = descriptor.enumerable || false;
68780
- descriptor.configurable = true;
68781
- if ("value" in descriptor) descriptor.writable = true;
68782
- Object.defineProperty(target, descriptor.key, descriptor);
68876
+ function AsYouTypeFormatter_PatternMatcher_defineProperties(e, r) {
68877
+ for(var t = 0; t < r.length; t++){
68878
+ var o = r[t];
68879
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, AsYouTypeFormatter_PatternMatcher_toPropertyKey(o.key), o);
68783
68880
  }
68784
68881
  }
68785
- function AsYouTypeFormatter_PatternMatcher_createClass(Constructor, protoProps, staticProps) {
68786
- if (protoProps) AsYouTypeFormatter_PatternMatcher_defineProperties(Constructor.prototype, protoProps);
68787
- if (staticProps) AsYouTypeFormatter_PatternMatcher_defineProperties(Constructor, staticProps);
68788
- Object.defineProperty(Constructor, "prototype", {
68789
- writable: false
68790
- });
68791
- return Constructor;
68882
+ function AsYouTypeFormatter_PatternMatcher_createClass(e, r, t) {
68883
+ return r && AsYouTypeFormatter_PatternMatcher_defineProperties(e.prototype, r), t && AsYouTypeFormatter_PatternMatcher_defineProperties(e, t), Object.defineProperty(e, "prototype", {
68884
+ writable: !1
68885
+ }), e;
68886
+ }
68887
+ function AsYouTypeFormatter_PatternMatcher_toPropertyKey(t) {
68888
+ var i = AsYouTypeFormatter_PatternMatcher_toPrimitive(t, "string");
68889
+ return "symbol" == AsYouTypeFormatter_PatternMatcher_typeof(i) ? i : i + "";
68890
+ }
68891
+ function AsYouTypeFormatter_PatternMatcher_toPrimitive(t, r) {
68892
+ if ("object" != AsYouTypeFormatter_PatternMatcher_typeof(t) || !t) return t;
68893
+ var e = t[Symbol.toPrimitive];
68894
+ if (void 0 !== e) {
68895
+ var i = e.call(t, r || "default");
68896
+ if ("object" != AsYouTypeFormatter_PatternMatcher_typeof(i)) return i;
68897
+ throw new TypeError("@@toPrimitive must return a primitive value.");
68898
+ }
68899
+ return ("string" === r ? String : Number)(t);
68792
68900
  }
68793
68901
  var AsYouTypeFormatter_PatternMatcher_PatternMatcher = /*#__PURE__*/ function() {
68794
68902
  function PatternMatcher(pattern) {
68795
68903
  AsYouTypeFormatter_PatternMatcher_classCallCheck(this, PatternMatcher);
68796
68904
  this.matchTree = new AsYouTypeFormatter_PatternParser_PatternParser().parse(pattern);
68797
68905
  }
68798
- AsYouTypeFormatter_PatternMatcher_createClass(PatternMatcher, [
68906
+ return AsYouTypeFormatter_PatternMatcher_createClass(PatternMatcher, [
68799
68907
  {
68800
68908
  key: "match",
68801
68909
  value: function(string) {
@@ -68810,7 +68918,6 @@ and limitations under the License.
68810
68918
  }
68811
68919
  }
68812
68920
  ]);
68813
- return PatternMatcher;
68814
68921
  }();
68815
68922
  function _match(characters, tree, last) {
68816
68923
  if ('string' == typeof tree) {
@@ -68916,56 +69023,69 @@ and limitations under the License.
68916
69023
  throw new Error("Unsupported instruction tree: ".concat(tree));
68917
69024
  }
68918
69025
  }
68919
- function AsYouTypeFormatter_createForOfIteratorHelperLoose(o, allowArrayLike) {
68920
- var it = "undefined" != typeof Symbol && o[Symbol.iterator] || o["@@iterator"];
68921
- if (it) return (it = it.call(o)).next.bind(it);
68922
- if (Array.isArray(o) || (it = AsYouTypeFormatter_unsupportedIterableToArray(o)) || allowArrayLike && o && "number" == typeof o.length) {
68923
- if (it) o = it;
68924
- var i = 0;
69026
+ function AsYouTypeFormatter_typeof(o) {
69027
+ return AsYouTypeFormatter_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
69028
+ return typeof o;
69029
+ } : function(o) {
69030
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
69031
+ }, AsYouTypeFormatter_typeof(o);
69032
+ }
69033
+ function AsYouTypeFormatter_createForOfIteratorHelperLoose(r, e) {
69034
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
69035
+ if (t) return (t = t.call(r)).next.bind(t);
69036
+ if (Array.isArray(r) || (t = AsYouTypeFormatter_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
69037
+ t && (r = t);
69038
+ var o = 0;
68925
69039
  return function() {
68926
- if (i >= o.length) return {
68927
- done: true
68928
- };
68929
- return {
68930
- done: false,
68931
- value: o[i++]
69040
+ return o >= r.length ? {
69041
+ done: !0
69042
+ } : {
69043
+ done: !1,
69044
+ value: r[o++]
68932
69045
  };
68933
69046
  };
68934
69047
  }
68935
69048
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
68936
69049
  }
68937
- function AsYouTypeFormatter_unsupportedIterableToArray(o, minLen) {
68938
- if (!o) return;
68939
- if ("string" == typeof o) return AsYouTypeFormatter_arrayLikeToArray(o, minLen);
68940
- var n = Object.prototype.toString.call(o).slice(8, -1);
68941
- if ("Object" === n && o.constructor) n = o.constructor.name;
68942
- if ("Map" === n || "Set" === n) return Array.from(o);
68943
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return AsYouTypeFormatter_arrayLikeToArray(o, minLen);
69050
+ function AsYouTypeFormatter_unsupportedIterableToArray(r, a) {
69051
+ if (r) {
69052
+ if ("string" == typeof r) return AsYouTypeFormatter_arrayLikeToArray(r, a);
69053
+ var t = ({}).toString.call(r).slice(8, -1);
69054
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? AsYouTypeFormatter_arrayLikeToArray(r, a) : void 0;
69055
+ }
68944
69056
  }
68945
- function AsYouTypeFormatter_arrayLikeToArray(arr, len) {
68946
- if (null == len || len > arr.length) len = arr.length;
68947
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
68948
- return arr2;
69057
+ function AsYouTypeFormatter_arrayLikeToArray(r, a) {
69058
+ (null == a || a > r.length) && (a = r.length);
69059
+ for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
69060
+ return n;
68949
69061
  }
68950
- function AsYouTypeFormatter_classCallCheck(instance, Constructor) {
68951
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
69062
+ function AsYouTypeFormatter_classCallCheck(a, n) {
69063
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
68952
69064
  }
68953
- function AsYouTypeFormatter_defineProperties(target, props) {
68954
- for(var i = 0; i < props.length; i++){
68955
- var descriptor = props[i];
68956
- descriptor.enumerable = descriptor.enumerable || false;
68957
- descriptor.configurable = true;
68958
- if ("value" in descriptor) descriptor.writable = true;
68959
- Object.defineProperty(target, descriptor.key, descriptor);
69065
+ function AsYouTypeFormatter_defineProperties(e, r) {
69066
+ for(var t = 0; t < r.length; t++){
69067
+ var o = r[t];
69068
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, AsYouTypeFormatter_toPropertyKey(o.key), o);
68960
69069
  }
68961
69070
  }
68962
- function AsYouTypeFormatter_createClass(Constructor, protoProps, staticProps) {
68963
- if (protoProps) AsYouTypeFormatter_defineProperties(Constructor.prototype, protoProps);
68964
- if (staticProps) AsYouTypeFormatter_defineProperties(Constructor, staticProps);
68965
- Object.defineProperty(Constructor, "prototype", {
68966
- writable: false
68967
- });
68968
- return Constructor;
69071
+ function AsYouTypeFormatter_createClass(e, r, t) {
69072
+ return r && AsYouTypeFormatter_defineProperties(e.prototype, r), t && AsYouTypeFormatter_defineProperties(e, t), Object.defineProperty(e, "prototype", {
69073
+ writable: !1
69074
+ }), e;
69075
+ }
69076
+ function AsYouTypeFormatter_toPropertyKey(t) {
69077
+ var i = AsYouTypeFormatter_toPrimitive(t, "string");
69078
+ return "symbol" == AsYouTypeFormatter_typeof(i) ? i : i + "";
69079
+ }
69080
+ function AsYouTypeFormatter_toPrimitive(t, r) {
69081
+ if ("object" != AsYouTypeFormatter_typeof(t) || !t) return t;
69082
+ var e = t[Symbol.toPrimitive];
69083
+ if (void 0 !== e) {
69084
+ var i = e.call(t, r || "default");
69085
+ if ("object" != AsYouTypeFormatter_typeof(i)) return i;
69086
+ throw new TypeError("@@toPrimitive must return a primitive value.");
69087
+ }
69088
+ return ("string" === r ? String : Number)(t);
68969
69089
  }
68970
69090
  var DUMMY_DIGIT = '9';
68971
69091
  var LONGEST_NATIONAL_PHONE_NUMBER_LENGTH = 15;
@@ -68988,7 +69108,7 @@ and limitations under the License.
68988
69108
  this.metadata = metadata;
68989
69109
  this.resetFormat();
68990
69110
  }
68991
- AsYouTypeFormatter_createClass(AsYouTypeFormatter, [
69111
+ return AsYouTypeFormatter_createClass(AsYouTypeFormatter, [
68992
69112
  {
68993
69113
  key: "resetFormat",
68994
69114
  value: function() {
@@ -69017,9 +69137,9 @@ and limitations under the License.
69017
69137
  key: "format",
69018
69138
  value: function(nextDigits, state) {
69019
69139
  var _this = this;
69020
- if (canFormatCompleteNumber(state.nationalSignificantNumber, this.metadata)) for(var _iterator = AsYouTypeFormatter_createForOfIteratorHelperLoose(this.matchingFormats), _step; !(_step = _iterator()).done;){
69021
- var format = _step.value;
69022
- var formattedCompleteNumber = formatCompleteNumber(state, format, {
69140
+ if (canFormatCompleteNumber(state.nationalSignificantNumber, state.country, this.metadata)) for(var _iterator = AsYouTypeFormatter_createForOfIteratorHelperLoose(this.matchingFormats), _step; !(_step = _iterator()).done;){
69141
+ var _format = _step.value;
69142
+ var formattedCompleteNumber = formatCompleteNumber(state, _format, {
69023
69143
  metadata: this.metadata,
69024
69144
  shouldTryNationalPrefixFormattingRule: function(format) {
69025
69145
  return _this.shouldTryNationalPrefixFormattingRule(format, {
@@ -69033,7 +69153,7 @@ and limitations under the License.
69033
69153
  });
69034
69154
  if (formattedCompleteNumber) {
69035
69155
  this.resetFormat();
69036
- this.chosenFormat = format;
69156
+ this.chosenFormat = _format;
69037
69157
  this.setNationalNumberTemplate(formattedCompleteNumber.replace(/\d/g, DIGIT_PLACEHOLDER), state);
69038
69158
  this.populatedNationalNumberTemplate = formattedCompleteNumber;
69039
69159
  this.populatedNationalNumberTemplatePosition = this.template.lastIndexOf(DIGIT_PLACEHOLDER);
@@ -69106,21 +69226,21 @@ and limitations under the License.
69106
69226
  var _this3 = this;
69107
69227
  var _loop = function() {
69108
69228
  var format = _step2.value;
69109
- if (_this3.chosenFormat === format) return "break";
69110
- if (!NON_ALTERING_FORMAT_REG_EXP.test(_this3.getFormatFormat(format, state.international))) return "continue";
69229
+ if (_this3.chosenFormat === format) return 0;
69230
+ if (!NON_ALTERING_FORMAT_REG_EXP.test(_this3.getFormatFormat(format, state.international))) return 1;
69111
69231
  if (!_this3.createTemplateForFormat(format, state)) {
69112
69232
  _this3.matchingFormats = _this3.matchingFormats.filter(function(_) {
69113
69233
  return _ !== format;
69114
69234
  });
69115
- return "continue";
69235
+ return 1;
69116
69236
  }
69117
69237
  _this3.chosenFormat = format;
69118
- return "break";
69119
- };
69238
+ return 0;
69239
+ }, _ret;
69120
69240
  for(var _iterator2 = AsYouTypeFormatter_createForOfIteratorHelperLoose(this.matchingFormats.slice()), _step2; !(_step2 = _iterator2()).done;){
69121
- var _ret = _loop();
69122
- if ("break" === _ret) break;
69123
- if ("continue" === _ret) continue;
69241
+ _ret = _loop();
69242
+ if (0 === _ret) break;
69243
+ if (1 === _ret) continue;
69124
69244
  }
69125
69245
  if (!this.chosenFormat) this.resetFormat();
69126
69246
  return this.chosenFormat;
@@ -69183,7 +69303,7 @@ and limitations under the License.
69183
69303
  {
69184
69304
  key: "getTemplateForFormat",
69185
69305
  value: function(format, _ref4) {
69186
- var nationalSignificantNumber = _ref4.nationalSignificantNumber, international = _ref4.international, nationalPrefix = _ref4.nationalPrefix, complexPrefixBeforeNationalSignificantNumber = _ref4.complexPrefixBeforeNationalSignificantNumber;
69306
+ var nationalSignificantNumber = _ref4.nationalSignificantNumber, international = _ref4.international, nationalPrefix = _ref4.nationalPrefix, prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = _ref4.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix;
69187
69307
  var pattern = format.pattern();
69188
69308
  if (SUPPORT_LEGACY_FORMATTING_PATTERNS) pattern = pattern.replace(CREATE_CHARACTER_CLASS_PATTERN(), '\\d').replace(CREATE_STANDALONE_DIGIT_PATTERN(), '\\d');
69189
69309
  var digits = LONGEST_DUMMY_PHONE_NUMBER.match(pattern)[0];
@@ -69212,7 +69332,7 @@ and limitations under the License.
69212
69332
  }
69213
69333
  var template = digits.replace(new RegExp(pattern), numberFormat).replace(new RegExp(DUMMY_DIGIT, 'g'), DIGIT_PLACEHOLDER);
69214
69334
  if (!nationalPrefixIncludedInTemplate) {
69215
- if (complexPrefixBeforeNationalSignificantNumber) template = repeat(DIGIT_PLACEHOLDER, complexPrefixBeforeNationalSignificantNumber.length) + ' ' + template;
69335
+ if (prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix) template = repeat(DIGIT_PLACEHOLDER, prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix.length) + ' ' + template;
69216
69336
  else if (nationalPrefix) template = repeat(DIGIT_PLACEHOLDER, nationalPrefix.length) + this.getSeparatorAfterNationalPrefix(format) + template;
69217
69337
  }
69218
69338
  if (international) template = applyInternationalSeparatorStyle(template);
@@ -69243,73 +69363,83 @@ and limitations under the License.
69243
69363
  }
69244
69364
  }
69245
69365
  ]);
69246
- return AsYouTypeFormatter;
69247
69366
  }();
69248
- function AsYouTypeParser_slicedToArray(arr, i) {
69249
- return AsYouTypeParser_arrayWithHoles(arr) || AsYouTypeParser_iterableToArrayLimit(arr, i) || AsYouTypeParser_unsupportedIterableToArray(arr, i) || AsYouTypeParser_nonIterableRest();
69367
+ function AsYouTypeParser_typeof(o) {
69368
+ return AsYouTypeParser_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
69369
+ return typeof o;
69370
+ } : function(o) {
69371
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
69372
+ }, AsYouTypeParser_typeof(o);
69373
+ }
69374
+ function AsYouTypeParser_slicedToArray(r, e) {
69375
+ return AsYouTypeParser_arrayWithHoles(r) || AsYouTypeParser_iterableToArrayLimit(r, e) || AsYouTypeParser_unsupportedIterableToArray(r, e) || AsYouTypeParser_nonIterableRest();
69250
69376
  }
69251
69377
  function AsYouTypeParser_nonIterableRest() {
69252
69378
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
69253
69379
  }
69254
- function AsYouTypeParser_unsupportedIterableToArray(o, minLen) {
69255
- if (!o) return;
69256
- if ("string" == typeof o) return AsYouTypeParser_arrayLikeToArray(o, minLen);
69257
- var n = Object.prototype.toString.call(o).slice(8, -1);
69258
- if ("Object" === n && o.constructor) n = o.constructor.name;
69259
- if ("Map" === n || "Set" === n) return Array.from(o);
69260
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return AsYouTypeParser_arrayLikeToArray(o, minLen);
69380
+ function AsYouTypeParser_unsupportedIterableToArray(r, a) {
69381
+ if (r) {
69382
+ if ("string" == typeof r) return AsYouTypeParser_arrayLikeToArray(r, a);
69383
+ var t = ({}).toString.call(r).slice(8, -1);
69384
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? AsYouTypeParser_arrayLikeToArray(r, a) : void 0;
69385
+ }
69261
69386
  }
69262
- function AsYouTypeParser_arrayLikeToArray(arr, len) {
69263
- if (null == len || len > arr.length) len = arr.length;
69264
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
69265
- return arr2;
69387
+ function AsYouTypeParser_arrayLikeToArray(r, a) {
69388
+ (null == a || a > r.length) && (a = r.length);
69389
+ for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
69390
+ return n;
69266
69391
  }
69267
- function AsYouTypeParser_iterableToArrayLimit(arr, i) {
69268
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
69269
- if (null == _i) return;
69270
- var _arr = [];
69271
- var _n = true;
69272
- var _d = false;
69273
- var _s, _e;
69274
- try {
69275
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
69276
- _arr.push(_s.value);
69277
- if (i && _arr.length === i) break;
69278
- }
69279
- } catch (err) {
69280
- _d = true;
69281
- _e = err;
69282
- } finally{
69392
+ function AsYouTypeParser_iterableToArrayLimit(r, l) {
69393
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
69394
+ if (null != t) {
69395
+ var e, n, i, u, a = [], f = !0, o = !1;
69283
69396
  try {
69284
- if (!_n && null != _i["return"]) _i["return"]();
69397
+ if (i = (t = t.call(r)).next, 0 === l) {
69398
+ if (Object(t) !== t) return;
69399
+ f = !1;
69400
+ } else for(; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
69401
+ } catch (r) {
69402
+ o = !0, n = r;
69285
69403
  } finally{
69286
- if (_d) throw _e;
69404
+ try {
69405
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
69406
+ } finally{
69407
+ if (o) throw n;
69408
+ }
69287
69409
  }
69410
+ return a;
69288
69411
  }
69289
- return _arr;
69290
69412
  }
69291
- function AsYouTypeParser_arrayWithHoles(arr) {
69292
- if (Array.isArray(arr)) return arr;
69413
+ function AsYouTypeParser_arrayWithHoles(r) {
69414
+ if (Array.isArray(r)) return r;
69293
69415
  }
69294
- function AsYouTypeParser_classCallCheck(instance, Constructor) {
69295
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
69416
+ function AsYouTypeParser_classCallCheck(a, n) {
69417
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
69296
69418
  }
69297
- function AsYouTypeParser_defineProperties(target, props) {
69298
- for(var i = 0; i < props.length; i++){
69299
- var descriptor = props[i];
69300
- descriptor.enumerable = descriptor.enumerable || false;
69301
- descriptor.configurable = true;
69302
- if ("value" in descriptor) descriptor.writable = true;
69303
- Object.defineProperty(target, descriptor.key, descriptor);
69419
+ function AsYouTypeParser_defineProperties(e, r) {
69420
+ for(var t = 0; t < r.length; t++){
69421
+ var o = r[t];
69422
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, AsYouTypeParser_toPropertyKey(o.key), o);
69304
69423
  }
69305
69424
  }
69306
- function AsYouTypeParser_createClass(Constructor, protoProps, staticProps) {
69307
- if (protoProps) AsYouTypeParser_defineProperties(Constructor.prototype, protoProps);
69308
- if (staticProps) AsYouTypeParser_defineProperties(Constructor, staticProps);
69309
- Object.defineProperty(Constructor, "prototype", {
69310
- writable: false
69311
- });
69312
- return Constructor;
69425
+ function AsYouTypeParser_createClass(e, r, t) {
69426
+ return r && AsYouTypeParser_defineProperties(e.prototype, r), t && AsYouTypeParser_defineProperties(e, t), Object.defineProperty(e, "prototype", {
69427
+ writable: !1
69428
+ }), e;
69429
+ }
69430
+ function AsYouTypeParser_toPropertyKey(t) {
69431
+ var i = AsYouTypeParser_toPrimitive(t, "string");
69432
+ return "symbol" == AsYouTypeParser_typeof(i) ? i : i + "";
69433
+ }
69434
+ function AsYouTypeParser_toPrimitive(t, r) {
69435
+ if ("object" != AsYouTypeParser_typeof(t) || !t) return t;
69436
+ var e = t[Symbol.toPrimitive];
69437
+ if (void 0 !== e) {
69438
+ var i = e.call(t, r || "default");
69439
+ if ("object" != AsYouTypeParser_typeof(i)) return i;
69440
+ throw new TypeError("@@toPrimitive must return a primitive value.");
69441
+ }
69442
+ return ("string" === r ? String : Number)(t);
69313
69443
  }
69314
69444
  var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART = '[' + VALID_PUNCTUATION + VALID_DIGITS + ']+';
69315
69445
  var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN = new RegExp('^' + VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART + '$', 'i');
@@ -69325,7 +69455,7 @@ and limitations under the License.
69325
69455
  this.metadata = metadata;
69326
69456
  this.onNationalSignificantNumberChange = onNationalSignificantNumberChange;
69327
69457
  }
69328
- AsYouTypeParser_createClass(AsYouTypeParser, [
69458
+ return AsYouTypeParser_createClass(AsYouTypeParser, [
69329
69459
  {
69330
69460
  key: "input",
69331
69461
  value: function(text, state) {
@@ -69334,7 +69464,7 @@ and limitations under the License.
69334
69464
  var justLeadingPlus;
69335
69465
  if (hasPlus) {
69336
69466
  if (!state.digits) {
69337
- state.startInternationalNumber();
69467
+ state.startInternationalNumber(void 0, void 0);
69338
69468
  if (!digits) justLeadingPlus = true;
69339
69469
  }
69340
69470
  }
@@ -69372,7 +69502,7 @@ and limitations under the License.
69372
69502
  {
69373
69503
  key: "extractCountryCallingCode",
69374
69504
  value: function(state) {
69375
- var _extractCountryCallin = extractCountryCallingCode_extractCountryCallingCode('+' + state.getDigitsWithoutInternationalPrefix(), this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), countryCallingCode = _extractCountryCallin.countryCallingCode, number = _extractCountryCallin.number;
69505
+ var _extractCountryCallin = extractCountryCallingCode_extractCountryCallingCode('+' + state.getDigitsWithoutInternationalPrefix(), state.country, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), countryCallingCode = _extractCountryCallin.countryCallingCode, number = _extractCountryCallin.number;
69376
69506
  if (countryCallingCode) {
69377
69507
  state.setCallingCode(countryCallingCode);
69378
69508
  state.update({
@@ -69419,20 +69549,22 @@ and limitations under the License.
69419
69549
  {
69420
69550
  key: "onExtractedNationalNumber",
69421
69551
  value: function(nationalPrefix, carrierCode, nationalSignificantNumber, nationalDigits, setState) {
69422
- var complexPrefixBeforeNationalSignificantNumber;
69423
- var nationalSignificantNumberMatchesInput;
69552
+ var nationalSignificantNumberIsModified = false;
69553
+ var prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix;
69424
69554
  var nationalSignificantNumberIndex = nationalDigits.lastIndexOf(nationalSignificantNumber);
69425
- if (nationalSignificantNumberIndex >= 0 && nationalSignificantNumberIndex === nationalDigits.length - nationalSignificantNumber.length) {
69426
- nationalSignificantNumberMatchesInput = true;
69555
+ if (nationalSignificantNumberIndex < 0 || nationalSignificantNumberIndex !== nationalDigits.length - nationalSignificantNumber.length) nationalSignificantNumberIsModified = true;
69556
+ else {
69427
69557
  var prefixBeforeNationalNumber = nationalDigits.slice(0, nationalSignificantNumberIndex);
69428
- if (prefixBeforeNationalNumber !== nationalPrefix) complexPrefixBeforeNationalSignificantNumber = prefixBeforeNationalNumber;
69558
+ if (prefixBeforeNationalNumber) {
69559
+ if (prefixBeforeNationalNumber !== nationalPrefix) prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = prefixBeforeNationalNumber;
69560
+ }
69429
69561
  }
69430
69562
  setState({
69431
69563
  nationalPrefix: nationalPrefix,
69432
69564
  carrierCode: carrierCode,
69433
69565
  nationalSignificantNumber: nationalSignificantNumber,
69434
- nationalSignificantNumberMatchesInput: nationalSignificantNumberMatchesInput,
69435
- complexPrefixBeforeNationalSignificantNumber: complexPrefixBeforeNationalSignificantNumber
69566
+ nationalSignificantNumberIsModified: nationalSignificantNumberIsModified,
69567
+ prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix: prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix
69436
69568
  });
69437
69569
  this.hasExtractedNationalSignificantNumber = true;
69438
69570
  this.onNationalSignificantNumberChange();
@@ -69477,8 +69609,7 @@ and limitations under the License.
69477
69609
  key: "fixMissingPlus",
69478
69610
  value: function(state) {
69479
69611
  if (!state.international) {
69480
- var _extractCountryCallin2 = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(state.digits, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), newCallingCode = _extractCountryCallin2.countryCallingCode;
69481
- _extractCountryCallin2.number;
69612
+ var _extractCountryCallin2 = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(state.digits, state.country, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), newCallingCode = _extractCountryCallin2.countryCallingCode;
69482
69613
  if (newCallingCode) {
69483
69614
  state.update({
69484
69615
  missingPlus: true
@@ -69513,7 +69644,6 @@ and limitations under the License.
69513
69644
  }
69514
69645
  }
69515
69646
  ]);
69516
- return AsYouTypeParser;
69517
69647
  }();
69518
69648
  function AsYouTypeParser_extractFormattedPhoneNumber(text) {
69519
69649
  var startsAt = text.search(VALID_FORMATTED_PHONE_NUMBER_PART);
@@ -69546,71 +69676,82 @@ and limitations under the License.
69546
69676
  hasPlus
69547
69677
  ];
69548
69678
  }
69549
- function AsYouType_slicedToArray(arr, i) {
69550
- return AsYouType_arrayWithHoles(arr) || AsYouType_iterableToArrayLimit(arr, i) || AsYouType_unsupportedIterableToArray(arr, i) || AsYouType_nonIterableRest();
69679
+ function AsYouType_typeof(o) {
69680
+ return AsYouType_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
69681
+ return typeof o;
69682
+ } : function(o) {
69683
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
69684
+ }, AsYouType_typeof(o);
69685
+ }
69686
+ function AsYouType_slicedToArray(r, e) {
69687
+ return AsYouType_arrayWithHoles(r) || AsYouType_iterableToArrayLimit(r, e) || AsYouType_unsupportedIterableToArray(r, e) || AsYouType_nonIterableRest();
69551
69688
  }
69552
69689
  function AsYouType_nonIterableRest() {
69553
69690
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
69554
69691
  }
69555
- function AsYouType_unsupportedIterableToArray(o, minLen) {
69556
- if (!o) return;
69557
- if ("string" == typeof o) return AsYouType_arrayLikeToArray(o, minLen);
69558
- var n = Object.prototype.toString.call(o).slice(8, -1);
69559
- if ("Object" === n && o.constructor) n = o.constructor.name;
69560
- if ("Map" === n || "Set" === n) return Array.from(o);
69561
- if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return AsYouType_arrayLikeToArray(o, minLen);
69692
+ function AsYouType_unsupportedIterableToArray(r, a) {
69693
+ if (r) {
69694
+ if ("string" == typeof r) return AsYouType_arrayLikeToArray(r, a);
69695
+ var t = ({}).toString.call(r).slice(8, -1);
69696
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? AsYouType_arrayLikeToArray(r, a) : void 0;
69697
+ }
69562
69698
  }
69563
- function AsYouType_arrayLikeToArray(arr, len) {
69564
- if (null == len || len > arr.length) len = arr.length;
69565
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
69566
- return arr2;
69699
+ function AsYouType_arrayLikeToArray(r, a) {
69700
+ (null == a || a > r.length) && (a = r.length);
69701
+ for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
69702
+ return n;
69567
69703
  }
69568
- function AsYouType_iterableToArrayLimit(arr, i) {
69569
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
69570
- if (null == _i) return;
69571
- var _arr = [];
69572
- var _n = true;
69573
- var _d = false;
69574
- var _s, _e;
69575
- try {
69576
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
69577
- _arr.push(_s.value);
69578
- if (i && _arr.length === i) break;
69579
- }
69580
- } catch (err) {
69581
- _d = true;
69582
- _e = err;
69583
- } finally{
69704
+ function AsYouType_iterableToArrayLimit(r, l) {
69705
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
69706
+ if (null != t) {
69707
+ var e, n, i, u, a = [], f = !0, o = !1;
69584
69708
  try {
69585
- if (!_n && null != _i["return"]) _i["return"]();
69709
+ if (i = (t = t.call(r)).next, 0 === l) {
69710
+ if (Object(t) !== t) return;
69711
+ f = !1;
69712
+ } else for(; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
69713
+ } catch (r) {
69714
+ o = !0, n = r;
69586
69715
  } finally{
69587
- if (_d) throw _e;
69716
+ try {
69717
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
69718
+ } finally{
69719
+ if (o) throw n;
69720
+ }
69588
69721
  }
69722
+ return a;
69589
69723
  }
69590
- return _arr;
69591
69724
  }
69592
- function AsYouType_arrayWithHoles(arr) {
69593
- if (Array.isArray(arr)) return arr;
69725
+ function AsYouType_arrayWithHoles(r) {
69726
+ if (Array.isArray(r)) return r;
69594
69727
  }
69595
- function AsYouType_classCallCheck(instance, Constructor) {
69596
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
69728
+ function AsYouType_classCallCheck(a, n) {
69729
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
69597
69730
  }
69598
- function AsYouType_defineProperties(target, props) {
69599
- for(var i = 0; i < props.length; i++){
69600
- var descriptor = props[i];
69601
- descriptor.enumerable = descriptor.enumerable || false;
69602
- descriptor.configurable = true;
69603
- if ("value" in descriptor) descriptor.writable = true;
69604
- Object.defineProperty(target, descriptor.key, descriptor);
69731
+ function AsYouType_defineProperties(e, r) {
69732
+ for(var t = 0; t < r.length; t++){
69733
+ var o = r[t];
69734
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, AsYouType_toPropertyKey(o.key), o);
69605
69735
  }
69606
69736
  }
69607
- function AsYouType_createClass(Constructor, protoProps, staticProps) {
69608
- if (protoProps) AsYouType_defineProperties(Constructor.prototype, protoProps);
69609
- if (staticProps) AsYouType_defineProperties(Constructor, staticProps);
69610
- Object.defineProperty(Constructor, "prototype", {
69611
- writable: false
69612
- });
69613
- return Constructor;
69737
+ function AsYouType_createClass(e, r, t) {
69738
+ return r && AsYouType_defineProperties(e.prototype, r), t && AsYouType_defineProperties(e, t), Object.defineProperty(e, "prototype", {
69739
+ writable: !1
69740
+ }), e;
69741
+ }
69742
+ function AsYouType_toPropertyKey(t) {
69743
+ var i = AsYouType_toPrimitive(t, "string");
69744
+ return "symbol" == AsYouType_typeof(i) ? i : i + "";
69745
+ }
69746
+ function AsYouType_toPrimitive(t, r) {
69747
+ if ("object" != AsYouType_typeof(t) || !t) return t;
69748
+ var e = t[Symbol.toPrimitive];
69749
+ if (void 0 !== e) {
69750
+ var i = e.call(t, r || "default");
69751
+ if ("object" != AsYouType_typeof(i)) return i;
69752
+ throw new TypeError("@@toPrimitive must return a primitive value.");
69753
+ }
69754
+ return ("string" === r ? String : Number)(t);
69614
69755
  }
69615
69756
  var AsYouType_USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;
69616
69757
  var AsYouType_AsYouType = /*#__PURE__*/ function() {
@@ -69622,7 +69763,7 @@ and limitations under the License.
69622
69763
  this.defaultCallingCode = defaultCallingCode;
69623
69764
  this.reset();
69624
69765
  }
69625
- AsYouType_createClass(AsYouType, [
69766
+ return AsYouType_createClass(AsYouType, [
69626
69767
  {
69627
69768
  key: "getCountryAndCallingCode",
69628
69769
  value: function(optionsOrDefaultCountry) {
@@ -69766,9 +69907,9 @@ and limitations under the License.
69766
69907
  {
69767
69908
  key: "getNonFormattedNationalNumberWithPrefix",
69768
69909
  value: function() {
69769
- var _this$state = this.state, nationalSignificantNumber = _this$state.nationalSignificantNumber, complexPrefixBeforeNationalSignificantNumber = _this$state.complexPrefixBeforeNationalSignificantNumber, nationalPrefix = _this$state.nationalPrefix;
69910
+ var _this$state = this.state, nationalSignificantNumber = _this$state.nationalSignificantNumber, prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = _this$state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix, nationalPrefix = _this$state.nationalPrefix;
69770
69911
  var number = nationalSignificantNumber;
69771
- var prefix = complexPrefixBeforeNationalSignificantNumber || nationalPrefix;
69912
+ var prefix = prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix || nationalPrefix;
69772
69913
  if (prefix) number = prefix + number;
69773
69914
  return number;
69774
69915
  }
@@ -69776,8 +69917,8 @@ and limitations under the License.
69776
69917
  {
69777
69918
  key: "getNonFormattedNumber",
69778
69919
  value: function() {
69779
- var nationalSignificantNumberMatchesInput = this.state.nationalSignificantNumberMatchesInput;
69780
- return this.getFullNumber(nationalSignificantNumberMatchesInput ? this.getNonFormattedNationalNumberWithPrefix() : this.state.getNationalDigits());
69920
+ var nationalSignificantNumberIsModified = this.state.nationalSignificantNumberIsModified;
69921
+ return this.getFullNumber(nationalSignificantNumberIsModified ? this.state.getNationalDigits() : this.getNonFormattedNationalNumberWithPrefix());
69781
69922
  }
69782
69923
  },
69783
69924
  {
@@ -69800,7 +69941,6 @@ and limitations under the License.
69800
69941
  value: function() {
69801
69942
  this.state.setCountry(getCountryByCallingCode(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {
69802
69943
  nationalNumber: this.state.nationalSignificantNumber,
69803
- defaultCountry: this.defaultCountry,
69804
69944
  metadata: this.metadata
69805
69945
  }));
69806
69946
  }
@@ -69836,7 +69976,6 @@ and limitations under the License.
69836
69976
  if (ambiguousCountries.length > 1) {
69837
69977
  var exactCountry = getCountryByNationalNumber(nationalSignificantNumber, {
69838
69978
  countries: ambiguousCountries,
69839
- defaultCountry: this.defaultCountry,
69840
69979
  metadata: this.metadata.metadata
69841
69980
  });
69842
69981
  if (exactCountry) country = exactCountry;
@@ -69883,7 +70022,6 @@ and limitations under the License.
69883
70022
  }
69884
70023
  }
69885
70024
  ]);
69886
- return AsYouType;
69887
70025
  }();
69888
70026
  function exports_AsYouType_AsYouType(country) {
69889
70027
  return AsYouType_AsYouType.call(this, country, metadata_min_json);