@leatcom/portal-sessions 0.0.32 → 0.0.34

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.
@@ -3234,7 +3234,7 @@ function Zf(e, t) {
3234
3234
  });
3235
3235
  });
3236
3236
  }
3237
- class Ct {
3237
+ class _t {
3238
3238
  constructor(t) {
3239
3239
  t && this.set(t);
3240
3240
  }
@@ -3352,8 +3352,8 @@ class Ct {
3352
3352
  return ee.isArray(t) ? t.forEach(a) : a(t), this;
3353
3353
  }
3354
3354
  }
3355
- Ct.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
3356
- ee.reduceDescriptors(Ct.prototype, ({ value: e }, t) => {
3355
+ _t.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
3356
+ ee.reduceDescriptors(_t.prototype, ({ value: e }, t) => {
3357
3357
  let n = t[0].toUpperCase() + t.slice(1);
3358
3358
  return {
3359
3359
  get: () => e,
@@ -3362,9 +3362,9 @@ ee.reduceDescriptors(Ct.prototype, ({ value: e }, t) => {
3362
3362
  }
3363
3363
  };
3364
3364
  });
3365
- ee.freezeMethods(Ct);
3365
+ ee.freezeMethods(_t);
3366
3366
  function oo(e, t) {
3367
- const n = this || Kr, r = t || n, i = Ct.from(r.headers);
3367
+ const n = this || Kr, r = t || n, i = _t.from(r.headers);
3368
3368
  let a = r.data;
3369
3369
  return ee.forEach(e, function(c) {
3370
3370
  a = c.call(n, a, i.normalize(), t ? t.status : void 0);
@@ -3505,7 +3505,7 @@ function ah(e, t) {
3505
3505
  function du(e, t) {
3506
3506
  return e && !oh(t) ? ah(e, t) : t;
3507
3507
  }
3508
- const Es = (e) => e instanceof Ct ? { ...e } : e;
3508
+ const Es = (e) => e instanceof _t ? { ...e } : e;
3509
3509
  function Rn(e, t) {
3510
3510
  t = t || {};
3511
3511
  const n = {};
@@ -3575,7 +3575,7 @@ function Rn(e, t) {
3575
3575
  const fu = (e) => {
3576
3576
  const t = Rn({}, e);
3577
3577
  let { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: a, headers: s, auth: c } = t;
3578
- t.headers = s = Ct.from(s), t.url = au(du(t.baseURL, t.url), e.params, e.paramsSerializer), c && s.set(
3578
+ t.headers = s = _t.from(s), t.url = au(du(t.baseURL, t.url), e.params, e.paramsSerializer), c && s.set(
3579
3579
  "Authorization",
3580
3580
  "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
3581
3581
  );
@@ -3597,7 +3597,7 @@ const fu = (e) => {
3597
3597
  return new Promise(function(n, r) {
3598
3598
  const i = fu(e);
3599
3599
  let a = i.data;
3600
- const s = Ct.from(i.headers).normalize();
3600
+ const s = _t.from(i.headers).normalize();
3601
3601
  let { responseType: c } = i, f;
3602
3602
  function g() {
3603
3603
  i.cancelToken && i.cancelToken.unsubscribe(f), i.signal && i.signal.removeEventListener("abort", f);
@@ -3607,7 +3607,7 @@ const fu = (e) => {
3607
3607
  function x() {
3608
3608
  if (!h)
3609
3609
  return;
3610
- const v = Ct.from(
3610
+ const v = _t.from(
3611
3611
  "getAllResponseHeaders" in h && h.getAllResponseHeaders()
3612
3612
  ), u = {
3613
3613
  data: !c || c === "text" || c === "json" ? h.responseText : h.response,
@@ -3815,7 +3815,7 @@ const hh = async (e) => {
3815
3815
  return !b && d(), o && o(), await new Promise((C, E) => {
3816
3816
  cu(C, E, {
3817
3817
  data: S,
3818
- headers: Ct.from(y.headers),
3818
+ headers: _t.from(y.headers),
3819
3819
  status: y.status,
3820
3820
  statusText: y.statusText,
3821
3821
  config: e,
@@ -3880,7 +3880,7 @@ function ao(e) {
3880
3880
  throw new qn(null, e);
3881
3881
  }
3882
3882
  function Rs(e) {
3883
- return ao(e), e.headers = Ct.from(e.headers), e.data = oo.call(
3883
+ return ao(e), e.headers = _t.from(e.headers), e.data = oo.call(
3884
3884
  e,
3885
3885
  e.transformRequest
3886
3886
  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), pu.getAdapter(e.adapter || Kr.adapter)(e).then(function(r) {
@@ -3888,13 +3888,13 @@ function Rs(e) {
3888
3888
  e,
3889
3889
  e.transformResponse,
3890
3890
  r
3891
- ), r.headers = Ct.from(r.headers), r;
3891
+ ), r.headers = _t.from(r.headers), r;
3892
3892
  }, function(r) {
3893
3893
  return uu(r) || (ao(e), r && r.response && (r.response.data = oo.call(
3894
3894
  e,
3895
3895
  e.transformResponse,
3896
3896
  r.response
3897
- ), r.response.headers = Ct.from(r.response.headers))), Promise.reject(r);
3897
+ ), r.response.headers = _t.from(r.response.headers))), Promise.reject(r);
3898
3898
  });
3899
3899
  }
3900
3900
  const mu = "1.7.1", Sa = {};
@@ -3997,7 +3997,7 @@ class _n {
3997
3997
  (o) => {
3998
3998
  delete a[o];
3999
3999
  }
4000
- ), n.headers = Ct.concat(s, a);
4000
+ ), n.headers = _t.concat(s, a);
4001
4001
  const c = [];
4002
4002
  let f = !0;
4003
4003
  this.interceptors.request.forEach(function(u) {
@@ -4229,7 +4229,7 @@ st.all = function(t) {
4229
4229
  st.spread = vh;
4230
4230
  st.isAxiosError = bh;
4231
4231
  st.mergeConfig = Rn;
4232
- st.AxiosHeaders = Ct;
4232
+ st.AxiosHeaders = _t;
4233
4233
  st.formToJSON = (e) => lu(ee.isHTMLForm(e) ? new FormData(e) : e);
4234
4234
  st.getAdapter = pu.getAdapter;
4235
4235
  st.HttpStatusCode = Mo;
@@ -4394,10 +4394,10 @@ function Sh() {
4394
4394
  process.env.NODE_ENV === "production" ? Fo.exports = Eh() : Fo.exports = Sh();
4395
4395
  var Oh = Fo.exports;
4396
4396
  const pn = () => {
4397
- }, Ot = (
4397
+ }, Ct = (
4398
4398
  /*#__NOINLINE__*/
4399
4399
  pn()
4400
- ), uo = Object, Ke = (e) => e === Ot, Yt = (e) => typeof e == "function", vn = (e, t) => ({
4400
+ ), uo = Object, Ke = (e) => e === Ct, Yt = (e) => typeof e == "function", vn = (e, t) => ({
4401
4401
  ...e,
4402
4402
  ...t
4403
4403
  }), Ch = (e) => Yt(e.then), ei = /* @__PURE__ */ new WeakMap();
@@ -4548,25 +4548,25 @@ async function xu(...e) {
4548
4548
  } else
4549
4549
  C && R && g(C) && (s = !0, u({
4550
4550
  data: M,
4551
- _c: Ot
4551
+ _c: Ct
4552
4552
  }));
4553
4553
  if (s && !C)
4554
4554
  if (Yt(s)) {
4555
4555
  const F = s(S, M);
4556
4556
  u({
4557
4557
  data: F,
4558
- error: Ot,
4559
- _c: Ot
4558
+ error: Ct,
4559
+ _c: Ct
4560
4560
  });
4561
4561
  } else
4562
4562
  u({
4563
4563
  data: S,
4564
- error: Ot,
4565
- _c: Ot
4564
+ error: Ct,
4565
+ _c: Ct
4566
4566
  });
4567
4567
  if (d[v][1] = Ho(), Promise.resolve(b()).then(() => {
4568
4568
  u({
4569
- _c: Ot
4569
+ _c: Ct
4570
4570
  });
4571
4571
  }), C) {
4572
4572
  if (h)
@@ -4581,7 +4581,7 @@ const Ls = (e, t) => {
4581
4581
  e[n][0] && e[n][0](t);
4582
4582
  }, Mh = (e, t) => {
4583
4583
  if (!an.has(e)) {
4584
- const n = vn(Lh, t), r = {}, i = xu.bind(Ot, e);
4584
+ const n = vn(Lh, t), r = {}, i = xu.bind(Ct, e);
4585
4585
  let a = pn;
4586
4586
  const s = {}, c = (h, x) => {
4587
4587
  const l = s[h] || [];
@@ -4602,7 +4602,7 @@ const Ls = (e, t) => {
4602
4602
  f,
4603
4603
  c
4604
4604
  ]), !Tr)) {
4605
- const h = n.initFocus(setTimeout.bind(Ot, Ls.bind(Ot, r, vu))), x = n.initReconnect(setTimeout.bind(Ot, Ls.bind(Ot, r, bu)));
4605
+ const h = n.initFocus(setTimeout.bind(Ct, Ls.bind(Ct, r, vu))), x = n.initReconnect(setTimeout.bind(Ct, Ls.bind(Ct, r, bu)));
4606
4606
  a = () => {
4607
4607
  h && h(), x && x(), an.delete(e);
4608
4608
  };
@@ -4765,7 +4765,7 @@ const Is = $e.use || ((e) => {
4765
4765
  Ho()
4766
4766
  ]), [W, G] = u[d], W = await W, de && setTimeout(oe, n.dedupingInterval), !u[d] || u[d][1] !== G)
4767
4767
  return de && ne() && R().onDiscarded(d), !1;
4768
- re.error = Ot;
4768
+ re.error = Ct;
4769
4769
  const xe = o[d];
4770
4770
  if (!Ke(xe) && // case 1
4771
4771
  (G <= xe[0] || // case 2
@@ -4813,7 +4813,7 @@ const Is = $e.use || ((e) => {
4813
4813
  }), fo(() => {
4814
4814
  if (!d)
4815
4815
  return;
4816
- const j = T.bind(Ot, po);
4816
+ const j = T.bind(Ct, po);
4817
4817
  let q = 0;
4818
4818
  const G = Xh(d, v, ($, le = {}) => {
4819
4819
  if ($ == nr.FOCUS_EVENT) {
@@ -4969,7 +4969,7 @@ const Is = $e.use || ((e) => {
4969
4969
  }, qo = "/api/v1/portal-sessions/", Vi = {
4970
4970
  create: (e) => at.instance.post(qo, e),
4971
4971
  setContact: (e, t) => at.instance.put(qo + e, t)
4972
- }, _t = () => {
4972
+ }, St = () => {
4973
4973
  const { sessionUuid: e } = Nn(), { data: t, error: n, isLoading: r, isValidating: i, mutate: a } = bn(qo + e);
4974
4974
  return {
4975
4975
  session: t == null ? void 0 : t.data.data,
@@ -8382,7 +8382,7 @@ function Au() {
8382
8382
  } };
8383
8383
  }
8384
8384
  function Lu() {
8385
- const [e, t] = Ne(!1), n = qe(null), r = qe(null), i = qe(null), [a, s] = Ne(), { session: c } = _t(), { initialize: f, terminate: g } = Au(), h = (u) => {
8385
+ const [e, t] = Ne(!1), n = qe(null), r = qe(null), i = qe(null), [a, s] = Ne(), { session: c } = St(), { initialize: f, terminate: g } = Au(), h = (u) => {
8386
8386
  var p, d;
8387
8387
  r.current = document.getElementById(u.detail.inputId), (p = n.current) == null || p.setInput(u.detail.inputValue), (d = r.current) == null || d.addEventListener("input", (m) => {
8388
8388
  var b;
@@ -8862,7 +8862,7 @@ function nt(e) {
8862
8862
  });
8863
8863
  }
8864
8864
  function ja({ callback: e }) {
8865
- const t = Nn(), { t: n } = nt(), [r, i] = Ne(""), [a, s] = Ne(!1), [c, f] = Ne(!1), { session: g, mutate: h } = _t(), x = g == null ? void 0 : g.input_data.scanner_type, [l, v] = Ne(""), o = async (d) => {
8865
+ const t = Nn(), { t: n } = nt(), [r, i] = Ne(""), [a, s] = Ne(!1), [c, f] = Ne(!1), { session: g, mutate: h } = St(), x = g == null ? void 0 : g.input_data.scanner_type, [l, v] = Ne(""), o = async (d) => {
8866
8866
  if (t.onContactLink) {
8867
8867
  const {
8868
8868
  data: { data: m }
@@ -9805,7 +9805,7 @@ var um = (e, t = "end") => (n) => {
9805
9805
  easeOutBounce: ii,
9806
9806
  easeInOutBounce: (e) => e < 0.5 ? (1 - ii(1 - 2 * e)) / 2 : (1 + ii(2 * e - 1)) / 2,
9807
9807
  steps: um
9808
- }, Nr = Symbol.for("FluidValue.get"), Vn = Symbol.for("FluidValue.observers"), At = (e) => !!(e && e[Nr]), St = (e) => e && e[Nr] ? e[Nr]() : e, Ws = (e) => e[Vn] || null;
9808
+ }, Nr = Symbol.for("FluidValue.get"), Vn = Symbol.for("FluidValue.observers"), At = (e) => !!(e && e[Nr]), Ot = (e) => e && e[Nr] ? e[Nr]() : e, Ws = (e) => e[Vn] || null;
9809
9809
  function dm(e, t) {
9810
9810
  e.eventObserved ? e.eventObserved(t) : e(t);
9811
9811
  }
@@ -9871,7 +9871,7 @@ var Ju = (e, t, n) => Object.defineProperty(e, t, {
9871
9871
  // never match
9872
9872
  /^\b$/
9873
9873
  ));
9874
- const t = e.output.map((a) => St(a).replace(qi, Yu).replace(hm, Hs).replace(yo, Hs)), n = t.map((a) => a.match(fi).map(Number)), i = n[0].map(
9874
+ const t = e.output.map((a) => Ot(a).replace(qi, Yu).replace(hm, Hs).replace(yo, Hs)), n = t.map((a) => a.match(fi).map(Number)), i = n[0].map(
9875
9875
  (a, s) => n.map((c) => {
9876
9876
  if (!(s in c))
9877
9877
  throw Error('The arity of each "output" value must be equal');
@@ -10021,7 +10021,7 @@ var Ir = Symbol.for("Animated:node"), Cm = (e) => !!e && e[Ir] === e, Jt = (e) =
10021
10021
  getValue(e) {
10022
10022
  const t = {};
10023
10023
  return tn(this.source, (n, r) => {
10024
- Cm(n) ? t[r] = n.getValue(e) : At(n) ? t[r] = St(n) : e || (t[r] = n);
10024
+ Cm(n) ? t[r] = n.getValue(e) : At(n) ? t[r] = Ot(n) : e || (t[r] = n);
10025
10025
  }), t;
10026
10026
  }
10027
10027
  /** Replace the raw object data */
@@ -10208,7 +10208,7 @@ function oc(e) {
10208
10208
  return { ...e };
10209
10209
  }
10210
10210
  function kr(e) {
10211
- return e = St(e), he.arr(e) ? e.map(kr) : Wi(e) ? Kt.createStringInterpolator({
10211
+ return e = Ot(e), he.arr(e) ? e.map(kr) : Wi(e) ? Kt.createStringInterpolator({
10212
10212
  range: [0, 1],
10213
10213
  output: [e, e]
10214
10214
  })(1) : e;
@@ -10459,7 +10459,7 @@ var tl = class extends Error {
10459
10459
  return !(cn(this) || this._state.asyncTo) || rr(this);
10460
10460
  }
10461
10461
  get goal() {
10462
- return St(this.animation.to);
10462
+ return Ot(this.animation.to);
10463
10463
  }
10464
10464
  get velocity() {
10465
10465
  const e = Jt(this);
@@ -10497,7 +10497,7 @@ var tl = class extends Error {
10497
10497
  const r = this.animation;
10498
10498
  let { toValues: i } = r;
10499
10499
  const { config: a } = r, s = Gi(r.to);
10500
- !s && At(r.to) && (i = Tt(St(r.to))), r.values.forEach((g, h) => {
10500
+ !s && At(r.to) && (i = Tt(Ot(r.to))), r.values.forEach((g, h) => {
10501
10501
  if (g.done)
10502
10502
  return;
10503
10503
  const x = (
@@ -10539,7 +10539,7 @@ var tl = class extends Error {
10539
10539
  });
10540
10540
  const c = Jt(this), f = c.getValue();
10541
10541
  if (t) {
10542
- const g = St(r.to);
10542
+ const g = Ot(r.to);
10543
10543
  (f !== g || n) && !a.decay ? (c.setValue(g), this._onChange(g)) : n && a.decay && this._onChange(f), this._stop();
10544
10544
  } else
10545
10545
  n && this._onChange(f);
@@ -10609,7 +10609,7 @@ var tl = class extends Error {
10609
10609
  let { to: n, from: r } = e;
10610
10610
  n = he.obj(n) ? n[t] : n, (n == null || ta(n)) && (n = void 0), r = he.obj(r) ? r[t] : r, r == null && (r = void 0);
10611
10611
  const i = { to: n, from: r };
10612
- return vo(this) || (e.reverse && ([n, r] = [r, n]), r = St(r), he.und(r) ? Jt(this) || this._set(n) : this._set(r)), i;
10612
+ return vo(this) || (e.reverse && ([n, r] = [r, n]), r = Ot(r), he.und(r) ? Jt(this) || this._set(n) : this._set(r)), i;
10613
10613
  }
10614
10614
  /** Every update is processed by this method before merging. */
10615
10615
  _update({ ...e }, t) {
@@ -10674,7 +10674,7 @@ var tl = class extends Error {
10674
10674
  let { to: h = f, from: x = g } = e;
10675
10675
  i && !r && (!t.default || he.und(h)) && (h = x), t.reverse && ([h, x] = [x, h]);
10676
10676
  const l = !on(x, g);
10677
- l && (c.from = x), x = St(x);
10677
+ l && (c.from = x), x = Ot(x);
10678
10678
  const v = !on(h, f);
10679
10679
  v && this._focus(h);
10680
10680
  const o = ta(t.to), { config: u } = c, { decay: p, velocity: d } = u;
@@ -10739,7 +10739,7 @@ var tl = class extends Error {
10739
10739
  * and return the `Animated` node.
10740
10740
  */
10741
10741
  _set(e, t = !0) {
10742
- const n = St(e);
10742
+ const n = Ot(e);
10743
10743
  if (!he.und(n)) {
10744
10744
  const r = Jt(this);
10745
10745
  if (!r || !on(n, r.getValue())) {
@@ -10768,7 +10768,7 @@ var tl = class extends Error {
10768
10768
  // is added to the frameloop.
10769
10769
  _start() {
10770
10770
  const e = this.animation;
10771
- Jt(this).reset(St(e.to)), e.immediate || (e.fromValues = e.values.map((t) => t.lastPosition)), cn(this) || (rl(this, !0), rr(this) || this._resume());
10771
+ Jt(this).reset(Ot(e.to)), e.immediate || (e.fromValues = e.values.map((t) => t.lastPosition)), cn(this) || (rl(this, !0), rr(this) || this._resume());
10772
10772
  }
10773
10773
  _resume() {
10774
10774
  Kt.skipAnimation ? this.finish() : Ki.start(this);
@@ -11168,7 +11168,7 @@ var Zm = class extends Ka {
11168
11168
  on(t, n) || (Jt(this).setValue(t), this._onChange(t, this.idle)), !this.idle && ll(this._active) && bo(this);
11169
11169
  }
11170
11170
  _get() {
11171
- const e = he.arr(this.source) ? this.source.map(St) : Tt(St(this.source));
11171
+ const e = he.arr(this.source) ? this.source.map(Ot) : Tt(Ot(this.source));
11172
11172
  return this.calc(...e);
11173
11173
  }
11174
11174
  _start() {
@@ -11321,8 +11321,8 @@ var og = /^(matrix|translate|scale|rotate|skew)/, ag = /^(translate)/, sg = /^(r
11321
11321
  _get() {
11322
11322
  let e = "", t = !0;
11323
11323
  return Ue(this.inputs, (n, r) => {
11324
- const i = St(n[0]), [a, s] = this.transforms[r](
11325
- he.arr(i) ? i : n.map(St)
11324
+ const i = Ot(n[0]), [a, s] = this.transforms[r](
11325
+ he.arr(i) ? i : n.map(Ot)
11326
11326
  );
11327
11327
  e += " " + a, t = t && s;
11328
11328
  }), t ? "none" : e;
@@ -15509,7 +15509,7 @@ function Iv() {
15509
15509
  ] });
15510
15510
  }
15511
15511
  function Dv() {
15512
- const e = Mt(), { t } = nt(), { sessionUuid: n } = Nn(), { session: r, isLoading: i, mutate: a } = _t();
15512
+ const e = Mt(), { t } = nt(), { sessionUuid: n } = Nn(), { session: r, isLoading: i, mutate: a } = St();
15513
15513
  return Je(() => {
15514
15514
  if (!i && r) {
15515
15515
  const s = r.type in fn ? `/${r.type.toLowerCase()}` : "/";
@@ -15540,7 +15540,7 @@ Qn([
15540
15540
  }
15541
15541
  ]);
15542
15542
  function ga() {
15543
- const { t: e } = nt(), [t, n] = Ne(""), [r, i] = Ne(!1), { session: a } = _t(), s = Mt(), c = a == null ? void 0 : a.input_data.scanner_type, f = Xt(() => a.results.remaining_amount ?? (a == null ? void 0 : a.input_data.amount_in_cents), [a]), g = Xt(async () => {
15543
+ const { t: e } = nt(), [t, n] = Ne(""), [r, i] = Ne(!1), { session: a } = St(), s = Mt(), c = a == null ? void 0 : a.input_data.scanner_type, f = Xt(() => a.results.remaining_amount ?? (a == null ? void 0 : a.input_data.amount_in_cents), [a]), g = Xt(async () => {
15544
15544
  i(!0);
15545
15545
  const {
15546
15546
  data: { data: h }
@@ -15557,7 +15557,7 @@ function ga() {
15557
15557
  ] }) }) });
15558
15558
  }
15559
15559
  function Kc() {
15560
- const { t: e } = nt(), { hash: t } = Fc(), { giftcard: n, mutate: r } = Ou(t), { session: i, mutate: a } = _t(), { onUseGiftcard: s } = Nn(), c = Mt(), f = (i == null ? void 0 : i.input_data.amount_in_cents) ?? 0, g = (i == null ? void 0 : i.input_data.allow_multiple_giftcards) ?? !0;
15560
+ const { t: e } = nt(), { hash: t } = Fc(), { giftcard: n, mutate: r } = Ou(t), { session: i, mutate: a } = St(), { onUseGiftcard: s } = Nn(), c = Mt(), f = (i == null ? void 0 : i.input_data.amount_in_cents) ?? 0, g = (i == null ? void 0 : i.input_data.allow_multiple_giftcards) ?? !0;
15561
15561
  if (!n)
15562
15562
  return /* @__PURE__ */ O.jsx(O.Fragment, { children: e("giftcardNotFound") });
15563
15563
  const h = async () => {
@@ -15849,7 +15849,7 @@ function Bv() {
15849
15849
  function Vv() {
15850
15850
  const { data: e, isLoading: t, mutate: n } = ap(), { mutate: r } = Bi(), { onClaimReward: i } = Nn(), { t: a } = nt(), s = async (c) => {
15851
15851
  const f = await op.claim(c);
15852
- await n(), await r(), Me.success(a("rewardClaimed", { name: f.data.data.title })), i && i(f.data.data);
15852
+ n(), r(), Me.success(a("rewardClaimed", { name: f.data.data.title })), i && i(f.data.data);
15853
15853
  };
15854
15854
  return /* @__PURE__ */ O.jsx(
15855
15855
  vc,
@@ -15862,9 +15862,9 @@ function Vv() {
15862
15862
  );
15863
15863
  }
15864
15864
  function Hv() {
15865
- const { data: e, isLoading: t, mutate: n } = up(), { onRedeemVoucher: r } = Nn(), { t: i } = nt(), a = async (s) => {
15866
- const c = await Go.redeemById(s), f = await n(), g = f == null ? void 0 : f.data.data.events;
15867
- ba(g), Me.success(i("voucherSuccessfullyRedeemed")), r && r(c.data.data);
15865
+ const { data: e, isLoading: t, mutate: n } = up(), { mutate: r } = St(), { onRedeemVoucher: i } = Nn(), { t: a } = nt(), s = async (c) => {
15866
+ const f = await Go.redeemById(c), g = await r(), h = g == null ? void 0 : g.data.data.events;
15867
+ ba(h), n(), Me.success(a("voucherSuccessfullyRedeemed")), i && i(f.data.data);
15868
15868
  };
15869
15869
  return /* @__PURE__ */ O.jsx(
15870
15870
  vc,
@@ -15872,14 +15872,14 @@ function Hv() {
15872
15872
  header: t ? [] : e.data.data.header.items,
15873
15873
  rows: t ? [] : e.data.data.rows,
15874
15874
  pending: t,
15875
- onClick: a
15875
+ onClick: s
15876
15876
  }
15877
15877
  );
15878
15878
  }
15879
15879
  function Kv() {
15880
15880
  const { t: e } = nt(), {
15881
15881
  session: { loyalty_program: t }
15882
- } = _t(), { contact: n, isLoading: r } = Bi();
15882
+ } = St(), { contact: n, isLoading: r } = Bi();
15883
15883
  if (r)
15884
15884
  return /* @__PURE__ */ O.jsx(O.Fragment, {});
15885
15885
  const i = [
@@ -15908,7 +15908,7 @@ function Kv() {
15908
15908
  ] });
15909
15909
  }
15910
15910
  function zv() {
15911
- const { t: e } = nt(), { session: t } = _t(), n = t.contact, [r, i] = Ne("rewards");
15911
+ const { t: e } = nt(), { session: t } = St(), n = t.contact, [r, i] = Ne("rewards");
15912
15912
  if (!n)
15913
15913
  return /* @__PURE__ */ O.jsx(O.Fragment, { children: e("contactNotFound") });
15914
15914
  const a = () => {
@@ -15951,7 +15951,7 @@ function zv() {
15951
15951
  ] }) }) });
15952
15952
  }
15953
15953
  function qv() {
15954
- const { session: e } = _t(), t = Mt(), { t: n } = nt();
15954
+ const { session: e } = St(), t = Mt(), { t: n } = nt();
15955
15955
  return /* @__PURE__ */ O.jsxs("div", { className: "m-auto flex flex-col items-center gap-4", children: [
15956
15956
  /* @__PURE__ */ O.jsx("p", { children: n("noContactLinked") }),
15957
15957
  /* @__PURE__ */ O.jsxs("div", { className: "flex gap-4", children: [
@@ -15966,11 +15966,11 @@ function ts() {
15966
15966
  return /* @__PURE__ */ O.jsx("div", { className: "container m-auto", children: /* @__PURE__ */ O.jsx(kt, { children: /* @__PURE__ */ O.jsx(ja, { callback: () => e("../") }) }) });
15967
15967
  }
15968
15968
  function Wc() {
15969
- const { session: e } = _t();
15969
+ const { session: e } = St();
15970
15970
  return e && (e.contact ? /* @__PURE__ */ O.jsx(zv, {}) : !e.input_data.enable_registration && !e.input_data.enable_email_identification ? /* @__PURE__ */ O.jsx(ts, {}) : /* @__PURE__ */ O.jsx(qv, {}));
15971
15971
  }
15972
15972
  function Gc() {
15973
- const [e, t] = Ne(""), { session: n, mutate: r } = _t(), i = Mt(), { t: a } = nt(), s = async () => {
15973
+ const [e, t] = Ne(""), { session: n, mutate: r } = St(), i = Mt(), { t: a } = nt(), s = async () => {
15974
15974
  n && (await Vi.setContact(n.uuid, { email: e }), await r(), Me.success(a("contactSavedToSession")), i("../"));
15975
15975
  };
15976
15976
  return /* @__PURE__ */ O.jsx("div", { className: "container m-auto", children: /* @__PURE__ */ O.jsx(kt, { children: /* @__PURE__ */ O.jsxs("div", { className: "flex flex-col gap-3", children: [
@@ -15990,7 +15990,7 @@ function Gc() {
15990
15990
  ] }) }) });
15991
15991
  }
15992
15992
  function Jc() {
15993
- const [e, t] = Ne(""), { session: n, mutate: r } = _t(), i = Mt(), { t: a } = nt(), s = async () => {
15993
+ const [e, t] = Ne(""), { session: n, mutate: r } = St(), i = Mt(), { t: a } = nt(), s = async () => {
15994
15994
  n && (await Ko.create(e), await r(), Me.success(a("contactSavedToSession")), i("../"));
15995
15995
  };
15996
15996
  return /* @__PURE__ */ O.jsx("div", { className: "container m-auto", children: /* @__PURE__ */ O.jsx(kt, { children: /* @__PURE__ */ O.jsxs("div", { className: "flex flex-col gap-3", children: [
@@ -16086,7 +16086,7 @@ Qn([
16086
16086
  }
16087
16087
  ]);
16088
16088
  function Xc() {
16089
- const { t: e } = nt(), [t, n] = Ne(""), [r, i] = Ne(!1), { session: a, mutate: s } = _t(), c = Mt(), f = async () => {
16089
+ const { t: e } = nt(), [t, n] = Ne(""), [r, i] = Ne(!1), { session: a, mutate: s } = St(), c = Mt(), f = async () => {
16090
16090
  if (t) {
16091
16091
  const {
16092
16092
  data: { data: g }
@@ -16113,7 +16113,7 @@ function Xc() {
16113
16113
  function Zc() {
16114
16114
  const { state: e } = wn(), { t } = nt(), {
16115
16115
  session: { loyalty_program: n }
16116
- } = _t(), { contact: r } = Bi();
16116
+ } = St(), { contact: r } = Bi();
16117
16117
  return /* @__PURE__ */ O.jsx("div", { className: "m-auto", children: /* @__PURE__ */ O.jsx(Iu, { children: /* @__PURE__ */ O.jsxs("div", { className: "mt-8 flex w-96 flex-col gap-4", children: [
16118
16118
  /* @__PURE__ */ O.jsxs(Ge, { size: "lg", weight: "bold", align: "center", children: [
16119
16119
  t("creditReceptionCreated"),
@@ -16156,7 +16156,7 @@ Qn([
16156
16156
  }
16157
16157
  ]);
16158
16158
  function ed() {
16159
- const { t: e } = nt(), [t, n] = Ne(""), [r, i] = Ne(""), [a, s] = Ne(!1), [c, f] = Ne(!1), { session: g, mutate: h } = _t(), x = g == null ? void 0 : g.input_data.scanner_type, l = Mt(), v = Xt(async () => {
16159
+ const { t: e } = nt(), [t, n] = Ne(""), [r, i] = Ne(""), [a, s] = Ne(!1), [c, f] = Ne(!1), { session: g, mutate: h } = St(), x = g == null ? void 0 : g.input_data.scanner_type, l = Mt(), v = Xt(async () => {
16160
16160
  r && await Vi.setContact(g.uuid, {
16161
16161
  contact_identifier_value: r
16162
16162
  });