@revolugo/elements 6.8.1-rc.3 → 6.8.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/css/{revolugo.bdaterangepicker.CHUExWGL.css → revolugo.bdaterangepicker.BLYZnPjh.css} +1 -1
- package/dist/css/{revolugo.bhoteloffersfilterbar.BcnNI4uS.css → revolugo.bhoteloffersfilterbar.1tLwDxXe.css} +1 -1
- package/dist/css/{revolugo.hoteldescriptionview.DWuzEuGF.css → revolugo.hoteldescriptionview.CqUUU1fv.css} +1 -1
- package/dist/css/revolugo.hoteloffersview.oDGeJCwG.css +1 -0
- package/dist/css/{revolugo.hotelroomofferlist.DpLXIpgU.css → revolugo.hotelroomofferlist.DI_s2G5c.css} +1 -1
- package/dist/index.es.min.js +849 -786
- package/dist/index.es.min.js.map +1 -1
- package/dist/index.min.js +5 -5
- package/dist/index.min.js.map +1 -1
- package/dist/{revolugo.banktransferdetails.BAUbHW-v.min.js → revolugo.banktransferdetails.Wlqp4FTo.min.js} +9 -9
- package/dist/{revolugo.bdaterangepicker.E8eS2QMH.min.js → revolugo.bdaterangepicker.LM4-g1ZZ.min.js} +8 -8
- package/dist/{revolugo.bformattedamount.vue_vue_type_script_setup_true_lang.DF3WP5Mi.min.js → revolugo.bformattedamount.vue_vue_type_script_setup_true_lang.h_U_D6QC.min.js} +4 -4
- package/dist/{revolugo.bhoteloffersfilterbar.BKUVyAfq.min.js → revolugo.bhoteloffersfilterbar.B634G2s-.min.js} +554 -550
- package/dist/{revolugo.bhotelroomsdetails.BX8egxTH.min.js → revolugo.bhotelroomsdetails.CIrHX2gV.min.js} +10 -10
- package/dist/{revolugo.bhotelsearchbar.DFrjPFGj.min.js → revolugo.bhotelsearchbar.C13oDjtG.min.js} +16 -16
- package/dist/{revolugo.bimagecarousel.SwqkFB_3.min.js → revolugo.bimagecarousel.7CkcgWwo.min.js} +9 -9
- package/dist/{revolugo.bookingdetailssidebar.DVtwkl8a.min.js → revolugo.bookingdetailssidebar.CUUn4s4-.min.js} +4 -4
- package/dist/{revolugo.bookingdetailssidebar.CziZJHhH.min.js → revolugo.bookingdetailssidebar.DXxWIXgM.min.js} +11 -11
- package/dist/{revolugo.bookingmanager.Dq-HSdWX.min.js → revolugo.bookingmanager.XzKdmEGC.min.js} +20 -20
- package/dist/{revolugo.bpricesummaryskeleton.CBWHU5FT.min.js → revolugo.bpricesummaryskeleton.Pw1KklrO.min.js} +4 -4
- package/dist/{revolugo.bstarrating.vue_vue_type_script_setup_true_lang.Bl8RUpcy.min.js → revolugo.bstarrating.vue_vue_type_script_setup_true_lang.QK7fmKOX.min.js} +82 -93
- package/dist/{revolugo.btag.BqWVYmnF.min.js → revolugo.btag.BlnXqK92.min.js} +10 -10
- package/dist/{revolugo.cancellationpoliciesbadge.BwScRGzN.min.js → revolugo.cancellationpoliciesbadge.B55YrKSM.min.js} +4 -4
- package/dist/{revolugo.cancellationpoliciesbadge.CZhbi5-J.min.js → revolugo.cancellationpoliciesbadge.BeG5kBuD.min.js} +7 -7
- package/dist/{revolugo.cancellationpolicieslist.C-IQuJT0.min.js → revolugo.cancellationpolicieslist.DAK9-C1m.min.js} +4 -4
- package/dist/{revolugo.cancellationpolicieslist.DtrFU7G-.min.js → revolugo.cancellationpolicieslist.vBYt57IZ.min.js} +4 -4
- package/dist/{revolugo.case-transformers.Dkh-YFTz.min.js → revolugo.case-transformers.CaS4ky3X.min.js} +2 -2
- package/dist/{revolugo.creditcardform.CT_eT7Vn.min.js → revolugo.creditcardform.BXRZJQF_.min.js} +13 -13
- package/dist/{revolugo.creditcardform.BpWLyP0P.min.js → revolugo.creditcardform.D-fRTOrm.min.js} +4 -4
- package/dist/{revolugo.creditcardpayment.-S8qvmZq.min.js → revolugo.creditcardpayment.Bsql13Mx.min.js} +4 -4
- package/dist/{revolugo.creditcardpayment.DfK_WNS6.min.js → revolugo.creditcardpayment.CRromYFa.min.js} +58 -58
- package/dist/{revolugo.currencypicker.C0zkiyGz.min.js → revolugo.currencypicker.CsT_8v5-.min.js} +6 -6
- package/dist/{revolugo.currencypickerbtn.KJkofbUb.min.js → revolugo.currencypickerbtn.Aj3BIx0O.min.js} +9 -9
- package/dist/{revolugo.currencypickerbtn.C5e3nP5r.min.js → revolugo.currencypickerbtn.DzlyztKv.min.js} +4 -4
- package/dist/revolugo.defaultsdeep.x4Fmvtqd.min.js +104 -0
- package/dist/{revolugo.dialog-attach.CQ4vt9Bs.min.js → revolugo.dialog-attach.Co46EBCo.min.js} +2 -2
- package/dist/{revolugo.dialog-transition.H6W-cY6Z.min.js → revolugo.dialog-transition.0tZlTOrr.min.js} +3 -3
- package/dist/{revolugo.fastbookingflow.BIcvAl-D.min.js → revolugo.fastbookingflow.4VeLCGPk.min.js} +4 -4
- package/dist/{revolugo.fullbookingflow.P7mArUhq.min.js → revolugo.fullbookingflow.DAq8AAkm.min.js} +79 -80
- package/dist/{revolugo.hoteldescriptionview.5H3Nr6a4.min.js → revolugo.hoteldescriptionview.AQBQyXPB.min.js} +4 -4
- package/dist/{revolugo.hoteldescriptionview.NSefjueC.min.js → revolugo.hoteldescriptionview.E3zF9kIE.min.js} +677 -754
- package/dist/{revolugo.hotelofferitemlayout.BGm1b3Zf.min.js → revolugo.hotelofferitemlayout.5S0g-y3x.min.js} +6 -6
- package/dist/{revolugo.hotelofferlist.BqxXWwM7.min.js → revolugo.hotelofferlist.Bu6FD5xa.min.js} +847 -821
- package/dist/{revolugo.hotelofferlist.B2zQ--aY.min.js → revolugo.hotelofferlist.DuMKQigB.min.js} +4 -4
- package/dist/{revolugo.hotelofferrequestcreator.sH9lk3EL.min.js → revolugo.hotelofferrequestcreator.CfAv9XnZ.min.js} +4 -4
- package/dist/{revolugo.hoteloffersearchmenu.DNOt9B6n.min.js → revolugo.hoteloffersearchmenu.C6_HA-G2.min.js} +6 -6
- package/dist/{revolugo.hoteloffersmap.CoGOiKP2.min.js → revolugo.hoteloffersmap.DzTHDAHc.min.js} +4 -4
- package/dist/{revolugo.hoteloffersmap.B6_r7_Rt.min.js → revolugo.hoteloffersmap.TeFeFBWz.min.js} +383 -386
- package/dist/{revolugo.hoteloffersview.c3bSpJnI.min.js → revolugo.hoteloffersview.Cu1O149f.min.js} +4 -4
- package/dist/{revolugo.hoteloffersview.CNDIZucE.min.js → revolugo.hoteloffersview.EuoGAY9l.min.js} +132 -134
- package/dist/{revolugo.hotelroomofferlist.CNKaSy7-.min.js → revolugo.hotelroomofferlist.BJqvvAma.min.js} +198 -198
- package/dist/{revolugo.hotelroomofferlist.CI-SzCBC.min.js → revolugo.hotelroomofferlist.DK_BQbGq.min.js} +4 -4
- package/dist/{revolugo.hotelroomofferrequestcreator.props.Br_IjGwA.min.js → revolugo.hotelroomofferrequestcreator.props.Ccv-RhW2.min.js} +2 -2
- package/dist/{revolugo.hotelroomoffersbookingflow.B2gs_H2k.min.js → revolugo.hotelroomoffersbookingflow.DXXUhSNA.min.js} +69 -69
- package/dist/{revolugo.hotelroomoffersearchmenu.E1ybUWNl.min.js → revolugo.hotelroomoffersearchmenu.4yTsOswX.min.js} +5 -5
- package/dist/{revolugo.hotelroomoffersearchmenu.yqwV0jYW.min.js → revolugo.hotelroomoffersearchmenu.CoLuLIMc.min.js} +7 -7
- package/dist/{revolugo.hotelroomoffersview.CrWoQ-75.min.js → revolugo.hotelroomoffersview.Bt9PEOK9.min.js} +4 -4
- package/dist/{revolugo.hotelroomoffersview.BpWB5Pd7.min.js → revolugo.hotelroomoffersview.Bz5IYKc_.min.js} +46 -46
- package/dist/{revolugo.index.cAIjcrcW.min.js → revolugo.index.CfWiJy_P.min.js} +2 -2
- package/dist/{revolugo.index.CzlNaSnE.min.js → revolugo.index.D74NQ89L.min.js} +35 -35
- package/dist/{revolugo.index.wc.DDhVCEIR.min.js → revolugo.index.wc.bYWqzpa9.min.js} +5419 -5315
- package/dist/{revolugo.langpicker.Dq39BvMY.min.js → revolugo.langpicker.C1EJvnOl.min.js} +7 -7
- package/dist/{revolugo.langpickerbtn.CpnwEzJW.min.js → revolugo.langpickerbtn.C7tqnw1r.min.js} +9 -9
- package/dist/{revolugo.langpickerbtn.Ps800J-7.min.js → revolugo.langpickerbtn.Ixx1UaN0.min.js} +4 -4
- package/dist/revolugo.min.js +1 -1
- package/dist/{revolugo.position.CQiypbvk.min.js → revolugo.position.Dh9P2x6G.min.js} +4 -4
- package/dist/{revolugo.prebookform.DJp8i2Br.min.js → revolugo.prebookform.CLrYWsEI.min.js} +4 -4
- package/dist/{revolugo.prebookform.C7XqSsaV.min.js → revolugo.prebookform.DZe8r8L5.min.js} +59 -59
- package/dist/{revolugo.roominglisteditor.Cuc_ODZH.min.js → revolugo.roominglisteditor.CXO-5pa_.min.js} +4 -4
- package/dist/{revolugo.roominglisteditor.DDmejnko.min.js → revolugo.roominglisteditor.DrtcIDro.min.js} +9 -9
- package/dist/{revolugo.rounded.De3KCP0X.min.js → revolugo.rounded.B5lCsIO9.min.js} +2 -2
- package/dist/{revolugo.ssrboot.0C25dEN6.min.js → revolugo.ssrboot.C0z_e7XY.min.js} +2 -2
- package/dist/{revolugo.storybooktoolbar.CPezsLGj.min.js → revolugo.storybooktoolbar.SCyQu-ny.min.js} +78 -78
- package/dist/{revolugo.termsandconditions.DFY5N8Wh.min.js → revolugo.termsandconditions.CSw8Xh23.min.js} +4 -4
- package/dist/{revolugo.termsandconditions.pTNkGfzG.min.js → revolugo.termsandconditions.CmukXjqj.min.js} +4 -4
- package/dist/{revolugo.use-breakpoint-service.CJYSwmp1.min.js → revolugo.use-breakpoint-service.Dw3a-dJy.min.js} +2 -2
- package/dist/{revolugo.vautocomplete.BnoiakVz.min.js → revolugo.vautocomplete.BFtq5sO7.min.js} +55 -55
- package/dist/{revolugo.vbadge.Cay6RDQL.min.js → revolugo.vbadge.BOSot4-b.min.js} +10 -10
- package/dist/{revolugo.vbtn.CaLiqucX.min.js → revolugo.vbtn.Cza72F9l.min.js} +6 -6
- package/dist/{revolugo.vcard.Oh2sMb1R.min.js → revolugo.vcard.BSYS4EA_.min.js} +6 -6
- package/dist/{revolugo.vcheckboxbtn.CSYgAYX9.min.js → revolugo.vcheckboxbtn.JRn2QIIO.min.js} +14 -14
- package/dist/{revolugo.vdialog.Cp61rijD.min.js → revolugo.vdialog.BuVoy1kx.min.js} +8 -8
- package/dist/{revolugo.vdivider.BEG5JZwH.min.js → revolugo.vdivider.Cu5FddvH.min.js} +3 -3
- package/dist/{revolugo.vexpansionpanels.BcpoHV2b.min.js → revolugo.vexpansionpanels.DRWQoRqv.min.js} +5 -5
- package/dist/{revolugo.vform.C7j3bd5k.min.js → revolugo.vform.CrnbE-uW.min.js} +4 -4
- package/dist/{revolugo.vinput.NcJ-RLQ9.min.js → revolugo.vinput.DkajuwSz.min.js} +4 -4
- package/dist/{revolugo.vlabel.DVK-hoRp.min.js → revolugo.vlabel.7WIO1jsu.min.js} +3 -3
- package/dist/{revolugo.vlist.BE6EAjkf.min.js → revolugo.vlist.DnEUr3NP.min.js} +47 -47
- package/dist/{revolugo.vmenu.CjkJIdWj.min.js → revolugo.vmenu.DwlJhNjf.min.js} +22 -22
- package/dist/{revolugo.vselect.D8u2hRvh.min.js → revolugo.vselect.BjWXKuR5.min.js} +23 -23
- package/dist/{revolugo.vsheet.BjfEjOdc.min.js → revolugo.vsheet.CFHcDuin.min.js} +5 -5
- package/dist/{revolugo.vskeletonloader.DU5f5pPc.min.js → revolugo.vskeletonloader.Dc9OKBJf.min.js} +4 -4
- package/dist/{revolugo.vsnackbar.coosr6Kc.min.js → revolugo.vsnackbar.BVKj6AMI.min.js} +13 -13
- package/dist/revolugo.vspacer.DnTRCwot.min.js +7 -0
- package/dist/{revolugo.vtextarea.DbOaHRNc.min.js → revolugo.vtextarea.C5zyz0TO.min.js} +8 -8
- package/dist/{revolugo.vtextfield.CWrEQaIp.min.js → revolugo.vtextfield.vgSHKzqU.min.js} +8 -8
- package/dist/{revolugo.vtoolbar.01ZEiEY4.min.js → revolugo.vtoolbar.DoJvdCrr.min.js} +5 -5
- package/dist/{revolugo.vtooltip.DVIfVoJI.min.js → revolugo.vtooltip.BM8L9U_D.min.js} +16 -16
- package/dist/{revolugo.vwindowitem.CcOMHHwi.min.js → revolugo.vwindowitem.CFcKwvRo.min.js} +6 -6
- package/dist/{revolugo.watch-list.tdARLleX.min.js → revolugo.watch-list.BitKjhcw.min.js} +2 -2
- package/dist/{revolugo.webcomponentwrapper.DsRjP0_N.min.js → revolugo.webcomponentwrapper.D4MvwGCF.min.js} +70 -70
- package/package.json +5 -5
- package/dist/css/revolugo.hoteloffersview.Bo2dQWYt.css +0 -1
- package/dist/revolugo._basefor.CodrYJxd.min.js +0 -15
- package/dist/revolugo.vspacer.FJNqQNRg.min.js +0 -7
package/dist/{revolugo.hotelofferlist.BqxXWwM7.min.js → revolugo.hotelofferlist.Bu6FD5xa.min.js}
RENAMED
@@ -1,30 +1,30 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var N = (t, e, n) =>
|
4
|
-
import { Y as
|
5
|
-
import { h as
|
6
|
-
import { H as
|
7
|
-
import { H as _s } from "./revolugo.hotelofferitemlayout.
|
8
|
-
import { B as
|
9
|
-
import { u as Ye, b as Ps, M as Ns, _ as mn, V 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 en } from "./revolugo.vdivider.
|
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 Vi = Object.defineProperty;
|
2
|
+
var Fi = (t, e, n) => e in t ? Vi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
3
|
+
var N = (t, e, n) => Fi(t, typeof e != "symbol" ? e + "" : e, n);
|
4
|
+
import { Y as Ze, d as hn, u as gn, k as xt, Z as Me, _ as Te, D as U, a as b, $ as vt, a0 as Hi, a1 as ft, a2 as Le, a3 as yt, a4 as Gi, C as Jt, a5 as bt, M as Is, f as je, a6 as lt, a7 as Ts, a8 as As, y as re, a9 as Os, aa as ji, V as qi, R as zi, ab as Ki, ac as Yi, F as xe, i as pe, w as _, e as Zt, t as He, r as oe, o as $, b as Ds, c as Q, g as Z, v as Cs, x as Et, K as Wi, Q as Qi, ad as Xi, S as Ji, ae as Zi, H as er, I as tr, A as nr } from "./revolugo.index.wc.bYWqzpa9.min.js";
|
5
|
+
import { h as sr, H as ir } from "./revolugo.hotelofferrequestcreator.CfAv9XnZ.min.js";
|
6
|
+
import { H as rr, D as or, B as ar, p as lr, b as ur, c as cr } from "./revolugo.bhoteloffersfilterbar.B634G2s-.min.js";
|
7
|
+
import { H as _s } from "./revolugo.hotelofferitemlayout.5S0g-y3x.min.js";
|
8
|
+
import { B as dr, v as Ue, V as fr } from "./revolugo.vtextarea.C5zyz0TO.min.js";
|
9
|
+
import { u as Ye, b as Ps, M as Ns, _ as mn, V as rt, a as Pe, B as hr } from "./revolugo.webcomponentwrapper.D4MvwGCF.min.js";
|
10
|
+
import { V as et } from "./revolugo.vtextfield.vgSHKzqU.min.js";
|
11
|
+
import { V as Dn } from "./revolugo.vmenu.DwlJhNjf.min.js";
|
12
|
+
import { a as ae } from "./revolugo.vbtn.Cza72F9l.min.js";
|
13
|
+
import { V as gr } from "./revolugo.vspacer.DnTRCwot.min.js";
|
14
|
+
import { a as $t, b as mr } from "./revolugo.index.D74NQ89L.min.js";
|
15
|
+
import { c as pr, V as vr } from "./revolugo.position.Dh9P2x6G.min.js";
|
16
|
+
import { V as Cn, m as yr } from "./revolugo.vsheet.CFHcDuin.min.js";
|
17
|
+
import { V as br } from "./revolugo.vform.CrnbE-uW.min.js";
|
18
|
+
import { V as en } from "./revolugo.vdivider.Cu5FddvH.min.js";
|
19
|
+
import { H as Er } from "./revolugo.hotelroomofferlist.BJqvvAma.min.js";
|
20
|
+
import { B as Sr } from "./revolugo.bhotelsearchbar.C13oDjtG.min.js";
|
21
|
+
import { p as kr } from "./revolugo.bstarrating.vue_vue_type_script_setup_true_lang.QK7fmKOX.min.js";
|
22
|
+
import { w as Rr } from "./revolugo.watch-list.BitKjhcw.min.js";
|
23
|
+
import { T as Ir } from "./revolugo.termsandconditions.CmukXjqj.min.js";
|
24
|
+
import { u as Tr } from "./revolugo.hotelroomofferrequestcreator.props.Ccv-RhW2.min.js";
|
25
|
+
import { p as Ar, g as be } from "./revolugo.use-breakpoint-service.Dw3a-dJy.min.js";
|
26
|
+
import { V as Or } from "./revolugo.bdaterangepicker.LM4-g1ZZ.min.js";
|
27
|
+
function xi(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 Vi(t) {
|
|
44
44
|
console.error("[revolugo-elements] ", e);
|
45
45
|
}
|
46
46
|
}
|
47
|
-
const
|
47
|
+
const Ls = {
|
48
48
|
FiltersBar: !0,
|
49
49
|
HotelOfferSearchMenu: !1,
|
50
50
|
TermsAndConditionsFooter: !0,
|
51
|
-
HotelOfferItem:
|
52
|
-
},
|
53
|
-
...
|
51
|
+
HotelOfferItem: rr
|
52
|
+
}, Dr = {
|
53
|
+
...sr,
|
54
54
|
features: {
|
55
|
-
default: () =>
|
55
|
+
default: () => Ls,
|
56
56
|
type: [Object, String]
|
57
57
|
},
|
58
58
|
height: {
|
@@ -63,7 +63,7 @@ const Or = {
|
|
63
63
|
type: Number
|
64
64
|
},
|
65
65
|
limit: {
|
66
|
-
default:
|
66
|
+
default: or,
|
67
67
|
type: Number
|
68
68
|
},
|
69
69
|
loadingBarEnabled: {
|
@@ -79,12 +79,12 @@ const Or = {
|
|
79
79
|
type: Boolean
|
80
80
|
}
|
81
81
|
};
|
82
|
-
function
|
82
|
+
function w(t) {
|
83
83
|
return t != null && typeof t == "object" && t["@@functional/placeholder"] === !0;
|
84
84
|
}
|
85
|
-
function
|
85
|
+
function ve(t) {
|
86
86
|
return function e(n) {
|
87
|
-
return arguments.length === 0 ||
|
87
|
+
return arguments.length === 0 || w(n) ? e : t.apply(this, arguments);
|
88
88
|
};
|
89
89
|
}
|
90
90
|
function Ee(t) {
|
@@ -93,13 +93,13 @@ function Ee(t) {
|
|
93
93
|
case 0:
|
94
94
|
return e;
|
95
95
|
case 1:
|
96
|
-
return
|
96
|
+
return w(n) ? e : ve(function(i) {
|
97
97
|
return t(n, i);
|
98
98
|
});
|
99
99
|
default:
|
100
|
-
return
|
100
|
+
return w(n) && w(s) ? e : w(n) ? ve(function(i) {
|
101
101
|
return t(i, s);
|
102
|
-
}) :
|
102
|
+
}) : w(s) ? ve(function(i) {
|
103
103
|
return t(n, i);
|
104
104
|
}) : t(n, s);
|
105
105
|
}
|
@@ -111,29 +111,29 @@ function pn(t) {
|
|
111
111
|
case 0:
|
112
112
|
return e;
|
113
113
|
case 1:
|
114
|
-
return
|
114
|
+
return w(n) ? e : Ee(function(r, a) {
|
115
115
|
return t(n, r, a);
|
116
116
|
});
|
117
117
|
case 2:
|
118
|
-
return
|
118
|
+
return w(n) && w(s) ? e : w(n) ? Ee(function(r, a) {
|
119
119
|
return t(r, s, a);
|
120
|
-
}) :
|
120
|
+
}) : w(s) ? Ee(function(r, a) {
|
121
121
|
return t(n, r, a);
|
122
|
-
}) :
|
122
|
+
}) : ve(function(r) {
|
123
123
|
return t(n, s, r);
|
124
124
|
});
|
125
125
|
default:
|
126
|
-
return
|
126
|
+
return w(n) && w(s) && w(i) ? e : w(n) && w(s) ? Ee(function(r, a) {
|
127
127
|
return t(r, a, i);
|
128
|
-
}) :
|
128
|
+
}) : w(n) && w(i) ? Ee(function(r, a) {
|
129
129
|
return t(r, s, a);
|
130
|
-
}) :
|
130
|
+
}) : w(s) && w(i) ? Ee(function(r, a) {
|
131
131
|
return t(n, r, a);
|
132
|
-
}) :
|
132
|
+
}) : w(n) ? ve(function(r) {
|
133
133
|
return t(r, s, i);
|
134
|
-
}) :
|
134
|
+
}) : w(s) ? ve(function(r) {
|
135
135
|
return t(n, r, i);
|
136
|
-
}) :
|
136
|
+
}) : w(i) ? ve(function(r) {
|
137
137
|
return t(n, s, r);
|
138
138
|
}) : t(n, s, i);
|
139
139
|
}
|
@@ -142,27 +142,27 @@ function pn(t) {
|
|
142
142
|
function ht(t, e) {
|
143
143
|
return Object.prototype.hasOwnProperty.call(e, t);
|
144
144
|
}
|
145
|
-
var
|
145
|
+
var Cr = /* @__PURE__ */ ve(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 _r = Number.isInteger || function(e) {
|
152
152
|
return e << 0 === e;
|
153
153
|
};
|
154
|
-
function
|
154
|
+
function Pr(t) {
|
155
155
|
return Object.prototype.toString.call(t) === "[object String]";
|
156
156
|
}
|
157
|
-
function
|
157
|
+
function Nr(t, e) {
|
158
158
|
var n = t < 0 ? e.length + t : t;
|
159
|
-
return
|
159
|
+
return Pr(e) ? e.charAt(n) : e[n];
|
160
160
|
}
|
161
|
-
function
|
161
|
+
function Lr(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 ws(t, e, n) {
|
165
|
+
if (n || (n = new Mr()), wr(t))
|
166
166
|
return t;
|
167
167
|
var s = function(r) {
|
168
168
|
var a = n.get(t);
|
@@ -170,10 +170,10 @@ function Ls(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] = ws(t[u], !0, n));
|
174
174
|
return r;
|
175
175
|
};
|
176
|
-
switch (
|
176
|
+
switch (Cr(t)) {
|
177
177
|
case "Object":
|
178
178
|
return s(Object.create(Object.getPrototypeOf(t)));
|
179
179
|
case "Array":
|
@@ -181,7 +181,7 @@ function Ls(t, e, n) {
|
|
181
181
|
case "Date":
|
182
182
|
return new Date(t.valueOf());
|
183
183
|
case "RegExp":
|
184
|
-
return
|
184
|
+
return Lr(t);
|
185
185
|
case "Int8Array":
|
186
186
|
case "Uint8Array":
|
187
187
|
case "Uint8ClampedArray":
|
@@ -198,11 +198,11 @@ function Ls(t, e, n) {
|
|
198
198
|
return t;
|
199
199
|
}
|
200
200
|
}
|
201
|
-
function
|
201
|
+
function wr(t) {
|
202
202
|
var e = typeof t;
|
203
203
|
return t == null || e != "object" && e != "function";
|
204
204
|
}
|
205
|
-
var
|
205
|
+
var Mr = /* @__PURE__ */ function() {
|
206
206
|
function t() {
|
207
207
|
this.map = {}, this.length = 0;
|
208
208
|
}
|
@@ -232,19 +232,19 @@ var wr = /* @__PURE__ */ function() {
|
|
232
232
|
return i[1];
|
233
233
|
}
|
234
234
|
}, t;
|
235
|
-
}(),
|
236
|
-
return e != null && typeof e.clone == "function" ? e.clone() :
|
235
|
+
}(), T = /* @__PURE__ */ ve(function(e) {
|
236
|
+
return e != null && typeof e.clone == "function" ? e.clone() : ws(e);
|
237
237
|
});
|
238
|
-
function
|
238
|
+
function $r(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
|
+
_r(i) ? n = Nr(i, n) : n = n[i];
|
244
244
|
}
|
245
245
|
return n;
|
246
246
|
}
|
247
|
-
var
|
247
|
+
var Ur = /* @__PURE__ */ pn(function(e, n, s) {
|
248
248
|
var i = {}, r;
|
249
249
|
n = n || {}, s = s || {};
|
250
250
|
for (r in n)
|
@@ -252,21 +252,21 @@ var $r = /* @__PURE__ */ pn(function(e, n, s) {
|
|
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
|
+
}), Br = /* @__PURE__ */ pn(function t(e, n, s) {
|
256
|
+
return Ur(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
|
+
}), Vr = /* @__PURE__ */ pn(function(e, n, s) {
|
260
|
+
return Br(function(i, r, a) {
|
261
261
|
return e(r, a);
|
262
262
|
}, n, s);
|
263
|
-
}),
|
263
|
+
}), Fr = /* @__PURE__ */ Ee($r), Ms = /* @__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), L = (t) => typeof t == "string", ne = (t) => t === null, x = (t) => typeof t > "u", le = (t) => ne(t) || x(t), xr = (t) => typeof t == "bigint", C = (t) => !x(t), qe = (t) => !le(t), Hr = (t) => qe(t) && t !== "", vn = (t) => {
|
270
270
|
switch (Object.prototype.toString.call(t)) {
|
271
271
|
case "[object Error]":
|
272
272
|
case "[object Exception]":
|
@@ -277,81 +277,81 @@ const S = (t) => typeof t == "function" && !!(t.constructor && t.call && t.apply
|
|
277
277
|
}
|
278
278
|
}, tn = (t, e) => {
|
279
279
|
const n = e.split(".");
|
280
|
-
return
|
281
|
-
},
|
280
|
+
return Fr(n, t);
|
281
|
+
}, Gr = (t, e) => !!tn(t, e), jr = (t) => typeof t == "object", qr = (t) => !ne(t) && jr(t) && !Array.isArray(t), M = (t) => !ne(t) && Object.prototype.toString.call(t) === "[object Object]", zr = (t, e) => {
|
282
282
|
if (!Array.isArray(t) || !Array.isArray(e))
|
283
|
-
return
|
284
|
-
const n =
|
283
|
+
return T(e);
|
284
|
+
const n = T(t);
|
285
285
|
return e.forEach((s, i) => {
|
286
|
-
n[i] = Array.isArray(s) ||
|
286
|
+
n[i] = Array.isArray(s) || qr(s) ? (
|
287
287
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
288
|
-
|
288
|
+
H(n[i], s)
|
289
289
|
) : s;
|
290
290
|
}), n;
|
291
|
-
},
|
292
|
-
const e =
|
291
|
+
}, H = (t, e) => Vr(zr, t, e), Ie = (t) => M(t) && Object.keys(t).length > 0, nt = (t) => {
|
292
|
+
const e = Ms(C, t);
|
293
293
|
return Object.keys(e).forEach((n) => {
|
294
294
|
const s = e[n];
|
295
|
-
|
295
|
+
M(s) && (e[n] = nt(s));
|
296
296
|
}), e;
|
297
297
|
}, _t = (t) => {
|
298
|
-
const e =
|
298
|
+
const e = Ms(qe, t);
|
299
299
|
return Object.keys(e).forEach((n) => {
|
300
300
|
const s = e[n];
|
301
|
-
|
301
|
+
M(s) && (e[n] = _t(s));
|
302
302
|
}), e;
|
303
|
-
},
|
304
|
-
if (
|
303
|
+
}, ge = (t) => {
|
304
|
+
if (Ie(t))
|
305
305
|
return _t(t);
|
306
|
-
}, ue = (t, e) => typeof t == "boolean" ? t : e,
|
306
|
+
}, ue = (t, e) => typeof t == "boolean" ? t : e, Kr = (t) => t.replace(/^\s+|\s+$/gm, ""), Pn = (t) => t.replace(/^\.+/, ""), Pt = (t) => {
|
307
307
|
let e = t;
|
308
|
-
if (!
|
308
|
+
if (!L(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
|
+
}, Yr = (t) => {
|
316
316
|
const e = Array.from(t, (n) => String.fromCodePoint(n)).join("");
|
317
317
|
return globalThis.btoa(e);
|
318
|
-
},
|
318
|
+
}, Wr = (t) => Yr(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),
|
321
|
-
const a =
|
322
|
-
return r.properties =
|
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), M(t) ? (r.name = void 0, r.category = void 0, r.properties = t, S(e) ? r.options = void 0 : r.options = e) : M(e) && (r.name = void 0, r.properties = e, S(n) ? r.options = void 0 : r.options = n), L(t) && !L(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 ? T(r.properties) : {}, C(r.options) ? r.options = T(r.options) : r.options = void 0;
|
321
|
+
const a = L(r.name) ? r.name : r.properties.name, u = L(r.category) ? r.category : r.properties.category;
|
322
|
+
return r.properties = H(M(r.properties) ? r.properties : {}, { ...a && { name: a }, ...u && { category: u } }), r;
|
323
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
|
-
}, Ms = (t, e, n, s) => {
|
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 = 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;
|
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) ? T(i.properties) : {}, C(i.options) ? i.options = T(i.options) : i.options = void 0, i;
|
329
326
|
}, $s = (t, e, n, s) => {
|
330
|
-
const i = {
|
331
|
-
return S(s) && (i.callback = s), S(n) && (i.
|
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), (M(t) || ne(t)) && (i.userId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.userId = Pt(i.userId), M(i.traits) ? i.traits = T(i.traits) : i.traits = void 0, C(i.options) ? i.options = T(i.options) : i.options = void 0, i;
|
332
329
|
}, Us = (t, e, n, s) => {
|
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) : (M(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 = T(i.options) : i.options = void 0, i;
|
332
|
+
}, Bs = (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), (
|
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), (M(t) || ne(t)) && (i.groupId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.groupId = Pt(i.groupId), M(i.traits) ? i.traits = T(i.traits) : i.traits = void 0, C(i.options) ? i.options = T(i.options) : i.options = void 0, i;
|
335
335
|
};
|
336
336
|
let Ht = /* @__PURE__ */ function(t) {
|
337
337
|
return t.UNLOADED = "Page Unloaded", t;
|
338
338
|
}({});
|
339
|
-
const bn = "API", nn = "CapabilitiesManager", te = "ConfigManager",
|
340
|
-
function
|
339
|
+
const bn = "API", nn = "CapabilitiesManager", te = "ConfigManager", Vs = "EventManager", gt = "PluginsManager", De = "UserSessionManager", st = "ErrorHandler", Be = "PluginEngine", Qr = "StoreManager", Gt = `Ready${bn}`, Xr = `Load${bn}`, Jr = "HttpClient", Zr = "RudderStackAnalytics", jt = "AnalyticsCore";
|
340
|
+
function eo(t) {
|
341
341
|
return crypto.getRandomValues(new Uint8Array(t));
|
342
342
|
}
|
343
343
|
var Nn = 4096, St = [], ke = 0, qt;
|
344
344
|
for (; ke < 256; ke++)
|
345
345
|
St[ke] = (ke + 256).toString(16).substring(1);
|
346
|
-
function
|
347
|
-
(!qt || ke + 16 > Nn) && (qt =
|
346
|
+
function to() {
|
347
|
+
(!qt || ke + 16 > Nn) && (qt = eo(Nn), ke = 0);
|
348
348
|
for (var t = 0, e, n = ""; t < 16; t++)
|
349
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
352
|
var Ne = 256, kt = [], mt;
|
353
353
|
for (; Ne--; ) kt[Ne] = (Ne + 256).toString(16).substring(1);
|
354
|
-
function
|
354
|
+
function no() {
|
355
355
|
var t = 0, e, n = "";
|
356
356
|
if (!mt || Ne + 16 > 256) {
|
357
357
|
for (mt = Array(t = 256); t--; ) mt[t] = 256 * Math.random() | 0;
|
@@ -361,7 +361,7 @@ function to() {
|
|
361
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 so = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues), Ut = () => so() ? to() : no(), io = (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 no = () => !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
|
+
}, Fs = (t) => t.toISOString(), ro = () => Fs(/* @__PURE__ */ new Date()), R = ":: ", oo = (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 (${L(n) ? n : n.type}) the script with the id "${t}" from URL "${e}"`, ao = (t, e, n) => `A timeout of ${n} ms occurred while trying to load the script with id "${t}" from URL "${e}"`, lo = (t, e) => `${t}${R}A circular reference has been detected in the object and the property "${e}" has been dropped from the output.`, uo = "Failed to convert the value to a JSON string.", co = "Failed to encode the cookie data.", fo = "JSONStringify", ho = "[BigInt]", xs = "[Circular Reference]", go = (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,35 +387,35 @@ const no = () => !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(lo(fo, i)), xs) : (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, go(e, n, s));
|
396
396
|
} catch (i) {
|
397
|
-
return s == null || s.warn(
|
397
|
+
return s == null || s.warn(uo, i), null;
|
398
398
|
}
|
399
|
-
},
|
399
|
+
}, mo = (t) => {
|
400
400
|
const e = [];
|
401
401
|
return function(s, i) {
|
402
|
-
if (
|
403
|
-
return
|
402
|
+
if (xr(i))
|
403
|
+
return ho;
|
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) ? xs : (e.push(i), i);
|
407
407
|
};
|
408
|
-
},
|
408
|
+
}, Hs = (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
|
-
|
413
|
+
M(r) || Array.isArray(r) ? n[s] = Hs(r, e) : n[s] = r;
|
414
414
|
}
|
415
415
|
return n;
|
416
|
-
},
|
417
|
-
const n =
|
418
|
-
return
|
416
|
+
}, O = (t, e) => {
|
417
|
+
const n = mo(), s = n.call(t, "", t);
|
418
|
+
return M(t) || Array.isArray(t) ? Hs(t, n) : s;
|
419
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")
|
@@ -446,12 +446,12 @@ ${Rt}`;
|
|
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", ut = "3.21.0", po = "com.rudderlabs.javascript", Gs = "npm", Mn = "RudderJS-Initiated", vo = "ad-block page request", yo = "/ad-blocked", ot = "preloadedEventsBuffer", bo = "Consent Management Interaction", Eo = "ajs_trait_", So = "ajs_prop_", $n = "ajs_aid", Un = "ajs_uid", Bn = "ajs_event", ko = 10 * 1e3, Ro = 31536e3 * 1e3, Vn = 12 * 60 * 60 * 1e3, sn = 30 * 60 * 1e3, Fn = 10 * 1e3, Io = 10 * 1e3, To = 250, js = (t = "app") => {
|
450
450
|
globalThis.RudderStackGlobals || (globalThis.RudderStackGlobals = {}), globalThis.RudderStackGlobals[t] || (globalThis.RudderStackGlobals[t] = {});
|
451
|
-
},
|
452
|
-
|
453
|
-
},
|
454
|
-
function
|
451
|
+
}, ct = (t, e, n = "app") => {
|
452
|
+
js(n), globalThis.RudderStackGlobals[n][t] = e;
|
453
|
+
}, qs = (t, e = "app") => (js(e), globalThis.RudderStackGlobals[e][t]);
|
454
|
+
function Ao(t, e, n = To) {
|
455
455
|
let s;
|
456
456
|
return (...i) => {
|
457
457
|
globalThis.clearTimeout(s), s = globalThis.setTimeout(() => {
|
@@ -468,26 +468,26 @@ const xn = (t, e) => {
|
|
468
468
|
}
|
469
469
|
}), n;
|
470
470
|
}, Oo = (t = []) => {
|
471
|
-
const e = { trait:
|
471
|
+
const e = { trait: Eo, properties: So }, n = new URLSearchParams(globalThis.location.search);
|
472
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
|
-
},
|
473
|
+
}, Do = (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 = T(t[s]), t.splice(s, 1);
|
479
479
|
break;
|
480
480
|
}
|
481
481
|
s += 1;
|
482
482
|
}
|
483
483
|
return n;
|
484
|
-
},
|
484
|
+
}, Co = (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
|
-
Oo(e), e.length > 0 && (t.enqueuePreloadBufferEvents(e),
|
490
|
-
},
|
487
|
+
}, _o = (t) => {
|
488
|
+
const e = qs(ot) || [];
|
489
|
+
Oo(e), e.length > 0 && (t.enqueuePreloadBufferEvents(e), ct(ot, []));
|
490
|
+
}, Po = (t, e) => {
|
491
491
|
const n = t.shift();
|
492
492
|
let s;
|
493
493
|
if (S(e[n])) {
|
@@ -499,13 +499,13 @@ const xn = (t, e) => {
|
|
499
499
|
s = yn(...t);
|
500
500
|
break;
|
501
501
|
case "identify":
|
502
|
-
s =
|
502
|
+
s = $s(...t);
|
503
503
|
break;
|
504
504
|
case "alias":
|
505
|
-
s =
|
505
|
+
s = Us(...t);
|
506
506
|
break;
|
507
507
|
case "group":
|
508
|
-
s =
|
508
|
+
s = Bs(...t);
|
509
509
|
break;
|
510
510
|
default:
|
511
511
|
e[n](...t);
|
@@ -513,12 +513,12 @@ const xn = (t, e) => {
|
|
513
513
|
}
|
514
514
|
s && e[n](s);
|
515
515
|
}
|
516
|
-
},
|
516
|
+
}, No = 10 * 1e3, Lo = "RS_JS_SDK", wo = (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", Lo), a;
|
521
|
+
}, Mo = (t) => {
|
522
522
|
var r, a, u, l;
|
523
523
|
const e = document.getElementsByTagName("head");
|
524
524
|
if (e.length > 0) {
|
@@ -534,23 +534,23 @@ const xn = (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
|
+
}, $o = (t, e, n, s = !0, i) => new Promise((r, a) => {
|
538
|
+
document.getElementById(e) && a(new Error(oo(e)));
|
539
539
|
try {
|
540
540
|
let l;
|
541
|
-
wo(
|
541
|
+
Mo(wo(t, e, s, () => {
|
542
542
|
globalThis.clearTimeout(l), r(e);
|
543
543
|
}, (h) => {
|
544
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(ao(e, t, n)));
|
547
547
|
}, n);
|
548
548
|
} catch (l) {
|
549
549
|
a(Sn(l, Ln(e, t, "unknown")));
|
550
550
|
}
|
551
551
|
});
|
552
|
-
class
|
553
|
-
constructor(e, n =
|
552
|
+
class zs {
|
553
|
+
constructor(e, n = No) {
|
554
554
|
this.logger = e, this.timeout = n;
|
555
555
|
}
|
556
556
|
/**
|
@@ -558,23 +558,23 @@ class qs {
|
|
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
|
+
$o(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
567
|
}
|
568
|
-
var
|
569
|
-
function
|
568
|
+
var Uo = Symbol.for("preact-signals");
|
569
|
+
function Bt() {
|
570
570
|
if (Re > 1)
|
571
571
|
Re--;
|
572
572
|
else {
|
573
|
-
for (var t, e = !1;
|
574
|
-
var n =
|
575
|
-
for (
|
573
|
+
for (var t, e = !1; at !== void 0; ) {
|
574
|
+
var n = at;
|
575
|
+
for (at = void 0, rn++; n !== void 0; ) {
|
576
576
|
var s = n.o;
|
577
|
-
if (n.o = void 0, n.f &= -3, !(8 & n.f) &&
|
577
|
+
if (n.o = void 0, n.f &= -3, !(8 & n.f) && Ws(n)) try {
|
578
578
|
n.c();
|
579
579
|
} catch (i) {
|
580
580
|
e || (t = i, e = !0);
|
@@ -591,11 +591,11 @@ function j(t) {
|
|
591
591
|
try {
|
592
592
|
return t();
|
593
593
|
} finally {
|
594
|
-
|
594
|
+
Bt();
|
595
595
|
}
|
596
596
|
}
|
597
597
|
var D = void 0;
|
598
|
-
function
|
598
|
+
function Ks(t) {
|
599
599
|
var e = D;
|
600
600
|
D = void 0;
|
601
601
|
try {
|
@@ -604,8 +604,8 @@ function zs(t) {
|
|
604
604
|
D = e;
|
605
605
|
}
|
606
606
|
}
|
607
|
-
var
|
608
|
-
function
|
607
|
+
var at = void 0, Re = 0, rn = 0, Lt = 0;
|
608
|
+
function Ys(t) {
|
609
609
|
if (D !== void 0) {
|
610
610
|
var e = t.n;
|
611
611
|
if (e === void 0 || e.t !== D)
|
@@ -617,13 +617,13 @@ function Ks(t) {
|
|
617
617
|
function q(t, e) {
|
618
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;
|
619
619
|
}
|
620
|
-
q.prototype.brand =
|
620
|
+
q.prototype.brand = Uo;
|
621
621
|
q.prototype.h = function() {
|
622
622
|
return !0;
|
623
623
|
};
|
624
624
|
q.prototype.S = function(t) {
|
625
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 :
|
626
|
+
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : Ks(function() {
|
627
627
|
var s;
|
628
628
|
(s = e.W) == null || s.call(e);
|
629
629
|
}));
|
@@ -632,7 +632,7 @@ q.prototype.U = function(t) {
|
|
632
632
|
var e = this;
|
633
633
|
if (this.t !== void 0) {
|
634
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 &&
|
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 && Ks(function() {
|
636
636
|
var i;
|
637
637
|
(i = e.Z) == null || i.call(e);
|
638
638
|
}));
|
@@ -640,7 +640,7 @@ q.prototype.U = function(t) {
|
|
640
640
|
};
|
641
641
|
q.prototype.subscribe = function(t) {
|
642
642
|
var e = this;
|
643
|
-
return
|
643
|
+
return fe(function() {
|
644
644
|
var n = e.value, s = D;
|
645
645
|
D = void 0;
|
646
646
|
try {
|
@@ -669,7 +669,7 @@ q.prototype.peek = function() {
|
|
669
669
|
}
|
670
670
|
};
|
671
671
|
Object.defineProperty(q.prototype, "value", { get: function() {
|
672
|
-
var t =
|
672
|
+
var t = Ys(this);
|
673
673
|
return t !== void 0 && (t.i = this.i), this.v;
|
674
674
|
}, set: function(t) {
|
675
675
|
if (t !== this.v) {
|
@@ -678,18 +678,18 @@ Object.defineProperty(q.prototype, "value", { get: function() {
|
|
678
678
|
try {
|
679
679
|
for (var e = this.t; e !== void 0; e = e.x) e.t.N();
|
680
680
|
} finally {
|
681
|
-
|
681
|
+
Bt();
|
682
682
|
}
|
683
683
|
}
|
684
684
|
} });
|
685
685
|
function p(t, e) {
|
686
686
|
return new q(t, e);
|
687
687
|
}
|
688
|
-
function
|
688
|
+
function Ws(t) {
|
689
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;
|
690
690
|
return !1;
|
691
691
|
}
|
692
|
-
function
|
692
|
+
function Qs(t) {
|
693
693
|
for (var e = t.s; e !== void 0; e = e.n) {
|
694
694
|
var n = e.S.n;
|
695
695
|
if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
|
@@ -698,7 +698,7 @@ function Ws(t) {
|
|
698
698
|
}
|
699
699
|
}
|
700
700
|
}
|
701
|
-
function
|
701
|
+
function Xs(t) {
|
702
702
|
for (var e = t.s, n = void 0; e !== void 0; ) {
|
703
703
|
var s = e.p;
|
704
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;
|
@@ -712,17 +712,17 @@ We.prototype = new q();
|
|
712
712
|
We.prototype.h = function() {
|
713
713
|
if (this.f &= -3, 1 & this.f) return !1;
|
714
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 && !
|
715
|
+
if (this.g = Lt, this.f |= 1, this.i > 0 && !Ws(this))
|
716
716
|
return this.f &= -2, !0;
|
717
717
|
var t = D;
|
718
718
|
try {
|
719
|
-
|
719
|
+
Qs(this), D = this;
|
720
720
|
var e = this.x();
|
721
721
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
722
722
|
} catch (n) {
|
723
723
|
this.v = n, this.f |= 16, this.i++;
|
724
724
|
}
|
725
|
-
return D = t,
|
725
|
+
return D = t, Xs(this), this.f &= -2, !0;
|
726
726
|
};
|
727
727
|
We.prototype.S = function(t) {
|
728
728
|
if (this.t === void 0) {
|
@@ -745,11 +745,11 @@ We.prototype.N = function() {
|
|
745
745
|
};
|
746
746
|
Object.defineProperty(We.prototype, "value", { get: function() {
|
747
747
|
if (1 & this.f) throw new Error("Cycle detected");
|
748
|
-
var t =
|
748
|
+
var t = Ys(this);
|
749
749
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
750
750
|
return this.v;
|
751
751
|
} });
|
752
|
-
function
|
752
|
+
function Js(t) {
|
753
753
|
var e = t.u;
|
754
754
|
if (t.u = void 0, typeof e == "function") {
|
755
755
|
Re++;
|
@@ -760,22 +760,22 @@ function Xs(t) {
|
|
760
760
|
} catch (s) {
|
761
761
|
throw t.f &= -2, t.f |= 8, kn(t), s;
|
762
762
|
} finally {
|
763
|
-
D = n,
|
763
|
+
D = n, Bt();
|
764
764
|
}
|
765
765
|
}
|
766
766
|
}
|
767
767
|
function kn(t) {
|
768
768
|
for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
|
769
|
-
t.x = void 0, t.s = void 0,
|
769
|
+
t.x = void 0, t.s = void 0, Js(t);
|
770
770
|
}
|
771
|
-
function
|
771
|
+
function Bo(t) {
|
772
772
|
if (D !== this) throw new Error("Out-of-order effect");
|
773
|
-
|
773
|
+
Xs(this), D = t, this.f &= -2, 8 & this.f && kn(this), Bt();
|
774
774
|
}
|
775
|
-
function
|
775
|
+
function Qe(t) {
|
776
776
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
|
777
777
|
}
|
778
|
-
|
778
|
+
Qe.prototype.c = function() {
|
779
779
|
var t = this.S();
|
780
780
|
try {
|
781
781
|
if (8 & this.f || this.x === void 0) return;
|
@@ -785,20 +785,23 @@ ft.prototype.c = function() {
|
|
785
785
|
t();
|
786
786
|
}
|
787
787
|
};
|
788
|
-
|
788
|
+
Qe.prototype.S = function() {
|
789
789
|
if (1 & this.f) throw new Error("Cycle detected");
|
790
|
-
this.f |= 1, this.f &= -9,
|
790
|
+
this.f |= 1, this.f &= -9, Js(this), Qs(this), Re++;
|
791
791
|
var t = D;
|
792
|
-
return D = this,
|
792
|
+
return D = this, Bo.bind(this, t);
|
793
793
|
};
|
794
|
-
|
795
|
-
2 & this.f || (this.f |= 2, this.o =
|
794
|
+
Qe.prototype.N = function() {
|
795
|
+
2 & this.f || (this.f |= 2, this.o = at, at = this);
|
796
796
|
};
|
797
|
-
|
797
|
+
Qe.prototype.d = function() {
|
798
798
|
this.f |= 8, 1 & this.f || kn(this);
|
799
799
|
};
|
800
|
-
function
|
801
|
-
|
800
|
+
Qe.prototype.dispose = function() {
|
801
|
+
this.d();
|
802
|
+
};
|
803
|
+
function fe(t) {
|
804
|
+
var e = new Qe(t);
|
802
805
|
try {
|
803
806
|
e.c();
|
804
807
|
} catch (n) {
|
@@ -806,7 +809,7 @@ function ve(t) {
|
|
806
809
|
}
|
807
810
|
return e.d.bind(e);
|
808
811
|
}
|
809
|
-
class
|
812
|
+
class Vo {
|
810
813
|
constructor() {
|
811
814
|
this.items = [];
|
812
815
|
}
|
@@ -826,8 +829,8 @@ class Bo {
|
|
826
829
|
this.items = [];
|
827
830
|
}
|
828
831
|
}
|
829
|
-
const pt = { LOG: 0, INFO: 1, DEBUG: 2, WARN: 3, ERROR: 4, NONE: 5 }, Hn = "LOG",
|
830
|
-
class
|
832
|
+
const pt = { LOG: 0, INFO: 1, DEBUG: 2, WARN: 3, ERROR: 4, NONE: 5 }, Hn = "LOG", Zs = "ERROR", Fo = "RS SDK", xo = "font-weight: bold; background: black; color: white;", Ho = "font-weight: normal;";
|
833
|
+
class Go {
|
831
834
|
constructor(e = Hn, n = "", s = console) {
|
832
835
|
this.minLogLevel = pt[e], this.scope = n, this.logProvider = s;
|
833
836
|
}
|
@@ -856,50 +859,50 @@ class Ho {
|
|
856
859
|
// TODO: should we allow to change the level via global variable on run time
|
857
860
|
// to assist on the fly debugging?
|
858
861
|
setMinLogLevel(e) {
|
859
|
-
this.minLogLevel = pt[e],
|
862
|
+
this.minLogLevel = pt[e], x(this.minLogLevel) && (this.minLogLevel = pt[Hn]);
|
860
863
|
}
|
861
864
|
/**
|
862
865
|
* Formats the console message using `scope` and styles
|
863
866
|
*/
|
864
867
|
formatLogData(e) {
|
865
868
|
if (Array.isArray(e) && e.length > 0) {
|
866
|
-
let n = `%c ${
|
869
|
+
let n = `%c ${Fo}`;
|
867
870
|
this.scope && (n = `${n} - ${this.scope}`);
|
868
|
-
const s =
|
871
|
+
const s = L(e[0]) ? e[0].trim() : "";
|
869
872
|
n = `${n} %c ${s}`;
|
870
873
|
const i = [
|
871
874
|
n,
|
872
|
-
|
875
|
+
xo,
|
873
876
|
// add style for the prefix
|
874
|
-
|
877
|
+
Ho
|
875
878
|
// reset the style for the actual message
|
876
879
|
];
|
877
|
-
return
|
880
|
+
return L(e[0]) || i.push(e[0]), i.push(...e.slice(1)), i;
|
878
881
|
}
|
879
882
|
return e;
|
880
883
|
}
|
881
884
|
}
|
882
|
-
const ye = new
|
883
|
-
let
|
885
|
+
const ye = new Go();
|
886
|
+
let me = /* @__PURE__ */ function(t) {
|
884
887
|
return t.HANDLEDEXCEPTION = "handledException", t.UNHANDLEDEXCEPTION = "unhandledException", t.UNHANDLEDREJECTION = "unhandledPromiseRejection", t;
|
885
888
|
}({});
|
886
|
-
const
|
889
|
+
const ei = ["localStorage", "memoryStorage", "cookieStorage", "sessionStorage", "none"], on = "cookieStorage", Gn = "Unable to process/parse source configuration response", jo = "The source is disabled. Please enable the source in the dashboard to send events.", qo = "Failed to prepare data for the request.", zo = "Failed to invoke plugin because the extension point name is missing.", Ko = "Failed to invoke plugin because the extension point name is invalid.", Yo = (t) => `${t}${R}The "getSourceConfig" load API option must be a function that returns valid source configuration data.`, Wo = (t, e, n) => `${t}${R}The base URL "${n}" for ${e} is not valid.`, Qo = (t, e, n) => `${t}${R}The consent manager "${e}" is not supported. Please choose one of the following supported consent managers: "${Object.keys(n)}".`, Xo = (t, e) => `${t}${R}Ignoring a non-error: ${e}.`, jn = "Failed to log breadcrumb", Jo = (t) => `${t}${R}Failed to handle the error.`, Zo = (t) => `${t}${R}Plugin name is missing.`, ea = (t, e) => `${t}${R}Plugin "${e}" already exists.`, ta = (t, e) => `${t}${R}Plugin "${e}" not found.`, na = (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.`, sa = (t, e, n) => `${t}${R}Plugin "${e}" could not be loaded because some of its dependencies "${n}" do not exist.`, ia = (t, e, n) => `${t}${R}Failed to invoke the "${e}" extension point of plugin "${n}".`, ra = (t, e) => `${t}${R}The "${e}" storage type is `, qn = "Failed to fetch the source config", oa = (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.`, aa = (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.`, ti = (t) => `${t}${R}The provided callback parameter is not a function.`, la = (t, e, n, s, i) => `${t} with status ${e} (${n}) for URL: ${s}. Response: ${i.trim()}`, ua = (t, e, n) => `${t} due to timeout or no connection (${e ? e.type : ""}) at the client side for URL: ${n}`, ca = (t, e) => `${t} for URL: ${e}`, da = (t) => `Failed to save the value for "${t}" to storage`, fa = (t) => `Failed to retrieve or parse data for "${t}" from storage`, ha = (t) => `The server responded with status ${t} while setting the cookies. As a fallback, the cookies will be set client side.`, ga = (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.", ma = (t, e, n) => `${t}${R}The storage type "${e}" is not supported. Please choose one of the following supported types: "${ei}". The default type "${n}" will be used instead.`, pa = (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.`, va = (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.`, ya = (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.`, ba = (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}).`, Ea = (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.`, Sa = (t) => `${t}${R}The Beacon API is not supported by your browser. The events will be sent using XHR instead.`, ka = (t, e, n) => `${t}${R}The session timeout value "${e}" is not a number. The default timeout of ${n} ms will be used instead.`, Ra = (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.`, Ia = (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.`, Aa = (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.`, Da = (t) => `${t}${R}The storage is either full or unavailable, so the data will not be persisted. Switching to in-memory storage.`, Ca = (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.`, _a = (t) => `${t}${R}The callback threw an exception`, Pa = (t, e) => `${t}${R}The provided source config URL "${e}" is invalid. Using the default source config URL instead.`, Na = (t, e) => `Failed to load the polyfill script with ID "${t}" from URL ${e}.`, La = (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.`, wa = (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.`, Ma = (t, e) => `${t}${R}${e} plugin is deprecated. Please exclude it from the load API options.`, $a = (t, e, n, s) => {
|
887
890
|
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.`;
|
888
891
|
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.`;
|
889
|
-
},
|
892
|
+
}, Ua = (t, e) => `${t}${R}The provided polyfill URL "${e}" is invalid. The default polyfill URL will be used instead.`, Ba = (t) => `${t}${R}Page Unloaded event can only be tracked when the Beacon transport is active. Please enable "useBeacon" load API option.`, Va = (t, e) => `${t}${R}Ignoring unknown plugins: ${e.join(", ")}.`, ni = { All: !0 }, Rn = "js-integrations", si = "plugins", Fa = 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_]*)?$"), dt = "modern", Vt = "https://cdn.rudderlabs.com", In = "v3", ii = `${Vt}/${In}/${dt}/${Rn}`, ri = `${Vt}/${In}/${dt}/${si}`, oi = "https://api.rudderstack.com", Ce = "v3", xa = "xhr", an = { iubenda: "IubendaConsentManager", oneTrust: "OneTrustConsentManager", ketch: "KetchConsentManager", custom: "CustomConsentManager" }, It = { [Ce]: "StorageEncryption", legacy: "StorageEncryptionLegacy" }, Ha = { [xa]: "XhrQueue", beacon: "BeaconQueue" }, Ga = "rsaRequest", ja = "rsaMetrics", qa = { configUrl: oi, loadIntegration: !0, sessions: { autoTrack: !0, timeout: sn, cutOff: { enabled: !1 } }, sameSiteCookie: "Lax", polyfillIfRequired: !0, integrations: ni, useBeacon: !1, beaconQueueOptions: {}, destinationsQueueOptions: {}, queueOptions: {}, lockIntegrationsVersion: !0, lockPluginsVersion: !0, uaChTrackLevel: "none", plugins: [], useGlobalIntegrationsConfigInEvents: !1, bufferDataPlaneEventsUntilReady: !1, dataPlaneEventsBufferTimeout: Io, storage: { encryption: { version: Ce }, migrate: !0, cookie: {} }, sendAdblockPage: !1, sameDomainCookiesOnly: !1, secureCookie: !1, sendAdblockPageOptions: {}, useServerSideCookies: !1 }, za = p(T(qa)), A = { userId: "", userTraits: {}, anonymousId: "", groupId: "", groupTraits: {}, initialReferrer: "", initialReferringDomain: "", sessionInfo: {}, authToken: null }, Ka = 10, Ya = { userId: p(A.userId), userTraits: p(A.userTraits), anonymousId: p(A.anonymousId), groupId: p(A.groupId), groupTraits: p(A.groupTraits), initialReferrer: p(A.initialReferrer), initialReferringDomain: p(A.initialReferringDomain), sessionInfo: p(A.sessionInfo), authToken: p(A.authToken) }, Wa = { 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), isAdBlockerDetectionInProgress: p(!1), isAdBlocked: p(void 0), cspBlockedURLs: p([]) }, Qa = { isErrorReportingEnabled: p(!1), isMetricsReportingEnabled: p(!1), breadcrumbs: p([]) }, Xa = p(void 0), Ja = { activeDataplaneUrl: p(void 0), integrationsCDNPath: p(ii), pluginsCDNPath: p(ri), sourceConfigUrl: p(void 0), status: p(void 0), initialized: p(!1), logLevel: p(Zs), loaded: p(!1), readyCallbacks: p([]), writeKey: p(void 0), dataPlaneUrl: p(void 0) }, Za = { 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) }, el = { retries: p(0), dropped: p(0), sent: p(0), queued: p(0), triggered: p(0), metricsServiceUrl: p(void 0) }, tl = { app: p({ name: wn, namespace: po, version: ut, installType: Gs }), traits: p(null), library: p({ name: wn, version: ut, 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) }, nl = { configuredDestinations: p([]), activeDestinations: p([]), loadOnlyIntegrations: p({}), failedDestinations: p([]), loadIntegration: p(!0), initializedDestinations: p([]), clientDestinationsReady: p(!1), integrationsConfig: p({}) }, sl = { toBeProcessedArray: p([]), readyCallbacksArray: p([]) }, il = { ready: p(!1), loadedPlugins: p([]), failedPlugins: p([]), pluginsToLoadFromConfig: p([]), activePlugins: p([]), totalPluginsToLoad: p(0) }, rl = { encryptionPluginName: p(void 0), migrate: p(!1), type: p(void 0), cookie: p(void 0), entries: p({}), trulyAnonymousTracking: p(!1) }, ol = { isEnabledServerSideCookies: p(!1), dataServiceUrl: p(void 0) }, al = {
|
890
893
|
eventsQueuePluginName: p(void 0),
|
891
894
|
deliveryEnabled: p(!0)
|
892
895
|
// Delivery should always happen
|
893
|
-
},
|
894
|
-
function
|
896
|
+
}, ll = { enabled: p(!1), pageLifecycle: { enabled: p(!1), pageViewId: p(void 0), pageLoadedTimestamp: p(void 0) } }, ul = { capabilities: Wa, consents: Za, context: tl, eventBuffer: sl, lifecycle: Ja, loadOptions: za, metrics: el, nativeDestinations: nl, plugins: il, reporting: Qa, session: Ya, source: Xa, storage: rl, serverCookies: ol, dataPlaneEvents: al, autoTrack: ll }, o = { ...T(ul) };
|
897
|
+
function ai(t) {
|
895
898
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
896
899
|
}
|
897
|
-
var
|
898
|
-
function
|
900
|
+
var Tt = { exports: {} }, At = { exports: {} }, cl = At.exports, Kn;
|
901
|
+
function dl() {
|
899
902
|
return Kn || (Kn = 1, function(t, e) {
|
900
903
|
(function(n, s) {
|
901
904
|
t.exports = s();
|
902
|
-
})(
|
905
|
+
})(cl, function() {
|
903
906
|
function n(m) {
|
904
907
|
return !isNaN(parseFloat(m)) && isFinite(m);
|
905
908
|
}
|
@@ -936,10 +939,10 @@ function cl() {
|
|
936
939
|
var m = this.getFileName() || "", v = this.getLineNumber() || "", k = this.getColumnNumber() || "", E = this.getFunctionName() || "";
|
937
940
|
return this.getIsEval() ? m ? "[eval] (" + m + ":" + v + ":" + k + ")" : "[eval]:" + v + ":" + k : E ? E + " (" + m + ":" + v + ":" + k + ")" : m + ":" + v + ":" + k;
|
938
941
|
} }, h.fromString = function(v) {
|
939
|
-
var k = v.indexOf("("), E = v.lastIndexOf(")"), P = v.substring(0, k), z = v.substring(k + 1, E).split(","),
|
940
|
-
if (
|
941
|
-
var J = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(
|
942
|
-
return new h({ functionName: P, args: z || void 0, fileName:
|
942
|
+
var k = v.indexOf("("), E = v.lastIndexOf(")"), P = v.substring(0, k), z = v.substring(k + 1, E).split(","), G = v.substring(E + 1);
|
943
|
+
if (G.indexOf("@") === 0)
|
944
|
+
var J = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(G, ""), he = J[1], Ae = J[2], I = J[3];
|
945
|
+
return new h({ functionName: P, args: z || void 0, fileName: he, lineNumber: Ae || void 0, columnNumber: I || void 0 });
|
943
946
|
};
|
944
947
|
for (var y = 0; y < r.length; y++)
|
945
948
|
h.prototype["get" + s(r[y])] = i(r[y]), h.prototype["set" + s(r[y])] = /* @__PURE__ */ function(m) {
|
@@ -963,14 +966,14 @@ function cl() {
|
|
963
966
|
}(u[f]);
|
964
967
|
return h;
|
965
968
|
});
|
966
|
-
}(
|
969
|
+
}(At)), At.exports;
|
967
970
|
}
|
968
|
-
var
|
969
|
-
function
|
971
|
+
var fl = Tt.exports, Yn;
|
972
|
+
function hl() {
|
970
973
|
return Yn || (Yn = 1, function(t, e) {
|
971
974
|
(function(n, s) {
|
972
|
-
t.exports = s(
|
973
|
-
})(
|
975
|
+
t.exports = s(dl());
|
976
|
+
})(fl, function(s) {
|
974
977
|
var i = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, a = /^(eval@)?(\[native code])?$/;
|
975
978
|
return {
|
976
979
|
/**
|
@@ -1057,16 +1060,16 @@ function fl() {
|
|
1057
1060
|
}
|
1058
1061
|
};
|
1059
1062
|
});
|
1060
|
-
}(
|
1063
|
+
}(Tt)), Tt.exports;
|
1061
1064
|
}
|
1062
|
-
var
|
1063
|
-
const
|
1064
|
-
const e = { file: t.fileName, method:
|
1065
|
-
return e.lineNumber && e.lineNumber > -1 && !e.file && !e.method && (e.file =
|
1066
|
-
}, Wn = (t) =>
|
1065
|
+
var gl = hl();
|
1066
|
+
const ml = /* @__PURE__ */ ai(gl), li = "global code", pl = (t) => C(t) && /^global code$/i.test(t) ? li : t, vl = (t) => {
|
1067
|
+
const e = { file: t.fileName, method: pl(t.functionName), lineNumber: t.lineNumber, columnNumber: t.columnNumber };
|
1068
|
+
return e.lineNumber && e.lineNumber > -1 && !e.file && !e.method && (e.file = li), e;
|
1069
|
+
}, Wn = (t) => L(t) ? t : "";
|
1067
1070
|
function Qn(t, e, n, s) {
|
1068
1071
|
return { errorClass: Wn(t), message: `${n}${Wn(e)}`, type: "browserjs", stacktrace: s.reduce((i, r) => {
|
1069
|
-
const a =
|
1072
|
+
const a = vl(r);
|
1070
1073
|
try {
|
1071
1074
|
return JSON.stringify(a) === "{}" ? i : i.concat(a);
|
1072
1075
|
} catch {
|
@@ -1074,12 +1077,12 @@ function Qn(t, e, n, s) {
|
|
1074
1077
|
}
|
1075
1078
|
}, []) };
|
1076
1079
|
}
|
1077
|
-
const
|
1080
|
+
const ui = (t, e) => {
|
1078
1081
|
let n;
|
1079
|
-
return vn(t) &&
|
1080
|
-
},
|
1082
|
+
return vn(t) && L(En(t)) ? n = t : (e.warn(Xo(st, de(t))), n = void 0), n;
|
1083
|
+
}, yl = (t, e) => {
|
1081
1084
|
try {
|
1082
|
-
const n =
|
1085
|
+
const n = ml.parse(t);
|
1083
1086
|
return Qn(t.name, t.message, e, n);
|
1084
1087
|
} catch {
|
1085
1088
|
return Qn(t.name, t.message, e, []);
|
@@ -1091,21 +1094,21 @@ const li = (t, e) => {
|
|
1091
1094
|
const s = Sn(n, "Failed to parse response data");
|
1092
1095
|
e(s);
|
1093
1096
|
}
|
1094
|
-
},
|
1095
|
-
const s =
|
1096
|
-
return n && (s.headers =
|
1097
|
-
}, Zn = (t, e =
|
1097
|
+
}, Ot = "The request failed", bl = [/Failed to fetch dynamically imported module: .*/], El = [/Unable to load \(.*\) the script with the id .*/, /A timeout of \d+ ms occurred while trying to load the script with id .*/], Sl = [new RegExp(`${Ot}.*`), /A script with the id .* is already loaded\./], kl = [...bl, ...El], Rl = { headers: { Accept: "application/json", "Content-Type": "application/json;charset=UTF-8" }, method: "GET" }, Jn = (t, e, n) => {
|
1098
|
+
const s = H(Rl, e || {});
|
1099
|
+
return n && (s.headers = H(s.headers, { Authorization: n })), s.url = t, s;
|
1100
|
+
}, Zn = (t, e = ko, n) => new Promise((s, i) => {
|
1098
1101
|
let r;
|
1099
1102
|
if (t.sendRawData === !0)
|
1100
1103
|
r = t.data;
|
1101
1104
|
else if (r = de(t.data, !1, [], n), ne(r)) {
|
1102
|
-
i({ error: new Error(
|
1105
|
+
i({ error: new Error(qo), undefined: void 0, options: t });
|
1103
1106
|
return;
|
1104
1107
|
}
|
1105
1108
|
const a = new XMLHttpRequest(), u = (c) => {
|
1106
|
-
i({ error: new Error(
|
1109
|
+
i({ error: new Error(la(Ot, a.status, a.statusText, t.url, a.responseText)), xhr: a, options: t });
|
1107
1110
|
}, l = (c) => {
|
1108
|
-
i({ error: new Error(
|
1111
|
+
i({ error: new Error(ua(Ot, c, t.url)), xhr: a, options: t, ...(c == null ? void 0 : c.type) === "timeout" ? { timedOut: !0 } : {} });
|
1109
1112
|
};
|
1110
1113
|
a.ontimeout = l, a.onerror = l, a.onload = () => {
|
1111
1114
|
a.status >= 200 && a.status < 400 ? s({ response: a.responseText, xhr: a, options: t }) : u();
|
@@ -1115,10 +1118,10 @@ const li = (t, e) => {
|
|
1115
1118
|
try {
|
1116
1119
|
a.send(r);
|
1117
1120
|
} catch (c) {
|
1118
|
-
i({ error: Sn(c,
|
1121
|
+
i({ error: Sn(c, ca(Ot, t.url)), xhr: a, options: t });
|
1119
1122
|
}
|
1120
1123
|
});
|
1121
|
-
class
|
1124
|
+
class Il {
|
1122
1125
|
constructor(e) {
|
1123
1126
|
this.logger = e, this.onError = this.onError.bind(this);
|
1124
1127
|
}
|
@@ -1153,13 +1156,13 @@ class kl {
|
|
1153
1156
|
*/
|
1154
1157
|
onError(e, n) {
|
1155
1158
|
var s;
|
1156
|
-
(s = this.errorHandler) == null || s.onError({ error: e, context:
|
1159
|
+
(s = this.errorHandler) == null || s.onError({ error: e, context: Jr, groupingHash: n });
|
1157
1160
|
}
|
1158
1161
|
/**
|
1159
1162
|
* Set basic authentication header (eg writekey)
|
1160
1163
|
*/
|
1161
1164
|
setAuthHeader(e, n = !1) {
|
1162
|
-
const s = n ? e :
|
1165
|
+
const s = n ? e : Wr(`${e}:`);
|
1163
1166
|
this.basicAuthHeader = `Basic ${s}`;
|
1164
1167
|
}
|
1165
1168
|
/**
|
@@ -1169,10 +1172,10 @@ class kl {
|
|
1169
1172
|
this.basicAuthHeader = void 0;
|
1170
1173
|
}
|
1171
1174
|
}
|
1172
|
-
const
|
1175
|
+
const ci = new Il(ye), Tl = "1", Al = () => [
|
1173
1176
|
"rsa"
|
1174
1177
|
// Prefix for all the SDK scripts including plugins and module federated chunks
|
1175
|
-
],
|
1178
|
+
], Ol = ["www.test-host.com", "localhost", "127.0.0.1", "[::1]"], Dl = [
|
1176
1179
|
"userId",
|
1177
1180
|
"userTraits",
|
1178
1181
|
"groupId",
|
@@ -1185,64 +1188,94 @@ const ui = new kl(ye), Rl = "1", Tl = () => [
|
|
1185
1188
|
// pre-load event buffer (may contain PII)
|
1186
1189
|
"traits",
|
1187
1190
|
"authToken"
|
1188
|
-
],
|
1191
|
+
], Cl = "RudderStack JavaScript SDK", _l = "__REPOSITORY_URL__", Pl = "js", di = (t) => {
|
1192
|
+
o.capabilities.isAdBlockerDetectionInProgress.value = !0;
|
1193
|
+
try {
|
1194
|
+
const e = new URL(o.lifecycle.sourceConfigUrl.value), n = `${e.origin}${e.pathname}?view=ad`;
|
1195
|
+
t.getAsyncData({ url: n, options: {
|
1196
|
+
// We actually don't need the response from the request, so we are using HEAD
|
1197
|
+
method: "HEAD",
|
1198
|
+
headers: { "Content-Type": void 0 }
|
1199
|
+
}, isRawResponse: !0, callback: (s, i) => {
|
1200
|
+
var r;
|
1201
|
+
o.capabilities.isAdBlockerDetectionInProgress.value = !1, 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;
|
1202
|
+
} });
|
1203
|
+
} catch (e) {
|
1204
|
+
throw o.capabilities.isAdBlockerDetectionInProgress.value = !1, e;
|
1205
|
+
}
|
1206
|
+
}, Nl = (t, e) => {
|
1189
1207
|
switch (e) {
|
1190
|
-
case
|
1208
|
+
case me.UNHANDLEDEXCEPTION: {
|
1191
1209
|
const { error: n } = t;
|
1192
1210
|
return n || t;
|
1193
1211
|
}
|
1194
|
-
case
|
1212
|
+
case me.UNHANDLEDREJECTION:
|
1195
1213
|
return t.reason;
|
1196
|
-
case
|
1214
|
+
case me.HANDLEDEXCEPTION:
|
1197
1215
|
default:
|
1198
1216
|
return t;
|
1199
1217
|
}
|
1200
|
-
},
|
1218
|
+
}, Ll = (t) => ({ type: "manual", name: t, timestamp: /* @__PURE__ */ new Date(), metaData: {} }), wl = () => {
|
1201
1219
|
const t = globalThis.location.hostname;
|
1202
|
-
return !t || t &&
|
1203
|
-
},
|
1204
|
-
const e = de(t, !1,
|
1220
|
+
return !t || t && Ol.includes(t) ? "development" : "production";
|
1221
|
+
}, Ml = (t) => {
|
1222
|
+
const e = de(t, !1, Dl);
|
1205
1223
|
return e !== null ? JSON.parse(e) : {};
|
1206
|
-
},
|
1224
|
+
}, $l = () => globalThis.location.href.split("?")[0], Ul = (t, e, n, s) => {
|
1207
1225
|
var i, r;
|
1208
1226
|
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" };
|
1209
|
-
},
|
1227
|
+
}, Bl = (t, e) => ({ locale: t.value ?? "NA", userAgent: e.value ?? "NA", time: /* @__PURE__ */ new Date() }), Vl = (t, e, n, s) => {
|
1210
1228
|
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;
|
1211
|
-
return { payloadVersion: "5", notifier: { name:
|
1229
|
+
return { payloadVersion: "5", notifier: { name: Cl, version: d.value.version, url: _l }, events: [{ exceptions: [T(t)], severity: e.severity, unhandled: e.unhandled, severityReason: e.severityReason, app: { version: d.value.version, releaseStage: wl(), type: d.value.installType }, device: Bl(h, y), request: { url: $l(), clientIp: "[NOT COLLECTED]" }, breadcrumbs: T(l.breadcrumbs.value), context: t.message, groupingHash: s, metaData: {
|
1212
1230
|
app: { snippetVersion: m.value.snippetVersion },
|
1213
1231
|
device: { ...f.value, timezone: g.value },
|
1214
1232
|
// Add rest of the state groups as metadata
|
1215
1233
|
// so that they show up as separate tabs in the dashboard
|
1216
|
-
...
|
1217
|
-
}, user:
|
1218
|
-
},
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1234
|
+
...Ml(n)
|
1235
|
+
}, user: Ul(u, a, r, c) }] };
|
1236
|
+
}, Fl = (t, e, n) => {
|
1237
|
+
if (x(t.capabilities.isAdBlocked.value)) {
|
1238
|
+
t.capabilities.isAdBlockerDetectionInProgress.value === !1 && di(e);
|
1239
|
+
const s = fe(() => {
|
1240
|
+
C(t.capabilities.isAdBlocked.value) && (n(t.capabilities.isAdBlocked.value === !1), s());
|
1241
|
+
});
|
1242
|
+
} else
|
1243
|
+
n(t.capabilities.isAdBlocked.value === !1);
|
1244
|
+
}, xl = (t, e, n) => {
|
1245
|
+
const s = t.message;
|
1246
|
+
return new Promise((i) => {
|
1247
|
+
var r;
|
1248
|
+
if (kl.some((a) => a.test(s))) {
|
1249
|
+
const a = (r = /https?:\/\/[^\s"'(),;<>[\]{}]+/.exec(s)) == null ? void 0 : r[0];
|
1250
|
+
L(a) ? a.startsWith(Vt) ? e.capabilities.cspBlockedURLs.value.includes(a) ? i(!1) : Fl(e, n, i) : i(!1) : i(!0);
|
1251
|
+
} else
|
1252
|
+
i(!Sl.some((a) => a.test(s)));
|
1253
|
+
});
|
1254
|
+
}, Hl = (t) => {
|
1222
1255
|
var r;
|
1223
1256
|
const e = (r = t.stacktrace[0]) == null ? void 0 : r.file;
|
1224
1257
|
if (!e || typeof e != "string")
|
1225
1258
|
return !1;
|
1226
1259
|
const n = e.substring(e.lastIndexOf("/") + 1), s = e.split("/");
|
1227
|
-
return s[s.length - 2] === Rn ||
|
1228
|
-
},
|
1229
|
-
const n = { version:
|
1260
|
+
return s[s.length - 2] === Rn || Al().some((a) => n.startsWith(a) && n.endsWith(".js"));
|
1261
|
+
}, Gl = (t, e) => {
|
1262
|
+
const n = { version: Tl, message_id: Ut(), source: { name: Pl, sdk_version: e.context.app.value.version, write_key: e.lifecycle.writeKey.value, install_type: e.context.app.value.installType }, errors: t };
|
1230
1263
|
return de(n);
|
1231
|
-
},
|
1264
|
+
}, jl = (t, e, n, s) => {
|
1232
1265
|
let i;
|
1233
1266
|
if (n.context.app.value.installType !== "cdn")
|
1234
1267
|
return i;
|
1235
1268
|
if (!C(t))
|
1236
1269
|
i = e;
|
1237
|
-
else if (
|
1270
|
+
else if (L(t))
|
1238
1271
|
i = t;
|
1239
1272
|
else {
|
1240
|
-
const r =
|
1273
|
+
const r = ui(t, s);
|
1241
1274
|
C(r) ? i = r.message : i = e;
|
1242
1275
|
}
|
1243
1276
|
return i;
|
1244
1277
|
};
|
1245
|
-
class
|
1278
|
+
class ql {
|
1246
1279
|
// If no logger is passed errors will be thrown as unhandled error
|
1247
1280
|
constructor(e, n) {
|
1248
1281
|
N(this, "initialized", !1);
|
@@ -1260,9 +1293,12 @@ class Hl {
|
|
1260
1293
|
*/
|
1261
1294
|
attachErrorListeners() {
|
1262
1295
|
globalThis.addEventListener("error", (e) => {
|
1263
|
-
this.onError({ error: e, context:
|
1296
|
+
this.onError({ error: e, context: st, errorType: me.UNHANDLEDEXCEPTION });
|
1264
1297
|
}), globalThis.addEventListener("unhandledrejection", (e) => {
|
1265
|
-
this.onError({ error: e, context:
|
1298
|
+
this.onError({ error: e, context: st, errorType: me.UNHANDLEDREJECTION });
|
1299
|
+
}), document.addEventListener("securitypolicyviolation", (e) => {
|
1300
|
+
const n = L(e.blockedURI) ? e.blockedURI : "";
|
1301
|
+
e.disposition === "enforce" && n.startsWith(Vt) && !o.capabilities.cspBlockedURLs.value.includes(n) && (o.capabilities.cspBlockedURLs.value = [...o.capabilities.cspBlockedURLs.value, n]);
|
1266
1302
|
});
|
1267
1303
|
}
|
1268
1304
|
/**
|
@@ -1274,21 +1310,21 @@ class Hl {
|
|
1274
1310
|
* @param errorInfo.errorType - The type of the error (handled or unhandled)
|
1275
1311
|
* @param errorInfo.groupingHash - The grouping hash of the error
|
1276
1312
|
*/
|
1277
|
-
onError(e) {
|
1313
|
+
async onError(e) {
|
1278
1314
|
try {
|
1279
|
-
const { error: n, context: s, customMessage: i, groupingHash: r } = e, a = e.errorType ??
|
1280
|
-
if (
|
1315
|
+
const { error: n, context: s, customMessage: i, groupingHash: r } = e, a = e.errorType ?? me.HANDLEDEXCEPTION, u = Nl(n, a), l = ui(u, this.logger);
|
1316
|
+
if (x(l))
|
1281
1317
|
return;
|
1282
|
-
const c = i ? `${i} - ` : "", d = `${s}${R}${c}`, h =
|
1283
|
-
if (!g && !
|
1318
|
+
const c = i ? `${i} - ` : "", d = `${s}${R}${c}`, h = yl(l, d), g = En(l).includes(Rt);
|
1319
|
+
if (!g && !Hl(h) && a !== me.HANDLEDEXCEPTION)
|
1284
1320
|
return;
|
1285
|
-
if (o.reporting.isErrorReportingEnabled.value &&
|
1286
|
-
const
|
1287
|
-
this.httpClient.getAsyncData({ url: o.metrics.metricsServiceUrl.value, options: { method: "POST", data:
|
1321
|
+
if (o.reporting.isErrorReportingEnabled.value && await xl(h, o, this.httpClient)) {
|
1322
|
+
const m = { severity: "error", unhandled: a !== me.HANDLEDEXCEPTION, severityReason: { type: a } }, v = jl(r, h.message, o, this.logger), k = Vl(h, m, o, v);
|
1323
|
+
this.httpClient.getAsyncData({ url: o.metrics.metricsServiceUrl.value, options: { method: "POST", data: Gl(k, o), sendRawData: !0 }, isRawResponse: !0 });
|
1288
1324
|
}
|
1289
|
-
(a ===
|
1325
|
+
(a === me.HANDLEDEXCEPTION || g) && this.logger.error(h.message);
|
1290
1326
|
} catch (n) {
|
1291
|
-
this.logger.error(
|
1327
|
+
this.logger.error(Jo(st), n);
|
1292
1328
|
}
|
1293
1329
|
}
|
1294
1330
|
/**
|
@@ -1299,14 +1335,14 @@ class Hl {
|
|
1299
1335
|
*/
|
1300
1336
|
leaveBreadcrumb(e) {
|
1301
1337
|
try {
|
1302
|
-
o.reporting.breadcrumbs.value = [...o.reporting.breadcrumbs.value,
|
1338
|
+
o.reporting.breadcrumbs.value = [...o.reporting.breadcrumbs.value, Ll(e)];
|
1303
1339
|
} catch (n) {
|
1304
|
-
this.onError({ error: n, context:
|
1340
|
+
this.onError({ error: n, context: st, customMessage: jn, groupingHash: jn });
|
1305
1341
|
}
|
1306
1342
|
}
|
1307
1343
|
}
|
1308
|
-
const
|
1309
|
-
class
|
1344
|
+
const fi = new ql(ci, ye);
|
1345
|
+
class zl {
|
1310
1346
|
constructor(e, n = {}) {
|
1311
1347
|
N(this, "plugins", []);
|
1312
1348
|
N(this, "byName", {});
|
@@ -1316,14 +1352,14 @@ class Gl {
|
|
1316
1352
|
}
|
1317
1353
|
register(e, n) {
|
1318
1354
|
if (!e.name) {
|
1319
|
-
const i =
|
1355
|
+
const i = Zo(Be);
|
1320
1356
|
if (this.config.throws)
|
1321
1357
|
throw new Error(i);
|
1322
1358
|
this.logger.error(i, e);
|
1323
1359
|
return;
|
1324
1360
|
}
|
1325
1361
|
if (this.byName[e.name]) {
|
1326
|
-
const i =
|
1362
|
+
const i = ea(Be, e.name);
|
1327
1363
|
if (this.config.throws)
|
1328
1364
|
throw new Error(i);
|
1329
1365
|
this.logger.error(i);
|
@@ -1339,7 +1375,7 @@ class Gl {
|
|
1339
1375
|
unregister(e) {
|
1340
1376
|
const n = this.byName[e];
|
1341
1377
|
if (!n) {
|
1342
|
-
const i =
|
1378
|
+
const i = ta(Be, e);
|
1343
1379
|
if (this.config.throws)
|
1344
1380
|
throw new Error(i);
|
1345
1381
|
this.logger.error(i);
|
@@ -1347,7 +1383,7 @@ class Gl {
|
|
1347
1383
|
}
|
1348
1384
|
const s = this.plugins.indexOf(n);
|
1349
1385
|
if (s === -1) {
|
1350
|
-
const i =
|
1386
|
+
const i = na(Be, e);
|
1351
1387
|
if (this.config.throws)
|
1352
1388
|
throw new Error(i);
|
1353
1389
|
this.logger.error(i);
|
@@ -1364,9 +1400,9 @@ class Gl {
|
|
1364
1400
|
var i;
|
1365
1401
|
if ((i = s.deps) != null && i.some((r) => !this.byName[r])) {
|
1366
1402
|
const r = s.deps.filter((a) => !this.byName[a]);
|
1367
|
-
return this.logger.error(
|
1403
|
+
return this.logger.error(sa(Be, s.name, r)), !1;
|
1368
1404
|
}
|
1369
|
-
return n === "." ? !0 :
|
1405
|
+
return n === "." ? !0 : Gr(s, n);
|
1370
1406
|
})), this.cache[n];
|
1371
1407
|
}
|
1372
1408
|
// This method allows to process this.plugins so that it could
|
@@ -1377,10 +1413,10 @@ class Gl {
|
|
1377
1413
|
invoke(e, n = !0, ...s) {
|
1378
1414
|
let i = e;
|
1379
1415
|
if (!i)
|
1380
|
-
throw new Error(
|
1416
|
+
throw new Error(zo);
|
1381
1417
|
const r = i.startsWith("!"), a = this.config.throws ?? i.endsWith("!");
|
1382
1418
|
if (i = i.replace(/(^!|!$)/g, ""), !i)
|
1383
|
-
throw new Error(
|
1419
|
+
throw new Error(Ko);
|
1384
1420
|
const u = i.split(".");
|
1385
1421
|
u.pop();
|
1386
1422
|
const l = u.join(".");
|
@@ -1393,7 +1429,7 @@ class Gl {
|
|
1393
1429
|
} catch (y) {
|
1394
1430
|
if (a)
|
1395
1431
|
throw y;
|
1396
|
-
this.logger.error(
|
1432
|
+
this.logger.error(ia(Be, i, d.name), y);
|
1397
1433
|
}
|
1398
1434
|
return null;
|
1399
1435
|
});
|
@@ -1405,19 +1441,19 @@ class Gl {
|
|
1405
1441
|
return this.invoke(e, !0, ...n);
|
1406
1442
|
}
|
1407
1443
|
}
|
1408
|
-
const
|
1409
|
-
t.config.useNativeSDK === !0,
|
1444
|
+
const Kl = new zl(ye, { throws: !0 }), Yl = (t) => t.config.connectionMode !== "cloud" || t.config.useNativeSDKToSend === !0 || // this is the older flag for hybrid mode destinations
|
1445
|
+
t.config.useNativeSDK === !0, Wl = (t) => t.config.connectionMode === "hybrid" || t.config.useNativeSDKToSend === !0, es = (t) => t.filter(Yl), hi = ["BeaconQueue", "CustomConsentManager", "DeviceModeDestinations", "DeviceModeTransformation", "ExternalAnonymousId", "GoogleLinker", "IubendaConsentManager", "KetchConsentManager", "NativeDestinationQueue", "OneTrustConsentManager", "StorageEncryption", "StorageEncryptionLegacy", "StorageMigrator", "XhrQueue"], Ql = ["Bugsnag", "ErrorReporting"], Xl = {
|
1410
1446
|
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" }
|
1411
1447
|
};
|
1412
|
-
function
|
1448
|
+
function gi(t, e) {
|
1413
1449
|
const n = Object.assign(t, e);
|
1414
1450
|
for (const s of Object.keys(n))
|
1415
|
-
typeof n[s] == "object" && typeof e[s] == "object" && (n[s] =
|
1451
|
+
typeof n[s] == "object" && typeof e[s] == "object" && (n[s] = gi(n[s], e[s]));
|
1416
1452
|
return n;
|
1417
1453
|
}
|
1418
|
-
const
|
1419
|
-
async function
|
1420
|
-
const e =
|
1454
|
+
const Jl = (t) => gi({}, (globalThis.__federation_shared__ || {}).default || {});
|
1455
|
+
async function Zl(t) {
|
1456
|
+
const e = Xl[t];
|
1421
1457
|
if (e.inited)
|
1422
1458
|
return e.lib;
|
1423
1459
|
if (["esm", "systemjs"].includes(e.format))
|
@@ -1429,7 +1465,7 @@ async function Ql(t) {
|
|
1429
1465
|
r
|
1430
1466
|
).then((a) => {
|
1431
1467
|
if (!e.inited) {
|
1432
|
-
const u =
|
1468
|
+
const u = Jl();
|
1433
1469
|
a.init(u), e.lib = a, e.lib.init(u), e.inited = !0;
|
1434
1470
|
}
|
1435
1471
|
n(e.lib);
|
@@ -1445,9 +1481,9 @@ function K(t, e) {
|
|
1445
1481
|
return t;
|
1446
1482
|
}
|
1447
1483
|
function Y(t, e) {
|
1448
|
-
return
|
1484
|
+
return Zl(t).then((n) => n.get(e).then((s) => s()));
|
1449
1485
|
}
|
1450
|
-
const
|
1486
|
+
const eu = (t) => {
|
1451
1487
|
switch (t) {
|
1452
1488
|
case "BeaconQueue":
|
1453
1489
|
return () => Y("rudderAnalyticsRemotePlugins", "./BeaconQueue").then((e) => K(e, !0));
|
@@ -1483,13 +1519,13 @@ const Xl = (t) => {
|
|
1483
1519
|
}, zt = (t) => {
|
1484
1520
|
const e = {};
|
1485
1521
|
return t.forEach((n) => {
|
1486
|
-
if (
|
1487
|
-
const s =
|
1522
|
+
if (hi.includes(n)) {
|
1523
|
+
const s = eu(n);
|
1488
1524
|
s && (e[n] = s);
|
1489
1525
|
}
|
1490
1526
|
}), e;
|
1491
|
-
},
|
1492
|
-
class
|
1527
|
+
}, mi = () => ({}), tu = () => ({}), nu = (t) => (zt == null ? void 0 : zt(t)) || {}, Kt = { ...mi(), ...tu() }, su = (t) => ({ ...nu(t) });
|
1528
|
+
class iu {
|
1493
1529
|
constructor(e, n, s) {
|
1494
1530
|
this.engine = e, this.errorHandler = n, this.logger = s, this.onError = this.onError.bind(this);
|
1495
1531
|
}
|
@@ -1497,14 +1533,14 @@ class tu {
|
|
1497
1533
|
* Orchestrate the plugin loading and registering
|
1498
1534
|
*/
|
1499
1535
|
init() {
|
1500
|
-
o.lifecycle.status.value = "pluginsLoading",
|
1536
|
+
o.lifecycle.status.value = "pluginsLoading", ct("pluginsCDNPath", o.lifecycle.pluginsCDNPath.value), this.setActivePlugins(), this.registerLocalPlugins(), this.registerRemotePlugins(), this.attachEffects();
|
1501
1537
|
}
|
1502
1538
|
/**
|
1503
1539
|
* Update state based on plugin loaded status
|
1504
1540
|
*/
|
1505
1541
|
// eslint-disable-next-line class-methods-use-this
|
1506
1542
|
attachEffects() {
|
1507
|
-
|
1543
|
+
fe(() => {
|
1508
1544
|
(o.plugins.activePlugins.value.length === 0 || o.plugins.loadedPlugins.value.length + o.plugins.failedPlugins.value.length === o.plugins.totalPluginsToLoad.value) && j(() => {
|
1509
1545
|
o.plugins.ready.value = !0, o.lifecycle.status.value = "pluginsReady";
|
1510
1546
|
});
|
@@ -1518,30 +1554,30 @@ class tu {
|
|
1518
1554
|
let e = o.plugins.pluginsToLoadFromConfig.value;
|
1519
1555
|
if (!e)
|
1520
1556
|
return [];
|
1521
|
-
e = e.filter((i) =>
|
1522
|
-
const n = [{ configurationStatus: () => C(o.dataPlaneEvents.eventsQueuePluginName.value), configurationStatusStr: "Data plane events delivery is enabled", activePluginName: o.dataPlaneEvents.eventsQueuePluginName.value, supportedPlugins: Object.values(
|
1557
|
+
e = e.filter((i) => Ql.includes(i) ? (this.logger.warn(Ma(gt, i)), !1) : !0);
|
1558
|
+
const n = [{ configurationStatus: () => C(o.dataPlaneEvents.eventsQueuePluginName.value), configurationStatusStr: "Data plane events delivery is enabled", activePluginName: o.dataPlaneEvents.eventsQueuePluginName.value, supportedPlugins: Object.values(Ha), 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(It) }, { configurationStatus: () => o.storage.migrate.value, configurationStatusStr: "Storage migration is enabled", supportedPlugins: ["StorageMigrator"] }], s = !1;
|
1523
1559
|
return n.forEach((i) => {
|
1524
1560
|
i.configurationStatus() ? (e = e.filter(
|
1525
1561
|
i.activePluginName ? (r) => !(r !== i.activePluginName && i.supportedPlugins.includes(r)) : (r) => C(r)
|
1526
1562
|
// pass through
|
1527
1563
|
), 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));
|
1528
|
-
}), [...Object.keys(
|
1564
|
+
}), [...Object.keys(mi()), ...e];
|
1529
1565
|
}
|
1530
1566
|
addMissingPlugins(e, n, s) {
|
1531
1567
|
const i = e.shouldAddMissingPlugins || n;
|
1532
1568
|
let r;
|
1533
1569
|
e.activePluginName ? r = [...e.basePlugins || [], e.activePluginName] : r = [...e.supportedPlugins];
|
1534
1570
|
const a = r.filter((u) => !s.includes(u));
|
1535
|
-
a.length > 0 && (i && s.push(...a), this.logger.warn(
|
1571
|
+
a.length > 0 && (i && s.push(...a), this.logger.warn($a(gt, e.configurationStatusStr, a, i)));
|
1536
1572
|
}
|
1537
1573
|
/**
|
1538
1574
|
* Determine the list of plugins that should be activated
|
1539
1575
|
*/
|
1540
1576
|
setActivePlugins() {
|
1541
|
-
const e = this.getPluginsToLoadBasedOnConfig(), n = [...Object.keys(Kt), ...
|
1577
|
+
const e = this.getPluginsToLoadBasedOnConfig(), n = [...Object.keys(Kt), ...hi], s = [], i = [];
|
1542
1578
|
e.forEach((r) => {
|
1543
1579
|
n.includes(r) ? s.push(r) : i.push(r);
|
1544
|
-
}), i.length > 0 && this.logger.warn(
|
1580
|
+
}), i.length > 0 && this.logger.warn(Va(gt, i)), j(() => {
|
1545
1581
|
o.plugins.totalPluginsToLoad.value = e.length, o.plugins.activePlugins.value = s, o.plugins.failedPlugins.value = i;
|
1546
1582
|
});
|
1547
1583
|
}
|
@@ -1557,7 +1593,7 @@ class tu {
|
|
1557
1593
|
* Register plugins that are dynamic imports to PluginEngine
|
1558
1594
|
*/
|
1559
1595
|
registerRemotePlugins() {
|
1560
|
-
const e =
|
1596
|
+
const e = su(o.plugins.activePlugins.value);
|
1561
1597
|
Promise.all(Object.keys(e).map(async (n) => {
|
1562
1598
|
await e[n]().then((s) => this.register([s.default()])).catch((s) => {
|
1563
1599
|
o.plugins.failedPlugins.value = [...o.plugins.failedPlugins.value, n], this.onError(s, `Failed to load plugin "${n}"`, s);
|
@@ -1615,11 +1651,11 @@ class tu {
|
|
1615
1651
|
this.errorHandler.onError({ error: e, context: gt, customMessage: n, groupingHash: s });
|
1616
1652
|
}
|
1617
1653
|
}
|
1618
|
-
const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memoryStorage", we = "none",
|
1654
|
+
const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memoryStorage", we = "none", ru = "rl_user_id", ou = "rl_trait", au = "rl_anonymous_id", lu = "rl_group_id", uu = "rl_group_trait", cu = "rl_page_init_referrer", du = "rl_page_init_referring_domain", fu = "rl_session", hu = "rl_auth_token", Ve = { userId: ru, userTraits: ou, anonymousId: au, groupId: lu, groupTraits: uu, initialReferrer: cu, initialReferringDomain: du, sessionInfo: fu, authToken: hu }, gu = "test_rudder_cookie", mu = "test_rudder_ls", pu = "test_rudder_ss", vu = "__tld__", pi = "clientDataInCookie", vi = "clientDataInLocalStorage", yu = "clientDataInMemory", yi = "clientDataInSessionStorage", bi = ["userId", "userTraits", "anonymousId", "groupId", "groupTraits", "initialReferrer", "initialReferringDomain", "sessionInfo", "authToken"], Fe = { [W]: pi, [X]: vi, [ce]: yu, [ee]: yi }, ts = (t, e) => {
|
1619
1655
|
try {
|
1620
1656
|
return encodeURIComponent(t);
|
1621
1657
|
} catch (n) {
|
1622
|
-
e == null || e.error(
|
1658
|
+
e == null || e.error(co, n);
|
1623
1659
|
return;
|
1624
1660
|
}
|
1625
1661
|
}, ns = (t) => {
|
@@ -1628,7 +1664,7 @@ const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memo
|
|
1628
1664
|
} catch {
|
1629
1665
|
return;
|
1630
1666
|
}
|
1631
|
-
},
|
1667
|
+
}, bu = (t) => {
|
1632
1668
|
const e = {}, n = t.split(/\s*;\s*/);
|
1633
1669
|
let s;
|
1634
1670
|
return n[0] && n.forEach((i) => {
|
@@ -1636,29 +1672,29 @@ const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memo
|
|
1636
1672
|
const r = s[0] ? ns(s[0]) : void 0;
|
1637
1673
|
r && (e[r] = s[1] ? ns(s[1]) : void 0);
|
1638
1674
|
}), e;
|
1639
|
-
},
|
1675
|
+
}, Eu = (t, e, n, s) => {
|
1640
1676
|
const i = { ...n || {} };
|
1641
1677
|
let r = `${ts(t, s)}=${ts(e, s)}`;
|
1642
1678
|
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;
|
1643
1679
|
}, ln = () => {
|
1644
1680
|
const t = globalThis.document.cookie;
|
1645
|
-
return
|
1646
|
-
},
|
1681
|
+
return bu(t);
|
1682
|
+
}, Su = (t) => ln()[t], Se = function(t, e, n, s) {
|
1647
1683
|
switch (arguments.length) {
|
1648
1684
|
case 4:
|
1649
1685
|
case 3:
|
1650
1686
|
case 2:
|
1651
|
-
return
|
1687
|
+
return Eu(t, e, n, s);
|
1652
1688
|
case 1:
|
1653
|
-
return t ?
|
1689
|
+
return t ? Su(t) : ln();
|
1654
1690
|
default:
|
1655
1691
|
return ln();
|
1656
1692
|
}
|
1657
|
-
},
|
1693
|
+
}, ku = (t) => {
|
1658
1694
|
const e = document.createElement("a");
|
1659
1695
|
return e.href = t, e.hostname;
|
1660
|
-
},
|
1661
|
-
const e = typeof globalThis.URL != "function" ?
|
1696
|
+
}, Ru = (t) => {
|
1697
|
+
const e = typeof globalThis.URL != "function" ? ku(t) : new URL(t).hostname, n = (e == null ? void 0 : e.split(".")) ?? [], s = n[n.length - 1], i = [];
|
1662
1698
|
if (n.length === 4 && s && s === parseInt(s, 10).toString())
|
1663
1699
|
return i;
|
1664
1700
|
if (n.length <= 1)
|
@@ -1666,27 +1702,27 @@ const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memo
|
|
1666
1702
|
for (let r = n.length - 2; r >= 0; r -= 1)
|
1667
1703
|
i.push(n.slice(r).join("."));
|
1668
1704
|
return i;
|
1669
|
-
},
|
1670
|
-
const e =
|
1705
|
+
}, Iu = (t) => {
|
1706
|
+
const e = Ru(t);
|
1671
1707
|
for (let n = 0; n < e.length; n += 1) {
|
1672
|
-
const s = e[n], i =
|
1708
|
+
const s = e[n], i = vu, r = { domain: `${s.indexOf("localhost") !== -1 ? "" : "."}${s}` };
|
1673
1709
|
if (Se(i, 1, r), Se(i))
|
1674
1710
|
return Se(i, null, r), s;
|
1675
1711
|
}
|
1676
1712
|
return "";
|
1677
|
-
},
|
1678
|
-
const t = `.${
|
1679
|
-
return { maxage:
|
1680
|
-
},
|
1681
|
-
class
|
1713
|
+
}, Tu = () => {
|
1714
|
+
const t = `.${Iu(globalThis.location.href)}`;
|
1715
|
+
return { maxage: Ro, path: "/", domain: !t || t === "." ? void 0 : t, samesite: "Lax", enabled: !0 };
|
1716
|
+
}, Au = () => ({ enabled: !0 }), Ou = () => ({ enabled: !0 }), Du = () => ({ enabled: !0 });
|
1717
|
+
class Cu {
|
1682
1718
|
constructor(e) {
|
1683
1719
|
N(this, "isEnabled", !0);
|
1684
1720
|
N(this, "length", 0);
|
1685
1721
|
N(this, "data", {});
|
1686
|
-
this.options =
|
1722
|
+
this.options = Du(), this.logger = e;
|
1687
1723
|
}
|
1688
1724
|
configure(e) {
|
1689
|
-
return this.options =
|
1725
|
+
return this.options = H(this.options, e ?? {}), this.isEnabled = !!this.options.enabled, this.options;
|
1690
1726
|
}
|
1691
1727
|
setItem(e, n) {
|
1692
1728
|
return this.data[e] = n, this.length = Object.keys(this.data).length, n;
|
@@ -1707,13 +1743,13 @@ class Ou {
|
|
1707
1743
|
return Object.keys(this.data);
|
1708
1744
|
}
|
1709
1745
|
}
|
1710
|
-
const
|
1711
|
-
var Dt = { exports: {} },
|
1712
|
-
function
|
1746
|
+
const wt = new Cu(ye);
|
1747
|
+
var Dt = { exports: {} }, _u = Dt.exports, ss;
|
1748
|
+
function Pu() {
|
1713
1749
|
return ss || (ss = 1, function(t, e) {
|
1714
1750
|
(function(n, s) {
|
1715
1751
|
t.exports = s();
|
1716
|
-
})(
|
1752
|
+
})(_u, function() {
|
1717
1753
|
function n(g) {
|
1718
1754
|
return g = JSON.stringify(g), !!/^\{[\s\S]*\}$/.test(g);
|
1719
1755
|
}
|
@@ -1768,8 +1804,8 @@ function Du() {
|
|
1768
1804
|
}, get: function(f) {
|
1769
1805
|
if (f === void 0) {
|
1770
1806
|
var m = {};
|
1771
|
-
return this.forEach(function(
|
1772
|
-
return m[
|
1807
|
+
return this.forEach(function(G, J) {
|
1808
|
+
return m[G] = J;
|
1773
1809
|
}), m;
|
1774
1810
|
}
|
1775
1811
|
if (f.charAt(0) === "?")
|
@@ -1831,25 +1867,15 @@ function Du() {
|
|
1831
1867
|
});
|
1832
1868
|
}(Dt)), Dt.exports;
|
1833
1869
|
}
|
1834
|
-
var
|
1835
|
-
const
|
1836
|
-
const e = new URL(o.lifecycle.sourceConfigUrl.value), n = `${e.origin}${e.pathname}?view=ad`;
|
1837
|
-
t.getAsyncData({ url: n, options: {
|
1838
|
-
// We actually don't need the response from the request, so we are using HEAD
|
1839
|
-
method: "HEAD",
|
1840
|
-
headers: { "Content-Type": void 0 }
|
1841
|
-
}, isRawResponse: !0, callback: (s, i) => {
|
1842
|
-
var r;
|
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;
|
1844
|
-
} });
|
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") => {
|
1870
|
+
var Nu = Pu();
|
1871
|
+
const Oe = /* @__PURE__ */ ai(Nu), Lu = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues), is = () => !le(globalThis.navigator.userAgentData), wu = () => !le(globalThis.navigator.sendBeacon) && S(globalThis.navigator.sendBeacon), Mu = () => !!globalThis.navigator.userAgent.match(/Trident.*rv:11\./), $u = (t, e = "none") => {
|
1846
1872
|
var n;
|
1847
1873
|
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) => {
|
1848
1874
|
t(s);
|
1849
1875
|
}).catch(() => {
|
1850
1876
|
t();
|
1851
1877
|
}));
|
1852
|
-
},
|
1878
|
+
}, Uu = () => {
|
1853
1879
|
const t = globalThis.document.createElement("div");
|
1854
1880
|
return t.setAttribute("data-a-b", "c"), t.dataset ? t.dataset.aB === "c" : !1;
|
1855
1881
|
}, un = {
|
@@ -1871,7 +1897,7 @@ const Ae = /* @__PURE__ */ oi(Cu), _u = (t) => {
|
|
1871
1897
|
"Object.values": () => !S(globalThis.Object.values),
|
1872
1898
|
"Object.assign": () => !S(globalThis.Object.assign),
|
1873
1899
|
"Object.fromEntries": () => !S(globalThis.Object.fromEntries),
|
1874
|
-
"Element.prototype.dataset": () => !
|
1900
|
+
"Element.prototype.dataset": () => !Uu(),
|
1875
1901
|
// Ideally, we should separate the checks for TextEncoder and TextDecoder but
|
1876
1902
|
// the polyfill service serves them under the same feature name, "TextEncoder".
|
1877
1903
|
TextEncoder: () => !S(globalThis.TextEncoder) || !S(globalThis.TextDecoder),
|
@@ -1882,7 +1908,7 @@ const Ae = /* @__PURE__ */ oi(Cu), _u = (t) => {
|
|
1882
1908
|
ArrayBuffer: () => !S(globalThis.Uint8Array),
|
1883
1909
|
Set: () => !S(globalThis.Set),
|
1884
1910
|
atob: () => !S(globalThis.atob)
|
1885
|
-
},
|
1911
|
+
}, Bu = () => {
|
1886
1912
|
const t = Object.keys(un);
|
1887
1913
|
let e = !1;
|
1888
1914
|
for (let n = 0; n < t.length; n++) {
|
@@ -1896,25 +1922,25 @@ const Ae = /* @__PURE__ */ oi(Cu), _u = (t) => {
|
|
1896
1922
|
}, rs = () => {
|
1897
1923
|
let t = { density: 0, width: 0, height: 0, innerWidth: 0, innerHeight: 0 };
|
1898
1924
|
return t = { width: globalThis.screen.width, height: globalThis.screen.height, density: globalThis.devicePixelRatio, innerWidth: globalThis.innerWidth, innerHeight: globalThis.innerHeight }, t;
|
1899
|
-
},
|
1925
|
+
}, Ei = (t) => {
|
1900
1926
|
const e = ["QuotaExceededError", "NS_ERROR_DOM_QUOTA_REACHED"], n = [22, 1014], s = e.includes(t.name) || n.includes(t.code);
|
1901
1927
|
return t instanceof DOMException && s;
|
1902
1928
|
}, Ge = (t = X, e, n) => {
|
1903
1929
|
let s, i;
|
1904
|
-
const r =
|
1930
|
+
const r = ra(nn, t);
|
1905
1931
|
let a = "unavailable", u = !0, l;
|
1906
1932
|
try {
|
1907
1933
|
switch (t) {
|
1908
1934
|
case ce:
|
1909
1935
|
return !0;
|
1910
1936
|
case W:
|
1911
|
-
s = e, i =
|
1937
|
+
s = e, i = gu;
|
1912
1938
|
break;
|
1913
1939
|
case X:
|
1914
|
-
s = e ?? globalThis.localStorage, i =
|
1940
|
+
s = e ?? globalThis.localStorage, i = mu;
|
1915
1941
|
break;
|
1916
1942
|
case ee:
|
1917
|
-
s = e ?? globalThis.sessionStorage, i =
|
1943
|
+
s = e ?? globalThis.sessionStorage, i = pu;
|
1918
1944
|
break;
|
1919
1945
|
default:
|
1920
1946
|
return !1;
|
@@ -1923,52 +1949,52 @@ const Ae = /* @__PURE__ */ oi(Cu), _u = (t) => {
|
|
1923
1949
|
return s.removeItem(i), !0;
|
1924
1950
|
u = !1;
|
1925
1951
|
} catch (c) {
|
1926
|
-
u = !1, l = c,
|
1952
|
+
u = !1, l = c, Ei(c) && (a = "full");
|
1927
1953
|
}
|
1928
1954
|
return u || n == null || n.warn(`${r}${a}.`, l), !1;
|
1929
1955
|
};
|
1930
|
-
class
|
1956
|
+
class Vu {
|
1931
1957
|
constructor(e) {
|
1932
1958
|
N(this, "isSupportAvailable", !0);
|
1933
1959
|
N(this, "isEnabled", !0);
|
1934
1960
|
N(this, "length", 0);
|
1935
|
-
this.options =
|
1961
|
+
this.options = Au(), this.logger = e;
|
1936
1962
|
}
|
1937
1963
|
configure(e) {
|
1938
|
-
return this.options =
|
1964
|
+
return this.options = H(this.options, e ?? {}), this.isSupportAvailable = Ge(X), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
1939
1965
|
}
|
1940
1966
|
setItem(e, n) {
|
1941
|
-
|
1967
|
+
Oe.set(e, n), this.length = Oe.len();
|
1942
1968
|
}
|
1943
1969
|
// eslint-disable-next-line class-methods-use-this
|
1944
1970
|
getItem(e) {
|
1945
|
-
const n =
|
1946
|
-
return
|
1971
|
+
const n = Oe.get(e);
|
1972
|
+
return x(n) ? null : n;
|
1947
1973
|
}
|
1948
1974
|
removeItem(e) {
|
1949
|
-
|
1975
|
+
Oe.remove(e), this.length = Oe.len();
|
1950
1976
|
}
|
1951
1977
|
clear() {
|
1952
|
-
|
1978
|
+
Oe.clear(), this.length = 0;
|
1953
1979
|
}
|
1954
1980
|
key(e) {
|
1955
1981
|
return this.keys()[e] ?? null;
|
1956
1982
|
}
|
1957
1983
|
// eslint-disable-next-line class-methods-use-this
|
1958
1984
|
keys() {
|
1959
|
-
return
|
1985
|
+
return Oe.keys();
|
1960
1986
|
}
|
1961
1987
|
}
|
1962
|
-
const
|
1963
|
-
class
|
1988
|
+
const Tn = new Vu(ye);
|
1989
|
+
class Fu {
|
1964
1990
|
constructor(e) {
|
1965
1991
|
N(this, "isSupportAvailable", !0);
|
1966
1992
|
N(this, "isEnabled", !0);
|
1967
1993
|
N(this, "length", 0);
|
1968
|
-
this.options =
|
1994
|
+
this.options = Ou(), this.logger = e;
|
1969
1995
|
}
|
1970
1996
|
configure(e) {
|
1971
|
-
return this.options =
|
1997
|
+
return this.options = H(this.options, e ?? {}), this.isSupportAvailable = Ge(ee), this.isSupportAvailable && (this.store = globalThis.sessionStorage), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
1972
1998
|
}
|
1973
1999
|
setItem(e, n) {
|
1974
2000
|
this.store && (this.store.setItem(e, n), this.length = this.store.length);
|
@@ -1977,7 +2003,7 @@ class Bu {
|
|
1977
2003
|
if (!this.store)
|
1978
2004
|
return null;
|
1979
2005
|
const n = this.store.getItem(e);
|
1980
|
-
return
|
2006
|
+
return x(n) ? null : n;
|
1981
2007
|
}
|
1982
2008
|
removeItem(e) {
|
1983
2009
|
this.store && (this.store.removeItem(e), this.length = this.store.length);
|
@@ -2001,8 +2027,8 @@ class Bu {
|
|
2001
2027
|
return e;
|
2002
2028
|
}
|
2003
2029
|
}
|
2004
|
-
const
|
2005
|
-
class
|
2030
|
+
const An = new Fu(ye);
|
2031
|
+
class xu {
|
2006
2032
|
constructor(e) {
|
2007
2033
|
N(this, "isSupportAvailable", !0);
|
2008
2034
|
N(this, "isEnabled", !0);
|
@@ -2010,7 +2036,7 @@ class Vu {
|
|
2010
2036
|
this.logger = e;
|
2011
2037
|
}
|
2012
2038
|
configure(e) {
|
2013
|
-
return this.options || (this.options =
|
2039
|
+
return this.options || (this.options = Tu()), this.options = H(this.options, e ?? {}), this.options.sameDomainCookiesOnly && delete this.options.domain, this.isSupportAvailable = Ge(W, this), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
2014
2040
|
}
|
2015
2041
|
setItem(e, n) {
|
2016
2042
|
return Se(e, n, this.options, this.logger), this.length = Object.keys(Se()).length, !0;
|
@@ -2018,7 +2044,7 @@ class Vu {
|
|
2018
2044
|
// eslint-disable-next-line class-methods-use-this
|
2019
2045
|
getItem(e) {
|
2020
2046
|
const n = Se(e);
|
2021
|
-
return
|
2047
|
+
return x(n) ? null : n;
|
2022
2048
|
}
|
2023
2049
|
removeItem(e) {
|
2024
2050
|
const n = this.setItem(e, null);
|
@@ -2035,32 +2061,32 @@ class Vu {
|
|
2035
2061
|
return Object.keys(Se());
|
2036
2062
|
}
|
2037
2063
|
}
|
2038
|
-
const
|
2064
|
+
const On = new xu(ye), ie = (t) => {
|
2039
2065
|
switch (t) {
|
2040
2066
|
case X:
|
2041
|
-
return
|
2067
|
+
return Tn;
|
2042
2068
|
case ee:
|
2043
|
-
return
|
2069
|
+
return An;
|
2044
2070
|
case ce:
|
2045
|
-
return
|
2071
|
+
return wt;
|
2046
2072
|
case W:
|
2047
|
-
return
|
2073
|
+
return On;
|
2048
2074
|
default:
|
2049
|
-
return
|
2075
|
+
return wt;
|
2050
2076
|
}
|
2051
|
-
}, Fu = (t) => {
|
2052
|
-
const e = An.configure(t);
|
2053
|
-
o.storage.cookie.value = { maxage: e.maxage, path: e.path, domain: e.domain, samesite: e.samesite, expires: e.expires, secure: e.secure };
|
2054
|
-
}, xu = (t) => {
|
2055
|
-
In.configure(t);
|
2056
2077
|
}, Hu = (t) => {
|
2057
|
-
|
2078
|
+
const e = On.configure(t);
|
2079
|
+
o.storage.cookie.value = { maxage: e.maxage, path: e.path, domain: e.domain, samesite: e.samesite, expires: e.expires, secure: e.secure };
|
2058
2080
|
}, Gu = (t) => {
|
2059
|
-
|
2060
|
-
}, ju = (t
|
2061
|
-
|
2081
|
+
Tn.configure(t);
|
2082
|
+
}, ju = (t) => {
|
2083
|
+
wt.configure(t);
|
2084
|
+
}, qu = (t) => {
|
2085
|
+
An.configure(t);
|
2086
|
+
}, zu = (t = {}, e = {}, n = {}, s = {}) => {
|
2087
|
+
Hu(t), Gu(e), ju(n), qu(s);
|
2062
2088
|
};
|
2063
|
-
class
|
2089
|
+
class Ku {
|
2064
2090
|
constructor(e, n, s) {
|
2065
2091
|
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;
|
2066
2092
|
}
|
@@ -2095,10 +2121,10 @@ class qu {
|
|
2095
2121
|
try {
|
2096
2122
|
this.engine.setItem(s, this.encrypt(de(n, !1, [], this.logger)));
|
2097
2123
|
} catch (i) {
|
2098
|
-
if (
|
2099
|
-
this.logger.warn(
|
2124
|
+
if (Ei(i))
|
2125
|
+
this.logger.warn(Da(`Store ${this.id}`)), this.swapQueueStoreToInMemoryEngine(), this.set(e, n);
|
2100
2126
|
else {
|
2101
|
-
const r =
|
2127
|
+
const r = da(e);
|
2102
2128
|
this.onError(i, r, r);
|
2103
2129
|
}
|
2104
2130
|
}
|
@@ -2112,7 +2138,7 @@ class qu {
|
|
2112
2138
|
try {
|
2113
2139
|
return !n || (s = this.decrypt(this.engine.getItem(n)), le(s) || s === "") ? null : JSON.parse(s);
|
2114
2140
|
} catch (i) {
|
2115
|
-
const r =
|
2141
|
+
const r = fa(e);
|
2116
2142
|
return this.onError(i, r, r), null;
|
2117
2143
|
}
|
2118
2144
|
}
|
@@ -2145,7 +2171,7 @@ class qu {
|
|
2145
2171
|
* Extension point to use with encryption plugins
|
2146
2172
|
*/
|
2147
2173
|
crypto(e, n) {
|
2148
|
-
if (!this.isEncrypted || !e || typeof e != "string" ||
|
2174
|
+
if (!this.isEncrypted || !e || typeof e != "string" || Kr(e) === "")
|
2149
2175
|
return e;
|
2150
2176
|
const i = `storage.${n}`, r = this.pluginsManager ? this.pluginsManager.invokeSingle(i, e) : e;
|
2151
2177
|
return typeof r > "u" ? e : r ?? "";
|
@@ -2157,7 +2183,7 @@ class qu {
|
|
2157
2183
|
this.errorHandler.onError({ error: e, context: `Store ${this.id}`, customMessage: n, groupingHash: s });
|
2158
2184
|
}
|
2159
2185
|
}
|
2160
|
-
const
|
2186
|
+
const Yu = (t, e) => {
|
2161
2187
|
var s;
|
2162
2188
|
let n;
|
2163
2189
|
if (t.consents.preConsent.value.enabled)
|
@@ -2174,7 +2200,7 @@ const zu = (t, e) => {
|
|
2174
2200
|
}
|
2175
2201
|
return n;
|
2176
2202
|
};
|
2177
|
-
class
|
2203
|
+
class Wu {
|
2178
2204
|
constructor(e, n, s) {
|
2179
2205
|
N(this, "stores", {});
|
2180
2206
|
N(this, "isInitialized", !1);
|
@@ -2188,7 +2214,7 @@ class Ku {
|
|
2188
2214
|
if (this.isInitialized)
|
2189
2215
|
return;
|
2190
2216
|
const e = o.loadOptions.value, n = { cookieStorageOptions: { samesite: e.sameSiteCookie, secure: e.secureCookie, domain: e.setCookieDomain, sameDomainCookiesOnly: e.sameDomainCookiesOnly }, localStorageOptions: {}, inMemoryStorageOptions: {}, sessionStorageOptions: {} };
|
2191
|
-
|
2217
|
+
zu(nt(H(n.cookieStorageOptions ?? {}, ((s = o.storage.cookie) == null ? void 0 : s.value) ?? {})), nt(n.localStorageOptions), nt(n.inMemoryStorageOptions), nt(n.sessionStorageOptions)), this.initClientDataStores(), this.isInitialized = !0;
|
2192
2218
|
}
|
2193
2219
|
/**
|
2194
2220
|
* Create store to persist data used by the SDK like session, used details etc
|
@@ -2205,9 +2231,9 @@ class Ku {
|
|
2205
2231
|
const s = o.consents.postConsent.value.storage;
|
2206
2232
|
(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);
|
2207
2233
|
let i = !0, r = {};
|
2208
|
-
|
2234
|
+
bi.forEach((u) => {
|
2209
2235
|
var f;
|
2210
|
-
const l = u, c = u, d = (f = n == null ? void 0 : n[l]) == null ? void 0 : f.type, y =
|
2236
|
+
const l = u, c = u, d = (f = n == null ? void 0 : n[l]) == null ? void 0 : f.type, y = Yu(o, u) ?? d ?? e ?? on, g = this.getResolvedStorageTypeForEntry(y, u);
|
2211
2237
|
g !== we && (i = !1), r = { ...r, [u]: { type: g, key: Ve[c] } };
|
2212
2238
|
}), j(() => {
|
2213
2239
|
o.storage.type.value = e, o.storage.entries.value = r, o.storage.trulyAnonymousTracking.value = i;
|
@@ -2231,14 +2257,14 @@ class Ku {
|
|
2231
2257
|
(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;
|
2232
2258
|
break;
|
2233
2259
|
}
|
2234
|
-
return s !== e && this.logger.warn(
|
2260
|
+
return s !== e && this.logger.warn(Ca(Qr, n, e, s)), s;
|
2235
2261
|
}
|
2236
2262
|
/**
|
2237
2263
|
* Create a new store
|
2238
2264
|
*/
|
2239
2265
|
setStore(e) {
|
2240
2266
|
const n = ie(e.type);
|
2241
|
-
return this.stores[e.id] = new
|
2267
|
+
return this.stores[e.id] = new Ku(e, n, this.pluginsManager), this.stores[e.id];
|
2242
2268
|
}
|
2243
2269
|
/**
|
2244
2270
|
* Retrieve a store
|
@@ -2247,18 +2273,18 @@ class Ku {
|
|
2247
2273
|
return this.stores[e];
|
2248
2274
|
}
|
2249
2275
|
}
|
2250
|
-
const
|
2276
|
+
const Qu = (t) => M(t) && M(t.source) && !le(t.source.id) && M(t.source.config) && Array.isArray(t.source.destinations), Xu = (t) => typeof t == "string" && ei.includes(t), Si = (t) => {
|
2251
2277
|
const e = new URL(t), { host: n, protocol: s } = e, i = n.split(".");
|
2252
2278
|
let r;
|
2253
2279
|
return i.length > 2 ? r = `${i[i.length - 2]}.${i[i.length - 1]}` : r = n, { topDomain: r, protocol: s };
|
2254
|
-
},
|
2255
|
-
const { topDomain: e, protocol: n } =
|
2280
|
+
}, Ju = (t) => {
|
2281
|
+
const { topDomain: e, protocol: n } = Si(t);
|
2256
2282
|
return `${n}//${e}`;
|
2257
|
-
},
|
2258
|
-
const n = e ? window.location.origin :
|
2283
|
+
}, Zu = (t, e) => {
|
2284
|
+
const n = e ? window.location.origin : Ju(window.location.href), s = t.startsWith("/") ? t.substring(1) : t;
|
2259
2285
|
return `${n}/${s}`;
|
2260
|
-
},
|
2261
|
-
const { topDomain: e } =
|
2286
|
+
}, ec = (t) => {
|
2287
|
+
const { topDomain: e } = Si(window.location.href);
|
2262
2288
|
return e === t;
|
2263
2289
|
}, ze = (t) => t != null && t.endsWith("/") ? ze(t.substring(0, t.length - 1)) : t, cn = (t) => {
|
2264
2290
|
try {
|
@@ -2266,7 +2292,7 @@ const Yu = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2266
2292
|
} catch {
|
2267
2293
|
return null;
|
2268
2294
|
}
|
2269
|
-
},
|
2295
|
+
}, ki = (t) => cn(t) ?? "", tc = (t) => {
|
2270
2296
|
const e = {};
|
2271
2297
|
try {
|
2272
2298
|
const n = new URL(t), s = "utm_";
|
@@ -2279,7 +2305,7 @@ const Yu = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2279
2305
|
} catch {
|
2280
2306
|
}
|
2281
2307
|
return e;
|
2282
|
-
},
|
2308
|
+
}, nc = (t) => {
|
2283
2309
|
let e = t;
|
2284
2310
|
try {
|
2285
2311
|
const n = new URL(t);
|
@@ -2287,40 +2313,40 @@ const Yu = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2287
2313
|
} catch {
|
2288
2314
|
}
|
2289
2315
|
return e;
|
2290
|
-
},
|
2291
|
-
if (!
|
2316
|
+
}, sc = (t) => t.replace(/\/{2,}/g, "/"), Ke = (t) => {
|
2317
|
+
if (!L(t))
|
2292
2318
|
return !1;
|
2293
2319
|
try {
|
2294
|
-
return S(globalThis.URL) && new URL(t),
|
2320
|
+
return S(globalThis.URL) && new URL(t), Fa.test(t);
|
2295
2321
|
} catch {
|
2296
2322
|
return !1;
|
2297
2323
|
}
|
2298
|
-
},
|
2324
|
+
}, ic = () => {
|
2299
2325
|
var t, e;
|
2300
2326
|
return !!((e = (t = window.chrome) == null ? void 0 : t.runtime) != null && e.id);
|
2301
|
-
}, Yt = "none", Wt = "immediate",
|
2327
|
+
}, Yt = "none", Wt = "immediate", rc = (t) => {
|
2302
2328
|
var e, n;
|
2303
2329
|
return ((n = (e = t == null ? void 0 : t.statsCollection) == null ? void 0 : e.errors) == null ? void 0 : n.enabled) === !0;
|
2304
|
-
},
|
2330
|
+
}, oc = (t) => {
|
2305
2331
|
var e, n;
|
2306
2332
|
return ((n = (e = t == null ? void 0 : t.statsCollection) == null ? void 0 : e.metrics) == null ? void 0 : n.enabled) === !0;
|
2307
|
-
},
|
2333
|
+
}, ac = (t) => {
|
2308
2334
|
const e = { sendPageEvent: !1, trackConsent: !1, discardPreConsentEvents: !1 };
|
2309
|
-
if (
|
2310
|
-
const n =
|
2311
|
-
e.storage = n.storage,
|
2335
|
+
if (M(t)) {
|
2336
|
+
const n = T(t);
|
2337
|
+
e.storage = n.storage, Ie(n.integrations) && (e.integrations = n.integrations), e.discardPreConsentEvents = n.discardPreConsentEvents === !0, e.sendPageEvent = n.sendPageEvent === !0, e.trackConsent = n.trackConsent === !0, Ie(n.consentManagement) && (e.consentManagement = H(n.consentManagement, { enabled: o.consents.enabled.value }));
|
2312
2338
|
}
|
2313
2339
|
return e;
|
2314
|
-
}, os = (t) =>
|
2340
|
+
}, os = (t) => Ie(t) || Array.isArray(t), lc = (t, e) => {
|
2315
2341
|
let { provider: n } = t;
|
2316
2342
|
const s = n ? an[n] : void 0;
|
2317
|
-
return n && !s && (e.error(
|
2318
|
-
},
|
2343
|
+
return n && !s && (e.error(Qo(te, n, an)), n = void 0), { provider: n, consentManagerPluginName: s };
|
2344
|
+
}, Ri = (t, e) => {
|
2319
2345
|
let n, s = [], i = [], r = !1, a, u = (t == null ? void 0 : t.enabled) === !0;
|
2320
|
-
|
2346
|
+
Ie(t) && u && ({ provider: a, consentManagerPluginName: n } = lc(t, e), os(t.allowedConsentIds) && (s = t.allowedConsentIds, r = !0), os(t.deniedConsentIds) && (i = t.deniedConsentIds, r = !0));
|
2321
2347
|
const l = { allowedConsentIds: s, deniedConsentIds: i };
|
2322
2348
|
return u = u && !!n, { provider: a, consentManagerPluginName: n, initialized: r, enabled: u, consentsData: l };
|
2323
|
-
},
|
2349
|
+
}, uc = () => {
|
2324
2350
|
const t = document.querySelector("script[data-rsa-write-key]");
|
2325
2351
|
if (t && t.dataset.rsaWriteKey === o.lifecycle.writeKey.value)
|
2326
2352
|
return t.src;
|
@@ -2330,45 +2356,45 @@ const Yu = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2330
2356
|
if (i && n.test(i))
|
2331
2357
|
return i;
|
2332
2358
|
}
|
2333
|
-
},
|
2334
|
-
o.reporting.isErrorReportingEnabled.value =
|
2335
|
-
},
|
2359
|
+
}, cc = (t) => {
|
2360
|
+
o.reporting.isErrorReportingEnabled.value = rc(t.source.config) && !ic(), o.reporting.isMetricsReportingEnabled.value = oc(t.source.config);
|
2361
|
+
}, dc = (t) => {
|
2336
2362
|
const { useServerSideCookies: e, dataServiceEndpoint: n, storage: s, setCookieDomain: i, sameDomainCookiesOnly: r } = o.loadOptions.value;
|
2337
2363
|
let a = s == null ? void 0 : s.cookie, u = !1, l;
|
2338
2364
|
if (e) {
|
2339
2365
|
u = e;
|
2340
|
-
const c = a.domain ?? i, d = C(c) && !
|
2366
|
+
const c = a.domain ?? i, d = C(c) && !ec(Pn(c)) || r, h = Zu(n ?? Ga, d);
|
2341
2367
|
if (Ke(h)) {
|
2342
2368
|
l = ze(h);
|
2343
2369
|
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(
|
2370
|
+
y !== g && (a = { ...a, samesite: "None", secure: !0 }), !r && d && g !== Pn(c) && (u = !1, t.warn(ya(te, c, g)));
|
2345
2371
|
} else
|
2346
2372
|
u = !1;
|
2347
2373
|
}
|
2348
2374
|
return { sscEnabled: u, cookieOptions: a, finalDataServiceUrl: l };
|
2349
|
-
},
|
2375
|
+
}, fc = (t) => {
|
2350
2376
|
var d;
|
2351
2377
|
const { storage: e } = o.loadOptions.value;
|
2352
2378
|
let n = e == null ? void 0 : e.type;
|
2353
|
-
C(n) && !
|
2379
|
+
C(n) && !Xu(n) && (t.warn(ma(te, n, on)), n = on);
|
2354
2380
|
let s = (d = e == null ? void 0 : e.encryption) == null ? void 0 : d.version;
|
2355
|
-
const i = s &&
|
2356
|
-
!
|
2381
|
+
const i = s && It[s];
|
2382
|
+
!x(s) && x(i) ? (t.warn(pa(te, s, It, Ce)), s = Ce) : x(s) && (s = Ce);
|
2357
2383
|
const r = e == null ? void 0 : e.migrate, a = r && s === Ce;
|
2358
|
-
r === !0 && a !== r && t.warn(
|
2359
|
-
const { sscEnabled: u, finalDataServiceUrl: l, cookieOptions: c } =
|
2384
|
+
r === !0 && a !== r && t.warn(va(te, s, Ce));
|
2385
|
+
const { sscEnabled: u, finalDataServiceUrl: l, cookieOptions: c } = dc(t);
|
2360
2386
|
j(() => {
|
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 =
|
2387
|
+
o.storage.type.value = n, o.storage.cookie.value = c, o.serverCookies.isEnabledServerSideCookies.value = u, o.serverCookies.dataServiceUrl.value = l, o.storage.encryptionPluginName.value = It[s], o.storage.migrate.value = a;
|
2362
2388
|
});
|
2363
|
-
},
|
2389
|
+
}, hc = (t) => {
|
2364
2390
|
var h, y, g, f;
|
2365
|
-
const { provider: e, consentManagerPluginName: n, initialized: s, enabled: i, consentsData: r } =
|
2391
|
+
const { provider: e, consentManagerPluginName: n, initialized: s, enabled: i, consentsData: r } = Ri(o.loadOptions.value.consentManagement, t), a = o.loadOptions.value.preConsent;
|
2366
2392
|
let u = ((h = a == null ? void 0 : a.storage) == null ? void 0 : h.strategy) ?? Yt;
|
2367
2393
|
const l = ["none", "session", "anonymousId"];
|
2368
|
-
C(u) && !l.includes(u) && (u = Yt, t.warn(
|
2394
|
+
C(u) && !l.includes(u) && (u = Yt, t.warn(La(te, (y = a == null ? void 0 : a.storage) == null ? void 0 : y.strategy, Yt)));
|
2369
2395
|
let c = ((g = a == null ? void 0 : a.events) == null ? void 0 : g.delivery) ?? Wt;
|
2370
2396
|
const d = ["immediate", "buffer"];
|
2371
|
-
C(c) && !d.includes(c) && (c = Wt, t.warn(
|
2397
|
+
C(c) && !d.includes(c) && (c = Wt, t.warn(wa(te, (f = a == null ? void 0 : a.events) == null ? void 0 : f.delivery, Wt))), j(() => {
|
2372
2398
|
var m;
|
2373
2399
|
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 = {
|
2374
2400
|
// Only enable pre-consent if it is explicitly enabled and
|
@@ -2379,49 +2405,49 @@ const Yu = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2379
2405
|
events: { delivery: c }
|
2380
2406
|
};
|
2381
2407
|
});
|
2382
|
-
},
|
2408
|
+
}, gc = (t) => {
|
2383
2409
|
var s;
|
2384
2410
|
let e = o.consents.resolutionStrategy.value, n;
|
2385
|
-
|
2386
|
-
o.consents.metadata.value =
|
2411
|
+
M(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(() => {
|
2412
|
+
o.consents.metadata.value = T(n), o.consents.resolutionStrategy.value = e;
|
2387
2413
|
});
|
2388
|
-
},
|
2414
|
+
}, mc = (t) => {
|
2389
2415
|
if (o.dataPlaneEvents.deliveryEnabled.value) {
|
2390
2416
|
const e = "XhrQueue";
|
2391
2417
|
let n = e;
|
2392
|
-
o.loadOptions.value.useBeacon && (o.capabilities.isBeaconAvailable.value ? n = "BeaconQueue" : (n = e, t.warn(
|
2418
|
+
o.loadOptions.value.useBeacon && (o.capabilities.isBeaconAvailable.value ? n = "BeaconQueue" : (n = e, t.warn(Sa(te)))), j(() => {
|
2393
2419
|
o.dataPlaneEvents.eventsQueuePluginName.value = n;
|
2394
2420
|
});
|
2395
2421
|
}
|
2396
|
-
},
|
2397
|
-
const r = new URLSearchParams({ p:
|
2398
|
-
let a =
|
2422
|
+
}, pc = (t, e, n, s, i) => {
|
2423
|
+
const r = new URLSearchParams({ p: Gs, v: ut, build: dt, writeKey: e, lockIntegrationsVersion: n.toString(), lockPluginsVersion: s.toString() });
|
2424
|
+
let a = oi, u = r, l = "/sourceConfig/", c = "";
|
2399
2425
|
if (Ke(t)) {
|
2400
2426
|
const d = new URL(t);
|
2401
|
-
ze(d.pathname).endsWith("/sourceConfig") || (d.pathname = `${ze(d.pathname)}/sourceConfig/`), d.pathname =
|
2427
|
+
ze(d.pathname).endsWith("/sourceConfig") || (d.pathname = `${ze(d.pathname)}/sourceConfig/`), d.pathname = sc(d.pathname), r.forEach((h, y) => {
|
2402
2428
|
d.searchParams.get(y) === null && d.searchParams.set(y, h);
|
2403
2429
|
}), a = d.origin, l = d.pathname, u = d.searchParams, c = d.hash;
|
2404
2430
|
} else
|
2405
|
-
i.warn(
|
2431
|
+
i.warn(Pa(te, t));
|
2406
2432
|
return `${a}${l}?${u}${c}`;
|
2407
|
-
},
|
2433
|
+
}, vc = (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}` })), Ii = (t, e, n, s, i, r, a) => {
|
2408
2434
|
let u;
|
2409
2435
|
if (r) {
|
2410
2436
|
if (!Ke(r))
|
2411
|
-
return a.error(
|
2437
|
+
return a.error(Wo(te, t, r)), null;
|
2412
2438
|
u = ze(r);
|
2413
2439
|
} else if (u = n, o.context.app.value.installType === "cdn") {
|
2414
|
-
const l =
|
2440
|
+
const l = uc();
|
2415
2441
|
l && (u = l.split("/").slice(0, -1).concat(e).join("/"));
|
2416
2442
|
}
|
2417
|
-
return i && (u = u.replace(new RegExp(`/${
|
2418
|
-
},
|
2419
|
-
class
|
2443
|
+
return i && (u = u.replace(new RegExp(`/${In}/${dt}/${e}$`), `/${s}/${dt}/${e}`)), u;
|
2444
|
+
}, yc = (t, e, n, s) => Ii("integrations", Rn, ii, t, e, n, s), bc = (t, e, n, s) => Ii("plugins", si, ri, t, e, n, s);
|
2445
|
+
class Ec {
|
2420
2446
|
constructor(e, n, s) {
|
2421
2447
|
this.errorHandler = n, this.logger = s, this.httpClient = e, this.onError = this.onError.bind(this), this.processConfig = this.processConfig.bind(this);
|
2422
2448
|
}
|
2423
2449
|
attachEffects() {
|
2424
|
-
|
2450
|
+
fe(() => {
|
2425
2451
|
this.logger.setMinLogLevel(o.lifecycle.logLevel.value);
|
2426
2452
|
});
|
2427
2453
|
}
|
@@ -2430,12 +2456,12 @@ class yc {
|
|
2430
2456
|
* config related information in global state
|
2431
2457
|
*/
|
2432
2458
|
init() {
|
2433
|
-
const { logLevel: e, configUrl: n, lockIntegrationsVersion: s, lockPluginsVersion: i, destSDKBaseURL: r, pluginsSDKBaseURL: a, integrations: u } = o.loadOptions.value, l =
|
2459
|
+
const { logLevel: e, configUrl: n, lockIntegrationsVersion: s, lockPluginsVersion: i, destSDKBaseURL: r, pluginsSDKBaseURL: a, integrations: u } = o.loadOptions.value, l = yc(ut, s, r, this.logger);
|
2434
2460
|
if (ne(l))
|
2435
2461
|
return;
|
2436
2462
|
let c;
|
2437
|
-
c =
|
2438
|
-
o.lifecycle.integrationsCDNPath.value = l, o.lifecycle.pluginsCDNPath.value = c, e && (o.lifecycle.logLevel.value = e), o.lifecycle.sourceConfigUrl.value =
|
2463
|
+
c = bc(ut, i, a, this.logger), c !== null && (this.attachEffects(), o.lifecycle.activeDataplaneUrl.value = ze(o.lifecycle.dataPlaneUrl.value), fc(this.logger), hc(this.logger), mc(this.logger), j(() => {
|
2464
|
+
o.lifecycle.integrationsCDNPath.value = l, o.lifecycle.pluginsCDNPath.value = c, e && (o.lifecycle.logLevel.value = e), o.lifecycle.sourceConfigUrl.value = pc(n, o.lifecycle.writeKey.value, s, i, this.logger), o.metrics.metricsServiceUrl.value = `${o.lifecycle.activeDataplaneUrl.value}/${ja}`, o.nativeDestinations.loadOnlyIntegrations.value = u;
|
2439
2465
|
}), this.getConfig());
|
2440
2466
|
}
|
2441
2467
|
/**
|
@@ -2455,23 +2481,23 @@ class yc {
|
|
2455
2481
|
}
|
2456
2482
|
let s;
|
2457
2483
|
try {
|
2458
|
-
|
2484
|
+
L(e) ? s = JSON.parse(e) : s = e;
|
2459
2485
|
} catch (r) {
|
2460
2486
|
this.onError(r, Gn);
|
2461
2487
|
return;
|
2462
2488
|
}
|
2463
|
-
if (!
|
2489
|
+
if (!Qu(s)) {
|
2464
2490
|
this.onError(new Error(Gn));
|
2465
2491
|
return;
|
2466
2492
|
}
|
2467
2493
|
if (s.source.enabled === !1) {
|
2468
|
-
this.logger.error(
|
2494
|
+
this.logger.error(jo);
|
2469
2495
|
return;
|
2470
2496
|
}
|
2471
|
-
|
2472
|
-
const i = s.source.destinations.length > 0 ?
|
2497
|
+
cc(s);
|
2498
|
+
const i = s.source.destinations.length > 0 ? vc(s.source.destinations) : [];
|
2473
2499
|
j(() => {
|
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 ?? [],
|
2500
|
+
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 ?? [], gc(s), o.lifecycle.status.value = "configured";
|
2475
2501
|
});
|
2476
2502
|
}
|
2477
2503
|
/**
|
@@ -2483,7 +2509,7 @@ class yc {
|
|
2483
2509
|
const e = o.loadOptions.value.getSourceConfig;
|
2484
2510
|
if (e) {
|
2485
2511
|
if (!S(e)) {
|
2486
|
-
this.logger.error(
|
2512
|
+
this.logger.error(Yo(te));
|
2487
2513
|
return;
|
2488
2514
|
}
|
2489
2515
|
const n = e();
|
@@ -2494,10 +2520,10 @@ class yc {
|
|
2494
2520
|
this.httpClient.getAsyncData({ url: o.lifecycle.sourceConfigUrl.value, options: { headers: { "Content-Type": void 0 } }, callback: this.processConfig });
|
2495
2521
|
}
|
2496
2522
|
}
|
2497
|
-
const
|
2523
|
+
const Sc = () => {
|
2498
2524
|
const t = /([A-Z]+[+-]\d+)/.exec((/* @__PURE__ */ new Date()).toString());
|
2499
2525
|
return t != null && t[1] ? t[1] : "NA";
|
2500
|
-
},
|
2526
|
+
}, Ti = () => (document == null ? void 0 : document.referrer) || "$direct", kc = () => {
|
2501
2527
|
const t = document.getElementsByTagName("link");
|
2502
2528
|
let e = "";
|
2503
2529
|
for (let n = 0; t[n]; n += 1) {
|
@@ -2508,8 +2534,8 @@ const bc = () => {
|
|
2508
2534
|
}
|
2509
2535
|
}
|
2510
2536
|
return e;
|
2511
|
-
},
|
2512
|
-
if (
|
2537
|
+
}, Rc = () => {
|
2538
|
+
if (x(globalThis.navigator))
|
2513
2539
|
return null;
|
2514
2540
|
let { userAgent: t } = globalThis.navigator;
|
2515
2541
|
const { brave: e } = globalThis.navigator;
|
@@ -2518,8 +2544,8 @@ const bc = () => {
|
|
2518
2544
|
n && (t = `${t} Brave/${n[2]}`);
|
2519
2545
|
}
|
2520
2546
|
return t;
|
2521
|
-
},
|
2522
|
-
const t =
|
2547
|
+
}, Ic = () => x(globalThis.navigator) ? null : globalThis.navigator.language ?? globalThis.navigator.browserLanguage, Ai = () => {
|
2548
|
+
const t = kc();
|
2523
2549
|
let e = globalThis.location.pathname;
|
2524
2550
|
const { href: n } = globalThis.location;
|
2525
2551
|
let s = n;
|
@@ -2530,12 +2556,12 @@ const bc = () => {
|
|
2530
2556
|
l.search === "" ? s = t + i : s = t, e = l.pathname;
|
2531
2557
|
} catch {
|
2532
2558
|
}
|
2533
|
-
const r =
|
2534
|
-
return { path: e, referrer: u, referring_domain:
|
2535
|
-
},
|
2536
|
-
class
|
2559
|
+
const r = nc(s), { title: a } = document, u = Ti();
|
2560
|
+
return { path: e, referrer: u, referring_domain: ki(u), search: i, title: a, url: r, tab_url: n };
|
2561
|
+
}, Tc = `https://polyfill-fastly.io/v3/polyfill.min.js?version=3.111.0&features=${Object.keys(un).join("%2C")}`, Ac = 10 * 1e3, as = "rudderstackPolyfill";
|
2562
|
+
class Oc {
|
2537
2563
|
constructor(e, n, s) {
|
2538
|
-
this.httpClient = e, this.errorHandler = n, this.logger = s, this.externalSrcLoader = new
|
2564
|
+
this.httpClient = e, this.errorHandler = n, this.logger = s, this.externalSrcLoader = new zs(this.logger), this.onError = this.onError.bind(this), this.onReady = this.onReady.bind(this);
|
2539
2565
|
}
|
2540
2566
|
init() {
|
2541
2567
|
this.prepareBrowserCapabilities(), this.attachWindowListeners();
|
@@ -2546,21 +2572,21 @@ class Ic {
|
|
2546
2572
|
// eslint-disable-next-line class-methods-use-this
|
2547
2573
|
detectBrowserCapabilities() {
|
2548
2574
|
j(() => {
|
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 =
|
2575
|
+
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 = wu(), o.capabilities.isUaCHAvailable.value = is(), o.capabilities.isCryptoAvailable.value = Lu(), o.capabilities.isIE11.value = Mu(), o.capabilities.isOnline.value = globalThis.navigator.onLine, o.context.userAgent.value = Rc(), o.context.locale.value = Ic(), o.context.screen.value = rs(), o.context.timezone.value = Sc(), is() && $u((e) => {
|
2550
2576
|
o.context["ua-ch"].value = e;
|
2551
2577
|
}, o.loadOptions.value.uaChTrackLevel);
|
2552
|
-
}),
|
2553
|
-
o.loadOptions.value.sendAdblockPage === !0 && o.lifecycle.sourceConfigUrl.value !== void 0 &&
|
2578
|
+
}), fe(() => {
|
2579
|
+
o.loadOptions.value.sendAdblockPage === !0 && o.lifecycle.sourceConfigUrl.value !== void 0 && di(this.httpClient);
|
2554
2580
|
});
|
2555
2581
|
}
|
2556
2582
|
/**
|
2557
2583
|
* Detect if polyfills are required and then load script from polyfill URL
|
2558
2584
|
*/
|
2559
2585
|
prepareBrowserCapabilities() {
|
2560
|
-
o.capabilities.isLegacyDOM.value =
|
2586
|
+
o.capabilities.isLegacyDOM.value = Bu();
|
2561
2587
|
const e = o.loadOptions.value.polyfillURL;
|
2562
|
-
let n =
|
2563
|
-
if (qe(e) && (Ke(e) ? n = e : this.logger.warn(
|
2588
|
+
let n = Tc;
|
2589
|
+
if (qe(e) && (Ke(e) ? n = e : this.logger.warn(Ua(nn, e))), o.loadOptions.value.polyfillIfRequired && o.capabilities.isLegacyDOM.value && Ke(n)) {
|
2564
2590
|
const i = n !== o.loadOptions.value.polyfillURL;
|
2565
2591
|
if (i) {
|
2566
2592
|
const r = `RS_polyfillCallback_${o.lifecycle.writeKey.value}`, a = () => {
|
@@ -2568,8 +2594,8 @@ class Ic {
|
|
2568
2594
|
};
|
2569
2595
|
globalThis[r] = a, n = `${n}&callback=${r}`;
|
2570
2596
|
}
|
2571
|
-
this.externalSrcLoader.loadJSFile({ url: n, id: as, async: !0, timeout:
|
2572
|
-
r ? i || this.onReady() : this.onError(new Error(
|
2597
|
+
this.externalSrcLoader.loadJSFile({ url: n, id: as, async: !0, timeout: Ac, callback: (r) => {
|
2598
|
+
r ? i || this.onReady() : this.onError(new Error(Na(as, n)));
|
2573
2599
|
} });
|
2574
2600
|
} else
|
2575
2601
|
this.onReady();
|
@@ -2582,7 +2608,7 @@ class Ic {
|
|
2582
2608
|
o.capabilities.isOnline.value = !1;
|
2583
2609
|
}), globalThis.addEventListener("online", () => {
|
2584
2610
|
o.capabilities.isOnline.value = !0;
|
2585
|
-
}), globalThis.addEventListener("resize",
|
2611
|
+
}), globalThis.addEventListener("resize", Ao(() => {
|
2586
2612
|
o.context.screen.value = rs();
|
2587
2613
|
}, this));
|
2588
2614
|
}
|
@@ -2601,13 +2627,13 @@ class Ic {
|
|
2601
2627
|
this.errorHandler.onError({ error: e, context: nn, groupingHash: n });
|
2602
2628
|
}
|
2603
2629
|
}
|
2604
|
-
const
|
2630
|
+
const Dc = "web", Cc = ["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"], Oi = (t) => typeof t == "number" && !Number.isNaN(t), _c = (t, e) => e.toString().length >= t, Mt = (t) => Oi(t) && t >= 0 && Number.isInteger(t), us = 10, Di = (t) => {
|
2605
2631
|
const { cutOff: e } = t, n = Date.now();
|
2606
2632
|
return !!(e != null && e.enabled && e.expiresAt && n > e.expiresAt);
|
2607
|
-
}, cs = (t) => !t.expiresAt || Date.now() > t.expiresAt ||
|
2633
|
+
}, cs = (t) => !t.expiresAt || Date.now() > t.expiresAt || Di(t), Pc = () => Date.now(), Nc = (t, e) => !t || !Mt(t) || !_c(us, t) ? (e.warn(Oa(De, t, us)), !1) : !0, Lc = (t) => {
|
2608
2634
|
if (t != null && t.enabled)
|
2609
|
-
return t.expiresAt ?? (
|
2610
|
-
},
|
2635
|
+
return t.expiresAt ?? (Mt(t.duration) ? Date.now() + t.duration : void 0);
|
2636
|
+
}, wc = (t) => {
|
2611
2637
|
const { timeout: e, cutOff: n } = t, s = Date.now();
|
2612
2638
|
return {
|
2613
2639
|
id: s,
|
@@ -2618,52 +2644,52 @@ const Oc = "web", Ac = ["integrations", "anonymousId", "originalTimestamp"], ls
|
|
2618
2644
|
autoTrack: !0,
|
2619
2645
|
...n && { cutOff: n }
|
2620
2646
|
};
|
2621
|
-
},
|
2622
|
-
const e =
|
2647
|
+
}, Mc = (t, e) => ({ id: Nc(t, e) ? t : Pc(), sessionStart: void 0, manualTrack: !0 }), it = (t) => t === W || t === X || t === ee || t === ce, dn = () => Ut(), $c = (t) => {
|
2648
|
+
const e = Ai(), n = {};
|
2623
2649
|
return Object.keys(e).forEach((s) => {
|
2624
2650
|
n[s] = (t == null ? void 0 : t[s]) || e[s];
|
2625
2651
|
}), 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;
|
2626
|
-
},
|
2627
|
-
const n = (e == null ? void 0 : e.page) || {}, s = t, i =
|
2652
|
+
}, Uc = (t, e) => {
|
2653
|
+
const n = (e == null ? void 0 : e.page) || {}, s = t, i = Ai();
|
2628
2654
|
return Object.keys(i).forEach((r) => {
|
2629
|
-
|
2630
|
-
}),
|
2655
|
+
x(s[r]) && (s[r] = n[r] || i[r]);
|
2656
|
+
}), x(s.initial_referrer) && (s.initial_referrer = n.initial_referrer || o.session.initialReferrer.value), x(s.initial_referring_domain) && (s.initial_referring_domain = n.initial_referring_domain || o.session.initialReferringDomain.value), s;
|
2631
2657
|
}, Xt = (t, e, n) => {
|
2632
|
-
|
2633
|
-
(Qt.includes(s) || Qt.includes(s.toLowerCase())) && n.warn(
|
2658
|
+
M(t) && Object.keys(t).forEach((s) => {
|
2659
|
+
(Qt.includes(s) || Qt.includes(s.toLowerCase())) && n.warn(ba(Vs, s, e, Qt));
|
2634
2660
|
});
|
2635
|
-
},
|
2661
|
+
}, Bc = (t, e) => {
|
2636
2662
|
const { properties: n, traits: s, context: i } = t, { traits: r } = i;
|
2637
2663
|
Xt(n, "properties", e), Xt(s, "traits", e), Xt(r, "context.traits", e);
|
2638
|
-
},
|
2639
|
-
e.anonymousId &&
|
2640
|
-
},
|
2664
|
+
}, Vc = (t, e) => {
|
2665
|
+
e.anonymousId && L(e.anonymousId) && (t.anonymousId = e.anonymousId), Ie(e.integrations) && (t.integrations = e.integrations), e.originalTimestamp && L(e.originalTimestamp) && (t.originalTimestamp = e.originalTimestamp);
|
2666
|
+
}, Fc = (t, e, n) => {
|
2641
2667
|
let s = t;
|
2642
2668
|
return Object.keys(e).forEach((i) => {
|
2643
|
-
if (!
|
2669
|
+
if (!Cc.includes(i) && !ls.includes(i))
|
2644
2670
|
if (i !== "context")
|
2645
|
-
s =
|
2646
|
-
else if (!
|
2671
|
+
s = H(s, { [i]: e[i] });
|
2672
|
+
else if (!x(e[i]) && M(e[i])) {
|
2647
2673
|
const r = {};
|
2648
2674
|
Object.keys(e[i]).forEach((a) => {
|
2649
2675
|
ls.includes(a) || (r[a] = e[i][a]);
|
2650
|
-
}), s =
|
2676
|
+
}), s = H(s, { ...r });
|
2651
2677
|
} else
|
2652
|
-
n.warn(
|
2678
|
+
n.warn(Ea(Vs));
|
2653
2679
|
}), s;
|
2654
|
-
},
|
2655
|
-
|
2656
|
-
},
|
2680
|
+
}, xc = (t, e, n) => {
|
2681
|
+
M(e) && (Vc(t, e), t.context = Fc(t.context, e, n));
|
2682
|
+
}, Hc = (t) => {
|
2657
2683
|
let e;
|
2658
|
-
return o.loadOptions.value.useGlobalIntegrationsConfigInEvents ? e = o.consents.postConsent.value.integrations ?? o.nativeDestinations.loadOnlyIntegrations.value : t ? e = t : e =
|
2659
|
-
},
|
2684
|
+
return o.loadOptions.value.useGlobalIntegrationsConfigInEvents ? e = o.consents.postConsent.value.integrations ?? o.nativeDestinations.loadOnlyIntegrations.value : t ? e = t : e = ni, T(e);
|
2685
|
+
}, tt = (t, e, n, s) => {
|
2660
2686
|
var a, u, l;
|
2661
|
-
const i = { channel:
|
2662
|
-
traits:
|
2687
|
+
const i = { channel: Dc, context: {
|
2688
|
+
traits: T(o.session.userTraits.value),
|
2663
2689
|
sessionId: o.session.sessionInfo.value.id || void 0,
|
2664
2690
|
sessionStart: o.session.sessionInfo.value.sessionStart || void 0,
|
2665
2691
|
// Add 'consentManagement' only if consent management is enabled
|
2666
|
-
...o.consents.enabled.value && { consentManagement: { deniedConsentIds:
|
2692
|
+
...o.consents.enabled.value && { consentManagement: { deniedConsentIds: T(o.consents.data.value.deniedConsentIds), allowedConsentIds: T(o.consents.data.value.allowedConsentIds), provider: o.consents.provider.value, resolutionStrategy: o.consents.resolutionStrategy.value } },
|
2667
2693
|
"ua-ch": o.context["ua-ch"].value,
|
2668
2694
|
app: o.context.app.value,
|
2669
2695
|
library: o.context.library.value,
|
@@ -2671,17 +2697,17 @@ const Oc = "web", Ac = ["integrations", "anonymousId", "originalTimestamp"], ls
|
|
2671
2697
|
os: o.context.os.value,
|
2672
2698
|
locale: o.context.locale.value,
|
2673
2699
|
screen: o.context.screen.value,
|
2674
|
-
campaign:
|
2675
|
-
page:
|
2700
|
+
campaign: tc(globalThis.location.href),
|
2701
|
+
page: $c(n),
|
2676
2702
|
timezone: o.context.timezone.value,
|
2677
2703
|
// Add auto tracking information
|
2678
2704
|
...o.autoTrack.enabled.value && { autoTrack: { ...o.autoTrack.pageLifecycle.enabled.value && { page: { pageViewId: o.autoTrack.pageLifecycle.pageViewId.value } } } }
|
2679
|
-
}, originalTimestamp:
|
2680
|
-
|
2681
|
-
const r =
|
2682
|
-
return r.event === void 0 && (r.event = null), r.properties === void 0 && (r.properties = null),
|
2705
|
+
}, originalTimestamp: ro(), messageId: Ut(), userId: t.userId || o.session.userId.value };
|
2706
|
+
it((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 ? T(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 ? T(o.session.groupTraits.value) : t.traits));
|
2707
|
+
const r = H(t, i);
|
2708
|
+
return r.event === void 0 && (r.event = null), r.properties === void 0 && (r.properties = null), xc(r, e, s), Bc(r, s), r.integrations = Hc(r.integrations), r;
|
2683
2709
|
};
|
2684
|
-
class
|
2710
|
+
class Gc {
|
2685
2711
|
constructor(e) {
|
2686
2712
|
this.logger = e;
|
2687
2713
|
}
|
@@ -2694,7 +2720,7 @@ class xc {
|
|
2694
2720
|
*/
|
2695
2721
|
generatePageEvent(e, n, s, i) {
|
2696
2722
|
let r = s ?? {};
|
2697
|
-
return r =
|
2723
|
+
return r = Uc(r, i), tt({ properties: r, name: n, category: e, type: "page" }, i, r, this.logger);
|
2698
2724
|
}
|
2699
2725
|
/**
|
2700
2726
|
* Generate a 'track' event based on the user-input fields
|
@@ -2703,7 +2729,7 @@ class xc {
|
|
2703
2729
|
* @param options API options
|
2704
2730
|
*/
|
2705
2731
|
generateTrackEvent(e, n, s) {
|
2706
|
-
return
|
2732
|
+
return tt({ properties: n, event: e, type: "track" }, s, void 0, this.logger);
|
2707
2733
|
}
|
2708
2734
|
/**
|
2709
2735
|
* Generate an 'identify' event based on the user-input fields
|
@@ -2712,7 +2738,7 @@ class xc {
|
|
2712
2738
|
* @param options API options
|
2713
2739
|
*/
|
2714
2740
|
generateIdentifyEvent(e, n, s) {
|
2715
|
-
return
|
2741
|
+
return tt({ userId: e, type: "identify", context: { traits: n } }, s, void 0, this.logger);
|
2716
2742
|
}
|
2717
2743
|
/**
|
2718
2744
|
* Generate an 'alias' event based on the user-input fields
|
@@ -2721,7 +2747,7 @@ class xc {
|
|
2721
2747
|
* @param options API options
|
2722
2748
|
*/
|
2723
2749
|
generateAliasEvent(e, n, s) {
|
2724
|
-
const r =
|
2750
|
+
const r = tt({ previousId: n, type: "alias" }, s, void 0, this.logger);
|
2725
2751
|
return r.userId = e ?? r.userId, r;
|
2726
2752
|
}
|
2727
2753
|
/**
|
@@ -2732,7 +2758,7 @@ class xc {
|
|
2732
2758
|
*/
|
2733
2759
|
generateGroupEvent(e, n, s) {
|
2734
2760
|
const i = { type: "group" };
|
2735
|
-
return e && (i.groupId = e), n && (i.traits = n),
|
2761
|
+
return e && (i.groupId = e), n && (i.traits = n), tt(i, s, void 0, this.logger);
|
2736
2762
|
}
|
2737
2763
|
/**
|
2738
2764
|
* Generates a new RudderEvent object based on the user-input fields
|
@@ -2762,7 +2788,7 @@ class xc {
|
|
2762
2788
|
return n;
|
2763
2789
|
}
|
2764
2790
|
}
|
2765
|
-
class
|
2791
|
+
class jc {
|
2766
2792
|
/**
|
2767
2793
|
*
|
2768
2794
|
* @param eventRepository Event repository instance
|
@@ -2771,7 +2797,7 @@ class Hc {
|
|
2771
2797
|
* @param logger Logger object
|
2772
2798
|
*/
|
2773
2799
|
constructor(e, n, s, i) {
|
2774
|
-
this.eventRepository = e, this.userSessionManager = n, this.errorHandler = s, this.logger = i, this.eventFactory = new
|
2800
|
+
this.eventRepository = e, this.userSessionManager = n, this.errorHandler = s, this.logger = i, this.eventFactory = new Gc(this.logger);
|
2775
2801
|
}
|
2776
2802
|
/**
|
2777
2803
|
* Initializes the event manager
|
@@ -2792,7 +2818,7 @@ class Hc {
|
|
2792
2818
|
this.eventRepository.enqueue(n, e.callback);
|
2793
2819
|
}
|
2794
2820
|
}
|
2795
|
-
class
|
2821
|
+
class qc {
|
2796
2822
|
constructor(e, n, s, i, r) {
|
2797
2823
|
this.storeManager = n, this.pluginsManager = e, this.logger = r, this.errorHandler = i, this.httpClient = s, this.onError = this.onError.bind(this), this.serverSideCookieDebounceFuncs = {};
|
2798
2824
|
}
|
@@ -2812,7 +2838,7 @@ class Gc {
|
|
2812
2838
|
var n, s;
|
2813
2839
|
let e;
|
2814
2840
|
if (this.isPersistenceEnabledForStorageEntry("sessionInfo")) {
|
2815
|
-
const i = this.getConfiguredSessionTrackingInfo(), r = this.getSessionInfo() ??
|
2841
|
+
const i = this.getConfiguredSessionTrackingInfo(), r = this.getSessionInfo() ?? A.sessionInfo;
|
2816
2842
|
e = {
|
2817
2843
|
// If manualTrack is set to true in the storage, then do not enable auto tracking even if configured.
|
2818
2844
|
// Once manual tracking ends (endSession is called), auto tracking will be enabled in the next SDK run.
|
@@ -2822,9 +2848,9 @@ class Gc {
|
|
2822
2848
|
expiresAt: r.expiresAt,
|
2823
2849
|
id: r.id,
|
2824
2850
|
sessionStart: r.sessionStart
|
2825
|
-
}, !e.autoTrack && e.manualTrack !== !0 ? e =
|
2851
|
+
}, !e.autoTrack && e.manualTrack !== !0 ? e = A.sessionInfo : ((n = i.cutOff) == null ? void 0 : n.enabled) === !0 && (e.cutOff = { enabled: !0, duration: i.cutOff.duration, expiresAt: (s = r.cutOff) == null ? void 0 : s.expiresAt });
|
2826
2852
|
} else
|
2827
|
-
e =
|
2853
|
+
e = A.sessionInfo;
|
2828
2854
|
o.session.sessionInfo.value = e, o.session.sessionInfo.value.autoTrack && this.startOrRenewAutoTracking(o.session.sessionInfo.value);
|
2829
2855
|
}
|
2830
2856
|
setInitialReferrerInfo() {
|
@@ -2832,13 +2858,13 @@ class Gc {
|
|
2832
2858
|
if (e && n)
|
2833
2859
|
this.setInitialReferrer(e), this.setInitialReferringDomain(n);
|
2834
2860
|
else {
|
2835
|
-
const s = e ||
|
2836
|
-
this.setInitialReferrer(s), this.setInitialReferringDomain(
|
2861
|
+
const s = e || Ti();
|
2862
|
+
this.setInitialReferrer(s), this.setInitialReferringDomain(ki(s));
|
2837
2863
|
}
|
2838
2864
|
}
|
2839
2865
|
isPersistenceEnabledForStorageEntry(e) {
|
2840
2866
|
var n;
|
2841
|
-
return
|
2867
|
+
return it((n = o.storage.entries.value[e]) == null ? void 0 : n.type);
|
2842
2868
|
}
|
2843
2869
|
migrateDataFromPreviousStorage() {
|
2844
2870
|
const e = o.storage.entries.value, n = [W, X, ee];
|
@@ -2850,7 +2876,7 @@ class Gc {
|
|
2850
2876
|
const d = (h = this.storeManager) == null ? void 0 : h.getStore(Fe[c]);
|
2851
2877
|
if (d && c !== r) {
|
2852
2878
|
const y = d.get(Ve[i]);
|
2853
|
-
|
2879
|
+
Hr(y) && a.set(Ve[i], y), d.remove(Ve[i]);
|
2854
2880
|
}
|
2855
2881
|
});
|
2856
2882
|
});
|
@@ -2859,7 +2885,7 @@ class Gc {
|
|
2859
2885
|
if (!o.storage.migrate.value)
|
2860
2886
|
return;
|
2861
2887
|
let s = e ?? [];
|
2862
|
-
s.length === 0 && [
|
2888
|
+
s.length === 0 && [pi, vi, yi].forEach((a) => {
|
2863
2889
|
var l;
|
2864
2890
|
const u = (l = this.storeManager) == null ? void 0 : l.getStore(a);
|
2865
2891
|
u && s.push(u);
|
@@ -2879,14 +2905,14 @@ class Gc {
|
|
2879
2905
|
return { autoTrack: e };
|
2880
2906
|
let n;
|
2881
2907
|
const s = (r = o.loadOptions.value.sessions) == null ? void 0 : r.timeout;
|
2882
|
-
|
2908
|
+
Mt(s) ? n = s : (this.logger.warn(ka(De, s, sn)), n = sn), n === 0 && (this.logger.warn(Ta(De)), e = !1), n > 0 && n < Fn && this.logger.warn(Aa(De, n, Fn));
|
2883
2909
|
const i = this.getCutOffInfo(n);
|
2884
2910
|
return { timeout: n, autoTrack: e, cutOff: i };
|
2885
2911
|
}
|
2886
2912
|
getCutOffInfo(e) {
|
2887
2913
|
const n = o.loadOptions.value.sessions.cutOff;
|
2888
2914
|
let s, i = !1;
|
2889
|
-
return n.enabled === !0 && (s = n.duration, i = !0,
|
2915
|
+
return n.enabled === !0 && (s = n.duration, i = !0, Mt(s) ? s < e && (this.logger.warn(Ia(De, s, e)), i = !1) : (this.logger.warn(Ra(De, s, Vn)), s = Vn)), { enabled: i, duration: s };
|
2890
2916
|
}
|
2891
2917
|
/**
|
2892
2918
|
* Handles error
|
@@ -2929,8 +2955,8 @@ class Gc {
|
|
2929
2955
|
var u, l;
|
2930
2956
|
((u = a == null ? void 0 : a.xhr) == null ? void 0 : u.status) === 200 ? e.forEach((c) => {
|
2931
2957
|
const d = s == null ? void 0 : s.get(c.name), h = de(c.value, !1, []);
|
2932
|
-
de(d, !1, []) !== h && (this.logger.error(
|
2933
|
-
}) : (this.logger.error(
|
2958
|
+
de(d, !1, []) !== h && (this.logger.error(ga(c.name)), n && n(c.name, c.value));
|
2959
|
+
}) : (this.logger.error(ha((l = a == null ? void 0 : a.xhr) == null ? void 0 : l.status)), e.forEach((c) => {
|
2934
2960
|
n && n(c.name, c.value);
|
2935
2961
|
}));
|
2936
2962
|
});
|
@@ -2948,21 +2974,21 @@ class Gc {
|
|
2948
2974
|
syncValueToStorage(e, n) {
|
2949
2975
|
var r, a, u;
|
2950
2976
|
const s = o.storage.entries.value, i = (r = s[e]) == null ? void 0 : r.type;
|
2951
|
-
if (
|
2977
|
+
if (it(i)) {
|
2952
2978
|
const l = (a = this.storeManager) == null ? void 0 : a.getStore(Fe[i]), c = (u = s[e]) == null ? void 0 : u.key;
|
2953
|
-
n && (
|
2979
|
+
n && (L(n) || Ie(n)) ? o.serverCookies.isEnabledServerSideCookies.value && i === W ? (this.serverSideCookieDebounceFuncs[e] && globalThis.clearTimeout(this.serverSideCookieDebounceFuncs[e]), this.serverSideCookieDebounceFuncs[e] = globalThis.setTimeout(() => {
|
2954
2980
|
this.setServerSideCookies([{ name: c, value: n }], (d, h) => {
|
2955
2981
|
l == null || l.set(d, h);
|
2956
2982
|
}, l);
|
2957
|
-
},
|
2983
|
+
}, Ka)) : l == null || l.set(c, n) : l == null || l.remove(c);
|
2958
2984
|
}
|
2959
2985
|
}
|
2960
2986
|
/**
|
2961
2987
|
* Function to update storage whenever state value changes
|
2962
2988
|
*/
|
2963
2989
|
registerEffects() {
|
2964
|
-
|
2965
|
-
|
2990
|
+
bi.forEach((e) => {
|
2991
|
+
fe(() => {
|
2966
2992
|
this.syncValueToStorage(e, o.session[e].value);
|
2967
2993
|
});
|
2968
2994
|
});
|
@@ -2978,7 +3004,7 @@ class Gc {
|
|
2978
3004
|
setAnonymousId(e, n) {
|
2979
3005
|
var i;
|
2980
3006
|
let s = e;
|
2981
|
-
(!
|
3007
|
+
(!L(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 = A.anonymousId, o.session.anonymousId.value = s;
|
2982
3008
|
}
|
2983
3009
|
/**
|
2984
3010
|
* Fetches anonymousId
|
@@ -2988,16 +3014,16 @@ class Gc {
|
|
2988
3014
|
getAnonymousId(e) {
|
2989
3015
|
var s, i;
|
2990
3016
|
const n = (s = o.storage.entries.value.anonymousId) == null ? void 0 : s.type;
|
2991
|
-
if (
|
3017
|
+
if (it(n)) {
|
2992
3018
|
let r = o.session.anonymousId.value;
|
2993
|
-
(!r || r ===
|
3019
|
+
(!r || r === A.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();
|
2994
3020
|
}
|
2995
3021
|
return o.session.anonymousId.value;
|
2996
3022
|
}
|
2997
3023
|
getEntryValue(e) {
|
2998
3024
|
var i, r, a;
|
2999
3025
|
const n = o.storage.entries.value, s = (i = n[e]) == null ? void 0 : i.type;
|
3000
|
-
if (
|
3026
|
+
if (it(s)) {
|
3001
3027
|
const u = (r = this.storeManager) == null ? void 0 : r.getStore(Fe[s]);
|
3002
3028
|
this.migrateStorageIfNeeded([u], [e]);
|
3003
3029
|
const l = (a = n[e]) == null ? void 0 : a.key;
|
@@ -3070,7 +3096,7 @@ class Gc {
|
|
3070
3096
|
* @returns
|
3071
3097
|
*/
|
3072
3098
|
getSessionId() {
|
3073
|
-
const e = this.getSessionInfo() ??
|
3099
|
+
const e = this.getSessionInfo() ?? A.sessionInfo;
|
3074
3100
|
return e.autoTrack && !cs(e) || e.manualTrack ? e.id ?? null : null;
|
3075
3101
|
}
|
3076
3102
|
/**
|
@@ -3078,7 +3104,7 @@ class Gc {
|
|
3078
3104
|
* before using it for building event payloads.
|
3079
3105
|
*/
|
3080
3106
|
refreshSession() {
|
3081
|
-
let e = this.getSessionInfo() ??
|
3107
|
+
let e = this.getSessionInfo() ?? A.sessionInfo;
|
3082
3108
|
(e.autoTrack || e.manualTrack) && (e.autoTrack && (this.startOrRenewAutoTracking(e), e = o.session.sessionInfo.value), e.sessionStart === void 0 ? e = { ...e, sessionStart: !0 } : e.sessionStart && (e = { ...e, sessionStart: !1 })), o.session.sessionInfo.value = e, o.lifecycle.status.value !== "readyExecuted" && this.syncValueToStorage("sessionInfo", e);
|
3083
3109
|
}
|
3084
3110
|
/**
|
@@ -3090,9 +3116,9 @@ class Gc {
|
|
3090
3116
|
reset(e, n) {
|
3091
3117
|
const { session: s } = o, { manualTrack: i, autoTrack: r, timeout: a, cutOff: u } = s.sessionInfo.value;
|
3092
3118
|
j(() => {
|
3093
|
-
if (s.userId.value =
|
3119
|
+
if (s.userId.value = A.userId, s.userTraits.value = A.userTraits, s.groupId.value = A.groupId, s.groupTraits.value = A.groupTraits, s.authToken.value = A.authToken, e === !0 && this.setAnonymousId(), !n)
|
3094
3120
|
if (r) {
|
3095
|
-
const l = { ...
|
3121
|
+
const l = { ...A.sessionInfo, timeout: a };
|
3096
3122
|
u && (l.cutOff = { enabled: u.enabled, duration: u.duration }), s.sessionInfo.value = l, this.startOrRenewAutoTracking(s.sessionInfo.value);
|
3097
3123
|
} else i && this.startManualTrackingInternal();
|
3098
3124
|
});
|
@@ -3102,42 +3128,42 @@ class Gc {
|
|
3102
3128
|
* @param userId
|
3103
3129
|
*/
|
3104
3130
|
setUserId(e) {
|
3105
|
-
o.session.userId.value = this.isPersistenceEnabledForStorageEntry("userId") && e ? e :
|
3131
|
+
o.session.userId.value = this.isPersistenceEnabledForStorageEntry("userId") && e ? e : A.userId;
|
3106
3132
|
}
|
3107
3133
|
/**
|
3108
3134
|
* Set user traits
|
3109
3135
|
* @param traits
|
3110
3136
|
*/
|
3111
3137
|
setUserTraits(e) {
|
3112
|
-
o.session.userTraits.value = this.isPersistenceEnabledForStorageEntry("userTraits") &&
|
3138
|
+
o.session.userTraits.value = this.isPersistenceEnabledForStorageEntry("userTraits") && M(e) ? H(o.session.userTraits.value ?? A.userTraits, e) : A.userTraits;
|
3113
3139
|
}
|
3114
3140
|
/**
|
3115
3141
|
* Set group Id
|
3116
3142
|
* @param groupId
|
3117
3143
|
*/
|
3118
3144
|
setGroupId(e) {
|
3119
|
-
o.session.groupId.value = this.isPersistenceEnabledForStorageEntry("groupId") && e ? e :
|
3145
|
+
o.session.groupId.value = this.isPersistenceEnabledForStorageEntry("groupId") && e ? e : A.groupId;
|
3120
3146
|
}
|
3121
3147
|
/**
|
3122
3148
|
* Set group traits
|
3123
3149
|
* @param traits
|
3124
3150
|
*/
|
3125
3151
|
setGroupTraits(e) {
|
3126
|
-
o.session.groupTraits.value = this.isPersistenceEnabledForStorageEntry("groupTraits") &&
|
3152
|
+
o.session.groupTraits.value = this.isPersistenceEnabledForStorageEntry("groupTraits") && M(e) ? H(o.session.groupTraits.value ?? A.groupTraits, e) : A.groupTraits;
|
3127
3153
|
}
|
3128
3154
|
/**
|
3129
3155
|
* Set initial referrer
|
3130
3156
|
* @param referrer
|
3131
3157
|
*/
|
3132
3158
|
setInitialReferrer(e) {
|
3133
|
-
o.session.initialReferrer.value = this.isPersistenceEnabledForStorageEntry("initialReferrer") && e ? e :
|
3159
|
+
o.session.initialReferrer.value = this.isPersistenceEnabledForStorageEntry("initialReferrer") && e ? e : A.initialReferrer;
|
3134
3160
|
}
|
3135
3161
|
/**
|
3136
3162
|
* Set initial referring domain
|
3137
3163
|
* @param {String} referringDomain
|
3138
3164
|
*/
|
3139
3165
|
setInitialReferringDomain(e) {
|
3140
|
-
o.session.initialReferringDomain.value = this.isPersistenceEnabledForStorageEntry("initialReferringDomain") && e ? e :
|
3166
|
+
o.session.initialReferringDomain.value = this.isPersistenceEnabledForStorageEntry("initialReferringDomain") && e ? e : A.initialReferringDomain;
|
3141
3167
|
}
|
3142
3168
|
/**
|
3143
3169
|
* A function to check for existing session details and depending on that create a new session
|
@@ -3145,13 +3171,13 @@ class Gc {
|
|
3145
3171
|
startOrRenewAutoTracking(e) {
|
3146
3172
|
let n = e;
|
3147
3173
|
if (cs(e))
|
3148
|
-
n =
|
3174
|
+
n = wc(e);
|
3149
3175
|
else {
|
3150
3176
|
const s = Date.now(), i = e.timeout;
|
3151
3177
|
n.expiresAt = s + i;
|
3152
3178
|
}
|
3153
|
-
if (
|
3154
|
-
const s =
|
3179
|
+
if (Di(n) && (n.cutOff.expiresAt = void 0), n.cutOff) {
|
3180
|
+
const s = Lc(n.cutOff);
|
3155
3181
|
n.cutOff.expiresAt = s;
|
3156
3182
|
}
|
3157
3183
|
o.session.sessionInfo.value = n;
|
@@ -3162,7 +3188,7 @@ class Gc {
|
|
3162
3188
|
* @returns
|
3163
3189
|
*/
|
3164
3190
|
start(e) {
|
3165
|
-
o.session.sessionInfo.value =
|
3191
|
+
o.session.sessionInfo.value = Mc(e, this.logger);
|
3166
3192
|
}
|
3167
3193
|
/**
|
3168
3194
|
* An internal function to start manual session
|
@@ -3174,27 +3200,27 @@ class Gc {
|
|
3174
3200
|
* A public method to end an ongoing session.
|
3175
3201
|
*/
|
3176
3202
|
end() {
|
3177
|
-
o.session.sessionInfo.value =
|
3203
|
+
o.session.sessionInfo.value = A.sessionInfo;
|
3178
3204
|
}
|
3179
3205
|
/**
|
3180
3206
|
* Set auth token
|
3181
3207
|
* @param userId
|
3182
3208
|
*/
|
3183
3209
|
setAuthToken(e) {
|
3184
|
-
o.session.authToken.value = this.isPersistenceEnabledForStorageEntry("authToken") && e ? e :
|
3210
|
+
o.session.authToken.value = this.isPersistenceEnabledForStorageEntry("authToken") && e ? e : A.authToken;
|
3185
3211
|
}
|
3186
3212
|
}
|
3187
|
-
const
|
3213
|
+
const zc = ["BeaconQueue", "CustomConsentManager", "DeviceModeDestinations", "DeviceModeTransformation", "ExternalAnonymousId", "GoogleLinker", "IubendaConsentManager", "KetchConsentManager", "NativeDestinationQueue", "OneTrustConsentManager", "StorageEncryption", "StorageEncryptionLegacy", "StorageMigrator", "XhrQueue"], Kc = (t, e) => {
|
3188
3214
|
var a;
|
3189
|
-
const n =
|
3190
|
-
return
|
3191
|
-
}, ds = "dataplaneEventsQueue", fs = "destinationsEventsQueue",
|
3192
|
-
const i =
|
3215
|
+
const n = T(e);
|
3216
|
+
return L(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 = ge(n.integrations), Array.isArray(n.plugins) || (n.plugins = zc), 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), L(n.dataServiceEndpoint) || (n.dataServiceEndpoint = void 0), n.sendAdblockPageOptions = ge(n.sendAdblockPageOptions), n.loadIntegration = ue(n.loadIntegration, t.loadIntegration), Ie(n.storage) ? (n.storage.migrate = ue(n.storage.migrate, (a = t.storage) == null ? void 0 : a.migrate), n.storage.cookie = ge(n.storage.cookie), n.storage.encryption = ge(n.storage.encryption), n.storage = _t(n.storage)) : n.storage = void 0, n.destinationsQueueOptions = ge(n.destinationsQueueOptions), n.queueOptions = ge(n.queueOptions), n.lockIntegrationsVersion = ue(n.lockIntegrationsVersion, t.lockIntegrationsVersion), n.lockPluginsVersion = ue(n.lockPluginsVersion, t.lockPluginsVersion), Oi(n.dataPlaneEventsBufferTimeout) || (n.dataPlaneEventsBufferTimeout = void 0), n.beaconQueueOptions = ge(n.beaconQueueOptions), n.preConsent = ge(n.preConsent), n.sourceConfigurationOverride = ge(n.sourceConfigurationOverride), H(t, _t(n));
|
3217
|
+
}, ds = "dataplaneEventsQueue", fs = "destinationsEventsQueue", Yc = "transformEvent", Wc = (t, e) => Object.keys(t).filter((n) => t[n] !== !0 || !e[n]).reduce((n, s) => {
|
3218
|
+
const i = T(n);
|
3193
3219
|
return i[s] = t[s], i;
|
3194
|
-
}, {}),
|
3195
|
-
const n =
|
3196
|
-
return n.integrations =
|
3197
|
-
},
|
3220
|
+
}, {}), Qc = (t, e) => {
|
3221
|
+
const n = T(t), s = e.nativeDestinations.integrationsConfig.value, i = Wc(t.integrations, s);
|
3222
|
+
return n.integrations = H(s, i), n;
|
3223
|
+
}, Xc = (t) => {
|
3198
3224
|
var e;
|
3199
3225
|
return t.consents.preConsent.value.enabled && ((e = t.consents.preConsent.value.events) == null ? void 0 : e.delivery) === "buffer";
|
3200
3226
|
}, Ct = (t, e, n, s) => {
|
@@ -3203,12 +3229,12 @@ const jc = ["BeaconQueue", "CustomConsentManager", "DeviceModeDestinations", "De
|
|
3203
3229
|
try {
|
3204
3230
|
t(...e);
|
3205
3231
|
} catch (i) {
|
3206
|
-
s.error(
|
3232
|
+
s.error(_a(n), i);
|
3207
3233
|
}
|
3208
3234
|
else
|
3209
|
-
s.error(
|
3235
|
+
s.error(ti(n));
|
3210
3236
|
};
|
3211
|
-
class
|
3237
|
+
class Jc {
|
3212
3238
|
/**
|
3213
3239
|
*
|
3214
3240
|
* @param pluginsManager Plugins manager instance
|
@@ -3223,16 +3249,16 @@ class Qc {
|
|
3223
3249
|
* Initializes the event repository
|
3224
3250
|
*/
|
3225
3251
|
init() {
|
3226
|
-
this.dataplaneEventsQueue = this.pluginsManager.invokeSingle(`${ds}.init`, o, this.httpClient, this.storeManager, this.errorHandler, this.logger), this.dmtEventsQueue = this.pluginsManager.invokeSingle(`${
|
3252
|
+
this.dataplaneEventsQueue = this.pluginsManager.invokeSingle(`${ds}.init`, o, this.httpClient, this.storeManager, this.errorHandler, this.logger), this.dmtEventsQueue = this.pluginsManager.invokeSingle(`${Yc}.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), fe(() => {
|
3227
3253
|
var s, i;
|
3228
3254
|
o.nativeDestinations.clientDestinationsReady.value === !0 && ((s = this.destinationsEventsQueue) == null || s.start(), (i = this.dmtEventsQueue) == null || i.start());
|
3229
3255
|
});
|
3230
|
-
const e =
|
3256
|
+
const e = Xc(o);
|
3231
3257
|
let n;
|
3232
|
-
|
3258
|
+
fe(() => {
|
3233
3259
|
var r, a;
|
3234
3260
|
const s = o.loadOptions.value.bufferDataPlaneEventsUntilReady === !0 && o.nativeDestinations.clientDestinationsReady.value === !1;
|
3235
|
-
(o.nativeDestinations.activeDestinations.value.some((u) =>
|
3261
|
+
(o.nativeDestinations.activeDestinations.value.some((u) => Wl(u)) === !1 || s === !1) && !e && ((r = this.dataplaneEventsQueue) == null ? void 0 : r.scheduleTimeoutActive) !== !0 && (globalThis.clearTimeout(n), (a = this.dataplaneEventsQueue) == null || a.start());
|
3236
3262
|
}), o.loadOptions.value.bufferDataPlaneEventsUntilReady === !0 && (n = globalThis.setTimeout(() => {
|
3237
3263
|
var s, i;
|
3238
3264
|
((s = this.dataplaneEventsQueue) == null ? void 0 : s.scheduleTimeoutActive) !== !0 && ((i = this.dataplaneEventsQueue) == null || i.start());
|
@@ -3248,9 +3274,9 @@ class Qc {
|
|
3248
3274
|
* @param callback API callback function
|
3249
3275
|
*/
|
3250
3276
|
enqueue(e, n) {
|
3251
|
-
const s =
|
3277
|
+
const s = Qc(e, o);
|
3252
3278
|
this.pluginsManager.invokeSingle(`${ds}.enqueue`, o, this.dataplaneEventsQueue, s, this.errorHandler, this.logger);
|
3253
|
-
const i =
|
3279
|
+
const i = T(e);
|
3254
3280
|
this.pluginsManager.invokeSingle(`${fs}.enqueue`, o, this.destinationsEventsQueue, i, this.errorHandler, this.logger);
|
3255
3281
|
const r = `${e.type.charAt(0).toUpperCase()}${e.type.slice(1)}${bn}`;
|
3256
3282
|
Ct(n, [s], r, this.logger);
|
@@ -3259,30 +3285,30 @@ class Qc {
|
|
3259
3285
|
const hs = (t) => {
|
3260
3286
|
const e = new CustomEvent(t, { detail: { analyticsInstance: globalThis.rudderanalytics }, bubbles: !0, cancelable: !0, composed: !0 });
|
3261
3287
|
globalThis.document.dispatchEvent(e);
|
3262
|
-
},
|
3263
|
-
class
|
3288
|
+
}, Zc = (t) => L(t) && t.trim().length > 0, ed = (t) => Ke(t);
|
3289
|
+
class td {
|
3264
3290
|
/**
|
3265
3291
|
* Initialize services and components or use default ones if singletons
|
3266
3292
|
*/
|
3267
3293
|
constructor() {
|
3268
|
-
this.preloadBuffer = new
|
3294
|
+
this.preloadBuffer = new Vo(), this.initialized = !1, this.errorHandler = fi, this.logger = ye, this.externalSrcLoader = new zs(this.logger), this.httpClient = ci, this.httpClient.init(this.errorHandler), this.capabilitiesManager = new Oc(this.httpClient, this.errorHandler, this.logger);
|
3269
3295
|
}
|
3270
3296
|
/**
|
3271
3297
|
* Start application lifecycle if not already started
|
3272
3298
|
*/
|
3273
3299
|
load(e, n, s = {}) {
|
3274
3300
|
if (!o.lifecycle.status.value) {
|
3275
|
-
if (!
|
3276
|
-
this.logger.error(
|
3301
|
+
if (!Zc(e)) {
|
3302
|
+
this.logger.error(oa(jt, e));
|
3277
3303
|
return;
|
3278
3304
|
}
|
3279
|
-
if (!
|
3280
|
-
this.logger.error(
|
3305
|
+
if (!ed(n)) {
|
3306
|
+
this.logger.error(aa(jt, n));
|
3281
3307
|
return;
|
3282
3308
|
}
|
3283
3309
|
j(() => {
|
3284
|
-
o.lifecycle.writeKey.value =
|
3285
|
-
}), this.logger.setMinLogLevel(o.loadOptions.value.logLevel ??
|
3310
|
+
o.lifecycle.writeKey.value = T(e), o.lifecycle.dataPlaneUrl.value = T(n), o.loadOptions.value = Kc(o.loadOptions.value, s), o.lifecycle.status.value = "mounted";
|
3311
|
+
}), this.logger.setMinLogLevel(o.loadOptions.value.logLevel ?? Zs), ct("state", o, e), this.startLifecycle();
|
3286
3312
|
}
|
3287
3313
|
}
|
3288
3314
|
// Start lifecycle methods
|
@@ -3290,7 +3316,7 @@ class Zc {
|
|
3290
3316
|
* Orchestrate the lifecycle of the application phases/status
|
3291
3317
|
*/
|
3292
3318
|
startLifecycle() {
|
3293
|
-
|
3319
|
+
fe(() => {
|
3294
3320
|
try {
|
3295
3321
|
switch (o.lifecycle.status.value) {
|
3296
3322
|
case "mounted":
|
@@ -3332,7 +3358,7 @@ class Zc {
|
|
3332
3358
|
});
|
3333
3359
|
}
|
3334
3360
|
onBrowserCapabilitiesReady() {
|
3335
|
-
|
3361
|
+
_o(this), this.prepareInternalServices(), this.loadConfig();
|
3336
3362
|
}
|
3337
3363
|
onLoaded() {
|
3338
3364
|
this.processBufferedEvents(), o.consents.preConsent.value.enabled === !0 ? o.lifecycle.status.value = "ready" : this.loadDestinations();
|
@@ -3347,7 +3373,7 @@ class Zc {
|
|
3347
3373
|
* Enqueue in SDK preload buffer events, used from preloadBuffer component
|
3348
3374
|
*/
|
3349
3375
|
enqueuePreloadBufferEvents(e) {
|
3350
|
-
Array.isArray(e) && e.forEach((n) => this.preloadBuffer.enqueue(
|
3376
|
+
Array.isArray(e) && e.forEach((n) => this.preloadBuffer.enqueue(T(n)));
|
3351
3377
|
}
|
3352
3378
|
/**
|
3353
3379
|
* Process the buffer preloaded events by passing their arguments to the respective facade methods
|
@@ -3355,11 +3381,11 @@ class Zc {
|
|
3355
3381
|
processDataInPreloadBuffer() {
|
3356
3382
|
for (; this.preloadBuffer.size() > 0; ) {
|
3357
3383
|
const e = this.preloadBuffer.dequeue();
|
3358
|
-
e &&
|
3384
|
+
e && Po([...e], this);
|
3359
3385
|
}
|
3360
3386
|
}
|
3361
3387
|
prepareInternalServices() {
|
3362
|
-
this.pluginsManager = new
|
3388
|
+
this.pluginsManager = new iu(Kl, this.errorHandler, this.logger), this.storeManager = new Wu(this.pluginsManager, this.errorHandler, this.logger), this.configManager = new Ec(this.httpClient, this.errorHandler, this.logger), this.userSessionManager = new qc(this.pluginsManager, this.storeManager, this.httpClient, this.errorHandler, this.logger), this.eventRepository = new Jc(this.pluginsManager, this.storeManager, this.httpClient, this.errorHandler, this.logger), this.eventManager = new jc(this.eventRepository, this.userSessionManager, this.errorHandler, this.logger);
|
3363
3389
|
}
|
3364
3390
|
/**
|
3365
3391
|
* Load configuration
|
@@ -3388,7 +3414,7 @@ class Zc {
|
|
3388
3414
|
onInitialized() {
|
3389
3415
|
this.processDataInPreloadBuffer();
|
3390
3416
|
const e = o.loadOptions.value.onLoaded;
|
3391
|
-
Ct(e, [globalThis.rudderanalytics],
|
3417
|
+
Ct(e, [globalThis.rudderanalytics], Xr, this.logger), j(() => {
|
3392
3418
|
o.lifecycle.loaded.value = !0, o.lifecycle.status.value = "loaded";
|
3393
3419
|
}), this.initialized = !0, hs("RSA_Initialised");
|
3394
3420
|
}
|
@@ -3428,7 +3454,7 @@ class Zc {
|
|
3428
3454
|
o.lifecycle.status.value = "destinationsReady";
|
3429
3455
|
return;
|
3430
3456
|
}
|
3431
|
-
o.lifecycle.status.value = "destinationsLoading", (s = this.pluginsManager) == null || s.invokeSingle("nativeDestinations.load", o, this.externalSrcLoader, this.errorHandler, this.logger),
|
3457
|
+
o.lifecycle.status.value = "destinationsLoading", (s = this.pluginsManager) == null || s.invokeSingle("nativeDestinations.load", o, this.externalSrcLoader, this.errorHandler, this.logger), fe(() => {
|
3432
3458
|
(e === 0 || o.nativeDestinations.initializedDestinations.value.length + o.nativeDestinations.failedDestinations.value.length === e) && j(() => {
|
3433
3459
|
o.lifecycle.status.value = "destinationsReady", o.nativeDestinations.clientDestinationsReady.value = !0;
|
3434
3460
|
});
|
@@ -3450,7 +3476,7 @@ class Zc {
|
|
3450
3476
|
return;
|
3451
3477
|
}
|
3452
3478
|
if (this.errorHandler.leaveBreadcrumb(`New ${s} invocation`), !S(e)) {
|
3453
|
-
this.logger.error(
|
3479
|
+
this.logger.error(ti(Gt));
|
3454
3480
|
return;
|
3455
3481
|
}
|
3456
3482
|
o.lifecycle.status.value === "readyExecuted" ? Ct(e, [], Gt, this.logger) : o.eventBuffer.readyCallbacksArray.value = [...o.eventBuffer.readyCallbacksArray.value, e];
|
@@ -3462,10 +3488,10 @@ class Zc {
|
|
3462
3488
|
o.eventBuffer.toBeProcessedArray.value = [...o.eventBuffer.toBeProcessedArray.value, [s, e]];
|
3463
3489
|
return;
|
3464
3490
|
}
|
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,
|
3491
|
+
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, vo, {
|
3466
3492
|
// 'title' is intentionally omitted as it does not make sense
|
3467
3493
|
// in v3 implementation
|
3468
|
-
path:
|
3494
|
+
path: yo
|
3469
3495
|
}, o.loadOptions.value.sendAdblockPageOptions));
|
3470
3496
|
}
|
3471
3497
|
track(e, n = !1) {
|
@@ -3575,14 +3601,14 @@ class Zc {
|
|
3575
3601
|
return;
|
3576
3602
|
}
|
3577
3603
|
this.errorHandler.leaveBreadcrumb("New consent invocation"), j(() => {
|
3578
|
-
o.consents.preConsent.value = { ...o.consents.preConsent.value, enabled: !1 }, o.consents.postConsent.value =
|
3579
|
-
const { initialized: l, consentsData: c } =
|
3604
|
+
o.consents.preConsent.value = { ...o.consents.preConsent.value, enabled: !1 }, o.consents.postConsent.value = ac(e);
|
3605
|
+
const { initialized: l, consentsData: c } = Ri(o.consents.postConsent.value.consentManagement, this.logger);
|
3580
3606
|
o.consents.initialized.value = l, o.consents.data.value = c;
|
3581
3607
|
}), 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);
|
3582
3608
|
}
|
3583
3609
|
sendTrackingEvents(e) {
|
3584
3610
|
if (o.consents.postConsent.value.trackConsent) {
|
3585
|
-
const n = yn(
|
3611
|
+
const n = yn(bo);
|
3586
3612
|
e ? o.eventBuffer.toBeProcessedArray.value = [...o.eventBuffer.toBeProcessedArray.value, ["track", n]] : this.track(n);
|
3587
3613
|
}
|
3588
3614
|
if (o.consents.postConsent.value.sendPageEvent) {
|
@@ -3606,13 +3632,13 @@ const _e = class _e {
|
|
3606
3632
|
try {
|
3607
3633
|
if (_e.globalSingleton)
|
3608
3634
|
return _e.globalSingleton;
|
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 =
|
3635
|
+
_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 = Ut(), o.autoTrack.pageLifecycle.pageLoadedTimestamp.value = Date.now(), this.triggerBufferedLoadEvent(), globalThis.rudderanalytics = this;
|
3610
3636
|
} catch (e) {
|
3611
3637
|
B(e);
|
3612
3638
|
}
|
3613
3639
|
}
|
3614
3640
|
static initializeGlobalResources() {
|
3615
|
-
|
3641
|
+
fi.init(), On.configure(), Tn.configure(), An.configure(), wt.configure();
|
3616
3642
|
}
|
3617
3643
|
/**
|
3618
3644
|
* Set instance to use if no specific writeKey is provided in methods
|
@@ -3620,7 +3646,7 @@ const _e = class _e {
|
|
3620
3646
|
* TODO: to support multiple analytics instances in the near future
|
3621
3647
|
*/
|
3622
3648
|
setDefaultInstanceKey(e) {
|
3623
|
-
|
3649
|
+
L(e) && e && (this.defaultAnalyticsKey = e);
|
3624
3650
|
}
|
3625
3651
|
/**
|
3626
3652
|
* Retrieve an existing analytics instance
|
@@ -3628,7 +3654,7 @@ const _e = class _e {
|
|
3628
3654
|
getAnalyticsInstance(e) {
|
3629
3655
|
try {
|
3630
3656
|
let n = e;
|
3631
|
-
return (!
|
3657
|
+
return (!L(n) || !n) && (n = this.defaultAnalyticsKey), !!this.analyticsInstances[n] || (this.analyticsInstances[n] = new td()), this.analyticsInstances[n];
|
3632
3658
|
} catch (n) {
|
3633
3659
|
B(n);
|
3634
3660
|
return;
|
@@ -3647,8 +3673,8 @@ const _e = class _e {
|
|
3647
3673
|
if (this.analyticsInstances[e])
|
3648
3674
|
return;
|
3649
3675
|
this.setDefaultInstanceKey(e), this.trackPageLifecycleEvents(s);
|
3650
|
-
const r =
|
3651
|
-
|
3676
|
+
const r = qs(ot);
|
3677
|
+
Co(r), ct(ot, T(r)), (i = this.getAnalyticsInstance(e)) == null || i.load(e, n, O(s));
|
3652
3678
|
} catch (r) {
|
3653
3679
|
B(r);
|
3654
3680
|
}
|
@@ -3669,20 +3695,20 @@ const _e = class _e {
|
|
3669
3695
|
* @param options
|
3670
3696
|
*/
|
3671
3697
|
setupPageUnloadTracking(e, n, s) {
|
3672
|
-
(e.length === 0 || e.includes(Ht.UNLOADED)) && (n === !0 ?
|
3698
|
+
(e.length === 0 || e.includes(Ht.UNLOADED)) && (n === !0 ? io((i) => {
|
3673
3699
|
if (i === !1 && o.lifecycle.loaded.value) {
|
3674
3700
|
const r = Date.now(), a = r - o.autoTrack.pageLifecycle.pageLoadedTimestamp.value;
|
3675
|
-
this.track(Ht.UNLOADED, { timeOnPage: a }, { ...s, originalTimestamp:
|
3701
|
+
this.track(Ht.UNLOADED, { timeOnPage: a }, { ...s, originalTimestamp: Fs(new Date(r)) });
|
3676
3702
|
}
|
3677
|
-
}) : this.logger.warn(
|
3703
|
+
}) : this.logger.warn(Ba(Zr)));
|
3678
3704
|
}
|
3679
3705
|
/**
|
3680
3706
|
* Trigger load event in buffer queue if exists and stores the
|
3681
3707
|
* remaining preloaded events array in global object
|
3682
3708
|
*/
|
3683
3709
|
triggerBufferedLoadEvent() {
|
3684
|
-
const e = Array.isArray(globalThis.rudderanalytics) ? globalThis.rudderanalytics : [], n =
|
3685
|
-
|
3710
|
+
const e = Array.isArray(globalThis.rudderanalytics) ? globalThis.rudderanalytics : [], n = Do(e);
|
3711
|
+
ct(ot, T([...e])), n.length > 0 && (n.shift(), this.load.apply(null, n));
|
3686
3712
|
}
|
3687
3713
|
/**
|
3688
3714
|
* Get ready callback arguments and forward to ready call
|
@@ -3690,7 +3716,7 @@ const _e = class _e {
|
|
3690
3716
|
ready(e) {
|
3691
3717
|
var n;
|
3692
3718
|
try {
|
3693
|
-
(n = this.getAnalyticsInstance()) == null || n.ready(
|
3719
|
+
(n = this.getAnalyticsInstance()) == null || n.ready(O(e));
|
3694
3720
|
} catch (s) {
|
3695
3721
|
B(s);
|
3696
3722
|
}
|
@@ -3702,7 +3728,7 @@ const _e = class _e {
|
|
3702
3728
|
page(e, n, s, i, r) {
|
3703
3729
|
var a;
|
3704
3730
|
try {
|
3705
|
-
(a = this.getAnalyticsInstance()) == null || a.page(Nt(
|
3731
|
+
(a = this.getAnalyticsInstance()) == null || a.page(Nt(O(e), O(n), O(s), O(i), O(r)));
|
3706
3732
|
} catch (u) {
|
3707
3733
|
B(u);
|
3708
3734
|
}
|
@@ -3714,7 +3740,7 @@ const _e = class _e {
|
|
3714
3740
|
track(e, n, s, i) {
|
3715
3741
|
var r;
|
3716
3742
|
try {
|
3717
|
-
(r = this.getAnalyticsInstance()) == null || r.track(yn(
|
3743
|
+
(r = this.getAnalyticsInstance()) == null || r.track(yn(O(e), O(n), O(s), O(i)));
|
3718
3744
|
} catch (a) {
|
3719
3745
|
B(a);
|
3720
3746
|
}
|
@@ -3726,7 +3752,7 @@ const _e = class _e {
|
|
3726
3752
|
identify(e, n, s, i) {
|
3727
3753
|
var r;
|
3728
3754
|
try {
|
3729
|
-
(r = this.getAnalyticsInstance()) == null || r.identify(
|
3755
|
+
(r = this.getAnalyticsInstance()) == null || r.identify($s(O(e), O(n), O(s), O(i)));
|
3730
3756
|
} catch (a) {
|
3731
3757
|
B(a);
|
3732
3758
|
}
|
@@ -3738,7 +3764,7 @@ const _e = class _e {
|
|
3738
3764
|
alias(e, n, s, i) {
|
3739
3765
|
var r;
|
3740
3766
|
try {
|
3741
|
-
(r = this.getAnalyticsInstance()) == null || r.alias(
|
3767
|
+
(r = this.getAnalyticsInstance()) == null || r.alias(Us(O(e), O(n), O(s), O(i)));
|
3742
3768
|
} catch (a) {
|
3743
3769
|
B(a);
|
3744
3770
|
}
|
@@ -3750,7 +3776,7 @@ const _e = class _e {
|
|
3750
3776
|
group(e, n, s, i) {
|
3751
3777
|
var r;
|
3752
3778
|
try {
|
3753
|
-
(r = this.getAnalyticsInstance()) == null || r.group(
|
3779
|
+
(r = this.getAnalyticsInstance()) == null || r.group(Bs(O(e), O(n), O(s), O(i)));
|
3754
3780
|
} catch (a) {
|
3755
3781
|
B(a);
|
3756
3782
|
}
|
@@ -3758,7 +3784,7 @@ const _e = class _e {
|
|
3758
3784
|
reset(e) {
|
3759
3785
|
var n;
|
3760
3786
|
try {
|
3761
|
-
(n = this.getAnalyticsInstance()) == null || n.reset(
|
3787
|
+
(n = this.getAnalyticsInstance()) == null || n.reset(O(e));
|
3762
3788
|
} catch (s) {
|
3763
3789
|
B(s);
|
3764
3790
|
}
|
@@ -3766,7 +3792,7 @@ const _e = class _e {
|
|
3766
3792
|
getAnonymousId(e) {
|
3767
3793
|
var n;
|
3768
3794
|
try {
|
3769
|
-
return (n = this.getAnalyticsInstance()) == null ? void 0 : n.getAnonymousId(
|
3795
|
+
return (n = this.getAnalyticsInstance()) == null ? void 0 : n.getAnonymousId(O(e));
|
3770
3796
|
} catch (s) {
|
3771
3797
|
B(s);
|
3772
3798
|
return;
|
@@ -3775,7 +3801,7 @@ const _e = class _e {
|
|
3775
3801
|
setAnonymousId(e, n) {
|
3776
3802
|
var s;
|
3777
3803
|
try {
|
3778
|
-
(s = this.getAnalyticsInstance()) == null || s.setAnonymousId(
|
3804
|
+
(s = this.getAnalyticsInstance()) == null || s.setAnonymousId(O(e), O(n));
|
3779
3805
|
} catch (i) {
|
3780
3806
|
B(i);
|
3781
3807
|
}
|
@@ -3819,7 +3845,7 @@ const _e = class _e {
|
|
3819
3845
|
startSession(e) {
|
3820
3846
|
var n;
|
3821
3847
|
try {
|
3822
|
-
(n = this.getAnalyticsInstance()) == null || n.startSession(
|
3848
|
+
(n = this.getAnalyticsInstance()) == null || n.startSession(O(e));
|
3823
3849
|
} catch (s) {
|
3824
3850
|
B(s);
|
3825
3851
|
}
|
@@ -3844,7 +3870,7 @@ const _e = class _e {
|
|
3844
3870
|
setAuthToken(e) {
|
3845
3871
|
var n;
|
3846
3872
|
try {
|
3847
|
-
(n = this.getAnalyticsInstance()) == null || n.setAuthToken(
|
3873
|
+
(n = this.getAnalyticsInstance()) == null || n.setAuthToken(O(e));
|
3848
3874
|
} catch (s) {
|
3849
3875
|
B(s);
|
3850
3876
|
}
|
@@ -3852,7 +3878,7 @@ const _e = class _e {
|
|
3852
3878
|
consent(e) {
|
3853
3879
|
var n;
|
3854
3880
|
try {
|
3855
|
-
(n = this.getAnalyticsInstance()) == null || n.consent(
|
3881
|
+
(n = this.getAnalyticsInstance()) == null || n.consent(O(e));
|
3856
3882
|
} catch (s) {
|
3857
3883
|
B(s);
|
3858
3884
|
}
|
@@ -3862,19 +3888,19 @@ const _e = class _e {
|
|
3862
3888
|
// eslint-disable-next-line sonarjs/public-static-readonly
|
3863
3889
|
N(_e, "globalSingleton", null);
|
3864
3890
|
let fn = _e;
|
3865
|
-
const
|
3866
|
-
[
|
3867
|
-
[
|
3868
|
-
[
|
3869
|
-
[
|
3870
|
-
[
|
3871
|
-
},
|
3891
|
+
const nd = {
|
3892
|
+
[Ze.Production]: "2R6mT9xSJCcbvr6JkiEu7vbrUSW",
|
3893
|
+
[Ze.Sandbox]: "2R6mEpjiTJBErRIn724pt2MWyLA",
|
3894
|
+
[Ze.Staging]: "2R6llJi7YSuOeJToPXGlQfizt18",
|
3895
|
+
[Ze.CiCd]: "2QHmFAx84bL4Up6CDHRw0XkKJKC",
|
3896
|
+
[Ze.Local]: "2QHmFAx84bL4Up6CDHRw0XkKJKC"
|
3897
|
+
}, sd = "https://revolugohxxwg.dataplane.rudderstack.com", id = window.RevolugoElements.config.apiEnvironment, rd = nd[id], Ci = new fn();
|
3872
3898
|
try {
|
3873
|
-
|
3899
|
+
Ci.load(rd, sd);
|
3874
3900
|
} catch (t) {
|
3875
3901
|
console.error(t);
|
3876
3902
|
}
|
3877
|
-
const
|
3903
|
+
const _i = {
|
3878
3904
|
adultCount: {
|
3879
3905
|
type: Number
|
3880
3906
|
},
|
@@ -3890,10 +3916,10 @@ const Di = {
|
|
3890
3916
|
startDate: {
|
3891
3917
|
type: String
|
3892
3918
|
}
|
3893
|
-
},
|
3919
|
+
}, Pi = hn({
|
3894
3920
|
components: {
|
3895
|
-
BPhoneInput:
|
3896
|
-
BSearchLocationInput:
|
3921
|
+
BPhoneInput: dr,
|
3922
|
+
BSearchLocationInput: ar
|
3897
3923
|
},
|
3898
3924
|
data() {
|
3899
3925
|
return {
|
@@ -3941,7 +3967,7 @@ const Di = {
|
|
3941
3967
|
var e, n;
|
3942
3968
|
this.isSubmitting = !0;
|
3943
3969
|
let t = ((e = this.config.eventMetadata) == null ? void 0 : e.name) || "";
|
3944
|
-
(n = this.config.eventMetadata) != null && n.slug && (t += ` ${this.config.eventMetadata.slug}`),
|
3970
|
+
(n = this.config.eventMetadata) != null && n.slug && (t += ` ${this.config.eventMetadata.slug}`), Ci.track(
|
3945
3971
|
"accommodation-request",
|
3946
3972
|
{
|
3947
3973
|
data: {
|
@@ -3958,7 +3984,7 @@ const Di = {
|
|
3958
3984
|
}
|
3959
3985
|
},
|
3960
3986
|
name: "ContactForm",
|
3961
|
-
props:
|
3987
|
+
props: _i,
|
3962
3988
|
setup() {
|
3963
3989
|
const { t } = gn();
|
3964
3990
|
return {
|
@@ -4135,7 +4161,7 @@ function gs(t) {
|
|
4135
4161
|
}
|
4136
4162
|
});
|
4137
4163
|
}
|
4138
|
-
const
|
4164
|
+
const Ni = Te({
|
4139
4165
|
active: {
|
4140
4166
|
type: [String, Array],
|
4141
4167
|
default: void 0
|
@@ -4163,7 +4189,7 @@ const _i = Ie({
|
|
4163
4189
|
}
|
4164
4190
|
}, "VDatePickerControls"), ms = Me()({
|
4165
4191
|
name: "VDatePickerControls",
|
4166
|
-
props:
|
4192
|
+
props: Ni(),
|
4167
4193
|
emits: {
|
4168
4194
|
"click:year": () => !0,
|
4169
4195
|
"click:month": () => !0,
|
@@ -4175,7 +4201,7 @@ const _i = Ie({
|
|
4175
4201
|
let {
|
4176
4202
|
emit: n
|
4177
4203
|
} = e;
|
4178
|
-
const s =
|
4204
|
+
const s = U(() => Array.isArray(t.disabled) ? t.disabled.includes("text") : !!t.disabled), i = U(() => Array.isArray(t.disabled) ? t.disabled.includes("mode") : !!t.disabled), r = U(() => Array.isArray(t.disabled) ? t.disabled.includes("prev") : !!t.disabled), a = U(() => Array.isArray(t.disabled) ? t.disabled.includes("next") : !!t.disabled);
|
4179
4205
|
function u() {
|
4180
4206
|
n("click:prev");
|
4181
4207
|
}
|
@@ -4206,7 +4232,7 @@ const _i = Ie({
|
|
4206
4232
|
icon: t.modeIcon,
|
4207
4233
|
variant: "text",
|
4208
4234
|
onClick: c
|
4209
|
-
}, null), b(
|
4235
|
+
}, null), b(gr, null, null), b("div", {
|
4210
4236
|
class: "v-date-picker-controls__month"
|
4211
4237
|
}, [b(ae, {
|
4212
4238
|
"data-testid": "prev-month",
|
@@ -4222,15 +4248,15 @@ const _i = Ie({
|
|
4222
4248
|
onClick: l
|
4223
4249
|
}, null)])])), {};
|
4224
4250
|
}
|
4225
|
-
}),
|
4251
|
+
}), od = Te({
|
4226
4252
|
appendIcon: vt,
|
4227
4253
|
color: String,
|
4228
4254
|
header: String,
|
4229
4255
|
transition: String,
|
4230
|
-
onClick:
|
4256
|
+
onClick: Hi()
|
4231
4257
|
}, "VDatePickerHeader"), ps = Me()({
|
4232
4258
|
name: "VDatePickerHeader",
|
4233
|
-
props:
|
4259
|
+
props: od(),
|
4234
4260
|
emits: {
|
4235
4261
|
click: () => !0,
|
4236
4262
|
"click:append": () => !0
|
@@ -4274,7 +4300,7 @@ const _i = Ie({
|
|
4274
4300
|
}
|
4275
4301
|
}), c && b("div", {
|
4276
4302
|
class: "v-date-picker-header__append"
|
4277
|
-
}, [s.append ? b(
|
4303
|
+
}, [s.append ? b($t, {
|
4278
4304
|
key: "append-defaults",
|
4279
4305
|
disabled: !t.appendIcon,
|
4280
4306
|
defaults: {
|
@@ -4296,7 +4322,7 @@ const _i = Ie({
|
|
4296
4322
|
}, null)])]);
|
4297
4323
|
}), {};
|
4298
4324
|
}
|
4299
|
-
}),
|
4325
|
+
}), ad = Te({
|
4300
4326
|
allowedDates: [Array, Function],
|
4301
4327
|
disabled: {
|
4302
4328
|
type: Boolean,
|
@@ -4319,17 +4345,17 @@ const _i = Ie({
|
|
4319
4345
|
},
|
4320
4346
|
firstDayOfWeek: [Number, String]
|
4321
4347
|
}, "calendar");
|
4322
|
-
function
|
4323
|
-
const e =
|
4348
|
+
function ld(t) {
|
4349
|
+
const e = ft(), n = Le(t, "modelValue", [], (f) => yt(f)), s = U(() => 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) => {
|
4324
4350
|
const m = f != null ? Number(f) : e.getYear(s.value);
|
4325
4351
|
return e.startOfYear(e.setYear(e.date(), m));
|
4326
4352
|
}, (f) => e.getYear(f)), r = Le(t, "month", void 0, (f) => {
|
4327
4353
|
const m = f != null ? Number(f) : e.getMonth(s.value), v = e.setYear(e.startOfMonth(e.date()), e.getYear(i.value));
|
4328
4354
|
return e.setMonth(v, m);
|
4329
|
-
}, (f) => e.getMonth(f)), a =
|
4355
|
+
}, (f) => e.getMonth(f)), a = U(() => t.firstDayOfWeek ?? t.weekdays[0]), u = U(() => {
|
4330
4356
|
const f = Number(t.firstDayOfWeek ?? 0);
|
4331
4357
|
return t.weekdays.map((m) => (m + f) % 7);
|
4332
|
-
}), l =
|
4358
|
+
}), l = U(() => {
|
4333
4359
|
const f = e.getWeekArray(r.value, a.value), m = f.flat(), v = 6 * 7;
|
4334
4360
|
if (t.weeksInMonth === "static" && m.length < v) {
|
4335
4361
|
const k = m[m.length - 1];
|
@@ -4341,7 +4367,7 @@ function od(t) {
|
|
4341
4367
|
});
|
4342
4368
|
function c(f, m) {
|
4343
4369
|
return f.filter((v) => u.value.includes(e.toJsDate(v).getDay())).map((v, k) => {
|
4344
|
-
const E = e.toISO(v), P = !e.isSameMonth(v, r.value), z = e.isSameDay(v, e.startOfMonth(r.value)),
|
4370
|
+
const E = e.toISO(v), P = !e.isSameMonth(v, r.value), z = e.isSameDay(v, e.startOfMonth(r.value)), G = e.isSameDay(v, e.endOfMonth(r.value)), J = e.isSameDay(v, r.value);
|
4345
4371
|
return {
|
4346
4372
|
date: v,
|
4347
4373
|
isoDate: E,
|
@@ -4355,23 +4381,23 @@ function od(t) {
|
|
4355
4381
|
isAdjacent: P,
|
4356
4382
|
isHidden: P && !t.showAdjacentMonths,
|
4357
4383
|
isStart: z,
|
4358
|
-
isSelected: n.value.some((
|
4359
|
-
isEnd:
|
4384
|
+
isSelected: n.value.some((he) => e.isSameDay(v, he)),
|
4385
|
+
isEnd: G,
|
4360
4386
|
isSame: J,
|
4361
4387
|
localized: e.format(v, "dayOfMonth")
|
4362
4388
|
};
|
4363
4389
|
});
|
4364
4390
|
}
|
4365
|
-
const d =
|
4391
|
+
const d = U(() => {
|
4366
4392
|
const f = e.startOfWeek(s.value, t.firstDayOfWeek), m = [];
|
4367
4393
|
for (let k = 0; k <= 6; k++)
|
4368
4394
|
m.push(e.addDays(f, k));
|
4369
4395
|
const v = e.date();
|
4370
4396
|
return c(m, v);
|
4371
|
-
}), h =
|
4397
|
+
}), h = U(() => {
|
4372
4398
|
const f = l.value.flat(), m = e.date();
|
4373
4399
|
return c(f, m);
|
4374
|
-
}), y =
|
4400
|
+
}), y = U(() => l.value.map((f) => f.length ? Gi(e, f[0]) : null));
|
4375
4401
|
function g(f) {
|
4376
4402
|
if (t.disabled) return !0;
|
4377
4403
|
const m = e.date(f);
|
@@ -4388,7 +4414,7 @@ function od(t) {
|
|
4388
4414
|
weekNumbers: y
|
4389
4415
|
};
|
4390
4416
|
}
|
4391
|
-
const
|
4417
|
+
const Li = Te({
|
4392
4418
|
color: String,
|
4393
4419
|
hideWeekdays: Boolean,
|
4394
4420
|
multiple: [Boolean, Number, String],
|
@@ -4401,10 +4427,10 @@ const Pi = Ie({
|
|
4401
4427
|
type: String,
|
4402
4428
|
default: "picker-reverse-transition"
|
4403
4429
|
},
|
4404
|
-
...
|
4430
|
+
...lt(ad(), ["displayValue"])
|
4405
4431
|
}, "VDatePickerMonth"), vs = Me()({
|
4406
4432
|
name: "VDatePickerMonth",
|
4407
|
-
props:
|
4433
|
+
props: Li(),
|
4408
4434
|
emits: {
|
4409
4435
|
"update:modelValue": (t) => !0,
|
4410
4436
|
"update:month": (t) => !0,
|
@@ -4419,13 +4445,13 @@ const Pi = Ie({
|
|
4419
4445
|
daysInMonth: r,
|
4420
4446
|
model: a,
|
4421
4447
|
weekNumbers: u
|
4422
|
-
} =
|
4448
|
+
} = ld(t), l = ft(), c = bt(), d = bt(), h = bt(!1), y = U(() => h.value ? t.reverseTransition : t.transition);
|
4423
4449
|
t.multiple === "range" && a.value.length > 0 && (c.value = a.value[0], a.value.length > 1 && (d.value = a.value[a.value.length - 1]));
|
4424
|
-
const g =
|
4450
|
+
const g = U(() => {
|
4425
4451
|
const k = ["number", "string"].includes(typeof t.multiple) ? Number(t.multiple) : 1 / 0;
|
4426
4452
|
return a.value.length >= k;
|
4427
4453
|
});
|
4428
|
-
|
4454
|
+
Is(r, (k, E) => {
|
4429
4455
|
E && (h.value = l.isBefore(k[0].date, E[0].date));
|
4430
4456
|
});
|
4431
4457
|
function f(k) {
|
@@ -4440,8 +4466,8 @@ const Pi = Ie({
|
|
4440
4466
|
return;
|
4441
4467
|
} else l.isBefore(E, c.value) ? (d.value = l.endOfDay(c.value), c.value = E) : d.value = l.endOfDay(E);
|
4442
4468
|
const P = l.getDiff(d.value, c.value, "days"), z = [c.value];
|
4443
|
-
for (let
|
4444
|
-
const J = l.addDays(c.value,
|
4469
|
+
for (let G = 1; G < P; G++) {
|
4470
|
+
const J = l.addDays(c.value, G);
|
4445
4471
|
z.push(J);
|
4446
4472
|
}
|
4447
4473
|
z.push(d.value), a.value = z;
|
@@ -4497,7 +4523,7 @@ const Pi = Ie({
|
|
4497
4523
|
"v-date-picker-month__day--week-start": E.isWeekStart
|
4498
4524
|
}],
|
4499
4525
|
"data-v-date": E.isDisabled ? void 0 : E.isoDate
|
4500
|
-
}, [(t.showAdjacentMonths || !E.isAdjacent) && b(
|
4526
|
+
}, [(t.showAdjacentMonths || !E.isAdjacent) && b($t, {
|
4501
4527
|
defaults: {
|
4502
4528
|
VBtn: {
|
4503
4529
|
class: "v-date-picker-month__day-btn",
|
@@ -4512,15 +4538,15 @@ const Pi = Ie({
|
|
4512
4538
|
}
|
4513
4539
|
}, {
|
4514
4540
|
default: () => {
|
4515
|
-
var
|
4516
|
-
return [((
|
4541
|
+
var G;
|
4542
|
+
return [((G = s.day) == null ? void 0 : G.call(s, z)) ?? b(ae, z.props, null)];
|
4517
4543
|
}
|
4518
4544
|
})]);
|
4519
4545
|
})])];
|
4520
4546
|
}
|
4521
4547
|
})]);
|
4522
4548
|
}
|
4523
|
-
}),
|
4549
|
+
}), wi = Te({
|
4524
4550
|
color: String,
|
4525
4551
|
height: [String, Number],
|
4526
4552
|
min: null,
|
@@ -4529,7 +4555,7 @@ const Pi = Ie({
|
|
4529
4555
|
year: Number
|
4530
4556
|
}, "VDatePickerMonths"), ys = Me()({
|
4531
4557
|
name: "VDatePickerMonths",
|
4532
|
-
props:
|
4558
|
+
props: wi(),
|
4533
4559
|
emits: {
|
4534
4560
|
"update:modelValue": (t) => !0
|
4535
4561
|
},
|
@@ -4538,9 +4564,9 @@ const Pi = Ie({
|
|
4538
4564
|
emit: n,
|
4539
4565
|
slots: s
|
4540
4566
|
} = e;
|
4541
|
-
const i =
|
4567
|
+
const i = ft(), r = Le(t, "modelValue"), a = U(() => {
|
4542
4568
|
let u = i.startOfYear(i.date());
|
4543
|
-
return t.year && (u = i.setYear(u, t.year)),
|
4569
|
+
return t.year && (u = i.setYear(u, t.year)), Ts(12).map((l) => {
|
4544
4570
|
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))));
|
4545
4571
|
return u = i.getNextMonth(u), {
|
4546
4572
|
isDisabled: d,
|
@@ -4549,12 +4575,12 @@ const Pi = Ie({
|
|
4549
4575
|
};
|
4550
4576
|
});
|
4551
4577
|
});
|
4552
|
-
return
|
4578
|
+
return As(() => {
|
4553
4579
|
r.value = r.value ?? i.getMonth(i.date());
|
4554
4580
|
}), Ye(() => b("div", {
|
4555
4581
|
class: "v-date-picker-months",
|
4556
4582
|
style: {
|
4557
|
-
height:
|
4583
|
+
height: Os(t.height)
|
4558
4584
|
}
|
4559
4585
|
}, [b("div", {
|
4560
4586
|
class: "v-date-picker-months__content"
|
@@ -4585,7 +4611,7 @@ const Pi = Ie({
|
|
4585
4611
|
}, c), null);
|
4586
4612
|
})])])), {};
|
4587
4613
|
}
|
4588
|
-
}),
|
4614
|
+
}), Mi = Te({
|
4589
4615
|
color: String,
|
4590
4616
|
height: [String, Number],
|
4591
4617
|
min: null,
|
@@ -4593,7 +4619,7 @@ const Pi = Ie({
|
|
4593
4619
|
modelValue: Number
|
4594
4620
|
}, "VDatePickerYears"), bs = Me()({
|
4595
4621
|
name: "VDatePickerYears",
|
4596
|
-
props:
|
4622
|
+
props: Mi(),
|
4597
4623
|
emits: {
|
4598
4624
|
"update:modelValue": (t) => !0
|
4599
4625
|
},
|
@@ -4602,12 +4628,12 @@ const Pi = Ie({
|
|
4602
4628
|
emit: n,
|
4603
4629
|
slots: s
|
4604
4630
|
} = e;
|
4605
|
-
const i =
|
4631
|
+
const i = ft(), r = Le(t, "modelValue"), a = U(() => {
|
4606
4632
|
const l = i.getYear(i.date());
|
4607
4633
|
let c = l - 100, d = l + 52;
|
4608
4634
|
t.min && (c = i.getYear(i.date(t.min))), t.max && (d = i.getYear(i.date(t.max)));
|
4609
4635
|
let h = i.startOfYear(i.date());
|
4610
|
-
return h = i.setYear(h, c),
|
4636
|
+
return h = i.setYear(h, c), Ts(d - c + 1, c).map((y) => {
|
4611
4637
|
const g = i.format(h, "year");
|
4612
4638
|
return h = i.setYear(h, i.getYear(h) + 1), {
|
4613
4639
|
text: g,
|
@@ -4615,19 +4641,19 @@ const Pi = Ie({
|
|
4615
4641
|
};
|
4616
4642
|
});
|
4617
4643
|
});
|
4618
|
-
|
4644
|
+
As(() => {
|
4619
4645
|
r.value = r.value ?? i.getYear(i.date());
|
4620
4646
|
});
|
4621
|
-
const u =
|
4622
|
-
return
|
4647
|
+
const u = ji();
|
4648
|
+
return qi(async () => {
|
4623
4649
|
var l;
|
4624
|
-
await
|
4650
|
+
await zi(), (l = u.el) == null || l.scrollIntoView({
|
4625
4651
|
block: "center"
|
4626
4652
|
});
|
4627
4653
|
}), Ye(() => b("div", {
|
4628
4654
|
class: "v-date-picker-years",
|
4629
4655
|
style: {
|
4630
|
-
height:
|
4656
|
+
height: Os(t.height)
|
4631
4657
|
}
|
4632
4658
|
}, [b("div", {
|
4633
4659
|
class: "v-date-picker-years__content"
|
@@ -4657,15 +4683,15 @@ const Pi = Ie({
|
|
4657
4683
|
}, d), null);
|
4658
4684
|
})])])), {};
|
4659
4685
|
}
|
4660
|
-
}),
|
4686
|
+
}), ud = pr("v-picker-title"), $i = Te({
|
4661
4687
|
bgColor: String,
|
4662
4688
|
landscape: Boolean,
|
4663
4689
|
title: String,
|
4664
4690
|
hideHeader: Boolean,
|
4665
|
-
...
|
4691
|
+
...yr()
|
4666
4692
|
}, "VPicker"), Es = Me()({
|
4667
4693
|
name: "VPicker",
|
4668
|
-
props:
|
4694
|
+
props: $i(),
|
4669
4695
|
setup(t, e) {
|
4670
4696
|
let {
|
4671
4697
|
slots: n
|
@@ -4673,7 +4699,7 @@ const Pi = Ie({
|
|
4673
4699
|
const {
|
4674
4700
|
backgroundColorClasses: s,
|
4675
4701
|
backgroundColorStyles: i
|
4676
|
-
} = Ps(
|
4702
|
+
} = Ps(Ki(t, "color"));
|
4677
4703
|
return Ye(() => {
|
4678
4704
|
const r = Cn.filterProps(t), a = !!(t.title || n.title);
|
4679
4705
|
return b(Cn, re(r, {
|
@@ -4690,7 +4716,7 @@ const Pi = Ie({
|
|
4690
4716
|
key: "header",
|
4691
4717
|
class: [s.value],
|
4692
4718
|
style: [i.value]
|
4693
|
-
}, [a && b(
|
4719
|
+
}, [a && b(ud, {
|
4694
4720
|
key: "picker-title"
|
4695
4721
|
}, {
|
4696
4722
|
default: () => {
|
@@ -4701,7 +4727,7 @@ const Pi = Ie({
|
|
4701
4727
|
class: "v-picker__header"
|
4702
4728
|
}, [n.header()])]), b("div", {
|
4703
4729
|
class: "v-picker__body"
|
4704
|
-
}, [(u = n.default) == null ? void 0 : u.call(n)]), n.actions && b(
|
4730
|
+
}, [(u = n.default) == null ? void 0 : u.call(n)]), n.actions && b($t, {
|
4705
4731
|
defaults: {
|
4706
4732
|
VBtn: {
|
4707
4733
|
slim: !0,
|
@@ -4717,7 +4743,7 @@ const Pi = Ie({
|
|
4717
4743
|
});
|
4718
4744
|
}), {};
|
4719
4745
|
}
|
4720
|
-
}),
|
4746
|
+
}), cd = Te({
|
4721
4747
|
// TODO: implement in v3.5
|
4722
4748
|
// calendarIcon: {
|
4723
4749
|
// type: String,
|
@@ -4743,19 +4769,19 @@ const Pi = Ie({
|
|
4743
4769
|
type: String,
|
4744
4770
|
default: "$vuetify.datePicker.header"
|
4745
4771
|
},
|
4746
|
-
...
|
4747
|
-
...
|
4772
|
+
...Ni(),
|
4773
|
+
...Li({
|
4748
4774
|
weeksInMonth: "static"
|
4749
4775
|
}),
|
4750
|
-
...
|
4751
|
-
...
|
4752
|
-
|
4776
|
+
...lt(wi(), ["modelValue"]),
|
4777
|
+
...lt(Mi(), ["modelValue"]),
|
4778
|
+
...$i({
|
4753
4779
|
title: "$vuetify.datePicker.title"
|
4754
4780
|
}),
|
4755
4781
|
modelValue: null
|
4756
4782
|
}, "VDatePicker"), Ss = Me()({
|
4757
4783
|
name: "VDatePicker",
|
4758
|
-
props:
|
4784
|
+
props: cd(),
|
4759
4785
|
emits: {
|
4760
4786
|
"update:modelValue": (t) => !0,
|
4761
4787
|
"update:month": (t) => !0,
|
@@ -4768,72 +4794,72 @@ const Pi = Ie({
|
|
4768
4794
|
emit: n,
|
4769
4795
|
slots: s
|
4770
4796
|
} = e;
|
4771
|
-
const i =
|
4797
|
+
const i = ft(), {
|
4772
4798
|
t: r
|
4773
|
-
} =
|
4774
|
-
const
|
4775
|
-
return t.min && i.isValid(
|
4776
|
-
}), c =
|
4777
|
-
const
|
4778
|
-
return t.max && i.isValid(
|
4779
|
-
}), d =
|
4799
|
+
} = Yi(), a = Le(t, "modelValue", void 0, (I) => yt(I), (I) => t.multiple ? I : I[0]), u = Le(t, "viewMode"), l = U(() => {
|
4800
|
+
const I = i.date(t.min);
|
4801
|
+
return t.min && i.isValid(I) ? I : null;
|
4802
|
+
}), c = U(() => {
|
4803
|
+
const I = i.date(t.max);
|
4804
|
+
return t.max && i.isValid(I) ? I : null;
|
4805
|
+
}), d = U(() => {
|
4780
4806
|
var se;
|
4781
|
-
const
|
4782
|
-
let V =
|
4783
|
-
return (se = a.value) != null && se[0] ? V = i.date(a.value[0]) : l.value && i.isBefore(
|
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 =
|
4785
|
-
let
|
4786
|
-
return
|
4787
|
-
}), v =
|
4807
|
+
const I = i.date();
|
4808
|
+
let V = I;
|
4809
|
+
return (se = a.value) != null && se[0] ? V = i.date(a.value[0]) : l.value && i.isBefore(I, l.value) ? V = l.value : c.value && i.isAfter(I, c.value) && (V = c.value), V && i.isValid(V) ? V : I;
|
4810
|
+
}), 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 = U(() => 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 = U(() => {
|
4811
|
+
let I = i.date();
|
4812
|
+
return I = i.setDate(I, 1), I = i.setMonth(I, h.value), I = i.setYear(I, y.value), i.format(I, "monthAndYear");
|
4813
|
+
}), v = U(() => `date-picker-header${g.value ? "-reverse" : ""}-transition`), k = U(() => {
|
4788
4814
|
if (t.disabled) return !0;
|
4789
|
-
const
|
4815
|
+
const I = [];
|
4790
4816
|
if (u.value !== "month")
|
4791
|
-
|
4817
|
+
I.push("prev", "next");
|
4792
4818
|
else {
|
4793
4819
|
let V = i.date();
|
4794
4820
|
if (V = i.startOfMonth(V), V = i.setMonth(V, h.value), V = i.setYear(V, y.value), l.value) {
|
4795
4821
|
const se = i.addDays(i.startOfMonth(V), -1);
|
4796
|
-
i.isAfter(l.value, se) &&
|
4822
|
+
i.isAfter(l.value, se) && I.push("prev");
|
4797
4823
|
}
|
4798
4824
|
if (c.value) {
|
4799
4825
|
const se = i.addDays(i.endOfMonth(V), 1);
|
4800
|
-
i.isAfter(se, c.value) &&
|
4826
|
+
i.isAfter(se, c.value) && I.push("next");
|
4801
4827
|
}
|
4802
4828
|
}
|
4803
|
-
return
|
4829
|
+
return I;
|
4804
4830
|
});
|
4805
4831
|
function E() {
|
4806
|
-
h.value < 11 ? h.value++ : (y.value++, h.value = 0,
|
4832
|
+
h.value < 11 ? h.value++ : (y.value++, h.value = 0, Ae(y.value)), he(h.value);
|
4807
4833
|
}
|
4808
4834
|
function P() {
|
4809
|
-
h.value > 0 ? h.value-- : (y.value--, h.value = 11,
|
4835
|
+
h.value > 0 ? h.value-- : (y.value--, h.value = 11, Ae(y.value)), he(h.value);
|
4810
4836
|
}
|
4811
4837
|
function z() {
|
4812
4838
|
u.value = "month";
|
4813
4839
|
}
|
4814
|
-
function
|
4840
|
+
function G() {
|
4815
4841
|
u.value = u.value === "months" ? "month" : "months";
|
4816
4842
|
}
|
4817
4843
|
function J() {
|
4818
4844
|
u.value = u.value === "year" ? "month" : "year";
|
4819
4845
|
}
|
4820
|
-
function
|
4821
|
-
u.value === "months" &&
|
4846
|
+
function he(I) {
|
4847
|
+
u.value === "months" && G(), n("update:month", I);
|
4822
4848
|
}
|
4823
|
-
function
|
4824
|
-
u.value === "year" && J(), n("update:year",
|
4849
|
+
function Ae(I) {
|
4850
|
+
u.value === "year" && J(), n("update:year", I);
|
4825
4851
|
}
|
4826
|
-
return
|
4827
|
-
const se = yt(V),
|
4828
|
-
if (!
|
4829
|
-
const Ft = i.date(se[se.length - 1]),
|
4830
|
-
$e !== h.value && (h.value = $e,
|
4852
|
+
return Is(a, (I, V) => {
|
4853
|
+
const se = yt(V), Xe = yt(I);
|
4854
|
+
if (!Xe.length) return;
|
4855
|
+
const Ft = i.date(se[se.length - 1]), Je = i.date(Xe[Xe.length - 1]), $e = i.getMonth(Je), F = i.getYear(Je);
|
4856
|
+
$e !== h.value && (h.value = $e, he(h.value)), F !== y.value && (y.value = F, Ae(y.value)), g.value = i.isBefore(Ft, Je);
|
4831
4857
|
}), Ye(() => {
|
4832
|
-
const
|
4858
|
+
const I = Es.filterProps(t), V = ms.filterProps(t), se = ps.filterProps(t), Xe = vs.filterProps(t), Ft = lt(ys.filterProps(t), ["modelValue"]), Je = lt(bs.filterProps(t), ["modelValue"]), $e = {
|
4833
4859
|
header: f.value,
|
4834
4860
|
transition: v.value
|
4835
4861
|
};
|
4836
|
-
return b(Es, re(
|
4862
|
+
return b(Es, re(I, {
|
4837
4863
|
class: ["v-date-picker", `v-date-picker--${u.value}`, {
|
4838
4864
|
"v-date-picker--show-week": t.showWeek
|
4839
4865
|
}, t.class],
|
@@ -4845,7 +4871,7 @@ const Pi = Ie({
|
|
4845
4871
|
class: "v-date-picker__title"
|
4846
4872
|
}, [r(t.title)]);
|
4847
4873
|
},
|
4848
|
-
header: () => s.header ? b(
|
4874
|
+
header: () => s.header ? b($t, {
|
4849
4875
|
defaults: {
|
4850
4876
|
VDatePickerHeader: {
|
4851
4877
|
...$e
|
@@ -4869,35 +4895,35 @@ const Pi = Ie({
|
|
4869
4895
|
text: m.value,
|
4870
4896
|
"onClick:next": E,
|
4871
4897
|
"onClick:prev": P,
|
4872
|
-
"onClick:month":
|
4898
|
+
"onClick:month": G,
|
4873
4899
|
"onClick:year": J
|
4874
|
-
}), null), b(
|
4900
|
+
}), null), b(mr, {
|
4875
4901
|
hideOnLeave: !0
|
4876
4902
|
}, {
|
4877
4903
|
default: () => [u.value === "months" ? b(ys, re({
|
4878
4904
|
key: "date-picker-months"
|
4879
4905
|
}, Ft, {
|
4880
4906
|
modelValue: h.value,
|
4881
|
-
"onUpdate:modelValue": [(F) => h.value = F,
|
4907
|
+
"onUpdate:modelValue": [(F) => h.value = F, he],
|
4882
4908
|
min: l.value,
|
4883
4909
|
max: c.value,
|
4884
4910
|
year: y.value
|
4885
4911
|
}), null) : u.value === "year" ? b(bs, re({
|
4886
4912
|
key: "date-picker-years"
|
4887
|
-
},
|
4913
|
+
}, Je, {
|
4888
4914
|
modelValue: y.value,
|
4889
|
-
"onUpdate:modelValue": [(F) => y.value = F,
|
4915
|
+
"onUpdate:modelValue": [(F) => y.value = F, Ae],
|
4890
4916
|
min: l.value,
|
4891
4917
|
max: c.value
|
4892
4918
|
}), null) : b(vs, re({
|
4893
4919
|
key: "date-picker-month"
|
4894
|
-
},
|
4920
|
+
}, Xe, {
|
4895
4921
|
modelValue: a.value,
|
4896
4922
|
"onUpdate:modelValue": (F) => a.value = F,
|
4897
4923
|
month: h.value,
|
4898
|
-
"onUpdate:month": [(F) => h.value = F,
|
4924
|
+
"onUpdate:month": [(F) => h.value = F, he],
|
4899
4925
|
year: y.value,
|
4900
|
-
"onUpdate:year": [(F) => y.value = F,
|
4926
|
+
"onUpdate:year": [(F) => y.value = F, Ae],
|
4901
4927
|
min: l.value,
|
4902
4928
|
max: c.value
|
4903
4929
|
}), null)]
|
@@ -4906,17 +4932,17 @@ const Pi = Ie({
|
|
4906
4932
|
});
|
4907
4933
|
}), {};
|
4908
4934
|
}
|
4909
|
-
}),
|
4910
|
-
function
|
4935
|
+
}), dd = { class: "d-flex justify-end" };
|
4936
|
+
function fd(t, e, n, s, i, r) {
|
4911
4937
|
const a = oe("BPhoneInput"), u = oe("BSearchLocationInput");
|
4912
|
-
return
|
4913
|
-
b(
|
4938
|
+
return $(), pe("div", null, [
|
4939
|
+
b(br, {
|
4914
4940
|
modelValue: t.isFormValid,
|
4915
4941
|
"onUpdate:modelValue": e[13] || (e[13] = (l) => t.isFormValid = l),
|
4916
4942
|
style: { gap: "8px", display: "flex", flexDirection: "column" }
|
4917
4943
|
}, {
|
4918
4944
|
default: _(() => [
|
4919
|
-
b(
|
4945
|
+
b(et, {
|
4920
4946
|
modelValue: t.formData.email,
|
4921
4947
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.formData.email = l),
|
4922
4948
|
density: "compact",
|
@@ -4936,7 +4962,7 @@ function cd(t, e, n, s, i, r) {
|
|
4936
4962
|
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.formData.phoneData = l),
|
4937
4963
|
class: "mt-0"
|
4938
4964
|
}, null, 8, ["modelValue"]),
|
4939
|
-
b(
|
4965
|
+
b(rt, { class: "mt-0" }, {
|
4940
4966
|
default: _(() => [
|
4941
4967
|
b(Pe, null, {
|
4942
4968
|
default: _(() => [
|
@@ -4948,7 +4974,7 @@ function cd(t, e, n, s, i, r) {
|
|
4948
4974
|
transition: "scale-transition"
|
4949
4975
|
}, {
|
4950
4976
|
activator: _(({ props: l }) => [
|
4951
|
-
b(
|
4977
|
+
b(et, re({
|
4952
4978
|
"model-value": t.formatDate(t.formData.startDate),
|
4953
4979
|
density: "compact",
|
4954
4980
|
"hide-details": "",
|
@@ -4982,7 +5008,7 @@ function cd(t, e, n, s, i, r) {
|
|
4982
5008
|
transition: "scale-transition"
|
4983
5009
|
}, {
|
4984
5010
|
activator: _(({ props: l }) => [
|
4985
|
-
b(
|
5011
|
+
b(et, re({
|
4986
5012
|
"model-value": t.formatDate(t.formData.endDate),
|
4987
5013
|
density: "compact",
|
4988
5014
|
"hide-details": "",
|
@@ -5009,11 +5035,11 @@ function cd(t, e, n, s, i, r) {
|
|
5009
5035
|
]),
|
5010
5036
|
_: 1
|
5011
5037
|
}),
|
5012
|
-
b(
|
5038
|
+
b(rt, null, {
|
5013
5039
|
default: _(() => [
|
5014
5040
|
b(Pe, null, {
|
5015
5041
|
default: _(() => [
|
5016
|
-
b(
|
5042
|
+
b(et, {
|
5017
5043
|
modelValue: t.formData.adultCount,
|
5018
5044
|
"onUpdate:modelValue": e[8] || (e[8] = (l) => t.formData.adultCount = l),
|
5019
5045
|
density: "compact",
|
@@ -5031,7 +5057,7 @@ function cd(t, e, n, s, i, r) {
|
|
5031
5057
|
}),
|
5032
5058
|
b(Pe, null, {
|
5033
5059
|
default: _(() => [
|
5034
|
-
b(
|
5060
|
+
b(et, {
|
5035
5061
|
modelValue: t.formData.roomCount,
|
5036
5062
|
"onUpdate:modelValue": e[9] || (e[9] = (l) => t.formData.roomCount = l),
|
5037
5063
|
density: "compact",
|
@@ -5057,7 +5083,7 @@ function cd(t, e, n, s, i, r) {
|
|
5057
5083
|
variant: "outlined",
|
5058
5084
|
"with-details": ""
|
5059
5085
|
}, null, 8, ["modelValue"]),
|
5060
|
-
b(
|
5086
|
+
b(fr, {
|
5061
5087
|
modelValue: t.formData.specificRequest,
|
5062
5088
|
"onUpdate:modelValue": e[11] || (e[11] = (l) => t.formData.specificRequest = l),
|
5063
5089
|
density: "compact",
|
@@ -5065,7 +5091,7 @@ function cd(t, e, n, s, i, r) {
|
|
5065
5091
|
variant: "outlined",
|
5066
5092
|
color: "primary"
|
5067
5093
|
}, null, 8, ["modelValue", "label"]),
|
5068
|
-
Zt("div",
|
5094
|
+
Zt("div", dd, [
|
5069
5095
|
b(ae, {
|
5070
5096
|
color: t.isSuccess ? "green" : "primary",
|
5071
5097
|
"data-cy": "submit-button",
|
@@ -5085,9 +5111,9 @@ function cd(t, e, n, s, i, r) {
|
|
5085
5111
|
}, 8, ["modelValue"])
|
5086
5112
|
]);
|
5087
5113
|
}
|
5088
|
-
typeof gs == "function" && gs(
|
5089
|
-
const
|
5090
|
-
...
|
5114
|
+
typeof gs == "function" && gs(Pi);
|
5115
|
+
const hd = /* @__PURE__ */ mn(Pi, [["render", fd]]), gd = {
|
5116
|
+
..._i,
|
5091
5117
|
boilerplateSkeleton: {
|
5092
5118
|
type: Boolean
|
5093
5119
|
},
|
@@ -5104,10 +5130,10 @@ const dd = /* @__PURE__ */ mn(Ci, [["render", cd]]), fd = {
|
|
5104
5130
|
type: {
|
5105
5131
|
type: String
|
5106
5132
|
}
|
5107
|
-
},
|
5133
|
+
}, Ui = hn({
|
5108
5134
|
components: {
|
5109
|
-
BErrorOverlay:
|
5110
|
-
ContactForm:
|
5135
|
+
BErrorOverlay: hr,
|
5136
|
+
ContactForm: hd,
|
5111
5137
|
HotelOfferItemLayout: _s
|
5112
5138
|
},
|
5113
5139
|
computed: {
|
@@ -5179,7 +5205,7 @@ const dd = /* @__PURE__ */ mn(Ci, [["render", cd]]), fd = {
|
|
5179
5205
|
},
|
5180
5206
|
mixins: [Ds],
|
5181
5207
|
name: "HotelOfferListEmpty",
|
5182
|
-
props:
|
5208
|
+
props: gd,
|
5183
5209
|
setup() {
|
5184
5210
|
const { t } = gn();
|
5185
5211
|
return {
|
@@ -5371,11 +5397,11 @@ function ks(t) {
|
|
5371
5397
|
}
|
5372
5398
|
});
|
5373
5399
|
}
|
5374
|
-
const
|
5375
|
-
function
|
5400
|
+
const md = { class: "position-relative" };
|
5401
|
+
function pd(t, e, n, s, i, r) {
|
5376
5402
|
const a = oe("HotelOfferItemLayout"), u = oe("ContactForm"), l = oe("BErrorOverlay");
|
5377
|
-
return
|
5378
|
-
(
|
5403
|
+
return $(), pe("div", md, [
|
5404
|
+
($(), pe(xe, null, Cs(6, (c) => ($(), pe(xe, { key: c }, [
|
5379
5405
|
b(a, {
|
5380
5406
|
boilerplate: t.boilerplateSkeleton,
|
5381
5407
|
class: Et({
|
@@ -5384,9 +5410,9 @@ function gd(t, e, n, s, i, r) {
|
|
5384
5410
|
"mb-2": t.$breakpointService.xs
|
5385
5411
|
})
|
5386
5412
|
}, null, 8, ["boilerplate", "class"]),
|
5387
|
-
t.$breakpointService.xs ? Z("", !0) : (
|
5413
|
+
t.$breakpointService.xs ? Z("", !0) : ($(), Q(en, { key: 0 }))
|
5388
5414
|
], 64))), 64)),
|
5389
|
-
t.typeData ? (
|
5415
|
+
t.typeData ? ($(), Q(l, {
|
5390
5416
|
key: 0,
|
5391
5417
|
"z-index": 0
|
5392
5418
|
}, {
|
@@ -5396,7 +5422,7 @@ function gd(t, e, n, s, i, r) {
|
|
5396
5422
|
description: _(() => [
|
5397
5423
|
Zt("div", null, [
|
5398
5424
|
Zt("p", null, He(t.wording.description), 1),
|
5399
|
-
t.typeData !== "noResultsFiltered" && t.typeData !== "accommodationSuccess" ? (
|
5425
|
+
t.typeData !== "noResultsFiltered" && t.typeData !== "accommodationSuccess" ? ($(), Q(u, {
|
5400
5426
|
key: 0,
|
5401
5427
|
"adult-count": t.adultCount,
|
5402
5428
|
"end-date": t.checkOutDate,
|
@@ -5405,7 +5431,7 @@ function gd(t, e, n, s, i, r) {
|
|
5405
5431
|
"start-date": t.checkInDate,
|
5406
5432
|
onAccommodationSuccess: e[0] || (e[0] = (c) => t.typeData = "accommodationSuccess")
|
5407
5433
|
}, null, 8, ["adult-count", "end-date", "location", "room-count", "start-date"])) : Z("", !0),
|
5408
|
-
t.typeData === "noResultsFiltered" ? (
|
5434
|
+
t.typeData === "noResultsFiltered" ? ($(), Q(ae, {
|
5409
5435
|
key: 1,
|
5410
5436
|
color: "primary",
|
5411
5437
|
variant: "outlined",
|
@@ -5423,22 +5449,22 @@ function gd(t, e, n, s, i, r) {
|
|
5423
5449
|
})) : Z("", !0)
|
5424
5450
|
]);
|
5425
5451
|
}
|
5426
|
-
typeof ks == "function" && ks(
|
5427
|
-
const
|
5452
|
+
typeof ks == "function" && ks(Ui);
|
5453
|
+
const vd = /* @__PURE__ */ mn(Ui, [["render", pd]]), Bi = hn({
|
5428
5454
|
components: {
|
5429
|
-
BHotelOffersFilterBar:
|
5430
|
-
BHotelSearchBar:
|
5431
|
-
HotelOfferItem:
|
5455
|
+
BHotelOffersFilterBar: cr,
|
5456
|
+
BHotelSearchBar: Sr,
|
5457
|
+
HotelOfferItem: ur,
|
5432
5458
|
HotelOfferItemLayout: _s,
|
5433
|
-
HotelOfferListEmpty:
|
5434
|
-
HotelRoomOfferList:
|
5435
|
-
TermsAndConditions:
|
5459
|
+
HotelOfferListEmpty: vd,
|
5460
|
+
HotelRoomOfferList: Er,
|
5461
|
+
TermsAndConditions: Ir
|
5436
5462
|
},
|
5437
5463
|
computed: {
|
5438
|
-
...
|
5439
|
-
|
5440
|
-
|
5441
|
-
|
5464
|
+
...Wi(
|
5465
|
+
Zi,
|
5466
|
+
Tr,
|
5467
|
+
Ji
|
5442
5468
|
),
|
5443
5469
|
areFiltersActive: be("hotelOffers/areFiltersActive"),
|
5444
5470
|
displayFiltersMenu() {
|
@@ -5452,7 +5478,7 @@ const md = /* @__PURE__ */ mn(Mi, [["render", gd]]), $i = hn({
|
|
5452
5478
|
isPollingHotelOffers: be("hotelOffers/isPolling"),
|
5453
5479
|
isTopPicksSelected() {
|
5454
5480
|
var t;
|
5455
|
-
return ((t = this.filters.sort_by) == null ? void 0 : t.value) ===
|
5481
|
+
return ((t = this.filters.sort_by) == null ? void 0 : t.value) === Xi.TopPicks;
|
5456
5482
|
},
|
5457
5483
|
showErrorMessage() {
|
5458
5484
|
return this.hotelOfferRequest.hasError || this.hasErrorHotelOffers;
|
@@ -5496,20 +5522,20 @@ const md = /* @__PURE__ */ mn(Mi, [["render", gd]]), $i = hn({
|
|
5496
5522
|
},
|
5497
5523
|
mixins: [
|
5498
5524
|
Ds,
|
5499
|
-
|
5500
|
-
|
5525
|
+
lr,
|
5526
|
+
Rr(
|
5501
5527
|
["bookingApiClient", "config.currency", "config.lang"],
|
5502
5528
|
"retrieveHotelOffers"
|
5503
5529
|
),
|
5504
|
-
|
5505
|
-
|
5506
|
-
fallbackValue:
|
5530
|
+
ir,
|
5531
|
+
kr({
|
5532
|
+
fallbackValue: Ls,
|
5507
5533
|
propsName: "features"
|
5508
5534
|
}),
|
5509
|
-
|
5535
|
+
Ar()
|
5510
5536
|
],
|
5511
5537
|
name: "HotelOfferList",
|
5512
|
-
props:
|
5538
|
+
props: Dr,
|
5513
5539
|
setup() {
|
5514
5540
|
const { t } = gn();
|
5515
5541
|
return {
|
@@ -5520,7 +5546,7 @@ const md = /* @__PURE__ */ mn(Mi, [["render", gd]]), $i = hn({
|
|
5520
5546
|
filters: {
|
5521
5547
|
deep: !0,
|
5522
5548
|
async handler(t, e) {
|
5523
|
-
|
5549
|
+
Qi(t, e) || await this.retrieveHotelOffers();
|
5524
5550
|
}
|
5525
5551
|
},
|
5526
5552
|
"hotelOfferRequest.id": {
|
@@ -5584,19 +5610,19 @@ function Rs(t) {
|
|
5584
5610
|
}
|
5585
5611
|
});
|
5586
5612
|
}
|
5587
|
-
const
|
5613
|
+
const yd = {
|
5588
5614
|
key: 0,
|
5589
5615
|
class: "mx-n2"
|
5590
|
-
},
|
5616
|
+
}, bd = {
|
5591
5617
|
key: 1,
|
5592
5618
|
class: "d-flex justify-center align-center py-3"
|
5593
5619
|
};
|
5594
|
-
function
|
5620
|
+
function Ed(t, e, n, s, i, r) {
|
5595
5621
|
const a = oe("BHotelSearchBar"), u = oe("BHotelOffersFilterBar"), l = oe("HotelOfferListEmpty"), c = oe("HotelRoomOfferList"), d = oe("HotelOfferItem"), h = oe("TermsAndConditions");
|
5596
|
-
return
|
5622
|
+
return $(), Q(Or, {
|
5597
5623
|
ref: "hotel-offer-list-container",
|
5598
5624
|
class: "pa-0 bg-white",
|
5599
|
-
style:
|
5625
|
+
style: nr([{ "min-height": "500px" }, {
|
5600
5626
|
height: t.parsedHeight,
|
5601
5627
|
maxHeight: t.maxHeight,
|
5602
5628
|
overflowY: "auto",
|
@@ -5604,7 +5630,7 @@ function yd(t, e, n, s, i, r) {
|
|
5604
5630
|
}])
|
5605
5631
|
}, {
|
5606
5632
|
default: _(() => [
|
5607
|
-
t.parsedFeatures.HotelOfferSearchMenu ? (
|
5633
|
+
t.parsedFeatures.HotelOfferSearchMenu ? ($(), Q(rt, {
|
5608
5634
|
key: 0,
|
5609
5635
|
class: Et(["px-2 pt-4", t.$isCurrentBreakpointAboveOrEqual("md") ? "sticky" : ""]),
|
5610
5636
|
"no-gutters": ""
|
@@ -5612,7 +5638,7 @@ function yd(t, e, n, s, i, r) {
|
|
5612
5638
|
default: _(() => [
|
5613
5639
|
b(Pe, null, {
|
5614
5640
|
default: _(() => [
|
5615
|
-
t.isBookingApiClientDefined ? (
|
5641
|
+
t.isBookingApiClientDefined ? ($(), Q(a, {
|
5616
5642
|
key: 0,
|
5617
5643
|
modelValue: t.hotelOfferRequestInternal,
|
5618
5644
|
"onUpdate:modelValue": e[0] || (e[0] = (y) => t.hotelOfferRequestInternal = y),
|
@@ -5626,7 +5652,7 @@ function yd(t, e, n, s, i, r) {
|
|
5626
5652
|
]),
|
5627
5653
|
_: 1
|
5628
5654
|
}, 8, ["class"])) : Z("", !0),
|
5629
|
-
t.displayFiltersMenu && t.isBookingApiClientDefined ? (
|
5655
|
+
t.displayFiltersMenu && t.isBookingApiClientDefined ? ($(), Q(rt, {
|
5630
5656
|
key: 1,
|
5631
5657
|
class: Et(t.$isCurrentBreakpointAboveOrEqual("md") ? "sticky" : ""),
|
5632
5658
|
"no-gutters": ""
|
@@ -5635,21 +5661,21 @@ function yd(t, e, n, s, i, r) {
|
|
5635
5661
|
b(Pe, null, {
|
5636
5662
|
default: _(() => [
|
5637
5663
|
b(u),
|
5638
|
-
t.$breakpointService.xs ? Z("", !0) : (
|
5664
|
+
t.$breakpointService.xs ? Z("", !0) : ($(), Q(en, { key: 0 }))
|
5639
5665
|
]),
|
5640
5666
|
_: 1
|
5641
5667
|
})
|
5642
5668
|
]),
|
5643
5669
|
_: 1
|
5644
5670
|
}, 8, ["class"])) : Z("", !0),
|
5645
|
-
b(
|
5671
|
+
b(rt, { "no-gutters": "" }, {
|
5646
5672
|
default: _(() => [
|
5647
5673
|
b(Pe, null, {
|
5648
5674
|
default: _(() => [
|
5649
|
-
t.showSkeleton ? (
|
5675
|
+
t.showSkeleton ? ($(), Q(l, { key: 0 })) : t.showErrorMessage ? ($(), Q(l, {
|
5650
5676
|
key: 1,
|
5651
5677
|
type: "internalError"
|
5652
|
-
})) : t.showNoResultsMessage ? (
|
5678
|
+
})) : t.showNoResultsMessage ? ($(), Q(l, {
|
5653
5679
|
key: 2,
|
5654
5680
|
address: t.hotelOfferRequest.address,
|
5655
5681
|
"adult-count": t.hotelOfferRequest.adultCount,
|
@@ -5661,14 +5687,14 @@ function yd(t, e, n, s, i, r) {
|
|
5661
5687
|
"source-market": t.hotelOfferRequest.sourceMarket,
|
5662
5688
|
type: "noResults",
|
5663
5689
|
onResetFilters: t.onResetFilters
|
5664
|
-
}, null, 8, ["address", "adult-count", "check-in-date", "check-out-date", "latitude", "longitude", "room-count", "source-market", "onResetFilters"])) : (
|
5665
|
-
|
5690
|
+
}, null, 8, ["address", "adult-count", "check-in-date", "check-out-date", "latitude", "longitude", "room-count", "source-market", "onResetFilters"])) : ($(), pe(xe, { key: 3 }, [
|
5691
|
+
er(b(vr, {
|
5666
5692
|
color: "primary",
|
5667
5693
|
indeterminate: ""
|
5668
5694
|
}, null, 512), [
|
5669
|
-
[
|
5695
|
+
[tr, t.loadingBarEnabled && t.isPollingHotelOffers]
|
5670
5696
|
]),
|
5671
|
-
t.hotelOffers ? (
|
5697
|
+
t.hotelOffers ? ($(!0), pe(xe, { key: 0 }, Cs(t.hotelOffers, (y, g) => ($(), pe(xe, {
|
5672
5698
|
key: y.id
|
5673
5699
|
}, [
|
5674
5700
|
b(d, {
|
@@ -5685,7 +5711,7 @@ function yd(t, e, n, s, i, r) {
|
|
5685
5711
|
default: _(() => {
|
5686
5712
|
var f;
|
5687
5713
|
return [
|
5688
|
-
(f = t.parsedFeatures.HotelOfferItem) != null && f.HotelRoomOfferList ? (
|
5714
|
+
(f = t.parsedFeatures.HotelOfferItem) != null && f.HotelRoomOfferList ? ($(), pe("div", yd, [
|
5689
5715
|
b(c, {
|
5690
5716
|
"adult-count": t.hotelOfferRequest.adultCount,
|
5691
5717
|
"check-in-date": t.hotelOfferRequest.checkInDate,
|
@@ -5704,7 +5730,7 @@ function yd(t, e, n, s, i, r) {
|
|
5704
5730
|
}, 1032, ["class", "features", "hotel-offer", "single-offer", "onMouseleave", "onMouseover"]),
|
5705
5731
|
b(en)
|
5706
5732
|
], 64))), 128)) : Z("", !0),
|
5707
|
-
t.startingAfter ? (
|
5733
|
+
t.startingAfter ? ($(), pe("div", bd, [
|
5708
5734
|
b(ae, {
|
5709
5735
|
color: "primary",
|
5710
5736
|
variant: "flat",
|
@@ -5725,7 +5751,7 @@ function yd(t, e, n, s, i, r) {
|
|
5725
5751
|
]),
|
5726
5752
|
_: 1
|
5727
5753
|
}),
|
5728
|
-
t.parsedFeatures.TermsAndConditionsFooter ? (
|
5754
|
+
t.parsedFeatures.TermsAndConditionsFooter ? ($(), Q(h, {
|
5729
5755
|
key: 2,
|
5730
5756
|
theme: "light"
|
5731
5757
|
})) : Z("", !0)
|
@@ -5733,12 +5759,12 @@ function yd(t, e, n, s, i, r) {
|
|
5733
5759
|
_: 1
|
5734
5760
|
}, 8, ["style"]);
|
5735
5761
|
}
|
5736
|
-
typeof Rs == "function" && Rs(
|
5737
|
-
const
|
5738
|
-
|
5762
|
+
typeof Rs == "function" && Rs(Bi);
|
5763
|
+
const qd = /* @__PURE__ */ mn(Bi, [["render", Ed]]);
|
5764
|
+
xi("css/revolugo.hotelofferlist.BkctzTMI.css");
|
5739
5765
|
export {
|
5740
|
-
|
5741
|
-
|
5742
|
-
|
5766
|
+
qd as H,
|
5767
|
+
Ls as a,
|
5768
|
+
Dr as h
|
5743
5769
|
};
|
5744
|
-
//# sourceMappingURL=revolugo.hotelofferlist.
|
5770
|
+
//# sourceMappingURL=revolugo.hotelofferlist.Bu6FD5xa.min.js.map
|