@ranty/ranty-sdk 3.5.0-beta.6 → 3.6.0-beta.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.
@@ -916,7 +916,7 @@ function le(t) {
916
916
  */
917
917
  var z1;
918
918
  ((z1 = window.HTMLSlotElement) === null || z1 === void 0 ? void 0 : z1.prototype.assignedElements) != null;
919
- const dS = "@ranty/ranty-sdk", cS = "3.5.0-beta.6", AS = "Ranty sdk", uS = "dist/index.js", pS = {
919
+ const dS = "@ranty/ranty-sdk", cS = "3.6.0-beta.0", AS = "Ranty sdk", uS = "dist/index.js", pS = {
920
920
  ".": "./dist/index.js"
921
921
  }, hS = "types/index.d.ts", gS = [
922
922
  "dist",
@@ -3381,7 +3381,7 @@ BA.getInstance = eC.getInstance;
3381
3381
  return n.ReCaptchaInstance;
3382
3382
  } });
3383
3383
  })($B);
3384
- const II = () => jt.getConfig().VITE_DATADOG_ENV !== "production", ie = {
3384
+ const II = () => Ft.getConfig().VITE_DATADOG_ENV !== "production", ie = {
3385
3385
  info: (t, e = {}) => {
3386
3386
  II() && console.log(t, e), k_.logger.info(t, e);
3387
3387
  },
@@ -3401,7 +3401,7 @@ class TI {
3401
3401
  }
3402
3402
  createTokenCaptcha(e) {
3403
3403
  return ce(this, null, function* () {
3404
- if (jt.getConfig().VITE_ENV === "sandbox")
3404
+ if (Ft.getConfig().VITE_ENV === "sandbox")
3405
3405
  return sessionStorage.setItem("key", e), e;
3406
3406
  const r = yield (yield $B.load(e)).execute("submit");
3407
3407
  return sessionStorage.setItem("key", e), sessionStorage.setItem("token", r), r;
@@ -3410,7 +3410,7 @@ class TI {
3410
3410
  signer(e, n, r, s, i = 3) {
3411
3411
  return ce(this, null, function* () {
3412
3412
  try {
3413
- const o = yield this.createTokenCaptcha(e), { data: a } = yield jt.instance.post(
3413
+ const o = yield this.createTokenCaptcha(e), { data: a } = yield Ft.instance.post(
3414
3414
  "/sdk/signer",
3415
3415
  {},
3416
3416
  { headers: { "x-recaptcha-token": o } }
@@ -3508,7 +3508,7 @@ const hA = new TI(), W5 = (t = !1) => {
3508
3508
  return r.response.status >= 500 || ((s = r.response) == null ? void 0 : s.status) === 401 || r.code === "ECONNABORTED";
3509
3509
  }
3510
3510
  });
3511
- const n = jt.getConfig();
3511
+ const n = Ft.getConfig();
3512
3512
  return e.interceptors.request.use(
3513
3513
  (r) => ce(void 0, null, function* () {
3514
3514
  const s = hA.region === n.VITE_COGNITO_REGION_2 ? n.VITE_API_RANTY_DOMAIN_API_REGION_2 : n.VITE_API_RANTY_DOMAIN_API_REGION_1;
@@ -3658,7 +3658,7 @@ const hA = new TI(), W5 = (t = !1) => {
3658
3658
  }, Y5 = (t) => {
3659
3659
  if (!(t in _v))
3660
3660
  throw new Error(`Environment ${t} not found`);
3661
- }, jt = {
3661
+ }, Ft = {
3662
3662
  instance: void 0,
3663
3663
  instanceWithRetries: void 0,
3664
3664
  currentEnvironment: void 0,
@@ -3670,7 +3670,7 @@ const hA = new TI(), W5 = (t = !1) => {
3670
3670
  Y5(t), this.currentEnvironment = t, this.instance = W5(!1), this.instanceWithRetries = W5(!0);
3671
3671
  }
3672
3672
  }, PI = (t, e, n) => ce(void 0, null, function* () {
3673
- return (yield jt.instanceWithRetries.post(
3673
+ return (yield Ft.instanceWithRetries.post(
3674
3674
  "/sdk/a2a/save_token",
3675
3675
  {
3676
3676
  code: t,
@@ -3680,9 +3680,9 @@ const hA = new TI(), W5 = (t = !1) => {
3680
3680
  {}
3681
3681
  )).data;
3682
3682
  }), UI = (t, e, n) => ce(void 0, null, function* () {
3683
- return (yield jt.instanceWithRetries.delete(`/sdk/a2a/delete_token/${t}/${e}/${n}`)).data;
3683
+ return (yield Ft.instanceWithRetries.delete(`/sdk/a2a/delete_token/${t}/${e}/${n}`)).data;
3684
3684
  }), jI = (t, e) => ce(void 0, null, function* () {
3685
- return (yield jt.instanceWithRetries.post(
3685
+ return (yield Ft.instanceWithRetries.post(
3686
3686
  "/sdk/a2a/payments/direct",
3687
3687
  {
3688
3688
  payment_request_id: t,
@@ -3691,9 +3691,9 @@ const hA = new TI(), W5 = (t = !1) => {
3691
3691
  {}
3692
3692
  )).data;
3693
3693
  }), FI = (t) => ce(void 0, null, function* () {
3694
- return (yield jt.instanceWithRetries.get(`/sdk/a2a/get_pcps/${t}`, {})).data;
3694
+ return (yield Ft.instanceWithRetries.get(`/sdk/a2a/get_pcps/${t}`, {})).data;
3695
3695
  }), DI = (t) => ce(void 0, null, function* () {
3696
- return (yield jt.instanceWithRetries.get(`/sdk/a2a/get_a2a_data/${t}?new_code_challenges=true`)).data;
3696
+ return (yield Ft.instanceWithRetries.get(`/sdk/a2a/get_a2a_data/${t}?new_code_challenges=true`)).data;
3697
3697
  }), RI = {
3698
3698
  666: "unknown",
3699
3699
  999: "api_error",
@@ -4215,7 +4215,7 @@ var G1 = (
4215
4215
  d < n ? (s = (this[a] & (1 << d) - 1) << n - d, s |= this[--a] >> (d += this.DB - n)) : (s = this[a] >> (d -= n) & r, d <= 0 && (d += this.DB, --a)), s > 0 && (i = !0), i && (o += Vo(s));
4216
4216
  return i ? o : "0";
4217
4217
  }, t.prototype.negate = function() {
4218
- var e = Ft();
4218
+ var e = jt();
4219
4219
  return t.ZERO.subTo(this, e), e;
4220
4220
  }, t.prototype.abs = function() {
4221
4221
  return this.s < 0 ? this.negate() : this;
@@ -4233,13 +4233,13 @@ var G1 = (
4233
4233
  }, t.prototype.bitLength = function() {
4234
4234
  return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Ag(this[this.t - 1] ^ this.s & this.DM);
4235
4235
  }, t.prototype.mod = function(e) {
4236
- var n = Ft();
4236
+ var n = jt();
4237
4237
  return this.abs().divRemTo(e, null, n), this.s < 0 && n.compareTo(t.ZERO) > 0 && e.subTo(n, n), n;
4238
4238
  }, t.prototype.modPowInt = function(e, n) {
4239
4239
  var r;
4240
4240
  return e < 256 || n.isEven() ? r = new t_(n) : r = new n_(n), this.exp(e, r);
4241
4241
  }, t.prototype.clone = function() {
4242
- var e = Ft();
4242
+ var e = jt();
4243
4243
  return this.copyTo(e), e;
4244
4244
  }, t.prototype.intValue = function() {
4245
4245
  if (this.s < 0) {
@@ -4275,26 +4275,26 @@ var G1 = (
4275
4275
  }, t.prototype.max = function(e) {
4276
4276
  return this.compareTo(e) > 0 ? this : e;
4277
4277
  }, t.prototype.and = function(e) {
4278
- var n = Ft();
4278
+ var n = jt();
4279
4279
  return this.bitwiseTo(e, NI, n), n;
4280
4280
  }, t.prototype.or = function(e) {
4281
- var n = Ft();
4281
+ var n = jt();
4282
4282
  return this.bitwiseTo(e, cg, n), n;
4283
4283
  }, t.prototype.xor = function(e) {
4284
- var n = Ft();
4284
+ var n = jt();
4285
4285
  return this.bitwiseTo(e, J5, n), n;
4286
4286
  }, t.prototype.andNot = function(e) {
4287
- var n = Ft();
4287
+ var n = jt();
4288
4288
  return this.bitwiseTo(e, X5, n), n;
4289
4289
  }, t.prototype.not = function() {
4290
- for (var e = Ft(), n = 0; n < this.t; ++n)
4290
+ for (var e = jt(), n = 0; n < this.t; ++n)
4291
4291
  e[n] = this.DM & ~this[n];
4292
4292
  return e.t = this.t, e.s = ~this.s, e;
4293
4293
  }, t.prototype.shiftLeft = function(e) {
4294
- var n = Ft();
4294
+ var n = jt();
4295
4295
  return e < 0 ? this.rShiftTo(-e, n) : this.lShiftTo(e, n), n;
4296
4296
  }, t.prototype.shiftRight = function(e) {
4297
- var n = Ft();
4297
+ var n = jt();
4298
4298
  return e < 0 ? this.lShiftTo(-e, n) : this.rShiftTo(e, n), n;
4299
4299
  }, t.prototype.getLowestSetBit = function() {
4300
4300
  for (var e = 0; e < this.t; ++e)
@@ -4315,22 +4315,22 @@ var G1 = (
4315
4315
  }, t.prototype.flipBit = function(e) {
4316
4316
  return this.changeBit(e, J5);
4317
4317
  }, t.prototype.add = function(e) {
4318
- var n = Ft();
4318
+ var n = jt();
4319
4319
  return this.addTo(e, n), n;
4320
4320
  }, t.prototype.subtract = function(e) {
4321
- var n = Ft();
4321
+ var n = jt();
4322
4322
  return this.subTo(e, n), n;
4323
4323
  }, t.prototype.multiply = function(e) {
4324
- var n = Ft();
4324
+ var n = jt();
4325
4325
  return this.multiplyTo(e, n), n;
4326
4326
  }, t.prototype.divide = function(e) {
4327
- var n = Ft();
4327
+ var n = jt();
4328
4328
  return this.divRemTo(e, n, null), n;
4329
4329
  }, t.prototype.remainder = function(e) {
4330
- var n = Ft();
4330
+ var n = jt();
4331
4331
  return this.divRemTo(e, null, n), n;
4332
4332
  }, t.prototype.divideAndRemainder = function(e) {
4333
- var n = Ft(), r = Ft();
4333
+ var n = jt(), r = jt();
4334
4334
  return this.divRemTo(e, n, r), [n, r];
4335
4335
  }, t.prototype.modPow = function(e, n) {
4336
4336
  var r = e.bitLength(), s, i = Ya(1), o;
@@ -4339,11 +4339,11 @@ var G1 = (
4339
4339
  r < 18 ? s = 1 : r < 48 ? s = 3 : r < 144 ? s = 4 : r < 768 ? s = 5 : s = 6, r < 8 ? o = new t_(n) : n.isEven() ? o = new WI(n) : o = new n_(n);
4340
4340
  var a = [], d = 3, l = s - 1, c = (1 << s) - 1;
4341
4341
  if (a[1] = o.convert(this), s > 1) {
4342
- var u = Ft();
4342
+ var u = jt();
4343
4343
  for (o.sqrTo(a[1], u); d <= c; )
4344
- a[d] = Ft(), o.mulTo(u, a[d - 2], a[d]), d += 2;
4344
+ a[d] = jt(), o.mulTo(u, a[d - 2], a[d]), d += 2;
4345
4345
  }
4346
- var h = e.t - 1, p, m = !0, y = Ft(), _;
4346
+ var h = e.t - 1, p, m = !0, y = jt(), _;
4347
4347
  for (r = Ag(e[h]) - 1; h >= 0; ) {
4348
4348
  for (r >= l ? p = e[h] >> r - l & c : (p = (e[h] & (1 << r + 1) - 1) << l - r, h > 0 && (p |= e[h - 1] >> this.DB + r - l)), d = s; !(p & 1); )
4349
4349
  p >>= 1, --d;
@@ -4512,12 +4512,12 @@ var G1 = (
4512
4512
  n != null && n.fromInt(0), r != null && this.copyTo(r);
4513
4513
  return;
4514
4514
  }
4515
- r == null && (r = Ft());
4516
- var o = Ft(), a = this.s, d = e.s, l = this.DB - Ag(s[s.t - 1]);
4515
+ r == null && (r = jt());
4516
+ var o = jt(), a = this.s, d = e.s, l = this.DB - Ag(s[s.t - 1]);
4517
4517
  l > 0 ? (s.lShiftTo(l, o), i.lShiftTo(l, r)) : (s.copyTo(o), i.copyTo(r));
4518
4518
  var c = o.t, u = o[c - 1];
4519
4519
  if (u != 0) {
4520
- var h = u * (1 << this.F1) + (c > 1 ? o[c - 2] >> this.F2 : 0), p = this.FV / h, m = (1 << this.F1) / h, y = 1 << this.F2, _ = r.t, b = _ - c, x = n == null ? Ft() : n;
4520
+ var h = u * (1 << this.F1) + (c > 1 ? o[c - 2] >> this.F2 : 0), p = this.FV / h, m = (1 << this.F1) / h, y = 1 << this.F2, _ = r.t, b = _ - c, x = n == null ? jt() : n;
4521
4521
  for (o.dlShiftTo(b, x), r.compareTo(x) >= 0 && (r[r.t++] = 1, r.subTo(x, r)), t.ONE.dlShiftTo(c, x), x.subTo(o, o); o.t < c; )
4522
4522
  o[o.t++] = 0;
4523
4523
  for (; --b >= 0; ) {
@@ -4542,7 +4542,7 @@ var G1 = (
4542
4542
  }, t.prototype.exp = function(e, n) {
4543
4543
  if (e > 4294967295 || e < 1)
4544
4544
  return t.ONE;
4545
- var r = Ft(), s = Ft(), i = n.convert(this), o = Ag(e) - 1;
4545
+ var r = jt(), s = jt(), i = n.convert(this), o = Ag(e) - 1;
4546
4546
  for (i.copyTo(r); --o >= 0; )
4547
4547
  if (n.sqrTo(r, s), (e & 1 << o) > 0)
4548
4548
  n.mulTo(s, i, r);
@@ -4556,7 +4556,7 @@ var G1 = (
4556
4556
  }, t.prototype.toRadix = function(e) {
4557
4557
  if (e == null && (e = 10), this.signum() == 0 || e < 2 || e > 36)
4558
4558
  return "0";
4559
- var n = this.chunkSize(e), r = Math.pow(e, n), s = Ya(r), i = Ft(), o = Ft(), a = "";
4559
+ var n = this.chunkSize(e), r = Math.pow(e, n), s = Ya(r), i = jt(), o = jt(), a = "";
4560
4560
  for (this.divRemTo(s, i, o); i.signum() > 0; )
4561
4561
  a = (r + o.intValue()).toString(e).substr(1) + a, i.divRemTo(s, i, o);
4562
4562
  return o.intValue().toString(e) + a;
@@ -4655,7 +4655,7 @@ var G1 = (
4655
4655
  return !1;
4656
4656
  var s = n.shiftRight(r);
4657
4657
  e = e + 1 >> 1, e > zr.length && (e = zr.length);
4658
- for (var i = Ft(), o = 0; o < e; ++o) {
4658
+ for (var i = jt(), o = 0; o < e; ++o) {
4659
4659
  i.fromInt(zr[Math.floor(Math.random() * zr.length)]);
4660
4660
  var a = i.modPow(s, this);
4661
4661
  if (a.compareTo(t.ONE) != 0 && a.compareTo(n) != 0) {
@@ -4668,7 +4668,7 @@ var G1 = (
4668
4668
  }
4669
4669
  return !0;
4670
4670
  }, t.prototype.square = function() {
4671
- var e = Ft();
4671
+ var e = jt();
4672
4672
  return this.squareTo(e), e;
4673
4673
  }, t.prototype.gcda = function(e, n) {
4674
4674
  var r = this.s < 0 ? this.negate() : this.clone(), s = e.s < 0 ? e.negate() : e.clone();
@@ -4747,10 +4747,10 @@ var G1 = (
4747
4747
  this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
4748
4748
  }
4749
4749
  return t.prototype.convert = function(e) {
4750
- var n = Ft();
4750
+ var n = jt();
4751
4751
  return e.abs().dlShiftTo(this.m.t, n), n.divRemTo(this.m, null, n), e.s < 0 && n.compareTo(Pt.ZERO) > 0 && this.m.subTo(n, n), n;
4752
4752
  }, t.prototype.revert = function(e) {
4753
- var n = Ft();
4753
+ var n = jt();
4754
4754
  return e.copyTo(n), this.reduce(n), n;
4755
4755
  }, t.prototype.reduce = function(e) {
4756
4756
  for (; e.t <= this.mt2; )
@@ -4771,14 +4771,14 @@ var G1 = (
4771
4771
  /** @class */
4772
4772
  function() {
4773
4773
  function t(e) {
4774
- this.m = e, this.r2 = Ft(), this.q3 = Ft(), Pt.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e);
4774
+ this.m = e, this.r2 = jt(), this.q3 = jt(), Pt.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e);
4775
4775
  }
4776
4776
  return t.prototype.convert = function(e) {
4777
4777
  if (e.s < 0 || e.t > 2 * this.m.t)
4778
4778
  return e.mod(this.m);
4779
4779
  if (e.compareTo(this.m) < 0)
4780
4780
  return e;
4781
- var n = Ft();
4781
+ var n = jt();
4782
4782
  return e.copyTo(n), this.reduce(n), n;
4783
4783
  }, t.prototype.revert = function(e) {
4784
4784
  return e;
@@ -4794,7 +4794,7 @@ var G1 = (
4794
4794
  }, t;
4795
4795
  }()
4796
4796
  );
4797
- function Ft() {
4797
+ function jt() {
4798
4798
  return new Pt(null);
4799
4799
  }
4800
4800
  function Cn(t, e) {
@@ -4842,7 +4842,7 @@ function s_(t, e) {
4842
4842
  return n == null ? -1 : n;
4843
4843
  }
4844
4844
  function Ya(t) {
4845
- var e = Ft();
4845
+ var e = jt();
4846
4846
  return e.fromInt(t), e;
4847
4847
  }
4848
4848
  function Ag(t) {
@@ -5006,13 +5006,13 @@ var eT = (
5006
5006
  r();
5007
5007
  }, 0)) : setTimeout(d, 0);
5008
5008
  }, c = function() {
5009
- a.q = Ft(), a.q.fromNumberAsync(i, 1, s, function() {
5009
+ a.q = jt(), a.q.fromNumberAsync(i, 1, s, function() {
5010
5010
  a.q.subtract(Pt.ONE).gcda(o, function(h) {
5011
5011
  h.compareTo(Pt.ONE) == 0 && a.q.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(c, 0);
5012
5012
  });
5013
5013
  });
5014
5014
  }, u = function() {
5015
- a.p = Ft(), a.p.fromNumberAsync(e - i, 1, s, function() {
5015
+ a.p = jt(), a.p.fromNumberAsync(e - i, 1, s, function() {
5016
5016
  a.p.subtract(Pt.ONE).gcda(o, function(h) {
5017
5017
  h.compareTo(Pt.ONE) == 0 && a.p.isProbablePrime(10) ? setTimeout(c, 0) : setTimeout(u, 0);
5018
5018
  });
@@ -5735,7 +5735,7 @@ function dT(t) {
5735
5735
  }
5736
5736
  const h2 = (t) => ce(void 0, null, function* () {
5737
5737
  try {
5738
- const { data: e } = yield jt.instance.post("/sdk/payments/direct", t, {});
5738
+ const { data: e } = yield Ft.instance.post("/sdk/payments/direct", t, {});
5739
5739
  return e;
5740
5740
  } catch (e) {
5741
5741
  if (e) {
@@ -5763,7 +5763,7 @@ const h2 = (t) => ce(void 0, null, function* () {
5763
5763
  ];
5764
5764
  }, g2 = (t, e, n, r = "manual_input") => ce(void 0, null, function* () {
5765
5765
  var O, V, z, q;
5766
- const s = jt.getConfig(), { id: i, additional_info: o, external_payment_id: a, flag: d } = t, { creditNumber: l, codSeg: c, expired: u, dni: h, passport: p, email: m, name: y } = e, _ = yield iC(
5766
+ const s = Ft.getConfig(), { id: i, additional_info: o, external_payment_id: a, flag: d } = t, { creditNumber: l, codSeg: c, expired: u, dni: h, passport: p, email: m, name: y } = e, _ = yield iC(
5767
5767
  s.VITE_ENCRYPT_DIRECT_PUBLIC_KEY,
5768
5768
  `${l.replaceAll(" ", "")}:${c}:${u}`
5769
5769
  ), b = h ? "DNI" : "PASAPORTE", x = h || p || "", I = (V = (O = ua.settings.customerProperties) == null ? void 0 : O.validate_card) != null ? V : !1;
@@ -5781,7 +5781,7 @@ const h2 = (t) => ce(void 0, null, function* () {
5781
5781
  data: String(_)
5782
5782
  }
5783
5783
  },
5784
- installment_plan_id: jt.getConfig().VITE_ENV === "sandbox" ? n.nx_installment_plan_id : n.id,
5784
+ installment_plan_id: n.id,
5785
5785
  type: "card_payment",
5786
5786
  save_card: !1,
5787
5787
  holder: {
@@ -5800,17 +5800,16 @@ const h2 = (t) => ce(void 0, null, function* () {
5800
5800
  payment_input: r
5801
5801
  };
5802
5802
  }), o_ = (t, e) => {
5803
- const n = jt.getConfig();
5803
+ const n = Ft.getConfig();
5804
5804
  let r = "";
5805
5805
  e ? r = n.VITE_ENCRYPT_DIRECT_PUBLIC_KEY : r = n.VITE_ENCRYPT_VALUES_PUBLIC_KEY;
5806
5806
  const s = new sC();
5807
5807
  return s.setPublicKey(r), s.encrypt(t);
5808
5808
  }, Hm = (t) => ce(void 0, null, function* () {
5809
- return (yield jt.instanceWithRetries.get(`/sdk/payments/${t}`, {})).data.response;
5809
+ return (yield Ft.instanceWithRetries.get(`/sdk/payments/${t}`, {})).data.response;
5810
5810
  }), cT = (t) => ce(void 0, null, function* () {
5811
- console.log("directPaymentPunku", t);
5812
5811
  try {
5813
- const { data: e } = yield jt.instance.post("/sdk/payment", t, {});
5812
+ const { data: e } = yield Ft.instance.post("/sdk/payment", t, {});
5814
5813
  return e;
5815
5814
  } catch (e) {
5816
5815
  const { message: n, code: r } = e;
@@ -5818,8 +5817,7 @@ const h2 = (t) => ce(void 0, null, function* () {
5818
5817
  }
5819
5818
  }), AT = (t, e, n, r = "manual_input") => ce(void 0, null, function* () {
5820
5819
  var V, z;
5821
- console.log("createDirectPaymentPayloadPunku", t, e, n, r);
5822
- const s = jt.getConfig(), { id: i, additional_info: o, external_payment_id: a, transactions: d } = t, { creditNumber: l, codSeg: c, expired: u, dni: h, passport: p, email: m, name: y } = e, _ = t.external_payment_datetime ? t.external_payment_datetime : "", b = yield iC(
5820
+ const s = Ft.getConfig(), { id: i, additional_info: o, external_payment_id: a, transactions: d } = t, { creditNumber: l, codSeg: c, expired: u, dni: h, passport: p, email: m, name: y } = e, _ = t.external_payment_datetime ? t.external_payment_datetime : "", b = yield iC(
5823
5821
  s.VITE_ENCRYPT_DIRECT_PUBLIC_KEY,
5824
5822
  `${l.replaceAll(" ", "")}:${c}:${u}`
5825
5823
  ), x = h ? "DNI" : "PASAPORTE", I = h || p || "", O = (z = (V = ua.settings.customerProperties) == null ? void 0 : V.validate_card) != null ? z : !1;
@@ -6157,7 +6155,7 @@ const zu = "Volver a la tienda", io = "https://ranty-sdk-js.naranjax.com/images/
6157
6155
  return n.status === or.BLOCKED && t === uo.ECOMMERCE ? (r = n.name) == null ? void 0 : r.includes("-external") : void 0;
6158
6156
  }
6159
6157
  ) || kv, yT = (t) => vn.messages.find((e) => e.name === t) || mf, vT = (t) => ce(void 0, null, function* () {
6160
- return (yield jt.instanceWithRetries.get(`/sdk/scof/payment_request/${t}`, {})).data.response;
6158
+ return (yield Ft.instanceWithRetries.get(`/sdk/scof/payment_request/${t}`, {})).data.response;
6161
6159
  }), bT = (t) => ce(void 0, null, function* () {
6162
6160
  const { status: e, payment_id: n, payment_type: r } = t, s = {
6163
6161
  error: !0,
@@ -6204,10 +6202,10 @@ const zu = "Volver a la tienda", io = "https://ranty-sdk-js.naranjax.com/images/
6204
6202
  const { payment_type: e } = t;
6205
6203
  return [uo.ECOMMERCE, uo.MIT].includes(e);
6206
6204
  }, _T = (t) => ce(void 0, null, function* () {
6207
- return (yield jt.instanceWithRetries.get(`/sdk/scof/get_scof_data/${t}`)).data;
6205
+ return (yield Ft.instanceWithRetries.get(`/sdk/scof/get_scof_data/${t}`)).data;
6208
6206
  }), xT = "en_US", BT = (t) => ce(void 0, null, function* () {
6209
6207
  const { pos_id: e, mail: n, encPaymentInstrument: r, userId: s, docType: i, docNumber: o, cardBrand: a } = t;
6210
- return (yield jt.instanceWithRetries.post(
6208
+ return (yield Ft.instanceWithRetries.post(
6211
6209
  `/sdk/scof/provisioning/${e}`,
6212
6210
  {
6213
6211
  mail: n,
@@ -6221,20 +6219,20 @@ const zu = "Volver a la tienda", io = "https://ranty-sdk-js.naranjax.com/images/
6221
6219
  {}
6222
6220
  )).data;
6223
6221
  }), CT = (t) => ce(void 0, null, function* () {
6224
- return (yield jt.instanceWithRetries.post(
6222
+ return (yield Ft.instanceWithRetries.post(
6225
6223
  "/sdk/scof/checkout",
6226
6224
  Ve({}, t),
6227
6225
  {}
6228
6226
  )).data;
6229
6227
  }), ET = (t, e) => ce(void 0, null, function* () {
6230
- return (yield jt.instanceWithRetries.delete(
6228
+ return (yield Ft.instanceWithRetries.delete(
6231
6229
  `/sdk/scof/scofDeleteTokenById/${t}/${e}`,
6232
6230
  {}
6233
6231
  )).data;
6234
6232
  }), kT = (t) => ce(void 0, null, function* () {
6235
6233
  if (t.length > 0)
6236
6234
  try {
6237
- const { data: e } = yield jt.instance.get("/sdk/bin/" + t, {});
6235
+ const { data: e } = yield Ft.instance.get("/sdk/bin/" + t, {});
6238
6236
  return e;
6239
6237
  } catch (e) {
6240
6238
  if (e) {
@@ -6357,7 +6355,7 @@ function DT(t, e) {
6357
6355
  }
6358
6356
  const RT = (t) => ce(void 0, null, function* () {
6359
6357
  try {
6360
- const e = yield jt.instance.post("sdk/click2pay/checkout", t, {});
6358
+ const e = yield Ft.instance.post("sdk/click2pay/checkout", t, {});
6361
6359
  return ie.info("makeC2PCheckout", { tag: "MAKE_C2P_CHECKOUT", contextObject: e }), e.data;
6362
6360
  } catch (e) {
6363
6361
  throw ie.error("makeC2PCheckout error", { tag: "MAKE_C2P_CHECKOUT_ERROR" }, e), e;
@@ -9485,10 +9483,10 @@ function F7(t, e, n, r) {
9485
9483
  }
9486
9484
  var pp = o7(F7);
9487
9485
  jU(Tl(), "DD_LOGS", pp);
9488
- const D7 = "@ranty/ranty-sdk", R7 = "3.5.0-beta.6", O7 = 3, N7 = !0, L7 = {
9486
+ const D7 = "@ranty/ranty-sdk", R7 = "3.6.0-beta.0", O7 = 3, N7 = !0, L7 = {
9489
9487
  "": {
9490
9488
  name: "@ranty/ranty-sdk",
9491
- version: "3.5.0-beta.6",
9489
+ version: "3.6.0-beta.0",
9492
9490
  license: "ISC",
9493
9491
  dependencies: {
9494
9492
  "@datadog/browser-logs": "^5.35.1",
@@ -31647,7 +31645,7 @@ const D7 = "@ranty/ranty-sdk", R7 = "3.5.0-beta.6", O7 = 3, N7 = !0, L7 = {
31647
31645
  }), z7 = (t) => {
31648
31646
  if (H7())
31649
31647
  return pp.init(M7(t)), pp.logger.setContext({ version: Q7.version }), pp;
31650
- }, H7 = () => !(jt.getConfig().VITE_ENV === "sandbox" || jt.getConfig().VITE_ENV === "production" && window.location.hostname === "localhost"), k_ = pp;
31648
+ }, H7 = () => !(Ft.getConfig().VITE_ENV === "sandbox" || Ft.getConfig().VITE_ENV === "production" && window.location.hostname === "localhost"), k_ = pp;
31651
31649
  class q7 {
31652
31650
  constructor() {
31653
31651
  this.errorEvent = new Event("service-error");
@@ -31706,7 +31704,7 @@ const V7 = new q7(), K7 = [
31706
31704
  class Dr {
31707
31705
  static getSettingsCircuitBreaker(e) {
31708
31706
  return ce(this, null, function* () {
31709
- return e ? (yield jt.instanceWithRetries.get(`/sdk/settings/hosted/${e}`, {})).data : t6;
31707
+ return e ? (yield Ft.instanceWithRetries.get(`/sdk/settings/hosted/${e}`, {})).data : t6;
31710
31708
  });
31711
31709
  }
31712
31710
  }
@@ -31718,7 +31716,7 @@ const Xm = (t) => ce(void 0, null, function* () {
31718
31716
  Dr.currentSetting = t6[0];
31719
31717
  return;
31720
31718
  }
31721
- const e = jt.getConfig().VITE_ENV === "sandbox" ? K7 : yield Dr.getSettingsCircuitBreaker(t.additional_info.platform.toLowerCase());
31719
+ const e = Ft.getConfig().VITE_ENV === "sandbox" ? K7 : yield Dr.getSettingsCircuitBreaker(t.additional_info.platform.toLowerCase());
31722
31720
  Dr.currentSetting = e.map((n) => n)[0];
31723
31721
  });
31724
31722
  class mr {
@@ -32168,14 +32166,14 @@ const Y2 = (t, e = () => {
32168
32166
  };
32169
32167
  return {
32170
32168
  validate: (d) => (e(!0), new Promise((l) => {
32171
- const c = String(d).replace(/\D/g, "").substring(0, 6), u = Uv(c), h = (u == null ? void 0 : u.type) !== "DEFAULT" ? u.type : null;
32169
+ const c = String(d).replace(/\D/g, "").substring(0, 9), u = Uv(c), h = (u == null ? void 0 : u.type) !== "DEFAULT" ? u.type : null;
32172
32170
  r(h), clearTimeout(j_), j_ = setTimeout(() => ce(void 0, null, function* () {
32173
32171
  var p, m;
32174
32172
  if (c === F_) {
32175
32173
  n(!0), e(!1), l(!0);
32176
32174
  return;
32177
32175
  }
32178
- if (c.length !== 6) {
32176
+ if (c.length !== 9) {
32179
32177
  a(l);
32180
32178
  return;
32181
32179
  }
@@ -32269,7 +32267,7 @@ const J2 = [
32269
32267
  return t;
32270
32268
  }
32271
32269
  }, xi = (t, e = "payment_request", n = !1) => ce(void 0, null, function* () {
32272
- const i = `/sdk/${e === "token" ? "payment-link" : "payment_request"}/${t}${n && e === "payment_request" ? "?legacy=false" : ""}`, o = yield jt.instanceWithRetries.get(i, {}), a = e === "token" ? {
32270
+ const i = `/sdk/${e === "token" ? "payment-link" : "payment_request"}/${t}${n && e === "payment_request" ? "?legacy=false" : ""}`, o = yield Ft.instanceWithRetries.get(i, {}), a = e === "token" ? {
32273
32271
  data: {
32274
32272
  response: o.data
32275
32273
  }
@@ -32330,7 +32328,7 @@ const J2 = [
32330
32328
  };
32331
32329
  jv.getInstallmentPlans = (t, e, n, r) => ce(void 0, null, function* () {
32332
32330
  try {
32333
- const { data: s } = yield jt.instanceWithRetries.get("/sdk/installment/stores/" + t, {
32331
+ const { data: s } = yield Ft.instanceWithRetries.get("/sdk/installment/stores/" + t, {
32334
32332
  params: {
32335
32333
  paymentRequestId: e,
32336
32334
  platform: n,
@@ -32412,7 +32410,7 @@ Md.remainingTime = 0;
32412
32410
  Md.pollingServiceInstance = new Md();
32413
32411
  let pn = Md;
32414
32412
  const e0 = (t) => ce(void 0, null, function* () {
32415
- return Object.values(t).some((r) => r === void 0) ? [] : (jt.getConfig().VITE_ENV === "sandbox" ? { data: [] } : yield jt.instanceWithRetries.get("/sdk/promotions", {
32413
+ return Object.values(t).some((r) => r === void 0) ? [] : (Ft.getConfig().VITE_ENV === "sandbox" ? { data: [] } : yield Ft.instanceWithRetries.get("/sdk/promotions", {
32416
32414
  params: t
32417
32415
  })).data;
32418
32416
  });
@@ -41715,7 +41713,7 @@ const Ku = rA, Gs = class extends EventTarget {
41715
41713
  }
41716
41714
  static getSignedUrl() {
41717
41715
  return ce(this, null, function* () {
41718
- const e = jt.getConfig(), n = hA.region === e.VITE_COGNITO_REGION_1 ? e.VITE_COGNITO_REGION_1 : e.VITE_COGNITO_REGION_2, r = n === e.VITE_COGNITO_REGION_1 ? e.VITE_IDENTITY_POOL_ID_1 : e.VITE_IDENTITY_POOL_ID_2, s = "execute-api", i = hA.region === e.VITE_COGNITO_REGION_1 ? `${e.VITE_WS_DOMAIN_REGION_1}/notify` : `${e.VITE_WS_DOMAIN_REGION_2}/notify`;
41716
+ const e = Ft.getConfig(), n = hA.region === e.VITE_COGNITO_REGION_1 ? e.VITE_COGNITO_REGION_1 : e.VITE_COGNITO_REGION_2, r = n === e.VITE_COGNITO_REGION_1 ? e.VITE_IDENTITY_POOL_ID_1 : e.VITE_IDENTITY_POOL_ID_2, s = "execute-api", i = hA.region === e.VITE_COGNITO_REGION_1 ? `${e.VITE_WS_DOMAIN_REGION_1}/notify` : `${e.VITE_WS_DOMAIN_REGION_2}/notify`;
41719
41717
  t0.configure({ identityPoolId: r, identityPoolRegion: n, identityPoolService: s });
41720
41718
  const o = nb.essentialCredentials(yield nb.currentCredentials());
41721
41719
  return bR.signUrl(
@@ -41797,7 +41795,7 @@ let Bi = class extends qe {
41797
41795
  const e = t.target, r = e.value.replace(/\D/g, ""), s = rb(r);
41798
41796
  e.value = s;
41799
41797
  const i = s.replace(/\s/g, "");
41800
- i.length === 16 ? this.shouldValidateBin ? yield kT(i.slice(0, 6)).then((a) => {
41798
+ i.length === 16 ? this.shouldValidateBin ? yield kT(i.slice(0, 9)).then((a) => {
41801
41799
  this.validCredit = a.response.data.bines, this.validCredit && this.validCredit.brand === "NARANJA" ? (this.isError = !1, this.isBrand = !0, this.isTouched = !0) : (this.isTouched = !0, this.isBrand = !1, this.isError = !0);
41802
41800
  }).catch((a) => {
41803
41801
  ie.error("HANDLE-INPUT-ERROR", {}, a), this.serviceError();
@@ -43241,7 +43239,7 @@ let ho = class t extends qe {
43241
43239
  }, this.messageError = Ve({}, this.messageErrorDefault), this._setTokenTask = new q6(this, {
43242
43240
  args: () => [this.publicKey],
43243
43241
  task: () => ce(this, null, function* () {
43244
- jt.setConfig(this.env), this.payfacContext.config = jt.getConfig(), this.payfacContext.isEmbedded = this.isEmbedded === "true", this.payfacContext.paymentSync = this.paymentSync === "true", this.payfacContext.paymentLinkId = this.paymentLinkId;
43242
+ Ft.setConfig(this.env), this.payfacContext.config = Ft.getConfig(), this.payfacContext.isEmbedded = this.isEmbedded === "true", this.payfacContext.paymentSync = this.paymentSync === "true", this.payfacContext.paymentLinkId = this.paymentLinkId;
43245
43243
  try {
43246
43244
  const e = yield hA.createToken(
43247
43245
  this.publicKey,
@@ -43318,7 +43316,7 @@ let ho = class t extends qe {
43318
43316
  }
43319
43317
  firstUpdated(e) {
43320
43318
  return ce(this, null, function* () {
43321
- z7(jt.getConfig()), tn(t.prototype, this, "firstUpdated").call(this, e);
43319
+ z7(Ft.getConfig()), tn(t.prototype, this, "firstUpdated").call(this, e);
43322
43320
  });
43323
43321
  }
43324
43322
  connectedCallback() {
@@ -44903,7 +44901,7 @@ let $t = class extends qe {
44903
44901
  handleInput(t) {
44904
44902
  const e = t.target;
44905
44903
  if (this.value = e.type === "checkbox" ? e.checked ? "true" : "false" : e.value, this.name === "doc_number" && (this.value = Rp(this.value, this.docType)), this.name === "creditNumber") {
44906
- const n = this.value.replace(/\s/g, "").slice(0, 6), r = Uv(n);
44904
+ const n = this.value.replace(/\s/g, "").slice(0, 9), r = Uv(n);
44907
44905
  this.dispatchEvent(
44908
44906
  new CustomEvent("input-event-credit-number", {
44909
44907
  bubbles: !0,
@@ -46762,7 +46760,7 @@ let Am = class t extends qe {
46762
46760
  }
46763
46761
  _loadFraudScripts() {
46764
46762
  return ce(this, null, function* () {
46765
- const e = jt.getConfig();
46763
+ const e = Ft.getConfig();
46766
46764
  if (!this.contextFraudPreventionData.config)
46767
46765
  throw new Error("Unable to load fraud prevention tooling");
46768
46766
  if (this.contextFraudPreventionData.config.option === "SIFT") {
@@ -49913,7 +49911,7 @@ let yo = class t extends qe {
49913
49911
  this._statePaymentManualInput.installment
49914
49912
  );
49915
49913
  yield h2(e), pn.isPollingRunning() && pn.stopPolling("manual");
49916
- const n = jt.getConfig().VITE_ENV === "staging" ? 5 : 1;
49914
+ const n = Ft.getConfig().VITE_ENV === "staging" ? 5 : 1;
49917
49915
  pn.startPolling(
49918
49916
  this._statePaymentManualInput.statePaymentRequest.id,
49919
49917
  this._payfacContextData.context,
@@ -62884,7 +62882,7 @@ function(t) {
62884
62882
  */
62885
62883
  function(t) {
62886
62884
  function e() {
62887
- return (mt.canvg ? Promise.resolve(mt.canvg) : import("./index.es-b13d1d67.js")).catch(function(n) {
62885
+ return (mt.canvg ? Promise.resolve(mt.canvg) : import("./index.es-00aa3e80.js")).catch(function(n) {
62888
62886
  return Promise.reject(new Error("Could not load canvg: " + n));
62889
62887
  }).then(function(n) {
62890
62888
  return n.default ? n.default : n;
@@ -64786,7 +64784,7 @@ let Gr = class extends qe {
64786
64784
  });
64787
64785
  }
64788
64786
  _getMasterSDKUrl() {
64789
- const t = jt.getConfig(), e = this._c2pProps.dpaId, n = this._c2pProps.locale;
64787
+ const t = Ft.getConfig(), e = this._c2pProps.dpaId, n = this._c2pProps.locale;
64790
64788
  return `${t.VITE_MASTER_BASE_URL}/srci/integration/2/lib.js?srcDpaId=${e}&locale=${n}`;
64791
64789
  }
64792
64790
  _getInitPayload() {
@@ -65134,7 +65132,7 @@ let Ui = class extends vo {
65134
65132
  validate: (n) => {
65135
65133
  if (!n)
65136
65134
  return !1;
65137
- const r = n.replace(/\s/g, "").slice(0, 6), s = r6(r, zE);
65135
+ const r = n.replace(/\s/g, "").slice(0, 9), s = r6(r, zE);
65138
65136
  return s != null && s.brand && s.brand !== "null" && (this._stateC2P.cardBrand = s.brand, this._cardBrand = s.brand), (s == null ? void 0 : s.brand) !== "null";
65139
65137
  },
65140
65138
  errorMessage: "La tarjeta no es válida."
@@ -65186,7 +65184,7 @@ let Ui = class extends vo {
65186
65184
  expired: this.formData.dateExpired.formatted,
65187
65185
  codSeg: this.formData.cvc,
65188
65186
  cardBrand: this._cardBrand,
65189
- bin: this.formData.creditNumber.replace(/\s/g, "").slice(0, 6)
65187
+ bin: this.formData.creditNumber.replace(/\s/g, "").slice(0, 9)
65190
65188
  };
65191
65189
  this.dispatchEvent(
65192
65190
  new CustomEvent("newCardSelected", {
@@ -65205,7 +65203,7 @@ let Ui = class extends vo {
65205
65203
  expired: e,
65206
65204
  codSeg: this.formData.cvc,
65207
65205
  cardBrand: this._cardBrand,
65208
- bin: this.formData.creditNumber.replace(/\s/g, "").slice(0, 6),
65206
+ bin: this.formData.creditNumber.replace(/\s/g, "").slice(0, 9),
65209
65207
  useC2p: this._shouldAddCard
65210
65208
  };
65211
65209
  this.dispatchEvent(
@@ -67279,7 +67277,7 @@ let as = class t extends vo {
67279
67277
  validate: (r) => {
67280
67278
  if (!r)
67281
67279
  return !1;
67282
- const s = r.replace(/\s/g, "").slice(0, 6), i = r6(s, zE);
67280
+ const s = r.replace(/\s/g, "").slice(0, 9), i = r6(s, zE);
67283
67281
  return i != null && i.brand && i.brand !== "null" && (this._cardBrand = i.brand), (i == null ? void 0 : i.brand) !== "null";
67284
67282
  },
67285
67283
  errorMessage: "La tarjeta no es válida."
@@ -67377,7 +67375,7 @@ let as = class t extends vo {
67377
67375
  creditNumber: this.formData.creditNumber.trim().replace(/\s/g, ""),
67378
67376
  expired: this.formData.dateExpired.formatted,
67379
67377
  codSeg: this.formData.cvc,
67380
- bin: this.formData.creditNumber.replace(/\s/g, "").slice(0, 6),
67378
+ bin: this.formData.creditNumber.replace(/\s/g, "").slice(0, 9),
67381
67379
  cardBrand: this._cardBrand
67382
67380
  }) : e = {
67383
67381
  bin: this._digitalCardData.panBin,
@@ -67595,7 +67593,7 @@ let _r = class t extends qe {
67595
67593
  ], this._validateBinTask = new q6(this, {
67596
67594
  task: () => ce(this, null, function* () {
67597
67595
  var n, r, s, i, o;
67598
- const e = this.numericValue.slice(0, 6);
67596
+ const e = this.numericValue.slice(0, 9);
67599
67597
  if (this._stateC2p.bines = e, e.length === 6) {
67600
67598
  try {
67601
67599
  this._plansData = yield Ul((n = this._stateC2p) == null ? void 0 : n.statePaymentRequest, e), this._plansData && (this._codeError = this._plansData.plans.code);
@@ -1,4 +1,4 @@
1
- import { c as Ke, _ as za, g as _o } from "./index-4cc91b77.js";
1
+ import { c as Ke, _ as za, g as _o } from "./index-61da1334.js";
2
2
  var vt = function(a) {
3
3
  return a && a.Math === Math && a;
4
4
  }, V = (
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as n, am as o, ai as t, al as e, ab as r, ap as C, an as p, ao as A, ac as m, a9 as i, ah as l, ag as u, aa as d, l as c, ak as P, aj as F, ad as S, ae as y, af as I, R as M, B as O, a8 as k, X as H, U as L, a1 as f, T as g, a2 as D, a3 as v, a4 as b, h as x, f as E, a7 as h, a6 as B, V as Q, W as j, Y as w, Z as N, $ as q, C as z, k as G, x as J, a as K, d as R, a5 as T, D as U, a0 as V, E as W, e as X, m as Y, b as Z, F as $, I as _, M as aa, L as sa, N as na, P as oa, n as ta, z as ea, G as ra, y as Ca, O as pa, H as Aa, J as ma, K as ia, Q as la, S as ua, o as da, j as ca, p as Pa, q as Fa, r as Sa, i as ya, v as Ia, s as Ma, t as Oa, u as ka, w as Ha } from "./index-4cc91b77.js";
1
+ import { A as n, am as o, ai as t, al as e, ab as r, ap as C, an as p, ao as A, ac as m, a9 as i, ah as l, ag as u, aa as d, l as c, ak as P, aj as F, ad as S, ae as y, af as I, R as M, B as O, a8 as k, X as H, U as L, a1 as f, T as g, a2 as D, a3 as v, a4 as b, h as x, f as E, a7 as h, a6 as B, V as Q, W as j, Y as w, Z as N, $ as q, C as z, k as G, x as J, a as K, d as R, a5 as T, D as U, a0 as V, E as W, e as X, m as Y, b as Z, F as $, I as _, M as aa, L as sa, N as na, P as oa, n as ta, z as ea, G as ra, y as Ca, O as pa, H as Aa, J as ma, K as ia, Q as la, S as ua, o as da, j as ca, p as Pa, q as Fa, r as Sa, i as ya, v as Ia, s as Ma, t as Oa, u as ka, w as Ha } from "./index-61da1334.js";
2
2
  export {
3
3
  n as A2AAccountComponent,
4
4
  o as A2AAccountDetails,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ranty/ranty-sdk",
3
- "version": "3.5.0-beta.6",
3
+ "version": "3.6.0-beta.0",
4
4
  "description": "Ranty sdk",
5
5
  "main": "dist/index.js",
6
6
  "exports": {