mixpanel-browser 2.76.0 → 2.78.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/.claude/settings.local.json +3 -1
- package/.github/dependabot.yml +8 -0
- package/.github/workflows/integration-tests.yml +2 -2
- package/.github/workflows/unit-tests.yml +2 -2
- package/CHANGELOG.md +8 -0
- package/dist/async-modules/mixpanel-recorder-BjSlYaNJ.min.js +2 -0
- package/dist/async-modules/mixpanel-recorder-BjSlYaNJ.min.js.map +1 -0
- package/dist/async-modules/{mixpanel-recorder-bIS4LMGd.js → mixpanel-recorder-zMBXIyeG.js} +84 -10
- package/dist/async-modules/{mixpanel-targeting-VOeN7RWY.min.js → mixpanel-targeting-BSHal4N9.min.js} +2 -2
- package/dist/async-modules/{mixpanel-targeting-VOeN7RWY.min.js.map → mixpanel-targeting-BSHal4N9.min.js.map} +1 -1
- package/dist/async-modules/{mixpanel-targeting-BcAPS-Mz.js → mixpanel-targeting-UHf4eBfC.js} +1 -1
- package/dist/mixpanel-core.cjs.d.ts +3 -1
- package/dist/mixpanel-core.cjs.js +292 -130
- package/dist/mixpanel-recorder.js +84 -10
- package/dist/mixpanel-recorder.min.js +1 -1
- package/dist/mixpanel-recorder.min.js.map +1 -1
- package/dist/mixpanel-targeting.js +1 -1
- package/dist/mixpanel-targeting.min.js +1 -1
- package/dist/mixpanel-targeting.min.js.map +1 -1
- package/dist/mixpanel-with-async-modules.cjs.d.ts +3 -1
- package/dist/mixpanel-with-async-modules.cjs.js +294 -132
- package/dist/mixpanel-with-async-recorder.cjs.d.ts +3 -1
- package/dist/mixpanel-with-async-recorder.cjs.js +294 -132
- package/dist/mixpanel-with-recorder.d.ts +3 -1
- package/dist/mixpanel-with-recorder.js +381 -168
- package/dist/mixpanel-with-recorder.min.d.ts +3 -1
- package/dist/mixpanel-with-recorder.min.js +1 -1
- package/dist/mixpanel.amd.d.ts +3 -1
- package/dist/mixpanel.amd.js +381 -168
- package/dist/mixpanel.cjs.d.ts +3 -1
- package/dist/mixpanel.cjs.js +381 -168
- package/dist/mixpanel.globals.js +294 -132
- package/dist/mixpanel.min.js +191 -186
- package/dist/mixpanel.module.d.ts +3 -1
- package/dist/mixpanel.module.js +381 -168
- package/dist/mixpanel.umd.d.ts +3 -1
- package/dist/mixpanel.umd.js +381 -168
- package/dist/rrweb-bundled.js +61 -9
- package/dist/rrweb-compiled.js +56 -9
- package/package.json +6 -5
- package/src/config.js +1 -1
- package/src/flags/CLAUDE.md +24 -0
- package/src/flags/index.js +109 -80
- package/src/index.d.ts +3 -1
- package/src/mixpanel-core.js +4 -2
- package/src/recorder/session-recording.js +5 -1
- package/src/recorder/utils.js +27 -1
- package/src/recorder-manager.js +110 -2
- package/testServer.js +16 -1
- package/dist/async-modules/mixpanel-recorder-hFoTniVR.min.js +0 -2
- package/dist/async-modules/mixpanel-recorder-hFoTniVR.min.js.map +0 -1
- /package/src/loaders/{loader-module-with-async-recorder.d.ts → loader-module-with-async-modules.d.ts} +0 -0
package/dist/mixpanel.min.js
CHANGED
|
@@ -1,186 +1,191 @@
|
|
|
1
|
-
(function(){function Sb(){function a(){a.done||(Xa=a.done=!0,Ya=!1,
|
|
2
|
-
T[c]=ra(a,b,c),G[c].
|
|
3
|
-
|
|
4
|
-
"_mixpanel";var b=a.persistence;"cookie"!==b&&"localStorage"!==b&&(
|
|
5
|
-
this.
|
|
6
|
-
[];this.
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
(c.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
b.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
b
|
|
23
|
-
""
|
|
24
|
-
|
|
25
|
-
a
|
|
26
|
-
|
|
27
|
-
a
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
this;return"[object Array]"!==Db.call(a)?b.reject(TypeError("Not an array")):new b(function(c,
|
|
33
|
-
|
|
34
|
-
a)}catch(
|
|
35
|
-
e.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
m;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
q.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
b.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
c)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
this.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
this.
|
|
81
|
-
this.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
function(){this.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
this.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
(a
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
function(a,b
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
a)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
this))
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
this))
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
(
|
|
126
|
-
|
|
127
|
-
c)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
a)};A.prototype.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
a
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
(this.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
a(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
f
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
l.prototype.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
this.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
l.prototype.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
1
|
+
(function(){function Sb(){function a(){a.done||(Xa=a.done=!0,Ya=!1,e.h(T,function(d){d.ue()}))}function b(){try{z.documentElement.doScroll("left")}catch(d){setTimeout(b,1);return}a()}if(z.addEventListener)"complete"===z.readyState?a():z.addEventListener("DOMContentLoaded",a,!1);else if(z.attachEvent){z.attachEvent("onreadystatechange",a);var c=!1;try{c=null===n.frameElement}catch(d){}z.documentElement.doScroll&&c&&b()}e.Wd(n,"load",a,!0)}function Tb(){G.init=function(a,b,c){if(c)return G[c]||(G[c]=
|
|
2
|
+
T[c]=ra(a,b,c),G[c].hb()),G[c];c=G;T.mixpanel?c=T.mixpanel:a&&(c=ra(a,b,"mixpanel"),c.hb(),T.mixpanel=c);G=c;1===sa&&(n.mixpanel=G);Ub()}}function Ub(){e.h(T,function(a,b){"mixpanel"!==b&&(G[b]=a)});G._=e}function Ca(a){a=e.l(a)?a:e.m(a)?{}:{days:a};return e.extend({},Vb,a)}function ra(a,b,c){var d="mixpanel"===c?G:G[c];if(d&&0===sa)var f=d;else{if(d&&!e.isArray(d)){v.error("You have already initialized "+c);return}f=new l}f.Ic={};f.Ma(a,b,c);f.people=new A;f.people.Ma(f);if(!f.g("skip_first_touch_marketing")){b=
|
|
3
|
+
e.info.Na(null);var g={},k=!1;e.h(b,function(h,p){(g["initial_"+p]=h)&&(k=!0)});k&&f.people.Ba(g)}U=U||f.g("debug");n.dispatchEvent(new n.CustomEvent("$mp_sdk_to_extension_event",{detail:{instance:f,source:0===sa?"module":"snippet",token:a,name:c,info:e.info}}));!e.m(d)&&e.isArray(d)&&(f.Kb.call(f.people,d.people),f.Kb(d));return f}function l(){}function Da(a){throw Error(a+" not available in this build.");}function B(a){this.props={};this.name=a.persistence_name?"mp_"+a.persistence_name:"mp_"+a.token+
|
|
4
|
+
"_mixpanel";var b=a.persistence;"cookie"!==b&&"localStorage"!==b&&(v.i("Unknown persistence type "+b+"; falling back to cookie"),b=a.persistence="cookie");"localStorage"===b&&e.localStorage.Pa()?this.storage=e.localStorage:this.storage=e.cookie;this.load();this.me(a);this.upgrade();this.save()}function A(){}function E(){}function N(a,b){this.ra=b.ra;this.Xa=new P(a,{ra:e.bind(this.s,this),Y:b.Y,fe:b.fe,ge:b.ge,F:b.F,Zb:b.Zb});this.W=b.W;this.kg=b.lg;this.kb=b.kb;this.Ag=b.Bg;this.ba=this.W.batch_size;
|
|
5
|
+
this.qb=this.W.batch_flush_interval_ms;this.stopped=!this.W.batch_autostart;this.Wb=0;this.ia={};this.md=b.md||!1}function Za(a,b){var c=[];e.h(a,function(d){var f=d.id;f in b?(f=b[f],null!==f&&(d.payload=f,c.push(d))):c.push(d)});return c}function $a(a,b){var c=[];e.h(a,function(d){d.id&&!b[d.id]&&c.push(d)});return c}function P(a,b){b=b||{};this.Ca=a;if(this.F=b.F)this.Y=b.Y||new la,this.lock=new ab(a,{storage:b.fe||n.localStorage,Bc:b.ge});this.s=b.ra||e.bind(bb.error,bb);this.Cb=b.Cb||null;this.O=
|
|
6
|
+
[];this.lc=!1;this.af=b.Zb?Wb(e.bind(this.Kc,this),b.Zb):e.bind(function(c){return this.Kc([c])},this)}function la(a){this.storage=a||n.localStorage}function ab(a,b){b=b||{};this.Ca=a;this.storage=b.storage||n.localStorage;this.Sd=b.Sd||100;this.Bc=b.Bc||2E3;this.Ud=b.Ud||C}function ta(){this.Pd="submit"}function da(){this.Pd="click"}function S(){}function K(a){this.Bb=a.Bb;this.B=a.bc;this.pf=a.qf;this.s=a.eg;this.nd=a.gf;this.X=a.X;this.tc=a.tc;this.ka=a.ka;this.yb=a.yb;this.ib=this.C=null}function Xb(a,
|
|
7
|
+
b){if(!e.isArray(a))return a&&b.i("record_allowed_iframe_origins must be an array of origin strings, cross-origin recording will be disabled."),[];for(var c=[],d=0;d<a.length;d++)try{var f=(new URL(a[d])).origin;"null"===f?b.i(a[d]+" has an opaque origin. Skipping this entry."):c.push(f)}catch(g){b.i(a[d]+" is not a valid origin URL. Skipping this entry.")}return c}function V(a){this.qa=null;this.Fg=a}function u(a){this.fetch=n.fetch;this.rb=a.rb;this.B=a.bc;this.og=a.be;this.dc=a.lf;this.track=a.Tg;
|
|
8
|
+
this.X=a.X||function(){};this.ka=a.ka||""}function cb(a,b){if(n.__mp_targeting&&"function"===typeof n.__mp_targeting.then)return n.__mp_targeting;n.__mp_targeting=(new Promise(function(c){a(b,c)})).then(function(){var c=n.__mp_targeting;if(c&&"function"===typeof c.then)return c;throw Error("targeting failed to load");}).catch(function(c){delete n.__mp_targeting;throw c;});return n.__mp_targeting}function H(a){this.u=a;this.wa=0;this.ic=!1;this.Va=0}function db(a,b){for(var c=!1,d=0;d<b.length;d++)if(a.match(b[d])){c=
|
|
9
|
+
!0;break}return c}function ma(){}function eb(a){var b=Yb,c=a.split(".");c=c[c.length-1];if(4<c.length||"com"===c||"org"===c)b=Zb;return(a=a.match(b))?a[0]:""}function fb(){var a=e.Ha().replace(/-/g,""),b=e.Ha().replace(/-/g,"").substring(0,16);return"00-"+a+"-"+b+"-01"}function Ea(a){var b=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return a?b.substring(0,a):b}function Wb(a,b){var c=null,d=[];return function(f){var g=this;d.push(f);c||(c=new C(function(k){setTimeout(function(){var h=
|
|
10
|
+
a.apply(g,[d]);c=null;d=[];k(h)},b)}));return c}}function ua(a,b){return null===Fa||b?Fa=gb(a||n.localStorage):Fa}function gb(a){var b=!0;try{var c="__mplss_"+Ea(8);a.setItem(c,"xyz");"xyz"!==a.getItem(c)&&(b=!1);a.removeItem(c)}catch(d){b=!1}return b}function Ga(a){a=a.prototype;for(var b in a)"function"===typeof a[b]&&(a[b]=ea(a[b]))}function ea(a){return function(){try{return a.apply(this,arguments)}catch(b){v.i("Implementation error. Please turn on debug and contact support@mixpanel.com."),U&&
|
|
11
|
+
v.i(b)}}}function fa(a){return{log:Ha(v.log,a),error:Ha(v.error,a),i:Ha(v.i,a)}}function Ha(a,b){return function(){arguments[0]="["+b+"] "+arguments[0];return a.apply(v,arguments)}}function va(a,b){hb.add(a,b);Ia||(Ia=$b(hb.$e))}function ib(a){var b=typeof a;if(null!==a&&("object"===b||"function"===b))var c=a.then;return"function"===typeof c?c:!1}function Ja(){for(var a=0;a<this.U.length;a++){var b=void 0,c=void 0,d=1===this.state?this.U[a].Gg:this.U[a].bf,f=this.U[a];try{!1===d?f.reject(this.Sa):
|
|
12
|
+
(c=!0===d?this.Sa:d.call(void 0,this.Sa),c===f.promise?f.reject(TypeError("Promise-chain cycle")):(b=ib(c))?b.call(c,f.resolve,f.reject):f.resolve(c))}catch(g){f.reject(g)}}this.U.length=0}function jb(a){var b,c=this;if(!c.ab){c.ab=!0;c.ob&&(c=c.ob);try{(b=ib(a))?va(function(){var d=new kb(c);try{b.call(a,function(){jb.apply(d,arguments)},function(){na.apply(d,arguments)})}catch(f){na.call(d,f)}}):(c.Sa=a,c.state=1,0<c.U.length&&va(Ja,c))}catch(d){na.call(new kb(c),d)}}}function na(a){var b=this;
|
|
13
|
+
b.ab||(b.ab=!0,b.ob&&(b=b.ob),b.Sa=a,b.state=2,0<b.U.length&&va(Ja,b))}function lb(a,b,c,d){for(var f=0;f<b.length;f++)(function(g){a.resolve(b[g]).then(function(k){c(g,k)},d)})(f)}function kb(a){this.ob=a;this.ab=!1}function ac(a){this.promise=a;this.state=0;this.ab=!1;this.U=[];this.Sa=void 0}function W(a){if("function"!==typeof a)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var b=new ac(this);this.then=function(c,d){var f={Gg:"function"===
|
|
14
|
+
typeof c?c:!0,bf:"function"===typeof d?d:!1};f.promise=new this.constructor(function(g,k){if("function"!==typeof g||"function"!==typeof k)throw TypeError("Not a function");f.resolve=g;f.reject=k});b.U.push(f);0!==b.state&&va(Ja,b);return f.promise};this["catch"]=function(c){return this.then(void 0,c)};try{a.call(void 0,function(c){jb.call(b,c)},function(c){na.call(b,c)})}catch(c){na.call(b,c)}}function mb(a,b,c){function d(f){v.error(b+" error: "+f)}return{Pa:function(f){(f=c(a,f))||v.error(b+" unsupported");
|
|
15
|
+
return f},error:d,get:function(f){try{return a.getItem(f)}catch(g){d(g)}return null},parse:function(f){try{return e.Ga(a.getItem(f))||{}}catch(g){}return null},set:function(f,g){try{a.setItem(f,g)}catch(k){d(k)}},remove:function(f){try{a.removeItem(f)}catch(g){d(g)}}}}function Ka(a){var b={};a=nb(a).split(" ");for(var c=0;c<a.length;c++){var d=a[c];d&&(b[d]=!0)}return b}function nb(a){switch(typeof a.className){case "string":return a.className;case "object":return a.className.$g||a.getAttribute("class")||
|
|
16
|
+
"";default:return""}}function bc(a){if(a.previousElementSibling)return a.previousElementSibling;do a=a.previousSibling;while(a&&(!a||1!==a.nodeType));return a}function ob(a,b,c,d,f,g){var k={$classes:nb(a).split(" "),$tag_name:a.tagName.toLowerCase()},h=a.id;h&&(k.$id=h);La(a,b,f,g)&&e.h(cc.concat(d),function(p){if(a.hasAttribute(p)&&!c[p]){var r=a.getAttribute(p);wa(r)&&(k["$attr-"+p]=r)}});d=b=1;for(f=a;f=bc(f);)b++,f.tagName===a.tagName&&d++;k.$nth_child=b;k.$nth_of_type=d;return k}function dc(a,
|
|
17
|
+
b){var c=b.Me,d=b.Ne||[],f=b.Re,g=b.Se||[],k=b.Ve||!1,h=b.Ue||[],p=b.We||!1,r={};e.h(b.Qe||[],function(x){r[x]=!0});var q=null,m="undefined"===typeof a.target?a.srcElement:a.target;m&&3===m.nodeType&&(m=m.parentNode);if(ec(m,a)&&Ma(m,a,c,d)&&!Na(m,a,f,g)){b=[m];for(var t=m;t.parentNode&&!Q(t,"body");)b.push(t.parentNode),t=t.parentNode;var y=[],w,J=!1;e.h(b,function(x){var O=La(x,a,c,d);r.href||"a"!==x.tagName.toLowerCase()||(w=x.getAttribute("href"),w=O&&wa(w)&&w);Na(x,a,f,g)&&(J=!0);y.push(ob(x,
|
|
18
|
+
a,r,h,c,d))},this);if(!J&&(b=z.documentElement,q={$event_type:a.type,$host:n.location.host,$pathname:n.location.pathname,$elements:y,$el_attr__href:w,$viewportHeight:Math.max(b.clientHeight,n.innerHeight||0),$viewportWidth:Math.max(b.clientWidth,n.innerWidth||0),$pageHeight:z.body.offsetHeight||0,$pageWidth:z.body.offsetWidth||0},e.h(h,function(x){if(!r[x]&&m.hasAttribute(x)){var O=m.getAttribute(x);wa(O)&&(q["$el_attr__"+x]=O)}}),k&&(b=pb(m,a,c,d))&&b.length&&(q.$el_text=b),"click"===a.type&&(e.h(fc,
|
|
19
|
+
function(x){x in a&&(q["$"+x]=a[x])}),p&&(q.$captured_for_heatmap=!0),m=gc(a)),k&&(b=pb(m,a,c,d))&&b.length&&(q.$el_text=b),m)){if(!Ma(m,a,c,d)||Na(m,a,f,g))return null;k=ob(m,a,r,h,c,d);q.$target=k;q.$el_classes=k.$classes;e.extend(q,e.Da({$el_id:k.$id,$el_tag_name:k.$tag_name}))}}return q}function pb(a,b,c,d){var f="";La(a,b,c,d)&&a.childNodes&&a.childNodes.length&&e.h(a.childNodes,function(g){g&&3===g.nodeType&&g.textContent&&(f+=e.trim(g.textContent).split(/(\s+)/).filter(wa).join("").replace(/[\r\n]/g,
|
|
20
|
+
" ").replace(/[ ]+/g," ").substring(0,255))});return e.trim(f)}function gc(a){var b=a.target;a=a.composedPath();for(var c=0;c<a.length;c++){var d=a[c];if(Q(d,"a")||Q(d,"button")||Q(d,"input")||Q(d,"select")||d.getAttribute&&"button"===d.getAttribute("role")){b=d;break}if(d===b)break}return b}function Ma(a,b,c,d){if(c)try{if(!c(a,b))return!1}catch(f){return D.i("Error while checking element in allowElementCallback",f),!1}if(!d.length)return!0;for(b=0;b<d.length;b++){c=d[b];try{if(a.matches(c))return!0}catch(f){D.i("Error while checking selector: "+
|
|
21
|
+
c,f)}}return!1}function Na(a,b,c,d){if(c)try{if(c(a,b))return!0}catch(f){return D.i("Error while checking element in blockElementCallback",f),!0}if(d&&d.length)for(b=0;b<d.length;b++){c=d[b];try{if(a.matches(c))return!0}catch(f){D.i("Error while checking selector: "+c,f)}}a=Ka(a);for(b=0;b<Oa.length;b++)if(a[Oa[b]])return!0;return!1}function Q(a,b){return a&&a.tagName&&a.tagName.toLowerCase()===b.toLowerCase()}function ec(a,b){if(!a||Q(a,"html")||!a||1!==a.nodeType)return!1;switch(a.tagName.toLowerCase()){case "form":return"submit"===
|
|
22
|
+
b.type;case "input":return-1===["button","submit"].indexOf(a.getAttribute("type"))?"change"===b.type:"click"===b.type;case "select":case "textarea":return"change"===b.type;default:return"click"===b.type}}function La(a,b,c,d){if(!Ma(a,b,c,d))return!1;for(c=a;c.parentNode&&!Q(c,"body");c=c.parentNode)for(d=Ka(c),b=0;b<qb.length;b++)if(d[qb[b]])return!1;c=Ka(a);for(b=0;b<rb.length;b++)if(c[rb[b]])return!0;if(Q(a,"input")||Q(a,"select")||Q(a,"textarea")||"true"===a.getAttribute("contenteditable"))return!1;
|
|
23
|
+
b=a.type||"";if("string"===typeof b)switch(b.toLowerCase()){case "hidden":return!1;case "password":return!1}a=(a.name||a.id||"").toString().toLowerCase();return"string"===typeof a&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,""))?!1:!0}function wa(a){return null===a||e.m(a)||"string"===typeof a&&(a=e.trim(a),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((a||
|
|
24
|
+
"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(a))?!1:!0}function sb(a){var b="onscrollend"in n,c=ea(a),d="scrollend";if(!b){var f=null;c=ea(function(){clearTimeout(f);f=setTimeout(a,100)});d="scroll"}return{listener:c,ld:d}}function Pa(a){var b=a.tagName.toLowerCase(),c;if(!(c="button"===b||"input"===b||"select"===b||"textarea"===b||"details"===b||"dialog"===b||a.isContentEditable||a.onclick||a.onmousedown||a.onmouseup||a.ontouchstart||a.ontouchend))a:{for(c=0;c<tb.length;c++)if(a.hasAttribute(tb[c])){c=
|
|
25
|
+
!0;break a}c=!1}c||((c=a.getAttribute("role"))?(c=c.trim().split(/\s+/)[0].toLowerCase(),c=hc[c]):c=!1);return c||"a"===b&&a.hasAttribute("href")||a.hasAttribute("tabindex")?!0:!1}function ub(a){if(!a||!a.tagName)return!0;var b=a.tagName.toLowerCase();if(ic[b])return!0;if(Pa(a))return!1;a=a.parentElement;for(var c=0;a&&5>c;){if(Pa(a))return!1;if(a.getRootNode&&a.getRootNode()!==z){var d=a.getRootNode();if(d.host&&Pa(d.host))return!1}a=a.parentElement;c++}return jc[b]?!0:!1}function vb(a){return"composedPath"in
|
|
26
|
+
a?a.composedPath():[]}function wb(a){var b=vb(a);return b&&0<b.length?b[0]:a.target||a.srcElement}function xb(){this.pa=[]}function ha(a,b){this.Xe=a||function(){};this.Vf=b;this.P=null;this.Eb=[]}function R(a){this.ea=[];this.K=this.Ta=null;this.ua=!1;this.nc=0;this.ja=[];this.Md=a;this.xa=!1;this.Db=null}function kc(a,b){yb(!0,a,b)}function lc(a,b){yb(!1,a,b)}function mc(a,b){return"1"===zb(a,b)}function Ab(a,b){if(nc(b))return v.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),
|
|
27
|
+
!0;(a="0"===zb(a,b))&&v.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data.");return a}function aa(a){return Qa(a,function(b){return this.g(b)})}function X(a){return Qa(a,function(b){return this.L(b)})}function ia(a){return Qa(a,function(b){return this.L(b)})}function oc(a,b){b=b||{};Ra(b).remove(Sa(a,b),!!b.ed,b.cd)}function Ra(a){a=a||{};return"localStorage"===a.Rd?e.localStorage:e.cookie}function Sa(a,b){b=b||{};return(b.Qd||"__mp_opt_in_out_")+
|
|
28
|
+
a}function zb(a,b){return Ra(b).get(Sa(a,b))}function nc(a){if(a&&a.vd)return!1;a=a&&a.window||n;var b=a.navigator||{},c=!1;e.h([b.doNotTrack,b.msDoNotTrack,a.doNotTrack],function(d){e.includes([!0,1,"1","yes"],d)&&(c=!0)});return c}function yb(a,b,c){e.mc(b)&&b.length?(c=c||{},Ra(c).set(Sa(b,c),a?1:0,e.Kf(c.dd)?c.dd:null,!!c.ed,!!c.jg,!!c.Ye,c.cd),c.track&&a&&c.track(c.Mg||"$opt_in",c.Og,{send_immediately:!0})):v.error("gdpr."+(a?"optIn":"optOut")+" called with an invalid token")}function Qa(a,b){return function(){var c=
|
|
29
|
+
!1;try{var d=b.call(this,"token"),f=b.call(this,"ignore_dnt"),g=b.call(this,"opt_out_tracking_persistence_type"),k=b.call(this,"opt_out_tracking_cookie_prefix"),h=b.call(this,"window");d&&(c=Ab(d,{vd:f,Rd:g,Qd:k,window:h}))}catch(p){v.error("Unexpected error when checking tracking opt-out status: "+p)}if(!c)return a.apply(this,arguments);c=arguments[arguments.length-1];"function"===typeof c&&c(0)}}var U=!1;if("undefined"===typeof window){var Bb={hostname:""};var n={crypto:{dh:function(){throw Error("unsupported");
|
|
30
|
+
}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:Bb,referrer:""},screen:{width:0,height:0},location:Bb,addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){},CustomEvent:function(){}}}else n=window;var Cb=n.setImmediate,Ia,Db=Object.prototype.toString,$b="undefined"!==typeof Cb?function(a){return Cb(a)}:setTimeout;try{Object.defineProperty({},"x",{});var ba=function(a,b,c,d){return Object.defineProperty(a,b,{value:c,writable:!0,
|
|
31
|
+
configurable:!1!==d})}}catch(a){ba=function(b,c,d){b[c]=d;return b}}var hb=function(){function a(f,g){this.df=f;this.self=g;this.next=void 0}var b,c,d;return{add:function(f,g){d=new a(f,g);c?c.next=d:b=d;c=d;d=void 0},$e:function(){var f=b;for(b=c=Ia=void 0;f;)f.df.call(f.self),f=f.next}}}();var Eb=ba({},"constructor",W,!1);W.prototype=Eb;ba(Eb,"__NPO__",0,!1);ba(W,"resolve",function(a){return a&&"object"===typeof a&&1===a.__NPO__?a:new this(function(b,c){if("function"!==typeof b||"function"!==typeof c)throw TypeError("Not a function");
|
|
32
|
+
b(a)})});ba(W,"reject",function(a){return new this(function(b,c){if("function"!==typeof b||"function"!==typeof c)throw TypeError("Not a function");c(a)})});ba(W,"all",function(a){var b=this;return"[object Array]"!==Db.call(a)?b.reject(TypeError("Not an array")):0===a.length?b.resolve([]):new b(function(c,d){if("function"!==typeof c||"function"!==typeof d)throw TypeError("Not a function");var f=a.length,g=Array(f),k=0;lb(b,a,function(h,p){g[h]=p;++k===f&&c(g)},d)})});ba(W,"race",function(a){var b=
|
|
33
|
+
this;return"[object Array]"!==Db.call(a)?b.reject(TypeError("Not an array")):new b(function(c,d){if("function"!==typeof c||"function"!==typeof d)throw TypeError("Not a function");lb(b,a,function(f,g){c(g)},d)})});var C="undefined"!==typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?Promise:W;var xa=Array.prototype,Fb=Object.prototype,ca=xa.slice,oa=Fb.toString,ya=Fb.hasOwnProperty,I=n.console,Y=n.navigator,z=n.document,za=n.opera,Gb=n.screen,L=Y.userAgent,Ta=Function.prototype.bind,
|
|
34
|
+
Hb=xa.forEach,Ib=xa.indexOf,Jb=xa.map,pc=Array.isArray,Ua={},e={trim:function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},v={log:function(){if(U&&!e.m(I)&&I)try{I.log.apply(I,arguments)}catch(a){e.h(arguments,function(b){I.log(b)})}},warn:function(){if(U&&!e.m(I)&&I){var a=["Mixpanel warning:"].concat(e.Ea(arguments));try{I.warn.apply(I,a)}catch(b){e.h(a,function(c){I.warn(c)})}}},error:function(){if(U&&!e.m(I)&&I){var a=["Mixpanel error:"].concat(e.Ea(arguments));try{I.error.apply(I,
|
|
35
|
+
a)}catch(b){e.h(a,function(c){I.error(c)})}}},i:function(){if(!e.m(I)&&I){var a=["Mixpanel error:"].concat(e.Ea(arguments));try{I.error.apply(I,a)}catch(b){e.h(a,function(c){I.error(c)})}}}};e.bind=function(a,b){var c;if(Ta&&a.bind===Ta)return Ta.apply(a,ca.call(arguments,1));if(!e.ha(a))throw new TypeError;var d=ca.call(arguments,2);return c=function(){if(!(this instanceof c))return a.apply(b,d.concat(ca.call(arguments)));var f={};f.prototype=a.prototype;var g=new f;f.prototype=null;f=a.apply(g,
|
|
36
|
+
d.concat(ca.call(arguments)));return Object(f)===f?f:g}};e.h=function(a,b,c){if(null!==a&&void 0!==a)if(Hb&&a.forEach===Hb)a.forEach(b,c);else if(a.length===+a.length)for(var d=0,f=a.length;d<f&&!(d in a&&b.call(c,a[d],d,a)===Ua);d++);else for(d in a)if(ya.call(a,d)&&b.call(c,a[d],d,a)===Ua)break};e.extend=function(a){e.h(ca.call(arguments,1),function(b){for(var c in b)void 0!==b[c]&&(a[c]=b[c])});return a};e.isArray=pc||function(a){return"[object Array]"===oa.call(a)};e.ha=function(a){return"function"===
|
|
37
|
+
typeof a};e.Hf=function(a){return!(!a||!ya.call(a,"callee"))};e.Ea=function(a){return a?a.Ea?a.Ea():e.isArray(a)||e.Hf(a)?ca.call(a):e.values(a):[]};e.map=function(a,b,c){if(Jb&&a.map===Jb)return a.map(b,c);var d=[];e.h(a,function(f){d.push(b.call(c,f))});return d};e.keys=function(a){var b=[];if(null===a)return b;e.h(a,function(c,d){b[b.length]=d});return b};e.values=function(a){var b=[];if(null===a)return b;e.h(a,function(c){b[b.length]=c});return b};e.kc=function(a,b){var c=!1;if(null===a)return c;
|
|
38
|
+
if(Ib&&a.indexOf===Ib)return-1!=a.indexOf(b);e.h(a,function(d){if(c||(c=d===b))return Ua});return c};e.includes=function(a,b){return-1!==a.indexOf(b)};e.xd=function(a,b){a.prototype=new b;a.prototype.constructor=a;a.Hg=b.prototype};e.l=function(a){return a===Object(a)&&!e.isArray(a)};e.N=function(a){if(e.l(a)){for(var b in a)if(ya.call(a,b))return!1;return!0}return!1};e.m=function(a){return void 0===a};e.mc=function(a){return"[object String]"==oa.call(a)};e.If=function(a){return"[object Date]"==oa.call(a)};
|
|
39
|
+
e.Kf=function(a){return"[object Number]"==oa.call(a)};e.Jf=function(a){return!(!a||1!==a.nodeType)};e.Yb=function(a){e.h(a,function(b,c){e.If(b)?a[c]=e.ef(b):e.l(b)&&(a[c]=e.Yb(b))});return a};e.timestamp=function(){Date.now=Date.now||function(){return+new Date};return Date.now()};e.ef=function(a){function b(c){return 10>c?"0"+c:c}return a.getUTCFullYear()+"-"+b(a.getUTCMonth()+1)+"-"+b(a.getUTCDate())+"T"+b(a.getUTCHours())+":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds())};e.Da=function(a){var b=
|
|
40
|
+
{};e.h(a,function(c,d){e.mc(c)&&0<c.length&&(b[d]=c)});return b};e.truncate=function(a,b){if("string"===typeof a)var c=a.slice(0,b);else e.isArray(a)?(c=[],e.h(a,function(d){c.push(e.truncate(d,b))})):e.l(a)?(c={},e.h(a,function(d,f){c[f]=e.truncate(d,b)})):c=a;return c};e.Gc=function(){return function(a){function b(d,f){var g="";var k="";var h=g;(f=f[d])&&"object"===typeof f&&"function"===typeof f.toJSON&&(f=f.toJSON(d));switch(typeof f){case "string":return c(f);case "number":return isFinite(f)?
|
|
41
|
+
String(f):"null";case "boolean":case "null":return String(f);case "object":if(!f)return"null";g+=" ";d=[];if("[object Array]"===oa.apply(f)){var p=f.length;for(k=0;k<p;k+=1)d[k]=b(k,f)||"null";return p=0===d.length?"[]":g?"[\n"+g+d.join(",\n"+g)+"\n"+h+"]":"["+d.join(",")+"]"}for(k in f)ya.call(f,k)&&(p=b(k,f))&&d.push(c(k)+(g?": ":":")+p);return p=0===d.length?"{}":g?"{"+d.join(",")+h+"}":"{"+d.join(",")+"}"}}function c(d){var f=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
|
42
|
+
g={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};f.lastIndex=0;return f.test(d)?'"'+d.replace(f,function(k){var h=g[k];return"string"===typeof h?h:"\\u"+("0000"+k.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+d+'"'}return b("",{"":a})}}();e.Ga=function(){function a(){switch(h){case "t":return f("t"),f("r"),f("u"),f("e"),!0;case "f":return f("f"),f("a"),f("l"),f("s"),f("e"),!1;case "n":return f("n"),f("u"),f("l"),f("l"),null}g('Unexpected "'+h+'"')}function b(){for(;h&&
|
|
43
|
+
" ">=h;)f()}function c(){var m,t="",y;if('"'===h)for(;f();){if('"'===h)return f(),t;if("\\"===h)if(f(),"u"===h){for(m=y=0;4>m;m+=1){var w=parseInt(f(),16);if(!isFinite(w))break;y=16*y+w}t+=String.fromCharCode(y)}else if("string"===typeof p[h])t+=p[h];else break;else t+=h}g("Bad string")}function d(){var m="";"-"===h&&(m="-",f("-"));for(;"0"<=h&&"9">=h;)m+=h,f();if("."===h)for(m+=".";f()&&"0"<=h&&"9">=h;)m+=h;if("e"===h||"E"===h){m+=h;f();if("-"===h||"+"===h)m+=h,f();for(;"0"<=h&&"9">=h;)m+=h,f()}m=
|
|
44
|
+
+m;if(isFinite(m))return m;g("Bad number")}function f(m){m&&m!==h&&g("Expected '"+m+"' instead of '"+h+"'");h=r.charAt(k);k+=1;return h}function g(m){m=new SyntaxError(m);m.Zg=k;m.text=r;throw m;}var k,h,p={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},r;var q=function(){b();switch(h){case "{":a:{var m={};if("{"===h){f("{");b();if("}"===h){f("}");var t=m;break a}for(;h;){t=c();b();f(":");Object.hasOwnProperty.call(m,t)&&g('Duplicate key "'+t+'"');m[t]=q();b();if("}"===h){f("}");t=
|
|
45
|
+
m;break a}f(",");b()}}g("Bad object");t=void 0}return t;case "[":a:{t=[];if("["===h){f("[");b();if("]"===h){f("]");break a}for(;h;){t.push(q());b();if("]"===h){f("]");break a}f(",");b()}}g("Bad array");t=void 0}return t;case '"':return c();case "-":return d();default:return"0"<=h&&"9">=h?d():a()}};return function(m){r=m;k=0;h=" ";m=q();b();h&&g("Syntax error");return m}}();e.Pe=function(a){var b=0,c=0,d=[];if(!a)return a;a=e.Xg(a);do{var f=a.charCodeAt(b++);var g=a.charCodeAt(b++);var k=a.charCodeAt(b++);
|
|
46
|
+
var h=f<<16|g<<8|k;f=h>>18&63;g=h>>12&63;k=h>>6&63;h&=63;d[c++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(k)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)}while(b<a.length);b=d.join("");switch(a.length%3){case 1:b=b.slice(0,-2)+"==";break;case 2:b=b.slice(0,-1)+"="}return b};e.Xg=
|
|
47
|
+
function(a){a=(a+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");var b="",c,d;var f=c=0;var g=a.length;for(d=0;d<g;d++){var k=a.charCodeAt(d),h=null;128>k?c++:h=127<k&&2048>k?String.fromCharCode(k>>6|192,k&63|128):String.fromCharCode(k>>12|224,k>>6&63|128,k&63|128);null!==h&&(c>f&&(b+=a.substring(f,c)),b+=h,f=c=d+1)}c>f&&(b+=a.substring(f,a.length));return b};e.Ha=function(){try{return n.crypto.randomUUID()}catch(c){for(var a=Array(36),b=0;36>b;b++)a[b]=Math.floor(16*Math.random());a[14]=4;a[19]=a[19]&=
|
|
48
|
+
-5;a[19]=a[19]|=8;a[8]=a[13]=a[18]=a[23]="-";return e.map(a,function(d){return d.toString(16)}).join("")}};var Kb="ahrefsbot;ahrefssiteaudit;amazonbot;baiduspider;bingbot;bingpreview;chrome-lighthouse;facebookexternal;petalbot;pinterest;screaming frog;yahoo! slurp;yandex;adsbot-google;apis-google;duplexweb-google;feedfetcher-google;google favicon;google web preview;google-read-aloud;googlebot;googleweblight;mediapartners-google;storebot-google".split(";");e.yd=function(a){var b;a=a.toLowerCase();
|
|
49
|
+
for(b=0;b<Kb.length;b++)if(-1!==a.indexOf(Kb[b]))return!0;return!1};e.Hb=function(a){var b,c,d,f=[];e.m(b)&&(b="&");e.h(a,function(g,k){c=encodeURIComponent(g.toString());d=encodeURIComponent(k);f[f.length]=d+"="+c});return f.join(b)};e.ec=function(a,b){b=b.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");a=(new RegExp("[\\?&]"+b+"=([^&#]*)")).exec(a);if(null===a||a&&"string"!==typeof a[1]&&a[1].length)return"";a=a[1];try{a=decodeURIComponent(a)}catch(c){v.error("Skipping decoding for malformed query param: "+
|
|
50
|
+
a)}return a.replace(/\+/g," ")};e.cookie={get:function(a){a+="=";for(var b=z.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return null},parse:function(a){try{var b=e.Ga(e.cookie.get(a))||{}}catch(c){}return b},eh:function(a,b,c,d,f,g,k){var h="",p="",r="";k?h="; domain="+k:d&&(h=(h=eb(z.location.hostname))?"; domain=."+h:"");c&&(p=new Date,p.setTime(p.getTime()+1E3*c),p=
|
|
51
|
+
"; expires="+p.toGMTString());g&&(f=!0,r="; SameSite=None");f&&(r+="; secure");z.cookie=a+"="+encodeURIComponent(b)+p+"; path=/"+h+r},set:function(a,b,c,d,f,g,k){var h="",p="",r="";k?h="; domain="+k:d&&(h=(h=eb(z.location.hostname))?"; domain=."+h:"");c&&(p=new Date,p.setTime(p.getTime()+864E5*c),p="; expires="+p.toGMTString());g&&(f=!0,r="; SameSite=None");f&&(r+="; secure");a=a+"="+encodeURIComponent(b)+p+"; path=/"+h+r;return z.cookie=a},remove:function(a,b,c){e.cookie.set(a,"",-1,b,!1,!1,c)}};
|
|
52
|
+
var Fa=null,Va=null,Lb=null,Mb=null;try{Lb=n.localStorage,Mb=n.sessionStorage}catch(a){}e.localStorage=mb(Lb,"localStorage",ua);e.sessionStorage=mb(Mb,"sessionStorage",function(a,b){return null===Va||b?Va=gb(a||n.sessionStorage):Va});e.Wd=function(){function a(c,d,f){return function(g){if(g=g||b(n.event)){var k=!0,h;e.ha(f)&&(h=f(g));g=d.call(c,g);if(!1===h||!1===g)k=!1;return k}}}function b(c){c&&(c.preventDefault=b.preventDefault,c.stopPropagation=b.stopPropagation);return c}b.preventDefault=function(){this.returnValue=
|
|
53
|
+
!1};b.stopPropagation=function(){this.cancelBubble=!0};return function(c,d,f,g,k){c?c.addEventListener&&!g?c.addEventListener(d,f,!!k):(d="on"+d,c[d]=a(c,f,c[d])):v.error("No valid element provided to register_event")}}();var qc=/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/;e.Ze=function(){function a(f){return f.all?f.all:f.getElementsByTagName("*")}function b(f,g){g=" "+g+" ";return 0<=(" "+f.className+" ").replace(d," ").indexOf(g)}function c(f){if(!z.getElementsByTagName)return[];f=f.split(" ");
|
|
54
|
+
var g,k,h,p,r=[z];for(k=0;k<f.length;k++){var q=f[k].replace(/^\s+/,"").replace(/\s+$/,"");if(-1<q.indexOf("#")){var m=q.split("#");q=m[0];r=z.getElementById(m[1]);if(!r||q&&r.nodeName.toLowerCase()!=q)return[];r=[r]}else if(-1<q.indexOf(".")){m=q.split(".");q=m[0];var t=m[1];q||(q="*");m=[];for(h=g=0;h<r.length;h++){var y="*"==q?a(r[h]):r[h].getElementsByTagName(q);for(p=0;p<y.length;p++)m[g++]=y[p]}r=[];for(h=q=0;h<m.length;h++)m[h].className&&e.mc(m[h].className)&&b(m[h],t)&&(r[q++]=m[h])}else if(m=
|
|
55
|
+
q.match(qc)){q=m[1];var w=m[2];t=m[3];var J=m[4];q||(q="*");m=[];for(h=g=0;h<r.length;h++)for(y="*"==q?a(r[h]):r[h].getElementsByTagName(q),p=0;p<y.length;p++)m[g++]=y[p];r=[];q=0;switch(t){case "=":t=function(x){return x.getAttribute(w)==J};break;case "~":t=function(x){return x.getAttribute(w).match(new RegExp("\\b"+J+"\\b"))};break;case "|":t=function(x){return x.getAttribute(w).match(new RegExp("^"+J+"-?"))};break;case "^":t=function(x){return 0===x.getAttribute(w).indexOf(J)};break;case "$":t=
|
|
56
|
+
function(x){return x.getAttribute(w).lastIndexOf(J)==x.getAttribute(w).length-J.length};break;case "*":t=function(x){return-1<x.getAttribute(w).indexOf(J)};break;default:t=function(x){return x.getAttribute(w)}}r=[];for(h=q=0;h<m.length;h++)t(m[h])&&(r[q++]=m[h])}else{m=[];for(h=g=0;h<r.length;h++)for(y=r[h].getElementsByTagName(q),p=0;p<y.length;p++)m[g++]=y[p];r=m}}return r}var d=/[\t\r\n]/g;return function(f){return e.Jf(f)?[f]:e.l(f)&&!e.m(f.length)?f:c.call(this,f)}}();var rc="utm_source utm_medium utm_campaign utm_content utm_term utm_id utm_source_platform utm_campaign_id utm_creative_format utm_marketing_tactic".split(" "),
|
|
57
|
+
sc="dclid fbclid gclid ko_click_id li_fat_id msclkid sccid ttclid twclid wbraid".split(" ");e.info={Na:function(a){var b="",c={};e.h(rc,function(d){b=e.ec(z.URL,d);b.length?c[d]=b:void 0!==a&&(c[d]=a)});return c},bd:function(){var a="",b={};e.h(sc,function(c){a=e.ec(z.URL,c);a.length&&(b[c]=a)});return b},Pf:function(){return e.extend(e.info.Na(),e.info.bd())},hg:function(a){return 0===a.search("https?://(.*)google.([^/?]*)")?"google":0===a.search("https?://(.*)bing.com")?"bing":0===a.search("https?://(.*)yahoo.com")?
|
|
58
|
+
"yahoo":0===a.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},ig:function(a){var b=e.info.hg(a),c={};null!==b&&(c.$search_engine=b,a=e.ec(a,"yahoo"!=b?"q":"p"),a.length&&(c.mp_keyword=a));return c},lb:function(a,b,c){b=b||"";return c||e.includes(a," OPR/")?e.includes(a,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(a)?"BlackBerry":e.includes(a,"IEMobile")||e.includes(a,"WPDesktop")?"Internet Explorer Mobile":e.includes(a,"SamsungBrowser/")?"Samsung Internet":e.includes(a,
|
|
59
|
+
"Edge")||e.includes(a,"Edg/")?"Microsoft Edge":e.includes(a,"FBIOS")?"Facebook Mobile":e.includes(a,"Whale/")?"Whale Browser":e.includes(a,"Chrome")?"Chrome":e.includes(a,"CriOS")?"Chrome iOS":e.includes(a,"UCWEB")||e.includes(a,"UCBrowser")?"UC Browser":e.includes(a,"FxiOS")?"Firefox iOS":e.includes(b,"Apple")?e.includes(a,"Mobile")?"Mobile Safari":"Safari":e.includes(a,"Android")?"Android Mobile":e.includes(a,"Konqueror")?"Konqueror":e.includes(a,"Firefox")?"Firefox":e.includes(a,"MSIE")||e.includes(a,
|
|
60
|
+
"Trident/")?"Internet Explorer":e.includes(a,"Gecko")?"Mozilla":""},Ub:function(a,b,c){b={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,
|
|
61
|
+
BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/}[e.info.lb(a,b,c)];return void 0===b?null:(a=a.match(b))?parseFloat(a[a.length-2]):null},Od:function(){return/Windows/i.test(L)?/Phone/.test(L)||/WPDesktop/.test(L)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(L)?"iOS":/Android/.test(L)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(L)?
|
|
62
|
+
"BlackBerry":/Mac/i.test(L)?"Mac OS X":/Linux/.test(L)?"Linux":/CrOS/.test(L)?"Chrome OS":""},jd:function(a){return/Windows Phone/i.test(a)||/WPDesktop/.test(a)?"Windows Phone":/iPad/.test(a)?"iPad":/iPod/.test(a)?"iPod Touch":/iPhone/.test(a)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(a)?"BlackBerry":/Android/.test(a)?"Android":""},Vd:function(a){a=a.split("/");return 3<=a.length?a[2]:""},ca:function(){return n.location.href},Wa:function(a){"object"!==typeof a&&(a={});return e.extend(e.Da({$os:e.info.Od(),
|
|
63
|
+
$browser:e.info.lb(L,Y.vendor,za),$referrer:z.referrer,$referring_domain:e.info.Vd(z.referrer),$device:e.info.jd(L)}),{$current_url:e.info.ca(),$browser_version:e.info.Ub(L,Y.vendor,za),$screen_height:Gb.height,$screen_width:Gb.width,mp_lib:"web",$lib_version:"2.78.0",$insert_id:Ea(),time:e.timestamp()/1E3},e.Da(a))},Zf:function(){return e.extend(e.Da({$os:e.info.Od(),$browser:e.info.lb(L,Y.vendor,za)}),{$browser_version:e.info.Ub(L,Y.vendor,za)})},Rf:function(){return e.Da({current_page_title:z.title,
|
|
64
|
+
current_domain:n.location.hostname,current_url_path:n.location.pathname,current_url_protocol:n.location.protocol,current_url_search:n.location.search})}};var Zb=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Yb=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,ja=null,Aa=null;"undefined"!==typeof JSON&&(ja=JSON.stringify,Aa=JSON.parse);ja=ja||e.Gc;Aa=Aa||e.Ga;e.info=e.info;e.info.browser=e.info.lb;e.info.browserVersion=e.info.Ub;e.info.device=e.info.jd;e.info.properties=e.info.Wa;e.isBlockedUA=e.yd;e.isEmptyObject=e.N;e.isObject=
|
|
65
|
+
e.l;e.JSONDecode=e.Ga;e.JSONEncode=e.Gc;e.toArray=e.Ea;e.NPO=W;var fc="clientX clientY offsetX offsetY pageX pageY screenX screenY x y".split(" "),rb=["mp-include"],Oa=["mp-no-track"],qb=Oa.concat(["mp-sensitive"]),cc="aria-label aria-labelledby aria-describedby href name role title type".split(" "),hc={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,
|
|
66
|
+
spinbutton:!0,"switch":!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},ic={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},jc={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},tb="onclick onmousedown onmouseup onpointerdown onpointerup ontouchend ontouchstart".split(" "),D=fa("autocapture");xb.prototype.Lf=function(a,b){b=b||{};var c=b.threshold_px||30,d=b.timeout_ms||
|
|
67
|
+
1E3,f=b.click_count||4;if(b.interactive_elements_only&&(b=wb(a),!b||ub(b)))return!1;b=Date.now();var g=a.pageX;a=a.pageY;var k=this.pa[this.pa.length-1];if(k&&b-k.timestamp<d&&Math.sqrt(Math.pow(g-k.x,2)+Math.pow(a-k.y,2))<c){if(this.pa.push({x:g,y:a,timestamp:b}),this.pa.length>=f)return this.pa=[],!0}else this.pa=[{x:g,y:a,timestamp:b}];return!1};ha.prototype.hf=function(a){if(this.P)return wb(a)};ha.prototype.Tf=function(a){if(this.P){a=vb(a);for(var b=0;b<a.length;b++){var c=a[b];c&&c.shadowRoot&&
|
|
68
|
+
this.Uf(c.shadowRoot)}}};ha.prototype.Uf=function(a){if(this.P&&!this.P.has(a)){var b=this;try{this.P.add(a);var c=new window.MutationObserver(function(){b.Xe()});c.observe(a,this.Vf);this.Eb.push(c)}catch(d){D.i("Error while observing shadow root",d)}}};ha.prototype.start=function(){this.P||("undefined"!==typeof WeakSet?this.P=new WeakSet:D.i("Shadow DOM observation unavailable: WeakSet not supported"))};ha.prototype.stop=function(){if(this.P){for(var a=0;a<this.Eb.length;a++)try{this.Eb[a].disconnect()}catch(b){D.i("Error while disconnecting shadow DOM observer",
|
|
69
|
+
b)}this.Eb=[];this.P=null}};var tc=["change","input","submit","select","toggle"],uc=["scrollend"],vc=["hashchange"],Nb={characterData:!0,childList:!0,subtree:!0,attributes:!0,attributeFilter:"style class hidden checked selected value display visibility".split(" ")};R.prototype.Ie=function(a){var b=this.K&&this.K.hf(a);b||(b=a.target||a.srcElement);if(!b||ub(b))return!1;this.K&&this.K.Tf(a);this.ja.push({element:b,event:a,timestamp:Date.now()});return!0};R.prototype.Lg=function(a,b){this.ua&&this.Ie(a)&&
|
|
70
|
+
this.Ug(b)};R.prototype.ff=function(a){if(0===this.ja.length)return[];a=a.timeout_ms;var b=Date.now(),c=this.ja.slice();this.ja=[];for(var d=[],f=0;f<c.length;f++){var g=c[f];b-g.timestamp>=a?this.vf(g.timestamp)||d.push(g):this.ja.push(g)}return d};R.prototype.vf=function(a){return this.nc>=a-100};R.prototype.ya=function(){this.nc=Date.now()};R.prototype.Ug=function(a){this.xa||(this.xa=!0,this.Td(a))};R.prototype.Td=function(a){if(this.ua&&this.Md){var b=this;this.Db=setTimeout(function(){if(b.xa){for(var c=
|
|
71
|
+
b.ff(a),d=0;d<c.length;d++)b.Md(c[d].event);0<b.ja.length?b.Td(a):b.xa=!1}},a.timeout_ms)}else this.xa=!1};R.prototype.yg=function(){if(!this.ua){this.ua=!0;var a=this;tc.forEach(function(c){function d(){a.ya()}document.addEventListener(c,d,{capture:!0,passive:!0});a.ea.push({target:document,event:c,tb:d,options:{capture:!0,passive:!0}})});vc.forEach(function(c){function d(){a.ya()}window.addEventListener(c,d);a.ea.push({target:window,event:c,tb:d})});uc.forEach(function(c){function d(){a.ya()}window.addEventListener(c,
|
|
72
|
+
d,{passive:!0});a.ea.push({target:window,event:c,tb:d,options:{passive:!0}})});var b=function(){a.ya()};document.addEventListener("selectionchange",b);a.ea.push({target:document,event:"selectionchange",tb:b});if(window.MutationObserver)try{this.Ta=new window.MutationObserver(function(){a.ya()}),this.Ta.observe(document.body||document.documentElement,Nb)}catch(c){D.i("Error while setting up mutation observer",c)}if(window.customElements)try{this.K=new ha(function(){a.ya()},Nb),this.K.start()}catch(c){D.i("Error while setting up shadow DOM observer",
|
|
73
|
+
c),this.K=null}}};R.prototype.Eg=function(){if(this.ua){this.ua=!1;this.ja=[];this.nc=0;this.xa=!1;this.Db&&(clearTimeout(this.Db),this.Db=null);for(var a=0;a<this.ea.length;a++){var b=this.ea[a];try{b.target.removeEventListener(b.event,b.tb,b.options)}catch(c){D.i("Error while removing event listener",c)}}this.ea=[];if(this.Ta){try{this.Ta.disconnect()}catch(c){D.i("Error while disconnecting mutation observer",c)}this.Ta=null}if(this.K){try{this.K.stop()}catch(c){D.i("Error while stopping shadow DOM observer",
|
|
74
|
+
c)}this.K=null}}};var Ob={allow_selectors:[],allow_url_regexes:[],block_attrs:[],block_element_callback:null,block_selectors:[],block_url_regexes:[],capture_extra_attrs:[],capture_text_content:!1,scroll_capture_all:!1,scroll_depth_percent_checkpoints:[25,50,75,100],click:!0,dead_click:!0,input:!0,pageview:"full-url",rage_click:!0,scroll:!0,page_leave:!1,submit:!0},pa={$mp_autocapture:!0};H.prototype.D=function(){try{var a=!!z.createElement("div").matches}catch(b){a=!1}a?(this.Bf(),this.Cf(),this.xf(),
|
|
75
|
+
this.yf(),this.zf(),this.Ef(),this.Ff(),this.Df(),this.Af()):D.i("Autocapture unavailable: missing required DOM APIs")};H.prototype.cc=function(){var a=this.u.g("autocapture");return a?e.l(a)?e.extend({},Ob,a):Ob:{}};H.prototype.o=function(a){return this.cc()[a]};H.prototype.V=function(){var a=e.info.ca(),b=this.o("allow_url_regexes")||[];if(b.length)try{return!db(a,b)}catch(c){return D.i("Error while checking block URL regexes: ",c),!0}b=this.o("block_url_regexes")||[];if(!b||!b.length)return!1;
|
|
76
|
+
try{return db(a,b)}catch(c){return D.i("Error while checking block URL regexes: ",c),!0}};H.prototype.rc=function(){return this.u.g("autocapture")?this.o("pageview"):this.u.g("track_pageview")};H.prototype.$a=function(a,b){if(!this.V()){var c=this.u.va()&&("$mp_click"===b&&!this.o("click")||"$mp_rage_click"===b&&!this.na("rage_click")||"$mp_dead_click"===b&&!this.na("dead_click"));if(a=dc(a,{Me:this.o("allow_element_callback"),Ne:this.o("allow_selectors"),Qe:this.o("block_attrs"),Re:this.o("block_element_callback"),
|
|
77
|
+
Se:this.o("block_selectors"),Ue:this.o("capture_extra_attrs"),Ve:this.o("capture_text_content"),We:c}))e.extend(a,pa),this.u.track(b,a)}};H.prototype.Bf=function(){n.removeEventListener("popstate",this.Hd);n.removeEventListener("hashchange",this.Cd);if(this.rc()||this.o("page_leave")||this.u.g("record_heatmap_data")){this.Hd=function(){n.dispatchEvent(new Event("mp_locationchange"))};this.Cd=function(){n.dispatchEvent(new Event("mp_locationchange"))};n.addEventListener("popstate",this.Hd);n.addEventListener("hashchange",
|
|
78
|
+
this.Cd);var a=n.history.pushState;"function"===typeof a&&(n.history.pushState=function(c,d,f){a.call(n.history,c,d,f);n.dispatchEvent(new Event("mp_locationchange"))});var b=n.history.replaceState;"function"===typeof b&&(n.history.replaceState=function(c,d,f){b.call(n.history,c,d,f);n.dispatchEvent(new Event("mp_locationchange"))})}};H.prototype.na=function(a){return(a=this.o(a))?!0===a?{}:"object"===typeof a?a:{}:null};H.prototype.Wc=function(a,b,c){if(!this.ic&&(this.o("page_leave")||this.u.va())){this.ic=
|
|
79
|
+
!0;var d=Math.max(z.documentElement.clientHeight,n.innerHeight||0),f=Math.round(Math.max(this.wa-d,0)/(c-d)*100),g=Math.round(d/c*100);c<=d&&(g=f=100);a=e.extend({$max_scroll_view_depth:this.wa,$max_scroll_percentage:f,$fold_line_percentage:g,$scroll_height:c,$event_type:a.type,$current_url:b||e.info.ca(),$viewportHeight:d,$viewportWidth:Math.max(z.documentElement.clientWidth,n.innerWidth||0),$captured_for_heatmap:this.u.va()},pa);this.u.track("$mp_page_leave",a,{Fb:"sendBeacon"})}};H.prototype.Ae=
|
|
80
|
+
function(){n.removeEventListener("scroll",this.pc);n.removeEventListener("scrollend",this.pc);if(this.u.g("record_heatmap_data")){D.log("Initializing scroll depth tracking");this.wa=Math.max(z.documentElement.clientHeight,n.innerHeight||0);var a=function(){if(!this.V()){var b=Math.max(z.documentElement.clientHeight,n.innerHeight||0)+n.scrollY;b>this.wa&&(this.wa=b);this.Va=z.body.scrollHeight}}.bind(this);a=sb(a);this.pc=a.listener;n.addEventListener(a.ld,this.pc)}};H.prototype.xf=function(){n.removeEventListener("click",
|
|
81
|
+
this.Bd);if(this.o("click")||this.u.g("record_heatmap_data"))D.log("Initializing click tracking"),this.Bd=function(a){(this.o("click")||this.u.va())&&this.$a(a,"$mp_click")}.bind(this),n.addEventListener("click",this.Bd)};H.prototype.yf=function(){this.na("dead_click")||this.u.g("record_heatmap_data")?(D.log("Initializing dead click tracking"),this.la||(this.la=new R(function(a){this.$a(a,"$mp_dead_click")}.bind(this)),this.la.yg()),this.Qa||(this.Qa=function(a){var b=this.na("dead_click");!b&&!this.u.va()||
|
|
82
|
+
this.V()||(b=b||{},b.timeout_ms||(b.timeout_ms=500),this.la.Lg(a,b))}.bind(this),n.addEventListener("click",this.Qa))):this.Cg()};H.prototype.zf=function(){n.removeEventListener("change",this.Ad);this.o("input")&&(D.log("Initializing input tracking"),this.Ad=function(a){this.o("input")&&this.$a(a,"$mp_input_change")}.bind(this),n.addEventListener("change",this.Ad))};H.prototype.Cf=function(){n.removeEventListener("mp_locationchange",this.Dd);if(this.rc()){D.log("Initializing pageview tracking");var a=
|
|
83
|
+
"",b=!1;this.V()||(b=this.u.Cc(pa));b&&(a=e.info.ca());this.Dd=ea(function(){if(!this.V()){var c=e.info.ca(),d=!1,f=c.split("#")[0].split("?")[0]!==a.split("#")[0].split("?")[0],g=this.rc();"full-url"===g?d=c!==a:"url-with-path-and-query-string"===g?d=c.split("#")[0]!==a.split("#")[0]:"url-with-path"===g&&(d=f);d&&(this.u.Cc(pa)&&(a=c),f&&(this.xb=0,D.log("Path change: re-initializing scroll depth checkpoints")))}}.bind(this));n.addEventListener("mp_locationchange",this.Dd)}};H.prototype.Df=function(){n.removeEventListener("click",
|
|
84
|
+
this.Id);if(this.na("rage_click")||this.u.g("record_heatmap_data"))D.log("Initializing rage click tracking"),this.Sc||(this.Sc=new xb),this.Id=function(a){var b=this.na("rage_click");if(b||this.u.va())this.V()||this.Sc.Lf(a,b)&&this.$a(a,"$mp_rage_click")}.bind(this),n.addEventListener("click",this.Id)};H.prototype.Ef=function(){n.removeEventListener("scrollend",this.oc);n.removeEventListener("scroll",this.oc);if(this.o("scroll")){D.log("Initializing scroll tracking");this.xb=0;var a=function(){if(this.o("scroll")&&
|
|
85
|
+
!this.V()){var b=this.o("scroll_capture_all"),c=(this.o("scroll_depth_percent_checkpoints")||[]).slice().sort(function(p,r){return p-r}),d=n.scrollY,f=e.extend({$scroll_top:d},pa);try{var g=z.body.scrollHeight,k=Math.round(d/(g-n.innerHeight)*100);f.$scroll_height=g;f.$scroll_percentage=k;if(k>this.xb)for(d=0;d<c.length;d++){var h=c[d];k>=h&&this.xb<h&&(this.xb=f.$scroll_checkpoint=h,b=!0)}}catch(p){D.i("Error while calculating scroll percentage",p)}b&&this.u.track("$mp_scroll",f)}}.bind(this);a=
|
|
86
|
+
sb(a);this.oc=a.listener;n.addEventListener(a.ld,this.oc)}};H.prototype.Ff=function(){n.removeEventListener("submit",this.Jd);this.o("submit")&&(D.log("Initializing submit tracking"),this.Jd=function(a){this.o("submit")&&this.$a(a,"$mp_submit")}.bind(this),n.addEventListener("submit",this.Jd))};H.prototype.Af=function(){z.removeEventListener("visibilitychange",this.Fd);n.removeEventListener("mp_locationchange",this.Ed);n.removeEventListener("load",this.Gd);if(this.o("page_leave")||this.u.g("record_heatmap_data")){D.log("Initializing page visibility tracking.");
|
|
87
|
+
this.Ae();var a=e.info.ca();this.Gd=function(){this.Va=z.body.scrollHeight}.bind(this);n.addEventListener("load",this.Gd);this.Ed=ea(function(b){if(!this.V()){var c=e.info.ca();c!==a&&(this.Wc(b,a,this.Va),a=c,this.wa=Math.max(z.documentElement.clientHeight,n.innerHeight||0),this.Va=z.body.scrollHeight,this.ic=!1)}}.bind(this));n.addEventListener("mp_locationchange",this.Ed);this.Fd=function(b){z.hidden&&this.Wc(b,a,this.Va)}.bind(this);z.addEventListener("visibilitychange",this.Fd)}};H.prototype.Cg=
|
|
88
|
+
function(){this.Qa&&(n.removeEventListener("click",this.Qa),this.Qa=null);this.la&&(this.la.Eg(),this.la=null)};Ga(H);var F=fa("flags"),Pb={context:{}};u.prototype.D=function(){this.Qf()?(this.flags=null,this.pb().catch(function(){F.error("Error fetching flags during init")}),this.Dc=new Set,this.Ua={},this.oa={}):F.i("Feature Flags unavailable: missing minimum required APIs")};u.prototype.cc=function(){var a=this.B("flags");return a?e.l(a)?e.extend({},Pb,a):Pb:{}};u.prototype.o=function(a){return this.cc()[a]};
|
|
89
|
+
u.prototype.wb=function(){return!!this.B("flags")};u.prototype.Vg=function(a,b){if(!this.wb())return F.i("Feature Flags not enabled, cannot update context"),Promise.resolve();var c=this.B("flags");e.l(c)||(c={});b=b&&b.replace?{}:this.o("context");c.context=e.extend({},b,a);a={};a.flags=c;this.og(a);return this.pb().catch(function(){F.error("Error fetching flags during updateContext")})};u.prototype.Xc=function(){this.wb()||F.error("Feature Flags not enabled");return!!this.flags};u.prototype.pb=function(){if(!this.wb())return Promise.resolve();
|
|
90
|
+
var a=this.dc("distinct_id"),b=this.dc("$device_id"),c=fb();F.log("Fetching flags for distinct ID: "+a);a=e.extend({distinct_id:a,device_id:b},this.o("context"));b=new URLSearchParams;b.set("context",JSON.stringify(a));b.set("token",this.B("token"));b.set("mp_lib","web");b.set("$lib_version","2.78.0");a=this.rb()+"?"+b.toString();this.Ja=Date.now();return this.ta=this.fetch.call(n,a,{method:"GET",headers:{Authorization:"Basic "+btoa(this.B("token")+":"),traceparent:c}}).then(function(d){this.Kd();
|
|
91
|
+
return d.json()}.bind(this)).then(function(d){var f=d.flags;if(!f)throw Error("No flags in API response");var g=new Map,k={};e.h(f,function(h,p){var r=!1,q=p+":";e.h(this.oa,function(m,t){t.startsWith(q)&&(r=!0)});r?(h=this.flags&&this.flags.get(p))&&g.set(p,h):g.set(p,{key:h.variant_key,value:h.variant_value,experiment_id:h.experiment_id,is_experiment_active:h.is_experiment_active,is_qa_tester:h.is_qa_tester})},this);(d=d.pending_first_time_events)&&0<d.length&&e.h(d,function(h){var p=h.flag_key,
|
|
92
|
+
r=p+":"+h.first_time_event_hash;this.oa[r]||(k[r]={flag_key:p,flag_id:h.flag_id,project_id:h.project_id,first_time_event_hash:h.first_time_event_hash,event_name:h.event_name,property_filters:h.property_filters,pending_variant:h.pending_variant})},this);this.oa&&e.h(this.oa,function(h,p){p=p.split(":")[0];h&&!g.has(p)&&this.flags&&this.flags.has(p)&&g.set(p,this.flags.get(p))},this);this.flags=g;this.Ua=k;this.He=c;this.Ce()}.bind(this)).catch(function(d){this.Ja&&this.Kd();F.error(d);throw d;}.bind(this))};
|
|
93
|
+
u.prototype.Of=function(){return this.wb()?this.Dc?this.Ja?this.ta:this.pb():(F.error("loadFlags called before init"),Promise.resolve()):Promise.resolve()};u.prototype.Kd=function(){this.Ja?(this.Nc=this.Ja,this.Mc=Date.now(),this.we=this.Mc-this.Nc,this.Ja=null):F.error("Fetch in progress started time not set, cannot mark fetch complete")};u.prototype.Ce=function(){var a=!1;e.h(this.Ua,function(b){b.property_filters&&!e.N(b.property_filters)&&(a=!0)});a&&this.od().then(function(){F.log("targeting loaded for property filter evaluation")})};
|
|
94
|
+
u.prototype.od=function(){return cb(this.X.bind(this),this.ka).catch(function(a){F.error("Failed to load targeting: "+a)}.bind(this))};u.prototype.Zc=function(a,b){this.Ua&&!e.N(this.Ua)&&(n.__mp_targeting&&e.ha(n.__mp_targeting.then)?n.__mp_targeting.then(function(c){this.Ob(a,b,c)}.bind(this)).catch(function(){this.Ob(a,b,null)}.bind(this)):this.Ob(a,b,null))};u.prototype.Ob=function(a,b,c){e.h(this.Ua,function(d,f){if(!this.oa[f]){var g=d.flag_key;if(c||!d.property_filters||e.N(d.property_filters)){var k=
|
|
95
|
+
c?c.eventMatchesCriteria(a,b,{event_name:d.event_name,property_filters:d.property_filters}):{matches:a===d.event_name,error:null};k.error?F.error('Error checking first-time event for flag "'+g+'": '+k.error):k.matches&&(F.log('First-time event matched for flag "'+g+'": '+a),this.flags.set(g,{key:d.pending_variant.variant_key,value:d.pending_variant.variant_value,experiment_id:d.pending_variant.experiment_id,is_experiment_active:d.pending_variant.is_experiment_active}),this.oa[f]=!0,this.$f(d.flag_id,
|
|
96
|
+
d.project_id,d.first_time_event_hash))}else F.warn('Skipping event check for "'+g+'" - property filters require targeting library')}},this)};u.prototype.kf=function(a){return this.rb()+"/"+a+"/first-time-events"};u.prototype.$f=function(a,b,c){var d=this.dc("distinct_id"),f=fb(),g=new URLSearchParams;g.set("mp_lib","web");g.set("$lib_version","2.78.0");g=this.kf(a)+"?"+g.toString();b={distinct_id:d,project_id:b,first_time_event_hash:c};F.log("Recording first-time event for flag: "+a);this.fetch.call(n,
|
|
97
|
+
g,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Basic "+btoa(this.B("token")+":"),traceparent:f},body:JSON.stringify(b)}).catch(function(k){F.error("Failed to record first-time event for flag "+a+": "+k)})};u.prototype.pd=function(a,b){return this.ta?this.ta.then(function(){return this.fc(a,b)}.bind(this)).catch(function(c){F.error(c);return b}):new Promise(function(c){F.i("Feature Flags not initialized");c(b)})};u.prototype.fc=function(a,b){if(!this.Xc())return F.log("Flags not loaded yet"),
|
|
98
|
+
b;var c=this.flags.get(a);if(!c)return F.log('No flag found: "'+a+'"'),b;this.Ng(a,c);return c};u.prototype.hc=function(a,b){return this.pd(a,{value:b}).then(function(c){return c.value}).catch(function(c){F.error(c);return b})};u.prototype.jf=function(a,b){F.i("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead.");return this.hc(a,b)};u.prototype.qd=function(a,b){return this.fc(a,{value:b}).value};u.prototype.isEnabled=
|
|
99
|
+
function(a,b){return this.hc(a).then(function(){return this.zd(a,b)}.bind(this)).catch(function(c){F.error(c);return b})};u.prototype.zd=function(a,b){b=b||!1;var c=this.qd(a,b);!0!==c&&!1!==c&&(F.error('Feature flag "'+a+'" value: '+c+" is not a boolean; returning fallback value: "+b),c=b);return c};u.prototype.Ng=function(a,b){this.Dc.has(a)||(this.Dc.add(a),a={"Experiment name":a,"Variant name":b.key,$experiment_type:"feature_flag","Variant fetch start time":(new Date(this.Nc)).toISOString(),"Variant fetch complete time":(new Date(this.Mc)).toISOString(),
|
|
100
|
+
"Variant fetch latency (ms)":this.we,"Variant fetch traceparent":this.He},"undefined"!==b.experiment_id&&(a.$experiment_id=b.experiment_id),"undefined"!==b.is_experiment_active&&(a.$is_experiment_active=b.is_experiment_active),"undefined"!==b.is_qa_tester&&(a.$is_qa_tester=b.is_qa_tester),this.track("$experiment_started",a))};u.prototype.Yg=function(){return this.ta?this.ta:Promise.resolve()};u.prototype.Qf=function(){return!!this.fetch&&"undefined"!==typeof Promise&&"undefined"!==typeof Map&&"undefined"!==
|
|
101
|
+
typeof Set};Ga(u);u.prototype.are_flags_ready=u.prototype.Xc;u.prototype.get_variant=u.prototype.pd;u.prototype.get_variant_sync=u.prototype.fc;u.prototype.get_variant_value=u.prototype.hc;u.prototype.get_variant_value_sync=u.prototype.qd;u.prototype.is_enabled=u.prototype.isEnabled;u.prototype.is_enabled_sync=u.prototype.zd;u.prototype.load_flags=u.prototype.Of;u.prototype.update_context=u.prototype.Vg;u.prototype.when_ready=u.prototype.Yg;u.prototype.get_feature_data=u.prototype.jf;u.prototype.getTargeting=
|
|
102
|
+
u.prototype.od;var wc=["mixpanelRecordingEvents","mixpanelRecordingRegistry"];V.prototype.Oc=function(){return new C(function(a,b){var c=n.indexedDB.open("mixpanelBrowserDb",1);c.onerror=function(){b(c.error)};c.onsuccess=function(){a(c.result)};c.onupgradeneeded=function(d){var f=d.target.result;wc.forEach(function(g){f.createObjectStore(g)})}})};V.prototype.D=function(){if(!n.indexedDB)return C.reject("indexedDB is not supported in this browser");this.qa||(this.qa=this.Oc());return this.qa.then(function(a){return a instanceof
|
|
103
|
+
n.IDBDatabase?C.resolve():C.reject(a)})};V.prototype.Ab=function(a,b){function c(f){return new C(function(g,k){var h=f.transaction(d,a);h.oncomplete=function(){g(h)};h.onabort=h.onerror=function(){k(h.error)};b(h.objectStore(d))})}var d=this.Fg;return this.qa.then(c).catch(function(f){return f&&"InvalidStateError"===f.name?(this.qa=this.Oc(),this.qa.then(c)):C.reject(f)}.bind(this))};V.prototype.setItem=function(a,b){return this.Ab("readwrite",function(c){c.put(b,a)})};V.prototype.getItem=function(a){var b;
|
|
104
|
+
return this.Ab("readonly",function(c){b=c.get(a)}).then(function(){return b.result})};V.prototype.removeItem=function(a){return this.Ab("readwrite",function(b){b.delete(a)})};V.prototype.getAll=function(){var a;return this.Ab("readonly",function(b){a=b.getAll()}).then(function(){return a.result})};var xc=fa("recorder");K.prototype.vg=function(){if(this.B("disable_persistence"))return v.log("Load recorder check skipped due to disable_persistence config"),C.resolve(!1);var a=new V("mixpanelRecordingRegistry"),
|
|
105
|
+
b=this.pf();return a.D().then(function(){return a.getAll()}).then(function(c){for(var d=0;d<c.length;d++){var f=c[d],g=Date.now();if(!f||g>f.maxExpires||g>f.idleExpires||c[d].tabId===b)return!0}return!1}).catch(e.bind(function(c){this.s("Error checking recording registry",c);return!1},this))};K.prototype.Vb=function(a,b){if(!n.MutationObserver)return v.i("Browser does not support MutationObserver; skipping session recording"),C.resolve();var c=e.bind(function(f){return new C(e.bind(function(g){var k=
|
|
106
|
+
ea(e.bind(function(){this.C=this.C||new n.__mp_recorder(this.Bb);this.C.resumeRecording(f);g()},this));e.m(n.__mp_recorder)?this.X(this.tc||this.yb+"mixpanel-recorder-BjSlYaNJ.min.js",k):k()},this))},this),d=Xb(this.B("record_allowed_iframe_origins"),xc);if(0<d.length&&(this.Fe(d),n.parent!==n))return this.Ee(d,c),this.De(d),C.resolve();b=e.m(b)?this.B("record_sessions_percent"):b;b=0<b&&100*Math.random()<=b;return a||b?c(!0):this.vg().then(e.bind(function(f){return f?c(!1):C.resolve()},this))};K.prototype.Mf=
|
|
107
|
+
function(){if(!this.C||!e.ha(this.C.isRecording))return!1;try{return this.C.isRecording()}catch(a){return this.s("Error checking if recording is active",a),!1}};K.prototype.xg=function(a,b){var c=this.Mf(),d=this.B("recording_event_triggers");if(!c&&d&&(c=d[a])&&"number"===typeof c.percentage){var f=c.percentage,g=c.property_filters;g&&!e.N(g)?cb(this.X,this.ka||this.yb+"mixpanel-targeting-BSHal4N9.min.js").then(function(k){try{k.eventMatchesCriteria(a,b,{event_name:a,property_filters:g}).matches&&
|
|
108
|
+
this.Vb(!1,f)}catch(h){v.i("Could not parse recording event trigger properties logic:",h)}}.bind(this)).catch(function(k){v.i("Failed to load targeting library:",k)}):this.Vb(!1,f)}};K.prototype.Dg=function(){return this.C?this.C.stopRecording():C.resolve()};K.prototype.Xf=function(){return this.C?this.C.pauseRecording():C.resolve()};K.prototype.fg=function(){return this.C?this.C.resumeRecording():C.resolve()};K.prototype.Nf=function(){return this.sb()&&this.B("record_heatmap_data")};K.prototype.mf=
|
|
109
|
+
function(){var a={},b=this.sb();b&&(a.$mp_replay_id=b);return a};K.prototype.nf=function(){var a=null,b=this.sb();b&&(a="https://mixpanel.com/projects/replay-redirect?"+e.Hb({replay_id:b,distinct_id:this.nd(),token:this.B("token")}));return a};K.prototype.sb=function(){if(this.ib)return this.ib;var a=null;this.C&&(a=this.C.replayId);return a||null};K.prototype.Ee=function(a,b){if(!this.eb){var c=this;this.eb=function(d){-1!==a.indexOf(d.origin)&&(d=d.data)&&"mp_iframe_handshake_response"===d.type&&
|
|
110
|
+
d.token===c.B("token")&&d.replayId&&(c.ib=d.replayId,d.distinctId&&c.Bb.identify(d.distinctId),c.Qc=!1,n.removeEventListener("message",c.eb),c.eb=null,b(!0))};n.addEventListener("message",this.eb)}};K.prototype.Uc=function(a){var b={type:"mp_iframe_handshake_request"};b.token=this.B("token");for(var c=0;c<a.length;c++)try{n.parent.postMessage(b,a[c])}catch(d){}};K.prototype.De=function(a){function b(){setTimeout(function(){!c.Qc||c.ib||10<=++d||(c.Uc(a),f*=2,b())},f)}var c=this,d=0,f=50;this.Qc=!0;
|
|
111
|
+
this.Uc(a);b()};K.prototype.Fe=function(a){if(!this.Pc){var b=this;this.Pc=function(c){if(-1!==a.indexOf(c.origin)){var d=c.data;if(d&&"mp_iframe_handshake_request"===d.type&&d.token===b.B("token")&&(d=b.sb())){var f={type:"mp_iframe_handshake_response"};f.token=b.B("token");f.replayId=d;f.distinctId=b.nd();c.source.postMessage(f,c.origin)}}};n.addEventListener("message",this.Pc)}};Ga(K);S.prototype.nb=function(){};S.prototype.$b=function(){};S.prototype.Rb=function(){};S.prototype.D=function(a){this.u=
|
|
112
|
+
a;return this};S.prototype.track=function(a,b,c,d){var f=this,g=e.Ze(a);if(0===g.length)v.error("The DOM query ("+a+") returned 0 elements");else return e.h(g,function(k){e.Wd(k,this.Pd,function(h){var p={},r=f.nb(c,this),q=f.u.g("track_links_timeout");f.$b(h,this,p);window.setTimeout(f.ie(d,r,p,!0),q);f.u.track(b,r,f.ie(d,r,p))})},this),!0};S.prototype.ie=function(a,b,c,d){d=d||!1;var f=this;return function(){c.Te||(c.Te=!0,a&&!1===a(d,b)||f.Rb(c))}};S.prototype.nb=function(a,b){return"function"===
|
|
113
|
+
typeof a?a(b):e.extend({},a)};e.xd(da,S);da.prototype.nb=function(a,b){var c=da.Hg.nb.apply(this,arguments);b.href&&(c.url=b.href);return c};da.prototype.$b=function(a,b,c){c.Ld=2===a.which||a.metaKey||a.ctrlKey||"_blank"===b.target;c.href=b.href;c.Ld||a.preventDefault()};da.prototype.Rb=function(a){a.Ld||setTimeout(function(){window.location=a.href},0)};e.xd(ta,S);ta.prototype.$b=function(a,b,c){c.element=b;a.preventDefault()};ta.prototype.Rb=function(a){setTimeout(function(){a.element.submit()},
|
|
114
|
+
0)};var yc=fa("lock");ab.prototype.Fc=function(a,b){return new this.Ud(e.bind(function(c,d){function f(){function M(){w.removeItem(O);w.getItem(x)===r&&w.removeItem(x);w.getItem(J)===r&&w.removeItem(J)}w.setItem(O,"1");a().then(function(Z){M();c(Z)}).catch(function(Z){M();d(Z)})}function g(){w.setItem(J,r);h(k,function(){w.getItem(J)===r?f():p(function(){w.getItem(x)!==r?g():h(function(){return!w.getItem(O)},f)})})}function k(){var M=w.getItem(x);if(M&&M!==r)return!1;w.setItem(x,r);if(w.getItem(x)===
|
|
115
|
+
r)return!0;ua(w,!0)||d(Error("localStorage support dropped while acquiring lock"));return!1}function h(M,Z){M()?Z():p(function(){h(M,Z)})}function p(M){(new Date).getTime()-q>y?(yc.error("Timeout waiting for mutex on "+m+"; clearing lock. ["+r+"]"),w.removeItem(O),w.removeItem(x),g()):setTimeout(function(){try{M()}catch(Z){d(Z)}},t*(Math.random()+.1))}var r=b||(new Date).getTime()+"|"+Math.random(),q=(new Date).getTime(),m=this.Ca,t=this.Sd,y=this.Bc,w=this.storage,J=m+":X",x=m+":Y",O=m+":Z";try{if(ua(w,
|
|
116
|
+
!0))g();else throw Error("localStorage support check failed");}catch(M){d(M)}},this))};la.prototype.D=function(){return C.resolve()};la.prototype.setItem=function(a,b){return new C(e.bind(function(c,d){try{this.storage.setItem(a,ja(b))}catch(f){d(f)}c()},this))};la.prototype.getItem=function(a){return new C(e.bind(function(b,c){try{var d=Aa(this.storage.getItem(a))}catch(f){c(f)}b(d)},this))};la.prototype.removeItem=function(a){return new C(e.bind(function(b,c){try{this.storage.removeItem(a)}catch(d){c(d)}b()},
|
|
117
|
+
this))};var bb=fa("batch");P.prototype.da=function(){return this.lc||!this.F?C.resolve():this.Y.D().then(e.bind(function(){this.lc=!0},this)).catch(e.bind(function(a){this.s("Error initializing queue persistence. Disabling persistence",a);this.lc=!0;this.F=!1},this))};P.prototype.enqueue=function(a,b){a={id:Ea(),flushAfter:(new Date).getTime()+2*b,payload:a};if(this.F)return this.af(a);this.O.push(a);return C.resolve(!0)};P.prototype.Kc=function(a){var b=e.bind(function(){return this.da().then(e.bind(function(){return this.Za()},
|
|
118
|
+
this)).then(e.bind(function(c){return this.vc(c.concat(a))},this)).then(e.bind(function(c){c&&(this.O=this.O.concat(a));return c},this)).catch(e.bind(function(c){this.s("Error enqueueing items",c,a);return!1},this))},this);return this.lock.Fc(b,this.Cb).catch(e.bind(function(c){this.s("Error acquiring storage lock",c);return!1},this))};P.prototype.cf=function(a){var b=this.O.slice(0,a);return this.F&&b.length<a?this.da().then(e.bind(function(){return this.Za()},this)).then(e.bind(function(c){if(c.length){var d=
|
|
119
|
+
{};e.h(b,function(k){d[k.id]=!0});for(var f=0;f<c.length;f++){var g=c[f];if((new Date).getTime()>g.flushAfter&&!d[g.id]&&(g.Wf=!0,b.push(g),b.length>=a))break}}return b},this)):C.resolve(b)};P.prototype.ag=function(a){var b={};e.h(a,function(d){b[d]=!0});this.O=$a(this.O,b);if(this.F){var c=e.bind(function(){return this.da().then(e.bind(function(){return this.Za()},this)).then(e.bind(function(d){d=$a(d,b);return this.vc(d)},this)).then(e.bind(function(){return this.Za()},this)).then(e.bind(function(d){for(var f=
|
|
120
|
+
0;f<d.length;f++){var g=d[f];if(g.id&&b[g.id])throw Error("Item not removed from storage");}return!0},this)).catch(e.bind(function(d){this.s("Error removing items",d,a);return!1},this))},this);return this.lock.Fc(c,this.Cb).catch(e.bind(function(d){this.s("Error acquiring storage lock",d);return ua(this.lock.storage,!0)?!1:c().then(e.bind(function(f){return f?f:this.Y.removeItem(this.Ca).then(function(){return f})},this)).catch(e.bind(function(f){this.s("Error clearing queue",f);return!1},this))},
|
|
121
|
+
this))}return C.resolve(!0)};P.prototype.Wg=function(a){this.O=Za(this.O,a);return this.F?this.lock.Fc(e.bind(function(){return this.da().then(e.bind(function(){return this.Za()},this)).then(e.bind(function(b){b=Za(b,a);return this.vc(b)},this)).catch(e.bind(function(b){this.s("Error updating items",a,b);return!1},this))},this),this.Cb).catch(e.bind(function(b){this.s("Error acquiring storage lock",b);return!1},this)):C.resolve(!0)};P.prototype.Za=function(){return this.da().then(e.bind(function(){return this.Y.getItem(this.Ca)},
|
|
122
|
+
this)).then(e.bind(function(a){a&&!e.isArray(a)&&(this.s("Invalid storage entry:",a),a=null);return a||[]},this)).catch(e.bind(function(a){this.s("Error retrieving queue",a);return[]},this))};P.prototype.vc=function(a){return this.da().then(e.bind(function(){return this.Y.setItem(this.Ca,a)},this)).then(function(){return!0}).catch(e.bind(function(b){this.s("Error saving queue",b);return!1},this))};P.prototype.clear=function(){this.O=[];return this.F?this.da().then(e.bind(function(){return this.Y.removeItem(this.Ca)},
|
|
123
|
+
this)):C.resolve()};var qa=fa("batch");N.prototype.enqueue=function(a){return this.Xa.enqueue(a,this.qb)};N.prototype.start=function(){this.stopped=!1;this.Wb=0;return this.flush()};N.prototype.stop=function(){this.stopped=!0;this.Ac&&(clearTimeout(this.Ac),this.Ac=null)};N.prototype.clear=function(){return this.Xa.clear()};N.prototype.Yd=function(){this.ba=this.W.batch_size};N.prototype.za=function(){this.$d(this.W.batch_flush_interval_ms)};N.prototype.$d=function(a){this.qb=a;this.stopped||(this.Ac=
|
|
124
|
+
setTimeout(e.bind(function(){this.stopped||this.flush()},this),this.qb))};N.prototype.mg=function(a,b){return new C(e.bind(function(c){this.kg(a,b,c)},this))};N.prototype.flush=function(a){if(this.uc)return qa.log("Flush: Request already in progress"),C.resolve();this.uc=!0;a=a||{};var b=this.W.batch_request_timeout_ms,c=(new Date).getTime(),d=this.ba;return this.Xa.cf(d).then(e.bind(function(f){var g=f.length===d,k=[],h={};e.h(f,function(m){var t=m.payload;this.kb&&!m.Wf&&(t=this.kb(t));if(t){t.event&&
|
|
125
|
+
t.properties&&(t.properties=e.extend({},t.properties,{mp_sent_by_lib_version:"2.78.0"}));var y=!0,w=m.id;w?5<(this.ia[w]||0)&&(this.s("[dupe] item ID sent too many times, not sending",{item:m,ba:f.length,Kg:this.ia[w]}),y=!1):this.s("[dupe] found item with no ID",{item:m});y&&k.push(t)}h[m.id]=t},this);if(1>k.length)return this.uc=!1,this.za(),C.resolve();var p=e.bind(function(){return this.Xa.ag(e.map(f,function(m){return m.id})).then(e.bind(function(m){e.h(f,e.bind(function(t){var y=t.id;y?(this.ia[y]=
|
|
126
|
+
this.ia[y]||0,this.ia[y]++,5<this.ia[y]&&this.s("[dupe] item ID sent too many times",{item:t,ba:f.length,Kg:this.ia[y]})):this.s("[dupe] found item with no ID while removing",{item:t})},this));if(m)return this.Wb=0,this.md&&!g?(this.za(),C.resolve()):this.flush();5<++this.Wb?(this.s("Too many queue failures; disabling batching system."),this.Ag()):this.za();return C.resolve()},this))},this),r=e.bind(function(m){this.uc=!1;try{if(a.ke)return this.Xa.Wg(h);if(e.l(m)&&"timeout"===m.error&&(new Date).getTime()-
|
|
127
|
+
c>=b)return this.s("Network timeout; retrying"),this.flush();var t;if(t=e.l(m)){var y;if(!(y=500<=m.vb||429===m.vb)){var w;if(w=0>=m.vb){var J=n.navigator.onLine;w=!(e.m(J)||J)}y=w}t=y||"timeout"===m.error}if(t){var x=2*this.qb;m.Zd&&(x=1E3*parseInt(m.Zd,10)||x);x=Math.min(6E5,x);this.s("Error; retry in "+x+" ms");this.$d(x);return C.resolve()}if(e.l(m)&&413===m.vb){if(1<f.length)return this.ba=Math.min(this.ba,Math.max(1,Math.floor(d/2)),f.length-1),this.s("413 response; reducing batch size to "+
|
|
128
|
+
this.ba),this.za(),C.resolve();this.s("Single-event request too large; dropping",f);this.Yd()}return p()}catch(O){this.s("Error handling API response",O),this.za()}},this),q={method:"POST",oe:!0,wf:!0,he:b};a.ke&&(q.Fb="sendBeacon");qa.log("MIXPANEL REQUEST:",k);return this.mg(k,q).then(r)},this)).catch(e.bind(function(f){this.s("Error flushing request queue",f);this.za()},this))};N.prototype.s=function(a,b){qa.error.apply(qa.error,arguments);if(this.ra)try{b instanceof Error||(b=Error(a)),this.ra(a,
|
|
129
|
+
b)}catch(c){qa.error(c)}};var Qb={ce:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.T(g)||(d[g]=f)},this):d[a]=b;c.$set=d;return c},le:function(a){var b={},c=[];e.isArray(a)||(a=[a]);e.h(a,function(d){this.T(d)||c.push(d)},this);b.$unset=c;return b},ee:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.T(g)||(d[g]=f)},this):d[a]=b;c.$set_once=d;return c},je:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.T(g)||(d[g]=e.isArray(f)?f:[f])},this):d[a]=e.isArray(b)?b:
|
|
130
|
+
[b];c.$union=d;return c},Oe:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.T(g)||(d[g]=f)},this):d[a]=b;c.$append=d;return c},Xd:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.T(g)||(d[g]=f)},this):d[a]=b;c.$remove=d;return c},ah:function(){return{$delete:""}}};e.extend(E.prototype,Qb);E.prototype.Ma=function(a,b,c){this.j=a;this.Mb=b;this.Lb=c};E.prototype.set=ia(function(a,b,c){var d=this.ce(a,b);e.l(a)&&(c=b);return this.v(d,c)});E.prototype.Ba=ia(function(a,b,c){var d=
|
|
131
|
+
this.ee(a,b);e.l(a)&&(c=b);return this.v(d,c)});E.prototype.Gb=ia(function(a,b){a=this.le(a);return this.v(a,b)});E.prototype.bb=ia(function(a,b,c){e.l(a)&&(c=b);a=this.je(a,b);return this.v(a,c)});E.prototype["delete"]=ia(function(a){return this.v({$delete:""},a)});E.prototype.remove=ia(function(a,b,c){a=this.Xd(a,b);return this.v(a,c)});E.prototype.v=function(a,b){a.$group_key=this.Mb;a.$group_id=this.Lb;a.$token=this.L("token");a=e.Yb(a);return this.j.Qb({type:"groups",data:a,endpoint:this.j.fa("groups")+
|
|
132
|
+
"/"+this.L("api_routes").groups,Tb:this.j.J.groups},b)};E.prototype.T=function(a){return"$group_key"===a||"$group_id"===a};E.prototype.L=function(a){return this.j.g(a)};E.prototype.toString=function(){return this.j.toString()+".group."+this.Mb+"."+this.Lb};E.prototype.remove=E.prototype.remove;E.prototype.set=E.prototype.set;E.prototype.set_once=E.prototype.Ba;E.prototype.union=E.prototype.bb;E.prototype.unset=E.prototype.Gb;E.prototype.toString=E.prototype.toString;e.extend(A.prototype,Qb);A.prototype.Ma=
|
|
133
|
+
function(a){this.j=a};A.prototype.set=X(function(a,b,c){var d=this.ce(a,b);e.l(a)&&(c=b);this.L("save_referrer")&&this.j.persistence.Ec(document.referrer);d.$set=e.extend({},e.info.Zf(),d.$set);return this.v(d,c)});A.prototype.Ba=X(function(a,b,c){var d=this.ee(a,b);e.l(a)&&(c=b);return this.v(d,c)});A.prototype.Gb=X(function(a,b){a=this.le(a);return this.v(a,b)});A.prototype.wd=X(function(a,b,c){var d={},f={};e.l(a)?(e.h(a,function(g,k){this.T(k)||(isNaN(parseFloat(g))?v.error("Invalid increment value passed to mixpanel.people.increment - must be a number"):
|
|
134
|
+
f[k]=g)},this),c=b):(e.m(b)&&(b=1),f[a]=b);d.$add=f;return this.v(d,c)});A.prototype.append=X(function(a,b,c){e.l(a)&&(c=b);a=this.Oe(a,b);return this.v(a,c)});A.prototype.remove=X(function(a,b,c){e.l(a)&&(c=b);a=this.Xd(a,b);return this.v(a,c)});A.prototype.bb=X(function(a,b,c){e.l(a)&&(c=b);a=this.je(a,b);return this.v(a,c)});A.prototype.Pg=X(function(){v.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")});A.prototype.$c=function(a){return this.set("$transactions",
|
|
135
|
+
[],a)};A.prototype.hd=function(){if(this.Nb()){var a={$delete:this.j.ga()};return this.v(a)}v.error("mixpanel.people.delete_user() requires you to call identify() first")};A.prototype.toString=function(){return this.j.toString()+".people"};A.prototype.v=function(a,b){a.$token=this.L("token");a.$distinct_id=this.j.ga();var c=this.j.G("$device_id"),d=this.j.G("$user_id"),f=this.j.G("$had_persisted_distinct_id");c&&(a.$device_id=c);d&&(a.$user_id=d);f&&(a.$had_persisted_distinct_id=f);c=e.Yb(a);return this.Nb()?
|
|
136
|
+
this.j.Qb({type:"people",data:c,endpoint:this.j.fa("people")+"/"+this.L("api_routes").engage,Tb:this.j.J.sc},b):(this.ve(a),e.m(b)||(this.L("verbose")?b({status:-1,error:null}):b(-1)),e.truncate(c,255))};A.prototype.L=function(a){return this.j.g(a)};A.prototype.Nb=function(){return!0===this.j.ma.ud};A.prototype.ve=function(a){"$set"in a?this.j.persistence.I("$set",a):"$set_once"in a?this.j.persistence.I("$set_once",a):"$unset"in a?this.j.persistence.I("$unset",a):"$add"in a?this.j.persistence.I("$add",
|
|
137
|
+
a):"$append"in a?this.j.persistence.I("$append",a):"$remove"in a?this.j.persistence.I("$remove",a):"$union"in a?this.j.persistence.I("$union",a):v.error("Invalid call to _enqueue():",a)};A.prototype.Ka=function(a,b,c,d){var f=this,g=e.extend({},this.j.persistence.Ra(a)),k=g;e.m(g)||!e.l(g)||e.N(g)||(f.j.persistence.M(a,g),f.j.persistence.save(),d&&(k=d(g)),b.call(f,k,function(h,p){0===h&&f.j.persistence.I(a,g);e.m(c)||c(h,p)}))};A.prototype.ye=function(a,b,c,d,f,g,k){var h=this;this.Ka("$set",this.set,
|
|
138
|
+
a);this.Ka("$set_once",this.Ba,d);this.Ka("$unset",this.Gb,g,function(q){return e.keys(q)});this.Ka("$add",this.wd,b);this.Ka("$union",this.bb,f);a=this.j.persistence.Ra("$append");if(!e.m(a)&&e.isArray(a)&&a.length)for(b=function(q,m){0===q&&h.j.persistence.I("$append",p);e.m(c)||c(q,m)},d=a.length-1;0<=d;d--){a=this.j.persistence.Ra("$append");var p=a.pop();h.j.persistence.save();e.N(p)||h.append(p,b)}a=this.j.persistence.Ra("$remove");if(!e.m(a)&&e.isArray(a)&&a.length)for(b=function(q,m){0===
|
|
139
|
+
q&&h.j.persistence.I("$remove",r);e.m(k)||k(q,m)},d=a.length-1;0<=d;d--){a=this.j.persistence.Ra("$remove");var r=a.pop();h.j.persistence.save();e.N(r)||h.remove(r,b)}};A.prototype.T=function(a){return"$distinct_id"===a||"$token"===a||"$device_id"===a||"$user_id"===a||"$had_persisted_distinct_id"===a};A.prototype.set=A.prototype.set;A.prototype.set_once=A.prototype.Ba;A.prototype.unset=A.prototype.Gb;A.prototype.increment=A.prototype.wd;A.prototype.append=A.prototype.append;A.prototype.remove=A.prototype.remove;
|
|
140
|
+
A.prototype.union=A.prototype.bb;A.prototype.track_charge=A.prototype.Pg;A.prototype.clear_charges=A.prototype.$c;A.prototype.delete_user=A.prototype.hd;A.prototype.toString=A.prototype.toString;var zc="__mps __mpso __mpus __mpa __mpap __mpr __mpu $people_distinct_id __alias __timers".split(" ");B.prototype.Wa=function(){var a={};this.load();e.h(this.props,function(b,c){e.kc(zc,c)||(a[c]=b)});return a};B.prototype.load=function(){if(!this.disabled){var a=this.storage.parse(this.name);a&&(this.props=
|
|
141
|
+
e.extend({},a))}};B.prototype.upgrade=function(){if(this.storage===e.localStorage){var a=e.cookie.parse(this.name);e.cookie.remove(this.name);e.cookie.remove(this.name,!0);a&&this.S(a)}else this.storage===e.cookie&&(a=e.localStorage.parse(this.name),e.localStorage.remove(this.name),a&&this.S(a))};B.prototype.save=function(){this.disabled||this.storage.set(this.name,ja(this.props),this.ac,this.Xb,this.ae,this.fd,this.mb)};B.prototype.zb=function(a){this.load();return this.props[a]};B.prototype.remove=
|
|
142
|
+
function(){this.storage.remove(this.name,!1,this.mb);this.storage.remove(this.name,!0,this.mb)};B.prototype.clear=function(){this.remove();this.props={}};B.prototype.S=function(a,b,c){return e.l(a)?("undefined"===typeof b&&(b="None"),this.ac="undefined"===typeof c?this.gd:c,this.load(),e.h(a,function(d,f){this.props.hasOwnProperty(f)&&this.props[f]!==b||(this.props[f]=d)},this),this.save(),!0):!1};B.prototype.register=function(a,b){return e.l(a)?(this.ac="undefined"===typeof b?this.gd:b,this.load(),
|
|
143
|
+
e.extend(this.props,a),this.save(),!0):!1};B.prototype.unregister=function(a){this.load();a in this.props&&(delete this.props[a],this.save())};B.prototype.ne=function(a){this.register(e.info.ig(a))};B.prototype.Ec=function(a){this.S({$initial_referrer:a||"$direct",$initial_referring_domain:e.info.Vd(a)||"$direct"},"")};B.prototype.tf=function(){return e.Da({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};B.prototype.me=function(a){this.gd=
|
|
144
|
+
this.ac=a.cookie_expiration;this.de(a.disable_persistence);this.pg(a.cookie_domain);this.qg(a.cross_site_cookie);this.rg(a.cross_subdomain_cookie);this.ug(a.secure_cookie)};B.prototype.de=function(a){(this.disabled=a)?this.remove():this.save()};B.prototype.pg=function(a){a!==this.mb&&(this.remove(),this.mb=a,this.save())};B.prototype.qg=function(a){a!==this.fd&&(this.fd=a,this.remove(),this.save())};B.prototype.rg=function(a){a!==this.Xb&&(this.Xb=a,this.remove(),this.save())};B.prototype.rf=function(){return this.Xb};
|
|
145
|
+
B.prototype.ug=function(a){a!==this.ae&&(this.ae=a?!0:!1,this.remove(),this.save())};B.prototype.I=function(a,b){var c=this.gb(a);a=b[a];var d=this.$("$set"),f=this.$("$set_once"),g=this.$("$unset"),k=this.$("$add"),h=this.$("$union"),p=this.$("$remove",[]),r=this.$("$append",[]);"__mps"===c?(e.extend(d,a),this.M("$add",a),this.M("$union",a),this.M("$unset",a)):"__mpso"===c?(e.h(a,function(q,m){m in f||(f[m]=q)}),this.M("$unset",a)):"__mpus"===c?e.h(a,function(q){e.h([d,f,k,h],function(m){q in m&&
|
|
146
|
+
delete m[q]});e.h(r,function(m){q in m&&delete m[q]});g[q]=!0}):"__mpa"===c?(e.h(a,function(q,m){m in d?d[m]+=q:(m in k||(k[m]=0),k[m]+=q)},this),this.M("$unset",a)):"__mpu"===c?(e.h(a,function(q,m){e.isArray(q)&&(m in h||(h[m]=[]),e.h(q,function(t){e.kc(h[m],t)||h[m].push(t)}))}),this.M("$unset",a)):"__mpr"===c?(p.push(a),this.M("$append",a)):"__mpap"===c&&(r.push(a),this.M("$unset",a));v.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):");v.log(b);this.save()};B.prototype.M=function(a,b){var c=
|
|
147
|
+
this.props[this.gb(a)];e.m(c)||e.h(b,function(d,f){"$append"===a||"$remove"===a?e.h(c,function(g){g[f]===d&&delete g[f]}):delete c[f]},this)};B.prototype.Ra=function(a){return this.zb(this.gb(a))};B.prototype.gb=function(a){if("$set"===a)return"__mps";if("$set_once"===a)return"__mpso";if("$unset"===a)return"__mpus";if("$add"===a)return"__mpa";if("$append"===a)return"__mpap";if("$remove"===a)return"__mpr";if("$union"===a)return"__mpu";v.error("Invalid queue:",a)};B.prototype.$=function(a,b){a=this.gb(a);
|
|
148
|
+
b=e.m(b)?{}:b;return this.props[a]||(this.props[a]=b)};B.prototype.sg=function(a){var b=(new Date).getTime(),c=this.zb("__timers")||{};c[a]=b;this.props.__timers=c;this.save()};B.prototype.bg=function(a){var b=(this.zb("__timers")||{})[a];e.m(b)||(delete this.props.__timers[a],this.save());return b};var sa,G,ka=n.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Ya=!ka&&-1===L.indexOf("MSIE")&&-1===L.indexOf("Mozilla"),Ba=null;Y.sendBeacon&&(Ba=function(){return Y.sendBeacon.apply(Y,arguments)});
|
|
149
|
+
var Rb={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/",settings:"settings/"},Wa={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:Rb,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:"base64",app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:ma,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:ma,
|
|
150
|
+
mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,
|
|
151
|
+
batch_size:50,batch_flush_interval_ms:5E3,batch_request_timeout_ms:9E4,batch_autostart:!0,hooks:{},record_allowed_iframe_origins:[],record_block_class:/^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$/,record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,recording_event_triggers:{},record_idle_timeout_ms:18E5,record_mask_inputs:!0,record_max_ms:864E5,record_min_ms:0,record_network:!1,record_network_options:{},record_sessions_percent:0,
|
|
152
|
+
recorder_src:null,targeting_src:null,lib_base_path:"https://cdn.mxpnl.com/libs/",remote_settings_mode:"disabled"},Xa=!1;l.prototype.D=function(a,b,c){if(e.m(c))this.A("You must name your new library: init(token, config, name)");else if("mixpanel"===c)this.A("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");else return a=ra(a,b,c),G[c]=a,a.hb(),a};l.prototype.Ma=function(a,b,c){b=b||{};this.__loaded=!0;this.config={};var d={};"api_payload_format"in b||
|
|
153
|
+
(b.api_host||Wa.api_host).match(/\.mixpanel\.com/)&&(d.api_payload_format="json");this.H={};this.Aa(e.extend({},Wa,d,b,{name:c,token:a,callback_fn:("mixpanel"===c?c:"mixpanel."+c)+"._jsc"}));this.R=new K({Bb:this,bc:e.bind(this.g,this),be:e.bind(this.Aa,this),qf:e.bind(this.td,this),eg:e.bind(this.A,this),gf:e.bind(this.ga,this),tc:this.g("recorder_src"),ka:this.g("targeting_src"),yb:this.g("lib_base_path"),X:Da});this._jsc=ma;this.Ib=[];this.Jb=[];this.Z=[];this.ma={disable_all_events:!1,identify_called:!1};
|
|
154
|
+
this.J={};if(this.Ia=this.g("batch_requests"))if(e.localStorage.Pa(!0)&&ka){if(this.Gf(),Ba&&n.addEventListener){var f=e.bind(function(){this.J.sa.stopped||this.J.sa.flush({ke:!0})},this);n.addEventListener("pagehide",function(g){g.persisted&&f()});n.addEventListener("visibilitychange",function(){"hidden"===z.visibilityState&&f()})}}else this.Ia=!1,v.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),e.h(this.rd(),function(g){v.log("Clearing batch queue "+g.Ya);e.localStorage.remove(g.Ya)});
|
|
155
|
+
this.persistence=this.cookie=new B(this.config);this.Fa={};this.ze();a=e.Ha();this.ga()||this.S({distinct_id:"$device:"+a,$device_id:a},"");this.flags=new u({rb:e.bind(function(){return this.fa("flags")+"/"+this.g("api_routes").flags},this),bc:e.bind(this.g,this),be:e.bind(this.Aa,this),lf:e.bind(this.G,this),Tg:e.bind(this.track,this),X:Da,ka:this.g("targeting_src")||this.g("lib_base_path")+"mixpanel-targeting-BSHal4N9.min.js"});this.flags.D();this.flags=this.flags;this.Sb=new H(this);this.Sb.D();
|
|
156
|
+
this.Be();a=this.g("remote_settings_mode");this.re="strict"===a||"fallback"===a?this.xe(a).then(e.bind(function(){return this.cb()},this)):this.cb()};l.prototype.Be=function(){if(this.g("disable_persistence"))v.log("Tab ID initialization skipped due to disable_persistence config");else if(e.sessionStorage.Pa())try{var a=this.g("name")+"_"+this.g("token"),b="mp_tab_id_"+a,c="mp_gen_new_tab_id_"+a;!e.sessionStorage.get(c)&&e.sessionStorage.get(b)||e.sessionStorage.set(b,"$tab-"+e.Ha());e.sessionStorage.set(c,
|
|
157
|
+
"1");this.Ig=e.sessionStorage.get(b);n.addEventListener("beforeunload",function(){e.sessionStorage.remove(c)})}catch(d){this.A("Error initializing tab id",d)}else this.A("Session storage is not supported, cannot keep track of unique tab ID.")};l.prototype.td=function(){return this.Ig||null};l.prototype.cb=aa(function(a){return this.R.Vb(a)});l.prototype.Ge=function(a,b){this.R.xg(a,b)};l.prototype.zg=function(){return this.cb(!0)};l.prototype.zc=function(){return this.R.Dg()};l.prototype.Yf=function(){return this.R.Xf()};
|
|
158
|
+
l.prototype.gg=function(){return this.R.fg()};l.prototype.va=function(){return this.R.Nf()};l.prototype.sd=function(){return this.R.mf()};l.prototype.uf=function(){return this.R.nf()};l.prototype.pe=function(){return this.R.C};l.prototype.qe=function(){return this.re};l.prototype.hb=function(){this.g("loaded")(this);this.Vc();this.people.Ba(this.persistence.tf());if(this.g("store_google")&&this.g("stop_utm_persistence")){var a=e.info.Na(null);e.h(a,function(b,c){this.unregister(c)}.bind(this))}};
|
|
159
|
+
l.prototype.Vc=function(){this.persistence.ne(z.referrer);this.g("store_google")&&!this.g("stop_utm_persistence")&&this.register(e.info.Na());this.g("save_referrer")&&this.persistence.Ec(z.referrer)};l.prototype.ue=function(){e.h(this.Ib,function(a){this.Pb.apply(this,a)},this);this.Oa()||e.h(this.Jb,function(a){this.v.apply(this,a)},this);delete this.Ib;delete this.Jb};l.prototype.Pb=function(a,b){if(this.g("img"))return this.A("You can't use DOM tracking functions with img = true."),!1;if(!Xa)return this.Ib.push([a,
|
|
160
|
+
b]),!1;a=(new a).D(this);return a.track.apply(a,b)};l.prototype.Rc=function(a,b){if(e.m(a))return null;if(ka)return function(g){a(g,b)};var c=this._jsc,d=""+Math.floor(1E8*Math.random()),f=this.g("callback_fn")+"["+d+"]";c[d]=function(g){delete c[d];a(g,b)};return f};l.prototype.v=function(a,b,c,d){var f=!0;if(Ya)return this.Jb.push(arguments),f;var g={method:this.g("api_method"),Fb:this.g("api_transport"),oe:this.g("verbose")},k=null;d||!e.ha(c)&&"string"!==typeof c||(d=c,c=null);c=e.extend(g,c||
|
|
161
|
+
{});ka||(c.method="GET");g="POST"===c.method;var h=Ba&&g&&"sendbeacon"===c.Fb.toLowerCase(),p=c.oe;b.verbose&&(p=!0);this.g("test")&&(b.test=1);p&&(b.verbose=1);this.g("img")&&(b.img=1);if(!ka)if(d)b.callback=d;else if(p||this.g("test"))b.callback="(function(){})";b.ip=this.g("ip")?1:0;b._=(new Date).getTime().toString();g&&(k="data="+encodeURIComponent(b.data),delete b.data);e.extend(b,this.g("api_extra_query_params"));a+="?"+e.Hb(b);var r=this;if("img"in b)k=z.createElement("img"),k.src=a,z.body.appendChild(k);
|
|
162
|
+
else if(h){try{f=Ba(a,k)}catch(y){r.A(y),f=!1}try{d&&d(f?1:0)}catch(y){r.A(y)}}else if(ka)try{var q=new XMLHttpRequest;q.open(c.method,a,!0);var m=this.g("xhr_headers");g&&(m["Content-Type"]="application/x-www-form-urlencoded");e.h(m,function(y,w){q.setRequestHeader(w,y)});if(c.he&&"undefined"!==typeof q.timeout){q.timeout=c.he;var t=(new Date).getTime()}q.withCredentials=!0;q.onreadystatechange=function(){if(4===q.readyState)if(200===q.status){if(d)if(p){try{var y=e.Ga(q.responseText)}catch(w){if(r.A(w),
|
|
163
|
+
c.wf)y=q.responseText;else return}d(y)}else d(Number(q.responseText))}else y=q.timeout&&!q.status&&(new Date).getTime()-t>=q.timeout?"timeout":"Bad HTTP status: "+q.status+" "+q.statusText,r.A(y),d&&(p?d({status:0,vb:q.status,error:y,Zd:(q.responseHeaders||{})["Retry-After"]}):d(0))};q.send(k)}catch(y){r.A(y),f=!1}else k=z.createElement("script"),k.type="text/javascript",k.async=!0,k.defer=!0,k.src=a,m=z.getElementsByTagName("script")[0],m.parentNode.insertBefore(k,m);return f};l.prototype.xe=function(a){function b(){"strict"===
|
|
164
|
+
a&&c.Aa({record_sessions_percent:0})}var c=this;if(!n.AbortController)return v.i("Remote settings unavailable: missing minimum required APIs"),b(),Promise.resolve();var d=this.fa("settings")+"/"+this.g("api_routes").settings,f=e.Hb({$lib_version:"2.78.0",mp_lib:"web",sdk_config:"1"});d=d+"?"+f;var g=new AbortController,k=setTimeout(function(){g.abort()},500);return n.fetch(d,{method:"GET",headers:{Authorization:"Basic "+btoa(c.g("token")+":")},signal:g.signal}).then(function(h){clearTimeout(k);if(h.ok)return h.json();
|
|
165
|
+
v.i("Network response was not ok");b()}).then(function(h){if(h&&h.sdk_config&&h.sdk_config.config){var p={};e.h(h.sdk_config.config,function(r,q){Wa.hasOwnProperty(q)&&(p[q]=r)});e.N(p)?(v.i("No valid config keys found in remote settings."),b()):c.Aa(p)}else b()}).catch(function(h){clearTimeout(k);v.i("Failed to fetch remote settings",h);b()})};l.prototype.Kb=function(a){function b(k,h){e.h(k,function(p){if(e.isArray(p[0])){var r=h;e.h(p,function(q){r=r[q[0]].apply(r,q.slice(1))})}else this[p[0]].apply(this,
|
|
166
|
+
p.slice(1))},h)}var c,d=[],f=[],g=[];e.h(a,function(k){k&&(c=k[0],e.isArray(c)?g.push(k):"function"===typeof k?k.call(this):e.isArray(k)&&"alias"===c?d.push(k):e.isArray(k)&&-1!==c.indexOf("track")&&"function"===typeof this[c]?g.push(k):f.push(k))},this);b(d,this);b(f,this);b(g,this)};l.prototype.Yc=function(){return!!this.J.sa};l.prototype.rd=function(){var a="__mpq_"+this.g("token");return this.Hc=this.Hc||{sa:{type:"events",jb:"track",Ya:a+"_ev"},sc:{type:"people",jb:"engage",Ya:a+"_pp"},groups:{type:"groups",
|
|
167
|
+
jb:"groups",Ya:a+"_gr"}}};l.prototype.Gf=function(){if(!this.Yc()){var a=e.bind(function(c){return new N(c.Ya,{W:this.config,ra:this.g("error_reporter"),lg:e.bind(function(d,f,g){this.v(this.fa(c.jb)+"/"+this.g("api_routes")[c.jb],this.Jc(d),f,this.Rc(g,d))},this),kb:e.bind(function(d){return(d=this.aa("before_send_"+c.type,d))?d[0]:null},this),Bg:e.bind(this.yc,this),F:!0})},this),b=this.rd();this.J={sa:a(b.sa),sc:a(b.sc),groups:a(b.groups)}}this.g("batch_autostart")&&this.xc()};l.prototype.xc=function(){this.se=
|
|
168
|
+
!0;this.Yc()&&(this.Ia=!0,e.h(this.J,function(a){a.start()}))};l.prototype.yc=function(){this.Ia=!1;e.h(this.J,function(a){a.stop();a.clear()})};l.prototype.push=function(a){this.Kb([a])};l.prototype.enable=function(a){var b;if("undefined"===typeof a)this.ma.kd=!1;else{var c={};var d=[];for(b=0;b<a.length;b++)c[a[b]]=!0;for(a=0;a<this.Z.length;a++)c[this.Z[a]]||d.push(this.Z[a]);this.Z=d}};l.prototype.disable=function(a){"undefined"===typeof a?this.ma.kd=!0:this.Z=this.Z.concat(a)};l.prototype.Jc=
|
|
169
|
+
function(a){a=ja(a);"base64"===this.g("api_payload_format")&&(a=e.Pe(a));return{data:a}};l.prototype.Qb=function(a,b){var c=e.truncate(a.data,255),d=a.endpoint,f=a.Tb,g=a.wg,k=a.ng||{};b=b||ma;var h=!0,p=e.bind(function(){k.wc||(c=this.aa("before_send_"+a.type,c))&&(c=c[0]);return c?(v.log("MIXPANEL REQUEST:"),v.log(c),this.v(d,this.Jc(c),k,this.Rc(b,c))):null},this);this.Ia&&!g?f.enqueue(c).then(function(r){r?b(1,c):p()}):h=p();return h&&c};l.prototype.track=aa(function(a,b,c,d){if(!c||!c.wc){var f=
|
|
170
|
+
this.aa("before_track",a,b);if(null===f)return;a=f[0];b=f[1]}d||"function"!==typeof c||(d=c,c=null);c=c||{};if(f=c.transport)c.Fb=f;f=c.send_immediately;"function"!==typeof d&&(d=ma);if(e.m(a))this.A("No event name provided to mixpanel.track");else if(this.Lc(a))d(0);else{b=e.extend({},b);b.token=this.g("token");var g=this.persistence.bg(a);e.m(g)||(b.$duration=parseFloat((((new Date).getTime()-g)/1E3).toFixed(3)));this.Vc();g=this.g("track_marketing")?e.info.Pf():{};b=e.extend({},e.info.Wa({mp_loader:this.g("mp_loader")}),
|
|
171
|
+
g,this.persistence.Wa(),this.Fa,this.sd(),b);g=this.g("property_blacklist");e.isArray(g)?e.h(g,function(k){delete b[k]}):this.A("Invalid value for property_blacklist config: "+g);this.Ge(a,b);f=this.Qb({type:"events",data:{event:a,properties:b},endpoint:this.fa("events")+"/"+this.g("api_routes").track,Tb:this.J.sa,wg:f,ng:c},d);this.flags&&this.flags.Zc&&this.flags.Zc(a,b);return f}});l.prototype.tg=aa(function(a,b,c){e.isArray(b)||(b=[b]);var d={};d[a]=b;this.register(d);return this.people.set(a,
|
|
172
|
+
b,c)});l.prototype.Je=aa(function(a,b,c){var d=this.G(a),f={};void 0===d?(f[a]=[b],this.register(f)):-1===d.indexOf(b)&&(d.push(b),f[a]=d,this.register(f));return this.people.bb(a,b,c)});l.prototype.cg=aa(function(a,b,c){var d=this.G(a);if(void 0!==d){var f=d.indexOf(b);-1<f&&(d.splice(f,1),this.register({bh:d}));0===d.length&&this.unregister(a)}return this.people.remove(a,b,c)});l.prototype.Sg=aa(function(a,b,c,d){var f=e.extend({},b||{});e.h(c,function(g,k){null!==g&&void 0!==g&&(f[k]=g)});return this.track(a,
|
|
173
|
+
f,d)});l.prototype.te=function(a,b){return a+"_"+JSON.stringify(b)};l.prototype.sf=function(a,b){var c=this.te(a,b),d=this.Ic[c];if(void 0===d||d.Mb!==a||d.Lb!==b)d=new E,d.Ma(this,a,b),this.Ic[c]=d;return d};l.prototype.Cc=aa(function(a,b){"object"!==typeof a&&(a={});b=b||{};b=b.event_name||"$mp_web_page_view";var c=e.extend(e.info.Rf(),e.info.Na(),e.info.bd());a=e.extend({},c,a);return this.track(b,a)});l.prototype.Rg=function(){return this.Pb.call(this,da,arguments)};l.prototype.Qg=function(){return this.Pb.call(this,
|
|
174
|
+
ta,arguments)};l.prototype.Jg=function(a){e.m(a)?this.A("No event name provided to mixpanel.time_event"):this.Lc(a)||this.persistence.sg(a)};var Vb={persistent:!0};l.prototype.register=function(a,b){b=this.aa("before_register",a,b);null!==b&&(a=b[0],b=b[1],b=Ca(b),b.persistent?this.persistence.register(a,b.days):e.extend(this.Fa,a))};l.prototype.S=function(a,b,c){c=this.aa("before_register_once",a,b,c);null!==c&&(a=c[0],b=c[1],c=c[2],c=Ca(c),c.persistent?this.persistence.S(a,b,c.days):("undefined"===
|
|
175
|
+
typeof b&&(b="None"),e.h(a,function(d,f){this.Fa.hasOwnProperty(f)&&this.Fa[f]!==b||(this.Fa[f]=d)},this)))};l.prototype.unregister=function(a,b){b=this.aa("before_unregister",a,b);null!==b&&(a=b[0],b=b[1],b=Ca(b),b.persistent?this.persistence.unregister(a):delete this.Fa[a])};l.prototype.Tc=function(a,b){var c={};c[a]=b;this.register(c)};l.prototype.jc=function(a,b,c,d,f,g,k,h){a=this.aa("before_identify",a);if(null===a)return-1;a=a[0];var p=this.ga();if(a&&p!==a){if("string"===typeof a&&0===a.indexOf("$device:"))return this.A("distinct_id cannot have $device: prefix"),
|
|
176
|
+
-1;this.register({$user_id:a})}this.G("$device_id")||this.S({$had_persisted_distinct_id:!0,$device_id:p},"");a!==p&&a!==this.G("__alias")&&(this.unregister("__alias"),this.register({distinct_id:a}));this.ma.ud=!0;this.people.ye(b,c,d,f,g,k,h);a!==p&&this.track("$identify",{distinct_id:a,$anon_distinct_id:p},{wc:!0});a!==p&&this.flags.pb().catch(function(){v.error("[flags] Error fetching flags during identify")})};l.prototype.reset=function(){this.zc();this.persistence.clear();this.ma.ud=!1;var a=
|
|
177
|
+
e.Ha();this.S({distinct_id:"$device:"+a,$device_id:a},"");this.cb()};l.prototype.ga=function(){return this.G("distinct_id")};l.prototype.Le=function(a,b){if(a===this.G("$people_distinct_id"))return this.A("Attempting to create alias for existing People user - aborting."),-2;var c=this;e.m(b)&&(b=this.ga());if(a!==b)return this.Tc("__alias",a),this.track("$create_alias",{alias:a,distinct_id:b},{wc:!0},function(){c.jc(a)});this.A("alias matches current distinct_id - skipping api call.");this.jc(a);
|
|
178
|
+
return-1};l.prototype.Sf=function(a){this.Tc("mp_name_tag",a)};l.prototype.Aa=function(a){e.l(a)&&(e.extend(this.config,a),a.batch_size&&e.h(this.J,function(b){b.Yd()}),this.g("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.g("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.me(this.config),U=U||this.g("debug"),("autocapture"in a||"record_heatmap_data"in a)&&this.Sb&&this.Sb.D(),e.l(a.hooks)&&(this.H=
|
|
179
|
+
{},e.h(a.hooks,function(b,c){if(e.ha(b))this.H[c]=[b];else if(e.isArray(b)){this.H[c]=[];for(var d=0;d<b.length;d++)e.ha(b[d])||v.i("Invalid hook added. Hook is not a function"),this.H[c].push(b[d])}else v.i("Invalid hooks added. Ensure that the hook values passed into config.hooks are functions or arrays of functions.")},this)))};l.prototype.g=function(a){return this.config[a]};l.prototype.aa=function(a){var b=ca.call(arguments,1);e.h(this.H[a],function(c){if(null===b)return null;c=c.apply(this,
|
|
180
|
+
b);"undefined"===typeof c?(this.A(a+" hook did not return a valid value"),b=null):(e.isArray(c)||(c=[c]),b.splice.apply(b,[0,c.length].concat(c)))},this);return b};l.prototype.G=function(a){return this.persistence.zb([a])};l.prototype.fa=function(a){return this.g("api_hosts")[a]||this.g("api_host")};l.prototype.toString=function(){var a=this.g("name");"mixpanel"!==a&&(a="mixpanel."+a);return a};l.prototype.Lc=function(a){return e.yd(L)||this.ma.kd||e.kc(this.Z,a)};l.prototype.ze=function(){"localStorage"===
|
|
181
|
+
this.g("opt_out_tracking_persistence_type")&&e.localStorage.Pa()&&(!this.ub()&&this.ub({persistence_type:"cookie"})&&this.Nd({enable_persistence:!1}),!this.Oa()&&this.Oa({persistence_type:"cookie"})&&this.qc({clear_persistence:!1}),this.ad({persistence_type:"cookie",enable_persistence:!1}));this.Oa()?this.fb({clear_persistence:!0}):this.ub()||!this.g("opt_out_tracking_by_default")&&!e.cookie.get("mp_optout")||(e.cookie.remove("mp_optout"),this.qc({clear_persistence:this.g("opt_out_persistence_by_default")}))};
|
|
182
|
+
l.prototype.fb=function(a){if(a&&a.clear_persistence)a=!0;else if(a&&a.enable_persistence)a=!1;else return;this.g("disable_persistence")||this.persistence.disabled===a||this.persistence.de(a);a?(this.yc(),this.zc()):this.se&&this.xc()};l.prototype.La=function(a,b){b=e.extend({track:e.bind(this.track,this),persistence_type:this.g("opt_out_tracking_persistence_type"),cookie_prefix:this.g("opt_out_tracking_cookie_prefix"),cookie_expiration:this.g("cookie_expiration"),cross_site_cookie:this.g("cross_site_cookie"),
|
|
183
|
+
cross_subdomain_cookie:this.g("cross_subdomain_cookie"),cookie_domain:this.g("cookie_domain"),secure_cookie:this.g("secure_cookie"),ignore_dnt:this.g("ignore_dnt")},b);e.localStorage.Pa()||(b.persistence_type="cookie");return a(this.g("token"),{track:b.track,Mg:b.track_event_name,Og:b.track_properties,Rd:b.persistence_type,Qd:b.cookie_prefix,cd:b.cookie_domain,dd:b.cookie_expiration,Ye:b.cross_site_cookie,ed:b.cross_subdomain_cookie,jg:b.secure_cookie,vd:b.ignore_dnt})};l.prototype.Nd=function(a){a=
|
|
184
|
+
e.extend({enable_persistence:!0},a);this.La(kc,a);this.fb(a)};l.prototype.qc=function(a){a=e.extend({clear_persistence:!0,delete_user:!0},a);a.delete_user&&this.people&&this.people.Nb()&&(this.people.hd(),this.people.$c());this.La(lc,a);this.fb(a)};l.prototype.ub=function(a){return this.La(mc,a)};l.prototype.Oa=function(a){return this.La(Ab,a)};l.prototype.ad=function(a){a=e.extend({enable_persistence:!0},a);this.La(oc,a);this.fb(a)};l.prototype.A=function(a,b){v.error.apply(v.error,arguments);try{b||
|
|
185
|
+
a instanceof Error||(a=Error(a)),this.g("error_reporter")(a,b)}catch(c){v.error(c)}};l.prototype.Ke=function(a,b){this.H[a]||(this.H[a]=[]);this.H[a].push(b)};l.prototype.dg=function(a,b){this.H[a]&&(b=this.H[a].indexOf(b),-1!==b?this.H[a].splice(b,1):v.log("remove_hook failed. Matching hook was not found"))};l.prototype.init=l.prototype.D;l.prototype.reset=l.prototype.reset;l.prototype.enable=l.prototype.enable;l.prototype.disable=l.prototype.disable;l.prototype.time_event=l.prototype.Jg;l.prototype.track=
|
|
186
|
+
l.prototype.track;l.prototype.track_links=l.prototype.Rg;l.prototype.track_forms=l.prototype.Qg;l.prototype.track_pageview=l.prototype.Cc;l.prototype.register=l.prototype.register;l.prototype.register_once=l.prototype.S;l.prototype.unregister=l.prototype.unregister;l.prototype.identify=l.prototype.jc;l.prototype.alias=l.prototype.Le;l.prototype.name_tag=l.prototype.Sf;l.prototype.set_config=l.prototype.Aa;l.prototype.get_config=l.prototype.g;l.prototype.get_api_host=l.prototype.fa;l.prototype.get_property=
|
|
187
|
+
l.prototype.G;l.prototype.get_distinct_id=l.prototype.ga;l.prototype.toString=l.prototype.toString;l.prototype.opt_out_tracking=l.prototype.qc;l.prototype.opt_in_tracking=l.prototype.Nd;l.prototype.has_opted_out_tracking=l.prototype.Oa;l.prototype.has_opted_in_tracking=l.prototype.ub;l.prototype.clear_opt_in_out_tracking=l.prototype.ad;l.prototype.get_group=l.prototype.sf;l.prototype.set_group=l.prototype.tg;l.prototype.add_group=l.prototype.Je;l.prototype.remove_group=l.prototype.cg;l.prototype.add_hook=
|
|
188
|
+
l.prototype.Ke;l.prototype.remove_hook=l.prototype.dg;l.prototype.track_with_groups=l.prototype.Sg;l.prototype.start_batch_senders=l.prototype.xc;l.prototype.stop_batch_senders=l.prototype.yc;l.prototype.start_session_recording=l.prototype.zg;l.prototype.stop_session_recording=l.prototype.zc;l.prototype.pause_session_recording=l.prototype.Yf;l.prototype.resume_session_recording=l.prototype.gg;l.prototype.get_session_recording_properties=l.prototype.sd;l.prototype.get_session_replay_url=l.prototype.uf;
|
|
189
|
+
l.prototype.get_tab_id=l.prototype.td;l.prototype.DEFAULT_API_ROUTES=Rb;l.prototype.__get_recorder=l.prototype.pe;l.prototype.__get_recording_init_promise=l.prototype.qe;B.prototype.properties=B.prototype.Wa;B.prototype.update_search_keyword=B.prototype.ne;B.prototype.update_referrer_info=B.prototype.Ec;B.prototype.get_cross_subdomain=B.prototype.rf;B.prototype.clear=B.prototype.clear;var T={};(function(a){Da=a;sa=1;G=n.mixpanel;e.m(G)?v.i('"mixpanel" object not initialized. Ensure you are using the latest version of the Mixpanel JS Library along with the snippet we provide.'):
|
|
190
|
+
G.__loaded||G.config&&G.persistence?v.i("The Mixpanel library has already been downloaded at least once. Ensure that the Mixpanel code snippet only appears once on the page (and is not double-loaded by a tag manager) in order to avoid errors."):1.1>(G.__SV||0)?v.i("Version mismatch; please ensure you're using the latest version of the Mixpanel code snippet."):(e.h(G._i,function(b){b&&e.isArray(b)&&(T[b[b.length-1]]=ra.apply(this,b))}),Tb(),G.init(),e.h(T,function(b){b.hb()}),Sb())})(function(a,b){var c=
|
|
191
|
+
document.createElement("script");c.type="text/javascript";c.async=!0;c.onload=b;c.src=a;document.head.appendChild(c)})})()
|