@reservamos/browser-analytics 1.1.7-alpha.1 → 1.1.7

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.
@@ -24,8 +24,8 @@ var util;
24
24
  return util2.objectValues(filtered);
25
25
  };
26
26
  util2.objectValues = (obj) => {
27
- return util2.objectKeys(obj).map(function(e2) {
28
- return obj[e2];
27
+ return util2.objectKeys(obj).map(function(e3) {
28
+ return obj[e3];
29
29
  });
30
30
  };
31
31
  util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
@@ -89,8 +89,8 @@ const ZodParsedType = util.arrayToEnum([
89
89
  "set"
90
90
  ]);
91
91
  const getParsedType = (data) => {
92
- const t2 = typeof data;
93
- switch (t2) {
92
+ const t4 = typeof data;
93
+ switch (t4) {
94
94
  case "undefined":
95
95
  return ZodParsedType.undefined;
96
96
  case "string":
@@ -190,10 +190,10 @@ class ZodError extends Error {
190
190
  fieldErrors._errors.push(mapper(issue));
191
191
  } else {
192
192
  let curr = fieldErrors;
193
- let i2 = 0;
194
- while (i2 < issue.path.length) {
195
- const el = issue.path[i2];
196
- const terminal = i2 === issue.path.length - 1;
193
+ let i = 0;
194
+ while (i < issue.path.length) {
195
+ const el = issue.path[i];
196
+ const terminal = i === issue.path.length - 1;
197
197
  if (!terminal) {
198
198
  curr[el] = curr[el] || { _errors: [] };
199
199
  } else {
@@ -201,7 +201,7 @@ class ZodError extends Error {
201
201
  curr[el]._errors.push(mapper(issue));
202
202
  }
203
203
  curr = curr[el];
204
- i2++;
204
+ i++;
205
205
  }
206
206
  }
207
207
  }
@@ -463,8 +463,8 @@ function __classPrivateFieldSet(receiver, state, value, kind, f2) {
463
463
  return state.set(receiver, value), value;
464
464
  }
465
465
  typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
466
- var e2 = new Error(message);
467
- return e2.name = "SuppressedError", e2.error = error, e2.suppressed = suppressed, e2;
466
+ var e3 = new Error(message);
467
+ return e3.name = "SuppressedError", e3.error = error, e3.suppressed = suppressed, e3;
468
468
  };
469
469
  var errorUtil;
470
470
  (function(errorUtil2) {
@@ -2047,14 +2047,14 @@ class ZodArray extends ZodType {
2047
2047
  }
2048
2048
  }
2049
2049
  if (ctx.common.async) {
2050
- return Promise.all([...ctx.data].map((item, i2) => {
2051
- return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
2050
+ return Promise.all([...ctx.data].map((item, i) => {
2051
+ return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
2052
2052
  })).then((result2) => {
2053
2053
  return ParseStatus.mergeArray(status, result2);
2054
2054
  });
2055
2055
  }
2056
- const result = [...ctx.data].map((item, i2) => {
2057
- return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
2056
+ const result = [...ctx.data].map((item, i) => {
2057
+ return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
2058
2058
  });
2059
2059
  return ParseStatus.mergeArray(status, result);
2060
2060
  }
@@ -2982,7 +2982,7 @@ class ZodSet extends ZodType {
2982
2982
  }
2983
2983
  return { status: status.value, value: parsedSet };
2984
2984
  }
2985
- const elements = [...ctx.data.values()].map((item, i2) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i2)));
2985
+ const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
2986
2986
  if (ctx.common.async) {
2987
2987
  return Promise.all(elements).then((elements2) => finalizeSet(elements2));
2988
2988
  } else {
@@ -3070,13 +3070,13 @@ class ZodFunction extends ZodType {
3070
3070
  const me = this;
3071
3071
  return OK(async function(...args) {
3072
3072
  const error = new ZodError([]);
3073
- const parsedArgs = await me._def.args.parseAsync(args, params).catch((e2) => {
3074
- error.addIssue(makeArgsIssue(args, e2));
3073
+ const parsedArgs = await me._def.args.parseAsync(args, params).catch((e3) => {
3074
+ error.addIssue(makeArgsIssue(args, e3));
3075
3075
  throw error;
3076
3076
  });
3077
3077
  const result = await Reflect.apply(fn, this, parsedArgs);
3078
- const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e2) => {
3079
- error.addIssue(makeReturnsIssue(result, e2));
3078
+ const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e3) => {
3079
+ error.addIssue(makeReturnsIssue(result, e3));
3080
3080
  throw error;
3081
3081
  });
3082
3082
  return parsedReturns;
@@ -3921,52 +3921,420 @@ const customEventSchema = z.record(
3921
3921
  z.union([allowedPrimitiveSchema, z.array(allowedPrimitiveSchema)])
3922
3922
  );
3923
3923
  const eventNameSchema = z.string().min(1, "Event name is required");
3924
- let environment;
3925
- let appName;
3926
- const origin = window.location.origin;
3927
- const coreAPIConfig = {
3924
+ var e$3 = {
3928
3925
  sandbox: {
3929
- baseUrl: "https://datalake-api-dev.reservamossaas.com/api",
3930
- defaultHeaders: {
3931
- Origin: origin,
3932
- Authorization: "Bearer 753bf0710dc920a84236d42241d4f487"
3933
- }
3926
+ search: "https://search.resertravel.com/api",
3927
+ purchase: "https://purchases.resertravel.com/api",
3928
+ core: "",
3929
+ config: ""
3934
3930
  },
3935
- prod: {
3936
- baseUrl: "https://data-lake.reservamossaas.com/api",
3937
- defaultHeaders: {
3938
- Origin: origin,
3939
- Authorization: "Bearer 753bf0710dc920a84236d42241d4f487"
3940
- }
3931
+ production: {
3932
+ search: "https://search.reservamos.mx/api",
3933
+ purchase: "https://compras.reservamos.mx/api",
3934
+ core: "",
3935
+ config: ""
3936
+ }
3937
+ }, t$7 = "sandbox", n$6 = {
3938
+ env: t$7,
3939
+ headers: {},
3940
+ searchUrl: e$3[t$7].search,
3941
+ purchaseUrl: e$3[t$7].purchase,
3942
+ coreUrl: e$3[t$7].core,
3943
+ configUrl: e$3[t$7].config,
3944
+ version: "v2",
3945
+ coreVersion: "v1",
3946
+ configVersion: "v1",
3947
+ apiKey: void 0,
3948
+ userAuthToken: void 0,
3949
+ withCredentials: false
3950
+ }, r$6 = Object.assign({}, n$6);
3951
+ var e$2 = { 1: {
3952
+ code: 200,
3953
+ message: "Operación no autorizada"
3954
+ } }, t$6 = {
3955
+ 3: {
3956
+ code: 300,
3957
+ message: "Parámetros incorrectos"
3958
+ },
3959
+ 7: {
3960
+ code: 301,
3961
+ message: "Fecha inválida"
3962
+ }
3963
+ }, n$5 = {
3964
+ 10: {
3965
+ code: 400,
3966
+ message: "No existe el viaje"
3967
+ },
3968
+ 20: {
3969
+ code: 60,
3970
+ message: "No se encontró el viaje"
3971
+ },
3972
+ 21: {
3973
+ code: 60,
3974
+ message: "Tarifa no disponible"
3975
+ },
3976
+ 22: {
3977
+ code: 60,
3978
+ message: "Tarifa no disponible"
3979
+ }
3980
+ }, r$5 = (e3) => ({
3981
+ 11: {
3982
+ code: 500,
3983
+ message: e3
3984
+ },
3985
+ 12: {
3986
+ code: 501,
3987
+ message: e3
3988
+ }
3989
+ }), i$6 = {
3990
+ 23: {
3991
+ code: 60,
3992
+ message: "Estudiante no disponible"
3993
+ },
3994
+ 24: {
3995
+ code: 60,
3996
+ message: "Profesor no disponible"
3997
+ },
3998
+ 25: {
3999
+ code: 60,
4000
+ message: "Menor no disponible"
4001
+ },
4002
+ 26: {
4003
+ code: 60,
4004
+ message: "Capacidades diferentes no disponible"
4005
+ },
4006
+ 27: {
4007
+ code: 60,
4008
+ message: "INSEN no disponible"
4009
+ },
4010
+ 28: {
4011
+ code: 60,
4012
+ message: "General no disponible"
4013
+ },
4014
+ 29: {
4015
+ code: 60,
4016
+ message: "Error desconocido"
4017
+ }
4018
+ }, a$5 = (e3) => ({ 30: {
4019
+ code: 30,
4020
+ message: e3
4021
+ } }), o$4 = { 50: {
4022
+ code: 50,
4023
+ message: "Unknown Error"
4024
+ } }, s$3 = (s2) => ({
4025
+ ...e$2,
4026
+ ...t$6,
4027
+ ...n$5,
4028
+ ...r$5(s2),
4029
+ ...i$6,
4030
+ ...o$4,
4031
+ ...a$5(s2)
4032
+ });
4033
+ var e$1 = class e extends Error {
4034
+ constructor(e3 = -100, t4 = "Unknown error", n2 = null, r2 = null) {
4035
+ super(t4), this.code = e3, this.details = n2, this.errors = r2, this.stack = (/* @__PURE__ */ Error()).stack;
3941
4036
  }
3942
4037
  };
3943
- function setEnvironment(env) {
3944
- environment = env;
4038
+ var r$4 = Symbol("parseFailure");
4039
+ async function i$5(e3) {
4040
+ let t4 = await e3.text();
4041
+ if (!t4 || !t4.trim()) return {};
4042
+ try {
4043
+ return JSON.parse(t4);
4044
+ } catch {
4045
+ return {
4046
+ [r$4]: true,
4047
+ message: t4.slice(0, 200),
4048
+ statusText: e3.statusText
4049
+ };
4050
+ }
3945
4051
  }
3946
- function setAppName(name) {
3947
- appName = name;
4052
+ async function a$4(e3, { skipErrorMapping: t4 = false } = {}) {
4053
+ let a2 = [
4054
+ 404,
4055
+ 422,
4056
+ 500
4057
+ ], o2 = await i$5(e3);
4058
+ if (o2[r$4]) throw new e$1(e3.status, o2.message || e3.statusText, o2);
4059
+ if (e3.ok) return o2;
4060
+ if (t4) throw new e$1(e3.status, o2.message || e3.statusText, o2);
4061
+ if (a2.includes(e3.status)) switch (e3.status) {
4062
+ case 404:
4063
+ throw new e$1(100, "Not found");
4064
+ case 422:
4065
+ return o2;
4066
+ case 500:
4067
+ throw new e$1(101, "Server error");
4068
+ default:
4069
+ throw new e$1();
4070
+ }
4071
+ else throw new e$1(e3.status, o2.message || e3.statusText, o2);
3948
4072
  }
3949
- function getCoreAPIConfig() {
3950
- if (!environment) {
3951
- throw new Error(
3952
- "Unable to get core API config, environment not set. Use configService.setEnvironment(environment) to set the environment."
3953
- );
4073
+ function o$3(e3) {
4074
+ if (e3.errors instanceof Array) {
4075
+ let { code: r2 = -100, message: i = "Unknown error" } = e3.errors[0] || {}, a2 = s$3(i)[r2];
4076
+ throw a2 ? new e$1(a2.code, a2.message, e3.errors[0], e3.errors) : new e$1(r2, i, e3.errors[0], e3.errors);
4077
+ } else return e3;
4078
+ }
4079
+ function s$2(...e3) {
4080
+ let t4 = Object.keys(Object.assign({}, ...e3)).reduce((t5, n2) => ({
4081
+ ...t5,
4082
+ [n2]: e3.map((e4) => n2 in e4 && e4[n2]).filter(Boolean)
4083
+ }), {});
4084
+ return new Headers(t4);
4085
+ }
4086
+ function c$2(t4, n2 = {}, r2 = {}, i) {
4087
+ let { apiKey: c2, withCredentials: l2, userAuthToken: u2, headers: d2 } = r$6, f2 = {
4088
+ Accept: "application/json",
4089
+ Authorization: `Token token=${r2.apiKey || c2}`,
4090
+ "Content-Type": "application/json"
4091
+ };
4092
+ u2 && (f2.Authorization = `Token ${r2.apiKey || c2}, Bearer ${u2}`), n2.headers = s$2(d2, f2), n2.credentials = n2.credentials ?? (l2 ? "include" : "omit");
4093
+ let { skipErrorMapping: p2 } = n2;
4094
+ delete n2.skipErrorMapping, typeof n2.body != "string" && (n2.body = JSON.stringify(n2.body));
4095
+ let m2 = fetch(t4, n2).then((e3) => a$4(e3, { skipErrorMapping: p2 }));
4096
+ return (p2 ? m2 : m2.then(o$3)).catch(i);
4097
+ }
4098
+ function u$1(e3, t4 = {}, n2) {
4099
+ return c$2(e3, t4, {}, n2);
4100
+ }
4101
+ var t$5 = class t {
4102
+ constructor({ url: e3, watch: t4, expect: n2, maxRetries: r2 = 30, interval: i = 2e3, eachCall: a2 = null }) {
4103
+ this.url = e3, this.watch = t4, this.expect = n2 instanceof Array ? n2 : [n2], this.interval = i, this.maxRetries = r2, this.eachCall = a2 && a2.bind(this), this.aborted = false, this.timers = [], this.execute = this.execute.bind(this), this.executeEachCall = this.executeEachCall.bind(this);
4104
+ }
4105
+ start() {
4106
+ return console.log("Starting poll"), this.execute(this.maxRetries);
4107
+ }
4108
+ abort() {
4109
+ this.aborted = true;
4110
+ }
4111
+ execute(t4) {
4112
+ return u$1(this.url, {}, (e3) => this.executeEachCall("error", e3)).then((e3) => {
4113
+ if (this.expect.includes(e3[this.watch]) || t4 === 1 || this.aborted) {
4114
+ let n2 = e3[this.watch];
4115
+ t4 === 1 ? n2 = "retries_exceeded" : this.aborted && (n2 = "aborted"), this.timers.forEach(clearInterval), this.executeEachCall(n2, e3);
4116
+ } else if (e3[this.watch] === "failed") this.timers.forEach(clearInterval), this.executeEachCall("failed", e3);
4117
+ else {
4118
+ this.executeEachCall("pending", e3);
4119
+ let n2 = window.setTimeout(this.execute, this.interval, t4 - 1);
4120
+ this.timers.push(n2);
4121
+ }
4122
+ });
4123
+ }
4124
+ executeEachCall(e3, t4) {
4125
+ this.eachCall instanceof Function && this.eachCall({
4126
+ status: e3,
4127
+ payload: t4
4128
+ }) && this.abort();
4129
+ }
4130
+ };
4131
+ var t$4 = class t2 extends Error {
4132
+ constructor(e3) {
4133
+ super(e3), this.name = "ApiConfigurationError";
4134
+ }
4135
+ };
4136
+ function n$4(e3, n2, r2, i) {
4137
+ try {
4138
+ let a2 = new URL(e3);
4139
+ if (!["http:", "https:"].includes(a2.protocol) || a2.username || a2.password || a2.search || a2.hash) throw new t$4("Invalid configured API URL.");
4140
+ let o2 = a2.pathname.replace(/\/+$/, ""), s2 = i.replace(/^\/+|\/+$/g, "");
4141
+ return o2.endsWith(`/${n2}`) ? a2.pathname = `${o2}/${r2}` : s2 && o2.endsWith(`/${s2}`) ? a2.pathname = `${o2}/${n2}/${r2}` : a2.pathname = `${o2}${s2 ? `/${s2}` : ""}/${n2}/${r2}`, a2.toString();
4142
+ } catch {
4143
+ throw new t$4("Invalid configured API URL.");
4144
+ }
4145
+ }
4146
+ function r$3({ apiName: r2, defaultApiVersion: i }) {
4147
+ let a2, o2 = { "Content-Type": "application/json" }, s2;
4148
+ function c2(e3) {
4149
+ a2 = e3.baseUrl, o2 = {
4150
+ ...o2,
4151
+ ...e3.defaultHeaders || {}
4152
+ };
4153
+ }
4154
+ function l2(e3) {
4155
+ s2 = e3;
4156
+ }
4157
+ function u2() {
4158
+ if (!a2) throw Error(`Base URL is not set for ${r2} API.`);
4159
+ }
4160
+ let d2 = { body: {} };
4161
+ async function f2(e3, c3 = d2) {
4162
+ var l3;
4163
+ let f3 = "responseType" in c3 ? c3 : void 0;
4164
+ if (f3 && !a2) throw new t$4(`Base URL is not set for ${r2} API.`);
4165
+ u2();
4166
+ let { body: p3, headers: m3 = {}, apiVersion: h3 = i } = c3, g3 = (f3 == null ? void 0 : f3.apiPrefix) === void 0 ? `${a2}/${h3}/${e3}` : n$4(a2 || "", h3, e3, f3.apiPrefix), _2 = {
4167
+ ...o2,
4168
+ ...m3,
4169
+ ...s2 ? { Authorization: s2 } : {}
4170
+ }, v2 = (f3 == null || (l3 = f3.omitHeaders) == null ? void 0 : l3.map((e4) => e4.toLowerCase())) || [];
4171
+ for (let e4 of Object.keys(_2)) v2.includes(e4.toLowerCase()) && delete _2[e4];
4172
+ let y2 = await fetch(g3, {
4173
+ method: "POST",
4174
+ body: JSON.stringify(p3),
4175
+ headers: _2,
4176
+ ...(f3 == null ? void 0 : f3.signal) && { signal: f3.signal }
4177
+ });
4178
+ return f3 ? y2 : await y2.json();
4179
+ }
4180
+ async function p2(e3, t4 = d2) {
4181
+ u2();
4182
+ let { body: n2, headers: r3 = {}, apiVersion: c3 = i } = t4, l3 = `${a2}/${c3}/${e3}`, f3 = {
4183
+ ...o2,
4184
+ ...r3,
4185
+ ...s2 ? { Authorization: s2 } : {}
4186
+ };
4187
+ return await (await fetch(l3, {
4188
+ method: "PUT",
4189
+ body: JSON.stringify(n2),
4190
+ headers: f3
4191
+ })).json();
4192
+ }
4193
+ async function m2(e3, t4 = {}) {
4194
+ u2();
4195
+ let { headers: n2 = {}, apiVersion: r3 = i } = t4, o3 = `${a2}/${r3}/${e3}`;
4196
+ return await (await fetch(o3, { headers: n2 })).json();
4197
+ }
4198
+ function h2(t4, n2) {
4199
+ return new t$5({
4200
+ url: `${a2}/${i}/${t4}`,
4201
+ watch: n2.watch,
4202
+ expect: n2.expect,
4203
+ eachCall: n2.onEachResponse
4204
+ });
4205
+ }
4206
+ async function g2(e3, t4 = {}) {
4207
+ u2();
4208
+ let { headers: n2 = {}, apiVersion: r3 = i } = t4, c3 = `${a2}/${r3}/${e3}`, l3 = {
4209
+ ...o2,
4210
+ ...n2,
4211
+ ...s2 ? { Authorization: s2 } : {}
4212
+ };
4213
+ return await (await fetch(c3, {
4214
+ method: "DELETE",
4215
+ headers: l3
4216
+ })).json();
3954
4217
  }
3955
- const config = coreAPIConfig[environment];
3956
4218
  return {
3957
- ...config,
3958
- defaultHeaders: {
3959
- ...config.defaultHeaders,
3960
- ...appName ? { "x-app-name": appName } : {}
3961
- }
4219
+ get: m2,
4220
+ post: f2,
4221
+ put: p2,
4222
+ delete: g2,
4223
+ setAuthorizationHeader: l2,
4224
+ setConfig: c2,
4225
+ poll: h2
3962
4226
  };
3963
4227
  }
3964
- const configService = {
3965
- setEnvironment,
3966
- setAppName,
3967
- getCoreAPIConfig
3968
- };
3969
- const BOT_DETECTION_RELAY_PATH = "/v1/fingerprint/bot-detection";
4228
+ var t$3 = r$3({
4229
+ apiName: "Core",
4230
+ defaultApiVersion: "v1"
4231
+ });
4232
+ var n$3 = 5e3;
4233
+ function r$2(e3, t4) {
4234
+ try {
4235
+ e3 == null || e3(t4);
4236
+ } catch {
4237
+ }
4238
+ }
4239
+ async function i$4(e3) {
4240
+ if (e3.ok) return "http_accepted";
4241
+ if (e3.status === 401) {
4242
+ try {
4243
+ let t4 = await e3.json();
4244
+ if (typeof t4 == "object" && t4 && "error" in t4) {
4245
+ if (t4.error === "Unauthorized") return "origin_not_authorized";
4246
+ if (t4.error === "Unauthorized token") return "bearer_rejected";
4247
+ }
4248
+ } catch {
4249
+ }
4250
+ return "authentication_rejected";
4251
+ }
4252
+ return e3.status === 403 ? "forbidden" : e3.status === 422 ? "invalid_payload" : e3.status === 503 ? "service_unavailable" : "http_error";
4253
+ }
4254
+ async function a$3({ requestId: a2, visitorId: o2, distinctId: s2, purchaseToken: c2, onDiagnostic: l2 }) {
4255
+ if (!a2 || !o2) return r$2(l2, {
4256
+ httpStatus: null,
4257
+ reason: "invalid_configuration"
4258
+ }), false;
4259
+ let u2 = new AbortController(), d2 = setTimeout(() => u2.abort(), n$3);
4260
+ try {
4261
+ let e3 = await t$3.post("fingerprint/bot-detection", {
4262
+ body: {
4263
+ requestId: a2,
4264
+ visitorId: o2,
4265
+ ...s2 && { distinctId: s2 },
4266
+ ...c2 && { purchaseToken: c2 },
4267
+ eventName: "Fingerprint Requested"
4268
+ },
4269
+ responseType: "response",
4270
+ apiPrefix: "api",
4271
+ omitHeaders: ["Origin"],
4272
+ signal: u2.signal
4273
+ });
4274
+ return l2 && r$2(l2, {
4275
+ httpStatus: e3.status,
4276
+ reason: await i$4(e3)
4277
+ }), e3.ok;
4278
+ } catch (t4) {
4279
+ return r$2(l2, {
4280
+ httpStatus: null,
4281
+ reason: t4 instanceof t$4 ? "invalid_configuration" : u2.signal.aborted ? "timeout" : "network_or_cors"
4282
+ }), false;
4283
+ } finally {
4284
+ clearTimeout(d2);
4285
+ }
4286
+ }
4287
+ var o$2 = { sendObservation: a$3 };
4288
+ async function t$2(t4) {
4289
+ let { data: n2 } = await t$3.post("anonymous_profiles/identify", { body: t4 });
4290
+ return n2;
4291
+ }
4292
+ var n$2 = { createAnonymousProfile: t$2 };
4293
+ function t$1({ searchId: t4, userIdentifier: n2 }) {
4294
+ return t$3.get(`trip_recommendations/${t4}/${n2}`);
4295
+ }
4296
+ function n$1(t4) {
4297
+ return t$3.post("seat_recommendations", { body: t4 });
4298
+ }
4299
+ function r$1({ distinct_id: t4, ...n2 }) {
4300
+ return t$3.post(`seat_recommendations/${t4}`, { body: n2 });
4301
+ }
4302
+ function i$3(t4, n2) {
4303
+ let { start: r2, onEachResponse: i } = n2, a2 = `profiles/${t4}`, o2 = {
4304
+ watch: "state",
4305
+ expect: "finished",
4306
+ onEachResponse: i
4307
+ }, s2 = t$3.poll(a2, o2);
4308
+ return r2 && s2.start(), s2;
4309
+ }
4310
+ async function a$2(t4) {
4311
+ return t$3.post("profiles", { body: t4 });
4312
+ }
4313
+ async function o$1(t4) {
4314
+ return t$3.post("passengers", { body: t4 });
4315
+ }
4316
+ async function s$1(t4) {
4317
+ return t$3.get(`passengers/${t4}`);
4318
+ }
4319
+ async function c$1(t4, n2) {
4320
+ return t$3.delete(`passengers/${t4}/${n2}`);
4321
+ }
4322
+ var l$1 = {
4323
+ getRecommendedTrips: t$1,
4324
+ createRecommendedPlaces: a$2,
4325
+ pollRecommendedPlaces: i$3,
4326
+ createRecommendedSeats: n$1,
4327
+ getRecommendedSeats: r$1,
4328
+ getFrequentPassengers: s$1,
4329
+ createFrequentPassengers: o$1,
4330
+ deleteFrequentPassenger: c$1
4331
+ };
4332
+ var i$2 = {
4333
+ setConfig: t$3.setConfig,
4334
+ recommendations: l$1,
4335
+ profiles: n$2,
4336
+ fingerprint: o$2
4337
+ }, a$1 = i$2;
3970
4338
  const BOT_DETECTION_EVENTS = [
3971
4339
  "Search",
3972
4340
  "Payment Attempt",
@@ -3976,26 +4344,20 @@ function isEnabledFor(eventName) {
3976
4344
  return BOT_DETECTION_EVENTS.includes(eventName);
3977
4345
  }
3978
4346
  async function relay(payload) {
3979
- var _a;
3980
4347
  try {
3981
- const coreApiConfig = configService.getCoreAPIConfig();
3982
- const response = await fetch(
3983
- `${coreApiConfig.baseUrl}${BOT_DETECTION_RELAY_PATH}`,
3984
- {
3985
- method: "POST",
3986
- headers: {
3987
- "Content-Type": "application/json",
3988
- ...((_a = coreApiConfig.defaultHeaders) == null ? void 0 : _a["x-app-name"]) ? { "x-app-name": coreApiConfig.defaultHeaders["x-app-name"] } : {}
3989
- },
3990
- body: JSON.stringify(payload),
3991
- keepalive: true
4348
+ await a$1.fingerprint.sendObservation({
4349
+ requestId: payload.requestId,
4350
+ visitorId: payload.visitorId,
4351
+ distinctId: payload.distinctId,
4352
+ onDiagnostic(diagnostic) {
4353
+ if (diagnostic.reason !== "http_accepted") {
4354
+ console.error(
4355
+ "Error relaying Fingerprint identification:",
4356
+ diagnostic
4357
+ );
4358
+ }
3992
4359
  }
3993
- );
3994
- if (!response.ok) {
3995
- throw new Error(
3996
- `Bot Detection relay failed with status ${response.status}`
3997
- );
3998
- }
4360
+ });
3999
4361
  } catch (error) {
4000
4362
  console.error("Error relaying Fingerprint identification:", error);
4001
4363
  }
@@ -4014,15 +4376,15 @@ function __awaiter$1(thisArg, _arguments, P2, generator) {
4014
4376
  function fulfilled(value) {
4015
4377
  try {
4016
4378
  step(generator.next(value));
4017
- } catch (e2) {
4018
- reject(e2);
4379
+ } catch (e3) {
4380
+ reject(e3);
4019
4381
  }
4020
4382
  }
4021
4383
  function rejected(value) {
4022
4384
  try {
4023
4385
  step(generator["throw"](value));
4024
- } catch (e2) {
4025
- reject(e2);
4386
+ } catch (e3) {
4387
+ reject(e3);
4026
4388
  }
4027
4389
  }
4028
4390
  function step(result) {
@@ -4032,187 +4394,187 @@ function __awaiter$1(thisArg, _arguments, P2, generator) {
4032
4394
  });
4033
4395
  }
4034
4396
  typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
4035
- var e2 = new Error(message);
4036
- return e2.name = "SuppressedError", e2.error = error, e2.suppressed = suppressed, e2;
4397
+ var e3 = new Error(message);
4398
+ return e3.name = "SuppressedError", e3.error = error, e3.suppressed = suppressed, e3;
4037
4399
  };
4038
- function e(e2, t2) {
4039
- return function(e3, t3) {
4040
- return Object.prototype.hasOwnProperty.call(e3, t3);
4041
- }(e2, t2) ? e2[t2] : void 0;
4400
+ function e2(e3, t4) {
4401
+ return function(e4, t5) {
4402
+ return Object.prototype.hasOwnProperty.call(e4, t5);
4403
+ }(e3, t4) ? e3[t4] : void 0;
4042
4404
  }
4043
- function t$3(e2, t2, n2, r2) {
4044
- const o2 = document, i2 = "securitypolicyviolation";
4405
+ function t3(e3, t4, n2, r2) {
4406
+ const o2 = document, i = "securitypolicyviolation";
4045
4407
  let R2;
4046
- const s2 = (t3) => {
4047
- const n3 = new URL(e2, location.href), { blockedURI: r3 } = t3;
4048
- r3 !== n3.href && r3 !== n3.protocol.slice(0, -1) && r3 !== n3.origin || (R2 = t3, a2());
4408
+ const s2 = (t5) => {
4409
+ const n3 = new URL(e3, location.href), { blockedURI: r3 } = t5;
4410
+ r3 !== n3.href && r3 !== n3.protocol.slice(0, -1) && r3 !== n3.origin || (R2 = t5, a2());
4049
4411
  };
4050
- o2.addEventListener(i2, s2);
4051
- const a2 = () => o2.removeEventListener(i2, s2);
4052
- return Promise.resolve().then(t2).then((e3) => (a2(), e3), (e3) => new Promise((e4) => {
4053
- const t3 = new MessageChannel();
4054
- t3.port1.onmessage = () => e4(), t3.port2.postMessage(null);
4412
+ o2.addEventListener(i, s2);
4413
+ const a2 = () => o2.removeEventListener(i, s2);
4414
+ return Promise.resolve().then(t4).then((e4) => (a2(), e4), (e4) => new Promise((e5) => {
4415
+ const t5 = new MessageChannel();
4416
+ t5.port1.onmessage = () => e5(), t5.port2.postMessage(null);
4055
4417
  }).then(() => {
4056
4418
  if (a2(), R2) return n2(R2);
4057
- throw e3;
4419
+ throw e4;
4058
4420
  }));
4059
4421
  }
4060
- function n$2(e2) {
4061
- let t2 = "";
4062
- for (let n2 = 0; n2 < e2.length; ++n2) if (n2 > 0) {
4063
- const r2 = e2[n2].toLowerCase();
4064
- r2 !== e2[n2] ? t2 += ` ${r2}` : t2 += e2[n2];
4065
- } else t2 += e2[n2].toUpperCase();
4066
- return t2;
4422
+ function n(e3) {
4423
+ let t4 = "";
4424
+ for (let n2 = 0; n2 < e3.length; ++n2) if (n2 > 0) {
4425
+ const r2 = e3[n2].toLowerCase();
4426
+ r2 !== e3[n2] ? t4 += ` ${r2}` : t4 += e3[n2];
4427
+ } else t4 += e3[n2].toUpperCase();
4428
+ return t4;
4067
4429
  }
4068
- const r$2 = { default: "endpoint" }, o$2 = { default: "tlsEndpoint" }, i$3 = "Client timeout", R$1 = "Network connection error", s$3 = "Network request aborted", a$2 = "Response cannot be parsed", c$3 = "Blocked by CSP", E$1 = "The endpoint parameter is not a valid URL", l$2 = "Handle on demand agent data error", u$2 = /* @__PURE__ */ n$2("WrongRegion"), d$2 = /* @__PURE__ */ n$2("SubscriptionNotActive"), _$1 = /* @__PURE__ */ n$2("UnsupportedVersion"), O = /* @__PURE__ */ n$2("InstallationMethodRestricted"), p$1 = /* @__PURE__ */ n$2("HostnameRestricted"), I = /* @__PURE__ */ n$2("IntegrationFailed"), f$2 = /* @__PURE__ */ n$2("NetworkRestricted"), N = /* @__PURE__ */ n$2("InvalidProxyIntegrationSecret"), T = /* @__PURE__ */ n$2("InvalidProxyIntegrationHeaders"), h = /* @__PURE__ */ n$2("ProxyIntegrationSecretEnvironmentMismatch");
4069
- const v = "API key required", m$1 = "API key not found", A = "API key expired", w$1 = "Request cannot be parsed", P = "Request failed", D = "Request failed to process", S = "Too many requests, rate limit exceeded", y$1 = "Not available for this origin", g$1 = "Not available with restricted header", L = v, C = m$1, U = A;
4430
+ const r = { default: "endpoint" }, o = { default: "tlsEndpoint" }, i$1 = "Client timeout", R = "Network connection error", s = "Network request aborted", a = "Response cannot be parsed", c = "Blocked by CSP", E = "The endpoint parameter is not a valid URL", l = "Handle on demand agent data error", u = /* @__PURE__ */ n("WrongRegion"), d = /* @__PURE__ */ n("SubscriptionNotActive"), _$1 = /* @__PURE__ */ n("UnsupportedVersion"), O = /* @__PURE__ */ n("InstallationMethodRestricted"), p = /* @__PURE__ */ n("HostnameRestricted"), I = /* @__PURE__ */ n("IntegrationFailed"), f = /* @__PURE__ */ n("NetworkRestricted"), N = /* @__PURE__ */ n("InvalidProxyIntegrationSecret"), T = /* @__PURE__ */ n("InvalidProxyIntegrationHeaders"), h = /* @__PURE__ */ n("ProxyIntegrationSecretEnvironmentMismatch");
4431
+ const v = "API key required", m = "API key not found", A = "API key expired", w = "Request cannot be parsed", P = "Request failed", D = "Request failed to process", S = "Too many requests, rate limit exceeded", y = "Not available for this origin", g = "Not available with restricted header", L = v, C = m, U = A;
4070
4432
  var b = "3.12.6";
4071
4433
  const M = "Failed to load the JS script of the agent", K = "9319";
4072
- function V(e2, t2) {
4073
- const n2 = [], [r2, o2] = function(e3) {
4074
- const t3 = function(e4) {
4075
- const t4 = [...e4];
4076
- return { current: () => t4[0], postpone() {
4077
- const e5 = t4.shift();
4078
- void 0 !== e5 && t4.push(e5);
4434
+ function V(e3, t4) {
4435
+ const n2 = [], [r2, o2] = function(e4) {
4436
+ const t5 = function(e5) {
4437
+ const t6 = [...e5];
4438
+ return { current: () => t6[0], postpone() {
4439
+ const e6 = t6.shift();
4440
+ void 0 !== e6 && t6.push(e6);
4079
4441
  }, exclude() {
4080
- t4.shift();
4442
+ t6.shift();
4081
4443
  } };
4082
- }(e3), n3 = /* @__PURE__ */ function(e4, t4) {
4444
+ }(e4), n3 = /* @__PURE__ */ function(e5, t6) {
4083
4445
  let n4 = 0;
4084
- return () => Math.random() * Math.min(t4, e4 * Math.pow(2, n4++));
4446
+ return () => Math.random() * Math.min(t6, e5 * Math.pow(2, n4++));
4085
4447
  }(100, 3e3), r3 = /* @__PURE__ */ new Set();
4086
- return [t3.current(), (e4, o3) => {
4087
- let i3;
4448
+ return [t5.current(), (e5, o3) => {
4449
+ let i2;
4088
4450
  const R3 = o3 instanceof Error ? o3.message : "";
4089
- if (R3 === c$3 || R3 === E$1) t3.exclude(), i3 = 0;
4090
- else if (R3 === K) t3.exclude();
4451
+ if (R3 === c || R3 === E) t5.exclude(), i2 = 0;
4452
+ else if (R3 === K) t5.exclude();
4091
4453
  else if (R3 === M) {
4092
- const n4 = Date.now() - e4.getTime() < 50, o4 = t3.current();
4093
- o4 && n4 && !r3.has(o4) && (r3.add(o4), i3 = 0), t3.postpone();
4094
- } else t3.postpone();
4095
- const s2 = t3.current();
4096
- return void 0 === s2 ? void 0 : [s2, null != i3 ? i3 : e4.getTime() + n3() - Date.now()];
4454
+ const n4 = Date.now() - e5.getTime() < 50, o4 = t5.current();
4455
+ o4 && n4 && !r3.has(o4) && (r3.add(o4), i2 = 0), t5.postpone();
4456
+ } else t5.postpone();
4457
+ const s2 = t5.current();
4458
+ return void 0 === s2 ? void 0 : [s2, null != i2 ? i2 : e5.getTime() + n3() - Date.now()];
4097
4459
  }];
4098
- }(e2);
4099
- let i2;
4460
+ }(e3);
4461
+ let i;
4100
4462
  if (void 0 === r2) return Promise.reject(new TypeError("The list of script URL patterns is empty"));
4101
- const R2 = (e3) => {
4102
- const r3 = /* @__PURE__ */ new Date(), s2 = (t3) => n2.push({ url: e3, startedAt: r3, finishedAt: /* @__PURE__ */ new Date(), error: t3 }), a2 = t2(e3);
4103
- return a2.then(() => s2(), s2), a2.catch((e4) => {
4104
- if (null != i2 || (i2 = e4), n2.length >= 5) throw i2;
4105
- const t3 = o2(r3, e4);
4106
- if (!t3) throw i2;
4107
- const [s3, a3] = t3;
4108
- return (c2 = a3, new Promise((e5) => setTimeout(e5, c2))).then(() => R2(s3));
4463
+ const R2 = (e4) => {
4464
+ const r3 = /* @__PURE__ */ new Date(), s2 = (t5) => n2.push({ url: e4, startedAt: r3, finishedAt: /* @__PURE__ */ new Date(), error: t5 }), a2 = t4(e4);
4465
+ return a2.then(() => s2(), s2), a2.catch((e5) => {
4466
+ if (null != i || (i = e5), n2.length >= 5) throw i;
4467
+ const t5 = o2(r3, e5);
4468
+ if (!t5) throw i;
4469
+ const [s3, a3] = t5;
4470
+ return (c2 = a3, new Promise((e6) => setTimeout(e6, c2))).then(() => R2(s3));
4109
4471
  var c2;
4110
4472
  });
4111
4473
  };
4112
- return R2(r2).then((e3) => [e3, n2]);
4474
+ return R2(r2).then((e4) => [e4, n2]);
4113
4475
  }
4114
4476
  const k = "https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js", G = k;
4115
- function B(t2) {
4477
+ function B(t4) {
4116
4478
  var n2, r2;
4117
- const { picked: o2, rest: i2 } = function(e2, t3) {
4479
+ const { picked: o2, rest: i } = function(e3, t5) {
4118
4480
  const n3 = {}, r3 = {};
4119
- for (const [o3, i3] of Object.entries(e2)) t3.includes(o3) ? n3[o3] = i3 : r3[o3] = i3;
4481
+ for (const [o3, i2] of Object.entries(e3)) t5.includes(o3) ? n3[o3] = i2 : r3[o3] = i2;
4120
4482
  return { picked: n3, rest: r3 };
4121
- }(t2, ["scriptUrlPattern", "token", "apiKey"]), R2 = o2.token, s2 = null !== (n2 = o2.apiKey) && void 0 !== n2 ? n2 : R2, a2 = null !== (r2 = e(t2, "scriptUrlPattern")) && void 0 !== r2 ? r2 : k, [c2, E2] = function() {
4122
- const e2 = [], t3 = () => {
4123
- e2.push({ time: /* @__PURE__ */ new Date(), state: document.visibilityState });
4124
- }, n3 = function(e3, t4, n4, r3) {
4125
- return e3.addEventListener(t4, n4, r3), () => e3.removeEventListener(t4, n4, r3);
4126
- }(document, "visibilitychange", t3);
4127
- return t3(), [e2, n3];
4483
+ }(t4, ["scriptUrlPattern", "token", "apiKey"]), R2 = o2.token, s2 = null !== (n2 = o2.apiKey) && void 0 !== n2 ? n2 : R2, a2 = null !== (r2 = e2(t4, "scriptUrlPattern")) && void 0 !== r2 ? r2 : k, [c2, E2] = function() {
4484
+ const e3 = [], t5 = () => {
4485
+ e3.push({ time: /* @__PURE__ */ new Date(), state: document.visibilityState });
4486
+ }, n3 = function(e4, t6, n4, r3) {
4487
+ return e4.addEventListener(t6, n4, r3), () => e4.removeEventListener(t6, n4, r3);
4488
+ }(document, "visibilitychange", t5);
4489
+ return t5(), [e3, n3];
4128
4490
  }();
4129
4491
  return Promise.resolve().then(() => {
4130
4492
  if (!s2 || "string" != typeof s2) throw new Error(v);
4131
- const e2 = function(e3, t3) {
4132
- return (Array.isArray(e3) ? e3 : [e3]).map((e4) => function(e5, t4) {
4493
+ const e3 = function(e4, t5) {
4494
+ return (Array.isArray(e4) ? e4 : [e4]).map((e5) => function(e6, t6) {
4133
4495
  const n3 = encodeURIComponent;
4134
- return e5.replace(/<[^<>]+>/g, (e6) => "<version>" === e6 ? "3" : "<apiKey>" === e6 ? n3(t4) : "<loaderVersion>" === e6 ? n3(b) : e6);
4135
- }(String(e4), t3));
4496
+ return e6.replace(/<[^<>]+>/g, (e7) => "<version>" === e7 ? "3" : "<apiKey>" === e7 ? n3(t6) : "<loaderVersion>" === e7 ? n3(b) : e7);
4497
+ }(String(e5), t5));
4136
4498
  }(a2, s2);
4137
- return V(e2, F);
4138
- }).catch((e2) => {
4139
- throw E2(), function(e3) {
4140
- if (e3 instanceof Error && e3.message === K) return new Error(M);
4141
- return e3;
4142
- }(e2);
4143
- }).then(([e2, t3]) => (E2(), e2.load({ ...i2, ldi: { attempts: t3, visibilityStates: c2 } })));
4144
- }
4145
- function F(e2) {
4146
- return t$3(e2, () => function(e3) {
4147
- return new Promise((t2, n2) => {
4148
- if (function(e4) {
4499
+ return V(e3, F);
4500
+ }).catch((e3) => {
4501
+ throw E2(), function(e4) {
4502
+ if (e4 instanceof Error && e4.message === K) return new Error(M);
4503
+ return e4;
4504
+ }(e3);
4505
+ }).then(([e3, t5]) => (E2(), e3.load({ ...i, ldi: { attempts: t5, visibilityStates: c2 } })));
4506
+ }
4507
+ function F(e3) {
4508
+ return t3(e3, () => function(e4) {
4509
+ return new Promise((t4, n2) => {
4510
+ if (function(e5) {
4149
4511
  if (URL.prototype) try {
4150
- return new URL(e4, location.href), false;
4151
- } catch (t3) {
4152
- if (t3 instanceof Error && "TypeError" === t3.name) return true;
4153
- throw t3;
4512
+ return new URL(e5, location.href), false;
4513
+ } catch (t5) {
4514
+ if (t5 instanceof Error && "TypeError" === t5.name) return true;
4515
+ throw t5;
4154
4516
  }
4155
- }(e3)) throw new Error(E$1);
4517
+ }(e4)) throw new Error(E);
4156
4518
  const r2 = document.createElement("script"), o2 = () => {
4157
- var e4;
4158
- return null === (e4 = r2.parentNode) || void 0 === e4 ? void 0 : e4.removeChild(r2);
4159
- }, i2 = document.head || document.getElementsByTagName("head")[0];
4519
+ var e5;
4520
+ return null === (e5 = r2.parentNode) || void 0 === e5 ? void 0 : e5.removeChild(r2);
4521
+ }, i = document.head || document.getElementsByTagName("head")[0];
4160
4522
  r2.onload = () => {
4161
- o2(), t2();
4523
+ o2(), t4();
4162
4524
  }, r2.onerror = () => {
4163
4525
  o2(), n2(new Error(M));
4164
- }, r2.async = true, r2.src = e3, i2.appendChild(r2);
4526
+ }, r2.async = true, r2.src = e4, i.appendChild(r2);
4165
4527
  });
4166
- }(e2), () => {
4167
- throw new Error(c$3);
4528
+ }(e3), () => {
4529
+ throw new Error(c);
4168
4530
  }).then(x);
4169
4531
  }
4170
4532
  function x() {
4171
- const e2 = window, t2 = "__fpjs_p_l_b", n2 = e2[t2];
4172
- if (function(e3, t3) {
4533
+ const e3 = window, t4 = "__fpjs_p_l_b", n2 = e3[t4];
4534
+ if (function(e4, t5) {
4173
4535
  var n3;
4174
- const r2 = null === (n3 = Object.getOwnPropertyDescriptor) || void 0 === n3 ? void 0 : n3.call(Object, e3, t3);
4175
- (null == r2 ? void 0 : r2.configurable) ? delete e3[t3] : r2 && !r2.writable || (e3[t3] = void 0);
4176
- }(e2, t2), "function" != typeof (null == n2 ? void 0 : n2.load)) throw new Error(K);
4536
+ const r2 = null === (n3 = Object.getOwnPropertyDescriptor) || void 0 === n3 ? void 0 : n3.call(Object, e4, t5);
4537
+ (null == r2 ? void 0 : r2.configurable) ? delete e4[t5] : r2 && !r2.writable || (e4[t5] = void 0);
4538
+ }(e3, t4), "function" != typeof (null == n2 ? void 0 : n2.load)) throw new Error(K);
4177
4539
  return n2;
4178
4540
  }
4179
- var H = { load: B, defaultScriptUrlPattern: G, ERROR_SCRIPT_LOAD_FAIL: M, ERROR_API_KEY_EXPIRED: A, ERROR_API_KEY_INVALID: m$1, ERROR_API_KEY_MISSING: v, ERROR_BAD_REQUEST_FORMAT: w$1, ERROR_BAD_RESPONSE_FORMAT: a$2, ERROR_CLIENT_TIMEOUT: i$3, ERROR_CSP_BLOCK: c$3, ERROR_FORBIDDEN_ENDPOINT: p$1, ERROR_FORBIDDEN_HEADER: g$1, ERROR_FORBIDDEN_ORIGIN: y$1, ERROR_GENERAL_SERVER_FAILURE: P, ERROR_HANDLE_AGENT_DATA: l$2, ERROR_INSTALLATION_METHOD_RESTRICTED: O, ERROR_INTEGRATION_FAILURE: I, ERROR_INVALID_ENDPOINT: E$1, ERROR_INVALID_PROXY_INTEGRATION_HEADERS: T, ERROR_INVALID_PROXY_INTEGRATION_SECRET: N, ERROR_NETWORK_ABORT: s$3, ERROR_NETWORK_CONNECTION: R$1, ERROR_NETWORK_RESTRICTED: f$2, ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH: h, ERROR_RATE_LIMIT: S, ERROR_SERVER_TIMEOUT: D, ERROR_SUBSCRIPTION_NOT_ACTIVE: d$2, ERROR_TOKEN_EXPIRED: U, ERROR_TOKEN_INVALID: C, ERROR_TOKEN_MISSING: L, ERROR_UNSUPPORTED_VERSION: _$1, ERROR_WRONG_REGION: u$2, defaultEndpoint: r$2, defaultTlsEndpoint: o$2 };
4541
+ var H = { load: B, defaultScriptUrlPattern: G, ERROR_SCRIPT_LOAD_FAIL: M, ERROR_API_KEY_EXPIRED: A, ERROR_API_KEY_INVALID: m, ERROR_API_KEY_MISSING: v, ERROR_BAD_REQUEST_FORMAT: w, ERROR_BAD_RESPONSE_FORMAT: a, ERROR_CLIENT_TIMEOUT: i$1, ERROR_CSP_BLOCK: c, ERROR_FORBIDDEN_ENDPOINT: p, ERROR_FORBIDDEN_HEADER: g, ERROR_FORBIDDEN_ORIGIN: y, ERROR_GENERAL_SERVER_FAILURE: P, ERROR_HANDLE_AGENT_DATA: l, ERROR_INSTALLATION_METHOD_RESTRICTED: O, ERROR_INTEGRATION_FAILURE: I, ERROR_INVALID_ENDPOINT: E, ERROR_INVALID_PROXY_INTEGRATION_HEADERS: T, ERROR_INVALID_PROXY_INTEGRATION_SECRET: N, ERROR_NETWORK_ABORT: s, ERROR_NETWORK_CONNECTION: R, ERROR_NETWORK_RESTRICTED: f, ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH: h, ERROR_RATE_LIMIT: S, ERROR_SERVER_TIMEOUT: D, ERROR_SUBSCRIPTION_NOT_ACTIVE: d, ERROR_TOKEN_EXPIRED: U, ERROR_TOKEN_INVALID: C, ERROR_TOKEN_MISSING: L, ERROR_UNSUPPORTED_VERSION: _$1, ERROR_WRONG_REGION: u, defaultEndpoint: r, defaultTlsEndpoint: o };
4180
4542
  const FingerprintJSPro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4181
4543
  __proto__: null,
4182
4544
  ERROR_API_KEY_EXPIRED: A,
4183
- ERROR_API_KEY_INVALID: m$1,
4545
+ ERROR_API_KEY_INVALID: m,
4184
4546
  ERROR_API_KEY_MISSING: v,
4185
- ERROR_BAD_REQUEST_FORMAT: w$1,
4186
- ERROR_BAD_RESPONSE_FORMAT: a$2,
4187
- ERROR_CLIENT_TIMEOUT: i$3,
4188
- ERROR_CSP_BLOCK: c$3,
4189
- ERROR_FORBIDDEN_ENDPOINT: p$1,
4190
- ERROR_FORBIDDEN_HEADER: g$1,
4191
- ERROR_FORBIDDEN_ORIGIN: y$1,
4547
+ ERROR_BAD_REQUEST_FORMAT: w,
4548
+ ERROR_BAD_RESPONSE_FORMAT: a,
4549
+ ERROR_CLIENT_TIMEOUT: i$1,
4550
+ ERROR_CSP_BLOCK: c,
4551
+ ERROR_FORBIDDEN_ENDPOINT: p,
4552
+ ERROR_FORBIDDEN_HEADER: g,
4553
+ ERROR_FORBIDDEN_ORIGIN: y,
4192
4554
  ERROR_GENERAL_SERVER_FAILURE: P,
4193
- ERROR_HANDLE_AGENT_DATA: l$2,
4555
+ ERROR_HANDLE_AGENT_DATA: l,
4194
4556
  ERROR_INSTALLATION_METHOD_RESTRICTED: O,
4195
4557
  ERROR_INTEGRATION_FAILURE: I,
4196
- ERROR_INVALID_ENDPOINT: E$1,
4558
+ ERROR_INVALID_ENDPOINT: E,
4197
4559
  ERROR_INVALID_PROXY_INTEGRATION_HEADERS: T,
4198
4560
  ERROR_INVALID_PROXY_INTEGRATION_SECRET: N,
4199
- ERROR_NETWORK_ABORT: s$3,
4200
- ERROR_NETWORK_CONNECTION: R$1,
4201
- ERROR_NETWORK_RESTRICTED: f$2,
4561
+ ERROR_NETWORK_ABORT: s,
4562
+ ERROR_NETWORK_CONNECTION: R,
4563
+ ERROR_NETWORK_RESTRICTED: f,
4202
4564
  ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH: h,
4203
4565
  ERROR_RATE_LIMIT: S,
4204
4566
  ERROR_SCRIPT_LOAD_FAIL: M,
4205
4567
  ERROR_SERVER_TIMEOUT: D,
4206
- ERROR_SUBSCRIPTION_NOT_ACTIVE: d$2,
4568
+ ERROR_SUBSCRIPTION_NOT_ACTIVE: d,
4207
4569
  ERROR_TOKEN_EXPIRED: U,
4208
4570
  ERROR_TOKEN_INVALID: C,
4209
4571
  ERROR_TOKEN_MISSING: L,
4210
4572
  ERROR_UNSUPPORTED_VERSION: _$1,
4211
- ERROR_WRONG_REGION: u$2,
4573
+ ERROR_WRONG_REGION: u,
4212
4574
  default: H,
4213
- defaultEndpoint: r$2,
4575
+ defaultEndpoint: r,
4214
4576
  defaultScriptUrlPattern: G,
4215
- defaultTlsEndpoint: o$2,
4577
+ defaultTlsEndpoint: o,
4216
4578
  load: B
4217
4579
  }, Symbol.toStringTag, { value: "Module" }));
4218
4580
  const CACHE_KEY_PREFIX = "@fpjs@client@";
@@ -4254,7 +4616,7 @@ class LocalStorageCache {
4254
4616
  }
4255
4617
  try {
4256
4618
  return JSON.parse(json);
4257
- } catch (e2) {
4619
+ } catch (e3) {
4258
4620
  return;
4259
4621
  }
4260
4622
  }
@@ -4289,7 +4651,7 @@ class SessionStorageCache {
4289
4651
  }
4290
4652
  try {
4291
4653
  return JSON.parse(json);
4292
- } catch (e2) {
4654
+ } catch (e3) {
4293
4655
  return;
4294
4656
  }
4295
4657
  }
@@ -4421,14 +4783,14 @@ const doesBrowserSupportCacheLocation = (cacheLocation) => {
4421
4783
  case CacheLocation.SessionStorage:
4422
4784
  try {
4423
4785
  window.sessionStorage.getItem("item");
4424
- } catch (e2) {
4786
+ } catch (e3) {
4425
4787
  return false;
4426
4788
  }
4427
4789
  return true;
4428
4790
  case CacheLocation.LocalStorage:
4429
4791
  try {
4430
4792
  window.localStorage.getItem("item");
4431
- } catch (e2) {
4793
+ } catch (e3) {
4432
4794
  return false;
4433
4795
  }
4434
4796
  return true;
@@ -4928,7 +5290,7 @@ function _isBlockedElement(element, blockClass, blockSelector) {
4928
5290
  if (blockSelector) {
4929
5291
  return element.matches(blockSelector);
4930
5292
  }
4931
- } catch (e2) {
5293
+ } catch (e3) {
4932
5294
  }
4933
5295
  return false;
4934
5296
  }
@@ -4976,7 +5338,7 @@ function needMaskingText(node, maskTextClass, maskTextSelector, checkAncestors)
4976
5338
  return true;
4977
5339
  }
4978
5340
  }
4979
- } catch (e2) {
5341
+ } catch (e3) {
4980
5342
  }
4981
5343
  return false;
4982
5344
  }
@@ -5140,8 +5502,8 @@ function serializeElementNode(n2, options) {
5140
5502
  const tagName = getValidTagName(n2);
5141
5503
  let attributes = {};
5142
5504
  const len = n2.attributes.length;
5143
- for (let i2 = 0; i2 < len; i2++) {
5144
- const attr = n2.attributes[i2];
5505
+ for (let i = 0; i < len; i++) {
5506
+ const attr = n2.attributes[i];
5145
5507
  if (!ignoreAttribute(tagName, attr.name, attr.value)) {
5146
5508
  attributes[attr.name] = transformAttribute(doc, tagName, toLowerCase(attr.name), attr.value);
5147
5509
  }
@@ -5265,7 +5627,7 @@ function serializeElementNode(n2, options) {
5265
5627
  try {
5266
5628
  if (customElements.get(tagName))
5267
5629
  isCustomElement = true;
5268
- } catch (e2) {
5630
+ } catch (e3) {
5269
5631
  }
5270
5632
  return {
5271
5633
  type: NodeType.Element,
@@ -5691,7 +6053,7 @@ function isBlocked(node, blockClass, blockSelector, checkAncestors) {
5691
6053
  if (classMatchesRegex(el, blockClass, checkAncestors))
5692
6054
  return true;
5693
6055
  }
5694
- } catch (e2) {
6056
+ } catch (e3) {
5695
6057
  }
5696
6058
  if (blockSelector) {
5697
6059
  if (el.matches(blockSelector))
@@ -6227,7 +6589,7 @@ class MutationBuffer {
6227
6589
  if (!this.unattachedDoc) {
6228
6590
  try {
6229
6591
  this.unattachedDoc = document.implementation.createHTMLDocument();
6230
- } catch (e2) {
6592
+ } catch (e3) {
6231
6593
  this.unattachedDoc = this.doc;
6232
6594
  }
6233
6595
  }
@@ -6560,12 +6922,12 @@ function initMouseInteractionObserver({ mouseInteractionCb, doc, mirror: mirror2
6560
6922
  pointerType = currentPointerType;
6561
6923
  currentPointerType = null;
6562
6924
  }
6563
- const e2 = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;
6564
- if (!e2) {
6925
+ const e3 = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;
6926
+ if (!e3) {
6565
6927
  return;
6566
6928
  }
6567
6929
  const id = mirror2.getId(target);
6568
- const { clientX, clientY } = e2;
6930
+ const { clientX, clientY } = e3;
6569
6931
  callbackWrapper(mouseInteractionCb)(Object.assign({ type: MouseInteractions[thisEventKey], id, x: clientX, y: clientY }, pointerType !== null && { pointerType }));
6570
6932
  };
6571
6933
  };
@@ -6906,7 +7268,7 @@ function initAdoptedStyleSheetObserver({ mirror: mirror2, stylesheetManager }, h
6906
7268
  if (hostId !== null && hostId !== -1) {
6907
7269
  try {
6908
7270
  stylesheetManager.adoptStyleSheets(sheets, hostId);
6909
- } catch (e2) {
7271
+ } catch (e3) {
6910
7272
  }
6911
7273
  }
6912
7274
  return result;
@@ -7050,8 +7412,8 @@ function initSelectionObserver(param) {
7050
7412
  collapsed = selection.isCollapsed || false;
7051
7413
  const ranges = [];
7052
7414
  const count = selection.rangeCount || 0;
7053
- for (let i2 = 0; i2 < count; i2++) {
7054
- const range = selection.getRangeAt(i2);
7415
+ for (let i = 0; i < count; i++) {
7416
+ const range = selection.getRangeAt(i);
7055
7417
  const { startContainer, startOffset, endContainer, endOffset } = range;
7056
7418
  const blocked = isBlocked(startContainer, blockClass, blockSelector, true) || isBlocked(endContainer, blockClass, blockSelector, true);
7057
7419
  if (blocked)
@@ -7081,7 +7443,7 @@ function initCustomElementObserver({ doc, customElementCb }) {
7081
7443
  name
7082
7444
  }
7083
7445
  });
7084
- } catch (e2) {
7446
+ } catch (e3) {
7085
7447
  console.warn(`Custom element callback failed for ${name}`);
7086
7448
  }
7087
7449
  return original.apply(this, [name, constructor, options]);
@@ -7355,18 +7717,18 @@ class IframeManager {
7355
7717
  if (transformedEvent)
7356
7718
  this.wrappedEmit(transformedEvent, crossOriginMessageEvent.data.isCheckout);
7357
7719
  }
7358
- transformCrossOriginEvent(iframeEl, e2) {
7720
+ transformCrossOriginEvent(iframeEl, e3) {
7359
7721
  var _a;
7360
- switch (e2.type) {
7722
+ switch (e3.type) {
7361
7723
  case EventType$1.FullSnapshot: {
7362
7724
  this.crossOriginIframeMirror.reset(iframeEl);
7363
7725
  this.crossOriginIframeStyleMirror.reset(iframeEl);
7364
- this.replaceIdOnNode(e2.data.node, iframeEl);
7365
- const rootId = e2.data.node.id;
7726
+ this.replaceIdOnNode(e3.data.node, iframeEl);
7727
+ const rootId = e3.data.node.id;
7366
7728
  this.crossOriginIframeRootIdMap.set(iframeEl, rootId);
7367
- this.patchRootIdOnNode(e2.data.node, rootId);
7729
+ this.patchRootIdOnNode(e3.data.node, rootId);
7368
7730
  return {
7369
- timestamp: e2.timestamp,
7731
+ timestamp: e3.timestamp,
7370
7732
  type: EventType$1.IncrementalSnapshot,
7371
7733
  data: {
7372
7734
  source: IncrementalSource$1.Mutation,
@@ -7374,7 +7736,7 @@ class IframeManager {
7374
7736
  {
7375
7737
  parentId: this.mirror.getId(iframeEl),
7376
7738
  nextId: null,
7377
- node: e2.data.node
7739
+ node: e3.data.node
7378
7740
  }
7379
7741
  ],
7380
7742
  removes: [],
@@ -7390,16 +7752,16 @@ class IframeManager {
7390
7752
  return false;
7391
7753
  }
7392
7754
  case EventType$1.Plugin: {
7393
- return e2;
7755
+ return e3;
7394
7756
  }
7395
7757
  case EventType$1.Custom: {
7396
- this.replaceIds(e2.data.payload, iframeEl, ["id", "parentId", "previousId", "nextId"]);
7397
- return e2;
7758
+ this.replaceIds(e3.data.payload, iframeEl, ["id", "parentId", "previousId", "nextId"]);
7759
+ return e3;
7398
7760
  }
7399
7761
  case EventType$1.IncrementalSnapshot: {
7400
- switch (e2.data.source) {
7762
+ switch (e3.data.source) {
7401
7763
  case IncrementalSource$1.Mutation: {
7402
- e2.data.adds.forEach((n2) => {
7764
+ e3.data.adds.forEach((n2) => {
7403
7765
  this.replaceIds(n2, iframeEl, [
7404
7766
  "parentId",
7405
7767
  "nextId",
@@ -7409,24 +7771,24 @@ class IframeManager {
7409
7771
  const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);
7410
7772
  rootId && this.patchRootIdOnNode(n2.node, rootId);
7411
7773
  });
7412
- e2.data.removes.forEach((n2) => {
7774
+ e3.data.removes.forEach((n2) => {
7413
7775
  this.replaceIds(n2, iframeEl, ["parentId", "id"]);
7414
7776
  });
7415
- e2.data.attributes.forEach((n2) => {
7777
+ e3.data.attributes.forEach((n2) => {
7416
7778
  this.replaceIds(n2, iframeEl, ["id"]);
7417
7779
  });
7418
- e2.data.texts.forEach((n2) => {
7780
+ e3.data.texts.forEach((n2) => {
7419
7781
  this.replaceIds(n2, iframeEl, ["id"]);
7420
7782
  });
7421
- return e2;
7783
+ return e3;
7422
7784
  }
7423
7785
  case IncrementalSource$1.Drag:
7424
7786
  case IncrementalSource$1.TouchMove:
7425
7787
  case IncrementalSource$1.MouseMove: {
7426
- e2.data.positions.forEach((p2) => {
7788
+ e3.data.positions.forEach((p2) => {
7427
7789
  this.replaceIds(p2, iframeEl, ["id"]);
7428
7790
  });
7429
- return e2;
7791
+ return e3;
7430
7792
  }
7431
7793
  case IncrementalSource$1.ViewportResize: {
7432
7794
  return false;
@@ -7436,31 +7798,31 @@ class IframeManager {
7436
7798
  case IncrementalSource$1.Scroll:
7437
7799
  case IncrementalSource$1.CanvasMutation:
7438
7800
  case IncrementalSource$1.Input: {
7439
- this.replaceIds(e2.data, iframeEl, ["id"]);
7440
- return e2;
7801
+ this.replaceIds(e3.data, iframeEl, ["id"]);
7802
+ return e3;
7441
7803
  }
7442
7804
  case IncrementalSource$1.StyleSheetRule:
7443
7805
  case IncrementalSource$1.StyleDeclaration: {
7444
- this.replaceIds(e2.data, iframeEl, ["id"]);
7445
- this.replaceStyleIds(e2.data, iframeEl, ["styleId"]);
7446
- return e2;
7806
+ this.replaceIds(e3.data, iframeEl, ["id"]);
7807
+ this.replaceStyleIds(e3.data, iframeEl, ["styleId"]);
7808
+ return e3;
7447
7809
  }
7448
7810
  case IncrementalSource$1.Font: {
7449
- return e2;
7811
+ return e3;
7450
7812
  }
7451
7813
  case IncrementalSource$1.Selection: {
7452
- e2.data.ranges.forEach((range) => {
7814
+ e3.data.ranges.forEach((range) => {
7453
7815
  this.replaceIds(range, iframeEl, ["start", "end"]);
7454
7816
  });
7455
- return e2;
7817
+ return e3;
7456
7818
  }
7457
7819
  case IncrementalSource$1.AdoptedStyleSheet: {
7458
- this.replaceIds(e2.data, iframeEl, ["id"]);
7459
- this.replaceStyleIds(e2.data, iframeEl, ["styleIds"]);
7460
- (_a = e2.data.styles) === null || _a === void 0 ? void 0 : _a.forEach((style) => {
7820
+ this.replaceIds(e3.data, iframeEl, ["id"]);
7821
+ this.replaceStyleIds(e3.data, iframeEl, ["styleIds"]);
7822
+ (_a = e3.data.styles) === null || _a === void 0 ? void 0 : _a.forEach((style) => {
7461
7823
  this.replaceStyleIds(style, iframeEl, ["styleId"]);
7462
7824
  });
7463
- return e2;
7825
+ return e3;
7464
7826
  }
7465
7827
  }
7466
7828
  }
@@ -7555,7 +7917,7 @@ class ShadowDomManager {
7555
7917
  this.restoreHandlers.forEach((handler) => {
7556
7918
  try {
7557
7919
  handler();
7558
- } catch (e2) {
7920
+ } catch (e3) {
7559
7921
  }
7560
7922
  });
7561
7923
  this.restoreHandlers = [];
@@ -7576,16 +7938,16 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
7576
7938
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
7577
7939
  PERFORMANCE OF THIS SOFTWARE.
7578
7940
  ***************************************************************************** */
7579
- function __rest(s2, e2) {
7580
- var t2 = {};
7581
- for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0)
7582
- t2[p2] = s2[p2];
7941
+ function __rest(s2, e3) {
7942
+ var t4 = {};
7943
+ for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e3.indexOf(p2) < 0)
7944
+ t4[p2] = s2[p2];
7583
7945
  if (s2 != null && typeof Object.getOwnPropertySymbols === "function")
7584
- for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
7585
- if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2]))
7586
- t2[p2[i2]] = s2[p2[i2]];
7946
+ for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
7947
+ if (e3.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i]))
7948
+ t4[p2[i]] = s2[p2[i]];
7587
7949
  }
7588
- return t2;
7950
+ return t4;
7589
7951
  }
7590
7952
  function __awaiter(thisArg, _arguments, P2, generator) {
7591
7953
  function adopt(value) {
@@ -7597,15 +7959,15 @@ function __awaiter(thisArg, _arguments, P2, generator) {
7597
7959
  function fulfilled(value) {
7598
7960
  try {
7599
7961
  step(generator.next(value));
7600
- } catch (e2) {
7601
- reject(e2);
7962
+ } catch (e3) {
7963
+ reject(e3);
7602
7964
  }
7603
7965
  }
7604
7966
  function rejected(value) {
7605
7967
  try {
7606
7968
  step(generator["throw"](value));
7607
- } catch (e2) {
7608
- reject(e2);
7969
+ } catch (e3) {
7970
+ reject(e3);
7609
7971
  }
7610
7972
  }
7611
7973
  function step(result) {
@@ -7616,16 +7978,16 @@ function __awaiter(thisArg, _arguments, P2, generator) {
7616
7978
  }
7617
7979
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
7618
7980
  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
7619
- for (var i$2 = 0; i$2 < chars.length; i$2++) {
7620
- lookup[chars.charCodeAt(i$2)] = i$2;
7981
+ for (var i = 0; i < chars.length; i++) {
7982
+ lookup[chars.charCodeAt(i)] = i;
7621
7983
  }
7622
7984
  var encode = function(arraybuffer) {
7623
- var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
7624
- for (i2 = 0; i2 < len; i2 += 3) {
7625
- base64 += chars[bytes[i2] >> 2];
7626
- base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
7627
- base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
7628
- base64 += chars[bytes[i2 + 2] & 63];
7985
+ var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = "";
7986
+ for (i = 0; i < len; i += 3) {
7987
+ base64 += chars[bytes[i] >> 2];
7988
+ base64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];
7989
+ base64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];
7990
+ base64 += chars[bytes[i + 2] & 63];
7629
7991
  }
7630
7992
  if (len % 3 === 2) {
7631
7993
  base64 = base64.substring(0, base64.length - 1) + "=";
@@ -7880,8 +8242,8 @@ function funcToSource(fn, sourcemapArg) {
7880
8242
  lines.shift();
7881
8243
  var blankPrefixLength = lines[0].search(/\S/);
7882
8244
  var regex = /(['"])__worker_loader_strict__(['"])/g;
7883
- for (var i2 = 0, n2 = lines.length; i2 < n2; ++i2) {
7884
- lines[i2] = lines[i2].substring(blankPrefixLength).replace(regex, "$1use strict$2") + "\n";
8245
+ for (var i = 0, n2 = lines.length; i < n2; ++i) {
8246
+ lines[i] = lines[i].substring(blankPrefixLength).replace(regex, "$1use strict$2") + "\n";
7885
8247
  }
7886
8248
  return lines;
7887
8249
  }
@@ -7926,15 +8288,15 @@ var WorkerFactory = createInlineWorkerFactory(
7926
8288
  function fulfilled(value) {
7927
8289
  try {
7928
8290
  step(generator.next(value));
7929
- } catch (e2) {
7930
- reject(e2);
8291
+ } catch (e3) {
8292
+ reject(e3);
7931
8293
  }
7932
8294
  }
7933
8295
  function rejected(value) {
7934
8296
  try {
7935
8297
  step(generator["throw"](value));
7936
- } catch (e2) {
7937
- reject(e2);
8298
+ } catch (e3) {
8299
+ reject(e3);
7938
8300
  }
7939
8301
  }
7940
8302
  function step(result) {
@@ -7945,16 +8307,16 @@ var WorkerFactory = createInlineWorkerFactory(
7945
8307
  }
7946
8308
  var chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
7947
8309
  var lookup2 = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
7948
- for (var i2 = 0; i2 < chars2.length; i2++) {
7949
- lookup2[chars2.charCodeAt(i2)] = i2;
8310
+ for (var i = 0; i < chars2.length; i++) {
8311
+ lookup2[chars2.charCodeAt(i)] = i;
7950
8312
  }
7951
8313
  var encode2 = function(arraybuffer) {
7952
- var bytes = new Uint8Array(arraybuffer), i3, len = bytes.length, base64 = "";
7953
- for (i3 = 0; i3 < len; i3 += 3) {
7954
- base64 += chars2[bytes[i3] >> 2];
7955
- base64 += chars2[(bytes[i3] & 3) << 4 | bytes[i3 + 1] >> 4];
7956
- base64 += chars2[(bytes[i3 + 1] & 15) << 2 | bytes[i3 + 2] >> 6];
7957
- base64 += chars2[bytes[i3 + 2] & 63];
8314
+ var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
8315
+ for (i2 = 0; i2 < len; i2 += 3) {
8316
+ base64 += chars2[bytes[i2] >> 2];
8317
+ base64 += chars2[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
8318
+ base64 += chars2[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
8319
+ base64 += chars2[bytes[i2 + 2] & 63];
7958
8320
  }
7959
8321
  if (len % 3 === 2) {
7960
8322
  base64 = base64.substring(0, base64.length - 1) + "=";
@@ -7984,10 +8346,10 @@ var WorkerFactory = createInlineWorkerFactory(
7984
8346
  });
7985
8347
  }
7986
8348
  const worker = self;
7987
- worker.onmessage = function(e2) {
8349
+ worker.onmessage = function(e3) {
7988
8350
  return __awaiter2(this, void 0, void 0, function* () {
7989
8351
  if ("OffscreenCanvas" in globalThis) {
7990
- const { id, bitmap, width, height, dataURLOptions } = e2.data;
8352
+ const { id, bitmap, width, height, dataURLOptions } = e3.data;
7991
8353
  const transparentBase64 = getTransparentBlobFor(width, height, dataURLOptions);
7992
8354
  const offscreen = new OffscreenCanvas(width, height);
7993
8355
  const ctx = offscreen.getContext("2d");
@@ -8012,7 +8374,7 @@ var WorkerFactory = createInlineWorkerFactory(
8012
8374
  });
8013
8375
  lastBlobMap.set(id, base64);
8014
8376
  } else {
8015
- return worker.postMessage({ id: e2.data.id });
8377
+ return worker.postMessage({ id: e3.data.id });
8016
8378
  }
8017
8379
  });
8018
8380
  };
@@ -8064,12 +8426,12 @@ class CanvasManager {
8064
8426
  const canvasContextReset = initCanvasContextObserver(win2, blockClass, blockSelector, true);
8065
8427
  const snapshotInProgressMap = /* @__PURE__ */ new Map();
8066
8428
  const worker = new WorkerFactory();
8067
- worker.onmessage = (e2) => {
8068
- const { id } = e2.data;
8429
+ worker.onmessage = (e3) => {
8430
+ const { id } = e3.data;
8069
8431
  snapshotInProgressMap.set(id, false);
8070
- if (!("base64" in e2.data))
8432
+ if (!("base64" in e3.data))
8071
8433
  return;
8072
- const { base64, type, width, height } = e2.data;
8434
+ const { base64, type, width, height } = e3.data;
8073
8435
  this.mutationCb({
8074
8436
  id,
8075
8437
  type: CanvasContext["2D"],
@@ -8281,8 +8643,8 @@ class ProcessedNodeManager {
8281
8643
  this.loop = false;
8282
8644
  }
8283
8645
  }
8284
- function wrapEvent(e2) {
8285
- return Object.assign(Object.assign({}, e2), { timestamp: nowTimestamp() });
8646
+ function wrapEvent(e3) {
8647
+ return Object.assign(Object.assign({}, e3), { timestamp: nowTimestamp() });
8286
8648
  }
8287
8649
  let wrappedEmit;
8288
8650
  let takeFullSnapshot;
@@ -8299,7 +8661,7 @@ function record(options = {}) {
8299
8661
  if (window.parent.document) {
8300
8662
  passEmitsToParent = false;
8301
8663
  }
8302
- } catch (e2) {
8664
+ } catch (e3) {
8303
8665
  passEmitsToParent = true;
8304
8666
  }
8305
8667
  }
@@ -8343,43 +8705,43 @@ function record(options = {}) {
8343
8705
  polyfill();
8344
8706
  let lastFullSnapshotEvent;
8345
8707
  let incrementalSnapshotCount = 0;
8346
- const eventProcessor = (e2) => {
8708
+ const eventProcessor = (e3) => {
8347
8709
  for (const plugin of plugins || []) {
8348
8710
  if (plugin.eventProcessor) {
8349
- e2 = plugin.eventProcessor(e2);
8711
+ e3 = plugin.eventProcessor(e3);
8350
8712
  }
8351
8713
  }
8352
8714
  if (packFn && !passEmitsToParent) {
8353
- e2 = packFn(e2);
8715
+ e3 = packFn(e3);
8354
8716
  }
8355
- return e2;
8717
+ return e3;
8356
8718
  };
8357
- wrappedEmit = (e2, isCheckout) => {
8719
+ wrappedEmit = (e3, isCheckout) => {
8358
8720
  var _a;
8359
- if (((_a = mutationBuffers[0]) === null || _a === void 0 ? void 0 : _a.isFrozen()) && e2.type !== EventType$1.FullSnapshot && !(e2.type === EventType$1.IncrementalSnapshot && e2.data.source === IncrementalSource$1.Mutation)) {
8721
+ if (((_a = mutationBuffers[0]) === null || _a === void 0 ? void 0 : _a.isFrozen()) && e3.type !== EventType$1.FullSnapshot && !(e3.type === EventType$1.IncrementalSnapshot && e3.data.source === IncrementalSource$1.Mutation)) {
8360
8722
  mutationBuffers.forEach((buf) => buf.unfreeze());
8361
8723
  }
8362
8724
  if (inEmittingFrame) {
8363
- emit === null || emit === void 0 ? void 0 : emit(eventProcessor(e2), isCheckout);
8725
+ emit === null || emit === void 0 ? void 0 : emit(eventProcessor(e3), isCheckout);
8364
8726
  } else if (passEmitsToParent) {
8365
8727
  const message = {
8366
8728
  type: "rrweb",
8367
- event: eventProcessor(e2),
8729
+ event: eventProcessor(e3),
8368
8730
  origin: window.location.origin,
8369
8731
  isCheckout
8370
8732
  };
8371
8733
  window.parent.postMessage(message, "*");
8372
8734
  }
8373
- if (e2.type === EventType$1.FullSnapshot) {
8374
- lastFullSnapshotEvent = e2;
8735
+ if (e3.type === EventType$1.FullSnapshot) {
8736
+ lastFullSnapshotEvent = e3;
8375
8737
  incrementalSnapshotCount = 0;
8376
- } else if (e2.type === EventType$1.IncrementalSnapshot) {
8377
- if (e2.data.source === IncrementalSource$1.Mutation && e2.data.isAttachIframe) {
8738
+ } else if (e3.type === EventType$1.IncrementalSnapshot) {
8739
+ if (e3.data.source === IncrementalSource$1.Mutation && e3.data.isAttachIframe) {
8378
8740
  return;
8379
8741
  }
8380
8742
  incrementalSnapshotCount++;
8381
8743
  const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;
8382
- const exceedTime = checkoutEveryNms && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
8744
+ const exceedTime = checkoutEveryNms && e3.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
8383
8745
  if (exceedCount || exceedTime) {
8384
8746
  takeFullSnapshot(true);
8385
8747
  }
@@ -8837,8 +9199,8 @@ _.each = function(obj, iterator, context) {
8837
9199
  if (nativeForEach && obj.forEach === nativeForEach) {
8838
9200
  obj.forEach(iterator, context);
8839
9201
  } else if (obj.length === +obj.length) {
8840
- for (var i2 = 0, l2 = obj.length; i2 < l2; i2++) {
8841
- if (i2 in obj && iterator.call(context, obj[i2], i2, obj) === breaker) {
9202
+ for (var i = 0, l2 = obj.length; i < l2; i++) {
9203
+ if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) {
8842
9204
  return;
8843
9205
  }
8844
9206
  }
@@ -9048,7 +9410,7 @@ _.JSONEncode = /* @__PURE__ */ function() {
9048
9410
  var str = function(key, holder) {
9049
9411
  var gap = "";
9050
9412
  var indent = " ";
9051
- var i2 = 0;
9413
+ var i = 0;
9052
9414
  var k2 = "";
9053
9415
  var v2 = "";
9054
9416
  var length = 0;
@@ -9074,8 +9436,8 @@ _.JSONEncode = /* @__PURE__ */ function() {
9074
9436
  partial = [];
9075
9437
  if (toString.apply(value2) === "[object Array]") {
9076
9438
  length = value2.length;
9077
- for (i2 = 0; i2 < length; i2 += 1) {
9078
- partial[i2] = str(i2, value2) || "null";
9439
+ for (i = 0; i < length; i += 1) {
9440
+ partial[i] = str(i, value2) || "null";
9079
9441
  }
9080
9442
  v2 = partial.length === 0 ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]";
9081
9443
  gap = mind;
@@ -9110,10 +9472,10 @@ _.JSONDecode = function() {
9110
9472
  "r": "\r",
9111
9473
  "t": " "
9112
9474
  }, text, error = function(m2) {
9113
- var e2 = new SyntaxError(m2);
9114
- e2.at = at;
9115
- e2.text = text;
9116
- throw e2;
9475
+ var e3 = new SyntaxError(m2);
9476
+ e3.at = at;
9477
+ e3.text = text;
9478
+ throw e3;
9117
9479
  }, next = function(c2) {
9118
9480
  if (c2 && c2 !== ch) {
9119
9481
  error("Expected '" + c2 + "' instead of '" + ch + "'");
@@ -9156,7 +9518,7 @@ _.JSONDecode = function() {
9156
9518
  return number2;
9157
9519
  }
9158
9520
  }, string = function() {
9159
- var hex, i2, string2 = "", uffff;
9521
+ var hex, i, string2 = "", uffff;
9160
9522
  if (ch === '"') {
9161
9523
  while (next()) {
9162
9524
  if (ch === '"') {
@@ -9167,7 +9529,7 @@ _.JSONDecode = function() {
9167
9529
  next();
9168
9530
  if (ch === "u") {
9169
9531
  uffff = 0;
9170
- for (i2 = 0; i2 < 4; i2 += 1) {
9532
+ for (i = 0; i < 4; i += 1) {
9171
9533
  hex = parseInt(next(), 16);
9172
9534
  if (!isFinite(hex)) {
9173
9535
  break;
@@ -9292,22 +9654,22 @@ _.JSONDecode = function() {
9292
9654
  }();
9293
9655
  _.base64Encode = function(data) {
9294
9656
  var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
9295
- var o1, o2, o3, h1, h2, h3, h4, bits, i2 = 0, ac = 0, enc = "", tmp_arr = [];
9657
+ var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, enc = "", tmp_arr = [];
9296
9658
  if (!data) {
9297
9659
  return data;
9298
9660
  }
9299
9661
  data = _.utf8Encode(data);
9300
9662
  do {
9301
- o1 = data.charCodeAt(i2++);
9302
- o2 = data.charCodeAt(i2++);
9303
- o3 = data.charCodeAt(i2++);
9663
+ o1 = data.charCodeAt(i++);
9664
+ o2 = data.charCodeAt(i++);
9665
+ o3 = data.charCodeAt(i++);
9304
9666
  bits = o1 << 16 | o2 << 8 | o3;
9305
9667
  h1 = bits >> 18 & 63;
9306
9668
  h2 = bits >> 12 & 63;
9307
9669
  h3 = bits >> 6 & 63;
9308
9670
  h4 = bits & 63;
9309
9671
  tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
9310
- } while (i2 < data.length);
9672
+ } while (i < data.length);
9311
9673
  enc = tmp_arr.join("");
9312
9674
  switch (data.length % 3) {
9313
9675
  case 1:
@@ -9366,16 +9728,16 @@ _.UUID = /* @__PURE__ */ function() {
9366
9728
  return Math.random().toString(16).replace(".", "");
9367
9729
  };
9368
9730
  var UA = function() {
9369
- var ua = userAgent, i2, ch, buffer = [], ret = 0;
9731
+ var ua = userAgent, i, ch, buffer = [], ret = 0;
9370
9732
  function xor(result, byte_array) {
9371
- var j2, tmp = 0;
9372
- for (j2 = 0; j2 < byte_array.length; j2++) {
9373
- tmp |= buffer[j2] << j2 * 8;
9733
+ var j, tmp = 0;
9734
+ for (j = 0; j < byte_array.length; j++) {
9735
+ tmp |= buffer[j] << j * 8;
9374
9736
  }
9375
9737
  return result ^ tmp;
9376
9738
  }
9377
- for (i2 = 0; i2 < ua.length; i2++) {
9378
- ch = ua.charCodeAt(i2);
9739
+ for (i = 0; i < ua.length; i++) {
9740
+ ch = ua.charCodeAt(i);
9379
9741
  buffer.unshift(ch & 255);
9380
9742
  if (buffer.length >= 4) {
9381
9743
  ret = xor(ret, buffer);
@@ -9420,10 +9782,10 @@ var BLOCKED_UA_STRS = [
9420
9782
  "storebot-google"
9421
9783
  ];
9422
9784
  _.isBlockedUA = function(ua) {
9423
- var i2;
9785
+ var i;
9424
9786
  ua = ua.toLowerCase();
9425
- for (i2 = 0; i2 < BLOCKED_UA_STRS.length; i2++) {
9426
- if (ua.indexOf(BLOCKED_UA_STRS[i2]) !== -1) {
9787
+ for (i = 0; i < BLOCKED_UA_STRS.length; i++) {
9788
+ if (ua.indexOf(BLOCKED_UA_STRS[i]) !== -1) {
9427
9789
  return true;
9428
9790
  }
9429
9791
  }
@@ -9460,8 +9822,8 @@ _.cookie = {
9460
9822
  get: function(name) {
9461
9823
  var nameEQ = name + "=";
9462
9824
  var ca = document$1.cookie.split(";");
9463
- for (var i2 = 0; i2 < ca.length; i2++) {
9464
- var c2 = ca[i2];
9825
+ for (var i = 0; i < ca.length; i++) {
9826
+ var c2 = ca[i];
9465
9827
  while (c2.charAt(0) == " ") {
9466
9828
  c2 = c2.substring(1, c2.length);
9467
9829
  }
@@ -9640,8 +10002,8 @@ _.register_event = function() {
9640
10002
  }();
9641
10003
  var TOKEN_MATCH_REGEX = new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');
9642
10004
  _.dom_query = /* @__PURE__ */ function() {
9643
- function getAllChildren(e2) {
9644
- return e2.all ? e2.all : e2.getElementsByTagName("*");
10005
+ function getAllChildren(e3) {
10006
+ return e3.all ? e3.all : e3.getElementsByTagName("*");
9645
10007
  }
9646
10008
  var bad_whitespace = /[\t\r\n]/g;
9647
10009
  function hasClass(elem, selector) {
@@ -9653,10 +10015,10 @@ _.dom_query = /* @__PURE__ */ function() {
9653
10015
  return [];
9654
10016
  }
9655
10017
  var tokens = selector.split(" ");
9656
- var token, bits, tagName, found, foundCount, i2, j2, k2, elements, currentContextIndex;
10018
+ var token, bits, tagName, found, foundCount, i, j, k2, elements, currentContextIndex;
9657
10019
  var currentContext = [document$1];
9658
- for (i2 = 0; i2 < tokens.length; i2++) {
9659
- token = tokens[i2].replace(/^\s+/, "").replace(/\s+$/, "");
10020
+ for (i = 0; i < tokens.length; i++) {
10021
+ token = tokens[i].replace(/^\s+/, "").replace(/\s+$/, "");
9660
10022
  if (token.indexOf("#") > -1) {
9661
10023
  bits = token.split("#");
9662
10024
  tagName = bits[0];
@@ -9677,11 +10039,11 @@ _.dom_query = /* @__PURE__ */ function() {
9677
10039
  }
9678
10040
  found = [];
9679
10041
  foundCount = 0;
9680
- for (j2 = 0; j2 < currentContext.length; j2++) {
10042
+ for (j = 0; j < currentContext.length; j++) {
9681
10043
  if (tagName == "*") {
9682
- elements = getAllChildren(currentContext[j2]);
10044
+ elements = getAllChildren(currentContext[j]);
9683
10045
  } else {
9684
- elements = currentContext[j2].getElementsByTagName(tagName);
10046
+ elements = currentContext[j].getElementsByTagName(tagName);
9685
10047
  }
9686
10048
  for (k2 = 0; k2 < elements.length; k2++) {
9687
10049
  found[foundCount++] = elements[k2];
@@ -9689,10 +10051,10 @@ _.dom_query = /* @__PURE__ */ function() {
9689
10051
  }
9690
10052
  currentContext = [];
9691
10053
  currentContextIndex = 0;
9692
- for (j2 = 0; j2 < found.length; j2++) {
9693
- if (found[j2].className && _.isString(found[j2].className) && // some SVG elements have classNames which are not strings
9694
- hasClass(found[j2], className)) {
9695
- currentContext[currentContextIndex++] = found[j2];
10054
+ for (j = 0; j < found.length; j++) {
10055
+ if (found[j].className && _.isString(found[j].className) && // some SVG elements have classNames which are not strings
10056
+ hasClass(found[j], className)) {
10057
+ currentContext[currentContextIndex++] = found[j];
9696
10058
  }
9697
10059
  }
9698
10060
  continue;
@@ -9708,11 +10070,11 @@ _.dom_query = /* @__PURE__ */ function() {
9708
10070
  }
9709
10071
  found = [];
9710
10072
  foundCount = 0;
9711
- for (j2 = 0; j2 < currentContext.length; j2++) {
10073
+ for (j = 0; j < currentContext.length; j++) {
9712
10074
  if (tagName == "*") {
9713
- elements = getAllChildren(currentContext[j2]);
10075
+ elements = getAllChildren(currentContext[j]);
9714
10076
  } else {
9715
- elements = currentContext[j2].getElementsByTagName(tagName);
10077
+ elements = currentContext[j].getElementsByTagName(tagName);
9716
10078
  }
9717
10079
  for (k2 = 0; k2 < elements.length; k2++) {
9718
10080
  found[foundCount++] = elements[k2];
@@ -9723,45 +10085,45 @@ _.dom_query = /* @__PURE__ */ function() {
9723
10085
  var checkFunction;
9724
10086
  switch (attrOperator) {
9725
10087
  case "=":
9726
- checkFunction = function(e2) {
9727
- return e2.getAttribute(attrName) == attrValue;
10088
+ checkFunction = function(e3) {
10089
+ return e3.getAttribute(attrName) == attrValue;
9728
10090
  };
9729
10091
  break;
9730
10092
  case "~":
9731
- checkFunction = function(e2) {
9732
- return e2.getAttribute(attrName).match(new RegExp("\\b" + attrValue + "\\b"));
10093
+ checkFunction = function(e3) {
10094
+ return e3.getAttribute(attrName).match(new RegExp("\\b" + attrValue + "\\b"));
9733
10095
  };
9734
10096
  break;
9735
10097
  case "|":
9736
- checkFunction = function(e2) {
9737
- return e2.getAttribute(attrName).match(new RegExp("^" + attrValue + "-?"));
10098
+ checkFunction = function(e3) {
10099
+ return e3.getAttribute(attrName).match(new RegExp("^" + attrValue + "-?"));
9738
10100
  };
9739
10101
  break;
9740
10102
  case "^":
9741
- checkFunction = function(e2) {
9742
- return e2.getAttribute(attrName).indexOf(attrValue) === 0;
10103
+ checkFunction = function(e3) {
10104
+ return e3.getAttribute(attrName).indexOf(attrValue) === 0;
9743
10105
  };
9744
10106
  break;
9745
10107
  case "$":
9746
- checkFunction = function(e2) {
9747
- return e2.getAttribute(attrName).lastIndexOf(attrValue) == e2.getAttribute(attrName).length - attrValue.length;
10108
+ checkFunction = function(e3) {
10109
+ return e3.getAttribute(attrName).lastIndexOf(attrValue) == e3.getAttribute(attrName).length - attrValue.length;
9748
10110
  };
9749
10111
  break;
9750
10112
  case "*":
9751
- checkFunction = function(e2) {
9752
- return e2.getAttribute(attrName).indexOf(attrValue) > -1;
10113
+ checkFunction = function(e3) {
10114
+ return e3.getAttribute(attrName).indexOf(attrValue) > -1;
9753
10115
  };
9754
10116
  break;
9755
10117
  default:
9756
- checkFunction = function(e2) {
9757
- return e2.getAttribute(attrName);
10118
+ checkFunction = function(e3) {
10119
+ return e3.getAttribute(attrName);
9758
10120
  };
9759
10121
  }
9760
10122
  currentContext = [];
9761
10123
  currentContextIndex = 0;
9762
- for (j2 = 0; j2 < found.length; j2++) {
9763
- if (checkFunction(found[j2])) {
9764
- currentContext[currentContextIndex++] = found[j2];
10124
+ for (j = 0; j < found.length; j++) {
10125
+ if (checkFunction(found[j])) {
10126
+ currentContext[currentContextIndex++] = found[j];
9765
10127
  }
9766
10128
  }
9767
10129
  continue;
@@ -9769,8 +10131,8 @@ _.dom_query = /* @__PURE__ */ function() {
9769
10131
  tagName = token;
9770
10132
  found = [];
9771
10133
  foundCount = 0;
9772
- for (j2 = 0; j2 < currentContext.length; j2++) {
9773
- elements = currentContext[j2].getElementsByTagName(tagName);
10134
+ for (j = 0; j < currentContext.length; j++) {
10135
+ elements = currentContext[j].getElementsByTagName(tagName);
9774
10136
  for (k2 = 0; k2 < elements.length; k2++) {
9775
10137
  found[foundCount++] = elements[k2];
9776
10138
  }
@@ -10191,7 +10553,7 @@ SharedLock.prototype.withLock = function(lockedCB, errorCB, pid) {
10191
10553
  pid = errorCB;
10192
10554
  errorCB = null;
10193
10555
  }
10194
- var i2 = pid || (/* @__PURE__ */ new Date()).getTime() + "|" + Math.random();
10556
+ var i = pid || (/* @__PURE__ */ new Date()).getTime() + "|" + Math.random();
10195
10557
  var startTime = (/* @__PURE__ */ new Date()).getTime();
10196
10558
  var key = this.storageKey;
10197
10559
  var pollIntervalMS = this.pollIntervalMS;
@@ -10205,7 +10567,7 @@ SharedLock.prototype.withLock = function(lockedCB, errorCB, pid) {
10205
10567
  };
10206
10568
  var delay = function(cb) {
10207
10569
  if ((/* @__PURE__ */ new Date()).getTime() - startTime > timeoutMS) {
10208
- logger$3.error("Timeout waiting for mutex on " + key + "; clearing lock. [" + i2 + "]");
10570
+ logger$3.error("Timeout waiting for mutex on " + key + "; clearing lock. [" + i + "]");
10209
10571
  storage.removeItem(keyZ);
10210
10572
  storage.removeItem(keyY);
10211
10573
  loop();
@@ -10230,11 +10592,11 @@ SharedLock.prototype.withLock = function(lockedCB, errorCB, pid) {
10230
10592
  };
10231
10593
  var getSetY = function() {
10232
10594
  var valY = storage.getItem(keyY);
10233
- if (valY && valY !== i2) {
10595
+ if (valY && valY !== i) {
10234
10596
  return false;
10235
10597
  } else {
10236
- storage.setItem(keyY, i2);
10237
- if (storage.getItem(keyY) === i2) {
10598
+ storage.setItem(keyY, i);
10599
+ if (storage.getItem(keyY) === i) {
10238
10600
  return true;
10239
10601
  } else {
10240
10602
  if (!localStorageSupported(storage, true)) {
@@ -10245,14 +10607,14 @@ SharedLock.prototype.withLock = function(lockedCB, errorCB, pid) {
10245
10607
  }
10246
10608
  };
10247
10609
  var loop = function() {
10248
- storage.setItem(keyX, i2);
10610
+ storage.setItem(keyX, i);
10249
10611
  waitFor(getSetY, function() {
10250
- if (storage.getItem(keyX) === i2) {
10612
+ if (storage.getItem(keyX) === i) {
10251
10613
  criticalSection();
10252
10614
  return;
10253
10615
  }
10254
10616
  delay(function() {
10255
- if (storage.getItem(keyY) !== i2) {
10617
+ if (storage.getItem(keyY) !== i) {
10256
10618
  loop();
10257
10619
  return;
10258
10620
  }
@@ -10268,10 +10630,10 @@ SharedLock.prototype.withLock = function(lockedCB, errorCB, pid) {
10268
10630
  lockedCB();
10269
10631
  } finally {
10270
10632
  storage.removeItem(keyZ);
10271
- if (storage.getItem(keyY) === i2) {
10633
+ if (storage.getItem(keyY) === i) {
10272
10634
  storage.removeItem(keyY);
10273
10635
  }
10274
- if (storage.getItem(keyX) === i2) {
10636
+ if (storage.getItem(keyX) === i) {
10275
10637
  storage.removeItem(keyX);
10276
10638
  }
10277
10639
  }
@@ -10342,8 +10704,8 @@ RequestQueue.prototype.fillBatch = function(batchSize) {
10342
10704
  _.each(batch, function(item2) {
10343
10705
  idsInBatch[item2["id"]] = true;
10344
10706
  });
10345
- for (var i2 = 0; i2 < storedQueue.length; i2++) {
10346
- var item = storedQueue[i2];
10707
+ for (var i = 0; i < storedQueue.length; i++) {
10708
+ var item = storedQueue[i];
10347
10709
  if ((/* @__PURE__ */ new Date()).getTime() > item["flushAfter"] && !idsInBatch[item["id"]]) {
10348
10710
  item.orphaned = true;
10349
10711
  batch.push(item);
@@ -10384,8 +10746,8 @@ RequestQueue.prototype.removeItemsByID = function(ids, cb) {
10384
10746
  succeeded = this.saveToStorage(storedQueue);
10385
10747
  if (succeeded) {
10386
10748
  storedQueue = this.readFromStorage();
10387
- for (var i2 = 0; i2 < storedQueue.length; i2++) {
10388
- var item = storedQueue[i2];
10749
+ for (var i = 0; i < storedQueue.length; i++) {
10750
+ var item = storedQueue[i];
10389
10751
  if (item["id"] && !!idSet[item["id"]]) {
10390
10752
  this.reportError("Item not removed from storage");
10391
10753
  return false;
@@ -10947,11 +11309,11 @@ DomTracker.prototype.track = function(query, event_name, properties, user_callba
10947
11309
  return;
10948
11310
  }
10949
11311
  _.each(elements, function(element) {
10950
- _.register_event(element, this.override_event, function(e2) {
11312
+ _.register_event(element, this.override_event, function(e3) {
10951
11313
  var options = {};
10952
11314
  var props = that.create_properties(properties, this);
10953
11315
  var timeout = that.mp.get_config("track_links_timeout");
10954
- that.event_handler(e2, this, options);
11316
+ that.event_handler(e3, this, options);
10955
11317
  window.setTimeout(that.track_callback(user_callback, props, options, true), timeout);
10956
11318
  that.mp.track(event_name, props, that.track_callback(user_callback, props, options));
10957
11319
  });
@@ -11394,7 +11756,7 @@ MixpanelPeople.prototype._flush = function(_set_callback, _add_callback, _append
11394
11756
  _append_callback(response, data);
11395
11757
  }
11396
11758
  };
11397
- for (var i2 = $append_queue.length - 1; i2 >= 0; i2--) {
11759
+ for (var i = $append_queue.length - 1; i >= 0; i--) {
11398
11760
  $append_queue = this._mixpanel["persistence"].load_queue(APPEND_ACTION);
11399
11761
  $append_item = $append_queue.pop();
11400
11762
  _this._mixpanel["persistence"].save();
@@ -11414,7 +11776,7 @@ MixpanelPeople.prototype._flush = function(_set_callback, _add_callback, _append
11414
11776
  _remove_callback(response, data);
11415
11777
  }
11416
11778
  };
11417
- for (var j2 = $remove_queue.length - 1; j2 >= 0; j2--) {
11779
+ for (var j = $remove_queue.length - 1; j >= 0; j--) {
11418
11780
  $remove_queue = this._mixpanel["persistence"].load_queue(REMOVE_ACTION);
11419
11781
  $remove_item = $remove_queue.pop();
11420
11782
  _this._mixpanel["persistence"].save();
@@ -12176,16 +12538,16 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {
12176
12538
  } else if (use_sendBeacon) {
12177
12539
  try {
12178
12540
  succeeded = sendBeacon(url, body_data);
12179
- } catch (e2) {
12180
- lib.report_error(e2);
12541
+ } catch (e3) {
12542
+ lib.report_error(e3);
12181
12543
  succeeded = false;
12182
12544
  }
12183
12545
  try {
12184
12546
  if (callback) {
12185
12547
  callback(succeeded ? 1 : 0);
12186
12548
  }
12187
- } catch (e2) {
12188
- lib.report_error(e2);
12549
+ } catch (e3) {
12550
+ lib.report_error(e3);
12189
12551
  }
12190
12552
  } else if (USE_XHR) {
12191
12553
  try {
@@ -12211,8 +12573,8 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {
12211
12573
  var response;
12212
12574
  try {
12213
12575
  response = _.JSONDecode(req.responseText);
12214
- } catch (e2) {
12215
- lib.report_error(e2);
12576
+ } catch (e3) {
12577
+ lib.report_error(e3);
12216
12578
  if (options.ignore_json_errors) {
12217
12579
  response = req.responseText;
12218
12580
  } else {
@@ -12244,8 +12606,8 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {
12244
12606
  }
12245
12607
  };
12246
12608
  req.send(body_data);
12247
- } catch (e2) {
12248
- lib.report_error(e2);
12609
+ } catch (e3) {
12610
+ lib.report_error(e3);
12249
12611
  succeeded = false;
12250
12612
  }
12251
12613
  } else {
@@ -12939,7 +13301,7 @@ var add_dom_loaded_handler = function() {
12939
13301
  function do_scroll_check() {
12940
13302
  try {
12941
13303
  document$1.documentElement.doScroll("left");
12942
- } catch (e2) {
13304
+ } catch (e3) {
12943
13305
  setTimeout(do_scroll_check, 1);
12944
13306
  return;
12945
13307
  }
@@ -12956,7 +13318,7 @@ var add_dom_loaded_handler = function() {
12956
13318
  var toplevel = false;
12957
13319
  try {
12958
13320
  toplevel = win.frameElement === null;
12959
- } catch (e2) {
13321
+ } catch (e3) {
12960
13322
  }
12961
13323
  if (document$1.documentElement.doScroll && toplevel) {
12962
13324
  do_scroll_check();
@@ -13065,7 +13427,7 @@ function observeIdentifyResult(stage, report, onTimeout) {
13065
13427
  }, 5e3);
13066
13428
  return { complete };
13067
13429
  }
13068
- const version = "1.1.7-alpha.1";
13430
+ const version = "1.1.7";
13069
13431
  const MIXPANEL_DISTINCT_ID_CACHE_KEY = "mp_distinct_id";
13070
13432
  const SDK_SUPER_PROPERTIES = {
13071
13433
  "Event Source": "sdk",
@@ -13194,7 +13556,7 @@ function buildProxyUrl(url) {
13194
13556
  return `${url}?${PROXY_QUERY_PARAM}`;
13195
13557
  }
13196
13558
  async function initFingerprint(apiKey, proxyUrl) {
13197
- const customEndpointArray = [r$2];
13559
+ const customEndpointArray = [r];
13198
13560
  const customScriptEndpointArray = [G];
13199
13561
  if (proxyUrl) {
13200
13562
  customEndpointArray.unshift(proxyUrl);
@@ -13295,378 +13657,50 @@ const fingerprintService = {
13295
13657
  isFingerprintReady,
13296
13658
  getCachedFingerprint
13297
13659
  };
13298
- const r$1 = {
13660
+ let environment;
13661
+ let appName;
13662
+ const origin = window.location.origin;
13663
+ const coreAPIConfig = {
13299
13664
  sandbox: {
13300
- search: "https://search.resertravel.com/api",
13301
- purchase: "https://purchases.resertravel.com/api",
13302
- core: ""
13303
- },
13304
- production: {
13305
- search: "https://search.reservamos.mx/api",
13306
- purchase: "https://compras.reservamos.mx/api",
13307
- core: ""
13308
- }
13309
- }, s$2 = "sandbox", a$1 = "v2", t$2 = "v1", n$1 = {
13310
- env: s$2,
13311
- headers: {},
13312
- searchUrl: r$1[s$2].search,
13313
- purchaseUrl: r$1[s$2].purchase,
13314
- coreUrl: r$1[s$2].core,
13315
- version: a$1,
13316
- coreVersion: t$2,
13317
- apiKey: void 0,
13318
- userAuthToken: void 0,
13319
- withCredentials: false
13320
- };
13321
- let c$2 = Object.assign({}, n$1);
13322
- const o$1 = {
13323
- // UNAUTHORIZED
13324
- 1: {
13325
- code: 200,
13326
- message: "Operación no autorizada"
13327
- }
13328
- }, s$1 = {
13329
- // INCORRECT_PARAMS
13330
- 3: {
13331
- code: 300,
13332
- message: "Parámetros incorrectos"
13333
- },
13334
- // INCORRECT_DATE
13335
- 7: {
13336
- code: 301,
13337
- message: "Fecha inválida"
13338
- }
13339
- }, r = {
13340
- // NONEXISTENT_TRIP
13341
- 10: {
13342
- code: 400,
13343
- message: "No existe el viaje"
13344
- },
13345
- // journey_key_not_found
13346
- 20: {
13347
- code: 60,
13348
- message: "No se encontró el viaje"
13349
- },
13350
- // sold_out_fare_code
13351
- 21: {
13352
- code: 60,
13353
- message: "Tarifa no disponible"
13354
- },
13355
- // unavailable_fare_code
13356
- 22: {
13357
- code: 60,
13358
- message: "Tarifa no disponible"
13359
- }
13360
- }, n = (e2) => ({
13361
- // INVALID_DISCOUNT
13362
- 11: {
13363
- code: 500,
13364
- message: e2
13365
- },
13366
- //EXPIRED_DISCOUNT
13367
- 12: {
13368
- code: 501,
13369
- message: e2
13370
- }
13371
- }), a = {
13372
- // unavailable_student
13373
- 23: {
13374
- code: 60,
13375
- message: "Estudiante no disponible"
13376
- },
13377
- // unavailable_teacher
13378
- 24: {
13379
- code: 60,
13380
- message: "Profesor no disponible"
13381
- },
13382
- // unavailable_minor
13383
- 25: {
13384
- code: 60,
13385
- message: "Menor no disponible"
13386
- },
13387
- // unavailable_special
13388
- 26: {
13389
- code: 60,
13390
- message: "Capacidades diferentes no disponible"
13391
- },
13392
- // unavailable_older
13393
- 27: {
13394
- code: 60,
13395
- message: "INSEN no disponible"
13396
- },
13397
- // unavailable_general
13398
- 28: {
13399
- code: 60,
13400
- message: "General no disponible"
13665
+ baseUrl: "https://datalake-api-dev.reservamossaas.com/api",
13666
+ defaultHeaders: {
13667
+ Origin: origin,
13668
+ Authorization: "Bearer 753bf0710dc920a84236d42241d4f487"
13669
+ }
13401
13670
  },
13402
- // unavailable_unknown
13403
- 29: {
13404
- code: 60,
13405
- message: "Error desconocido"
13406
- }
13407
- }, c$1 = (e2) => ({
13408
- 30: {
13409
- code: 30,
13410
- message: e2
13411
- }
13412
- }), d$1 = {
13413
- 50: {
13414
- code: 50,
13415
- message: "Unknow Error"
13416
- }
13417
- }, i$1 = (e2) => ({
13418
- ...o$1,
13419
- ...s$1,
13420
- ...r,
13421
- ...n(e2),
13422
- ...a,
13423
- ...d$1,
13424
- ...c$1(e2)
13425
- });
13426
- class o extends Error {
13427
- constructor(r2 = -100, s2 = "Unknown error", t2 = null) {
13428
- super(s2), this.code = r2, this.details = t2, this.stack = new Error().stack;
13429
- }
13430
- }
13431
- async function w(t2) {
13432
- const e2 = [404, 422, 500], r2 = await t2.json();
13433
- if (t2.ok)
13434
- return r2;
13435
- if (e2.includes(t2.status))
13436
- switch (t2.status) {
13437
- case 404:
13438
- throw new o(100, "Not found");
13439
- case 422:
13440
- return r2;
13441
- case 500:
13442
- throw new o(101, "Server error");
13443
- default:
13444
- throw new o();
13671
+ prod: {
13672
+ baseUrl: "https://data-lake.reservamossaas.com/api",
13673
+ defaultHeaders: {
13674
+ Origin: origin,
13675
+ Authorization: "Bearer 753bf0710dc920a84236d42241d4f487"
13445
13676
  }
13446
- else
13447
- throw new o(t2.status, r2.message || t2.statusText, r2);
13448
- }
13449
- function l$1(t2) {
13450
- if (t2.errors instanceof Array) {
13451
- const { code: e2 = -100, message: r2 = "Unknown error" } = t2.errors[0] || {}, n2 = i$1(r2)[e2];
13452
- throw n2 ? new o(n2.code, n2.message, t2.errors[0]) : new o(e2, r2, t2.errors[0]);
13453
- } else
13454
- return t2;
13455
- }
13456
- function y(...t2) {
13457
- const r2 = Object.keys(Object.assign({}, ...t2)).reduce(
13458
- (n2, o2) => ({
13459
- ...n2,
13460
- [o2]: t2.map((a2) => o2 in a2 && a2[o2]).filter(Boolean)
13461
- }),
13462
- {}
13463
- );
13464
- return new Headers(r2);
13465
- }
13466
- function c(t2, e2 = {}, r2 = {}, n2) {
13467
- const {
13468
- apiKey: o2,
13469
- withCredentials: a2,
13470
- userAuthToken: s2,
13471
- headers: d2
13472
- } = c$2, u3 = {
13473
- Accept: "application/json",
13474
- Authorization: `Token token=${r2.apiKey || o2}`,
13475
- "Content-Type": "application/json"
13476
- };
13477
- return s2 && (u3.Authorization = `Token ${r2.apiKey || o2}, Bearer ${s2}`), e2.headers = y(d2, u3), e2.credentials = a2 ? "include" : "omit", typeof e2.body != "string" && (e2.body = JSON.stringify(e2.body)), fetch(t2, e2).then(w).then(l$1).catch(n2);
13478
- }
13479
- function E(t2, e2 = {}, r2) {
13480
- return c(t2, e2, {}, r2);
13481
- }
13482
- let u$1 = class u {
13483
- constructor({
13484
- url: e2,
13485
- watch: i2,
13486
- expect: h2,
13487
- maxRetries: t2 = 30,
13488
- interval: s2 = 2e3,
13489
- eachCall: c2 = null
13490
- }) {
13491
- this.url = e2, this.watch = i2, this.expect = h2 instanceof Array ? h2 : [h2], this.interval = s2, this.maxRetries = t2, this.eachCall = c2 && c2.bind(this), this.aborted = false, this.timers = [], this.execute = this.execute.bind(this), this.executeEachCall = this.executeEachCall.bind(this);
13492
- }
13493
- start() {
13494
- return this.execute(this.maxRetries);
13495
- }
13496
- abort() {
13497
- this.aborted = true;
13498
- }
13499
- execute(e2) {
13500
- const i2 = (t2) => {
13501
- if (this.expect.includes(t2[this.watch]) || e2 === 1 || this.aborted) {
13502
- let s2 = t2[this.watch];
13503
- e2 === 1 ? s2 = "retries_exceeded" : this.aborted && (s2 = "aborted"), this.timers.forEach(clearInterval), this.executeEachCall(s2, t2);
13504
- } else if (t2[this.watch] === "failed")
13505
- this.timers.forEach(clearInterval), this.executeEachCall("failed", t2);
13506
- else {
13507
- this.executeEachCall("pending", t2);
13508
- const s2 = window.setTimeout(
13509
- this.execute,
13510
- this.interval,
13511
- e2 - 1
13512
- );
13513
- this.timers.push(s2);
13514
- }
13515
- }, h2 = (t2) => this.executeEachCall("error", t2);
13516
- return E(this.url, {}, h2).then(i2);
13517
- }
13518
- executeEachCall(e2, i2) {
13519
- this.eachCall instanceof Function && this.eachCall({ status: e2, payload: i2 }) && this.abort();
13520
13677
  }
13521
13678
  };
13522
- function j({
13523
- apiName: h2,
13524
- defaultApiVersion: c2
13525
- }) {
13526
- let n2, i2 = {
13527
- "Content-Type": "application/json"
13528
- }, r2;
13529
- function f2(e2) {
13530
- n2 = e2.baseUrl, i2 = {
13531
- ...i2,
13532
- ...e2.defaultHeaders || {}
13533
- };
13534
- }
13535
- function p2(e2) {
13536
- r2 = e2;
13537
- }
13538
- function d2() {
13539
- if (!n2)
13540
- throw new Error(`Base URL is not set for ${h2} API.`);
13541
- }
13542
- const $ = { body: {} };
13543
- async function y2(e2, t2 = $) {
13544
- d2();
13545
- const { body: s2, headers: o2 = {}, apiVersion: a2 = c2 } = t2, u3 = `${n2}/${a2}/${e2}`, l2 = {
13546
- ...i2,
13547
- ...o2,
13548
- ...r2 ? { Authorization: r2 } : {}
13549
- };
13550
- return (await fetch(u3, {
13551
- method: "POST",
13552
- body: JSON.stringify(s2),
13553
- headers: l2
13554
- })).json();
13555
- }
13556
- async function w2(e2, t2 = {}) {
13557
- d2();
13558
- const { headers: s2 = {}, apiVersion: o2 = c2 } = t2, a2 = `${n2}/${o2}/${e2}`;
13559
- return (await fetch(a2, { headers: s2 })).json();
13560
- }
13561
- function H2(e2, t2) {
13562
- const o2 = {
13563
- url: `${n2}/${c2}/${e2}`,
13564
- watch: t2.watch,
13565
- expect: t2.expect,
13566
- eachCall: t2.onEachResponse
13567
- };
13568
- return new u$1(o2);
13569
- }
13570
- async function b2(e2, t2 = {}) {
13571
- d2();
13572
- const { headers: s2 = {}, apiVersion: o2 = c2 } = t2, a2 = `${n2}/${o2}/${e2}`, u3 = {
13573
- ...i2,
13574
- ...s2,
13575
- ...r2 ? { Authorization: r2 } : {}
13576
- };
13577
- return (await fetch(a2, {
13578
- method: "DELETE",
13579
- headers: u3
13580
- })).json();
13679
+ function setEnvironment(env) {
13680
+ environment = env;
13681
+ }
13682
+ function setAppName(name) {
13683
+ appName = name;
13684
+ }
13685
+ function getCoreAPIConfig() {
13686
+ if (!environment) {
13687
+ throw new Error(
13688
+ "Unable to get core API config, environment not set. Use configService.setEnvironment(environment) to set the environment."
13689
+ );
13581
13690
  }
13691
+ const config = coreAPIConfig[environment];
13582
13692
  return {
13583
- get: w2,
13584
- post: y2,
13585
- delete: b2,
13586
- setAuthorizationHeader: p2,
13587
- setConfig: f2,
13588
- poll: H2
13589
- };
13590
- }
13591
- const t$1 = j({
13592
- apiName: "Core",
13593
- defaultApiVersion: "v1"
13594
- });
13595
- async function t(o2) {
13596
- const { data: e2 } = await t$1.post(
13597
- "anonymous_profiles/identify",
13598
- {
13599
- body: o2
13693
+ ...config,
13694
+ defaultHeaders: {
13695
+ ...config.defaultHeaders,
13696
+ ...appName ? { "x-app-name": appName } : {}
13600
13697
  }
13601
- );
13602
- return e2;
13603
- }
13604
- const s = {
13605
- createAnonymousProfile: t
13606
- };
13607
- function d({
13608
- searchId: e2,
13609
- userIdentifier: t2
13610
- }) {
13611
- return t$1.get(
13612
- `trip_recommendations/${e2}/${t2}`
13613
- );
13614
- }
13615
- function i(e2) {
13616
- return t$1.post("seat_recommendations", {
13617
- body: e2
13618
- });
13619
- }
13620
- function p({
13621
- distinct_id: e2,
13622
- ...t2
13623
- }) {
13624
- return t$1.post(`seat_recommendations/${e2}`, {
13625
- body: t2
13626
- });
13627
- }
13628
- function u2(e2, t2) {
13629
- const { start: o2, onEachResponse: r2 } = t2, c2 = `profiles/${e2}`, a2 = {
13630
- watch: "state",
13631
- expect: "finished",
13632
- onEachResponse: r2
13633
- }, s2 = t$1.poll(c2, a2);
13634
- return o2 && s2.start(), s2;
13635
- }
13636
- async function m(e2) {
13637
- return t$1.post("profiles", {
13638
- body: e2
13639
- });
13640
- }
13641
- async function l(e2) {
13642
- return t$1.post("passengers", {
13643
- body: e2
13644
- });
13645
- }
13646
- async function f$1(e2) {
13647
- return t$1.get(
13648
- `passengers/${e2}`
13649
- );
13650
- }
13651
- async function g(e2, t2) {
13652
- return t$1.delete(
13653
- `passengers/${e2}/${t2}`
13654
- );
13698
+ };
13655
13699
  }
13656
- const R = {
13657
- getRecommendedTrips: d,
13658
- createRecommendedPlaces: m,
13659
- pollRecommendedPlaces: u2,
13660
- createRecommendedSeats: i,
13661
- getRecommendedSeats: p,
13662
- getFrequentPassengers: f$1,
13663
- createFrequentPassengers: l,
13664
- deleteFrequentPassenger: g
13665
- };
13666
- const f = {
13667
- setConfig: t$1.setConfig,
13668
- recommendations: R,
13669
- profiles: s
13700
+ const configService = {
13701
+ setEnvironment,
13702
+ setAppName,
13703
+ getCoreAPIConfig
13670
13704
  };
13671
13705
  const geolocationSelectedSchema = z.object({
13672
13706
  "Selected City": z.string().min(1, "Selected city is required"),
@@ -14068,7 +14102,7 @@ async function init$1(config) {
14068
14102
  if (appName2) {
14069
14103
  configService.setAppName(appName2);
14070
14104
  }
14071
- f.setConfig(configService.getCoreAPIConfig());
14105
+ a$1.setConfig(configService.getCoreAPIConfig());
14072
14106
  onLoaded();
14073
14107
  }
14074
14108
  function isTrackerReady() {
@@ -14500,7 +14534,7 @@ async function requestAnonymousProfile(payload, report) {
14500
14534
  identifiers.push({ key: "fingerprint", value: userFingerprintId });
14501
14535
  if (distinctId) identifiers.push({ key: "distinct_id", value: distinctId });
14502
14536
  const dataPayload = getAnonymousProfilePayload(payload, identifiers);
14503
- return await f.profiles.createAnonymousProfile(dataPayload);
14537
+ return await a$1.profiles.createAnonymousProfile(dataPayload);
14504
14538
  }
14505
14539
  const KNOWN_PROPERTIES = ["firstName", "lastName", "email", "phone"];
14506
14540
  const FINGERPRINT_PROPERTY = "Known Fingerprints";
@@ -14655,7 +14689,7 @@ async function createFrequentPassengers(payload) {
14655
14689
  if (!distinctId) {
14656
14690
  throw new Error("No distinct ID found");
14657
14691
  }
14658
- return await f.recommendations.createFrequentPassengers({
14692
+ return await a$1.recommendations.createFrequentPassengers({
14659
14693
  ...payload,
14660
14694
  distinct_id: distinctId,
14661
14695
  device_fingerprint: userFingerprintId || ""
@@ -14686,7 +14720,7 @@ async function createRecommendedSeats$1(payload) {
14686
14720
  if (!distinctId) {
14687
14721
  throw new Error("No distinct ID found");
14688
14722
  }
14689
- return await f.recommendations.createRecommendedSeats({
14723
+ return await a$1.recommendations.createRecommendedSeats({
14690
14724
  ...payload,
14691
14725
  distinct_id: distinctId,
14692
14726
  device_fingerprint: userFingerprintId || ""
@@ -14708,7 +14742,7 @@ async function deleteFrequentPassengers(payload) {
14708
14742
  if (!distinctId) {
14709
14743
  throw new Error("No distinct ID found");
14710
14744
  }
14711
- return await f.recommendations.deleteFrequentPassenger(
14745
+ return await a$1.recommendations.deleteFrequentPassenger(
14712
14746
  distinctId,
14713
14747
  payload.passengerId
14714
14748
  );
@@ -14722,7 +14756,7 @@ async function getFrequentPassengers() {
14722
14756
  if (!distinctId) {
14723
14757
  throw new Error("No distinct ID found");
14724
14758
  }
14725
- return await f.recommendations.getFrequentPassengers(distinctId);
14759
+ return await a$1.recommendations.getFrequentPassengers(distinctId);
14726
14760
  } catch (error) {
14727
14761
  throw new Error(error instanceof Error ? error.message : String(error));
14728
14762
  }
@@ -14734,7 +14768,7 @@ const pollingRecommendedPlaces = async (response) => {
14734
14768
  resolve(response);
14735
14769
  return;
14736
14770
  }
14737
- f.recommendations.pollRecommendedPlaces(polling_id, {
14771
+ a$1.recommendations.pollRecommendedPlaces(polling_id, {
14738
14772
  start: true,
14739
14773
  watch: "state",
14740
14774
  expect: "finished",
@@ -14756,7 +14790,7 @@ async function getRecommendedPlaces() {
14756
14790
  if (!distinctId) {
14757
14791
  throw new Error("No distinct ID found");
14758
14792
  }
14759
- const response = await f.recommendations.createRecommendedPlaces({
14793
+ const response = await a$1.recommendations.createRecommendedPlaces({
14760
14794
  distinct_id: distinctId
14761
14795
  });
14762
14796
  if (!response) {
@@ -14785,7 +14819,7 @@ async function createRecommendedSeats(payload) {
14785
14819
  if (!distinctId) {
14786
14820
  throw new Error("No distinct ID found");
14787
14821
  }
14788
- return await f.recommendations.getRecommendedSeats({
14822
+ return await a$1.recommendations.getRecommendedSeats({
14789
14823
  ...payload,
14790
14824
  distinct_id: distinctId
14791
14825
  });
@@ -14804,7 +14838,7 @@ async function getRecommendedTrips({
14804
14838
  validatorService.validateProps({ searchId }, GetRecommendedTripsSchema);
14805
14839
  const identifier = fingerprintService.getCachedFingerprint() || mixpanelService.getMixpanelDistinctId();
14806
14840
  if (!identifier) throw new Error("No identifier id");
14807
- const response = await f.recommendations.getRecommendedTrips({
14841
+ const response = await a$1.recommendations.getRecommendedTrips({
14808
14842
  searchId,
14809
14843
  userIdentifier: String(identifier)
14810
14844
  });