@revolugo/elements 6.8.0-rc.4 → 6.8.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{revolugo.banktransferdetails.BBkYrDrP.min.js → revolugo.banktransferdetails.BAUbHW-v.min.js} +9 -9
- package/dist/{revolugo.bdaterangepicker.DSJE5n7Z.min.js → revolugo.bdaterangepicker.E8eS2QMH.min.js} +6 -6
- package/dist/{revolugo.bformattedamount.vue_vue_type_script_setup_true_lang.eoXMEkFJ.min.js → revolugo.bformattedamount.vue_vue_type_script_setup_true_lang.DF3WP5Mi.min.js} +2 -2
- package/dist/{revolugo.bhoteloffersfilterbar.DwrYTxiv.min.js → revolugo.bhoteloffersfilterbar.BKUVyAfq.min.js} +31 -31
- package/dist/{revolugo.bhotelroomsdetails.jJmgFO6V.min.js → revolugo.bhotelroomsdetails.BX8egxTH.min.js} +6 -6
- package/dist/{revolugo.bhotelsearchbar.DgBdyH6X.min.js → revolugo.bhotelsearchbar.DFrjPFGj.min.js} +16 -16
- package/dist/{revolugo.bimagecarousel.DQXXM5CL.min.js → revolugo.bimagecarousel.SwqkFB_3.min.js} +9 -9
- package/dist/{revolugo.bookingdetailssidebar.Dm6EGehl.min.js → revolugo.bookingdetailssidebar.CziZJHhH.min.js} +11 -11
- package/dist/{revolugo.bookingdetailssidebar.CKrtgLGZ.min.js → revolugo.bookingdetailssidebar.DVtwkl8a.min.js} +4 -4
- package/dist/{revolugo.bookingmanager.ra4Fie13.min.js → revolugo.bookingmanager.Dq-HSdWX.min.js} +20 -20
- package/dist/{revolugo.bpricesummaryskeleton.qpy47Wsi.min.js → revolugo.bpricesummaryskeleton.CBWHU5FT.min.js} +4 -4
- package/dist/{revolugo.bstarrating.vue_vue_type_script_setup_true_lang.DD4SRw7w.min.js → revolugo.bstarrating.vue_vue_type_script_setup_true_lang.Bl8RUpcy.min.js} +7 -7
- package/dist/{revolugo.btag.WMRlt8-8.min.js → revolugo.btag.BqWVYmnF.min.js} +6 -6
- package/dist/{revolugo.cancellationpoliciesbadge.C6zxRPaZ.min.js → revolugo.cancellationpoliciesbadge.BwScRGzN.min.js} +4 -4
- package/dist/{revolugo.cancellationpoliciesbadge.BWHDapkN.min.js → revolugo.cancellationpoliciesbadge.CZhbi5-J.min.js} +7 -7
- package/dist/{revolugo.cancellationpolicieslist.CHhCIAQS.min.js → revolugo.cancellationpolicieslist.C-IQuJT0.min.js} +4 -4
- package/dist/{revolugo.cancellationpolicieslist.B-nwKXUj.min.js → revolugo.cancellationpolicieslist.DtrFU7G-.min.js} +4 -4
- package/dist/{revolugo.case-transformers.CEdbnlE-.min.js → revolugo.case-transformers.Dkh-YFTz.min.js} +2 -2
- package/dist/{revolugo.creditcardform.CpSNG8oP.min.js → revolugo.creditcardform.BpWLyP0P.min.js} +4 -4
- package/dist/{revolugo.creditcardform.698oFnsf.min.js → revolugo.creditcardform.CT_eT7Vn.min.js} +11 -11
- package/dist/{revolugo.creditcardpayment.BLosL1aA.min.js → revolugo.creditcardpayment.-S8qvmZq.min.js} +4 -4
- package/dist/{revolugo.creditcardpayment.6u4OCU4A.min.js → revolugo.creditcardpayment.DfK_WNS6.min.js} +13 -13
- package/dist/{revolugo.currencypicker.BXsQGdbF.min.js → revolugo.currencypicker.C0zkiyGz.min.js} +6 -6
- package/dist/{revolugo.currencypickerbtn.NVqcx7mQ.min.js → revolugo.currencypickerbtn.C5e3nP5r.min.js} +4 -4
- package/dist/{revolugo.currencypickerbtn.D-42MaaK.min.js → revolugo.currencypickerbtn.KJkofbUb.min.js} +9 -9
- package/dist/{revolugo.dialog-attach.BuUfn9u6.min.js → revolugo.dialog-attach.CQ4vt9Bs.min.js} +2 -2
- package/dist/{revolugo.dialog-transition.2P5jpnv2.min.js → revolugo.dialog-transition.H6W-cY6Z.min.js} +3 -3
- package/dist/{revolugo.fastbookingflow.CFE4HRID.min.js → revolugo.fastbookingflow.BIcvAl-D.min.js} +4 -4
- package/dist/{revolugo.fullbookingflow.DbPlQAXx.min.js → revolugo.fullbookingflow.P7mArUhq.min.js} +17 -17
- package/dist/{revolugo.hoteldescriptionview.DyHypnsO.min.js → revolugo.hoteldescriptionview.5H3Nr6a4.min.js} +4 -4
- package/dist/{revolugo.hoteldescriptionview.FAMKFv9n.min.js → revolugo.hoteldescriptionview.NSefjueC.min.js} +19 -19
- package/dist/{revolugo.hotelofferitemlayout.BXdHFzt5.min.js → revolugo.hotelofferitemlayout.BGm1b3Zf.min.js} +6 -6
- package/dist/{revolugo.hotelofferlist.BsjYGZdX.min.js → revolugo.hotelofferlist.B2zQ--aY.min.js} +4 -4
- package/dist/{revolugo.hotelofferlist.D-sHFvFQ.min.js → revolugo.hotelofferlist.BqxXWwM7.min.js} +1018 -988
- package/dist/{revolugo.hotelofferrequestcreator.oZhVIBxs.min.js → revolugo.hotelofferrequestcreator.sH9lk3EL.min.js} +4 -4
- package/dist/{revolugo.hoteloffersearchmenu.Cun9amyl.min.js → revolugo.hoteloffersearchmenu.DNOt9B6n.min.js} +6 -6
- package/dist/{revolugo.hoteloffersmap.CVTv2jVD.min.js → revolugo.hoteloffersmap.B6_r7_Rt.min.js} +16 -16
- package/dist/{revolugo.hoteloffersmap.BP4Jp5xL.min.js → revolugo.hoteloffersmap.CoGOiKP2.min.js} +4 -4
- package/dist/{revolugo.hoteloffersview.B5nONm_1.min.js → revolugo.hoteloffersview.CNDIZucE.min.js} +14 -14
- package/dist/{revolugo.hoteloffersview.DacCdu_b.min.js → revolugo.hoteloffersview.c3bSpJnI.min.js} +4 -4
- package/dist/{revolugo.hotelroomofferlist.DVGmJT59.min.js → revolugo.hotelroomofferlist.CI-SzCBC.min.js} +4 -4
- package/dist/{revolugo.hotelroomofferlist.DmOEadSF.min.js → revolugo.hotelroomofferlist.CNKaSy7-.min.js} +23 -23
- package/dist/{revolugo.hotelroomofferrequestcreator.props.lNEhbaT9.min.js → revolugo.hotelroomofferrequestcreator.props.Br_IjGwA.min.js} +2 -2
- package/dist/{revolugo.hotelroomoffersbookingflow.KaGNZgT2.min.js → revolugo.hotelroomoffersbookingflow.B2gs_H2k.min.js} +17 -17
- package/dist/{revolugo.hotelroomoffersearchmenu.CCwlZB2o.min.js → revolugo.hotelroomoffersearchmenu.E1ybUWNl.min.js} +5 -5
- package/dist/{revolugo.hotelroomoffersearchmenu.DOJt4B9y.min.js → revolugo.hotelroomoffersearchmenu.yqwV0jYW.min.js} +7 -7
- package/dist/{revolugo.hotelroomoffersview.DHjinkWP.min.js → revolugo.hotelroomoffersview.BpWB5Pd7.min.js} +12 -12
- package/dist/{revolugo.hotelroomoffersview.BkR60ueU.min.js → revolugo.hotelroomoffersview.CrWoQ-75.min.js} +4 -4
- package/dist/{revolugo.index.s-onPvC0.min.js → revolugo.index.CzlNaSnE.min.js} +4 -4
- package/dist/{revolugo.index.B7z0g8al.min.js → revolugo.index.cAIjcrcW.min.js} +2 -2
- package/dist/{revolugo.index.wc.CsrQl9B8.min.js → revolugo.index.wc.DDhVCEIR.min.js} +4963 -4884
- package/dist/{revolugo.langpicker.BiuzuhH0.min.js → revolugo.langpicker.Dq39BvMY.min.js} +6 -6
- package/dist/{revolugo.langpickerbtn.cw-Pilxv.min.js → revolugo.langpickerbtn.CpnwEzJW.min.js} +9 -9
- package/dist/{revolugo.langpickerbtn.DagJBVfO.min.js → revolugo.langpickerbtn.Ps800J-7.min.js} +4 -4
- package/dist/revolugo.min.js +1 -1
- package/dist/{revolugo.position.DLEaIEKi.min.js → revolugo.position.CQiypbvk.min.js} +4 -4
- package/dist/{revolugo.prebookform.YQbaVaOP.min.js → revolugo.prebookform.C7XqSsaV.min.js} +18 -18
- package/dist/{revolugo.prebookform.CqX9sVfX.min.js → revolugo.prebookform.DJp8i2Br.min.js} +4 -4
- package/dist/{revolugo.roominglisteditor.CTnsjWFF.min.js → revolugo.roominglisteditor.Cuc_ODZH.min.js} +4 -4
- package/dist/{revolugo.roominglisteditor.5YqKPUFg.min.js → revolugo.roominglisteditor.DDmejnko.min.js} +9 -9
- package/dist/{revolugo.rounded.M5NbwQ-2.min.js → revolugo.rounded.De3KCP0X.min.js} +2 -2
- package/dist/{revolugo.ssrboot.CPwQ4mY-.min.js → revolugo.ssrboot.0C25dEN6.min.js} +2 -2
- package/dist/{revolugo.storybooktoolbar.DU-Au-P6.min.js → revolugo.storybooktoolbar.CPezsLGj.min.js} +16 -16
- package/dist/{revolugo.termsandconditions.DdvsS1Nr.min.js → revolugo.termsandconditions.DFY5N8Wh.min.js} +4 -4
- package/dist/{revolugo.termsandconditions.B8wFEMtY.min.js → revolugo.termsandconditions.pTNkGfzG.min.js} +4 -4
- package/dist/{revolugo.use-breakpoint-service.CZ9QX96a.min.js → revolugo.use-breakpoint-service.CJYSwmp1.min.js} +2 -2
- package/dist/{revolugo.vautocomplete.6G-7p4XB.min.js → revolugo.vautocomplete.BnoiakVz.min.js} +11 -11
- package/dist/{revolugo.vbadge.BxaNSjJA.min.js → revolugo.vbadge.Cay6RDQL.min.js} +6 -6
- package/dist/{revolugo.vbtn.BPIAO9U5.min.js → revolugo.vbtn.CaLiqucX.min.js} +6 -6
- package/dist/{revolugo.vcard.BCX-G8mX.min.js → revolugo.vcard.Oh2sMb1R.min.js} +6 -6
- package/dist/{revolugo.vcheckboxbtn.Q30XKYRx.min.js → revolugo.vcheckboxbtn.CSYgAYX9.min.js} +8 -8
- package/dist/{revolugo.vdialog.CMYISGau.min.js → revolugo.vdialog.Cp61rijD.min.js} +5 -5
- package/dist/{revolugo.vdivider.CLbZrEbe.min.js → revolugo.vdivider.BEG5JZwH.min.js} +3 -3
- package/dist/{revolugo.vexpansionpanels.BD89Tllc.min.js → revolugo.vexpansionpanels.BcpoHV2b.min.js} +5 -5
- package/dist/{revolugo.vform.Bk5MumIG.min.js → revolugo.vform.C7j3bd5k.min.js} +4 -4
- package/dist/{revolugo.vinput.CSdGREv4.min.js → revolugo.vinput.NcJ-RLQ9.min.js} +4 -4
- package/dist/{revolugo.vlabel.D8YLLgkd.min.js → revolugo.vlabel.DVK-hoRp.min.js} +3 -3
- package/dist/{revolugo.vlist.B_sxyWMf.min.js → revolugo.vlist.BE6EAjkf.min.js} +8 -8
- package/dist/{revolugo.vmenu.B0HL9TEG.min.js → revolugo.vmenu.CjkJIdWj.min.js} +5 -5
- package/dist/{revolugo.vselect.DjrnZ68P.min.js → revolugo.vselect.D8u2hRvh.min.js} +11 -11
- package/dist/{revolugo.vsheet.cNM_MdEY.min.js → revolugo.vsheet.BjfEjOdc.min.js} +5 -5
- package/dist/{revolugo.vskeletonloader.MnCR2qht.min.js → revolugo.vskeletonloader.DU5f5pPc.min.js} +4 -4
- package/dist/{revolugo.vsnackbar.CTGdiOPz.min.js → revolugo.vsnackbar.coosr6Kc.min.js} +6 -6
- package/dist/revolugo.vspacer.FJNqQNRg.min.js +7 -0
- package/dist/{revolugo.vtextarea._NoUVeyJ.min.js → revolugo.vtextarea.DbOaHRNc.min.js} +8 -8
- package/dist/{revolugo.vtextfield.C5IuUTNN.min.js → revolugo.vtextfield.CWrEQaIp.min.js} +8 -8
- package/dist/{revolugo.vtoolbar.DkBiOuPH.min.js → revolugo.vtoolbar.01ZEiEY4.min.js} +5 -5
- package/dist/{revolugo.vtooltip.CNASNy8U.min.js → revolugo.vtooltip.DVIfVoJI.min.js} +4 -4
- package/dist/{revolugo.vwindowitem.DWDP8yX4.min.js → revolugo.vwindowitem.CcOMHHwi.min.js} +6 -6
- package/dist/{revolugo.watch-list.DFagwB6N.min.js → revolugo.watch-list.tdARLleX.min.js} +2 -2
- package/dist/{revolugo.webcomponentwrapper.CyN0tjOk.min.js → revolugo.webcomponentwrapper.DsRjP0_N.min.js} +2 -2
- package/package.json +1 -1
- package/dist/revolugo.vspacer.D6ZThXFV.min.js +0 -7
package/dist/{revolugo.hotelofferlist.D-sHFvFQ.min.js → revolugo.hotelofferlist.BqxXWwM7.min.js}
RENAMED
@@ -1,30 +1,30 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import { Y as
|
5
|
-
import { h as
|
6
|
-
import { H as
|
7
|
-
import { H as
|
8
|
-
import { B as
|
9
|
-
import { u as Ye, b as
|
10
|
-
import { V as
|
11
|
-
import { V as Dn } from "./revolugo.vmenu.
|
12
|
-
import { a as ae } from "./revolugo.vbtn.
|
13
|
-
import { V as
|
14
|
-
import { a as
|
15
|
-
import { c as
|
16
|
-
import { V as Cn, m as
|
17
|
-
import { V as
|
18
|
-
import { V as
|
19
|
-
import { H as
|
20
|
-
import { B as
|
21
|
-
import { p as
|
22
|
-
import { w as
|
23
|
-
import { T as
|
24
|
-
import { u as
|
25
|
-
import { p as
|
26
|
-
import { V as
|
27
|
-
function
|
1
|
+
var Ui = Object.defineProperty;
|
2
|
+
var Bi = (t, e, n) => e in t ? Ui(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
3
|
+
var N = (t, e, n) => Bi(t, typeof e != "symbol" ? e + "" : e, n);
|
4
|
+
import { Y as Je, d as hn, u as gn, k as xt, Z as Me, _ as Ie, D as $, a as b, $ as vt, a0 as Fi, a1 as dt, a2 as Le, a3 as yt, a4 as xi, C as Jt, a5 as bt, M as Ts, f as je, a6 as at, a7 as Is, a8 as Os, y as re, a9 as As, aa as Hi, V as Gi, R as ji, ab as qi, ac as zi, F as xe, i as me, w as _, e as Zt, t as He, r as oe, o as M, b as Ds, c as Q, g as Z, v as Cs, x as Et, K as Ki, Q as Yi, ad as Wi, S as Qi, ae as Xi, H as Ji, I as Zi, A as er } from "./revolugo.index.wc.DDhVCEIR.min.js";
|
5
|
+
import { h as tr, H as nr } from "./revolugo.hotelofferrequestcreator.sH9lk3EL.min.js";
|
6
|
+
import { H as sr, D as ir, B as rr, p as or, b as ar, c as lr } from "./revolugo.bhoteloffersfilterbar.BKUVyAfq.min.js";
|
7
|
+
import { H as _s } from "./revolugo.hotelofferitemlayout.BGm1b3Zf.min.js";
|
8
|
+
import { B as ur, v as Ue, V as cr } from "./revolugo.vtextarea.DbOaHRNc.min.js";
|
9
|
+
import { u as Ye, b as Ps, M as Ns, _ as mn, V as it, a as Pe, B as dr } from "./revolugo.webcomponentwrapper.DsRjP0_N.min.js";
|
10
|
+
import { V as Ze } from "./revolugo.vtextfield.CWrEQaIp.min.js";
|
11
|
+
import { V as Dn } from "./revolugo.vmenu.CjkJIdWj.min.js";
|
12
|
+
import { a as ae } from "./revolugo.vbtn.CaLiqucX.min.js";
|
13
|
+
import { V as fr } from "./revolugo.vspacer.FJNqQNRg.min.js";
|
14
|
+
import { a as Ut, b as hr } from "./revolugo.index.CzlNaSnE.min.js";
|
15
|
+
import { c as gr, V as mr } from "./revolugo.position.CQiypbvk.min.js";
|
16
|
+
import { V as Cn, m as pr } from "./revolugo.vsheet.BjfEjOdc.min.js";
|
17
|
+
import { V as vr } from "./revolugo.vform.C7j3bd5k.min.js";
|
18
|
+
import { V as en } from "./revolugo.vdivider.BEG5JZwH.min.js";
|
19
|
+
import { H as yr } from "./revolugo.hotelroomofferlist.CNKaSy7-.min.js";
|
20
|
+
import { B as br } from "./revolugo.bhotelsearchbar.DFrjPFGj.min.js";
|
21
|
+
import { p as Er } from "./revolugo.bstarrating.vue_vue_type_script_setup_true_lang.Bl8RUpcy.min.js";
|
22
|
+
import { w as Sr } from "./revolugo.watch-list.tdARLleX.min.js";
|
23
|
+
import { T as kr } from "./revolugo.termsandconditions.pTNkGfzG.min.js";
|
24
|
+
import { u as Rr } from "./revolugo.hotelroomofferrequestcreator.props.Br_IjGwA.min.js";
|
25
|
+
import { p as Tr, g as be } from "./revolugo.use-breakpoint-service.CJYSwmp1.min.js";
|
26
|
+
import { V as Ir } from "./revolugo.bdaterangepicker.E8eS2QMH.min.js";
|
27
|
+
function Vi(t) {
|
28
28
|
try {
|
29
29
|
if (typeof document < "u") {
|
30
30
|
window.REVOLUGO_ELEMENTS_STYLES = window.REVOLUGO_ELEMENTS_STYLES || {
|
@@ -44,15 +44,15 @@ function Mi(t) {
|
|
44
44
|
console.error("[revolugo-elements] ", e);
|
45
45
|
}
|
46
46
|
}
|
47
|
-
const
|
47
|
+
const Or = {
|
48
48
|
FiltersBar: !0,
|
49
49
|
HotelOfferSearchMenu: !1,
|
50
50
|
TermsAndConditionsFooter: !0,
|
51
|
-
HotelOfferItem:
|
52
|
-
},
|
53
|
-
...
|
51
|
+
HotelOfferItem: sr
|
52
|
+
}, Ar = {
|
53
|
+
...tr,
|
54
54
|
features: {
|
55
|
-
default: () =>
|
55
|
+
default: () => Or,
|
56
56
|
type: [Object, String]
|
57
57
|
},
|
58
58
|
height: {
|
@@ -63,7 +63,7 @@ const kr = {
|
|
63
63
|
type: Number
|
64
64
|
},
|
65
65
|
limit: {
|
66
|
-
default:
|
66
|
+
default: ir,
|
67
67
|
type: Number
|
68
68
|
},
|
69
69
|
loadingBarEnabled: {
|
@@ -82,7 +82,7 @@ const kr = {
|
|
82
82
|
function L(t) {
|
83
83
|
return t != null && typeof t == "object" && t["@@functional/placeholder"] === !0;
|
84
84
|
}
|
85
|
-
function
|
85
|
+
function pe(t) {
|
86
86
|
return function e(n) {
|
87
87
|
return arguments.length === 0 || L(n) ? e : t.apply(this, arguments);
|
88
88
|
};
|
@@ -93,19 +93,19 @@ function Ee(t) {
|
|
93
93
|
case 0:
|
94
94
|
return e;
|
95
95
|
case 1:
|
96
|
-
return L(n) ? e :
|
96
|
+
return L(n) ? e : pe(function(i) {
|
97
97
|
return t(n, i);
|
98
98
|
});
|
99
99
|
default:
|
100
|
-
return L(n) && L(s) ? e : L(n) ?
|
100
|
+
return L(n) && L(s) ? e : L(n) ? pe(function(i) {
|
101
101
|
return t(i, s);
|
102
|
-
}) : L(s) ?
|
102
|
+
}) : L(s) ? pe(function(i) {
|
103
103
|
return t(n, i);
|
104
104
|
}) : t(n, s);
|
105
105
|
}
|
106
106
|
};
|
107
107
|
}
|
108
|
-
function
|
108
|
+
function pn(t) {
|
109
109
|
return function e(n, s, i) {
|
110
110
|
switch (arguments.length) {
|
111
111
|
case 0:
|
@@ -119,7 +119,7 @@ function vn(t) {
|
|
119
119
|
return t(r, s, a);
|
120
120
|
}) : L(s) ? Ee(function(r, a) {
|
121
121
|
return t(n, r, a);
|
122
|
-
}) :
|
122
|
+
}) : pe(function(r) {
|
123
123
|
return t(n, s, r);
|
124
124
|
});
|
125
125
|
default:
|
@@ -129,40 +129,40 @@ function vn(t) {
|
|
129
129
|
return t(r, s, a);
|
130
130
|
}) : L(s) && L(i) ? Ee(function(r, a) {
|
131
131
|
return t(n, r, a);
|
132
|
-
}) : L(n) ?
|
132
|
+
}) : L(n) ? pe(function(r) {
|
133
133
|
return t(r, s, i);
|
134
|
-
}) : L(s) ?
|
134
|
+
}) : L(s) ? pe(function(r) {
|
135
135
|
return t(n, r, i);
|
136
|
-
}) : L(i) ?
|
136
|
+
}) : L(i) ? pe(function(r) {
|
137
137
|
return t(n, s, r);
|
138
138
|
}) : t(n, s, i);
|
139
139
|
}
|
140
140
|
};
|
141
141
|
}
|
142
|
-
function
|
142
|
+
function ht(t, e) {
|
143
143
|
return Object.prototype.hasOwnProperty.call(e, t);
|
144
144
|
}
|
145
|
-
var
|
145
|
+
var Dr = /* @__PURE__ */ pe(function(e) {
|
146
146
|
return e === null ? "Null" : e === void 0 ? "Undefined" : Object.prototype.toString.call(e).slice(8, -1);
|
147
147
|
});
|
148
148
|
function _n(t) {
|
149
149
|
return Object.prototype.toString.call(t) === "[object Object]";
|
150
150
|
}
|
151
|
-
const
|
151
|
+
const Cr = Number.isInteger || function(e) {
|
152
152
|
return e << 0 === e;
|
153
153
|
};
|
154
|
-
function
|
154
|
+
function _r(t) {
|
155
155
|
return Object.prototype.toString.call(t) === "[object String]";
|
156
156
|
}
|
157
|
-
function
|
157
|
+
function Pr(t, e) {
|
158
158
|
var n = t < 0 ? e.length + t : t;
|
159
|
-
return
|
159
|
+
return _r(e) ? e.charAt(n) : e[n];
|
160
160
|
}
|
161
|
-
function
|
161
|
+
function Nr(t) {
|
162
162
|
return new RegExp(t.source, t.flags ? t.flags : (t.global ? "g" : "") + (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.sticky ? "y" : "") + (t.unicode ? "u" : "") + (t.dotAll ? "s" : ""));
|
163
163
|
}
|
164
|
-
function
|
165
|
-
if (n || (n = new
|
164
|
+
function Ls(t, e, n) {
|
165
|
+
if (n || (n = new wr()), Lr(t))
|
166
166
|
return t;
|
167
167
|
var s = function(r) {
|
168
168
|
var a = n.get(t);
|
@@ -170,10 +170,10 @@ function Ps(t, e, n) {
|
|
170
170
|
return a;
|
171
171
|
n.set(t, r);
|
172
172
|
for (var u in t)
|
173
|
-
Object.prototype.hasOwnProperty.call(t, u) && (r[u] =
|
173
|
+
Object.prototype.hasOwnProperty.call(t, u) && (r[u] = Ls(t[u], !0, n));
|
174
174
|
return r;
|
175
175
|
};
|
176
|
-
switch (
|
176
|
+
switch (Dr(t)) {
|
177
177
|
case "Object":
|
178
178
|
return s(Object.create(Object.getPrototypeOf(t)));
|
179
179
|
case "Array":
|
@@ -181,7 +181,7 @@ function Ps(t, e, n) {
|
|
181
181
|
case "Date":
|
182
182
|
return new Date(t.valueOf());
|
183
183
|
case "RegExp":
|
184
|
-
return
|
184
|
+
return Nr(t);
|
185
185
|
case "Int8Array":
|
186
186
|
case "Uint8Array":
|
187
187
|
case "Uint8ClampedArray":
|
@@ -198,11 +198,11 @@ function Ps(t, e, n) {
|
|
198
198
|
return t;
|
199
199
|
}
|
200
200
|
}
|
201
|
-
function
|
201
|
+
function Lr(t) {
|
202
202
|
var e = typeof t;
|
203
203
|
return t == null || e != "object" && e != "function";
|
204
204
|
}
|
205
|
-
var
|
205
|
+
var wr = /* @__PURE__ */ function() {
|
206
206
|
function t() {
|
207
207
|
this.map = {}, this.length = 0;
|
208
208
|
}
|
@@ -232,41 +232,41 @@ var _r = /* @__PURE__ */ function() {
|
|
232
232
|
return i[1];
|
233
233
|
}
|
234
234
|
}, t;
|
235
|
-
}(),
|
236
|
-
return e != null && typeof e.clone == "function" ? e.clone() :
|
235
|
+
}(), I = /* @__PURE__ */ pe(function(e) {
|
236
|
+
return e != null && typeof e.clone == "function" ? e.clone() : Ls(e);
|
237
237
|
});
|
238
|
-
function
|
238
|
+
function Mr(t, e) {
|
239
239
|
for (var n = e, s = 0; s < t.length; s += 1) {
|
240
240
|
if (n == null)
|
241
241
|
return;
|
242
242
|
var i = t[s];
|
243
|
-
|
243
|
+
Cr(i) ? n = Pr(i, n) : n = n[i];
|
244
244
|
}
|
245
245
|
return n;
|
246
246
|
}
|
247
|
-
var
|
247
|
+
var $r = /* @__PURE__ */ pn(function(e, n, s) {
|
248
248
|
var i = {}, r;
|
249
249
|
n = n || {}, s = s || {};
|
250
250
|
for (r in n)
|
251
|
-
|
251
|
+
ht(r, n) && (i[r] = ht(r, s) ? e(r, n[r], s[r]) : n[r]);
|
252
252
|
for (r in s)
|
253
|
-
|
253
|
+
ht(r, s) && !ht(r, i) && (i[r] = s[r]);
|
254
254
|
return i;
|
255
|
-
}),
|
256
|
-
return
|
255
|
+
}), Ur = /* @__PURE__ */ pn(function t(e, n, s) {
|
256
|
+
return $r(function(i, r, a) {
|
257
257
|
return _n(r) && _n(a) ? t(e, r, a) : e(i, r, a);
|
258
258
|
}, n, s);
|
259
|
-
}),
|
260
|
-
return
|
259
|
+
}), Br = /* @__PURE__ */ pn(function(e, n, s) {
|
260
|
+
return Ur(function(i, r, a) {
|
261
261
|
return e(r, a);
|
262
262
|
}, n, s);
|
263
|
-
}),
|
263
|
+
}), Vr = /* @__PURE__ */ Ee(Mr), ws = /* @__PURE__ */ Ee(function(e, n) {
|
264
264
|
var s = {};
|
265
265
|
for (var i in n)
|
266
266
|
e(n[i], i, n) && (s[i] = n[i]);
|
267
267
|
return s;
|
268
268
|
});
|
269
|
-
const S = (t) => typeof t == "function" && !!(t.constructor && t.call && t.apply),
|
269
|
+
const S = (t) => typeof t == "function" && !!(t.constructor && t.call && t.apply), U = (t) => typeof t == "string", ne = (t) => t === null, G = (t) => typeof t > "u", le = (t) => ne(t) || G(t), Fr = (t) => typeof t == "bigint", C = (t) => !G(t), qe = (t) => !le(t), xr = (t) => qe(t) && t !== "", vn = (t) => {
|
270
270
|
switch (Object.prototype.toString.call(t)) {
|
271
271
|
case "[object Error]":
|
272
272
|
case "[object Exception]":
|
@@ -275,93 +275,93 @@ const S = (t) => typeof t == "function" && !!(t.constructor && t.call && t.apply
|
|
275
275
|
default:
|
276
276
|
return t instanceof Error;
|
277
277
|
}
|
278
|
-
},
|
278
|
+
}, tn = (t, e) => {
|
279
279
|
const n = e.split(".");
|
280
|
-
return
|
281
|
-
},
|
280
|
+
return Vr(n, t);
|
281
|
+
}, Hr = (t, e) => !!tn(t, e), Gr = (t) => typeof t == "object", jr = (t) => !ne(t) && Gr(t) && !Array.isArray(t), w = (t) => !ne(t) && Object.prototype.toString.call(t) === "[object Object]", qr = (t, e) => {
|
282
282
|
if (!Array.isArray(t) || !Array.isArray(e))
|
283
|
-
return
|
284
|
-
const n =
|
283
|
+
return I(e);
|
284
|
+
const n = I(t);
|
285
285
|
return e.forEach((s, i) => {
|
286
|
-
n[i] = Array.isArray(s) ||
|
286
|
+
n[i] = Array.isArray(s) || jr(s) ? (
|
287
287
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
288
|
-
|
288
|
+
x(n[i], s)
|
289
289
|
) : s;
|
290
290
|
}), n;
|
291
|
-
},
|
292
|
-
const e =
|
291
|
+
}, x = (t, e) => Br(qr, t, e), Te = (t) => w(t) && Object.keys(t).length > 0, tt = (t) => {
|
292
|
+
const e = ws(C, t);
|
293
293
|
return Object.keys(e).forEach((n) => {
|
294
294
|
const s = e[n];
|
295
|
-
w(s) && (e[n] =
|
295
|
+
w(s) && (e[n] = tt(s));
|
296
296
|
}), e;
|
297
|
-
},
|
298
|
-
const e =
|
297
|
+
}, _t = (t) => {
|
298
|
+
const e = ws(qe, t);
|
299
299
|
return Object.keys(e).forEach((n) => {
|
300
300
|
const s = e[n];
|
301
|
-
w(s) && (e[n] =
|
301
|
+
w(s) && (e[n] = _t(s));
|
302
302
|
}), e;
|
303
|
-
},
|
304
|
-
if (
|
305
|
-
return
|
306
|
-
}, ue = (t, e) => typeof t == "boolean" ? t : e,
|
303
|
+
}, he = (t) => {
|
304
|
+
if (Te(t))
|
305
|
+
return _t(t);
|
306
|
+
}, ue = (t, e) => typeof t == "boolean" ? t : e, zr = (t) => t.replace(/^\s+|\s+$/gm, ""), Pn = (t) => t.replace(/^\.+/, ""), Pt = (t) => {
|
307
307
|
let e = t;
|
308
|
-
if (!
|
308
|
+
if (!U(t) && !le(t))
|
309
309
|
try {
|
310
310
|
e = JSON.stringify(t);
|
311
311
|
} catch {
|
312
312
|
e = null;
|
313
313
|
}
|
314
314
|
return e;
|
315
|
-
},
|
315
|
+
}, Kr = (t) => {
|
316
316
|
const e = Array.from(t, (n) => String.fromCodePoint(n)).join("");
|
317
317
|
return globalThis.btoa(e);
|
318
|
-
},
|
318
|
+
}, Yr = (t) => Kr(new TextEncoder().encode(t)), Nt = (t, e, n, s, i) => {
|
319
319
|
const r = { category: t, name: e, properties: n, options: s, callback: void 0 };
|
320
|
-
S(i) && (r.callback = i), S(s) && (r.category = t, r.name = e, r.properties = n, r.options = void 0, r.callback = s), S(n) && (r.category = t, r.name = e, r.properties = void 0, r.options = void 0, r.callback = n), S(e) && (r.category = t, r.name = void 0, r.properties = void 0, r.options = void 0, r.callback = e), S(t) && (r.category = void 0, r.name = void 0, r.properties = void 0, r.options = void 0, r.callback = t), w(t) ? (r.name = void 0, r.category = void 0, r.properties = t, S(e) ? r.options = void 0 : r.options = e) : w(e) && (r.name = void 0, r.properties = e, S(n) ? r.options = void 0 : r.options = n),
|
321
|
-
const a =
|
322
|
-
return r.properties =
|
323
|
-
},
|
320
|
+
S(i) && (r.callback = i), S(s) && (r.category = t, r.name = e, r.properties = n, r.options = void 0, r.callback = s), S(n) && (r.category = t, r.name = e, r.properties = void 0, r.options = void 0, r.callback = n), S(e) && (r.category = t, r.name = void 0, r.properties = void 0, r.options = void 0, r.callback = e), S(t) && (r.category = void 0, r.name = void 0, r.properties = void 0, r.options = void 0, r.callback = t), w(t) ? (r.name = void 0, r.category = void 0, r.properties = t, S(e) ? r.options = void 0 : r.options = e) : w(e) && (r.name = void 0, r.properties = e, S(n) ? r.options = void 0 : r.options = n), U(t) && !U(e) && (r.category = void 0, r.name = t), C(r.category) || (r.category = void 0), C(r.name) || (r.name = void 0), r.properties = r.properties ? I(r.properties) : {}, C(r.options) ? r.options = I(r.options) : r.options = void 0;
|
321
|
+
const a = U(r.name) ? r.name : r.properties.name, u = U(r.category) ? r.category : r.properties.category;
|
322
|
+
return r.properties = x(w(r.properties) ? r.properties : {}, { ...a && { name: a }, ...u && { category: u } }), r;
|
323
|
+
}, yn = (t, e, n, s) => {
|
324
324
|
const i = { name: t, properties: e, options: n, callback: void 0 };
|
325
|
-
return S(s) && (i.callback = s), S(n) && (i.properties = e, i.options = void 0, i.callback = n), S(e) && (i.properties = void 0, i.options = void 0, i.callback = e), i.properties = qe(i.properties) ?
|
326
|
-
},
|
325
|
+
return S(s) && (i.callback = s), S(n) && (i.properties = e, i.options = void 0, i.callback = n), S(e) && (i.properties = void 0, i.options = void 0, i.callback = e), i.properties = qe(i.properties) ? I(i.properties) : {}, C(i.options) ? i.options = I(i.options) : i.options = void 0, i;
|
326
|
+
}, Ms = (t, e, n, s) => {
|
327
327
|
const i = { userId: t, traits: e, options: n, callback: void 0 };
|
328
|
-
return S(s) && (i.callback = s), S(n) && (i.userId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.userId = t, i.traits = void 0, i.options = void 0, i.callback = e), (w(t) || ne(t)) && (i.userId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.userId =
|
329
|
-
},
|
328
|
+
return S(s) && (i.callback = s), S(n) && (i.userId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.userId = t, i.traits = void 0, i.options = void 0, i.callback = e), (w(t) || ne(t)) && (i.userId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.userId = Pt(i.userId), w(i.traits) ? i.traits = I(i.traits) : i.traits = void 0, C(i.options) ? i.options = I(i.options) : i.options = void 0, i;
|
329
|
+
}, $s = (t, e, n, s) => {
|
330
330
|
const i = { to: t, from: e, options: n, callback: void 0 };
|
331
|
-
return S(s) && (i.callback = s), S(n) && (i.to = t, i.from = e, i.options = void 0, i.callback = n), S(e) ? (i.to = t, i.from = void 0, i.options = void 0, i.callback = e) : (w(e) || ne(e)) && (i.to = t, i.from = void 0, i.options = e),
|
332
|
-
},
|
331
|
+
return S(s) && (i.callback = s), S(n) && (i.to = t, i.from = e, i.options = void 0, i.callback = n), S(e) ? (i.to = t, i.from = void 0, i.options = void 0, i.callback = e) : (w(e) || ne(e)) && (i.to = t, i.from = void 0, i.options = e), C(i.to) && (i.to = Pt(i.to)), C(i.from) ? i.from = Pt(i.from) : i.from = void 0, C(i.options) ? i.options = I(i.options) : i.options = void 0, i;
|
332
|
+
}, Us = (t, e, n, s) => {
|
333
333
|
const i = { groupId: t, traits: e, options: n, callback: void 0 };
|
334
|
-
return S(s) && (i.callback = s), S(n) && (i.groupId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.groupId = t, i.traits = void 0, i.options = void 0, i.callback = e), (w(t) || ne(t)) && (i.groupId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.groupId =
|
334
|
+
return S(s) && (i.callback = s), S(n) && (i.groupId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.groupId = t, i.traits = void 0, i.options = void 0, i.callback = e), (w(t) || ne(t)) && (i.groupId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.groupId = Pt(i.groupId), w(i.traits) ? i.traits = I(i.traits) : i.traits = void 0, C(i.options) ? i.options = I(i.options) : i.options = void 0, i;
|
335
335
|
};
|
336
|
-
let
|
336
|
+
let Ht = /* @__PURE__ */ function(t) {
|
337
337
|
return t.UNLOADED = "Page Unloaded", t;
|
338
338
|
}({});
|
339
|
-
const
|
340
|
-
function
|
339
|
+
const bn = "API", nn = "CapabilitiesManager", te = "ConfigManager", Bs = "EventManager", gt = "PluginsManager", De = "UserSessionManager", nt = "ErrorHandler", Be = "PluginEngine", Wr = "StoreManager", Gt = `Ready${bn}`, Qr = `Load${bn}`, Xr = "HttpClient", Jr = "RudderStackAnalytics", jt = "AnalyticsCore";
|
340
|
+
function Zr(t) {
|
341
341
|
return crypto.getRandomValues(new Uint8Array(t));
|
342
342
|
}
|
343
|
-
var Nn = 4096,
|
343
|
+
var Nn = 4096, St = [], ke = 0, qt;
|
344
344
|
for (; ke < 256; ke++)
|
345
|
-
|
346
|
-
function
|
347
|
-
(!
|
345
|
+
St[ke] = (ke + 256).toString(16).substring(1);
|
346
|
+
function eo() {
|
347
|
+
(!qt || ke + 16 > Nn) && (qt = Zr(Nn), ke = 0);
|
348
348
|
for (var t = 0, e, n = ""; t < 16; t++)
|
349
|
-
e =
|
349
|
+
e = qt[ke + t], t == 6 ? n += St[e & 15 | 64] : t == 8 ? n += St[e & 63 | 128] : n += St[e], t & 1 && t > 1 && t < 11 && (n += "-");
|
350
350
|
return ke += 16, n;
|
351
351
|
}
|
352
|
-
var Ne = 256,
|
353
|
-
for (; Ne--; )
|
354
|
-
function
|
352
|
+
var Ne = 256, kt = [], mt;
|
353
|
+
for (; Ne--; ) kt[Ne] = (Ne + 256).toString(16).substring(1);
|
354
|
+
function to() {
|
355
355
|
var t = 0, e, n = "";
|
356
|
-
if (!
|
357
|
-
for (
|
356
|
+
if (!mt || Ne + 16 > 256) {
|
357
|
+
for (mt = Array(t = 256); t--; ) mt[t] = 256 * Math.random() | 0;
|
358
358
|
t = Ne = 0;
|
359
359
|
}
|
360
360
|
for (; t < 16; t++)
|
361
|
-
e =
|
361
|
+
e = mt[Ne + t], t == 6 ? n += kt[e & 15 | 64] : t == 8 ? n += kt[e & 63 | 128] : n += kt[e], t & 1 && t > 1 && t < 11 && (n += "-");
|
362
362
|
return Ne++, n;
|
363
363
|
}
|
364
|
-
const
|
364
|
+
const no = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues), Bt = () => no() ? eo() : to(), so = (t) => {
|
365
365
|
let e = !1, n = !1;
|
366
366
|
function s() {
|
367
367
|
e || (e = !0, t(n), setTimeout(() => {
|
@@ -379,7 +379,7 @@ const Zr = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues),
|
|
379
379
|
}), document.addEventListener("visibilitychange", () => {
|
380
380
|
n = !0, document.visibilityState === "hidden" ? s() : e = !1;
|
381
381
|
});
|
382
|
-
},
|
382
|
+
}, Vs = (t) => t.toISOString(), io = () => Vs(/* @__PURE__ */ new Date()), R = ":: ", ro = (t) => `A script with the id "${t}" is already loaded. Skipping the loading of this script to prevent conflicts`, Ln = (t, e, n) => `Unable to load (${U(n) ? n : n.type}) the script with the id "${t}" from URL "${e}"`, oo = (t, e, n) => `A timeout of ${n} ms occurred while trying to load the script with id "${t}" from URL "${e}"`, ao = (t, e) => `${t}${R}A circular reference has been detected in the object and the property "${e}" has been dropped from the output.`, lo = "Failed to convert the value to a JSON string.", uo = "Failed to encode the cookie data.", co = "JSONStringify", fo = "[BigInt]", Fs = "[Circular Reference]", ho = (t, e, n) => {
|
383
383
|
const s = [];
|
384
384
|
return function(i, r) {
|
385
385
|
if (!(e != null && e.includes(i)) && !(t && le(r))) {
|
@@ -387,71 +387,71 @@ const Zr = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues),
|
|
387
387
|
return r;
|
388
388
|
for (; s.length > 0 && s[s.length - 1] !== this; )
|
389
389
|
s.pop();
|
390
|
-
return s.includes(r) ? (n == null || n.warn(
|
390
|
+
return s.includes(r) ? (n == null || n.warn(ao(co, i)), Fs) : (s.push(r), r);
|
391
391
|
}
|
392
392
|
};
|
393
393
|
}, de = (t, e, n, s) => {
|
394
394
|
try {
|
395
|
-
return JSON.stringify(t,
|
395
|
+
return JSON.stringify(t, ho(e, n, s));
|
396
396
|
} catch (i) {
|
397
|
-
return s == null || s.warn(
|
397
|
+
return s == null || s.warn(lo, i), null;
|
398
398
|
}
|
399
|
-
},
|
399
|
+
}, go = (t) => {
|
400
400
|
const e = [];
|
401
401
|
return function(s, i) {
|
402
|
-
if (
|
403
|
-
return
|
402
|
+
if (Fr(i))
|
403
|
+
return fo;
|
404
404
|
for (; e.length > 0 && e[e.length - 1] !== this; )
|
405
405
|
e.pop();
|
406
|
-
return e.includes(i) ?
|
406
|
+
return e.includes(i) ? Fs : (e.push(i), i);
|
407
407
|
};
|
408
|
-
},
|
408
|
+
}, xs = (t, e) => {
|
409
409
|
const n = Array.isArray(t) ? [] : {};
|
410
410
|
for (const s in t)
|
411
411
|
if (Object.hasOwnProperty.call(t, s)) {
|
412
412
|
const i = t[s], r = e.call(t, s, i);
|
413
|
-
w(r) || Array.isArray(r) ? n[s] =
|
413
|
+
w(r) || Array.isArray(r) ? n[s] = xs(r, e) : n[s] = r;
|
414
414
|
}
|
415
415
|
return n;
|
416
416
|
}, A = (t, e) => {
|
417
|
-
const n =
|
418
|
-
return w(t) || Array.isArray(t) ?
|
419
|
-
},
|
417
|
+
const n = go(), s = n.call(t, "", t);
|
418
|
+
return w(t) || Array.isArray(t) ? xs(t, n) : s;
|
419
|
+
}, Rt = "[SDK DISPATCHED ERROR]", En = (t) => {
|
420
420
|
const { stack: e, stacktrace: n } = t, s = t["opera#sourceloc"], i = e ?? n ?? s;
|
421
421
|
if (i && typeof i == "string")
|
422
422
|
return i;
|
423
|
-
},
|
423
|
+
}, Sn = (t, e) => {
|
424
424
|
let n = t;
|
425
|
-
return
|
426
|
-
},
|
427
|
-
if (
|
428
|
-
const e =
|
425
|
+
return vn(t) ? n.message = `${e}: ${t.message}` : n = new Error(`${e}: ${de(t)}`), n;
|
426
|
+
}, B = (t) => {
|
427
|
+
if (vn(t)) {
|
428
|
+
const e = En(t);
|
429
429
|
if (e) {
|
430
430
|
const { stack: n, stacktrace: s } = t, i = t["opera#sourceloc"];
|
431
431
|
switch (e) {
|
432
432
|
case n:
|
433
433
|
t.stack = `${n}
|
434
|
-
${
|
434
|
+
${Rt}`;
|
435
435
|
break;
|
436
436
|
case s:
|
437
437
|
t.stacktrace = `${s}
|
438
|
-
${
|
438
|
+
${Rt}`;
|
439
439
|
break;
|
440
440
|
case i:
|
441
441
|
default:
|
442
442
|
t["opera#sourceloc"] = `${i}
|
443
|
-
${
|
443
|
+
${Rt}`;
|
444
444
|
break;
|
445
445
|
}
|
446
446
|
}
|
447
447
|
}
|
448
448
|
globalThis.dispatchEvent(new ErrorEvent("error", { error: t, bubbles: !0, cancelable: !0, composed: !0 }));
|
449
|
-
}, wn = "RudderLabs JavaScript SDK",
|
449
|
+
}, wn = "RudderLabs JavaScript SDK", lt = "3.20.1", mo = "com.rudderlabs.javascript", Hs = "npm", Mn = "RudderJS-Initiated", po = "ad-block page request", vo = "/ad-blocked", rt = "preloadedEventsBuffer", yo = "Consent Management Interaction", bo = "ajs_trait_", Eo = "ajs_prop_", $n = "ajs_aid", Un = "ajs_uid", Bn = "ajs_event", So = 10 * 1e3, ko = 31536e3 * 1e3, Vn = 12 * 60 * 60 * 1e3, sn = 30 * 60 * 1e3, Fn = 10 * 1e3, Ro = 10 * 1e3, To = 250, Gs = (t = "app") => {
|
450
450
|
globalThis.RudderStackGlobals || (globalThis.RudderStackGlobals = {}), globalThis.RudderStackGlobals[t] || (globalThis.RudderStackGlobals[t] = {});
|
451
|
-
},
|
452
|
-
|
453
|
-
},
|
454
|
-
function
|
451
|
+
}, ut = (t, e, n = "app") => {
|
452
|
+
Gs(n), globalThis.RudderStackGlobals[n][t] = e;
|
453
|
+
}, js = (t, e = "app") => (Gs(e), globalThis.RudderStackGlobals[e][t]);
|
454
|
+
function Io(t, e, n = To) {
|
455
455
|
let s;
|
456
456
|
return (...i) => {
|
457
457
|
globalThis.clearTimeout(s), s = globalThis.setTimeout(() => {
|
@@ -459,7 +459,7 @@ function ko(t, e, n = So) {
|
|
459
459
|
}, n);
|
460
460
|
};
|
461
461
|
}
|
462
|
-
const
|
462
|
+
const xn = (t, e) => {
|
463
463
|
const n = {};
|
464
464
|
return t.forEach((s, i) => {
|
465
465
|
if (i.startsWith(e)) {
|
@@ -467,45 +467,45 @@ const Hn = (t, e) => {
|
|
467
467
|
n[r] = t.get(i);
|
468
468
|
}
|
469
469
|
}), n;
|
470
|
-
},
|
471
|
-
const e = { trait:
|
472
|
-
n.get(Bn) && t.unshift(["track", n.get(Bn),
|
473
|
-
},
|
470
|
+
}, Oo = (t = []) => {
|
471
|
+
const e = { trait: bo, properties: Eo }, n = new URLSearchParams(globalThis.location.search);
|
472
|
+
n.get(Bn) && t.unshift(["track", n.get(Bn), xn(n, e.properties)]), n.get(Un) && t.unshift(["identify", n.get(Un), xn(n, e.trait)]), n.get($n) && t.unshift(["setAnonymousId", n.get($n)]);
|
473
|
+
}, Ao = (t) => {
|
474
474
|
const e = "load";
|
475
475
|
let n = [], s = 0;
|
476
476
|
for (; s < t.length; ) {
|
477
477
|
if (t[s] && t[s][0] === e) {
|
478
|
-
n =
|
478
|
+
n = I(t[s]), t.splice(s, 1);
|
479
479
|
break;
|
480
480
|
}
|
481
481
|
s += 1;
|
482
482
|
}
|
483
483
|
return n;
|
484
|
-
},
|
484
|
+
}, Do = (t) => {
|
485
485
|
const e = "consent", n = t.filter((i) => i[0] === e), s = t.filter((i) => i[0] !== e);
|
486
486
|
t.splice(0, t.length, ...n, ...s);
|
487
|
-
},
|
488
|
-
const e =
|
489
|
-
|
490
|
-
},
|
487
|
+
}, Co = (t) => {
|
488
|
+
const e = js(rt) || [];
|
489
|
+
Oo(e), e.length > 0 && (t.enqueuePreloadBufferEvents(e), ut(rt, []));
|
490
|
+
}, _o = (t, e) => {
|
491
491
|
const n = t.shift();
|
492
492
|
let s;
|
493
493
|
if (S(e[n])) {
|
494
494
|
switch (n) {
|
495
495
|
case "page":
|
496
|
-
s =
|
496
|
+
s = Nt(...t);
|
497
497
|
break;
|
498
498
|
case "track":
|
499
|
-
s =
|
499
|
+
s = yn(...t);
|
500
500
|
break;
|
501
501
|
case "identify":
|
502
|
-
s =
|
502
|
+
s = Ms(...t);
|
503
503
|
break;
|
504
504
|
case "alias":
|
505
|
-
s =
|
505
|
+
s = $s(...t);
|
506
506
|
break;
|
507
507
|
case "group":
|
508
|
-
s =
|
508
|
+
s = Us(...t);
|
509
509
|
break;
|
510
510
|
default:
|
511
511
|
e[n](...t);
|
@@ -513,12 +513,12 @@ const Hn = (t, e) => {
|
|
513
513
|
}
|
514
514
|
s && e[n](s);
|
515
515
|
}
|
516
|
-
},
|
516
|
+
}, Po = 10 * 1e3, No = "RS_JS_SDK", Lo = (t, e, n = !0, s = null, i = null, r = {}) => {
|
517
517
|
const a = document.createElement("script");
|
518
518
|
return a.type = "text/javascript", a.onload = s, a.onerror = i, a.src = t, a.id = e, a.async = n, Object.keys(r).forEach((u) => {
|
519
519
|
a.setAttribute(u, r[u]);
|
520
|
-
}), a.setAttribute("data-loader",
|
521
|
-
},
|
520
|
+
}), a.setAttribute("data-loader", No), a;
|
521
|
+
}, wo = (t) => {
|
522
522
|
var r, a, u, l;
|
523
523
|
const e = document.getElementsByTagName("head");
|
524
524
|
if (e.length > 0) {
|
@@ -534,53 +534,47 @@ const Hn = (t, e) => {
|
|
534
534
|
s.appendChild(t);
|
535
535
|
const i = document.getElementsByTagName("html")[0];
|
536
536
|
i == null || i.insertBefore(s, i.firstChild);
|
537
|
-
},
|
538
|
-
document.getElementById(e) && a(new Error(
|
537
|
+
}, Mo = (t, e, n, s = !0, i) => new Promise((r, a) => {
|
538
|
+
document.getElementById(e) && a(new Error(ro(e)));
|
539
539
|
try {
|
540
540
|
let l;
|
541
|
-
|
541
|
+
wo(Lo(t, e, s, () => {
|
542
542
|
globalThis.clearTimeout(l), r(e);
|
543
|
-
}, () => {
|
544
|
-
globalThis.clearTimeout(l), a(new Error(Ln(e, t)));
|
543
|
+
}, (h) => {
|
544
|
+
globalThis.clearTimeout(l), a(new Error(Ln(e, t, h)));
|
545
545
|
}, i)), l = globalThis.setTimeout(() => {
|
546
|
-
a(new Error(
|
546
|
+
a(new Error(oo(e, t, n)));
|
547
547
|
}, n);
|
548
548
|
} catch (l) {
|
549
|
-
a(
|
549
|
+
a(Sn(l, Ln(e, t, "unknown")));
|
550
550
|
}
|
551
551
|
});
|
552
|
-
class
|
553
|
-
constructor(e, n
|
554
|
-
this.
|
552
|
+
class qs {
|
553
|
+
constructor(e, n = Po) {
|
554
|
+
this.logger = e, this.timeout = n;
|
555
555
|
}
|
556
556
|
/**
|
557
557
|
* Load external resource of type javascript
|
558
558
|
*/
|
559
559
|
loadJSFile(e) {
|
560
560
|
const { url: n, id: s, timeout: i, async: r, callback: a, extraAttributes: u } = e, l = !S(a);
|
561
|
-
|
561
|
+
Mo(n, s, i || this.timeout, r, u).then((c) => {
|
562
562
|
l || a(c);
|
563
563
|
}).catch((c) => {
|
564
|
-
|
564
|
+
l || a(s, c);
|
565
565
|
});
|
566
566
|
}
|
567
|
-
/**
|
568
|
-
* Handle errors
|
569
|
-
*/
|
570
|
-
onError(e) {
|
571
|
-
this.errorHandler.onError(e, Kr);
|
572
|
-
}
|
573
567
|
}
|
574
|
-
var
|
575
|
-
function
|
568
|
+
var $o = Symbol.for("preact-signals");
|
569
|
+
function Vt() {
|
576
570
|
if (Re > 1)
|
577
571
|
Re--;
|
578
572
|
else {
|
579
|
-
for (var t, e = !1;
|
580
|
-
var n =
|
581
|
-
for (
|
573
|
+
for (var t, e = !1; ot !== void 0; ) {
|
574
|
+
var n = ot;
|
575
|
+
for (ot = void 0, rn++; n !== void 0; ) {
|
582
576
|
var s = n.o;
|
583
|
-
if (n.o = void 0, n.f &= -3, !(8 & n.f) &&
|
577
|
+
if (n.o = void 0, n.f &= -3, !(8 & n.f) && Ys(n)) try {
|
584
578
|
n.c();
|
585
579
|
} catch (i) {
|
586
580
|
e || (t = i, e = !0);
|
@@ -588,7 +582,7 @@ function Ft() {
|
|
588
582
|
n = s;
|
589
583
|
}
|
590
584
|
}
|
591
|
-
if (
|
585
|
+
if (rn = 0, Re--, e) throw t;
|
592
586
|
}
|
593
587
|
}
|
594
588
|
function j(t) {
|
@@ -597,11 +591,21 @@ function j(t) {
|
|
597
591
|
try {
|
598
592
|
return t();
|
599
593
|
} finally {
|
600
|
-
|
594
|
+
Vt();
|
601
595
|
}
|
602
596
|
}
|
603
|
-
var D = void 0
|
604
|
-
function
|
597
|
+
var D = void 0;
|
598
|
+
function zs(t) {
|
599
|
+
var e = D;
|
600
|
+
D = void 0;
|
601
|
+
try {
|
602
|
+
return t();
|
603
|
+
} finally {
|
604
|
+
D = e;
|
605
|
+
}
|
606
|
+
}
|
607
|
+
var ot = void 0, Re = 0, rn = 0, Lt = 0;
|
608
|
+
function Ks(t) {
|
605
609
|
if (D !== void 0) {
|
606
610
|
var e = t.n;
|
607
611
|
if (e === void 0 || e.t !== D)
|
@@ -610,25 +614,33 @@ function js(t) {
|
|
610
614
|
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = D.s, e.n = void 0, D.s.n = e, D.s = e), e;
|
611
615
|
}
|
612
616
|
}
|
613
|
-
function q(t) {
|
614
|
-
this.v = t, this.i = 0, this.n = void 0, this.t = void 0;
|
617
|
+
function q(t, e) {
|
618
|
+
this.v = t, this.i = 0, this.n = void 0, this.t = void 0, this.W = e == null ? void 0 : e.watched, this.Z = e == null ? void 0 : e.unwatched;
|
615
619
|
}
|
616
|
-
q.prototype.brand =
|
620
|
+
q.prototype.brand = $o;
|
617
621
|
q.prototype.h = function() {
|
618
622
|
return !0;
|
619
623
|
};
|
620
624
|
q.prototype.S = function(t) {
|
621
|
-
|
625
|
+
var e = this, n = this.t;
|
626
|
+
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : zs(function() {
|
627
|
+
var s;
|
628
|
+
(s = e.W) == null || s.call(e);
|
629
|
+
}));
|
622
630
|
};
|
623
631
|
q.prototype.U = function(t) {
|
632
|
+
var e = this;
|
624
633
|
if (this.t !== void 0) {
|
625
|
-
var
|
626
|
-
|
634
|
+
var n = t.e, s = t.x;
|
635
|
+
n !== void 0 && (n.x = s, t.e = void 0), s !== void 0 && (s.e = n, t.x = void 0), t === this.t && (this.t = s, s === void 0 && zs(function() {
|
636
|
+
var i;
|
637
|
+
(i = e.Z) == null || i.call(e);
|
638
|
+
}));
|
627
639
|
}
|
628
640
|
};
|
629
641
|
q.prototype.subscribe = function(t) {
|
630
642
|
var e = this;
|
631
|
-
return
|
643
|
+
return ve(function() {
|
632
644
|
var n = e.value, s = D;
|
633
645
|
D = void 0;
|
634
646
|
try {
|
@@ -657,27 +669,27 @@ q.prototype.peek = function() {
|
|
657
669
|
}
|
658
670
|
};
|
659
671
|
Object.defineProperty(q.prototype, "value", { get: function() {
|
660
|
-
var t =
|
672
|
+
var t = Ks(this);
|
661
673
|
return t !== void 0 && (t.i = this.i), this.v;
|
662
674
|
}, set: function(t) {
|
663
675
|
if (t !== this.v) {
|
664
|
-
if (
|
665
|
-
this.v = t, this.i++,
|
676
|
+
if (rn > 100) throw new Error("Cycle detected");
|
677
|
+
this.v = t, this.i++, Lt++, Re++;
|
666
678
|
try {
|
667
679
|
for (var e = this.t; e !== void 0; e = e.x) e.t.N();
|
668
680
|
} finally {
|
669
|
-
|
681
|
+
Vt();
|
670
682
|
}
|
671
683
|
}
|
672
684
|
} });
|
673
|
-
function p(t) {
|
674
|
-
return new q(t);
|
685
|
+
function p(t, e) {
|
686
|
+
return new q(t, e);
|
675
687
|
}
|
676
|
-
function
|
688
|
+
function Ys(t) {
|
677
689
|
for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0;
|
678
690
|
return !1;
|
679
691
|
}
|
680
|
-
function
|
692
|
+
function Ws(t) {
|
681
693
|
for (var e = t.s; e !== void 0; e = e.n) {
|
682
694
|
var n = e.S.n;
|
683
695
|
if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
|
@@ -686,57 +698,58 @@ function zs(t) {
|
|
686
698
|
}
|
687
699
|
}
|
688
700
|
}
|
689
|
-
function
|
701
|
+
function Qs(t) {
|
690
702
|
for (var e = t.s, n = void 0; e !== void 0; ) {
|
691
703
|
var s = e.p;
|
692
704
|
e.i === -1 ? (e.S.U(e), s !== void 0 && (s.n = e.n), e.n !== void 0 && (e.n.p = s)) : n = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = s;
|
693
705
|
}
|
694
706
|
t.s = n;
|
695
707
|
}
|
696
|
-
function
|
697
|
-
q.call(this, void 0), this.x = t, this.s = void 0, this.g =
|
708
|
+
function We(t, e) {
|
709
|
+
q.call(this, void 0), this.x = t, this.s = void 0, this.g = Lt - 1, this.f = 4, this.W = e == null ? void 0 : e.watched, this.Z = e == null ? void 0 : e.unwatched;
|
698
710
|
}
|
699
|
-
|
711
|
+
We.prototype = new q();
|
712
|
+
We.prototype.h = function() {
|
700
713
|
if (this.f &= -3, 1 & this.f) return !1;
|
701
|
-
if ((36 & this.f) == 32 || (this.f &= -5, this.g ===
|
702
|
-
if (this.g =
|
714
|
+
if ((36 & this.f) == 32 || (this.f &= -5, this.g === Lt)) return !0;
|
715
|
+
if (this.g = Lt, this.f |= 1, this.i > 0 && !Ys(this))
|
703
716
|
return this.f &= -2, !0;
|
704
717
|
var t = D;
|
705
718
|
try {
|
706
|
-
|
719
|
+
Ws(this), D = this;
|
707
720
|
var e = this.x();
|
708
721
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
709
722
|
} catch (n) {
|
710
723
|
this.v = n, this.f |= 16, this.i++;
|
711
724
|
}
|
712
|
-
return D = t,
|
725
|
+
return D = t, Qs(this), this.f &= -2, !0;
|
713
726
|
};
|
714
|
-
|
727
|
+
We.prototype.S = function(t) {
|
715
728
|
if (this.t === void 0) {
|
716
729
|
this.f |= 36;
|
717
730
|
for (var e = this.s; e !== void 0; e = e.n) e.S.S(e);
|
718
731
|
}
|
719
732
|
q.prototype.S.call(this, t);
|
720
733
|
};
|
721
|
-
|
734
|
+
We.prototype.U = function(t) {
|
722
735
|
if (this.t !== void 0 && (q.prototype.U.call(this, t), this.t === void 0)) {
|
723
736
|
this.f &= -33;
|
724
737
|
for (var e = this.s; e !== void 0; e = e.n) e.S.U(e);
|
725
738
|
}
|
726
739
|
};
|
727
|
-
|
740
|
+
We.prototype.N = function() {
|
728
741
|
if (!(2 & this.f)) {
|
729
742
|
this.f |= 6;
|
730
743
|
for (var t = this.t; t !== void 0; t = t.x) t.t.N();
|
731
744
|
}
|
732
745
|
};
|
733
|
-
Object.defineProperty(
|
746
|
+
Object.defineProperty(We.prototype, "value", { get: function() {
|
734
747
|
if (1 & this.f) throw new Error("Cycle detected");
|
735
|
-
var t =
|
748
|
+
var t = Ks(this);
|
736
749
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
737
750
|
return this.v;
|
738
751
|
} });
|
739
|
-
function
|
752
|
+
function Xs(t) {
|
740
753
|
var e = t.u;
|
741
754
|
if (t.u = void 0, typeof e == "function") {
|
742
755
|
Re++;
|
@@ -747,22 +760,22 @@ function Ys(t) {
|
|
747
760
|
} catch (s) {
|
748
761
|
throw t.f &= -2, t.f |= 8, kn(t), s;
|
749
762
|
} finally {
|
750
|
-
D = n,
|
763
|
+
D = n, Vt();
|
751
764
|
}
|
752
765
|
}
|
753
766
|
}
|
754
767
|
function kn(t) {
|
755
768
|
for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
|
756
|
-
t.x = void 0, t.s = void 0,
|
769
|
+
t.x = void 0, t.s = void 0, Xs(t);
|
757
770
|
}
|
758
|
-
function
|
771
|
+
function Uo(t) {
|
759
772
|
if (D !== this) throw new Error("Out-of-order effect");
|
760
|
-
|
773
|
+
Qs(this), D = t, this.f &= -2, 8 & this.f && kn(this), Vt();
|
761
774
|
}
|
762
|
-
function
|
775
|
+
function ft(t) {
|
763
776
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
|
764
777
|
}
|
765
|
-
|
778
|
+
ft.prototype.c = function() {
|
766
779
|
var t = this.S();
|
767
780
|
try {
|
768
781
|
if (8 & this.f || this.x === void 0) return;
|
@@ -772,20 +785,20 @@ ht.prototype.c = function() {
|
|
772
785
|
t();
|
773
786
|
}
|
774
787
|
};
|
775
|
-
|
788
|
+
ft.prototype.S = function() {
|
776
789
|
if (1 & this.f) throw new Error("Cycle detected");
|
777
|
-
this.f |= 1, this.f &= -9,
|
790
|
+
this.f |= 1, this.f &= -9, Xs(this), Ws(this), Re++;
|
778
791
|
var t = D;
|
779
|
-
return D = this,
|
792
|
+
return D = this, Uo.bind(this, t);
|
780
793
|
};
|
781
|
-
|
782
|
-
2 & this.f || (this.f |= 2, this.o =
|
794
|
+
ft.prototype.N = function() {
|
795
|
+
2 & this.f || (this.f |= 2, this.o = ot, ot = this);
|
783
796
|
};
|
784
|
-
|
797
|
+
ft.prototype.d = function() {
|
785
798
|
this.f |= 8, 1 & this.f || kn(this);
|
786
799
|
};
|
787
|
-
function
|
788
|
-
var e = new
|
800
|
+
function ve(t) {
|
801
|
+
var e = new ft(t);
|
789
802
|
try {
|
790
803
|
e.c();
|
791
804
|
} catch (n) {
|
@@ -793,7 +806,7 @@ function pe(t) {
|
|
793
806
|
}
|
794
807
|
return e.d.bind(e);
|
795
808
|
}
|
796
|
-
class
|
809
|
+
class Bo {
|
797
810
|
constructor() {
|
798
811
|
this.items = [];
|
799
812
|
}
|
@@ -813,10 +826,10 @@ class Mo {
|
|
813
826
|
this.items = [];
|
814
827
|
}
|
815
828
|
}
|
816
|
-
const
|
817
|
-
class
|
818
|
-
constructor(e =
|
819
|
-
this.minLogLevel =
|
829
|
+
const pt = { LOG: 0, INFO: 1, DEBUG: 2, WARN: 3, ERROR: 4, NONE: 5 }, Hn = "LOG", Js = "ERROR", Vo = "RS SDK", Fo = "font-weight: bold; background: black; color: white;", xo = "font-weight: normal;";
|
830
|
+
class Ho {
|
831
|
+
constructor(e = Hn, n = "", s = console) {
|
832
|
+
this.minLogLevel = pt[e], this.scope = n, this.logProvider = s;
|
820
833
|
}
|
821
834
|
log(...e) {
|
822
835
|
this.outputLog("LOG", e);
|
@@ -835,7 +848,7 @@ class Vo {
|
|
835
848
|
}
|
836
849
|
outputLog(e, n) {
|
837
850
|
var s, i;
|
838
|
-
this.minLogLevel <=
|
851
|
+
this.minLogLevel <= pt[e] && ((i = (s = this.logProvider)[e.toLowerCase()]) == null || i.call(s, ...this.formatLogData(n)));
|
839
852
|
}
|
840
853
|
setScope(e) {
|
841
854
|
this.scope = e || this.scope;
|
@@ -843,50 +856,50 @@ class Vo {
|
|
843
856
|
// TODO: should we allow to change the level via global variable on run time
|
844
857
|
// to assist on the fly debugging?
|
845
858
|
setMinLogLevel(e) {
|
846
|
-
this.minLogLevel =
|
859
|
+
this.minLogLevel = pt[e], G(this.minLogLevel) && (this.minLogLevel = pt[Hn]);
|
847
860
|
}
|
848
861
|
/**
|
849
862
|
* Formats the console message using `scope` and styles
|
850
863
|
*/
|
851
864
|
formatLogData(e) {
|
852
865
|
if (Array.isArray(e) && e.length > 0) {
|
853
|
-
let n = `%c ${
|
866
|
+
let n = `%c ${Vo}`;
|
854
867
|
this.scope && (n = `${n} - ${this.scope}`);
|
855
|
-
const s =
|
868
|
+
const s = U(e[0]) ? e[0].trim() : "";
|
856
869
|
n = `${n} %c ${s}`;
|
857
870
|
const i = [
|
858
871
|
n,
|
859
|
-
|
872
|
+
Fo,
|
860
873
|
// add style for the prefix
|
861
|
-
|
874
|
+
xo
|
862
875
|
// reset the style for the actual message
|
863
876
|
];
|
864
|
-
return
|
877
|
+
return U(e[0]) || i.push(e[0]), i.push(...e.slice(1)), i;
|
865
878
|
}
|
866
879
|
return e;
|
867
880
|
}
|
868
881
|
}
|
869
|
-
const
|
870
|
-
let
|
882
|
+
const ye = new Ho();
|
883
|
+
let ge = /* @__PURE__ */ function(t) {
|
871
884
|
return t.HANDLEDEXCEPTION = "handledException", t.UNHANDLEDEXCEPTION = "unhandledException", t.UNHANDLEDREJECTION = "unhandledPromiseRejection", t;
|
872
885
|
}({});
|
873
|
-
const
|
886
|
+
const Zs = ["localStorage", "memoryStorage", "cookieStorage", "sessionStorage", "none"], on = "cookieStorage", Gn = "Unable to process/parse source configuration response", Go = "The source is disabled. Please enable the source in the dashboard to send events.", jo = "Failed to prepare data for the request.", qo = "Failed to invoke plugin because the extension point name is missing.", zo = "Failed to invoke plugin because the extension point name is invalid.", Ko = (t) => `${t}${R}The "getSourceConfig" load API option must be a function that returns valid source configuration data.`, Yo = (t, e, n) => `${t}${R}The base URL "${n}" for ${e} is not valid.`, Wo = (t, e, n) => `${t}${R}The consent manager "${e}" is not supported. Please choose one of the following supported consent managers: "${Object.keys(n)}".`, Qo = (t, e) => `${t}${R}Ignoring a non-error: ${e}.`, jn = "Failed to log breadcrumb", Xo = (t) => `${t}${R}Failed to handle the error.`, Jo = (t) => `${t}${R}Plugin name is missing.`, Zo = (t, e) => `${t}${R}Plugin "${e}" already exists.`, ea = (t, e) => `${t}${R}Plugin "${e}" not found.`, ta = (t, e) => `${t}${R}Plugin "${e}" not found in plugins but found in byName. This indicates a bug in the plugin engine. Please report this issue to the development team.`, na = (t, e, n) => `${t}${R}Plugin "${e}" could not be loaded because some of its dependencies "${n}" do not exist.`, sa = (t, e, n) => `${t}${R}Failed to invoke the "${e}" extension point of plugin "${n}".`, ia = (t, e) => `${t}${R}The "${e}" storage type is `, qn = "Failed to fetch the source config", ra = (t, e) => `${t}${R}The write key "${e}" is invalid. It must be a non-empty string. Please check that the write key is correct and try again.`, oa = (t, e) => `${t}${R}The data plane URL "${e}" is invalid. It must be a valid URL string. Please check that the data plane URL is correct and try again.`, ei = (t) => `${t}${R}The provided callback parameter is not a function.`, aa = (t, e, n, s, i) => `${t} with status ${e} (${n}) for URL: ${s}. Response: ${i.trim()}`, la = (t, e, n) => `${t} due to timeout or no connection (${e ? e.type : ""}) at the client side for URL: ${n}`, ua = (t, e) => `${t} for URL: ${e}`, ca = (t) => `Failed to save the value for "${t}" to storage`, da = (t) => `Failed to retrieve or parse data for "${t}" from storage`, fa = (t) => `The server responded with status ${t} while setting the cookies. As a fallback, the cookies will be set client side.`, ha = (t) => `The server failed to set the ${t} cookie. As a fallback, the cookies will be set client side.`, zn = "Failed to set/remove cookies via server. As a fallback, the cookies will be managed client side.", ga = (t, e, n) => `${t}${R}The storage type "${e}" is not supported. Please choose one of the following supported types: "${Zs}". The default type "${n}" will be used instead.`, ma = (t, e, n, s) => `${t}${R}The storage encryption version "${e}" is not supported. Please choose one of the following supported versions: "${Object.keys(n)}". The default version "${s}" will be used instead.`, pa = (t, e, n) => `${t}${R}The storage data migration has been disabled because the configured storage encryption version (${e}) is not the latest (${n}). To enable storage data migration, please update the storage encryption version to the latest version.`, va = (t, e, n) => `${t}${R}The provided cookie domain (${e}) does not match the current webpage's domain (${n}). Hence, the cookies will be set client-side.`, ya = (t, e, n, s) => `${t}${R}The "${e}" property defined under "${n}" is a reserved keyword. Please choose a different property name to avoid conflicts with reserved keywords (${s}).`, ba = (t) => `${t}${R}Please make sure that the "context" property in the event API's "options" argument is a valid object literal with key-value pairs.`, Ea = (t) => `${t}${R}The Beacon API is not supported by your browser. The events will be sent using XHR instead.`, Sa = (t, e, n) => `${t}${R}The session timeout value "${e}" is not a number. The default timeout of ${n} ms will be used instead.`, ka = (t, e, n) => `${t}${R}The session cut off duration value "${e}" is not a number. The default cut off duration of ${n} ms will be used instead.`, Ra = (t, e, n) => `${t}${R}The session cut off duration value "${e}" ms is less than the session timeout value "${n}" ms. The cut off functionality will be disabled.`, Ta = (t) => `${t}${R}The session timeout value is 0, which disables the automatic session tracking feature. If you want to enable session tracking, please provide a positive integer value for the timeout.`, Ia = (t, e, n) => `${t}${R}The session timeout value ${e} ms is less than the recommended minimum of ${n} ms. Please consider increasing the timeout value to ensure optimal performance and reliability.`, Oa = (t, e, n) => `${t}${R}The provided session ID (${e}) is either invalid, not a positive integer, or not at least "${n}" digits long. A new session ID will be auto-generated instead.`, Aa = (t) => `${t}${R}The storage is either full or unavailable, so the data will not be persisted. Switching to in-memory storage.`, Da = (t, e, n, s) => `${t}${R}The storage type "${n}" is not available for entry "${e}". The SDK will initialize the entry with "${s}" storage type instead.`, Ca = (t) => `${t}${R}The callback threw an exception`, _a = (t, e) => `${t}${R}The provided source config URL "${e}" is invalid. Using the default source config URL instead.`, Pa = (t, e) => `Failed to load the polyfill script with ID "${t}" from URL ${e}.`, Na = (t, e, n) => `${t}${R}The pre-consent storage strategy "${e}" is not supported. Please choose one of the following supported strategies: "none, session, anonymousId". The default strategy "${n}" will be used instead.`, La = (t, e, n) => `${t}${R}The pre-consent events delivery type "${e}" is not supported. Please choose one of the following supported types: "immediate, buffer". The default type "${n}" will be used instead.`, wa = (t, e) => `${t}${R}${e} plugin is deprecated. Please exclude it from the load API options.`, Ma = (t, e, n, s) => {
|
874
887
|
const i = n.length === 1, r = i ? ` '${n[0]}' plugin was` : ` ['${n.join("', '")}'] plugins were`, a = `${t}${R}${e}, but${r} not configured to load.`;
|
875
888
|
return s ? `${a} So, ${i ? "the plugin" : "those plugins"} will be loaded automatically.` : `${a} Ignore if this was intentional. Otherwise, consider adding ${i ? "it" : "them"} to the 'plugins' load API option.`;
|
876
|
-
},
|
889
|
+
}, $a = (t, e) => `${t}${R}The provided polyfill URL "${e}" is invalid. The default polyfill URL will be used instead.`, Ua = (t) => `${t}${R}Page Unloaded event can only be tracked when the Beacon transport is active. Please enable "useBeacon" load API option.`, Ba = (t, e) => `${t}${R}Ignoring unknown plugins: ${e.join(", ")}.`, ti = { All: !0 }, Rn = "js-integrations", ni = "plugins", Va = new RegExp("^(https?:\\/\\/)(((([a-zA-Z\\d]([a-zA-Z\\d-]*[a-zA-Z\\d])*)\\.)+[a-zA-Z]{2,}|localhost|((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9]?)))(\\:\\d+)?(\\/[-a-zA-Z\\d%_.~+]*)*(\\?[;&a-zA-Z\\d%_.~+=-]*)?(\\#[-a-zA-Z\\d_]*)?$"), ct = "modern", wt = "https://cdn.rudderlabs.com", Tn = "v3", si = `${wt}/${Tn}/${ct}/${Rn}`, ii = `${wt}/${Tn}/${ct}/${ni}`, ri = "https://api.rudderstack.com", Ce = "v3", Fa = "xhr", an = { iubenda: "IubendaConsentManager", oneTrust: "OneTrustConsentManager", ketch: "KetchConsentManager", custom: "CustomConsentManager" }, Tt = { [Ce]: "StorageEncryption", legacy: "StorageEncryptionLegacy" }, xa = { [Fa]: "XhrQueue", beacon: "BeaconQueue" }, Ha = "rsaRequest", Ga = "rsaMetrics", ja = { configUrl: ri, loadIntegration: !0, sessions: { autoTrack: !0, timeout: sn, cutOff: { enabled: !1 } }, sameSiteCookie: "Lax", polyfillIfRequired: !0, integrations: ti, useBeacon: !1, beaconQueueOptions: {}, destinationsQueueOptions: {}, queueOptions: {}, lockIntegrationsVersion: !0, lockPluginsVersion: !0, uaChTrackLevel: "none", plugins: [], useGlobalIntegrationsConfigInEvents: !1, bufferDataPlaneEventsUntilReady: !1, dataPlaneEventsBufferTimeout: Ro, storage: { encryption: { version: Ce }, migrate: !0, cookie: {} }, sendAdblockPage: !1, sameDomainCookiesOnly: !1, secureCookie: !1, sendAdblockPageOptions: {}, useServerSideCookies: !1 }, qa = p(I(ja)), O = { userId: "", userTraits: {}, anonymousId: "", groupId: "", groupTraits: {}, initialReferrer: "", initialReferringDomain: "", sessionInfo: {}, authToken: null }, za = 10, Ka = { userId: p(O.userId), userTraits: p(O.userTraits), anonymousId: p(O.anonymousId), groupId: p(O.groupId), groupTraits: p(O.groupTraits), initialReferrer: p(O.initialReferrer), initialReferringDomain: p(O.initialReferringDomain), sessionInfo: p(O.sessionInfo), authToken: p(O.authToken) }, Ya = { isOnline: p(!0), storage: { isLocalStorageAvailable: p(!1), isCookieStorageAvailable: p(!1), isSessionStorageAvailable: p(!1) }, isBeaconAvailable: p(!1), isLegacyDOM: p(!1), isUaCHAvailable: p(!1), isCryptoAvailable: p(!1), isIE11: p(!1), isAdBlocked: p(!1) }, Wa = { isErrorReportingEnabled: p(!1), isMetricsReportingEnabled: p(!1), breadcrumbs: p([]) }, Qa = p(void 0), Xa = { activeDataplaneUrl: p(void 0), integrationsCDNPath: p(si), pluginsCDNPath: p(ii), sourceConfigUrl: p(void 0), status: p(void 0), initialized: p(!1), logLevel: p(Js), loaded: p(!1), readyCallbacks: p([]), writeKey: p(void 0), dataPlaneUrl: p(void 0) }, Ja = { enabled: p(!1), initialized: p(!1), data: p({}), activeConsentManagerPluginName: p(void 0), preConsent: p({ enabled: !1 }), postConsent: p({}), resolutionStrategy: p("and"), provider: p(void 0), metadata: p(void 0) }, Za = { retries: p(0), dropped: p(0), sent: p(0), queued: p(0), triggered: p(0), metricsServiceUrl: p(void 0) }, el = { app: p({ name: wn, namespace: mo, version: lt, installType: Hs }), traits: p(null), library: p({ name: wn, version: lt, snippetVersion: globalThis.RudderSnippetVersion }), userAgent: p(null), device: p(null), network: p(null), os: p({ name: "", version: "" }), locale: p(null), screen: p({ density: 0, width: 0, height: 0, innerWidth: 0, innerHeight: 0 }), "ua-ch": p(void 0), timezone: p(void 0) }, tl = { configuredDestinations: p([]), activeDestinations: p([]), loadOnlyIntegrations: p({}), failedDestinations: p([]), loadIntegration: p(!0), initializedDestinations: p([]), clientDestinationsReady: p(!1), integrationsConfig: p({}) }, nl = { toBeProcessedArray: p([]), readyCallbacksArray: p([]) }, sl = { ready: p(!1), loadedPlugins: p([]), failedPlugins: p([]), pluginsToLoadFromConfig: p([]), activePlugins: p([]), totalPluginsToLoad: p(0) }, il = { encryptionPluginName: p(void 0), migrate: p(!1), type: p(void 0), cookie: p(void 0), entries: p({}), trulyAnonymousTracking: p(!1) }, rl = { isEnabledServerSideCookies: p(!1), dataServiceUrl: p(void 0) }, ol = {
|
877
890
|
eventsQueuePluginName: p(void 0),
|
878
891
|
deliveryEnabled: p(!0)
|
879
892
|
// Delivery should always happen
|
880
|
-
},
|
881
|
-
function
|
893
|
+
}, al = { enabled: p(!1), pageLifecycle: { enabled: p(!1), pageViewId: p(void 0), pageLoadedTimestamp: p(void 0) } }, ll = { capabilities: Ya, consents: Ja, context: el, eventBuffer: nl, lifecycle: Xa, loadOptions: qa, metrics: Za, nativeDestinations: tl, plugins: sl, reporting: Wa, session: Ka, source: Qa, storage: il, serverCookies: rl, dataPlaneEvents: ol, autoTrack: al }, o = { ...I(ll) };
|
894
|
+
function oi(t) {
|
882
895
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
883
896
|
}
|
884
|
-
var
|
885
|
-
function
|
886
|
-
return
|
897
|
+
var It = { exports: {} }, Ot = { exports: {} }, ul = Ot.exports, Kn;
|
898
|
+
function cl() {
|
899
|
+
return Kn || (Kn = 1, function(t, e) {
|
887
900
|
(function(n, s) {
|
888
901
|
t.exports = s();
|
889
|
-
})(
|
902
|
+
})(ul, function() {
|
890
903
|
function n(m) {
|
891
904
|
return !isNaN(parseFloat(m)) && isFinite(m);
|
892
905
|
}
|
@@ -923,10 +936,10 @@ function ul() {
|
|
923
936
|
var m = this.getFileName() || "", v = this.getLineNumber() || "", k = this.getColumnNumber() || "", E = this.getFunctionName() || "";
|
924
937
|
return this.getIsEval() ? m ? "[eval] (" + m + ":" + v + ":" + k + ")" : "[eval]:" + v + ":" + k : E ? E + " (" + m + ":" + v + ":" + k + ")" : m + ":" + v + ":" + k;
|
925
938
|
} }, h.fromString = function(v) {
|
926
|
-
var k = v.indexOf("("), E = v.lastIndexOf(")"),
|
927
|
-
if (
|
928
|
-
var J = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(
|
929
|
-
return new h({ functionName:
|
939
|
+
var k = v.indexOf("("), E = v.lastIndexOf(")"), P = v.substring(0, k), z = v.substring(k + 1, E).split(","), H = v.substring(E + 1);
|
940
|
+
if (H.indexOf("@") === 0)
|
941
|
+
var J = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(H, ""), fe = J[1], Oe = J[2], T = J[3];
|
942
|
+
return new h({ functionName: P, args: z || void 0, fileName: fe, lineNumber: Oe || void 0, columnNumber: T || void 0 });
|
930
943
|
};
|
931
944
|
for (var y = 0; y < r.length; y++)
|
932
945
|
h.prototype["get" + s(r[y])] = i(r[y]), h.prototype["set" + s(r[y])] = /* @__PURE__ */ function(m) {
|
@@ -950,14 +963,14 @@ function ul() {
|
|
950
963
|
}(u[f]);
|
951
964
|
return h;
|
952
965
|
});
|
953
|
-
}(
|
966
|
+
}(Ot)), Ot.exports;
|
954
967
|
}
|
955
|
-
var
|
956
|
-
function
|
957
|
-
return
|
968
|
+
var dl = It.exports, Yn;
|
969
|
+
function fl() {
|
970
|
+
return Yn || (Yn = 1, function(t, e) {
|
958
971
|
(function(n, s) {
|
959
|
-
t.exports = s(
|
960
|
-
})(
|
972
|
+
t.exports = s(cl());
|
973
|
+
})(dl, function(s) {
|
961
974
|
var i = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, a = /^(eval@)?(\[native code])?$/;
|
962
975
|
return {
|
963
976
|
/**
|
@@ -1044,16 +1057,16 @@ function dl() {
|
|
1044
1057
|
}
|
1045
1058
|
};
|
1046
1059
|
});
|
1047
|
-
}(
|
1060
|
+
}(It)), It.exports;
|
1048
1061
|
}
|
1049
|
-
var
|
1050
|
-
const
|
1051
|
-
const e = { file: t.fileName, method:
|
1052
|
-
return e.lineNumber && e.lineNumber > -1 && !e.file && !e.method && (e.file =
|
1053
|
-
},
|
1054
|
-
function
|
1055
|
-
return { errorClass:
|
1056
|
-
const a =
|
1062
|
+
var hl = fl();
|
1063
|
+
const gl = /* @__PURE__ */ oi(hl), ai = "global code", ml = (t) => C(t) && /^global code$/i.test(t) ? ai : t, pl = (t) => {
|
1064
|
+
const e = { file: t.fileName, method: ml(t.functionName), lineNumber: t.lineNumber, columnNumber: t.columnNumber };
|
1065
|
+
return e.lineNumber && e.lineNumber > -1 && !e.file && !e.method && (e.file = ai), e;
|
1066
|
+
}, Wn = (t) => U(t) ? t : "";
|
1067
|
+
function Qn(t, e, n, s) {
|
1068
|
+
return { errorClass: Wn(t), message: `${n}${Wn(e)}`, type: "browserjs", stacktrace: s.reduce((i, r) => {
|
1069
|
+
const a = pl(r);
|
1057
1070
|
try {
|
1058
1071
|
return JSON.stringify(a) === "{}" ? i : i.concat(a);
|
1059
1072
|
} catch {
|
@@ -1061,38 +1074,38 @@ function Yn(t, e, n, s) {
|
|
1061
1074
|
}
|
1062
1075
|
}, []) };
|
1063
1076
|
}
|
1064
|
-
const
|
1077
|
+
const li = (t, e) => {
|
1065
1078
|
let n;
|
1066
|
-
return
|
1079
|
+
return vn(t) && U(En(t)) ? n = t : (e.warn(Qo(nt, de(t))), n = void 0), n;
|
1067
1080
|
}, vl = (t, e) => {
|
1068
1081
|
try {
|
1069
|
-
const n =
|
1070
|
-
return
|
1082
|
+
const n = gl.parse(t);
|
1083
|
+
return Qn(t.name, t.message, e, n);
|
1071
1084
|
} catch {
|
1072
|
-
return
|
1085
|
+
return Qn(t.name, t.message, e, []);
|
1073
1086
|
}
|
1074
|
-
},
|
1087
|
+
}, Xn = (t, e) => {
|
1075
1088
|
try {
|
1076
1089
|
return JSON.parse(t || "");
|
1077
1090
|
} catch (n) {
|
1078
|
-
const s =
|
1091
|
+
const s = Sn(n, "Failed to parse response data");
|
1079
1092
|
e(s);
|
1080
1093
|
}
|
1081
|
-
},
|
1082
|
-
const s =
|
1083
|
-
return n && (s.headers =
|
1084
|
-
},
|
1094
|
+
}, At = "The request failed", yl = [/Failed to fetch dynamically imported module: .*/], bl = [/Failed to load the script with the id .*/, /A timeout of \d+ ms occurred while trying to load the script with id .*/], El = [new RegExp(`${At}.*`), /A script with the id .* is already loaded\./], Sl = { headers: { Accept: "application/json", "Content-Type": "application/json;charset=UTF-8" }, method: "GET" }, Jn = (t, e, n) => {
|
1095
|
+
const s = x(Sl, e || {});
|
1096
|
+
return n && (s.headers = x(s.headers, { Authorization: n })), s.url = t, s;
|
1097
|
+
}, Zn = (t, e = So, n) => new Promise((s, i) => {
|
1085
1098
|
let r;
|
1086
1099
|
if (t.sendRawData === !0)
|
1087
1100
|
r = t.data;
|
1088
1101
|
else if (r = de(t.data, !1, [], n), ne(r)) {
|
1089
|
-
i({ error: new Error(
|
1102
|
+
i({ error: new Error(jo), undefined: void 0, options: t });
|
1090
1103
|
return;
|
1091
1104
|
}
|
1092
1105
|
const a = new XMLHttpRequest(), u = (c) => {
|
1093
|
-
i({ error: new Error(
|
1106
|
+
i({ error: new Error(aa(At, a.status, a.statusText, t.url, a.responseText)), xhr: a, options: t });
|
1094
1107
|
}, l = (c) => {
|
1095
|
-
i({ error: new Error(
|
1108
|
+
i({ error: new Error(la(At, c, t.url)), xhr: a, options: t, ...(c == null ? void 0 : c.type) === "timeout" ? { timedOut: !0 } : {} });
|
1096
1109
|
};
|
1097
1110
|
a.ontimeout = l, a.onerror = l, a.onload = () => {
|
1098
1111
|
a.status >= 200 && a.status < 400 ? s({ response: a.responseText, xhr: a, options: t }) : u();
|
@@ -1102,7 +1115,7 @@ const pl = (t, e) => {
|
|
1102
1115
|
try {
|
1103
1116
|
a.send(r);
|
1104
1117
|
} catch (c) {
|
1105
|
-
i({ error:
|
1118
|
+
i({ error: Sn(c, ua(At, t.url)), xhr: a, options: t });
|
1106
1119
|
}
|
1107
1120
|
});
|
1108
1121
|
class kl {
|
@@ -1118,8 +1131,8 @@ class kl {
|
|
1118
1131
|
async getData(e) {
|
1119
1132
|
const { url: n, options: s, timeout: i, isRawResponse: r } = e;
|
1120
1133
|
try {
|
1121
|
-
const a = await
|
1122
|
-
return { data: r ? a.response :
|
1134
|
+
const a = await Zn(Jn(n, s, this.basicAuthHeader), i, this.logger);
|
1135
|
+
return { data: r ? a.response : Xn(a.response, this.onError), details: a };
|
1123
1136
|
} catch (a) {
|
1124
1137
|
return { data: void 0, details: a };
|
1125
1138
|
}
|
@@ -1129,8 +1142,8 @@ class kl {
|
|
1129
1142
|
*/
|
1130
1143
|
getAsyncData(e) {
|
1131
1144
|
const { callback: n, url: s, options: i, timeout: r, isRawResponse: a } = e, u = !S(n);
|
1132
|
-
|
1133
|
-
u || n(a ? l.response :
|
1145
|
+
Zn(Jn(s, i, this.basicAuthHeader), r, this.logger).then((l) => {
|
1146
|
+
u || n(a ? l.response : Xn(l.response, this.onError), l);
|
1134
1147
|
}).catch((l) => {
|
1135
1148
|
u || n(void 0, l);
|
1136
1149
|
});
|
@@ -1138,15 +1151,15 @@ class kl {
|
|
1138
1151
|
/**
|
1139
1152
|
* Handle errors
|
1140
1153
|
*/
|
1141
|
-
onError(e) {
|
1142
|
-
var
|
1143
|
-
(
|
1154
|
+
onError(e, n) {
|
1155
|
+
var s;
|
1156
|
+
(s = this.errorHandler) == null || s.onError({ error: e, context: Xr, groupingHash: n });
|
1144
1157
|
}
|
1145
1158
|
/**
|
1146
1159
|
* Set basic authentication header (eg writekey)
|
1147
1160
|
*/
|
1148
1161
|
setAuthHeader(e, n = !1) {
|
1149
|
-
const s = n ? e :
|
1162
|
+
const s = n ? e : Yr(`${e}:`);
|
1150
1163
|
this.basicAuthHeader = `Basic ${s}`;
|
1151
1164
|
}
|
1152
1165
|
/**
|
@@ -1156,10 +1169,10 @@ class kl {
|
|
1156
1169
|
this.basicAuthHeader = void 0;
|
1157
1170
|
}
|
1158
1171
|
}
|
1159
|
-
const
|
1172
|
+
const ui = new kl(ye), Rl = "1", Tl = () => [
|
1160
1173
|
"rsa"
|
1161
1174
|
// Prefix for all the SDK scripts including plugins and module federated chunks
|
1162
|
-
],
|
1175
|
+
], Il = ["www.test-host.com", "localhost", "127.0.0.1", "[::1]"], Ol = [
|
1163
1176
|
"userId",
|
1164
1177
|
"userTraits",
|
1165
1178
|
"groupId",
|
@@ -1174,19 +1187,19 @@ const ri = new kl(ve), Rl = "1", Il = () => [
|
|
1174
1187
|
"authToken"
|
1175
1188
|
], Al = "RudderStack JavaScript SDK", Dl = "__REPOSITORY_URL__", Cl = "js", _l = (t, e) => {
|
1176
1189
|
switch (e) {
|
1177
|
-
case
|
1190
|
+
case ge.UNHANDLEDEXCEPTION: {
|
1178
1191
|
const { error: n } = t;
|
1179
1192
|
return n || t;
|
1180
1193
|
}
|
1181
|
-
case
|
1194
|
+
case ge.UNHANDLEDREJECTION:
|
1182
1195
|
return t.reason;
|
1183
|
-
case
|
1196
|
+
case ge.HANDLEDEXCEPTION:
|
1184
1197
|
default:
|
1185
1198
|
return t;
|
1186
1199
|
}
|
1187
1200
|
}, Pl = (t) => ({ type: "manual", name: t, timestamp: /* @__PURE__ */ new Date(), metaData: {} }), Nl = () => {
|
1188
1201
|
const t = globalThis.location.hostname;
|
1189
|
-
return !t || t &&
|
1202
|
+
return !t || t && Il.includes(t) ? "development" : "production";
|
1190
1203
|
}, Ll = (t) => {
|
1191
1204
|
const e = de(t, !1, Ol);
|
1192
1205
|
return e !== null ? JSON.parse(e) : {};
|
@@ -1195,7 +1208,7 @@ const ri = new kl(ve), Rl = "1", Il = () => [
|
|
1195
1208
|
return { id: `${((i = t.value) == null ? void 0 : i.id) ?? n.writeKey.value}..${e.sessionInfo.value.id ?? "NA"}..${s.pageLifecycle.pageViewId.value ?? "NA"}`, name: ((r = t.value) == null ? void 0 : r.name) ?? "NA" };
|
1196
1209
|
}, $l = (t, e) => ({ locale: t.value ?? "NA", userAgent: e.value ?? "NA", time: /* @__PURE__ */ new Date() }), Ul = (t, e, n, s) => {
|
1197
1210
|
const { context: i, lifecycle: r, session: a, source: u, reporting: l, autoTrack: c } = n, { app: d, locale: h, userAgent: y, timezone: g, screen: f, library: m } = i;
|
1198
|
-
return { payloadVersion: "5", notifier: { name: Al, version: d.value.version, url: Dl }, events: [{ exceptions: [
|
1211
|
+
return { payloadVersion: "5", notifier: { name: Al, version: d.value.version, url: Dl }, events: [{ exceptions: [I(t)], severity: e.severity, unhandled: e.unhandled, severityReason: e.severityReason, app: { version: d.value.version, releaseStage: Nl(), type: d.value.installType }, device: $l(h, y), request: { url: wl(), clientIp: "[NOT COLLECTED]" }, breadcrumbs: I(l.breadcrumbs.value), context: t.message, groupingHash: s, metaData: {
|
1199
1212
|
app: { snippetVersion: m.value.snippetVersion },
|
1200
1213
|
device: { ...f.value, timezone: g.value },
|
1201
1214
|
// Add rest of the state groups as metadata
|
@@ -1204,22 +1217,35 @@ const ri = new kl(ve), Rl = "1", Il = () => [
|
|
1204
1217
|
}, user: Ml(u, a, r, c) }] };
|
1205
1218
|
}, Bl = (t) => {
|
1206
1219
|
const e = t.message;
|
1207
|
-
return yl.some((n) => n.test(e)) || bl.some((n) => n.test(e)) ? e.includes(
|
1220
|
+
return yl.some((n) => n.test(e)) || bl.some((n) => n.test(e)) ? e.includes(wt) : !El.some((n) => n.test(e));
|
1208
1221
|
}, Vl = (t) => {
|
1209
1222
|
var r;
|
1210
1223
|
const e = (r = t.stacktrace[0]) == null ? void 0 : r.file;
|
1211
1224
|
if (!e || typeof e != "string")
|
1212
1225
|
return !1;
|
1213
1226
|
const n = e.substring(e.lastIndexOf("/") + 1), s = e.split("/");
|
1214
|
-
return s[s.length - 2] === Rn ||
|
1227
|
+
return s[s.length - 2] === Rn || Tl().some((a) => n.startsWith(a) && n.endsWith(".js"));
|
1215
1228
|
}, Fl = (t, e) => {
|
1216
|
-
const n = { version: Rl, message_id:
|
1229
|
+
const n = { version: Rl, message_id: Bt(), source: { name: Cl, sdk_version: e.context.app.value.version, write_key: e.lifecycle.writeKey.value, install_type: e.context.app.value.installType }, errors: t };
|
1217
1230
|
return de(n);
|
1231
|
+
}, xl = (t, e, n, s) => {
|
1232
|
+
let i;
|
1233
|
+
if (n.context.app.value.installType !== "cdn")
|
1234
|
+
return i;
|
1235
|
+
if (!C(t))
|
1236
|
+
i = e;
|
1237
|
+
else if (U(t))
|
1238
|
+
i = t;
|
1239
|
+
else {
|
1240
|
+
const r = li(t, s);
|
1241
|
+
C(r) ? i = r.message : i = e;
|
1242
|
+
}
|
1243
|
+
return i;
|
1218
1244
|
};
|
1219
1245
|
class Hl {
|
1220
1246
|
// If no logger is passed errors will be thrown as unhandled error
|
1221
1247
|
constructor(e, n) {
|
1222
|
-
|
1248
|
+
N(this, "initialized", !1);
|
1223
1249
|
this.httpClient = e, this.logger = n;
|
1224
1250
|
}
|
1225
1251
|
/**
|
@@ -1234,33 +1260,35 @@ class Hl {
|
|
1234
1260
|
*/
|
1235
1261
|
attachErrorListeners() {
|
1236
1262
|
globalThis.addEventListener("error", (e) => {
|
1237
|
-
this.onError(e,
|
1263
|
+
this.onError({ error: e, context: nt, errorType: ge.UNHANDLEDEXCEPTION });
|
1238
1264
|
}), globalThis.addEventListener("unhandledrejection", (e) => {
|
1239
|
-
this.onError(e,
|
1265
|
+
this.onError({ error: e, context: nt, errorType: ge.UNHANDLEDREJECTION });
|
1240
1266
|
});
|
1241
1267
|
}
|
1242
1268
|
/**
|
1243
1269
|
* Handle errors
|
1244
|
-
* @param
|
1245
|
-
* @param
|
1246
|
-
* @param
|
1247
|
-
* @param
|
1270
|
+
* @param errorInfo - The error information
|
1271
|
+
* @param errorInfo.error - The error to handle
|
1272
|
+
* @param errorInfo.context - The context of where the error occurred
|
1273
|
+
* @param errorInfo.customMessage - The custom message of the error
|
1274
|
+
* @param errorInfo.errorType - The type of the error (handled or unhandled)
|
1275
|
+
* @param errorInfo.groupingHash - The grouping hash of the error
|
1248
1276
|
*/
|
1249
|
-
onError(e
|
1277
|
+
onError(e) {
|
1250
1278
|
try {
|
1251
|
-
const r = _l(
|
1252
|
-
if (G(
|
1279
|
+
const { error: n, context: s, customMessage: i, groupingHash: r } = e, a = e.errorType ?? ge.HANDLEDEXCEPTION, u = _l(n, a), l = li(u, this.logger);
|
1280
|
+
if (G(l))
|
1253
1281
|
return;
|
1254
|
-
const
|
1255
|
-
if (!
|
1282
|
+
const c = i ? `${i} - ` : "", d = `${s}${R}${c}`, h = vl(l, d), g = En(l).includes(Rt);
|
1283
|
+
if (!g && !Vl(h) && a !== ge.HANDLEDEXCEPTION)
|
1256
1284
|
return;
|
1257
|
-
if (o.reporting.isErrorReportingEnabled.value && Bl(
|
1258
|
-
const
|
1259
|
-
this.httpClient.getAsyncData({ url: o.metrics.metricsServiceUrl.value, options: { method: "POST", data: Fl(
|
1285
|
+
if (o.reporting.isErrorReportingEnabled.value && Bl(h)) {
|
1286
|
+
const f = { severity: "error", unhandled: a !== ge.HANDLEDEXCEPTION, severityReason: { type: a } }, m = xl(r, h.message, o, this.logger), v = Ul(h, f, o, m);
|
1287
|
+
this.httpClient.getAsyncData({ url: o.metrics.metricsServiceUrl.value, options: { method: "POST", data: Fl(v, o), sendRawData: !0 }, isRawResponse: !0 });
|
1260
1288
|
}
|
1261
|
-
(
|
1262
|
-
} catch (
|
1263
|
-
this.logger.error(
|
1289
|
+
(a === ge.HANDLEDEXCEPTION || g) && this.logger.error(h.message);
|
1290
|
+
} catch (n) {
|
1291
|
+
this.logger.error(Xo(nt), n);
|
1264
1292
|
}
|
1265
1293
|
}
|
1266
1294
|
/**
|
@@ -1273,29 +1301,29 @@ class Hl {
|
|
1273
1301
|
try {
|
1274
1302
|
o.reporting.breadcrumbs.value = [...o.reporting.breadcrumbs.value, Pl(e)];
|
1275
1303
|
} catch (n) {
|
1276
|
-
this.onError(n,
|
1304
|
+
this.onError({ error: n, context: nt, customMessage: jn, groupingHash: jn });
|
1277
1305
|
}
|
1278
1306
|
}
|
1279
1307
|
}
|
1280
|
-
const
|
1281
|
-
class
|
1308
|
+
const ci = new Hl(ui, ye);
|
1309
|
+
class Gl {
|
1282
1310
|
constructor(e, n = {}) {
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1311
|
+
N(this, "plugins", []);
|
1312
|
+
N(this, "byName", {});
|
1313
|
+
N(this, "cache", {});
|
1314
|
+
N(this, "config", { throws: !0 });
|
1287
1315
|
this.config = { throws: !0, ...n }, this.logger = e;
|
1288
1316
|
}
|
1289
1317
|
register(e, n) {
|
1290
1318
|
if (!e.name) {
|
1291
|
-
const i =
|
1319
|
+
const i = Jo(Be);
|
1292
1320
|
if (this.config.throws)
|
1293
1321
|
throw new Error(i);
|
1294
1322
|
this.logger.error(i, e);
|
1295
1323
|
return;
|
1296
1324
|
}
|
1297
1325
|
if (this.byName[e.name]) {
|
1298
|
-
const i =
|
1326
|
+
const i = Zo(Be, e.name);
|
1299
1327
|
if (this.config.throws)
|
1300
1328
|
throw new Error(i);
|
1301
1329
|
this.logger.error(i);
|
@@ -1311,7 +1339,7 @@ class xl {
|
|
1311
1339
|
unregister(e) {
|
1312
1340
|
const n = this.byName[e];
|
1313
1341
|
if (!n) {
|
1314
|
-
const i =
|
1342
|
+
const i = ea(Be, e);
|
1315
1343
|
if (this.config.throws)
|
1316
1344
|
throw new Error(i);
|
1317
1345
|
this.logger.error(i);
|
@@ -1319,7 +1347,7 @@ class xl {
|
|
1319
1347
|
}
|
1320
1348
|
const s = this.plugins.indexOf(n);
|
1321
1349
|
if (s === -1) {
|
1322
|
-
const i =
|
1350
|
+
const i = ta(Be, e);
|
1323
1351
|
if (this.config.throws)
|
1324
1352
|
throw new Error(i);
|
1325
1353
|
this.logger.error(i);
|
@@ -1336,9 +1364,9 @@ class xl {
|
|
1336
1364
|
var i;
|
1337
1365
|
if ((i = s.deps) != null && i.some((r) => !this.byName[r])) {
|
1338
1366
|
const r = s.deps.filter((a) => !this.byName[a]);
|
1339
|
-
return this.logger.error(
|
1367
|
+
return this.logger.error(na(Be, s.name, r)), !1;
|
1340
1368
|
}
|
1341
|
-
return n === "." ? !0 :
|
1369
|
+
return n === "." ? !0 : Hr(s, n);
|
1342
1370
|
})), this.cache[n];
|
1343
1371
|
}
|
1344
1372
|
// This method allows to process this.plugins so that it could
|
@@ -1349,23 +1377,23 @@ class xl {
|
|
1349
1377
|
invoke(e, n = !0, ...s) {
|
1350
1378
|
let i = e;
|
1351
1379
|
if (!i)
|
1352
|
-
throw new Error(
|
1380
|
+
throw new Error(qo);
|
1353
1381
|
const r = i.startsWith("!"), a = this.config.throws ?? i.endsWith("!");
|
1354
1382
|
if (i = i.replace(/(^!|!$)/g, ""), !i)
|
1355
|
-
throw new Error(
|
1383
|
+
throw new Error(zo);
|
1356
1384
|
const u = i.split(".");
|
1357
1385
|
u.pop();
|
1358
1386
|
const l = u.join(".");
|
1359
1387
|
return (n ? this.getPlugins(i) : [this.getPlugins(i)[0]]).map((d) => {
|
1360
|
-
const h =
|
1388
|
+
const h = tn(d, i);
|
1361
1389
|
if (!S(h) || r)
|
1362
1390
|
return h;
|
1363
1391
|
try {
|
1364
|
-
return h.apply(
|
1392
|
+
return h.apply(tn(d, l), s);
|
1365
1393
|
} catch (y) {
|
1366
1394
|
if (a)
|
1367
1395
|
throw y;
|
1368
|
-
this.logger.error(
|
1396
|
+
this.logger.error(sa(Be, i, d.name), y);
|
1369
1397
|
}
|
1370
1398
|
return null;
|
1371
1399
|
});
|
@@ -1377,19 +1405,19 @@ class xl {
|
|
1377
1405
|
return this.invoke(e, !0, ...n);
|
1378
1406
|
}
|
1379
1407
|
}
|
1380
|
-
const
|
1381
|
-
t.config.useNativeSDK === !0,
|
1408
|
+
const jl = new Gl(ye, { throws: !0 }), ql = (t) => t.config.connectionMode !== "cloud" || t.config.useNativeSDKToSend === !0 || // this is the older flag for hybrid mode destinations
|
1409
|
+
t.config.useNativeSDK === !0, zl = (t) => t.config.connectionMode === "hybrid" || t.config.useNativeSDKToSend === !0, es = (t) => t.filter(ql), di = ["BeaconQueue", "CustomConsentManager", "DeviceModeDestinations", "DeviceModeTransformation", "ExternalAnonymousId", "GoogleLinker", "IubendaConsentManager", "KetchConsentManager", "NativeDestinationQueue", "OneTrustConsentManager", "StorageEncryption", "StorageEncryptionLegacy", "StorageMigrator", "XhrQueue"], Kl = ["Bugsnag", "ErrorReporting"], Yl = {
|
1382
1410
|
rudderAnalyticsRemotePlugins: { url: () => Promise.resolve(window.RudderStackGlobals && window.RudderStackGlobals.app && window.RudderStackGlobals.app.pluginsCDNPath ? `${window.RudderStackGlobals.app.pluginsCDNPath}/rsa-plugins.js` : "https://cdn.rudderlabs.com/v3/modern/plugins//rsa-plugins.js"), format: "esm", from: "vite" }
|
1383
1411
|
};
|
1384
|
-
function
|
1412
|
+
function fi(t, e) {
|
1385
1413
|
const n = Object.assign(t, e);
|
1386
1414
|
for (const s of Object.keys(n))
|
1387
|
-
typeof n[s] == "object" && typeof e[s] == "object" && (n[s] =
|
1415
|
+
typeof n[s] == "object" && typeof e[s] == "object" && (n[s] = fi(n[s], e[s]));
|
1388
1416
|
return n;
|
1389
1417
|
}
|
1390
|
-
const
|
1391
|
-
async function
|
1392
|
-
const e =
|
1418
|
+
const Wl = (t) => fi({}, (globalThis.__federation_shared__ || {}).default || {});
|
1419
|
+
async function Ql(t) {
|
1420
|
+
const e = Yl[t];
|
1393
1421
|
if (e.inited)
|
1394
1422
|
return e.lib;
|
1395
1423
|
if (["esm", "systemjs"].includes(e.format))
|
@@ -1401,7 +1429,7 @@ async function Wl(t) {
|
|
1401
1429
|
r
|
1402
1430
|
).then((a) => {
|
1403
1431
|
if (!e.inited) {
|
1404
|
-
const u =
|
1432
|
+
const u = Wl();
|
1405
1433
|
a.init(u), e.lib = a, e.lib.init(u), e.inited = !0;
|
1406
1434
|
}
|
1407
1435
|
n(e.lib);
|
@@ -1417,9 +1445,9 @@ function K(t, e) {
|
|
1417
1445
|
return t;
|
1418
1446
|
}
|
1419
1447
|
function Y(t, e) {
|
1420
|
-
return
|
1448
|
+
return Ql(t).then((n) => n.get(e).then((s) => s()));
|
1421
1449
|
}
|
1422
|
-
const
|
1450
|
+
const Xl = (t) => {
|
1423
1451
|
switch (t) {
|
1424
1452
|
case "BeaconQueue":
|
1425
1453
|
return () => Y("rudderAnalyticsRemotePlugins", "./BeaconQueue").then((e) => K(e, !0));
|
@@ -1452,16 +1480,16 @@ const Ql = (t) => {
|
|
1452
1480
|
default:
|
1453
1481
|
return;
|
1454
1482
|
}
|
1455
|
-
},
|
1483
|
+
}, zt = (t) => {
|
1456
1484
|
const e = {};
|
1457
1485
|
return t.forEach((n) => {
|
1458
|
-
if (
|
1459
|
-
const s =
|
1486
|
+
if (di.includes(n)) {
|
1487
|
+
const s = Xl(n);
|
1460
1488
|
s && (e[n] = s);
|
1461
1489
|
}
|
1462
1490
|
}), e;
|
1463
|
-
},
|
1464
|
-
class
|
1491
|
+
}, hi = () => ({}), Jl = () => ({}), Zl = (t) => (zt == null ? void 0 : zt(t)) || {}, Kt = { ...hi(), ...Jl() }, eu = (t) => ({ ...Zl(t) });
|
1492
|
+
class tu {
|
1465
1493
|
constructor(e, n, s) {
|
1466
1494
|
this.engine = e, this.errorHandler = n, this.logger = s, this.onError = this.onError.bind(this);
|
1467
1495
|
}
|
@@ -1469,14 +1497,14 @@ class eu {
|
|
1469
1497
|
* Orchestrate the plugin loading and registering
|
1470
1498
|
*/
|
1471
1499
|
init() {
|
1472
|
-
o.lifecycle.status.value = "pluginsLoading",
|
1500
|
+
o.lifecycle.status.value = "pluginsLoading", ut("pluginsCDNPath", o.lifecycle.pluginsCDNPath.value), this.setActivePlugins(), this.registerLocalPlugins(), this.registerRemotePlugins(), this.attachEffects();
|
1473
1501
|
}
|
1474
1502
|
/**
|
1475
1503
|
* Update state based on plugin loaded status
|
1476
1504
|
*/
|
1477
1505
|
// eslint-disable-next-line class-methods-use-this
|
1478
1506
|
attachEffects() {
|
1479
|
-
|
1507
|
+
ve(() => {
|
1480
1508
|
(o.plugins.activePlugins.value.length === 0 || o.plugins.loadedPlugins.value.length + o.plugins.failedPlugins.value.length === o.plugins.totalPluginsToLoad.value) && j(() => {
|
1481
1509
|
o.plugins.ready.value = !0, o.lifecycle.status.value = "pluginsReady";
|
1482
1510
|
});
|
@@ -1490,30 +1518,30 @@ class eu {
|
|
1490
1518
|
let e = o.plugins.pluginsToLoadFromConfig.value;
|
1491
1519
|
if (!e)
|
1492
1520
|
return [];
|
1493
|
-
e = e.filter((i) =>
|
1494
|
-
const n = [{ configurationStatus: () =>
|
1521
|
+
e = e.filter((i) => Kl.includes(i) ? (this.logger.warn(wa(gt, i)), !1) : !0);
|
1522
|
+
const n = [{ configurationStatus: () => C(o.dataPlaneEvents.eventsQueuePluginName.value), configurationStatusStr: "Data plane events delivery is enabled", activePluginName: o.dataPlaneEvents.eventsQueuePluginName.value, supportedPlugins: Object.values(xa), shouldAddMissingPlugins: !0 }, { configurationStatus: () => es(o.nativeDestinations.configuredDestinations.value).length > 0, configurationStatusStr: "Device mode destinations are connected to the source", supportedPlugins: ["DeviceModeDestinations", "NativeDestinationQueue"] }, { configurationStatus: () => es(o.nativeDestinations.configuredDestinations.value).some((i) => i.shouldApplyDeviceModeTransformation), configurationStatusStr: "Device mode transformations are enabled for at least one destination", supportedPlugins: ["DeviceModeTransformation"] }, { configurationStatus: () => C(o.consents.activeConsentManagerPluginName.value), configurationStatusStr: "Consent management is enabled", activePluginName: o.consents.activeConsentManagerPluginName.value, supportedPlugins: Object.values(an) }, { configurationStatus: () => C(o.storage.encryptionPluginName.value), configurationStatusStr: "Storage encryption is enabled", activePluginName: o.storage.encryptionPluginName.value, supportedPlugins: Object.values(Tt) }, { configurationStatus: () => o.storage.migrate.value, configurationStatusStr: "Storage migration is enabled", supportedPlugins: ["StorageMigrator"] }], s = !1;
|
1495
1523
|
return n.forEach((i) => {
|
1496
1524
|
i.configurationStatus() ? (e = e.filter(
|
1497
|
-
i.activePluginName ? (r) => !(r !== i.activePluginName && i.supportedPlugins.includes(r)) : (r) =>
|
1525
|
+
i.activePluginName ? (r) => !(r !== i.activePluginName && i.supportedPlugins.includes(r)) : (r) => C(r)
|
1498
1526
|
// pass through
|
1499
1527
|
), this.addMissingPlugins(i, s, e)) : e = e.filter(i.basePlugins !== void 0 ? (r) => !(i.basePlugins.includes(r) || i.supportedPlugins.includes(r)) : (r) => !i.supportedPlugins.includes(r));
|
1500
|
-
}), [...Object.keys(
|
1528
|
+
}), [...Object.keys(hi()), ...e];
|
1501
1529
|
}
|
1502
1530
|
addMissingPlugins(e, n, s) {
|
1503
1531
|
const i = e.shouldAddMissingPlugins || n;
|
1504
1532
|
let r;
|
1505
1533
|
e.activePluginName ? r = [...e.basePlugins || [], e.activePluginName] : r = [...e.supportedPlugins];
|
1506
1534
|
const a = r.filter((u) => !s.includes(u));
|
1507
|
-
a.length > 0 && (i && s.push(...a), this.logger.warn(
|
1535
|
+
a.length > 0 && (i && s.push(...a), this.logger.warn(Ma(gt, e.configurationStatusStr, a, i)));
|
1508
1536
|
}
|
1509
1537
|
/**
|
1510
1538
|
* Determine the list of plugins that should be activated
|
1511
1539
|
*/
|
1512
1540
|
setActivePlugins() {
|
1513
|
-
const e = this.getPluginsToLoadBasedOnConfig(), n = [...Object.keys(
|
1541
|
+
const e = this.getPluginsToLoadBasedOnConfig(), n = [...Object.keys(Kt), ...di], s = [], i = [];
|
1514
1542
|
e.forEach((r) => {
|
1515
1543
|
n.includes(r) ? s.push(r) : i.push(r);
|
1516
|
-
}), i.length > 0 && this.logger.warn(
|
1544
|
+
}), i.length > 0 && this.logger.warn(Ba(gt, i)), j(() => {
|
1517
1545
|
o.plugins.totalPluginsToLoad.value = e.length, o.plugins.activePlugins.value = s, o.plugins.failedPlugins.value = i;
|
1518
1546
|
});
|
1519
1547
|
}
|
@@ -1521,7 +1549,7 @@ class eu {
|
|
1521
1549
|
* Register plugins that are direct imports to PluginEngine
|
1522
1550
|
*/
|
1523
1551
|
registerLocalPlugins() {
|
1524
|
-
Object.values(
|
1552
|
+
Object.values(Kt).forEach((e) => {
|
1525
1553
|
S(e) && o.plugins.activePlugins.value.includes(e().name) && this.register([e()]);
|
1526
1554
|
});
|
1527
1555
|
}
|
@@ -1529,10 +1557,10 @@ class eu {
|
|
1529
1557
|
* Register plugins that are dynamic imports to PluginEngine
|
1530
1558
|
*/
|
1531
1559
|
registerRemotePlugins() {
|
1532
|
-
const e =
|
1560
|
+
const e = eu(o.plugins.activePlugins.value);
|
1533
1561
|
Promise.all(Object.keys(e).map(async (n) => {
|
1534
1562
|
await e[n]().then((s) => this.register([s.default()])).catch((s) => {
|
1535
|
-
o.plugins.failedPlugins.value = [...o.plugins.failedPlugins.value, n], this.onError(s, n);
|
1563
|
+
o.plugins.failedPlugins.value = [...o.plugins.failedPlugins.value, n], this.onError(s, `Failed to load plugin "${n}"`, s);
|
1536
1564
|
});
|
1537
1565
|
})).catch((n) => {
|
1538
1566
|
this.onError(n);
|
@@ -1566,71 +1594,71 @@ class eu {
|
|
1566
1594
|
try {
|
1567
1595
|
this.engine.register(n, o);
|
1568
1596
|
} catch (s) {
|
1569
|
-
o.plugins.failedPlugins.value = [...o.plugins.failedPlugins.value, n.name], this.onError(s);
|
1597
|
+
o.plugins.failedPlugins.value = [...o.plugins.failedPlugins.value, n.name], this.onError(s, `Failed to register plugin "${n.name}"`);
|
1570
1598
|
}
|
1571
1599
|
});
|
1572
1600
|
}
|
1573
1601
|
// TODO: Implement reset API instead
|
1574
1602
|
unregisterLocalPlugins() {
|
1575
|
-
Object.values(
|
1603
|
+
Object.values(Kt).forEach((e) => {
|
1576
1604
|
try {
|
1577
1605
|
this.engine.unregister(e().name);
|
1578
1606
|
} catch (n) {
|
1579
|
-
this.onError(n);
|
1607
|
+
this.onError(n, `Failed to unregister plugin "${e().name}"`);
|
1580
1608
|
}
|
1581
1609
|
});
|
1582
1610
|
}
|
1583
1611
|
/**
|
1584
1612
|
* Handle errors
|
1585
1613
|
*/
|
1586
|
-
onError(e, n) {
|
1587
|
-
this.errorHandler.onError(e,
|
1614
|
+
onError(e, n, s) {
|
1615
|
+
this.errorHandler.onError({ error: e, context: gt, customMessage: n, groupingHash: s });
|
1588
1616
|
}
|
1589
1617
|
}
|
1590
|
-
const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memoryStorage", we = "none",
|
1618
|
+
const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memoryStorage", we = "none", nu = "rl_user_id", su = "rl_trait", iu = "rl_anonymous_id", ru = "rl_group_id", ou = "rl_group_trait", au = "rl_page_init_referrer", lu = "rl_page_init_referring_domain", uu = "rl_session", cu = "rl_auth_token", Ve = { userId: nu, userTraits: su, anonymousId: iu, groupId: ru, groupTraits: ou, initialReferrer: au, initialReferringDomain: lu, sessionInfo: uu, authToken: cu }, du = "test_rudder_cookie", fu = "test_rudder_ls", hu = "test_rudder_ss", gu = "__tld__", gi = "clientDataInCookie", mi = "clientDataInLocalStorage", mu = "clientDataInMemory", pi = "clientDataInSessionStorage", vi = ["userId", "userTraits", "anonymousId", "groupId", "groupTraits", "initialReferrer", "initialReferringDomain", "sessionInfo", "authToken"], Fe = { [W]: gi, [X]: mi, [ce]: mu, [ee]: pi }, ts = (t, e) => {
|
1591
1619
|
try {
|
1592
1620
|
return encodeURIComponent(t);
|
1593
1621
|
} catch (n) {
|
1594
|
-
e == null || e.error(
|
1622
|
+
e == null || e.error(uo, n);
|
1595
1623
|
return;
|
1596
1624
|
}
|
1597
|
-
},
|
1625
|
+
}, ns = (t) => {
|
1598
1626
|
try {
|
1599
1627
|
return decodeURIComponent(t);
|
1600
1628
|
} catch {
|
1601
1629
|
return;
|
1602
1630
|
}
|
1603
|
-
},
|
1631
|
+
}, pu = (t) => {
|
1604
1632
|
const e = {}, n = t.split(/\s*;\s*/);
|
1605
1633
|
let s;
|
1606
1634
|
return n[0] && n.forEach((i) => {
|
1607
1635
|
s = i.split("=");
|
1608
|
-
const r = s[0] ?
|
1609
|
-
r && (e[r] = s[1] ?
|
1636
|
+
const r = s[0] ? ns(s[0]) : void 0;
|
1637
|
+
r && (e[r] = s[1] ? ns(s[1]) : void 0);
|
1610
1638
|
}), e;
|
1611
|
-
},
|
1639
|
+
}, vu = (t, e, n, s) => {
|
1612
1640
|
const i = { ...n || {} };
|
1613
|
-
let r = `${
|
1641
|
+
let r = `${ts(t, s)}=${ts(e, s)}`;
|
1614
1642
|
ne(e) && (i.maxage = -1), i.maxage && (i.expires = new Date(+/* @__PURE__ */ new Date() + i.maxage)), i.path && (r += `; path=${i.path}`), i.domain && (r += `; domain=${i.domain}`), i.expires && (r += `; expires=${i.expires.toUTCString()}`), i.samesite && (r += `; samesite=${i.samesite}`), i.secure && (r += "; secure"), globalThis.document.cookie = r;
|
1615
|
-
},
|
1643
|
+
}, ln = () => {
|
1616
1644
|
const t = globalThis.document.cookie;
|
1617
|
-
return
|
1618
|
-
},
|
1645
|
+
return pu(t);
|
1646
|
+
}, yu = (t) => ln()[t], Se = function(t, e, n, s) {
|
1619
1647
|
switch (arguments.length) {
|
1620
1648
|
case 4:
|
1621
1649
|
case 3:
|
1622
1650
|
case 2:
|
1623
|
-
return
|
1651
|
+
return vu(t, e, n, s);
|
1624
1652
|
case 1:
|
1625
|
-
return t ?
|
1653
|
+
return t ? yu(t) : ln();
|
1626
1654
|
default:
|
1627
|
-
return
|
1655
|
+
return ln();
|
1628
1656
|
}
|
1629
|
-
},
|
1657
|
+
}, bu = (t) => {
|
1630
1658
|
const e = document.createElement("a");
|
1631
1659
|
return e.href = t, e.hostname;
|
1632
|
-
},
|
1633
|
-
const e = typeof globalThis.URL != "function" ?
|
1660
|
+
}, Eu = (t) => {
|
1661
|
+
const e = typeof globalThis.URL != "function" ? bu(t) : new URL(t).hostname, n = (e == null ? void 0 : e.split(".")) ?? [], s = n[n.length - 1], i = [];
|
1634
1662
|
if (n.length === 4 && s && s === parseInt(s, 10).toString())
|
1635
1663
|
return i;
|
1636
1664
|
if (n.length <= 1)
|
@@ -1638,27 +1666,27 @@ const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memo
|
|
1638
1666
|
for (let r = n.length - 2; r >= 0; r -= 1)
|
1639
1667
|
i.push(n.slice(r).join("."));
|
1640
1668
|
return i;
|
1641
|
-
},
|
1642
|
-
const e =
|
1669
|
+
}, Su = (t) => {
|
1670
|
+
const e = Eu(t);
|
1643
1671
|
for (let n = 0; n < e.length; n += 1) {
|
1644
|
-
const s = e[n], i =
|
1672
|
+
const s = e[n], i = gu, r = { domain: `${s.indexOf("localhost") !== -1 ? "" : "."}${s}` };
|
1645
1673
|
if (Se(i, 1, r), Se(i))
|
1646
1674
|
return Se(i, null, r), s;
|
1647
1675
|
}
|
1648
1676
|
return "";
|
1649
|
-
},
|
1650
|
-
const t = `.${
|
1651
|
-
return { maxage:
|
1652
|
-
},
|
1653
|
-
class
|
1677
|
+
}, ku = () => {
|
1678
|
+
const t = `.${Su(globalThis.location.href)}`;
|
1679
|
+
return { maxage: ko, path: "/", domain: !t || t === "." ? void 0 : t, samesite: "Lax", enabled: !0 };
|
1680
|
+
}, Ru = () => ({ enabled: !0 }), Tu = () => ({ enabled: !0 }), Iu = () => ({ enabled: !0 });
|
1681
|
+
class Ou {
|
1654
1682
|
constructor(e) {
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1683
|
+
N(this, "isEnabled", !0);
|
1684
|
+
N(this, "length", 0);
|
1685
|
+
N(this, "data", {});
|
1658
1686
|
this.options = Iu(), this.logger = e;
|
1659
1687
|
}
|
1660
1688
|
configure(e) {
|
1661
|
-
return this.options =
|
1689
|
+
return this.options = x(this.options, e ?? {}), this.isEnabled = !!this.options.enabled, this.options;
|
1662
1690
|
}
|
1663
1691
|
setItem(e, n) {
|
1664
1692
|
return this.data[e] = n, this.length = Object.keys(this.data).length, n;
|
@@ -1679,13 +1707,13 @@ class Tu {
|
|
1679
1707
|
return Object.keys(this.data);
|
1680
1708
|
}
|
1681
1709
|
}
|
1682
|
-
const
|
1683
|
-
var
|
1684
|
-
function
|
1685
|
-
return
|
1710
|
+
const Mt = new Ou(ye);
|
1711
|
+
var Dt = { exports: {} }, Au = Dt.exports, ss;
|
1712
|
+
function Du() {
|
1713
|
+
return ss || (ss = 1, function(t, e) {
|
1686
1714
|
(function(n, s) {
|
1687
1715
|
t.exports = s();
|
1688
|
-
})(
|
1716
|
+
})(Au, function() {
|
1689
1717
|
function n(g) {
|
1690
1718
|
return g = JSON.stringify(g), !!/^\{[\s\S]*\}$/.test(g);
|
1691
1719
|
}
|
@@ -1712,8 +1740,8 @@ function Au() {
|
|
1712
1740
|
g || (g = window.localStorage), g.setItem(f, m), g.removeItem(f);
|
1713
1741
|
} catch {
|
1714
1742
|
var v = {};
|
1715
|
-
v._data = {}, v.setItem = function(E,
|
1716
|
-
return v._data[E] = String(
|
1743
|
+
v._data = {}, v.setItem = function(E, P) {
|
1744
|
+
return v._data[E] = String(P);
|
1717
1745
|
}, v.getItem = function(E) {
|
1718
1746
|
return v._data.hasOwnProperty(E) ? v._data[E] : void 0;
|
1719
1747
|
}, v.removeItem = function(E) {
|
@@ -1740,15 +1768,15 @@ function Au() {
|
|
1740
1768
|
}, get: function(f) {
|
1741
1769
|
if (f === void 0) {
|
1742
1770
|
var m = {};
|
1743
|
-
return this.forEach(function(
|
1744
|
-
return m[
|
1771
|
+
return this.forEach(function(H, J) {
|
1772
|
+
return m[H] = J;
|
1745
1773
|
}), m;
|
1746
1774
|
}
|
1747
1775
|
if (f.charAt(0) === "?")
|
1748
1776
|
return this.has(f.substr(1));
|
1749
1777
|
var v = arguments;
|
1750
1778
|
if (v.length > 1) {
|
1751
|
-
for (var k = {}, E = 0,
|
1779
|
+
for (var k = {}, E = 0, P = v.length; E < P; E++) {
|
1752
1780
|
var z = i(l.getItem(v[E]));
|
1753
1781
|
this.has(v[E]) && (k[v[E]] = z);
|
1754
1782
|
}
|
@@ -1801,10 +1829,10 @@ function Au() {
|
|
1801
1829
|
for (var y in c.prototype) h[y] = c.prototype[y];
|
1802
1830
|
return h;
|
1803
1831
|
});
|
1804
|
-
}(
|
1832
|
+
}(Dt)), Dt.exports;
|
1805
1833
|
}
|
1806
|
-
var
|
1807
|
-
const Ae = /* @__PURE__ */
|
1834
|
+
var Cu = Du();
|
1835
|
+
const Ae = /* @__PURE__ */ oi(Cu), _u = (t) => {
|
1808
1836
|
const e = new URL(o.lifecycle.sourceConfigUrl.value), n = `${e.origin}${e.pathname}?view=ad`;
|
1809
1837
|
t.getAsyncData({ url: n, options: {
|
1810
1838
|
// We actually don't need the response from the request, so we are using HEAD
|
@@ -1814,17 +1842,17 @@ const Ae = /* @__PURE__ */ si(Du), Cu = (t) => {
|
|
1814
1842
|
var r;
|
1815
1843
|
o.capabilities.isAdBlocked.value = (i == null ? void 0 : i.error) !== void 0 || ((r = i == null ? void 0 : i.xhr) == null ? void 0 : r.responseURL) !== n;
|
1816
1844
|
} });
|
1817
|
-
},
|
1845
|
+
}, Pu = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues), is = () => !le(globalThis.navigator.userAgentData), Nu = () => !le(globalThis.navigator.sendBeacon) && S(globalThis.navigator.sendBeacon), Lu = () => !!globalThis.navigator.userAgent.match(/Trident.*rv:11\./), wu = (t, e = "none") => {
|
1818
1846
|
var n;
|
1819
1847
|
e === "none" && t(void 0), e === "default" && t(navigator.userAgentData), e === "full" && ((n = navigator.userAgentData) == null || n.getHighEntropyValues(["architecture", "bitness", "brands", "mobile", "model", "platform", "platformVersion", "uaFullVersion", "fullVersionList", "wow64"]).then((s) => {
|
1820
1848
|
t(s);
|
1821
1849
|
}).catch(() => {
|
1822
1850
|
t();
|
1823
1851
|
}));
|
1824
|
-
},
|
1852
|
+
}, Mu = () => {
|
1825
1853
|
const t = globalThis.document.createElement("div");
|
1826
1854
|
return t.setAttribute("data-a-b", "c"), t.dataset ? t.dataset.aB === "c" : !1;
|
1827
|
-
},
|
1855
|
+
}, un = {
|
1828
1856
|
// Ideally, we should separate the checks for URL and URLSearchParams but
|
1829
1857
|
// the polyfill service serves them under the same feature name, "URL".
|
1830
1858
|
URL: () => !S(globalThis.URL) || !S(globalThis.URLSearchParams),
|
@@ -1843,7 +1871,7 @@ const Ae = /* @__PURE__ */ si(Du), Cu = (t) => {
|
|
1843
1871
|
"Object.values": () => !S(globalThis.Object.values),
|
1844
1872
|
"Object.assign": () => !S(globalThis.Object.assign),
|
1845
1873
|
"Object.fromEntries": () => !S(globalThis.Object.fromEntries),
|
1846
|
-
"Element.prototype.dataset": () => !
|
1874
|
+
"Element.prototype.dataset": () => !Mu(),
|
1847
1875
|
// Ideally, we should separate the checks for TextEncoder and TextDecoder but
|
1848
1876
|
// the polyfill service serves them under the same feature name, "TextEncoder".
|
1849
1877
|
TextEncoder: () => !S(globalThis.TextEncoder) || !S(globalThis.TextDecoder),
|
@@ -1854,39 +1882,39 @@ const Ae = /* @__PURE__ */ si(Du), Cu = (t) => {
|
|
1854
1882
|
ArrayBuffer: () => !S(globalThis.Uint8Array),
|
1855
1883
|
Set: () => !S(globalThis.Set),
|
1856
1884
|
atob: () => !S(globalThis.atob)
|
1857
|
-
},
|
1858
|
-
const t = Object.keys(
|
1885
|
+
}, $u = () => {
|
1886
|
+
const t = Object.keys(un);
|
1859
1887
|
let e = !1;
|
1860
1888
|
for (let n = 0; n < t.length; n++) {
|
1861
|
-
const s =
|
1889
|
+
const s = un[t[n]];
|
1862
1890
|
if (S(s) && s()) {
|
1863
1891
|
e = !0;
|
1864
1892
|
break;
|
1865
1893
|
}
|
1866
1894
|
}
|
1867
1895
|
return e;
|
1868
|
-
},
|
1896
|
+
}, rs = () => {
|
1869
1897
|
let t = { density: 0, width: 0, height: 0, innerWidth: 0, innerHeight: 0 };
|
1870
1898
|
return t = { width: globalThis.screen.width, height: globalThis.screen.height, density: globalThis.devicePixelRatio, innerWidth: globalThis.innerWidth, innerHeight: globalThis.innerHeight }, t;
|
1871
|
-
},
|
1899
|
+
}, yi = (t) => {
|
1872
1900
|
const e = ["QuotaExceededError", "NS_ERROR_DOM_QUOTA_REACHED"], n = [22, 1014], s = e.includes(t.name) || n.includes(t.code);
|
1873
1901
|
return t instanceof DOMException && s;
|
1874
1902
|
}, Ge = (t = X, e, n) => {
|
1875
1903
|
let s, i;
|
1876
|
-
const r =
|
1904
|
+
const r = ia(nn, t);
|
1877
1905
|
let a = "unavailable", u = !0, l;
|
1878
1906
|
try {
|
1879
1907
|
switch (t) {
|
1880
1908
|
case ce:
|
1881
1909
|
return !0;
|
1882
1910
|
case W:
|
1883
|
-
s = e, i =
|
1911
|
+
s = e, i = du;
|
1884
1912
|
break;
|
1885
1913
|
case X:
|
1886
|
-
s = e ?? globalThis.localStorage, i =
|
1914
|
+
s = e ?? globalThis.localStorage, i = fu;
|
1887
1915
|
break;
|
1888
1916
|
case ee:
|
1889
|
-
s = e ?? globalThis.sessionStorage, i =
|
1917
|
+
s = e ?? globalThis.sessionStorage, i = hu;
|
1890
1918
|
break;
|
1891
1919
|
default:
|
1892
1920
|
return !1;
|
@@ -1895,19 +1923,19 @@ const Ae = /* @__PURE__ */ si(Du), Cu = (t) => {
|
|
1895
1923
|
return s.removeItem(i), !0;
|
1896
1924
|
u = !1;
|
1897
1925
|
} catch (c) {
|
1898
|
-
u = !1, l = c,
|
1926
|
+
u = !1, l = c, yi(c) && (a = "full");
|
1899
1927
|
}
|
1900
1928
|
return u || n == null || n.warn(`${r}${a}.`, l), !1;
|
1901
1929
|
};
|
1902
|
-
class
|
1930
|
+
class Uu {
|
1903
1931
|
constructor(e) {
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
this.options =
|
1932
|
+
N(this, "isSupportAvailable", !0);
|
1933
|
+
N(this, "isEnabled", !0);
|
1934
|
+
N(this, "length", 0);
|
1935
|
+
this.options = Ru(), this.logger = e;
|
1908
1936
|
}
|
1909
1937
|
configure(e) {
|
1910
|
-
return this.options =
|
1938
|
+
return this.options = x(this.options, e ?? {}), this.isSupportAvailable = Ge(X), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
1911
1939
|
}
|
1912
1940
|
setItem(e, n) {
|
1913
1941
|
Ae.set(e, n), this.length = Ae.len();
|
@@ -1931,16 +1959,16 @@ class $u {
|
|
1931
1959
|
return Ae.keys();
|
1932
1960
|
}
|
1933
1961
|
}
|
1934
|
-
const
|
1935
|
-
class
|
1962
|
+
const In = new Uu(ye);
|
1963
|
+
class Bu {
|
1936
1964
|
constructor(e) {
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
this.options =
|
1965
|
+
N(this, "isSupportAvailable", !0);
|
1966
|
+
N(this, "isEnabled", !0);
|
1967
|
+
N(this, "length", 0);
|
1968
|
+
this.options = Tu(), this.logger = e;
|
1941
1969
|
}
|
1942
1970
|
configure(e) {
|
1943
|
-
return this.options =
|
1971
|
+
return this.options = x(this.options, e ?? {}), this.isSupportAvailable = Ge(ee), this.isSupportAvailable && (this.store = globalThis.sessionStorage), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
1944
1972
|
}
|
1945
1973
|
setItem(e, n) {
|
1946
1974
|
this.store && (this.store.setItem(e, n), this.length = this.store.length);
|
@@ -1973,16 +2001,16 @@ class Uu {
|
|
1973
2001
|
return e;
|
1974
2002
|
}
|
1975
2003
|
}
|
1976
|
-
const On = new
|
1977
|
-
class
|
2004
|
+
const On = new Bu(ye);
|
2005
|
+
class Vu {
|
1978
2006
|
constructor(e) {
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
2007
|
+
N(this, "isSupportAvailable", !0);
|
2008
|
+
N(this, "isEnabled", !0);
|
2009
|
+
N(this, "length", 0);
|
1982
2010
|
this.logger = e;
|
1983
2011
|
}
|
1984
2012
|
configure(e) {
|
1985
|
-
return this.options || (this.options =
|
2013
|
+
return this.options || (this.options = ku()), this.options = x(this.options, e ?? {}), this.options.sameDomainCookiesOnly && delete this.options.domain, this.isSupportAvailable = Ge(W, this), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
1986
2014
|
}
|
1987
2015
|
setItem(e, n) {
|
1988
2016
|
return Se(e, n, this.options, this.logger), this.length = Object.keys(Se()).length, !0;
|
@@ -2007,32 +2035,32 @@ class Bu {
|
|
2007
2035
|
return Object.keys(Se());
|
2008
2036
|
}
|
2009
2037
|
}
|
2010
|
-
const An = new
|
2038
|
+
const An = new Vu(ye), ie = (t) => {
|
2011
2039
|
switch (t) {
|
2012
2040
|
case X:
|
2013
|
-
return
|
2041
|
+
return In;
|
2014
2042
|
case ee:
|
2015
2043
|
return On;
|
2016
2044
|
case ce:
|
2017
|
-
return
|
2045
|
+
return Mt;
|
2018
2046
|
case W:
|
2019
2047
|
return An;
|
2020
2048
|
default:
|
2021
|
-
return
|
2049
|
+
return Mt;
|
2022
2050
|
}
|
2023
|
-
},
|
2051
|
+
}, Fu = (t) => {
|
2024
2052
|
const e = An.configure(t);
|
2025
2053
|
o.storage.cookie.value = { maxage: e.maxage, path: e.path, domain: e.domain, samesite: e.samesite, expires: e.expires, secure: e.secure };
|
2026
|
-
}, Fu = (t) => {
|
2027
|
-
Tn.configure(t);
|
2028
|
-
}, Hu = (t) => {
|
2029
|
-
$t.configure(t);
|
2030
2054
|
}, xu = (t) => {
|
2055
|
+
In.configure(t);
|
2056
|
+
}, Hu = (t) => {
|
2057
|
+
Mt.configure(t);
|
2058
|
+
}, Gu = (t) => {
|
2031
2059
|
On.configure(t);
|
2032
|
-
},
|
2033
|
-
|
2060
|
+
}, ju = (t = {}, e = {}, n = {}, s = {}) => {
|
2061
|
+
Fu(t), xu(e), Hu(n), Gu(s);
|
2034
2062
|
};
|
2035
|
-
class
|
2063
|
+
class qu {
|
2036
2064
|
constructor(e, n, s) {
|
2037
2065
|
this.id = e.id, this.name = e.name, this.isEncrypted = e.isEncrypted ?? !1, this.validKeys = e.validKeys ?? {}, this.engine = n, this.noKeyValidation = Object.keys(this.validKeys).length === 0, this.noCompoundKey = e.noCompoundKey, this.originalEngine = this.engine, this.errorHandler = e.errorHandler, this.logger = e.logger, this.pluginsManager = s;
|
2038
2066
|
}
|
@@ -2067,7 +2095,12 @@ class ju {
|
|
2067
2095
|
try {
|
2068
2096
|
this.engine.setItem(s, this.encrypt(de(n, !1, [], this.logger)));
|
2069
2097
|
} catch (i) {
|
2070
|
-
|
2098
|
+
if (yi(i))
|
2099
|
+
this.logger.warn(Aa(`Store ${this.id}`)), this.swapQueueStoreToInMemoryEngine(), this.set(e, n);
|
2100
|
+
else {
|
2101
|
+
const r = ca(e);
|
2102
|
+
this.onError(i, r, r);
|
2103
|
+
}
|
2071
2104
|
}
|
2072
2105
|
}
|
2073
2106
|
/**
|
@@ -2077,9 +2110,10 @@ class ju {
|
|
2077
2110
|
const n = this.createValidKey(e);
|
2078
2111
|
let s;
|
2079
2112
|
try {
|
2080
|
-
return !n || (s = this.decrypt(this.engine.getItem(n)), le(s)) ? null : JSON.parse(s);
|
2113
|
+
return !n || (s = this.decrypt(this.engine.getItem(n)), le(s) || s === "") ? null : JSON.parse(s);
|
2081
2114
|
} catch (i) {
|
2082
|
-
|
2115
|
+
const r = da(e);
|
2116
|
+
return this.onError(i, r, r), null;
|
2083
2117
|
}
|
2084
2118
|
}
|
2085
2119
|
/**
|
@@ -2111,7 +2145,7 @@ class ju {
|
|
2111
2145
|
* Extension point to use with encryption plugins
|
2112
2146
|
*/
|
2113
2147
|
crypto(e, n) {
|
2114
|
-
if (!this.isEncrypted || !e || typeof e != "string" ||
|
2148
|
+
if (!this.isEncrypted || !e || typeof e != "string" || zr(e) === "")
|
2115
2149
|
return e;
|
2116
2150
|
const i = `storage.${n}`, r = this.pluginsManager ? this.pluginsManager.invokeSingle(i, e) : e;
|
2117
2151
|
return typeof r > "u" ? e : r ?? "";
|
@@ -2119,11 +2153,11 @@ class ju {
|
|
2119
2153
|
/**
|
2120
2154
|
* Handle errors
|
2121
2155
|
*/
|
2122
|
-
onError(e) {
|
2123
|
-
this.errorHandler.onError(e, `Store ${this.id}
|
2156
|
+
onError(e, n, s) {
|
2157
|
+
this.errorHandler.onError({ error: e, context: `Store ${this.id}`, customMessage: n, groupingHash: s });
|
2124
2158
|
}
|
2125
2159
|
}
|
2126
|
-
const
|
2160
|
+
const zu = (t, e) => {
|
2127
2161
|
var s;
|
2128
2162
|
let n;
|
2129
2163
|
if (t.consents.preConsent.value.enabled)
|
@@ -2140,10 +2174,10 @@ const qu = (t, e) => {
|
|
2140
2174
|
}
|
2141
2175
|
return n;
|
2142
2176
|
};
|
2143
|
-
class
|
2177
|
+
class Ku {
|
2144
2178
|
constructor(e, n, s) {
|
2145
|
-
|
2146
|
-
|
2179
|
+
N(this, "stores", {});
|
2180
|
+
N(this, "isInitialized", !1);
|
2147
2181
|
this.errorHandler = n, this.logger = s, this.pluginsManager = e;
|
2148
2182
|
}
|
2149
2183
|
/**
|
@@ -2154,7 +2188,7 @@ class zu {
|
|
2154
2188
|
if (this.isInitialized)
|
2155
2189
|
return;
|
2156
2190
|
const e = o.loadOptions.value, n = { cookieStorageOptions: { samesite: e.sameSiteCookie, secure: e.secureCookie, domain: e.setCookieDomain, sameDomainCookiesOnly: e.sameDomainCookiesOnly }, localStorageOptions: {}, inMemoryStorageOptions: {}, sessionStorageOptions: {} };
|
2157
|
-
|
2191
|
+
ju(tt(x(n.cookieStorageOptions ?? {}, ((s = o.storage.cookie) == null ? void 0 : s.value) ?? {})), tt(n.localStorageOptions), tt(n.inMemoryStorageOptions), tt(n.sessionStorageOptions)), this.initClientDataStores(), this.isInitialized = !0;
|
2158
2192
|
}
|
2159
2193
|
/**
|
2160
2194
|
* Create store to persist data used by the SDK like session, used details etc
|
@@ -2169,11 +2203,11 @@ class zu {
|
|
2169
2203
|
var a;
|
2170
2204
|
let e = o.storage.type.value, n = (a = o.loadOptions.value.storage) == null ? void 0 : a.entries;
|
2171
2205
|
const s = o.consents.postConsent.value.storage;
|
2172
|
-
(
|
2206
|
+
(C(s == null ? void 0 : s.type) || C(s == null ? void 0 : s.entries)) && (e = s == null ? void 0 : s.type, n = s == null ? void 0 : s.entries);
|
2173
2207
|
let i = !0, r = {};
|
2174
|
-
|
2208
|
+
vi.forEach((u) => {
|
2175
2209
|
var f;
|
2176
|
-
const l = u, c = u, d = (f = n == null ? void 0 : n[l]) == null ? void 0 : f.type, y =
|
2210
|
+
const l = u, c = u, d = (f = n == null ? void 0 : n[l]) == null ? void 0 : f.type, y = zu(o, u) ?? d ?? e ?? on, g = this.getResolvedStorageTypeForEntry(y, u);
|
2177
2211
|
g !== we && (i = !1), r = { ...r, [u]: { type: g, key: Ve[c] } };
|
2178
2212
|
}), j(() => {
|
2179
2213
|
o.storage.type.value = e, o.storage.entries.value = r, o.storage.trulyAnonymousTracking.value = i;
|
@@ -2197,14 +2231,14 @@ class zu {
|
|
2197
2231
|
(a = ie(W)) != null && a.isEnabled ? s = W : (u = ie(X)) != null && u.isEnabled ? s = X : (l = ie(ee)) != null && l.isEnabled ? s = ee : s = ce;
|
2198
2232
|
break;
|
2199
2233
|
}
|
2200
|
-
return s !== e && this.logger.warn(
|
2234
|
+
return s !== e && this.logger.warn(Da(Wr, n, e, s)), s;
|
2201
2235
|
}
|
2202
2236
|
/**
|
2203
2237
|
* Create a new store
|
2204
2238
|
*/
|
2205
2239
|
setStore(e) {
|
2206
2240
|
const n = ie(e.type);
|
2207
|
-
return this.stores[e.id] = new
|
2241
|
+
return this.stores[e.id] = new qu(e, n, this.pluginsManager), this.stores[e.id];
|
2208
2242
|
}
|
2209
2243
|
/**
|
2210
2244
|
* Retrieve a store
|
@@ -2213,31 +2247,26 @@ class zu {
|
|
2213
2247
|
return this.stores[e];
|
2214
2248
|
}
|
2215
2249
|
}
|
2216
|
-
const
|
2250
|
+
const Yu = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config) && Array.isArray(t.source.destinations), Wu = (t) => typeof t == "string" && Zs.includes(t), bi = (t) => {
|
2217
2251
|
const e = new URL(t), { host: n, protocol: s } = e, i = n.split(".");
|
2218
2252
|
let r;
|
2219
2253
|
return i.length > 2 ? r = `${i[i.length - 2]}.${i[i.length - 1]}` : r = n, { topDomain: r, protocol: s };
|
2220
|
-
},
|
2221
|
-
const { topDomain: e, protocol: n } =
|
2254
|
+
}, Qu = (t) => {
|
2255
|
+
const { topDomain: e, protocol: n } = bi(t);
|
2222
2256
|
return `${n}//${e}`;
|
2223
|
-
},
|
2224
|
-
const n = e ? window.location.origin :
|
2257
|
+
}, Xu = (t, e) => {
|
2258
|
+
const n = e ? window.location.origin : Qu(window.location.href), s = t.startsWith("/") ? t.substring(1) : t;
|
2225
2259
|
return `${n}/${s}`;
|
2226
|
-
}, Xu = (t) => {
|
2227
|
-
const { topDomain: e } = mi(window.location.href);
|
2228
|
-
return e === t;
|
2229
2260
|
}, Ju = (t) => {
|
2230
|
-
const e =
|
2231
|
-
return
|
2232
|
-
|
2233
|
-
}), e;
|
2234
|
-
}, ze = (t) => t != null && t.endsWith("/") ? ze(t.substring(0, t.length - 1)) : t, dn = (t) => {
|
2261
|
+
const { topDomain: e } = bi(window.location.href);
|
2262
|
+
return e === t;
|
2263
|
+
}, ze = (t) => t != null && t.endsWith("/") ? ze(t.substring(0, t.length - 1)) : t, cn = (t) => {
|
2235
2264
|
try {
|
2236
2265
|
return new URL(t).host;
|
2237
2266
|
} catch {
|
2238
2267
|
return null;
|
2239
2268
|
}
|
2240
|
-
},
|
2269
|
+
}, Ei = (t) => cn(t) ?? "", Zu = (t) => {
|
2241
2270
|
const e = {};
|
2242
2271
|
try {
|
2243
2272
|
const n = new URL(t), s = "utm_";
|
@@ -2259,17 +2288,17 @@ const Ku = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2259
2288
|
}
|
2260
2289
|
return e;
|
2261
2290
|
}, tc = (t) => t.replace(/\/{2,}/g, "/"), Ke = (t) => {
|
2262
|
-
if (!
|
2291
|
+
if (!U(t))
|
2263
2292
|
return !1;
|
2264
2293
|
try {
|
2265
|
-
return S(globalThis.URL) && new URL(t),
|
2294
|
+
return S(globalThis.URL) && new URL(t), Va.test(t);
|
2266
2295
|
} catch {
|
2267
2296
|
return !1;
|
2268
2297
|
}
|
2269
2298
|
}, nc = () => {
|
2270
2299
|
var t, e;
|
2271
2300
|
return !!((e = (t = window.chrome) == null ? void 0 : t.runtime) != null && e.id);
|
2272
|
-
},
|
2301
|
+
}, Yt = "none", Wt = "immediate", sc = (t) => {
|
2273
2302
|
var e, n;
|
2274
2303
|
return ((n = (e = t == null ? void 0 : t.statsCollection) == null ? void 0 : e.errors) == null ? void 0 : n.enabled) === !0;
|
2275
2304
|
}, ic = (t) => {
|
@@ -2278,17 +2307,17 @@ const Ku = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2278
2307
|
}, rc = (t) => {
|
2279
2308
|
const e = { sendPageEvent: !1, trackConsent: !1, discardPreConsentEvents: !1 };
|
2280
2309
|
if (w(t)) {
|
2281
|
-
const n =
|
2282
|
-
e.storage = n.storage,
|
2310
|
+
const n = I(t);
|
2311
|
+
e.storage = n.storage, Te(n.integrations) && (e.integrations = n.integrations), e.discardPreConsentEvents = n.discardPreConsentEvents === !0, e.sendPageEvent = n.sendPageEvent === !0, e.trackConsent = n.trackConsent === !0, Te(n.consentManagement) && (e.consentManagement = x(n.consentManagement, { enabled: o.consents.enabled.value }));
|
2283
2312
|
}
|
2284
2313
|
return e;
|
2285
|
-
},
|
2314
|
+
}, os = (t) => Te(t) || Array.isArray(t), oc = (t, e) => {
|
2286
2315
|
let { provider: n } = t;
|
2287
|
-
const s = n ?
|
2288
|
-
return n && !s && (e.error(
|
2289
|
-
},
|
2316
|
+
const s = n ? an[n] : void 0;
|
2317
|
+
return n && !s && (e.error(Wo(te, n, an)), n = void 0), { provider: n, consentManagerPluginName: s };
|
2318
|
+
}, Si = (t, e) => {
|
2290
2319
|
let n, s = [], i = [], r = !1, a, u = (t == null ? void 0 : t.enabled) === !0;
|
2291
|
-
|
2320
|
+
Te(t) && u && ({ provider: a, consentManagerPluginName: n } = oc(t, e), os(t.allowedConsentIds) && (s = t.allowedConsentIds, r = !0), os(t.deniedConsentIds) && (i = t.deniedConsentIds, r = !0));
|
2292
2321
|
const l = { allowedConsentIds: s, deniedConsentIds: i };
|
2293
2322
|
return u = u && !!n, { provider: a, consentManagerPluginName: n, initialized: r, enabled: u, consentsData: l };
|
2294
2323
|
}, ac = () => {
|
@@ -2308,11 +2337,11 @@ const Ku = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2308
2337
|
let a = s == null ? void 0 : s.cookie, u = !1, l;
|
2309
2338
|
if (e) {
|
2310
2339
|
u = e;
|
2311
|
-
const c = a.domain ?? i, d =
|
2340
|
+
const c = a.domain ?? i, d = C(c) && !Ju(Pn(c)) || r, h = Xu(n ?? Ha, d);
|
2312
2341
|
if (Ke(h)) {
|
2313
2342
|
l = ze(h);
|
2314
|
-
const y =
|
2315
|
-
y !== g && (a = { ...a, samesite: "None", secure: !0 }), !r && d && g !== Pn(c) && (u = !1, t.warn(
|
2343
|
+
const y = cn(window.location.href), g = cn(h);
|
2344
|
+
y !== g && (a = { ...a, samesite: "None", secure: !0 }), !r && d && g !== Pn(c) && (u = !1, t.warn(va(te, c, g)));
|
2316
2345
|
} else
|
2317
2346
|
u = !1;
|
2318
2347
|
}
|
@@ -2321,25 +2350,25 @@ const Ku = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2321
2350
|
var d;
|
2322
2351
|
const { storage: e } = o.loadOptions.value;
|
2323
2352
|
let n = e == null ? void 0 : e.type;
|
2324
|
-
|
2353
|
+
C(n) && !Wu(n) && (t.warn(ga(te, n, on)), n = on);
|
2325
2354
|
let s = (d = e == null ? void 0 : e.encryption) == null ? void 0 : d.version;
|
2326
2355
|
const i = s && Tt[s];
|
2327
|
-
!G(s) && G(i) ? (t.warn(
|
2356
|
+
!G(s) && G(i) ? (t.warn(ma(te, s, Tt, Ce)), s = Ce) : G(s) && (s = Ce);
|
2328
2357
|
const r = e == null ? void 0 : e.migrate, a = r && s === Ce;
|
2329
|
-
r === !0 && a !== r && t.warn(
|
2358
|
+
r === !0 && a !== r && t.warn(pa(te, s, Ce));
|
2330
2359
|
const { sscEnabled: u, finalDataServiceUrl: l, cookieOptions: c } = uc(t);
|
2331
2360
|
j(() => {
|
2332
2361
|
o.storage.type.value = n, o.storage.cookie.value = c, o.serverCookies.isEnabledServerSideCookies.value = u, o.serverCookies.dataServiceUrl.value = l, o.storage.encryptionPluginName.value = Tt[s], o.storage.migrate.value = a;
|
2333
2362
|
});
|
2334
2363
|
}, dc = (t) => {
|
2335
2364
|
var h, y, g, f;
|
2336
|
-
const { provider: e, consentManagerPluginName: n, initialized: s, enabled: i, consentsData: r } =
|
2337
|
-
let u = ((h = a == null ? void 0 : a.storage) == null ? void 0 : h.strategy) ??
|
2365
|
+
const { provider: e, consentManagerPluginName: n, initialized: s, enabled: i, consentsData: r } = Si(o.loadOptions.value.consentManagement, t), a = o.loadOptions.value.preConsent;
|
2366
|
+
let u = ((h = a == null ? void 0 : a.storage) == null ? void 0 : h.strategy) ?? Yt;
|
2338
2367
|
const l = ["none", "session", "anonymousId"];
|
2339
|
-
|
2340
|
-
let c = ((g = a == null ? void 0 : a.events) == null ? void 0 : g.delivery) ??
|
2368
|
+
C(u) && !l.includes(u) && (u = Yt, t.warn(Na(te, (y = a == null ? void 0 : a.storage) == null ? void 0 : y.strategy, Yt)));
|
2369
|
+
let c = ((g = a == null ? void 0 : a.events) == null ? void 0 : g.delivery) ?? Wt;
|
2341
2370
|
const d = ["immediate", "buffer"];
|
2342
|
-
|
2371
|
+
C(c) && !d.includes(c) && (c = Wt, t.warn(La(te, (f = a == null ? void 0 : a.events) == null ? void 0 : f.delivery, Wt))), j(() => {
|
2343
2372
|
var m;
|
2344
2373
|
o.consents.activeConsentManagerPluginName.value = n, o.consents.initialized.value = s, o.consents.enabled.value = i, o.consents.data.value = r, o.consents.provider.value = e, o.consents.preConsent.value = {
|
2345
2374
|
// Only enable pre-consent if it is explicitly enabled and
|
@@ -2354,45 +2383,45 @@ const Ku = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2354
2383
|
var s;
|
2355
2384
|
let e = o.consents.resolutionStrategy.value, n;
|
2356
2385
|
w(t.consentManagementMetadata) && (o.consents.provider.value && (e = ((s = t.consentManagementMetadata.providers.find((i) => i.provider === o.consents.provider.value)) == null ? void 0 : s.resolutionStrategy) ?? o.consents.resolutionStrategy.value), n = t.consentManagementMetadata), o.consents.provider.value === "custom" && (e = void 0), j(() => {
|
2357
|
-
o.consents.metadata.value =
|
2386
|
+
o.consents.metadata.value = I(n), o.consents.resolutionStrategy.value = e;
|
2358
2387
|
});
|
2359
2388
|
}, hc = (t) => {
|
2360
2389
|
if (o.dataPlaneEvents.deliveryEnabled.value) {
|
2361
2390
|
const e = "XhrQueue";
|
2362
2391
|
let n = e;
|
2363
|
-
o.loadOptions.value.useBeacon && (o.capabilities.isBeaconAvailable.value ? n = "BeaconQueue" : (n = e, t.warn(
|
2392
|
+
o.loadOptions.value.useBeacon && (o.capabilities.isBeaconAvailable.value ? n = "BeaconQueue" : (n = e, t.warn(Ea(te)))), j(() => {
|
2364
2393
|
o.dataPlaneEvents.eventsQueuePluginName.value = n;
|
2365
2394
|
});
|
2366
2395
|
}
|
2367
2396
|
}, gc = (t, e, n, s, i) => {
|
2368
|
-
const r = new URLSearchParams({ p:
|
2369
|
-
let a =
|
2397
|
+
const r = new URLSearchParams({ p: Hs, v: lt, build: ct, writeKey: e, lockIntegrationsVersion: n.toString(), lockPluginsVersion: s.toString() });
|
2398
|
+
let a = ri, u = r, l = "/sourceConfig/", c = "";
|
2370
2399
|
if (Ke(t)) {
|
2371
2400
|
const d = new URL(t);
|
2372
2401
|
ze(d.pathname).endsWith("/sourceConfig") || (d.pathname = `${ze(d.pathname)}/sourceConfig/`), d.pathname = tc(d.pathname), r.forEach((h, y) => {
|
2373
2402
|
d.searchParams.get(y) === null && d.searchParams.set(y, h);
|
2374
2403
|
}), a = d.origin, l = d.pathname, u = d.searchParams, c = d.hash;
|
2375
2404
|
} else
|
2376
|
-
i.warn(
|
2405
|
+
i.warn(_a(te, t));
|
2377
2406
|
return `${a}${l}?${u}${c}`;
|
2378
|
-
},
|
2407
|
+
}, mc = (t) => t.map((e) => ({ id: e.id, displayName: e.destinationDefinition.displayName, enabled: e.enabled, config: e.config, shouldApplyDeviceModeTransformation: e.shouldApplyDeviceModeTransformation ?? !1, propagateEventsUntransformedOnError: e.propagateEventsUntransformedOnError ?? !1, userFriendlyId: `${e.destinationDefinition.displayName.replaceAll(" ", "-")}___${e.id}` })), ki = (t, e, n, s, i, r, a) => {
|
2379
2408
|
let u;
|
2380
2409
|
if (r) {
|
2381
2410
|
if (!Ke(r))
|
2382
|
-
return a.error(
|
2411
|
+
return a.error(Yo(te, t, r)), null;
|
2383
2412
|
u = ze(r);
|
2384
2413
|
} else if (u = n, o.context.app.value.installType === "cdn") {
|
2385
2414
|
const l = ac();
|
2386
2415
|
l && (u = l.split("/").slice(0, -1).concat(e).join("/"));
|
2387
2416
|
}
|
2388
|
-
return i && (u = u.replace(new RegExp(`/${
|
2389
|
-
},
|
2390
|
-
class
|
2417
|
+
return i && (u = u.replace(new RegExp(`/${Tn}/${ct}/${e}$`), `/${s}/${ct}/${e}`)), u;
|
2418
|
+
}, pc = (t, e, n, s) => ki("integrations", Rn, si, t, e, n, s), vc = (t, e, n, s) => ki("plugins", ni, ii, t, e, n, s);
|
2419
|
+
class yc {
|
2391
2420
|
constructor(e, n, s) {
|
2392
2421
|
this.errorHandler = n, this.logger = s, this.httpClient = e, this.onError = this.onError.bind(this), this.processConfig = this.processConfig.bind(this);
|
2393
2422
|
}
|
2394
2423
|
attachEffects() {
|
2395
|
-
|
2424
|
+
ve(() => {
|
2396
2425
|
this.logger.setMinLogLevel(o.lifecycle.logLevel.value);
|
2397
2426
|
});
|
2398
2427
|
}
|
@@ -2401,46 +2430,46 @@ class vc {
|
|
2401
2430
|
* config related information in global state
|
2402
2431
|
*/
|
2403
2432
|
init() {
|
2404
|
-
const { logLevel: e, configUrl: n, lockIntegrationsVersion: s, lockPluginsVersion: i, destSDKBaseURL: r, pluginsSDKBaseURL: a, integrations: u } = o.loadOptions.value, l =
|
2433
|
+
const { logLevel: e, configUrl: n, lockIntegrationsVersion: s, lockPluginsVersion: i, destSDKBaseURL: r, pluginsSDKBaseURL: a, integrations: u } = o.loadOptions.value, l = pc(lt, s, r, this.logger);
|
2405
2434
|
if (ne(l))
|
2406
2435
|
return;
|
2407
2436
|
let c;
|
2408
|
-
c =
|
2409
|
-
o.lifecycle.integrationsCDNPath.value = l, o.lifecycle.pluginsCDNPath.value = c, e && (o.lifecycle.logLevel.value = e), o.lifecycle.sourceConfigUrl.value = gc(n, o.lifecycle.writeKey.value, s, i, this.logger), o.metrics.metricsServiceUrl.value = `${o.lifecycle.activeDataplaneUrl.value}/${
|
2437
|
+
c = vc(lt, i, a, this.logger), c !== null && (this.attachEffects(), o.lifecycle.activeDataplaneUrl.value = ze(o.lifecycle.dataPlaneUrl.value), cc(this.logger), dc(this.logger), hc(this.logger), j(() => {
|
2438
|
+
o.lifecycle.integrationsCDNPath.value = l, o.lifecycle.pluginsCDNPath.value = c, e && (o.lifecycle.logLevel.value = e), o.lifecycle.sourceConfigUrl.value = gc(n, o.lifecycle.writeKey.value, s, i, this.logger), o.metrics.metricsServiceUrl.value = `${o.lifecycle.activeDataplaneUrl.value}/${Ga}`, o.nativeDestinations.loadOnlyIntegrations.value = u;
|
2410
2439
|
}), this.getConfig());
|
2411
2440
|
}
|
2412
2441
|
/**
|
2413
2442
|
* Handle errors
|
2414
2443
|
*/
|
2415
|
-
onError(e, n) {
|
2416
|
-
this.errorHandler.onError(e, te, n);
|
2444
|
+
onError(e, n, s) {
|
2445
|
+
this.errorHandler.onError({ error: e, context: te, customMessage: n, groupingHash: s });
|
2417
2446
|
}
|
2418
2447
|
/**
|
2419
2448
|
* A callback function that is executed once we fetch the source config response.
|
2420
2449
|
* Use to construct and store information that are dependent on the sourceConfig.
|
2421
2450
|
*/
|
2422
2451
|
processConfig(e, n) {
|
2423
|
-
if (!
|
2424
|
-
|
2452
|
+
if (!C(e)) {
|
2453
|
+
C(n) ? this.onError(n.error, qn) : this.onError(new Error(qn));
|
2425
2454
|
return;
|
2426
2455
|
}
|
2427
2456
|
let s;
|
2428
2457
|
try {
|
2429
|
-
|
2458
|
+
U(e) ? s = JSON.parse(e) : s = e;
|
2430
2459
|
} catch (r) {
|
2431
2460
|
this.onError(r, Gn);
|
2432
2461
|
return;
|
2433
2462
|
}
|
2434
|
-
if (!
|
2463
|
+
if (!Yu(s)) {
|
2435
2464
|
this.onError(new Error(Gn));
|
2436
2465
|
return;
|
2437
2466
|
}
|
2438
2467
|
if (s.source.enabled === !1) {
|
2439
|
-
this.logger.error(
|
2468
|
+
this.logger.error(Go);
|
2440
2469
|
return;
|
2441
2470
|
}
|
2442
2471
|
lc(s);
|
2443
|
-
const i = s.source.destinations.length > 0 ?
|
2472
|
+
const i = s.source.destinations.length > 0 ? mc(s.source.destinations) : [];
|
2444
2473
|
j(() => {
|
2445
2474
|
o.source.value = { config: s.source.config, name: s.source.name, id: s.source.id, workspaceId: s.source.workspaceId }, o.nativeDestinations.configuredDestinations.value = i, o.plugins.pluginsToLoadFromConfig.value = o.loadOptions.value.plugins ?? [], fc(s), o.lifecycle.status.value = "configured";
|
2446
2475
|
});
|
@@ -2454,7 +2483,7 @@ class vc {
|
|
2454
2483
|
const e = o.loadOptions.value.getSourceConfig;
|
2455
2484
|
if (e) {
|
2456
2485
|
if (!S(e)) {
|
2457
|
-
this.logger.error(
|
2486
|
+
this.logger.error(Ko(te));
|
2458
2487
|
return;
|
2459
2488
|
}
|
2460
2489
|
const n = e();
|
@@ -2465,10 +2494,10 @@ class vc {
|
|
2465
2494
|
this.httpClient.getAsyncData({ url: o.lifecycle.sourceConfigUrl.value, options: { headers: { "Content-Type": void 0 } }, callback: this.processConfig });
|
2466
2495
|
}
|
2467
2496
|
}
|
2468
|
-
const
|
2497
|
+
const bc = () => {
|
2469
2498
|
const t = /([A-Z]+[+-]\d+)/.exec((/* @__PURE__ */ new Date()).toString());
|
2470
2499
|
return t != null && t[1] ? t[1] : "NA";
|
2471
|
-
},
|
2500
|
+
}, Ri = () => (document == null ? void 0 : document.referrer) || "$direct", Ec = () => {
|
2472
2501
|
const t = document.getElementsByTagName("link");
|
2473
2502
|
let e = "";
|
2474
2503
|
for (let n = 0; t[n]; n += 1) {
|
@@ -2479,7 +2508,7 @@ const yc = () => {
|
|
2479
2508
|
}
|
2480
2509
|
}
|
2481
2510
|
return e;
|
2482
|
-
},
|
2511
|
+
}, Sc = () => {
|
2483
2512
|
if (G(globalThis.navigator))
|
2484
2513
|
return null;
|
2485
2514
|
let { userAgent: t } = globalThis.navigator;
|
@@ -2489,8 +2518,8 @@ const yc = () => {
|
|
2489
2518
|
n && (t = `${t} Brave/${n[2]}`);
|
2490
2519
|
}
|
2491
2520
|
return t;
|
2492
|
-
},
|
2493
|
-
const t =
|
2521
|
+
}, kc = () => G(globalThis.navigator) ? null : globalThis.navigator.language ?? globalThis.navigator.browserLanguage, Ti = () => {
|
2522
|
+
const t = Ec();
|
2494
2523
|
let e = globalThis.location.pathname;
|
2495
2524
|
const { href: n } = globalThis.location;
|
2496
2525
|
let s = n;
|
@@ -2501,12 +2530,12 @@ const yc = () => {
|
|
2501
2530
|
l.search === "" ? s = t + i : s = t, e = l.pathname;
|
2502
2531
|
} catch {
|
2503
2532
|
}
|
2504
|
-
const r = ec(s), { title: a } = document, u =
|
2505
|
-
return { path: e, referrer: u, referring_domain:
|
2506
|
-
},
|
2533
|
+
const r = ec(s), { title: a } = document, u = Ri();
|
2534
|
+
return { path: e, referrer: u, referring_domain: Ei(u), search: i, title: a, url: r, tab_url: n };
|
2535
|
+
}, Rc = `https://polyfill-fastly.io/v3/polyfill.min.js?version=3.111.0&features=${Object.keys(un).join("%2C")}`, Tc = 10 * 1e3, as = "rudderstackPolyfill";
|
2507
2536
|
class Ic {
|
2508
2537
|
constructor(e, n, s) {
|
2509
|
-
this.httpClient = e, this.errorHandler = n, this.logger = s, this.externalSrcLoader = new
|
2538
|
+
this.httpClient = e, this.errorHandler = n, this.logger = s, this.externalSrcLoader = new qs(this.logger), this.onError = this.onError.bind(this), this.onReady = this.onReady.bind(this);
|
2510
2539
|
}
|
2511
2540
|
init() {
|
2512
2541
|
this.prepareBrowserCapabilities(), this.attachWindowListeners();
|
@@ -2517,21 +2546,21 @@ class Ic {
|
|
2517
2546
|
// eslint-disable-next-line class-methods-use-this
|
2518
2547
|
detectBrowserCapabilities() {
|
2519
2548
|
j(() => {
|
2520
|
-
o.capabilities.storage.isCookieStorageAvailable.value = Ge(W, ie(W), this.logger), o.capabilities.storage.isLocalStorageAvailable.value = Ge(X, void 0, this.logger), o.capabilities.storage.isSessionStorageAvailable.value = Ge(ee, void 0, this.logger), o.capabilities.isBeaconAvailable.value =
|
2549
|
+
o.capabilities.storage.isCookieStorageAvailable.value = Ge(W, ie(W), this.logger), o.capabilities.storage.isLocalStorageAvailable.value = Ge(X, void 0, this.logger), o.capabilities.storage.isSessionStorageAvailable.value = Ge(ee, void 0, this.logger), o.capabilities.isBeaconAvailable.value = Nu(), o.capabilities.isUaCHAvailable.value = is(), o.capabilities.isCryptoAvailable.value = Pu(), o.capabilities.isIE11.value = Lu(), o.capabilities.isOnline.value = globalThis.navigator.onLine, o.context.userAgent.value = Sc(), o.context.locale.value = kc(), o.context.screen.value = rs(), o.context.timezone.value = bc(), is() && wu((e) => {
|
2521
2550
|
o.context["ua-ch"].value = e;
|
2522
2551
|
}, o.loadOptions.value.uaChTrackLevel);
|
2523
|
-
}),
|
2524
|
-
o.loadOptions.value.sendAdblockPage === !0 && o.lifecycle.sourceConfigUrl.value !== void 0 &&
|
2552
|
+
}), ve(() => {
|
2553
|
+
o.loadOptions.value.sendAdblockPage === !0 && o.lifecycle.sourceConfigUrl.value !== void 0 && _u(this.httpClient);
|
2525
2554
|
});
|
2526
2555
|
}
|
2527
2556
|
/**
|
2528
2557
|
* Detect if polyfills are required and then load script from polyfill URL
|
2529
2558
|
*/
|
2530
2559
|
prepareBrowserCapabilities() {
|
2531
|
-
o.capabilities.isLegacyDOM.value =
|
2560
|
+
o.capabilities.isLegacyDOM.value = $u();
|
2532
2561
|
const e = o.loadOptions.value.polyfillURL;
|
2533
|
-
let n =
|
2534
|
-
if (qe(e) && (Ke(e) ? n = e : this.logger.warn(
|
2562
|
+
let n = Rc;
|
2563
|
+
if (qe(e) && (Ke(e) ? n = e : this.logger.warn($a(nn, e))), o.loadOptions.value.polyfillIfRequired && o.capabilities.isLegacyDOM.value && Ke(n)) {
|
2535
2564
|
const i = n !== o.loadOptions.value.polyfillURL;
|
2536
2565
|
if (i) {
|
2537
2566
|
const r = `RS_polyfillCallback_${o.lifecycle.writeKey.value}`, a = () => {
|
@@ -2539,8 +2568,8 @@ class Ic {
|
|
2539
2568
|
};
|
2540
2569
|
globalThis[r] = a, n = `${n}&callback=${r}`;
|
2541
2570
|
}
|
2542
|
-
this.externalSrcLoader.loadJSFile({ url: n, id:
|
2543
|
-
r ? i || this.onReady() : this.onError(new Error(
|
2571
|
+
this.externalSrcLoader.loadJSFile({ url: n, id: as, async: !0, timeout: Tc, callback: (r) => {
|
2572
|
+
r ? i || this.onReady() : this.onError(new Error(Pa(as, n)));
|
2544
2573
|
} });
|
2545
2574
|
} else
|
2546
2575
|
this.onReady();
|
@@ -2553,8 +2582,8 @@ class Ic {
|
|
2553
2582
|
o.capabilities.isOnline.value = !1;
|
2554
2583
|
}), globalThis.addEventListener("online", () => {
|
2555
2584
|
o.capabilities.isOnline.value = !0;
|
2556
|
-
}), globalThis.addEventListener("resize",
|
2557
|
-
o.context.screen.value =
|
2585
|
+
}), globalThis.addEventListener("resize", Io(() => {
|
2586
|
+
o.context.screen.value = rs();
|
2558
2587
|
}, this));
|
2559
2588
|
}
|
2560
2589
|
/**
|
@@ -2568,17 +2597,17 @@ class Ic {
|
|
2568
2597
|
* Handles error
|
2569
2598
|
* @param error The error object
|
2570
2599
|
*/
|
2571
|
-
onError(e) {
|
2572
|
-
this.errorHandler.onError(e,
|
2600
|
+
onError(e, n) {
|
2601
|
+
this.errorHandler.onError({ error: e, context: nn, groupingHash: n });
|
2573
2602
|
}
|
2574
2603
|
}
|
2575
|
-
const
|
2604
|
+
const Oc = "web", Ac = ["integrations", "anonymousId", "originalTimestamp"], ls = ["library", "consentManagement", "userAgent", "ua-ch", "screen"], Qt = ["id", "anonymous_id", "user_id", "sent_at", "timestamp", "received_at", "original_timestamp", "event", "event_text", "channel", "context_ip", "context_request_ip", "context_passed_ip", "group_id", "previous_id"], Ii = (t) => typeof t == "number" && !Number.isNaN(t), Dc = (t, e) => e.toString().length >= t, $t = (t) => Ii(t) && t >= 0 && Number.isInteger(t), us = 10, Oi = (t) => {
|
2576
2605
|
const { cutOff: e } = t, n = Date.now();
|
2577
2606
|
return !!(e != null && e.enabled && e.expiresAt && n > e.expiresAt);
|
2578
|
-
},
|
2607
|
+
}, cs = (t) => !t.expiresAt || Date.now() > t.expiresAt || Oi(t), Cc = () => Date.now(), _c = (t, e) => !t || !$t(t) || !Dc(us, t) ? (e.warn(Oa(De, t, us)), !1) : !0, Pc = (t) => {
|
2579
2608
|
if (t != null && t.enabled)
|
2580
|
-
return t.expiresAt ?? (
|
2581
|
-
},
|
2609
|
+
return t.expiresAt ?? ($t(t.duration) ? Date.now() + t.duration : void 0);
|
2610
|
+
}, Nc = (t) => {
|
2582
2611
|
const { timeout: e, cutOff: n } = t, s = Date.now();
|
2583
2612
|
return {
|
2584
2613
|
id: s,
|
@@ -2589,52 +2618,52 @@ const Tc = "web", Oc = ["integrations", "anonymousId", "originalTimestamp"], os
|
|
2589
2618
|
autoTrack: !0,
|
2590
2619
|
...n && { cutOff: n }
|
2591
2620
|
};
|
2592
|
-
},
|
2593
|
-
const e =
|
2621
|
+
}, Lc = (t, e) => ({ id: _c(t, e) ? t : Cc(), sessionStart: void 0, manualTrack: !0 }), st = (t) => t === W || t === X || t === ee || t === ce, dn = () => Bt(), wc = (t) => {
|
2622
|
+
const e = Ti(), n = {};
|
2594
2623
|
return Object.keys(e).forEach((s) => {
|
2595
2624
|
n[s] = (t == null ? void 0 : t[s]) || e[s];
|
2596
2625
|
}), n.initial_referrer = (t == null ? void 0 : t.initial_referrer) || o.session.initialReferrer.value, n.initial_referring_domain = (t == null ? void 0 : t.initial_referring_domain) || o.session.initialReferringDomain.value, n;
|
2597
|
-
},
|
2598
|
-
const n = (e == null ? void 0 : e.page) || {}, s = t, i =
|
2626
|
+
}, Mc = (t, e) => {
|
2627
|
+
const n = (e == null ? void 0 : e.page) || {}, s = t, i = Ti();
|
2599
2628
|
return Object.keys(i).forEach((r) => {
|
2600
2629
|
G(s[r]) && (s[r] = n[r] || i[r]);
|
2601
2630
|
}), G(s.initial_referrer) && (s.initial_referrer = n.initial_referrer || o.session.initialReferrer.value), G(s.initial_referring_domain) && (s.initial_referring_domain = n.initial_referring_domain || o.session.initialReferringDomain.value), s;
|
2602
|
-
},
|
2631
|
+
}, Xt = (t, e, n) => {
|
2603
2632
|
w(t) && Object.keys(t).forEach((s) => {
|
2604
|
-
(
|
2633
|
+
(Qt.includes(s) || Qt.includes(s.toLowerCase())) && n.warn(ya(Bs, s, e, Qt));
|
2605
2634
|
});
|
2606
|
-
}, Mc = (t, e) => {
|
2607
|
-
const { properties: n, traits: s, context: i } = t, { traits: r } = i;
|
2608
|
-
Jt(n, "properties", e), Jt(s, "traits", e), Jt(r, "context.traits", e);
|
2609
2635
|
}, $c = (t, e) => {
|
2610
|
-
|
2611
|
-
|
2636
|
+
const { properties: n, traits: s, context: i } = t, { traits: r } = i;
|
2637
|
+
Xt(n, "properties", e), Xt(s, "traits", e), Xt(r, "context.traits", e);
|
2638
|
+
}, Uc = (t, e) => {
|
2639
|
+
e.anonymousId && U(e.anonymousId) && (t.anonymousId = e.anonymousId), Te(e.integrations) && (t.integrations = e.integrations), e.originalTimestamp && U(e.originalTimestamp) && (t.originalTimestamp = e.originalTimestamp);
|
2640
|
+
}, Bc = (t, e, n) => {
|
2612
2641
|
let s = t;
|
2613
2642
|
return Object.keys(e).forEach((i) => {
|
2614
|
-
if (!
|
2643
|
+
if (!Ac.includes(i) && !ls.includes(i))
|
2615
2644
|
if (i !== "context")
|
2616
|
-
s =
|
2645
|
+
s = x(s, { [i]: e[i] });
|
2617
2646
|
else if (!G(e[i]) && w(e[i])) {
|
2618
2647
|
const r = {};
|
2619
2648
|
Object.keys(e[i]).forEach((a) => {
|
2620
|
-
|
2621
|
-
}), s =
|
2649
|
+
ls.includes(a) || (r[a] = e[i][a]);
|
2650
|
+
}), s = x(s, { ...r });
|
2622
2651
|
} else
|
2623
|
-
n.warn(
|
2652
|
+
n.warn(ba(Bs));
|
2624
2653
|
}), s;
|
2625
|
-
},
|
2626
|
-
w(e) && (
|
2627
|
-
},
|
2654
|
+
}, Vc = (t, e, n) => {
|
2655
|
+
w(e) && (Uc(t, e), t.context = Bc(t.context, e, n));
|
2656
|
+
}, Fc = (t) => {
|
2628
2657
|
let e;
|
2629
|
-
return o.loadOptions.value.useGlobalIntegrationsConfigInEvents ? e = o.consents.postConsent.value.integrations ?? o.nativeDestinations.loadOnlyIntegrations.value : t ? e = t : e =
|
2630
|
-
},
|
2658
|
+
return o.loadOptions.value.useGlobalIntegrationsConfigInEvents ? e = o.consents.postConsent.value.integrations ?? o.nativeDestinations.loadOnlyIntegrations.value : t ? e = t : e = ti, I(e);
|
2659
|
+
}, et = (t, e, n, s) => {
|
2631
2660
|
var a, u, l;
|
2632
|
-
const i = { channel:
|
2633
|
-
traits:
|
2661
|
+
const i = { channel: Oc, context: {
|
2662
|
+
traits: I(o.session.userTraits.value),
|
2634
2663
|
sessionId: o.session.sessionInfo.value.id || void 0,
|
2635
2664
|
sessionStart: o.session.sessionInfo.value.sessionStart || void 0,
|
2636
2665
|
// Add 'consentManagement' only if consent management is enabled
|
2637
|
-
...o.consents.enabled.value && { consentManagement: { deniedConsentIds:
|
2666
|
+
...o.consents.enabled.value && { consentManagement: { deniedConsentIds: I(o.consents.data.value.deniedConsentIds), allowedConsentIds: I(o.consents.data.value.allowedConsentIds), provider: o.consents.provider.value, resolutionStrategy: o.consents.resolutionStrategy.value } },
|
2638
2667
|
"ua-ch": o.context["ua-ch"].value,
|
2639
2668
|
app: o.context.app.value,
|
2640
2669
|
library: o.context.library.value,
|
@@ -2643,16 +2672,16 @@ const Tc = "web", Oc = ["integrations", "anonymousId", "originalTimestamp"], os
|
|
2643
2672
|
locale: o.context.locale.value,
|
2644
2673
|
screen: o.context.screen.value,
|
2645
2674
|
campaign: Zu(globalThis.location.href),
|
2646
|
-
page:
|
2675
|
+
page: wc(n),
|
2647
2676
|
timezone: o.context.timezone.value,
|
2648
2677
|
// Add auto tracking information
|
2649
2678
|
...o.autoTrack.enabled.value && { autoTrack: { ...o.autoTrack.pageLifecycle.enabled.value && { page: { pageViewId: o.autoTrack.pageLifecycle.pageViewId.value } } } }
|
2650
|
-
}, originalTimestamp:
|
2651
|
-
|
2652
|
-
const r =
|
2653
|
-
return r.event === void 0 && (r.event = null), r.properties === void 0 && (r.properties = null),
|
2679
|
+
}, originalTimestamp: io(), messageId: Bt(), userId: t.userId || o.session.userId.value };
|
2680
|
+
st((a = o.storage.entries.value.anonymousId) == null ? void 0 : a.type) ? i.anonymousId = o.session.anonymousId.value : i.anonymousId = dn(), o.storage.trulyAnonymousTracking.value && (i.context.trulyAnonymousTracking = !0), t.type === "identify" && (i.context.traits = ((u = o.storage.entries.value.userTraits) == null ? void 0 : u.type) !== we ? I(o.session.userTraits.value) : t.context.traits), t.type === "group" && ((t.groupId || o.session.groupId.value) && (i.groupId = t.groupId || o.session.groupId.value), (t.traits || o.session.groupTraits.value) && (i.traits = ((l = o.storage.entries.value.groupTraits) == null ? void 0 : l.type) !== we ? I(o.session.groupTraits.value) : t.traits));
|
2681
|
+
const r = x(t, i);
|
2682
|
+
return r.event === void 0 && (r.event = null), r.properties === void 0 && (r.properties = null), Vc(r, e, s), $c(r, s), r.integrations = Fc(r.integrations), r;
|
2654
2683
|
};
|
2655
|
-
class
|
2684
|
+
class xc {
|
2656
2685
|
constructor(e) {
|
2657
2686
|
this.logger = e;
|
2658
2687
|
}
|
@@ -2665,7 +2694,7 @@ class Fc {
|
|
2665
2694
|
*/
|
2666
2695
|
generatePageEvent(e, n, s, i) {
|
2667
2696
|
let r = s ?? {};
|
2668
|
-
return r =
|
2697
|
+
return r = Mc(r, i), et({ properties: r, name: n, category: e, type: "page" }, i, r, this.logger);
|
2669
2698
|
}
|
2670
2699
|
/**
|
2671
2700
|
* Generate a 'track' event based on the user-input fields
|
@@ -2674,7 +2703,7 @@ class Fc {
|
|
2674
2703
|
* @param options API options
|
2675
2704
|
*/
|
2676
2705
|
generateTrackEvent(e, n, s) {
|
2677
|
-
return
|
2706
|
+
return et({ properties: n, event: e, type: "track" }, s, void 0, this.logger);
|
2678
2707
|
}
|
2679
2708
|
/**
|
2680
2709
|
* Generate an 'identify' event based on the user-input fields
|
@@ -2683,7 +2712,7 @@ class Fc {
|
|
2683
2712
|
* @param options API options
|
2684
2713
|
*/
|
2685
2714
|
generateIdentifyEvent(e, n, s) {
|
2686
|
-
return
|
2715
|
+
return et({ userId: e, type: "identify", context: { traits: n } }, s, void 0, this.logger);
|
2687
2716
|
}
|
2688
2717
|
/**
|
2689
2718
|
* Generate an 'alias' event based on the user-input fields
|
@@ -2692,7 +2721,7 @@ class Fc {
|
|
2692
2721
|
* @param options API options
|
2693
2722
|
*/
|
2694
2723
|
generateAliasEvent(e, n, s) {
|
2695
|
-
const r =
|
2724
|
+
const r = et({ previousId: n, type: "alias" }, s, void 0, this.logger);
|
2696
2725
|
return r.userId = e ?? r.userId, r;
|
2697
2726
|
}
|
2698
2727
|
/**
|
@@ -2703,7 +2732,7 @@ class Fc {
|
|
2703
2732
|
*/
|
2704
2733
|
generateGroupEvent(e, n, s) {
|
2705
2734
|
const i = { type: "group" };
|
2706
|
-
return e && (i.groupId = e), n && (i.traits = n),
|
2735
|
+
return e && (i.groupId = e), n && (i.traits = n), et(i, s, void 0, this.logger);
|
2707
2736
|
}
|
2708
2737
|
/**
|
2709
2738
|
* Generates a new RudderEvent object based on the user-input fields
|
@@ -2742,7 +2771,7 @@ class Hc {
|
|
2742
2771
|
* @param logger Logger object
|
2743
2772
|
*/
|
2744
2773
|
constructor(e, n, s, i) {
|
2745
|
-
this.eventRepository = e, this.userSessionManager = n, this.errorHandler = s, this.logger = i, this.eventFactory = new
|
2774
|
+
this.eventRepository = e, this.userSessionManager = n, this.errorHandler = s, this.logger = i, this.eventFactory = new xc(this.logger);
|
2746
2775
|
}
|
2747
2776
|
/**
|
2748
2777
|
* Initializes the event manager
|
@@ -2763,7 +2792,7 @@ class Hc {
|
|
2763
2792
|
this.eventRepository.enqueue(n, e.callback);
|
2764
2793
|
}
|
2765
2794
|
}
|
2766
|
-
class
|
2795
|
+
class Gc {
|
2767
2796
|
constructor(e, n, s, i, r) {
|
2768
2797
|
this.storeManager = n, this.pluginsManager = e, this.logger = r, this.errorHandler = i, this.httpClient = s, this.onError = this.onError.bind(this), this.serverSideCookieDebounceFuncs = {};
|
2769
2798
|
}
|
@@ -2803,13 +2832,13 @@ class xc {
|
|
2803
2832
|
if (e && n)
|
2804
2833
|
this.setInitialReferrer(e), this.setInitialReferringDomain(n);
|
2805
2834
|
else {
|
2806
|
-
const s = e ||
|
2807
|
-
this.setInitialReferrer(s), this.setInitialReferringDomain(
|
2835
|
+
const s = e || Ri();
|
2836
|
+
this.setInitialReferrer(s), this.setInitialReferringDomain(Ei(s));
|
2808
2837
|
}
|
2809
2838
|
}
|
2810
2839
|
isPersistenceEnabledForStorageEntry(e) {
|
2811
2840
|
var n;
|
2812
|
-
return
|
2841
|
+
return st((n = o.storage.entries.value[e]) == null ? void 0 : n.type);
|
2813
2842
|
}
|
2814
2843
|
migrateDataFromPreviousStorage() {
|
2815
2844
|
const e = o.storage.entries.value, n = [W, X, ee];
|
@@ -2821,25 +2850,25 @@ class xc {
|
|
2821
2850
|
const d = (h = this.storeManager) == null ? void 0 : h.getStore(Fe[c]);
|
2822
2851
|
if (d && c !== r) {
|
2823
2852
|
const y = d.get(Ve[i]);
|
2824
|
-
|
2853
|
+
xr(y) && a.set(Ve[i], y), d.remove(Ve[i]);
|
2825
2854
|
}
|
2826
2855
|
});
|
2827
2856
|
});
|
2828
2857
|
}
|
2829
|
-
migrateStorageIfNeeded(e) {
|
2858
|
+
migrateStorageIfNeeded(e, n) {
|
2830
2859
|
if (!o.storage.migrate.value)
|
2831
2860
|
return;
|
2832
|
-
let
|
2833
|
-
|
2834
|
-
var
|
2835
|
-
const
|
2836
|
-
|
2837
|
-
}), Object.keys(Ve).forEach((
|
2838
|
-
const
|
2839
|
-
|
2840
|
-
var
|
2841
|
-
const
|
2842
|
-
le(
|
2861
|
+
let s = e ?? [];
|
2862
|
+
s.length === 0 && [gi, mi, pi].forEach((a) => {
|
2863
|
+
var l;
|
2864
|
+
const u = (l = this.storeManager) == null ? void 0 : l.getStore(a);
|
2865
|
+
u && s.push(u);
|
2866
|
+
}), (n ?? Object.keys(Ve)).forEach((r) => {
|
2867
|
+
const a = Ve[r];
|
2868
|
+
s.forEach((u) => {
|
2869
|
+
var c;
|
2870
|
+
const l = (c = this.pluginsManager) == null ? void 0 : c.invokeSingle("storage.migrate", a, u.engine, this.errorHandler, this.logger);
|
2871
|
+
le(l) || u.set(a, l);
|
2843
2872
|
});
|
2844
2873
|
});
|
2845
2874
|
}
|
@@ -2850,21 +2879,21 @@ class xc {
|
|
2850
2879
|
return { autoTrack: e };
|
2851
2880
|
let n;
|
2852
2881
|
const s = (r = o.loadOptions.value.sessions) == null ? void 0 : r.timeout;
|
2853
|
-
|
2882
|
+
$t(s) ? n = s : (this.logger.warn(Sa(De, s, sn)), n = sn), n === 0 && (this.logger.warn(Ta(De)), e = !1), n > 0 && n < Fn && this.logger.warn(Ia(De, n, Fn));
|
2854
2883
|
const i = this.getCutOffInfo(n);
|
2855
2884
|
return { timeout: n, autoTrack: e, cutOff: i };
|
2856
2885
|
}
|
2857
2886
|
getCutOffInfo(e) {
|
2858
2887
|
const n = o.loadOptions.value.sessions.cutOff;
|
2859
2888
|
let s, i = !1;
|
2860
|
-
return n.enabled === !0 && (s = n.duration, i = !0,
|
2889
|
+
return n.enabled === !0 && (s = n.duration, i = !0, $t(s) ? s < e && (this.logger.warn(Ra(De, s, e)), i = !1) : (this.logger.warn(ka(De, s, Vn)), s = Vn)), { enabled: i, duration: s };
|
2861
2890
|
}
|
2862
2891
|
/**
|
2863
2892
|
* Handles error
|
2864
2893
|
* @param error The error object
|
2865
2894
|
*/
|
2866
|
-
onError(e, n) {
|
2867
|
-
this.errorHandler.onError(e, De, n);
|
2895
|
+
onError(e, n, s) {
|
2896
|
+
this.errorHandler.onError({ error: e, context: De, customMessage: n, groupingHash: s });
|
2868
2897
|
}
|
2869
2898
|
/**
|
2870
2899
|
* A function to encrypt the cookie value and return the encrypted data
|
@@ -2900,13 +2929,13 @@ class xc {
|
|
2900
2929
|
var u, l;
|
2901
2930
|
((u = a == null ? void 0 : a.xhr) == null ? void 0 : u.status) === 200 ? e.forEach((c) => {
|
2902
2931
|
const d = s == null ? void 0 : s.get(c.name), h = de(c.value, !1, []);
|
2903
|
-
de(d, !1, []) !== h && (this.logger.error(
|
2904
|
-
}) : (this.logger.error(
|
2932
|
+
de(d, !1, []) !== h && (this.logger.error(ha(c.name)), n && n(c.name, c.value));
|
2933
|
+
}) : (this.logger.error(fa((l = a == null ? void 0 : a.xhr) == null ? void 0 : l.status)), e.forEach((c) => {
|
2905
2934
|
n && n(c.name, c.value);
|
2906
2935
|
}));
|
2907
2936
|
});
|
2908
2937
|
} catch (i) {
|
2909
|
-
this.onError(i,
|
2938
|
+
this.onError(i, zn, zn), e.forEach((r) => {
|
2910
2939
|
n && n(r.name, r.value);
|
2911
2940
|
});
|
2912
2941
|
}
|
@@ -2919,21 +2948,21 @@ class xc {
|
|
2919
2948
|
syncValueToStorage(e, n) {
|
2920
2949
|
var r, a, u;
|
2921
2950
|
const s = o.storage.entries.value, i = (r = s[e]) == null ? void 0 : r.type;
|
2922
|
-
if (
|
2951
|
+
if (st(i)) {
|
2923
2952
|
const l = (a = this.storeManager) == null ? void 0 : a.getStore(Fe[i]), c = (u = s[e]) == null ? void 0 : u.key;
|
2924
|
-
n && (
|
2953
|
+
n && (U(n) || Te(n)) ? o.serverCookies.isEnabledServerSideCookies.value && i === W ? (this.serverSideCookieDebounceFuncs[e] && globalThis.clearTimeout(this.serverSideCookieDebounceFuncs[e]), this.serverSideCookieDebounceFuncs[e] = globalThis.setTimeout(() => {
|
2925
2954
|
this.setServerSideCookies([{ name: c, value: n }], (d, h) => {
|
2926
2955
|
l == null || l.set(d, h);
|
2927
2956
|
}, l);
|
2928
|
-
},
|
2957
|
+
}, za)) : l == null || l.set(c, n) : l == null || l.remove(c);
|
2929
2958
|
}
|
2930
2959
|
}
|
2931
2960
|
/**
|
2932
2961
|
* Function to update storage whenever state value changes
|
2933
2962
|
*/
|
2934
2963
|
registerEffects() {
|
2935
|
-
|
2936
|
-
|
2964
|
+
vi.forEach((e) => {
|
2965
|
+
ve(() => {
|
2937
2966
|
this.syncValueToStorage(e, o.session[e].value);
|
2938
2967
|
});
|
2939
2968
|
});
|
@@ -2949,7 +2978,7 @@ class xc {
|
|
2949
2978
|
setAnonymousId(e, n) {
|
2950
2979
|
var i;
|
2951
2980
|
let s = e;
|
2952
|
-
(!
|
2981
|
+
(!U(e) || !s) && (s = void 0), this.isPersistenceEnabledForStorageEntry("anonymousId") ? (!s && n && (s = (i = this.pluginsManager) == null ? void 0 : i.invokeSingle("userSession.anonymousIdGoogleLinker", n)), s = s || dn()) : s = O.anonymousId, o.session.anonymousId.value = s;
|
2953
2982
|
}
|
2954
2983
|
/**
|
2955
2984
|
* Fetches anonymousId
|
@@ -2959,18 +2988,18 @@ class xc {
|
|
2959
2988
|
getAnonymousId(e) {
|
2960
2989
|
var s, i;
|
2961
2990
|
const n = (s = o.storage.entries.value.anonymousId) == null ? void 0 : s.type;
|
2962
|
-
if (
|
2991
|
+
if (st(n)) {
|
2963
2992
|
let r = o.session.anonymousId.value;
|
2964
|
-
(!r || r === O.anonymousId) && (r = this.getEntryValue("anonymousId")), !r && e && (r = (i = this.pluginsManager) == null ? void 0 : i.invokeSingle("storage.getAnonymousId", ie, e)), o.session.anonymousId.value = r ||
|
2993
|
+
(!r || r === O.anonymousId) && (r = this.getEntryValue("anonymousId")), !r && e && (r = (i = this.pluginsManager) == null ? void 0 : i.invokeSingle("storage.getAnonymousId", ie, e)), o.session.anonymousId.value = r || dn();
|
2965
2994
|
}
|
2966
2995
|
return o.session.anonymousId.value;
|
2967
2996
|
}
|
2968
2997
|
getEntryValue(e) {
|
2969
2998
|
var i, r, a;
|
2970
2999
|
const n = o.storage.entries.value, s = (i = n[e]) == null ? void 0 : i.type;
|
2971
|
-
if (
|
3000
|
+
if (st(s)) {
|
2972
3001
|
const u = (r = this.storeManager) == null ? void 0 : r.getStore(Fe[s]);
|
2973
|
-
this.migrateStorageIfNeeded([u]);
|
3002
|
+
this.migrateStorageIfNeeded([u], [e]);
|
2974
3003
|
const l = (a = n[e]) == null ? void 0 : a.key;
|
2975
3004
|
return (u == null ? void 0 : u.get(l)) ?? null;
|
2976
3005
|
}
|
@@ -3042,7 +3071,7 @@ class xc {
|
|
3042
3071
|
*/
|
3043
3072
|
getSessionId() {
|
3044
3073
|
const e = this.getSessionInfo() ?? O.sessionInfo;
|
3045
|
-
return e.autoTrack && !
|
3074
|
+
return e.autoTrack && !cs(e) || e.manualTrack ? e.id ?? null : null;
|
3046
3075
|
}
|
3047
3076
|
/**
|
3048
3077
|
* A function to keep the session information up to date in the state
|
@@ -3080,7 +3109,7 @@ class xc {
|
|
3080
3109
|
* @param traits
|
3081
3110
|
*/
|
3082
3111
|
setUserTraits(e) {
|
3083
|
-
o.session.userTraits.value = this.isPersistenceEnabledForStorageEntry("userTraits") && w(e) ?
|
3112
|
+
o.session.userTraits.value = this.isPersistenceEnabledForStorageEntry("userTraits") && w(e) ? x(o.session.userTraits.value ?? O.userTraits, e) : O.userTraits;
|
3084
3113
|
}
|
3085
3114
|
/**
|
3086
3115
|
* Set group Id
|
@@ -3094,7 +3123,7 @@ class xc {
|
|
3094
3123
|
* @param traits
|
3095
3124
|
*/
|
3096
3125
|
setGroupTraits(e) {
|
3097
|
-
o.session.groupTraits.value = this.isPersistenceEnabledForStorageEntry("groupTraits") && w(e) ?
|
3126
|
+
o.session.groupTraits.value = this.isPersistenceEnabledForStorageEntry("groupTraits") && w(e) ? x(o.session.groupTraits.value ?? O.groupTraits, e) : O.groupTraits;
|
3098
3127
|
}
|
3099
3128
|
/**
|
3100
3129
|
* Set initial referrer
|
@@ -3115,14 +3144,14 @@ class xc {
|
|
3115
3144
|
*/
|
3116
3145
|
startOrRenewAutoTracking(e) {
|
3117
3146
|
let n = e;
|
3118
|
-
if (
|
3119
|
-
n =
|
3147
|
+
if (cs(e))
|
3148
|
+
n = Nc(e);
|
3120
3149
|
else {
|
3121
3150
|
const s = Date.now(), i = e.timeout;
|
3122
3151
|
n.expiresAt = s + i;
|
3123
3152
|
}
|
3124
|
-
if (
|
3125
|
-
const s =
|
3153
|
+
if (Oi(n) && (n.cutOff.expiresAt = void 0), n.cutOff) {
|
3154
|
+
const s = Pc(n.cutOff);
|
3126
3155
|
n.cutOff.expiresAt = s;
|
3127
3156
|
}
|
3128
3157
|
o.session.sessionInfo.value = n;
|
@@ -3133,7 +3162,7 @@ class xc {
|
|
3133
3162
|
* @returns
|
3134
3163
|
*/
|
3135
3164
|
start(e) {
|
3136
|
-
o.session.sessionInfo.value =
|
3165
|
+
o.session.sessionInfo.value = Lc(e, this.logger);
|
3137
3166
|
}
|
3138
3167
|
/**
|
3139
3168
|
* An internal function to start manual session
|
@@ -3155,31 +3184,31 @@ class xc {
|
|
3155
3184
|
o.session.authToken.value = this.isPersistenceEnabledForStorageEntry("authToken") && e ? e : O.authToken;
|
3156
3185
|
}
|
3157
3186
|
}
|
3158
|
-
const
|
3187
|
+
const jc = ["BeaconQueue", "CustomConsentManager", "DeviceModeDestinations", "DeviceModeTransformation", "ExternalAnonymousId", "GoogleLinker", "IubendaConsentManager", "KetchConsentManager", "NativeDestinationQueue", "OneTrustConsentManager", "StorageEncryption", "StorageEncryptionLegacy", "StorageMigrator", "XhrQueue"], qc = (t, e) => {
|
3159
3188
|
var a;
|
3160
|
-
const n =
|
3161
|
-
return
|
3162
|
-
},
|
3163
|
-
const i =
|
3189
|
+
const n = I(e);
|
3190
|
+
return U(n.setCookieDomain) || (n.setCookieDomain = void 0), ["Strict", "Lax", "None"].includes(n.sameSiteCookie) || (n.sameSiteCookie = void 0), n.secureCookie = ue(n.secureCookie, t.secureCookie), n.sameDomainCookiesOnly = ue(n.sameDomainCookiesOnly, t.sameDomainCookiesOnly), ["none", "default", "full"].includes(n.uaChTrackLevel) || (n.uaChTrackLevel = void 0), n.integrations = he(n.integrations), Array.isArray(n.plugins) || (n.plugins = jc), n.useGlobalIntegrationsConfigInEvents = ue(n.useGlobalIntegrationsConfigInEvents, t.useGlobalIntegrationsConfigInEvents), n.bufferDataPlaneEventsUntilReady = ue(n.bufferDataPlaneEventsUntilReady, t.bufferDataPlaneEventsUntilReady), n.sendAdblockPage = ue(n.sendAdblockPage, t.sendAdblockPage), n.useServerSideCookies = ue(n.useServerSideCookies, t.useServerSideCookies), U(n.dataServiceEndpoint) || (n.dataServiceEndpoint = void 0), n.sendAdblockPageOptions = he(n.sendAdblockPageOptions), n.loadIntegration = ue(n.loadIntegration, t.loadIntegration), Te(n.storage) ? (n.storage.migrate = ue(n.storage.migrate, (a = t.storage) == null ? void 0 : a.migrate), n.storage.cookie = he(n.storage.cookie), n.storage.encryption = he(n.storage.encryption), n.storage = _t(n.storage)) : n.storage = void 0, n.destinationsQueueOptions = he(n.destinationsQueueOptions), n.queueOptions = he(n.queueOptions), n.lockIntegrationsVersion = ue(n.lockIntegrationsVersion, t.lockIntegrationsVersion), n.lockPluginsVersion = ue(n.lockPluginsVersion, t.lockPluginsVersion), Ii(n.dataPlaneEventsBufferTimeout) || (n.dataPlaneEventsBufferTimeout = void 0), n.beaconQueueOptions = he(n.beaconQueueOptions), n.preConsent = he(n.preConsent), n.sourceConfigurationOverride = he(n.sourceConfigurationOverride), x(t, _t(n));
|
3191
|
+
}, ds = "dataplaneEventsQueue", fs = "destinationsEventsQueue", zc = "transformEvent", Kc = (t, e) => Object.keys(t).filter((n) => t[n] !== !0 || !e[n]).reduce((n, s) => {
|
3192
|
+
const i = I(n);
|
3164
3193
|
return i[s] = t[s], i;
|
3165
|
-
}, {}),
|
3166
|
-
const n =
|
3167
|
-
return n.integrations =
|
3168
|
-
},
|
3194
|
+
}, {}), Yc = (t, e) => {
|
3195
|
+
const n = I(t), s = e.nativeDestinations.integrationsConfig.value, i = Kc(t.integrations, s);
|
3196
|
+
return n.integrations = x(s, i), n;
|
3197
|
+
}, Wc = (t) => {
|
3169
3198
|
var e;
|
3170
3199
|
return t.consents.preConsent.value.enabled && ((e = t.consents.preConsent.value.events) == null ? void 0 : e.delivery) === "buffer";
|
3171
|
-
},
|
3172
|
-
if (
|
3200
|
+
}, Ct = (t, e, n, s) => {
|
3201
|
+
if (C(t))
|
3173
3202
|
if (S(t))
|
3174
3203
|
try {
|
3175
3204
|
t(...e);
|
3176
3205
|
} catch (i) {
|
3177
|
-
s.error(
|
3206
|
+
s.error(Ca(n), i);
|
3178
3207
|
}
|
3179
3208
|
else
|
3180
|
-
s.error(
|
3209
|
+
s.error(ei(n));
|
3181
3210
|
};
|
3182
|
-
class
|
3211
|
+
class Qc {
|
3183
3212
|
/**
|
3184
3213
|
*
|
3185
3214
|
* @param pluginsManager Plugins manager instance
|
@@ -3194,16 +3223,16 @@ class Wc {
|
|
3194
3223
|
* Initializes the event repository
|
3195
3224
|
*/
|
3196
3225
|
init() {
|
3197
|
-
this.dataplaneEventsQueue = this.pluginsManager.invokeSingle(`${
|
3226
|
+
this.dataplaneEventsQueue = this.pluginsManager.invokeSingle(`${ds}.init`, o, this.httpClient, this.storeManager, this.errorHandler, this.logger), this.dmtEventsQueue = this.pluginsManager.invokeSingle(`${zc}.init`, o, this.pluginsManager, this.httpClient, this.storeManager, this.errorHandler, this.logger), this.destinationsEventsQueue = this.pluginsManager.invokeSingle(`${fs}.init`, o, this.pluginsManager, this.storeManager, this.dmtEventsQueue, this.errorHandler, this.logger), ve(() => {
|
3198
3227
|
var s, i;
|
3199
3228
|
o.nativeDestinations.clientDestinationsReady.value === !0 && ((s = this.destinationsEventsQueue) == null || s.start(), (i = this.dmtEventsQueue) == null || i.start());
|
3200
3229
|
});
|
3201
|
-
const e =
|
3230
|
+
const e = Wc(o);
|
3202
3231
|
let n;
|
3203
|
-
|
3232
|
+
ve(() => {
|
3204
3233
|
var r, a;
|
3205
3234
|
const s = o.loadOptions.value.bufferDataPlaneEventsUntilReady === !0 && o.nativeDestinations.clientDestinationsReady.value === !1;
|
3206
|
-
(o.nativeDestinations.activeDestinations.value.some((u) =>
|
3235
|
+
(o.nativeDestinations.activeDestinations.value.some((u) => zl(u)) === !1 || s === !1) && !e && ((r = this.dataplaneEventsQueue) == null ? void 0 : r.scheduleTimeoutActive) !== !0 && (globalThis.clearTimeout(n), (a = this.dataplaneEventsQueue) == null || a.start());
|
3207
3236
|
}), o.loadOptions.value.bufferDataPlaneEventsUntilReady === !0 && (n = globalThis.setTimeout(() => {
|
3208
3237
|
var s, i;
|
3209
3238
|
((s = this.dataplaneEventsQueue) == null ? void 0 : s.scheduleTimeoutActive) !== !0 && ((i = this.dataplaneEventsQueue) == null || i.start());
|
@@ -3219,41 +3248,41 @@ class Wc {
|
|
3219
3248
|
* @param callback API callback function
|
3220
3249
|
*/
|
3221
3250
|
enqueue(e, n) {
|
3222
|
-
const s =
|
3223
|
-
this.pluginsManager.invokeSingle(`${
|
3224
|
-
const i =
|
3225
|
-
this.pluginsManager.invokeSingle(`${
|
3226
|
-
const r = `${e.type.charAt(0).toUpperCase()}${e.type.slice(1)}${
|
3227
|
-
|
3251
|
+
const s = Yc(e, o);
|
3252
|
+
this.pluginsManager.invokeSingle(`${ds}.enqueue`, o, this.dataplaneEventsQueue, s, this.errorHandler, this.logger);
|
3253
|
+
const i = I(e);
|
3254
|
+
this.pluginsManager.invokeSingle(`${fs}.enqueue`, o, this.destinationsEventsQueue, i, this.errorHandler, this.logger);
|
3255
|
+
const r = `${e.type.charAt(0).toUpperCase()}${e.type.slice(1)}${bn}`;
|
3256
|
+
Ct(n, [s], r, this.logger);
|
3228
3257
|
}
|
3229
3258
|
}
|
3230
|
-
const
|
3259
|
+
const hs = (t) => {
|
3231
3260
|
const e = new CustomEvent(t, { detail: { analyticsInstance: globalThis.rudderanalytics }, bubbles: !0, cancelable: !0, composed: !0 });
|
3232
3261
|
globalThis.document.dispatchEvent(e);
|
3233
|
-
},
|
3234
|
-
class
|
3262
|
+
}, Xc = (t) => U(t) && t.trim().length > 0, Jc = (t) => Ke(t);
|
3263
|
+
class Zc {
|
3235
3264
|
/**
|
3236
3265
|
* Initialize services and components or use default ones if singletons
|
3237
3266
|
*/
|
3238
3267
|
constructor() {
|
3239
|
-
this.preloadBuffer = new
|
3268
|
+
this.preloadBuffer = new Bo(), this.initialized = !1, this.errorHandler = ci, this.logger = ye, this.externalSrcLoader = new qs(this.logger), this.httpClient = ui, this.httpClient.init(this.errorHandler), this.capabilitiesManager = new Ic(this.httpClient, this.errorHandler, this.logger);
|
3240
3269
|
}
|
3241
3270
|
/**
|
3242
3271
|
* Start application lifecycle if not already started
|
3243
3272
|
*/
|
3244
3273
|
load(e, n, s = {}) {
|
3245
3274
|
if (!o.lifecycle.status.value) {
|
3246
|
-
if (!
|
3247
|
-
this.logger.error(
|
3275
|
+
if (!Xc(e)) {
|
3276
|
+
this.logger.error(ra(jt, e));
|
3248
3277
|
return;
|
3249
3278
|
}
|
3250
|
-
if (!
|
3251
|
-
this.logger.error(
|
3279
|
+
if (!Jc(n)) {
|
3280
|
+
this.logger.error(oa(jt, n));
|
3252
3281
|
return;
|
3253
3282
|
}
|
3254
3283
|
j(() => {
|
3255
|
-
o.lifecycle.writeKey.value =
|
3256
|
-
}), this.logger.setMinLogLevel(o.loadOptions.value.logLevel ??
|
3284
|
+
o.lifecycle.writeKey.value = I(e), o.lifecycle.dataPlaneUrl.value = I(n), o.loadOptions.value = qc(o.loadOptions.value, s), o.lifecycle.status.value = "mounted";
|
3285
|
+
}), this.logger.setMinLogLevel(o.loadOptions.value.logLevel ?? Js), ut("state", o, e), this.startLifecycle();
|
3257
3286
|
}
|
3258
3287
|
}
|
3259
3288
|
// Start lifecycle methods
|
@@ -3261,7 +3290,7 @@ class Jc {
|
|
3261
3290
|
* Orchestrate the lifecycle of the application phases/status
|
3262
3291
|
*/
|
3263
3292
|
startLifecycle() {
|
3264
|
-
|
3293
|
+
ve(() => {
|
3265
3294
|
try {
|
3266
3295
|
switch (o.lifecycle.status.value) {
|
3267
3296
|
case "mounted":
|
@@ -3297,12 +3326,13 @@ class Jc {
|
|
3297
3326
|
break;
|
3298
3327
|
}
|
3299
3328
|
} catch (e) {
|
3300
|
-
|
3329
|
+
const n = "Failed to load the SDK";
|
3330
|
+
this.errorHandler.onError({ error: e, context: jt, customMessage: n, groupingHash: n });
|
3301
3331
|
}
|
3302
3332
|
});
|
3303
3333
|
}
|
3304
3334
|
onBrowserCapabilitiesReady() {
|
3305
|
-
|
3335
|
+
Co(this), this.prepareInternalServices(), this.loadConfig();
|
3306
3336
|
}
|
3307
3337
|
onLoaded() {
|
3308
3338
|
this.processBufferedEvents(), o.consents.preConsent.value.enabled === !0 ? o.lifecycle.status.value = "ready" : this.loadDestinations();
|
@@ -3317,7 +3347,7 @@ class Jc {
|
|
3317
3347
|
* Enqueue in SDK preload buffer events, used from preloadBuffer component
|
3318
3348
|
*/
|
3319
3349
|
enqueuePreloadBufferEvents(e) {
|
3320
|
-
Array.isArray(e) && e.forEach((n) => this.preloadBuffer.enqueue(
|
3350
|
+
Array.isArray(e) && e.forEach((n) => this.preloadBuffer.enqueue(I(n)));
|
3321
3351
|
}
|
3322
3352
|
/**
|
3323
3353
|
* Process the buffer preloaded events by passing their arguments to the respective facade methods
|
@@ -3325,11 +3355,11 @@ class Jc {
|
|
3325
3355
|
processDataInPreloadBuffer() {
|
3326
3356
|
for (; this.preloadBuffer.size() > 0; ) {
|
3327
3357
|
const e = this.preloadBuffer.dequeue();
|
3328
|
-
e &&
|
3358
|
+
e && _o([...e], this);
|
3329
3359
|
}
|
3330
3360
|
}
|
3331
3361
|
prepareInternalServices() {
|
3332
|
-
this.pluginsManager = new
|
3362
|
+
this.pluginsManager = new tu(jl, this.errorHandler, this.logger), this.storeManager = new Ku(this.pluginsManager, this.errorHandler, this.logger), this.configManager = new yc(this.httpClient, this.errorHandler, this.logger), this.userSessionManager = new Gc(this.pluginsManager, this.storeManager, this.httpClient, this.errorHandler, this.logger), this.eventRepository = new Qc(this.pluginsManager, this.storeManager, this.httpClient, this.errorHandler, this.logger), this.eventManager = new Hc(this.eventRepository, this.userSessionManager, this.errorHandler, this.logger);
|
3333
3363
|
}
|
3334
3364
|
/**
|
3335
3365
|
* Load configuration
|
@@ -3358,9 +3388,9 @@ class Jc {
|
|
3358
3388
|
onInitialized() {
|
3359
3389
|
this.processDataInPreloadBuffer();
|
3360
3390
|
const e = o.loadOptions.value.onLoaded;
|
3361
|
-
|
3391
|
+
Ct(e, [globalThis.rudderanalytics], Qr, this.logger), j(() => {
|
3362
3392
|
o.lifecycle.loaded.value = !0, o.lifecycle.status.value = "loaded";
|
3363
|
-
}), this.initialized = !0,
|
3393
|
+
}), this.initialized = !0, hs("RSA_Initialised");
|
3364
3394
|
}
|
3365
3395
|
/**
|
3366
3396
|
* Emit ready event
|
@@ -3368,8 +3398,8 @@ class Jc {
|
|
3368
3398
|
// eslint-disable-next-line class-methods-use-this
|
3369
3399
|
onReady() {
|
3370
3400
|
o.lifecycle.status.value = "readyExecuted", o.eventBuffer.readyCallbacksArray.value.forEach((e) => {
|
3371
|
-
|
3372
|
-
}),
|
3401
|
+
Ct(e, [], Gt, this.logger);
|
3402
|
+
}), hs("RSA_Ready");
|
3373
3403
|
}
|
3374
3404
|
/**
|
3375
3405
|
* Consume preloaded events buffer
|
@@ -3398,7 +3428,7 @@ class Jc {
|
|
3398
3428
|
o.lifecycle.status.value = "destinationsReady";
|
3399
3429
|
return;
|
3400
3430
|
}
|
3401
|
-
o.lifecycle.status.value = "destinationsLoading", (s = this.pluginsManager) == null || s.invokeSingle("nativeDestinations.load", o, this.externalSrcLoader, this.errorHandler, this.logger),
|
3431
|
+
o.lifecycle.status.value = "destinationsLoading", (s = this.pluginsManager) == null || s.invokeSingle("nativeDestinations.load", o, this.externalSrcLoader, this.errorHandler, this.logger), ve(() => {
|
3402
3432
|
(e === 0 || o.nativeDestinations.initializedDestinations.value.length + o.nativeDestinations.failedDestinations.value.length === e) && j(() => {
|
3403
3433
|
o.lifecycle.status.value = "destinationsReady", o.nativeDestinations.clientDestinationsReady.value = !0;
|
3404
3434
|
});
|
@@ -3420,10 +3450,10 @@ class Jc {
|
|
3420
3450
|
return;
|
3421
3451
|
}
|
3422
3452
|
if (this.errorHandler.leaveBreadcrumb(`New ${s} invocation`), !S(e)) {
|
3423
|
-
this.logger.error(
|
3453
|
+
this.logger.error(ei(Gt));
|
3424
3454
|
return;
|
3425
3455
|
}
|
3426
|
-
o.lifecycle.status.value === "readyExecuted" ?
|
3456
|
+
o.lifecycle.status.value === "readyExecuted" ? Ct(e, [], Gt, this.logger) : o.eventBuffer.readyCallbacksArray.value = [...o.eventBuffer.readyCallbacksArray.value, e];
|
3427
3457
|
}
|
3428
3458
|
page(e, n = !1) {
|
3429
3459
|
var i;
|
@@ -3432,10 +3462,10 @@ class Jc {
|
|
3432
3462
|
o.eventBuffer.toBeProcessedArray.value = [...o.eventBuffer.toBeProcessedArray.value, [s, e]];
|
3433
3463
|
return;
|
3434
3464
|
}
|
3435
|
-
this.errorHandler.leaveBreadcrumb(`New ${s} event`), o.metrics.triggered.value += 1, (i = this.eventManager) == null || i.addEvent({ type: "page", category: e.category, name: e.name, properties: e.properties, options: e.options, callback: e.callback }), o.capabilities.isAdBlocked.value === !0 && e.category !== Mn && this.page(
|
3465
|
+
this.errorHandler.leaveBreadcrumb(`New ${s} event`), o.metrics.triggered.value += 1, (i = this.eventManager) == null || i.addEvent({ type: "page", category: e.category, name: e.name, properties: e.properties, options: e.options, callback: e.callback }), o.capabilities.isAdBlocked.value === !0 && e.category !== Mn && this.page(Nt(Mn, po, {
|
3436
3466
|
// 'title' is intentionally omitted as it does not make sense
|
3437
3467
|
// in v3 implementation
|
3438
|
-
path:
|
3468
|
+
path: vo
|
3439
3469
|
}, o.loadOptions.value.sendAdblockPageOptions));
|
3440
3470
|
}
|
3441
3471
|
track(e, n = !1) {
|
@@ -3546,17 +3576,17 @@ class Jc {
|
|
3546
3576
|
}
|
3547
3577
|
this.errorHandler.leaveBreadcrumb("New consent invocation"), j(() => {
|
3548
3578
|
o.consents.preConsent.value = { ...o.consents.preConsent.value, enabled: !1 }, o.consents.postConsent.value = rc(e);
|
3549
|
-
const { initialized: l, consentsData: c } =
|
3579
|
+
const { initialized: l, consentsData: c } = Si(o.consents.postConsent.value.consentManagement, this.logger);
|
3550
3580
|
o.consents.initialized.value = l, o.consents.data.value = c;
|
3551
3581
|
}), o.consents.enabled.value && !o.consents.initialized.value && ((i = this.pluginsManager) == null || i.invokeSingle("consentManager.updateConsentsInfo", o, this.storeManager, this.logger)), (r = this.storeManager) == null || r.initializeStorageState(), (a = this.userSessionManager) == null || a.syncStorageDataToState(), (u = this.eventManager) == null || u.resume(), this.loadDestinations(), this.sendTrackingEvents(n);
|
3552
3582
|
}
|
3553
3583
|
sendTrackingEvents(e) {
|
3554
3584
|
if (o.consents.postConsent.value.trackConsent) {
|
3555
|
-
const n =
|
3585
|
+
const n = yn(yo);
|
3556
3586
|
e ? o.eventBuffer.toBeProcessedArray.value = [...o.eventBuffer.toBeProcessedArray.value, ["track", n]] : this.track(n);
|
3557
3587
|
}
|
3558
3588
|
if (o.consents.postConsent.value.sendPageEvent) {
|
3559
|
-
const n =
|
3589
|
+
const n = Nt();
|
3560
3590
|
e ? o.eventBuffer.toBeProcessedArray.value = [...o.eventBuffer.toBeProcessedArray.value, ["page", n]] : this.page(n);
|
3561
3591
|
}
|
3562
3592
|
}
|
@@ -3570,19 +3600,19 @@ const _e = class _e {
|
|
3570
3600
|
// Singleton with constructor bind methods
|
3571
3601
|
constructor() {
|
3572
3602
|
// END-NO-SONAR-SCAN
|
3573
|
-
|
3574
|
-
|
3575
|
-
|
3603
|
+
N(this, "analyticsInstances", {});
|
3604
|
+
N(this, "defaultAnalyticsKey", "");
|
3605
|
+
N(this, "logger", ye);
|
3576
3606
|
try {
|
3577
3607
|
if (_e.globalSingleton)
|
3578
3608
|
return _e.globalSingleton;
|
3579
|
-
_e.initializeGlobalResources(), this.setDefaultInstanceKey = this.setDefaultInstanceKey.bind(this), this.getAnalyticsInstance = this.getAnalyticsInstance.bind(this), this.load = this.load.bind(this), this.ready = this.ready.bind(this), this.triggerBufferedLoadEvent = this.triggerBufferedLoadEvent.bind(this), this.page = this.page.bind(this), this.track = this.track.bind(this), this.identify = this.identify.bind(this), this.alias = this.alias.bind(this), this.group = this.group.bind(this), this.reset = this.reset.bind(this), this.getAnonymousId = this.getAnonymousId.bind(this), this.setAnonymousId = this.setAnonymousId.bind(this), this.getUserId = this.getUserId.bind(this), this.getUserTraits = this.getUserTraits.bind(this), this.getGroupId = this.getGroupId.bind(this), this.getGroupTraits = this.getGroupTraits.bind(this), this.startSession = this.startSession.bind(this), this.endSession = this.endSession.bind(this), this.getSessionId = this.getSessionId.bind(this), this.setAuthToken = this.setAuthToken.bind(this), this.consent = this.consent.bind(this), _e.globalSingleton = this, o.autoTrack.pageLifecycle.pageViewId.value =
|
3609
|
+
_e.initializeGlobalResources(), this.setDefaultInstanceKey = this.setDefaultInstanceKey.bind(this), this.getAnalyticsInstance = this.getAnalyticsInstance.bind(this), this.load = this.load.bind(this), this.ready = this.ready.bind(this), this.triggerBufferedLoadEvent = this.triggerBufferedLoadEvent.bind(this), this.page = this.page.bind(this), this.track = this.track.bind(this), this.identify = this.identify.bind(this), this.alias = this.alias.bind(this), this.group = this.group.bind(this), this.reset = this.reset.bind(this), this.getAnonymousId = this.getAnonymousId.bind(this), this.setAnonymousId = this.setAnonymousId.bind(this), this.getUserId = this.getUserId.bind(this), this.getUserTraits = this.getUserTraits.bind(this), this.getGroupId = this.getGroupId.bind(this), this.getGroupTraits = this.getGroupTraits.bind(this), this.startSession = this.startSession.bind(this), this.endSession = this.endSession.bind(this), this.getSessionId = this.getSessionId.bind(this), this.setAuthToken = this.setAuthToken.bind(this), this.consent = this.consent.bind(this), _e.globalSingleton = this, o.autoTrack.pageLifecycle.pageViewId.value = Bt(), o.autoTrack.pageLifecycle.pageLoadedTimestamp.value = Date.now(), this.triggerBufferedLoadEvent(), globalThis.rudderanalytics = this;
|
3580
3610
|
} catch (e) {
|
3581
|
-
|
3611
|
+
B(e);
|
3582
3612
|
}
|
3583
3613
|
}
|
3584
3614
|
static initializeGlobalResources() {
|
3585
|
-
|
3615
|
+
ci.init(), An.configure(), In.configure(), On.configure(), Mt.configure();
|
3586
3616
|
}
|
3587
3617
|
/**
|
3588
3618
|
* Set instance to use if no specific writeKey is provided in methods
|
@@ -3590,7 +3620,7 @@ const _e = class _e {
|
|
3590
3620
|
* TODO: to support multiple analytics instances in the near future
|
3591
3621
|
*/
|
3592
3622
|
setDefaultInstanceKey(e) {
|
3593
|
-
|
3623
|
+
U(e) && e && (this.defaultAnalyticsKey = e);
|
3594
3624
|
}
|
3595
3625
|
/**
|
3596
3626
|
* Retrieve an existing analytics instance
|
@@ -3598,9 +3628,9 @@ const _e = class _e {
|
|
3598
3628
|
getAnalyticsInstance(e) {
|
3599
3629
|
try {
|
3600
3630
|
let n = e;
|
3601
|
-
return (!
|
3631
|
+
return (!U(n) || !n) && (n = this.defaultAnalyticsKey), !!this.analyticsInstances[n] || (this.analyticsInstances[n] = new Zc()), this.analyticsInstances[n];
|
3602
3632
|
} catch (n) {
|
3603
|
-
|
3633
|
+
B(n);
|
3604
3634
|
return;
|
3605
3635
|
}
|
3606
3636
|
}
|
@@ -3617,10 +3647,10 @@ const _e = class _e {
|
|
3617
3647
|
if (this.analyticsInstances[e])
|
3618
3648
|
return;
|
3619
3649
|
this.setDefaultInstanceKey(e), this.trackPageLifecycleEvents(s);
|
3620
|
-
const r =
|
3621
|
-
|
3650
|
+
const r = js(rt);
|
3651
|
+
Do(r), ut(rt, I(r)), (i = this.getAnalyticsInstance(e)) == null || i.load(e, n, A(s));
|
3622
3652
|
} catch (r) {
|
3623
|
-
|
3653
|
+
B(r);
|
3624
3654
|
}
|
3625
3655
|
}
|
3626
3656
|
/**
|
@@ -3629,7 +3659,7 @@ const _e = class _e {
|
|
3629
3659
|
* @returns
|
3630
3660
|
*/
|
3631
3661
|
trackPageLifecycleEvents(e) {
|
3632
|
-
const { autoTrack: n, useBeacon: s } = e ?? {}, { enabled: i = !1, options: r = {}, pageLifecycle: a } = n ?? {}, { events: u = [
|
3662
|
+
const { autoTrack: n, useBeacon: s } = e ?? {}, { enabled: i = !1, options: r = {}, pageLifecycle: a } = n ?? {}, { events: u = [Ht.UNLOADED], enabled: l = i, options: c = r } = a ?? {};
|
3633
3663
|
o.autoTrack.pageLifecycle.enabled.value = l, o.autoTrack.enabled.value = i || l, l && this.setupPageUnloadTracking(u, s, c);
|
3634
3664
|
}
|
3635
3665
|
/**
|
@@ -3639,20 +3669,20 @@ const _e = class _e {
|
|
3639
3669
|
* @param options
|
3640
3670
|
*/
|
3641
3671
|
setupPageUnloadTracking(e, n, s) {
|
3642
|
-
(e.length === 0 || e.includes(
|
3672
|
+
(e.length === 0 || e.includes(Ht.UNLOADED)) && (n === !0 ? so((i) => {
|
3643
3673
|
if (i === !1 && o.lifecycle.loaded.value) {
|
3644
3674
|
const r = Date.now(), a = r - o.autoTrack.pageLifecycle.pageLoadedTimestamp.value;
|
3645
|
-
this.track(
|
3675
|
+
this.track(Ht.UNLOADED, { timeOnPage: a }, { ...s, originalTimestamp: Vs(new Date(r)) });
|
3646
3676
|
}
|
3647
|
-
}) : this.logger.warn(
|
3677
|
+
}) : this.logger.warn(Ua(Jr)));
|
3648
3678
|
}
|
3649
3679
|
/**
|
3650
3680
|
* Trigger load event in buffer queue if exists and stores the
|
3651
3681
|
* remaining preloaded events array in global object
|
3652
3682
|
*/
|
3653
3683
|
triggerBufferedLoadEvent() {
|
3654
|
-
const e = Array.isArray(globalThis.rudderanalytics) ? globalThis.rudderanalytics : [], n =
|
3655
|
-
|
3684
|
+
const e = Array.isArray(globalThis.rudderanalytics) ? globalThis.rudderanalytics : [], n = Ao(e);
|
3685
|
+
ut(rt, I([...e])), n.length > 0 && (n.shift(), this.load.apply(null, n));
|
3656
3686
|
}
|
3657
3687
|
/**
|
3658
3688
|
* Get ready callback arguments and forward to ready call
|
@@ -3662,7 +3692,7 @@ const _e = class _e {
|
|
3662
3692
|
try {
|
3663
3693
|
(n = this.getAnalyticsInstance()) == null || n.ready(A(e));
|
3664
3694
|
} catch (s) {
|
3665
|
-
|
3695
|
+
B(s);
|
3666
3696
|
}
|
3667
3697
|
}
|
3668
3698
|
/**
|
@@ -3672,9 +3702,9 @@ const _e = class _e {
|
|
3672
3702
|
page(e, n, s, i, r) {
|
3673
3703
|
var a;
|
3674
3704
|
try {
|
3675
|
-
(a = this.getAnalyticsInstance()) == null || a.page(
|
3705
|
+
(a = this.getAnalyticsInstance()) == null || a.page(Nt(A(e), A(n), A(s), A(i), A(r)));
|
3676
3706
|
} catch (u) {
|
3677
|
-
|
3707
|
+
B(u);
|
3678
3708
|
}
|
3679
3709
|
}
|
3680
3710
|
/**
|
@@ -3684,9 +3714,9 @@ const _e = class _e {
|
|
3684
3714
|
track(e, n, s, i) {
|
3685
3715
|
var r;
|
3686
3716
|
try {
|
3687
|
-
(r = this.getAnalyticsInstance()) == null || r.track(
|
3717
|
+
(r = this.getAnalyticsInstance()) == null || r.track(yn(A(e), A(n), A(s), A(i)));
|
3688
3718
|
} catch (a) {
|
3689
|
-
|
3719
|
+
B(a);
|
3690
3720
|
}
|
3691
3721
|
}
|
3692
3722
|
/**
|
@@ -3696,9 +3726,9 @@ const _e = class _e {
|
|
3696
3726
|
identify(e, n, s, i) {
|
3697
3727
|
var r;
|
3698
3728
|
try {
|
3699
|
-
(r = this.getAnalyticsInstance()) == null || r.identify(
|
3729
|
+
(r = this.getAnalyticsInstance()) == null || r.identify(Ms(A(e), A(n), A(s), A(i)));
|
3700
3730
|
} catch (a) {
|
3701
|
-
|
3731
|
+
B(a);
|
3702
3732
|
}
|
3703
3733
|
}
|
3704
3734
|
/**
|
@@ -3708,9 +3738,9 @@ const _e = class _e {
|
|
3708
3738
|
alias(e, n, s, i) {
|
3709
3739
|
var r;
|
3710
3740
|
try {
|
3711
|
-
(r = this.getAnalyticsInstance()) == null || r.alias(
|
3741
|
+
(r = this.getAnalyticsInstance()) == null || r.alias($s(A(e), A(n), A(s), A(i)));
|
3712
3742
|
} catch (a) {
|
3713
|
-
|
3743
|
+
B(a);
|
3714
3744
|
}
|
3715
3745
|
}
|
3716
3746
|
/**
|
@@ -3720,9 +3750,9 @@ const _e = class _e {
|
|
3720
3750
|
group(e, n, s, i) {
|
3721
3751
|
var r;
|
3722
3752
|
try {
|
3723
|
-
(r = this.getAnalyticsInstance()) == null || r.group(
|
3753
|
+
(r = this.getAnalyticsInstance()) == null || r.group(Us(A(e), A(n), A(s), A(i)));
|
3724
3754
|
} catch (a) {
|
3725
|
-
|
3755
|
+
B(a);
|
3726
3756
|
}
|
3727
3757
|
}
|
3728
3758
|
reset(e) {
|
@@ -3730,7 +3760,7 @@ const _e = class _e {
|
|
3730
3760
|
try {
|
3731
3761
|
(n = this.getAnalyticsInstance()) == null || n.reset(A(e));
|
3732
3762
|
} catch (s) {
|
3733
|
-
|
3763
|
+
B(s);
|
3734
3764
|
}
|
3735
3765
|
}
|
3736
3766
|
getAnonymousId(e) {
|
@@ -3738,7 +3768,7 @@ const _e = class _e {
|
|
3738
3768
|
try {
|
3739
3769
|
return (n = this.getAnalyticsInstance()) == null ? void 0 : n.getAnonymousId(A(e));
|
3740
3770
|
} catch (s) {
|
3741
|
-
|
3771
|
+
B(s);
|
3742
3772
|
return;
|
3743
3773
|
}
|
3744
3774
|
}
|
@@ -3747,7 +3777,7 @@ const _e = class _e {
|
|
3747
3777
|
try {
|
3748
3778
|
(s = this.getAnalyticsInstance()) == null || s.setAnonymousId(A(e), A(n));
|
3749
3779
|
} catch (i) {
|
3750
|
-
|
3780
|
+
B(i);
|
3751
3781
|
}
|
3752
3782
|
}
|
3753
3783
|
getUserId() {
|
@@ -3755,7 +3785,7 @@ const _e = class _e {
|
|
3755
3785
|
try {
|
3756
3786
|
return (e = this.getAnalyticsInstance()) == null ? void 0 : e.getUserId();
|
3757
3787
|
} catch (n) {
|
3758
|
-
|
3788
|
+
B(n);
|
3759
3789
|
return;
|
3760
3790
|
}
|
3761
3791
|
}
|
@@ -3764,7 +3794,7 @@ const _e = class _e {
|
|
3764
3794
|
try {
|
3765
3795
|
return (e = this.getAnalyticsInstance()) == null ? void 0 : e.getUserTraits();
|
3766
3796
|
} catch (n) {
|
3767
|
-
|
3797
|
+
B(n);
|
3768
3798
|
return;
|
3769
3799
|
}
|
3770
3800
|
}
|
@@ -3773,7 +3803,7 @@ const _e = class _e {
|
|
3773
3803
|
try {
|
3774
3804
|
return (e = this.getAnalyticsInstance()) == null ? void 0 : e.getGroupId();
|
3775
3805
|
} catch (n) {
|
3776
|
-
|
3806
|
+
B(n);
|
3777
3807
|
return;
|
3778
3808
|
}
|
3779
3809
|
}
|
@@ -3782,7 +3812,7 @@ const _e = class _e {
|
|
3782
3812
|
try {
|
3783
3813
|
return (e = this.getAnalyticsInstance()) == null ? void 0 : e.getGroupTraits();
|
3784
3814
|
} catch (n) {
|
3785
|
-
|
3815
|
+
B(n);
|
3786
3816
|
return;
|
3787
3817
|
}
|
3788
3818
|
}
|
@@ -3791,7 +3821,7 @@ const _e = class _e {
|
|
3791
3821
|
try {
|
3792
3822
|
(n = this.getAnalyticsInstance()) == null || n.startSession(A(e));
|
3793
3823
|
} catch (s) {
|
3794
|
-
|
3824
|
+
B(s);
|
3795
3825
|
}
|
3796
3826
|
}
|
3797
3827
|
endSession() {
|
@@ -3799,7 +3829,7 @@ const _e = class _e {
|
|
3799
3829
|
try {
|
3800
3830
|
(e = this.getAnalyticsInstance()) == null || e.endSession();
|
3801
3831
|
} catch (n) {
|
3802
|
-
|
3832
|
+
B(n);
|
3803
3833
|
}
|
3804
3834
|
}
|
3805
3835
|
getSessionId() {
|
@@ -3807,7 +3837,7 @@ const _e = class _e {
|
|
3807
3837
|
try {
|
3808
3838
|
return (e = this.getAnalyticsInstance()) == null ? void 0 : e.getSessionId();
|
3809
3839
|
} catch (n) {
|
3810
|
-
|
3840
|
+
B(n);
|
3811
3841
|
return;
|
3812
3842
|
}
|
3813
3843
|
}
|
@@ -3816,7 +3846,7 @@ const _e = class _e {
|
|
3816
3846
|
try {
|
3817
3847
|
(n = this.getAnalyticsInstance()) == null || n.setAuthToken(A(e));
|
3818
3848
|
} catch (s) {
|
3819
|
-
|
3849
|
+
B(s);
|
3820
3850
|
}
|
3821
3851
|
}
|
3822
3852
|
consent(e) {
|
@@ -3824,27 +3854,27 @@ const _e = class _e {
|
|
3824
3854
|
try {
|
3825
3855
|
(n = this.getAnalyticsInstance()) == null || n.consent(A(e));
|
3826
3856
|
} catch (s) {
|
3827
|
-
|
3857
|
+
B(s);
|
3828
3858
|
}
|
3829
3859
|
}
|
3830
3860
|
};
|
3831
3861
|
// START-NO-SONAR-SCAN
|
3832
3862
|
// eslint-disable-next-line sonarjs/public-static-readonly
|
3833
|
-
|
3834
|
-
let
|
3835
|
-
const
|
3836
|
-
[
|
3837
|
-
[
|
3838
|
-
[
|
3839
|
-
[
|
3840
|
-
[
|
3841
|
-
},
|
3863
|
+
N(_e, "globalSingleton", null);
|
3864
|
+
let fn = _e;
|
3865
|
+
const ed = {
|
3866
|
+
[Je.Production]: "2R6mT9xSJCcbvr6JkiEu7vbrUSW",
|
3867
|
+
[Je.Sandbox]: "2R6mEpjiTJBErRIn724pt2MWyLA",
|
3868
|
+
[Je.Staging]: "2R6llJi7YSuOeJToPXGlQfizt18",
|
3869
|
+
[Je.CiCd]: "2QHmFAx84bL4Up6CDHRw0XkKJKC",
|
3870
|
+
[Je.Local]: "2QHmFAx84bL4Up6CDHRw0XkKJKC"
|
3871
|
+
}, td = "https://revolugohxxwg.dataplane.rudderstack.com", nd = window.RevolugoElements.config.apiEnvironment, sd = ed[nd], Ai = new fn();
|
3842
3872
|
try {
|
3843
|
-
|
3873
|
+
Ai.load(sd, td);
|
3844
3874
|
} catch (t) {
|
3845
3875
|
console.error(t);
|
3846
3876
|
}
|
3847
|
-
const
|
3877
|
+
const Di = {
|
3848
3878
|
adultCount: {
|
3849
3879
|
type: Number
|
3850
3880
|
},
|
@@ -3860,10 +3890,10 @@ const Ii = {
|
|
3860
3890
|
startDate: {
|
3861
3891
|
type: String
|
3862
3892
|
}
|
3863
|
-
},
|
3893
|
+
}, Ci = hn({
|
3864
3894
|
components: {
|
3865
|
-
BPhoneInput:
|
3866
|
-
BSearchLocationInput:
|
3895
|
+
BPhoneInput: ur,
|
3896
|
+
BSearchLocationInput: rr
|
3867
3897
|
},
|
3868
3898
|
data() {
|
3869
3899
|
return {
|
@@ -3911,7 +3941,7 @@ const Ii = {
|
|
3911
3941
|
var e, n;
|
3912
3942
|
this.isSubmitting = !0;
|
3913
3943
|
let t = ((e = this.config.eventMetadata) == null ? void 0 : e.name) || "";
|
3914
|
-
(n = this.config.eventMetadata) != null && n.slug && (t += ` ${this.config.eventMetadata.slug}`),
|
3944
|
+
(n = this.config.eventMetadata) != null && n.slug && (t += ` ${this.config.eventMetadata.slug}`), Ai.track(
|
3915
3945
|
"accommodation-request",
|
3916
3946
|
{
|
3917
3947
|
data: {
|
@@ -3928,15 +3958,15 @@ const Ii = {
|
|
3928
3958
|
}
|
3929
3959
|
},
|
3930
3960
|
name: "ContactForm",
|
3931
|
-
props:
|
3961
|
+
props: Di,
|
3932
3962
|
setup() {
|
3933
|
-
const { t } =
|
3963
|
+
const { t } = gn();
|
3934
3964
|
return {
|
3935
3965
|
t
|
3936
3966
|
};
|
3937
3967
|
}
|
3938
3968
|
});
|
3939
|
-
function
|
3969
|
+
function gs(t) {
|
3940
3970
|
const e = t;
|
3941
3971
|
e.__i18n = e.__i18n || [], e.__i18n.push({
|
3942
3972
|
locale: "",
|
@@ -4105,7 +4135,7 @@ function fs(t) {
|
|
4105
4135
|
}
|
4106
4136
|
});
|
4107
4137
|
}
|
4108
|
-
const
|
4138
|
+
const _i = Ie({
|
4109
4139
|
active: {
|
4110
4140
|
type: [String, Array],
|
4111
4141
|
default: void 0
|
@@ -4115,15 +4145,15 @@ const Oi = Te({
|
|
4115
4145
|
default: null
|
4116
4146
|
},
|
4117
4147
|
nextIcon: {
|
4118
|
-
type:
|
4148
|
+
type: vt,
|
4119
4149
|
default: "$next"
|
4120
4150
|
},
|
4121
4151
|
prevIcon: {
|
4122
|
-
type:
|
4152
|
+
type: vt,
|
4123
4153
|
default: "$prev"
|
4124
4154
|
},
|
4125
4155
|
modeIcon: {
|
4126
|
-
type:
|
4156
|
+
type: vt,
|
4127
4157
|
default: "$subgroup"
|
4128
4158
|
},
|
4129
4159
|
text: String,
|
@@ -4131,9 +4161,9 @@ const Oi = Te({
|
|
4131
4161
|
type: String,
|
4132
4162
|
default: "month"
|
4133
4163
|
}
|
4134
|
-
}, "VDatePickerControls"),
|
4164
|
+
}, "VDatePickerControls"), ms = Me()({
|
4135
4165
|
name: "VDatePickerControls",
|
4136
|
-
props:
|
4166
|
+
props: _i(),
|
4137
4167
|
emits: {
|
4138
4168
|
"click:year": () => !0,
|
4139
4169
|
"click:month": () => !0,
|
@@ -4176,7 +4206,7 @@ const Oi = Te({
|
|
4176
4206
|
icon: t.modeIcon,
|
4177
4207
|
variant: "text",
|
4178
4208
|
onClick: c
|
4179
|
-
}, null), b(
|
4209
|
+
}, null), b(fr, null, null), b("div", {
|
4180
4210
|
class: "v-date-picker-controls__month"
|
4181
4211
|
}, [b(ae, {
|
4182
4212
|
"data-testid": "prev-month",
|
@@ -4192,15 +4222,15 @@ const Oi = Te({
|
|
4192
4222
|
onClick: l
|
4193
4223
|
}, null)])])), {};
|
4194
4224
|
}
|
4195
|
-
}),
|
4196
|
-
appendIcon:
|
4225
|
+
}), id = Ie({
|
4226
|
+
appendIcon: vt,
|
4197
4227
|
color: String,
|
4198
4228
|
header: String,
|
4199
4229
|
transition: String,
|
4200
|
-
onClick:
|
4201
|
-
}, "VDatePickerHeader"),
|
4230
|
+
onClick: Fi()
|
4231
|
+
}, "VDatePickerHeader"), ps = Me()({
|
4202
4232
|
name: "VDatePickerHeader",
|
4203
|
-
props:
|
4233
|
+
props: id(),
|
4204
4234
|
emits: {
|
4205
4235
|
click: () => !0,
|
4206
4236
|
"click:append": () => !0
|
@@ -4213,7 +4243,7 @@ const Oi = Te({
|
|
4213
4243
|
const {
|
4214
4244
|
backgroundColorClasses: i,
|
4215
4245
|
backgroundColorStyles: r
|
4216
|
-
} =
|
4246
|
+
} = Ps(t, "color");
|
4217
4247
|
function a() {
|
4218
4248
|
n("click");
|
4219
4249
|
}
|
@@ -4231,7 +4261,7 @@ const Oi = Te({
|
|
4231
4261
|
}, [s.prepend && b("div", {
|
4232
4262
|
key: "prepend",
|
4233
4263
|
class: "v-date-picker-header__prepend"
|
4234
|
-
}, [s.prepend()]), l && b(
|
4264
|
+
}, [s.prepend()]), l && b(Ns, {
|
4235
4265
|
key: "content",
|
4236
4266
|
name: t.transition
|
4237
4267
|
}, {
|
@@ -4244,7 +4274,7 @@ const Oi = Te({
|
|
4244
4274
|
}
|
4245
4275
|
}), c && b("div", {
|
4246
4276
|
class: "v-date-picker-header__append"
|
4247
|
-
}, [s.append ? b(
|
4277
|
+
}, [s.append ? b(Ut, {
|
4248
4278
|
key: "append-defaults",
|
4249
4279
|
disabled: !t.appendIcon,
|
4250
4280
|
defaults: {
|
@@ -4266,7 +4296,7 @@ const Oi = Te({
|
|
4266
4296
|
}, null)])]);
|
4267
4297
|
}), {};
|
4268
4298
|
}
|
4269
|
-
}),
|
4299
|
+
}), rd = Ie({
|
4270
4300
|
allowedDates: [Array, Function],
|
4271
4301
|
disabled: {
|
4272
4302
|
type: Boolean,
|
@@ -4289,8 +4319,8 @@ const Oi = Te({
|
|
4289
4319
|
},
|
4290
4320
|
firstDayOfWeek: [Number, String]
|
4291
4321
|
}, "calendar");
|
4292
|
-
function
|
4293
|
-
const e =
|
4322
|
+
function od(t) {
|
4323
|
+
const e = dt(), n = Le(t, "modelValue", [], (f) => yt(f)), s = $(() => t.displayValue ? e.date(t.displayValue) : n.value.length > 0 ? e.date(n.value[0]) : t.min ? e.date(t.min) : Array.isArray(t.allowedDates) ? e.date(t.allowedDates[0]) : e.date()), i = Le(t, "year", void 0, (f) => {
|
4294
4324
|
const m = f != null ? Number(f) : e.getYear(s.value);
|
4295
4325
|
return e.startOfYear(e.setYear(e.date(), m));
|
4296
4326
|
}, (f) => e.getYear(f)), r = Le(t, "month", void 0, (f) => {
|
@@ -4304,14 +4334,14 @@ function rd(t) {
|
|
4304
4334
|
if (t.weeksInMonth === "static" && m.length < v) {
|
4305
4335
|
const k = m[m.length - 1];
|
4306
4336
|
let E = [];
|
4307
|
-
for (let
|
4308
|
-
E.push(e.addDays(k,
|
4337
|
+
for (let P = 1; P <= v - m.length; P++)
|
4338
|
+
E.push(e.addDays(k, P)), P % 7 === 0 && (f.push(E), E = []);
|
4309
4339
|
}
|
4310
4340
|
return f;
|
4311
4341
|
});
|
4312
4342
|
function c(f, m) {
|
4313
4343
|
return f.filter((v) => u.value.includes(e.toJsDate(v).getDay())).map((v, k) => {
|
4314
|
-
const E = e.toISO(v),
|
4344
|
+
const E = e.toISO(v), P = !e.isSameMonth(v, r.value), z = e.isSameDay(v, e.startOfMonth(r.value)), H = e.isSameDay(v, e.endOfMonth(r.value)), J = e.isSameDay(v, r.value);
|
4315
4345
|
return {
|
4316
4346
|
date: v,
|
4317
4347
|
isoDate: E,
|
@@ -4322,11 +4352,11 @@ function rd(t) {
|
|
4322
4352
|
isWeekStart: k % 7 === 0,
|
4323
4353
|
isWeekEnd: k % 7 === 6,
|
4324
4354
|
isToday: e.isSameDay(v, m),
|
4325
|
-
isAdjacent:
|
4326
|
-
isHidden:
|
4355
|
+
isAdjacent: P,
|
4356
|
+
isHidden: P && !t.showAdjacentMonths,
|
4327
4357
|
isStart: z,
|
4328
4358
|
isSelected: n.value.some((fe) => e.isSameDay(v, fe)),
|
4329
|
-
isEnd:
|
4359
|
+
isEnd: H,
|
4330
4360
|
isSame: J,
|
4331
4361
|
localized: e.format(v, "dayOfMonth")
|
4332
4362
|
};
|
@@ -4341,7 +4371,7 @@ function rd(t) {
|
|
4341
4371
|
}), h = $(() => {
|
4342
4372
|
const f = l.value.flat(), m = e.date();
|
4343
4373
|
return c(f, m);
|
4344
|
-
}), y = $(() => l.value.map((f) => f.length ?
|
4374
|
+
}), y = $(() => l.value.map((f) => f.length ? xi(e, f[0]) : null));
|
4345
4375
|
function g(f) {
|
4346
4376
|
if (t.disabled) return !0;
|
4347
4377
|
const m = e.date(f);
|
@@ -4358,7 +4388,7 @@ function rd(t) {
|
|
4358
4388
|
weekNumbers: y
|
4359
4389
|
};
|
4360
4390
|
}
|
4361
|
-
const
|
4391
|
+
const Pi = Ie({
|
4362
4392
|
color: String,
|
4363
4393
|
hideWeekdays: Boolean,
|
4364
4394
|
multiple: [Boolean, Number, String],
|
@@ -4371,10 +4401,10 @@ const Ai = Te({
|
|
4371
4401
|
type: String,
|
4372
4402
|
default: "picker-reverse-transition"
|
4373
4403
|
},
|
4374
|
-
...
|
4375
|
-
}, "VDatePickerMonth"),
|
4404
|
+
...at(rd(), ["displayValue"])
|
4405
|
+
}, "VDatePickerMonth"), vs = Me()({
|
4376
4406
|
name: "VDatePickerMonth",
|
4377
|
-
props:
|
4407
|
+
props: Pi(),
|
4378
4408
|
emits: {
|
4379
4409
|
"update:modelValue": (t) => !0,
|
4380
4410
|
"update:month": (t) => !0,
|
@@ -4385,17 +4415,17 @@ const Ai = Te({
|
|
4385
4415
|
emit: n,
|
4386
4416
|
slots: s
|
4387
4417
|
} = e;
|
4388
|
-
const i =
|
4418
|
+
const i = Jt(), {
|
4389
4419
|
daysInMonth: r,
|
4390
4420
|
model: a,
|
4391
4421
|
weekNumbers: u
|
4392
|
-
} =
|
4422
|
+
} = od(t), l = dt(), c = bt(), d = bt(), h = bt(!1), y = $(() => h.value ? t.reverseTransition : t.transition);
|
4393
4423
|
t.multiple === "range" && a.value.length > 0 && (c.value = a.value[0], a.value.length > 1 && (d.value = a.value[a.value.length - 1]));
|
4394
4424
|
const g = $(() => {
|
4395
4425
|
const k = ["number", "string"].includes(typeof t.multiple) ? Number(t.multiple) : 1 / 0;
|
4396
4426
|
return a.value.length >= k;
|
4397
4427
|
});
|
4398
|
-
|
4428
|
+
Ts(r, (k, E) => {
|
4399
4429
|
E && (h.value = l.isBefore(k[0].date, E[0].date));
|
4400
4430
|
});
|
4401
4431
|
function f(k) {
|
@@ -4409,21 +4439,21 @@ const Ai = Te({
|
|
4409
4439
|
c.value = void 0, a.value = [];
|
4410
4440
|
return;
|
4411
4441
|
} else l.isBefore(E, c.value) ? (d.value = l.endOfDay(c.value), c.value = E) : d.value = l.endOfDay(E);
|
4412
|
-
const
|
4413
|
-
for (let
|
4414
|
-
const J = l.addDays(c.value,
|
4442
|
+
const P = l.getDiff(d.value, c.value, "days"), z = [c.value];
|
4443
|
+
for (let H = 1; H < P; H++) {
|
4444
|
+
const J = l.addDays(c.value, H);
|
4415
4445
|
z.push(J);
|
4416
4446
|
}
|
4417
4447
|
z.push(d.value), a.value = z;
|
4418
4448
|
}
|
4419
4449
|
}
|
4420
4450
|
function m(k) {
|
4421
|
-
const E = a.value.findIndex((
|
4451
|
+
const E = a.value.findIndex((P) => l.isSameDay(P, k));
|
4422
4452
|
if (E === -1)
|
4423
4453
|
a.value = [...a.value, k];
|
4424
4454
|
else {
|
4425
|
-
const
|
4426
|
-
|
4455
|
+
const P = [...a.value];
|
4456
|
+
P.splice(E, 1), a.value = P;
|
4427
4457
|
}
|
4428
4458
|
}
|
4429
4459
|
function v(k) {
|
@@ -4439,7 +4469,7 @@ const Ai = Te({
|
|
4439
4469
|
class: "v-date-picker-month__day"
|
4440
4470
|
}, [je(" ")]), u.value.map((k) => b("div", {
|
4441
4471
|
class: ["v-date-picker-month__day", "v-date-picker-month__day--adjacent"]
|
4442
|
-
}, [k]))]), b(
|
4472
|
+
}, [k]))]), b(Ns, {
|
4443
4473
|
name: y.value
|
4444
4474
|
}, {
|
4445
4475
|
default: () => {
|
@@ -4450,13 +4480,13 @@ const Ai = Te({
|
|
4450
4480
|
class: "v-date-picker-month__days"
|
4451
4481
|
}, [!t.hideWeekdays && l.getWeekdays(t.firstDayOfWeek).map((E) => b("div", {
|
4452
4482
|
class: ["v-date-picker-month__day", "v-date-picker-month__weekday"]
|
4453
|
-
}, [E])), r.value.map((E,
|
4483
|
+
}, [E])), r.value.map((E, P) => {
|
4454
4484
|
const z = {
|
4455
4485
|
props: {
|
4456
4486
|
onClick: () => v(E.date)
|
4457
4487
|
},
|
4458
4488
|
item: E,
|
4459
|
-
i:
|
4489
|
+
i: P
|
4460
4490
|
};
|
4461
4491
|
return g.value && !E.isSelected && (E.isDisabled = !0), b("div", {
|
4462
4492
|
class: ["v-date-picker-month__day", {
|
@@ -4467,7 +4497,7 @@ const Ai = Te({
|
|
4467
4497
|
"v-date-picker-month__day--week-start": E.isWeekStart
|
4468
4498
|
}],
|
4469
4499
|
"data-v-date": E.isDisabled ? void 0 : E.isoDate
|
4470
|
-
}, [(t.showAdjacentMonths || !E.isAdjacent) && b(
|
4500
|
+
}, [(t.showAdjacentMonths || !E.isAdjacent) && b(Ut, {
|
4471
4501
|
defaults: {
|
4472
4502
|
VBtn: {
|
4473
4503
|
class: "v-date-picker-month__day-btn",
|
@@ -4482,24 +4512,24 @@ const Ai = Te({
|
|
4482
4512
|
}
|
4483
4513
|
}, {
|
4484
4514
|
default: () => {
|
4485
|
-
var
|
4486
|
-
return [((
|
4515
|
+
var H;
|
4516
|
+
return [((H = s.day) == null ? void 0 : H.call(s, z)) ?? b(ae, z.props, null)];
|
4487
4517
|
}
|
4488
4518
|
})]);
|
4489
4519
|
})])];
|
4490
4520
|
}
|
4491
4521
|
})]);
|
4492
4522
|
}
|
4493
|
-
}),
|
4523
|
+
}), Ni = Ie({
|
4494
4524
|
color: String,
|
4495
4525
|
height: [String, Number],
|
4496
4526
|
min: null,
|
4497
4527
|
max: null,
|
4498
4528
|
modelValue: Number,
|
4499
4529
|
year: Number
|
4500
|
-
}, "VDatePickerMonths"),
|
4530
|
+
}, "VDatePickerMonths"), ys = Me()({
|
4501
4531
|
name: "VDatePickerMonths",
|
4502
|
-
props:
|
4532
|
+
props: Ni(),
|
4503
4533
|
emits: {
|
4504
4534
|
"update:modelValue": (t) => !0
|
4505
4535
|
},
|
@@ -4508,9 +4538,9 @@ const Ai = Te({
|
|
4508
4538
|
emit: n,
|
4509
4539
|
slots: s
|
4510
4540
|
} = e;
|
4511
|
-
const i =
|
4541
|
+
const i = dt(), r = Le(t, "modelValue"), a = $(() => {
|
4512
4542
|
let u = i.startOfYear(i.date());
|
4513
|
-
return t.year && (u = i.setYear(u, t.year)),
|
4543
|
+
return t.year && (u = i.setYear(u, t.year)), Is(12).map((l) => {
|
4514
4544
|
const c = i.format(u, "monthShort"), d = !!(t.min && i.isAfter(i.startOfMonth(i.date(t.min)), u) || t.max && i.isAfter(u, i.startOfMonth(i.date(t.max))));
|
4515
4545
|
return u = i.getNextMonth(u), {
|
4516
4546
|
isDisabled: d,
|
@@ -4519,12 +4549,12 @@ const Ai = Te({
|
|
4519
4549
|
};
|
4520
4550
|
});
|
4521
4551
|
});
|
4522
|
-
return
|
4552
|
+
return Os(() => {
|
4523
4553
|
r.value = r.value ?? i.getMonth(i.date());
|
4524
4554
|
}), Ye(() => b("div", {
|
4525
4555
|
class: "v-date-picker-months",
|
4526
4556
|
style: {
|
4527
|
-
height:
|
4557
|
+
height: As(t.height)
|
4528
4558
|
}
|
4529
4559
|
}, [b("div", {
|
4530
4560
|
class: "v-date-picker-months__content"
|
@@ -4555,15 +4585,15 @@ const Ai = Te({
|
|
4555
4585
|
}, c), null);
|
4556
4586
|
})])])), {};
|
4557
4587
|
}
|
4558
|
-
}),
|
4588
|
+
}), Li = Ie({
|
4559
4589
|
color: String,
|
4560
4590
|
height: [String, Number],
|
4561
4591
|
min: null,
|
4562
4592
|
max: null,
|
4563
4593
|
modelValue: Number
|
4564
|
-
}, "VDatePickerYears"),
|
4594
|
+
}, "VDatePickerYears"), bs = Me()({
|
4565
4595
|
name: "VDatePickerYears",
|
4566
|
-
props:
|
4596
|
+
props: Li(),
|
4567
4597
|
emits: {
|
4568
4598
|
"update:modelValue": (t) => !0
|
4569
4599
|
},
|
@@ -4572,12 +4602,12 @@ const Ai = Te({
|
|
4572
4602
|
emit: n,
|
4573
4603
|
slots: s
|
4574
4604
|
} = e;
|
4575
|
-
const i =
|
4605
|
+
const i = dt(), r = Le(t, "modelValue"), a = $(() => {
|
4576
4606
|
const l = i.getYear(i.date());
|
4577
4607
|
let c = l - 100, d = l + 52;
|
4578
4608
|
t.min && (c = i.getYear(i.date(t.min))), t.max && (d = i.getYear(i.date(t.max)));
|
4579
4609
|
let h = i.startOfYear(i.date());
|
4580
|
-
return h = i.setYear(h, c),
|
4610
|
+
return h = i.setYear(h, c), Is(d - c + 1, c).map((y) => {
|
4581
4611
|
const g = i.format(h, "year");
|
4582
4612
|
return h = i.setYear(h, i.getYear(h) + 1), {
|
4583
4613
|
text: g,
|
@@ -4585,19 +4615,19 @@ const Ai = Te({
|
|
4585
4615
|
};
|
4586
4616
|
});
|
4587
4617
|
});
|
4588
|
-
|
4618
|
+
Os(() => {
|
4589
4619
|
r.value = r.value ?? i.getYear(i.date());
|
4590
4620
|
});
|
4591
|
-
const u =
|
4592
|
-
return
|
4621
|
+
const u = Hi();
|
4622
|
+
return Gi(async () => {
|
4593
4623
|
var l;
|
4594
|
-
await
|
4624
|
+
await ji(), (l = u.el) == null || l.scrollIntoView({
|
4595
4625
|
block: "center"
|
4596
4626
|
});
|
4597
4627
|
}), Ye(() => b("div", {
|
4598
4628
|
class: "v-date-picker-years",
|
4599
4629
|
style: {
|
4600
|
-
height:
|
4630
|
+
height: As(t.height)
|
4601
4631
|
}
|
4602
4632
|
}, [b("div", {
|
4603
4633
|
class: "v-date-picker-years__content"
|
@@ -4627,15 +4657,15 @@ const Ai = Te({
|
|
4627
4657
|
}, d), null);
|
4628
4658
|
})])])), {};
|
4629
4659
|
}
|
4630
|
-
}),
|
4660
|
+
}), ad = gr("v-picker-title"), wi = Ie({
|
4631
4661
|
bgColor: String,
|
4632
4662
|
landscape: Boolean,
|
4633
4663
|
title: String,
|
4634
4664
|
hideHeader: Boolean,
|
4635
|
-
...
|
4636
|
-
}, "VPicker"),
|
4665
|
+
...pr()
|
4666
|
+
}, "VPicker"), Es = Me()({
|
4637
4667
|
name: "VPicker",
|
4638
|
-
props:
|
4668
|
+
props: wi(),
|
4639
4669
|
setup(t, e) {
|
4640
4670
|
let {
|
4641
4671
|
slots: n
|
@@ -4643,7 +4673,7 @@ const Ai = Te({
|
|
4643
4673
|
const {
|
4644
4674
|
backgroundColorClasses: s,
|
4645
4675
|
backgroundColorStyles: i
|
4646
|
-
} =
|
4676
|
+
} = Ps(qi(t, "color"));
|
4647
4677
|
return Ye(() => {
|
4648
4678
|
const r = Cn.filterProps(t), a = !!(t.title || n.title);
|
4649
4679
|
return b(Cn, re(r, {
|
@@ -4660,7 +4690,7 @@ const Ai = Te({
|
|
4660
4690
|
key: "header",
|
4661
4691
|
class: [s.value],
|
4662
4692
|
style: [i.value]
|
4663
|
-
}, [a && b(
|
4693
|
+
}, [a && b(ad, {
|
4664
4694
|
key: "picker-title"
|
4665
4695
|
}, {
|
4666
4696
|
default: () => {
|
@@ -4671,7 +4701,7 @@ const Ai = Te({
|
|
4671
4701
|
class: "v-picker__header"
|
4672
4702
|
}, [n.header()])]), b("div", {
|
4673
4703
|
class: "v-picker__body"
|
4674
|
-
}, [(u = n.default) == null ? void 0 : u.call(n)]), n.actions && b(
|
4704
|
+
}, [(u = n.default) == null ? void 0 : u.call(n)]), n.actions && b(Ut, {
|
4675
4705
|
defaults: {
|
4676
4706
|
VBtn: {
|
4677
4707
|
slim: !0,
|
@@ -4687,7 +4717,7 @@ const Ai = Te({
|
|
4687
4717
|
});
|
4688
4718
|
}), {};
|
4689
4719
|
}
|
4690
|
-
}),
|
4720
|
+
}), ld = Ie({
|
4691
4721
|
// TODO: implement in v3.5
|
4692
4722
|
// calendarIcon: {
|
4693
4723
|
// type: String,
|
@@ -4713,19 +4743,19 @@ const Ai = Te({
|
|
4713
4743
|
type: String,
|
4714
4744
|
default: "$vuetify.datePicker.header"
|
4715
4745
|
},
|
4716
|
-
...
|
4717
|
-
...
|
4746
|
+
..._i(),
|
4747
|
+
...Pi({
|
4718
4748
|
weeksInMonth: "static"
|
4719
4749
|
}),
|
4720
|
-
...
|
4721
|
-
...
|
4722
|
-
...
|
4750
|
+
...at(Ni(), ["modelValue"]),
|
4751
|
+
...at(Li(), ["modelValue"]),
|
4752
|
+
...wi({
|
4723
4753
|
title: "$vuetify.datePicker.title"
|
4724
4754
|
}),
|
4725
4755
|
modelValue: null
|
4726
|
-
}, "VDatePicker"),
|
4756
|
+
}, "VDatePicker"), Ss = Me()({
|
4727
4757
|
name: "VDatePicker",
|
4728
|
-
props:
|
4758
|
+
props: ld(),
|
4729
4759
|
emits: {
|
4730
4760
|
"update:modelValue": (t) => !0,
|
4731
4761
|
"update:month": (t) => !0,
|
@@ -4738,72 +4768,72 @@ const Ai = Te({
|
|
4738
4768
|
emit: n,
|
4739
4769
|
slots: s
|
4740
4770
|
} = e;
|
4741
|
-
const i =
|
4771
|
+
const i = dt(), {
|
4742
4772
|
t: r
|
4743
|
-
} =
|
4744
|
-
const
|
4745
|
-
return t.min && i.isValid(
|
4773
|
+
} = zi(), a = Le(t, "modelValue", void 0, (T) => yt(T), (T) => t.multiple ? T : T[0]), u = Le(t, "viewMode"), l = $(() => {
|
4774
|
+
const T = i.date(t.min);
|
4775
|
+
return t.min && i.isValid(T) ? T : null;
|
4746
4776
|
}), c = $(() => {
|
4747
|
-
const
|
4748
|
-
return t.max && i.isValid(
|
4777
|
+
const T = i.date(t.max);
|
4778
|
+
return t.max && i.isValid(T) ? T : null;
|
4749
4779
|
}), d = $(() => {
|
4750
4780
|
var se;
|
4751
|
-
const
|
4752
|
-
let V =
|
4753
|
-
return (se = a.value) != null && se[0] ? V = i.date(a.value[0]) : l.value && i.isBefore(
|
4754
|
-
}), h =
|
4755
|
-
let
|
4756
|
-
return
|
4781
|
+
const T = i.date();
|
4782
|
+
let V = T;
|
4783
|
+
return (se = a.value) != null && se[0] ? V = i.date(a.value[0]) : l.value && i.isBefore(T, l.value) ? V = l.value : c.value && i.isAfter(T, c.value) && (V = c.value), V && i.isValid(V) ? V : T;
|
4784
|
+
}), h = Jt(Number(t.month ?? i.getMonth(i.startOfMonth(d.value)))), y = Jt(Number(t.year ?? i.getYear(i.startOfYear(i.setMonth(d.value, h.value))))), g = bt(!1), f = $(() => t.multiple && a.value.length > 1 ? r("$vuetify.datePicker.itemsSelected", a.value.length) : a.value[0] && i.isValid(a.value[0]) ? i.format(i.date(a.value[0]), "normalDateWithWeekday") : r(t.header)), m = $(() => {
|
4785
|
+
let T = i.date();
|
4786
|
+
return T = i.setDate(T, 1), T = i.setMonth(T, h.value), T = i.setYear(T, y.value), i.format(T, "monthAndYear");
|
4757
4787
|
}), v = $(() => `date-picker-header${g.value ? "-reverse" : ""}-transition`), k = $(() => {
|
4758
4788
|
if (t.disabled) return !0;
|
4759
|
-
const
|
4789
|
+
const T = [];
|
4760
4790
|
if (u.value !== "month")
|
4761
|
-
|
4791
|
+
T.push("prev", "next");
|
4762
4792
|
else {
|
4763
4793
|
let V = i.date();
|
4764
4794
|
if (V = i.startOfMonth(V), V = i.setMonth(V, h.value), V = i.setYear(V, y.value), l.value) {
|
4765
4795
|
const se = i.addDays(i.startOfMonth(V), -1);
|
4766
|
-
i.isAfter(l.value, se) &&
|
4796
|
+
i.isAfter(l.value, se) && T.push("prev");
|
4767
4797
|
}
|
4768
4798
|
if (c.value) {
|
4769
4799
|
const se = i.addDays(i.endOfMonth(V), 1);
|
4770
|
-
i.isAfter(se, c.value) &&
|
4800
|
+
i.isAfter(se, c.value) && T.push("next");
|
4771
4801
|
}
|
4772
4802
|
}
|
4773
|
-
return
|
4803
|
+
return T;
|
4774
4804
|
});
|
4775
4805
|
function E() {
|
4776
4806
|
h.value < 11 ? h.value++ : (y.value++, h.value = 0, Oe(y.value)), fe(h.value);
|
4777
4807
|
}
|
4778
|
-
function
|
4808
|
+
function P() {
|
4779
4809
|
h.value > 0 ? h.value-- : (y.value--, h.value = 11, Oe(y.value)), fe(h.value);
|
4780
4810
|
}
|
4781
4811
|
function z() {
|
4782
4812
|
u.value = "month";
|
4783
4813
|
}
|
4784
|
-
function
|
4814
|
+
function H() {
|
4785
4815
|
u.value = u.value === "months" ? "month" : "months";
|
4786
4816
|
}
|
4787
4817
|
function J() {
|
4788
4818
|
u.value = u.value === "year" ? "month" : "year";
|
4789
4819
|
}
|
4790
|
-
function fe(
|
4791
|
-
u.value === "months" &&
|
4820
|
+
function fe(T) {
|
4821
|
+
u.value === "months" && H(), n("update:month", T);
|
4792
4822
|
}
|
4793
|
-
function Oe(
|
4794
|
-
u.value === "year" && J(), n("update:year",
|
4823
|
+
function Oe(T) {
|
4824
|
+
u.value === "year" && J(), n("update:year", T);
|
4795
4825
|
}
|
4796
|
-
return
|
4797
|
-
const se =
|
4798
|
-
if (!
|
4799
|
-
const
|
4800
|
-
$e !== h.value && (h.value = $e, fe(h.value)), F !== y.value && (y.value = F, Oe(y.value)), g.value = i.isBefore(
|
4826
|
+
return Ts(a, (T, V) => {
|
4827
|
+
const se = yt(V), Qe = yt(T);
|
4828
|
+
if (!Qe.length) return;
|
4829
|
+
const Ft = i.date(se[se.length - 1]), Xe = i.date(Qe[Qe.length - 1]), $e = i.getMonth(Xe), F = i.getYear(Xe);
|
4830
|
+
$e !== h.value && (h.value = $e, fe(h.value)), F !== y.value && (y.value = F, Oe(y.value)), g.value = i.isBefore(Ft, Xe);
|
4801
4831
|
}), Ye(() => {
|
4802
|
-
const
|
4832
|
+
const T = Es.filterProps(t), V = ms.filterProps(t), se = ps.filterProps(t), Qe = vs.filterProps(t), Ft = at(ys.filterProps(t), ["modelValue"]), Xe = at(bs.filterProps(t), ["modelValue"]), $e = {
|
4803
4833
|
header: f.value,
|
4804
4834
|
transition: v.value
|
4805
4835
|
};
|
4806
|
-
return b(
|
4836
|
+
return b(Es, re(T, {
|
4807
4837
|
class: ["v-date-picker", `v-date-picker--${u.value}`, {
|
4808
4838
|
"v-date-picker--show-week": t.showWeek
|
4809
4839
|
}, t.class],
|
@@ -4815,7 +4845,7 @@ const Ai = Te({
|
|
4815
4845
|
class: "v-date-picker__title"
|
4816
4846
|
}, [r(t.title)]);
|
4817
4847
|
},
|
4818
|
-
header: () => s.header ? b(
|
4848
|
+
header: () => s.header ? b(Ut, {
|
4819
4849
|
defaults: {
|
4820
4850
|
VDatePickerHeader: {
|
4821
4851
|
...$e
|
@@ -4826,7 +4856,7 @@ const Ai = Te({
|
|
4826
4856
|
var F;
|
4827
4857
|
return [(F = s.header) == null ? void 0 : F.call(s, $e)];
|
4828
4858
|
}
|
4829
|
-
}) : b(
|
4859
|
+
}) : b(ps, re({
|
4830
4860
|
key: "header"
|
4831
4861
|
}, se, $e, {
|
4832
4862
|
onClick: u.value !== "month" ? z : void 0
|
@@ -4834,34 +4864,34 @@ const Ai = Te({
|
|
4834
4864
|
...s,
|
4835
4865
|
default: void 0
|
4836
4866
|
}),
|
4837
|
-
default: () => b(
|
4867
|
+
default: () => b(xe, null, [b(ms, re(V, {
|
4838
4868
|
disabled: k.value,
|
4839
4869
|
text: m.value,
|
4840
4870
|
"onClick:next": E,
|
4841
|
-
"onClick:prev":
|
4842
|
-
"onClick:month":
|
4871
|
+
"onClick:prev": P,
|
4872
|
+
"onClick:month": H,
|
4843
4873
|
"onClick:year": J
|
4844
|
-
}), null), b(
|
4874
|
+
}), null), b(hr, {
|
4845
4875
|
hideOnLeave: !0
|
4846
4876
|
}, {
|
4847
|
-
default: () => [u.value === "months" ? b(
|
4877
|
+
default: () => [u.value === "months" ? b(ys, re({
|
4848
4878
|
key: "date-picker-months"
|
4849
|
-
},
|
4879
|
+
}, Ft, {
|
4850
4880
|
modelValue: h.value,
|
4851
4881
|
"onUpdate:modelValue": [(F) => h.value = F, fe],
|
4852
4882
|
min: l.value,
|
4853
4883
|
max: c.value,
|
4854
4884
|
year: y.value
|
4855
|
-
}), null) : u.value === "year" ? b(
|
4885
|
+
}), null) : u.value === "year" ? b(bs, re({
|
4856
4886
|
key: "date-picker-years"
|
4857
|
-
},
|
4887
|
+
}, Xe, {
|
4858
4888
|
modelValue: y.value,
|
4859
4889
|
"onUpdate:modelValue": [(F) => y.value = F, Oe],
|
4860
4890
|
min: l.value,
|
4861
4891
|
max: c.value
|
4862
|
-
}), null) : b(
|
4892
|
+
}), null) : b(vs, re({
|
4863
4893
|
key: "date-picker-month"
|
4864
|
-
},
|
4894
|
+
}, Qe, {
|
4865
4895
|
modelValue: a.value,
|
4866
4896
|
"onUpdate:modelValue": (F) => a.value = F,
|
4867
4897
|
month: h.value,
|
@@ -4876,17 +4906,17 @@ const Ai = Te({
|
|
4876
4906
|
});
|
4877
4907
|
}), {};
|
4878
4908
|
}
|
4879
|
-
}),
|
4880
|
-
function
|
4909
|
+
}), ud = { class: "d-flex justify-end" };
|
4910
|
+
function cd(t, e, n, s, i, r) {
|
4881
4911
|
const a = oe("BPhoneInput"), u = oe("BSearchLocationInput");
|
4882
|
-
return M(),
|
4883
|
-
b(
|
4912
|
+
return M(), me("div", null, [
|
4913
|
+
b(vr, {
|
4884
4914
|
modelValue: t.isFormValid,
|
4885
4915
|
"onUpdate:modelValue": e[13] || (e[13] = (l) => t.isFormValid = l),
|
4886
4916
|
style: { gap: "8px", display: "flex", flexDirection: "column" }
|
4887
4917
|
}, {
|
4888
|
-
default:
|
4889
|
-
b(
|
4918
|
+
default: _(() => [
|
4919
|
+
b(Ze, {
|
4890
4920
|
modelValue: t.formData.email,
|
4891
4921
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.formData.email = l),
|
4892
4922
|
density: "compact",
|
@@ -4896,8 +4926,8 @@ function ud(t, e, n, s, i, r) {
|
|
4896
4926
|
rules: t.rules.email,
|
4897
4927
|
color: "primary"
|
4898
4928
|
}, {
|
4899
|
-
message:
|
4900
|
-
je(
|
4929
|
+
message: _(({ message: l }) => [
|
4930
|
+
je(He(t.t(l)), 1)
|
4901
4931
|
]),
|
4902
4932
|
_: 1
|
4903
4933
|
}, 8, ["modelValue", "label", "rules"]),
|
@@ -4906,10 +4936,10 @@ function ud(t, e, n, s, i, r) {
|
|
4906
4936
|
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.formData.phoneData = l),
|
4907
4937
|
class: "mt-0"
|
4908
4938
|
}, null, 8, ["modelValue"]),
|
4909
|
-
b(
|
4910
|
-
default:
|
4939
|
+
b(it, { class: "mt-0" }, {
|
4940
|
+
default: _(() => [
|
4911
4941
|
b(Pe, null, {
|
4912
|
-
default:
|
4942
|
+
default: _(() => [
|
4913
4943
|
b(Dn, {
|
4914
4944
|
modelValue: t.menuStartDate,
|
4915
4945
|
"onUpdate:modelValue": e[4] || (e[4] = (l) => t.menuStartDate = l),
|
@@ -4917,8 +4947,8 @@ function ud(t, e, n, s, i, r) {
|
|
4917
4947
|
"min-width": "auto",
|
4918
4948
|
transition: "scale-transition"
|
4919
4949
|
}, {
|
4920
|
-
activator:
|
4921
|
-
b(
|
4950
|
+
activator: _(({ props: l }) => [
|
4951
|
+
b(Ze, re({
|
4922
4952
|
"model-value": t.formatDate(t.formData.startDate),
|
4923
4953
|
density: "compact",
|
4924
4954
|
"hide-details": "",
|
@@ -4928,8 +4958,8 @@ function ud(t, e, n, s, i, r) {
|
|
4928
4958
|
required: ""
|
4929
4959
|
}, l, { color: "primary" }), null, 16, ["model-value", "label"])
|
4930
4960
|
]),
|
4931
|
-
default:
|
4932
|
-
b(
|
4961
|
+
default: _(() => [
|
4962
|
+
b(Ss, {
|
4933
4963
|
modelValue: t.formData.startDate,
|
4934
4964
|
"onUpdate:modelValue": [
|
4935
4965
|
e[2] || (e[2] = (l) => t.formData.startDate = l),
|
@@ -4943,7 +4973,7 @@ function ud(t, e, n, s, i, r) {
|
|
4943
4973
|
_: 1
|
4944
4974
|
}),
|
4945
4975
|
b(Pe, null, {
|
4946
|
-
default:
|
4976
|
+
default: _(() => [
|
4947
4977
|
b(Dn, {
|
4948
4978
|
modelValue: t.menuEndDate,
|
4949
4979
|
"onUpdate:modelValue": e[7] || (e[7] = (l) => t.menuEndDate = l),
|
@@ -4951,8 +4981,8 @@ function ud(t, e, n, s, i, r) {
|
|
4951
4981
|
"min-width": "auto",
|
4952
4982
|
transition: "scale-transition"
|
4953
4983
|
}, {
|
4954
|
-
activator:
|
4955
|
-
b(
|
4984
|
+
activator: _(({ props: l }) => [
|
4985
|
+
b(Ze, re({
|
4956
4986
|
"model-value": t.formatDate(t.formData.endDate),
|
4957
4987
|
density: "compact",
|
4958
4988
|
"hide-details": "",
|
@@ -4962,8 +4992,8 @@ function ud(t, e, n, s, i, r) {
|
|
4962
4992
|
required: ""
|
4963
4993
|
}, l, { color: "primary" }), null, 16, ["model-value", "label"])
|
4964
4994
|
]),
|
4965
|
-
default:
|
4966
|
-
b(
|
4995
|
+
default: _(() => [
|
4996
|
+
b(Ss, {
|
4967
4997
|
modelValue: t.formData.endDate,
|
4968
4998
|
"onUpdate:modelValue": [
|
4969
4999
|
e[5] || (e[5] = (l) => t.formData.endDate = l),
|
@@ -4979,11 +5009,11 @@ function ud(t, e, n, s, i, r) {
|
|
4979
5009
|
]),
|
4980
5010
|
_: 1
|
4981
5011
|
}),
|
4982
|
-
b(
|
4983
|
-
default:
|
5012
|
+
b(it, null, {
|
5013
|
+
default: _(() => [
|
4984
5014
|
b(Pe, null, {
|
4985
|
-
default:
|
4986
|
-
b(
|
5015
|
+
default: _(() => [
|
5016
|
+
b(Ze, {
|
4987
5017
|
modelValue: t.formData.adultCount,
|
4988
5018
|
"onUpdate:modelValue": e[8] || (e[8] = (l) => t.formData.adultCount = l),
|
4989
5019
|
density: "compact",
|
@@ -5000,8 +5030,8 @@ function ud(t, e, n, s, i, r) {
|
|
5000
5030
|
_: 1
|
5001
5031
|
}),
|
5002
5032
|
b(Pe, null, {
|
5003
|
-
default:
|
5004
|
-
b(
|
5033
|
+
default: _(() => [
|
5034
|
+
b(Ze, {
|
5005
5035
|
modelValue: t.formData.roomCount,
|
5006
5036
|
"onUpdate:modelValue": e[9] || (e[9] = (l) => t.formData.roomCount = l),
|
5007
5037
|
density: "compact",
|
@@ -5027,7 +5057,7 @@ function ud(t, e, n, s, i, r) {
|
|
5027
5057
|
variant: "outlined",
|
5028
5058
|
"with-details": ""
|
5029
5059
|
}, null, 8, ["modelValue"]),
|
5030
|
-
b(
|
5060
|
+
b(cr, {
|
5031
5061
|
modelValue: t.formData.specificRequest,
|
5032
5062
|
"onUpdate:modelValue": e[11] || (e[11] = (l) => t.formData.specificRequest = l),
|
5033
5063
|
density: "compact",
|
@@ -5035,7 +5065,7 @@ function ud(t, e, n, s, i, r) {
|
|
5035
5065
|
variant: "outlined",
|
5036
5066
|
color: "primary"
|
5037
5067
|
}, null, 8, ["modelValue", "label"]),
|
5038
|
-
|
5068
|
+
Zt("div", ud, [
|
5039
5069
|
b(ae, {
|
5040
5070
|
color: t.isSuccess ? "green" : "primary",
|
5041
5071
|
"data-cy": "submit-button",
|
@@ -5044,8 +5074,8 @@ function ud(t, e, n, s, i, r) {
|
|
5044
5074
|
loading: t.isSubmitting,
|
5045
5075
|
onClick: e[12] || (e[12] = (l) => t.onSubmit())
|
5046
5076
|
}, {
|
5047
|
-
default:
|
5048
|
-
je(
|
5077
|
+
default: _(() => [
|
5078
|
+
je(He(t.t("ContactForm.submit")), 1)
|
5049
5079
|
]),
|
5050
5080
|
_: 1
|
5051
5081
|
}, 8, ["color", "disabled", "loading"])
|
@@ -5055,9 +5085,9 @@ function ud(t, e, n, s, i, r) {
|
|
5055
5085
|
}, 8, ["modelValue"])
|
5056
5086
|
]);
|
5057
5087
|
}
|
5058
|
-
typeof
|
5059
|
-
const
|
5060
|
-
...
|
5088
|
+
typeof gs == "function" && gs(Ci);
|
5089
|
+
const dd = /* @__PURE__ */ mn(Ci, [["render", cd]]), fd = {
|
5090
|
+
...Di,
|
5061
5091
|
boilerplateSkeleton: {
|
5062
5092
|
type: Boolean
|
5063
5093
|
},
|
@@ -5074,11 +5104,11 @@ const cd = /* @__PURE__ */ pn(Ti, [["render", ud]]), dd = {
|
|
5074
5104
|
type: {
|
5075
5105
|
type: String
|
5076
5106
|
}
|
5077
|
-
},
|
5107
|
+
}, Mi = hn({
|
5078
5108
|
components: {
|
5079
|
-
BErrorOverlay:
|
5080
|
-
ContactForm:
|
5081
|
-
HotelOfferItemLayout:
|
5109
|
+
BErrorOverlay: dr,
|
5110
|
+
ContactForm: dd,
|
5111
|
+
HotelOfferItemLayout: _s
|
5082
5112
|
},
|
5083
5113
|
computed: {
|
5084
5114
|
wording() {
|
@@ -5147,11 +5177,11 @@ const cd = /* @__PURE__ */ pn(Ti, [["render", ud]]), dd = {
|
|
5147
5177
|
this.$emit("reset-filters");
|
5148
5178
|
}
|
5149
5179
|
},
|
5150
|
-
mixins: [
|
5180
|
+
mixins: [Ds],
|
5151
5181
|
name: "HotelOfferListEmpty",
|
5152
|
-
props:
|
5182
|
+
props: fd,
|
5153
5183
|
setup() {
|
5154
|
-
const { t } =
|
5184
|
+
const { t } = gn();
|
5155
5185
|
return {
|
5156
5186
|
t
|
5157
5187
|
};
|
@@ -5165,7 +5195,7 @@ const cd = /* @__PURE__ */ pn(Ti, [["render", ud]]), dd = {
|
|
5165
5195
|
}
|
5166
5196
|
}
|
5167
5197
|
});
|
5168
|
-
function
|
5198
|
+
function ks(t) {
|
5169
5199
|
const e = t;
|
5170
5200
|
e.__i18n = e.__i18n || [], e.__i18n.push({
|
5171
5201
|
locale: "",
|
@@ -5341,31 +5371,31 @@ function Es(t) {
|
|
5341
5371
|
}
|
5342
5372
|
});
|
5343
5373
|
}
|
5344
|
-
const
|
5345
|
-
function
|
5374
|
+
const hd = { class: "position-relative" };
|
5375
|
+
function gd(t, e, n, s, i, r) {
|
5346
5376
|
const a = oe("HotelOfferItemLayout"), u = oe("ContactForm"), l = oe("BErrorOverlay");
|
5347
|
-
return M(),
|
5348
|
-
(M(),
|
5377
|
+
return M(), me("div", hd, [
|
5378
|
+
(M(), me(xe, null, Cs(6, (c) => (M(), me(xe, { key: c }, [
|
5349
5379
|
b(a, {
|
5350
5380
|
boilerplate: t.boilerplateSkeleton,
|
5351
|
-
class:
|
5381
|
+
class: Et({
|
5352
5382
|
"mt-0": c === 1,
|
5353
5383
|
"mb-0": c === t.itemCount,
|
5354
5384
|
"mb-2": t.$breakpointService.xs
|
5355
5385
|
})
|
5356
5386
|
}, null, 8, ["boilerplate", "class"]),
|
5357
|
-
t.$breakpointService.xs ? Z("", !0) : (M(), Q(
|
5387
|
+
t.$breakpointService.xs ? Z("", !0) : (M(), Q(en, { key: 0 }))
|
5358
5388
|
], 64))), 64)),
|
5359
5389
|
t.typeData ? (M(), Q(l, {
|
5360
5390
|
key: 0,
|
5361
5391
|
"z-index": 0
|
5362
5392
|
}, {
|
5363
|
-
title:
|
5364
|
-
je(
|
5393
|
+
title: _(() => [
|
5394
|
+
je(He(t.wording.title), 1)
|
5365
5395
|
]),
|
5366
|
-
description:
|
5367
|
-
|
5368
|
-
|
5396
|
+
description: _(() => [
|
5397
|
+
Zt("div", null, [
|
5398
|
+
Zt("p", null, He(t.wording.description), 1),
|
5369
5399
|
t.typeData !== "noResultsFiltered" && t.typeData !== "accommodationSuccess" ? (M(), Q(u, {
|
5370
5400
|
key: 0,
|
5371
5401
|
"adult-count": t.adultCount,
|
@@ -5382,8 +5412,8 @@ function hd(t, e, n, s, i, r) {
|
|
5382
5412
|
size: "small",
|
5383
5413
|
onClick: t.onResetFilters
|
5384
5414
|
}, {
|
5385
|
-
default:
|
5386
|
-
je(
|
5415
|
+
default: _(() => [
|
5416
|
+
je(He(t.t("HotelOfferListEmpty.noResultsFiltered.reset")), 1)
|
5387
5417
|
]),
|
5388
5418
|
_: 1
|
5389
5419
|
}, 8, ["onClick"])) : Z("", !0)
|
@@ -5393,36 +5423,36 @@ function hd(t, e, n, s, i, r) {
|
|
5393
5423
|
})) : Z("", !0)
|
5394
5424
|
]);
|
5395
5425
|
}
|
5396
|
-
typeof
|
5397
|
-
const
|
5426
|
+
typeof ks == "function" && ks(Mi);
|
5427
|
+
const md = /* @__PURE__ */ mn(Mi, [["render", gd]]), $i = hn({
|
5398
5428
|
components: {
|
5399
|
-
BHotelOffersFilterBar:
|
5400
|
-
BHotelSearchBar:
|
5401
|
-
HotelOfferItem:
|
5402
|
-
HotelOfferItemLayout:
|
5403
|
-
HotelOfferListEmpty:
|
5404
|
-
HotelRoomOfferList:
|
5405
|
-
TermsAndConditions:
|
5429
|
+
BHotelOffersFilterBar: lr,
|
5430
|
+
BHotelSearchBar: br,
|
5431
|
+
HotelOfferItem: ar,
|
5432
|
+
HotelOfferItemLayout: _s,
|
5433
|
+
HotelOfferListEmpty: md,
|
5434
|
+
HotelRoomOfferList: yr,
|
5435
|
+
TermsAndConditions: kr
|
5406
5436
|
},
|
5407
5437
|
computed: {
|
5408
|
-
...
|
5409
|
-
|
5410
|
-
|
5411
|
-
|
5438
|
+
...Ki(
|
5439
|
+
Xi,
|
5440
|
+
Rr,
|
5441
|
+
Qi
|
5412
5442
|
),
|
5413
|
-
areFiltersActive:
|
5443
|
+
areFiltersActive: be("hotelOffers/areFiltersActive"),
|
5414
5444
|
displayFiltersMenu() {
|
5415
5445
|
return !!this.parsedFeatures.FiltersBar;
|
5416
5446
|
},
|
5417
|
-
filters:
|
5418
|
-
hasErrorHotelOffers:
|
5419
|
-
hotelOfferRequest:
|
5420
|
-
hotelOffers:
|
5421
|
-
hotelOffersCurrency:
|
5422
|
-
isPollingHotelOffers:
|
5447
|
+
filters: be("hotelOffers/filters"),
|
5448
|
+
hasErrorHotelOffers: be("hotelOffers/hasError"),
|
5449
|
+
hotelOfferRequest: be("hotelOfferRequest"),
|
5450
|
+
hotelOffers: be("hotelOffers/hotelOffers"),
|
5451
|
+
hotelOffersCurrency: be("hotelOffers/hotelOffersCurrency"),
|
5452
|
+
isPollingHotelOffers: be("hotelOffers/isPolling"),
|
5423
5453
|
isTopPicksSelected() {
|
5424
5454
|
var t;
|
5425
|
-
return ((t = this.filters.sort_by) == null ? void 0 : t.value) ===
|
5455
|
+
return ((t = this.filters.sort_by) == null ? void 0 : t.value) === Wi.TopPicks;
|
5426
5456
|
},
|
5427
5457
|
showErrorMessage() {
|
5428
5458
|
return this.hotelOfferRequest.hasError || this.hasErrorHotelOffers;
|
@@ -5434,7 +5464,7 @@ const gd = /* @__PURE__ */ pn(Pi, [["render", hd]]), Ni = gn({
|
|
5434
5464
|
var t;
|
5435
5465
|
return !this.hotelOfferRequest.id || this.hotelOfferRequest.isFetching || this.isPollingHotelOffers && (!this.hotelOffers || ((t = this.hotelOffers) == null ? void 0 : t.length) === 0);
|
5436
5466
|
},
|
5437
|
-
startingAfter:
|
5467
|
+
startingAfter: be("hotelOffers/startingAfter")
|
5438
5468
|
},
|
5439
5469
|
methods: {
|
5440
5470
|
onHotelOfferItemMouseleave() {
|
@@ -5465,23 +5495,23 @@ const gd = /* @__PURE__ */ pn(Pi, [["render", hd]]), Ni = gn({
|
|
5465
5495
|
}
|
5466
5496
|
},
|
5467
5497
|
mixins: [
|
5468
|
-
|
5469
|
-
|
5470
|
-
|
5498
|
+
Ds,
|
5499
|
+
or,
|
5500
|
+
Sr(
|
5471
5501
|
["bookingApiClient", "config.currency", "config.lang"],
|
5472
5502
|
"retrieveHotelOffers"
|
5473
5503
|
),
|
5474
|
-
|
5475
|
-
|
5504
|
+
nr,
|
5505
|
+
Er({
|
5476
5506
|
fallbackValue: {},
|
5477
5507
|
propsName: "features"
|
5478
5508
|
}),
|
5479
|
-
|
5509
|
+
Tr()
|
5480
5510
|
],
|
5481
5511
|
name: "HotelOfferList",
|
5482
|
-
props:
|
5512
|
+
props: Ar,
|
5483
5513
|
setup() {
|
5484
|
-
const { t } =
|
5514
|
+
const { t } = gn();
|
5485
5515
|
return {
|
5486
5516
|
t
|
5487
5517
|
};
|
@@ -5490,7 +5520,7 @@ const gd = /* @__PURE__ */ pn(Pi, [["render", hd]]), Ni = gn({
|
|
5490
5520
|
filters: {
|
5491
5521
|
deep: !0,
|
5492
5522
|
async handler(t, e) {
|
5493
|
-
|
5523
|
+
Yi(t, e) || await this.retrieveHotelOffers();
|
5494
5524
|
}
|
5495
5525
|
},
|
5496
5526
|
"hotelOfferRequest.id": {
|
@@ -5511,7 +5541,7 @@ const gd = /* @__PURE__ */ pn(Pi, [["render", hd]]), Ni = gn({
|
|
5511
5541
|
}
|
5512
5542
|
}
|
5513
5543
|
});
|
5514
|
-
function
|
5544
|
+
function Rs(t) {
|
5515
5545
|
const e = t;
|
5516
5546
|
e.__i18n = e.__i18n || [], e.__i18n.push({
|
5517
5547
|
locale: "",
|
@@ -5554,34 +5584,34 @@ function Ss(t) {
|
|
5554
5584
|
}
|
5555
5585
|
});
|
5556
5586
|
}
|
5557
|
-
const
|
5587
|
+
const pd = {
|
5558
5588
|
key: 0,
|
5559
5589
|
class: "mx-n2"
|
5560
|
-
},
|
5590
|
+
}, vd = {
|
5561
5591
|
key: 1,
|
5562
5592
|
class: "d-flex justify-center align-center py-3"
|
5563
5593
|
};
|
5564
|
-
function
|
5594
|
+
function yd(t, e, n, s, i, r) {
|
5565
5595
|
const a = oe("BHotelSearchBar"), u = oe("BHotelOffersFilterBar"), l = oe("HotelOfferListEmpty"), c = oe("HotelRoomOfferList"), d = oe("HotelOfferItem"), h = oe("TermsAndConditions");
|
5566
|
-
return M(), Q(
|
5596
|
+
return M(), Q(Ir, {
|
5567
5597
|
ref: "hotel-offer-list-container",
|
5568
5598
|
class: "pa-0 bg-white",
|
5569
|
-
style:
|
5599
|
+
style: er([{ "min-height": "500px" }, {
|
5570
5600
|
height: t.parsedHeight,
|
5571
5601
|
maxHeight: t.maxHeight,
|
5572
5602
|
overflowY: "auto",
|
5573
5603
|
overflowX: "hidden"
|
5574
5604
|
}])
|
5575
5605
|
}, {
|
5576
|
-
default:
|
5577
|
-
t.parsedFeatures.HotelOfferSearchMenu ? (M(), Q(
|
5606
|
+
default: _(() => [
|
5607
|
+
t.parsedFeatures.HotelOfferSearchMenu ? (M(), Q(it, {
|
5578
5608
|
key: 0,
|
5579
|
-
class:
|
5609
|
+
class: Et(["px-2 pt-4", t.$isCurrentBreakpointAboveOrEqual("md") ? "sticky" : ""]),
|
5580
5610
|
"no-gutters": ""
|
5581
5611
|
}, {
|
5582
|
-
default:
|
5612
|
+
default: _(() => [
|
5583
5613
|
b(Pe, null, {
|
5584
|
-
default:
|
5614
|
+
default: _(() => [
|
5585
5615
|
t.isBookingApiClientDefined ? (M(), Q(a, {
|
5586
5616
|
key: 0,
|
5587
5617
|
modelValue: t.hotelOfferRequestInternal,
|
@@ -5596,26 +5626,26 @@ function vd(t, e, n, s, i, r) {
|
|
5596
5626
|
]),
|
5597
5627
|
_: 1
|
5598
5628
|
}, 8, ["class"])) : Z("", !0),
|
5599
|
-
t.displayFiltersMenu && t.isBookingApiClientDefined ? (M(), Q(
|
5629
|
+
t.displayFiltersMenu && t.isBookingApiClientDefined ? (M(), Q(it, {
|
5600
5630
|
key: 1,
|
5601
|
-
class:
|
5631
|
+
class: Et(t.$isCurrentBreakpointAboveOrEqual("md") ? "sticky" : ""),
|
5602
5632
|
"no-gutters": ""
|
5603
5633
|
}, {
|
5604
|
-
default:
|
5634
|
+
default: _(() => [
|
5605
5635
|
b(Pe, null, {
|
5606
|
-
default:
|
5636
|
+
default: _(() => [
|
5607
5637
|
b(u),
|
5608
|
-
t.$breakpointService.xs ? Z("", !0) : (M(), Q(
|
5638
|
+
t.$breakpointService.xs ? Z("", !0) : (M(), Q(en, { key: 0 }))
|
5609
5639
|
]),
|
5610
5640
|
_: 1
|
5611
5641
|
})
|
5612
5642
|
]),
|
5613
5643
|
_: 1
|
5614
5644
|
}, 8, ["class"])) : Z("", !0),
|
5615
|
-
b(
|
5616
|
-
default:
|
5645
|
+
b(it, { "no-gutters": "" }, {
|
5646
|
+
default: _(() => [
|
5617
5647
|
b(Pe, null, {
|
5618
|
-
default:
|
5648
|
+
default: _(() => [
|
5619
5649
|
t.showSkeleton ? (M(), Q(l, { key: 0 })) : t.showErrorMessage ? (M(), Q(l, {
|
5620
5650
|
key: 1,
|
5621
5651
|
type: "internalError"
|
@@ -5631,18 +5661,18 @@ function vd(t, e, n, s, i, r) {
|
|
5631
5661
|
"source-market": t.hotelOfferRequest.sourceMarket,
|
5632
5662
|
type: "noResults",
|
5633
5663
|
onResetFilters: t.onResetFilters
|
5634
|
-
}, null, 8, ["address", "adult-count", "check-in-date", "check-out-date", "latitude", "longitude", "room-count", "source-market", "onResetFilters"])) : (M(),
|
5635
|
-
|
5664
|
+
}, null, 8, ["address", "adult-count", "check-in-date", "check-out-date", "latitude", "longitude", "room-count", "source-market", "onResetFilters"])) : (M(), me(xe, { key: 3 }, [
|
5665
|
+
Ji(b(mr, {
|
5636
5666
|
color: "primary",
|
5637
5667
|
indeterminate: ""
|
5638
5668
|
}, null, 512), [
|
5639
|
-
[
|
5669
|
+
[Zi, t.loadingBarEnabled && t.isPollingHotelOffers]
|
5640
5670
|
]),
|
5641
|
-
t.hotelOffers ? (M(!0),
|
5671
|
+
t.hotelOffers ? (M(!0), me(xe, { key: 0 }, Cs(t.hotelOffers, (y, g) => (M(), me(xe, {
|
5642
5672
|
key: y.id
|
5643
5673
|
}, [
|
5644
5674
|
b(d, {
|
5645
|
-
class:
|
5675
|
+
class: Et(["pr-3", {
|
5646
5676
|
"mt-0": g === 0,
|
5647
5677
|
"mb-0": g === t.hotelOffers.length - 1
|
5648
5678
|
}]),
|
@@ -5652,10 +5682,10 @@ function vd(t, e, n, s, i, r) {
|
|
5652
5682
|
onMouseleave: t.onHotelOfferItemMouseleave,
|
5653
5683
|
onMouseover: (f) => t.onHotelOfferItemMouseover(y)
|
5654
5684
|
}, {
|
5655
|
-
default:
|
5685
|
+
default: _(() => {
|
5656
5686
|
var f;
|
5657
5687
|
return [
|
5658
|
-
(f = t.parsedFeatures.HotelOfferItem) != null && f.HotelRoomOfferList ? (M(),
|
5688
|
+
(f = t.parsedFeatures.HotelOfferItem) != null && f.HotelRoomOfferList ? (M(), me("div", pd, [
|
5659
5689
|
b(c, {
|
5660
5690
|
"adult-count": t.hotelOfferRequest.adultCount,
|
5661
5691
|
"check-in-date": t.hotelOfferRequest.checkInDate,
|
@@ -5672,9 +5702,9 @@ function vd(t, e, n, s, i, r) {
|
|
5672
5702
|
}),
|
5673
5703
|
_: 2
|
5674
5704
|
}, 1032, ["class", "features", "hotel-offer", "single-offer", "onMouseleave", "onMouseover"]),
|
5675
|
-
b(
|
5705
|
+
b(en)
|
5676
5706
|
], 64))), 128)) : Z("", !0),
|
5677
|
-
t.startingAfter ? (M(),
|
5707
|
+
t.startingAfter ? (M(), me("div", vd, [
|
5678
5708
|
b(ae, {
|
5679
5709
|
color: "primary",
|
5680
5710
|
variant: "flat",
|
@@ -5682,8 +5712,8 @@ function vd(t, e, n, s, i, r) {
|
|
5682
5712
|
loading: t.isPollingHotelOffers,
|
5683
5713
|
onClick: t.onSeeMoreClick
|
5684
5714
|
}, {
|
5685
|
-
default:
|
5686
|
-
je(
|
5715
|
+
default: _(() => [
|
5716
|
+
je(He(t.t("HotelOfferList.showMore")), 1)
|
5687
5717
|
]),
|
5688
5718
|
_: 1
|
5689
5719
|
}, 8, ["disabled", "loading", "onClick"])
|
@@ -5703,12 +5733,12 @@ function vd(t, e, n, s, i, r) {
|
|
5703
5733
|
_: 1
|
5704
5734
|
}, 8, ["style"]);
|
5705
5735
|
}
|
5706
|
-
typeof
|
5707
|
-
const
|
5708
|
-
|
5736
|
+
typeof Rs == "function" && Rs($i);
|
5737
|
+
const Gd = /* @__PURE__ */ mn($i, [["render", yd]]);
|
5738
|
+
Vi("css/revolugo.hotelofferlist.BkctzTMI.css");
|
5709
5739
|
export {
|
5710
|
-
|
5711
|
-
|
5712
|
-
|
5740
|
+
Gd as H,
|
5741
|
+
Or as a,
|
5742
|
+
Ar as h
|
5713
5743
|
};
|
5714
|
-
//# sourceMappingURL=revolugo.hotelofferlist.
|
5744
|
+
//# sourceMappingURL=revolugo.hotelofferlist.BqxXWwM7.min.js.map
|