var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;ii[er]&&(f.errorType="Overload",i[s]=!1),h={impressionGuid:r,timestamp:o,data:{eventType:kt,eventData:f}},ci([h])):tt(kt,f,null))}function uu(){ru();sr();try{w=_w.localStorage;u.initialize()}catch(n){}}function p(n){u.append(n);l()}function hi(n){return JSON.stringify(n).replace(/]]>/g,"]]]\]>")}function r(n,t,i){n.push("<",t,">",i,"<\/",t,">")}function fu(n,t,i){var s,e=n.data,o=e.eventData,h,u,f;o||(o=e.eventData={});t.push("");r(t,"T","Event."+e.eventType);r(t,"IG",o.OvrIG||n[ft]);n[ui]&&(r(t,"PrevIG",n[ui]),n[fi]&&r(t,"DominantIG",n[fi]));h=e.dataSources;h&&r(t,"DS","");u=e.pageLayout;u&&(t.push(""),f=!1,"Name"in u&&(r(t,"Name",u.Name),f=!0),"Number"in u&&(r(t,"Num",u.Number),f=!0),"IID"in u&&(r(t,"IID",u.IID),f=!0),"SFX"in u&&(r(t,"SFX",u.SFX),f=!0),f&&(u=(s=u.L)!==null&&s!==void 0?s:[]),r(t,"L",""),t.push("<\/Page>"));o.UTS=i;r(t,"D","");r(t,"TS",n[nr]);t.push("<\/E>")}function ht(n){var t=_w.location.href,i;return ut&&t.indexOf(ut)===0||(i=t.indexOf("?"),i<0&&(i=t.indexOf("#")),ut=i<0?t:t.substring(0,i)),n.CurUrl=ut,n}function hr(n){var i={isCompressed:!1,stringValue:""},t=[""],l=(new Date).getTime(),a=_G.CID||sj_cook.get(vi,vi),s,u,v,f,h,c,e,y,o;if(a&&r(t,"CID",a),n.length>0){for(s=n[0].data,s.eventType==dt&&(u=s.pageLayout,u&&u.IID&&u.SFX&&(v=u.IID+"_"+u.SFX,r(t,"AppNS",v))),f=0,h=nu;f0){for(t.push(""),e=0;e")}}if(t.push("<\/ClientInstRequest>"),o=t.join(""),_G.EnableCompression&&_w.fflate){var w=_w.fflate.strToU8(o),k=_w.fflate.deflateSync(w),p=btoa(String.fromCharCode.apply(String,k));if(p.lengthi[d]||r&&r.forceFlushNoSB)e[f].abort(),e[f]=null,y("TimedOut",1,_G.IG);else return;if(a=br(r),v=u.getBatch(n),v.length!=0){if(p=v.map(function(n){return n.log}),a&<(p,"SB"),h=hr(p),w=cr(h),a&&ou(w,h.stringValue)){e[f]&&t&&(e[f].abort(),e[f]=null);u.clearSentItems(n,!0)&&!n&&l(!1);l(!0);return}o=sj_gx();o.open("POST",w,!0);i[d]>=1e3&&(o.timeout=i[d]);o.onload=function(){return eu(o,e,n)};o.setRequestHeader("Content-type","text/xml");e[f]=o;e[tr]=(new Date).getTime();o.send(h.stringValue)}}}function lt(n,t,i){n.forEach(function(n){var r,u;(r=(u=n.data.eventData)[bt])!==null&&r!==void 0?r:u[bt]={};n.data.eventData[bt][t]=i!==null&&i!==void 0?i:"1"})}function eu(n,t,i){if(n.readyState===4){t[f]=null;var r=Math.floor(n.status/100);r===2?(u.clearSentItems(i)&&!i&&l(!1),l(!0)):r===4?(u.markFailedItems(!0,i),l(!0)):u.markFailedItems(!1,i);i&&u.recordRetryAttempt()}}function at(n,t,i,r,u,f,e,o,s){for(var d,h,a,v,l,y,g,c,p,w,b,k=0,nt=gr;k=0?h.T=i:(i.substring(0,3)==="CI."&&(i=i.substring(3)),h.T="CI."+i)),v=s||(new Date).getTime(),h.TS=v,h.RTS=v-pi,h.SEQ=gt++,l=(c={},c[ft]=f||h.ImpressionGuid||_G.IG,c[ui]=e,c[nr]=v,c.data={eventType:n||rt,eventData:h,dataSources:r,pageLayout:u},c[fi]=o,c),_G.XLSThrottle&&iu.indexOf(h.T)===-1){if(y=[l[ft],n!==null&&n!==void 0?n:rt,(p=h.T)!==null&&p!==void 0?p:"",(w=h.FID)!==null&&w!==void 0?w:"",(b=h.Name)!==null&&b!==void 0?b:""].join(","),ei.hasOwnProperty(y)||(ei[y]=0),g=++ei[y],g>_G.XLSThrottle)return null;g===_G.XLSThrottle&<([l],"TT")}return h.T==="CI.Click"||h.T==="CI.PredictionShown"||n===dt?(ci([l]),null):l}function ci(n){var i=hr(n),r=cr(i),u=i.stringValue,t;navigator&&navigator.sendBeacon?navigator.sendBeacon(r,u):(t=sj_gx(),t.open("POST",r),t.setRequestHeader("Content-type","text/xml"),t.send(u))}function lr(n,t){var r=[];for(var i in n)n.hasOwnProperty(i)&&(typeof n[i]=="string"&&(n[i]=decodeURIComponent(n[i])),r.push(i,n[i]));a(n.T,n.FID,n.Name,t,r,"DL")}function li(n,t){(new Image).src=_G.lsUrl+"&dl=2&Type=Event.ClientInst&DATA="+n;a("Info","XLS","DLFallback",!1,["DATA",n,"SRC",t],"DLF")}function ai(n,t,i){var r,u,f,e;if(_G.DirectLogFlight!=null&&t<=_G.DirectLogFlight)try{r=null;try{r=JSON.parse(n)}catch(o){r=JSON.parse(decodeURIComponent(n).replace(/[\u0000-\u001F]+/g,""))}if(Array.isArray(r))for(u=0,f=r;u0&&tt(yi,(t={queryTags:i.join(",")},t[e]="F",t),yi)}function yr(n,t,r,u,f,o){var h,l,c;if(i[s]){if(!n||!t||!r||!u)return console.error("LogCustomData: Missing one or more required identifier fields in data object");(l=__assign((h={T:n,FID:t,Name:r,Namespace:u,CustomDataKeys:Object.keys(f).join(",")},h[e]=v+"CD",h),f),c=at(rt,l,n,null,null,o),c)&&p(c)}}function ou(n,t){var i="sendBeacon",r=!1;if(navigator&&navigator[i])try{r=navigator[i](n,t)}catch(u){y("SBFail",1,_G.IG)}return r}function br(n){return _w[o]&&_w[o][di]?_w[o][di](n):n&&n.useSendBeacon}function kr(n,t){n===void 0&&(n=!0);(br(t)||t&&t.forceFlushNoSB)&&(u.dumpToStorage(),nt(!1,!0,t))}function vt(){u.dumpToStorage();nt(!1,!1)}function yt(){u.dumpToStorage();ti=!0;nt(!1,!0,{useSendBeacon:!0})}function dr(n,t,i){n!==null&&n!==void 0?n:n={};n[e]=v+"LP";tt(dt,n,"ClientSidePartialImpression",t,i)}var it,pt,wt,or,u,c,pr,wr,a;t.__esModule=!0;t.LogPartialImpression=t.FlushMainQueueDontForce=t.ForceFlush=t.Log2=t.Log=t.LogCustomData=t.LogFilterFlare=t.LogEvent=t.LogPerf=t.DirectLog=t.modifyRoute=t.collectCommonEventProperties=t.enqueue=void 0;var v="XLS-",e="SDK",bt="XLSF",vi="MUID",kt="CIQueueError",dt="PartialDynamicContent.FrontDoor",rt="ClientInst",yi="FilterFlare",i,gt,pi,w,ut,wi=0,bi="ClientInstConfig",ni="XLS_PreProcessor",gr=["ChatPrivacy","WSB"],b="XLS_PostProcessor",nu=["WSB"],o="XLS_Plugin_Function_Overrides",ki="determineRoute",di="useSendBeacon",gi="forceFlushNoSendBeacon",ti=!1,ii=!1,h="inProgress",ri="retried",ft="impressionGuid",ui="previousImpressionGuid",fi="dominantImpressionGuid",nr="timestamp",f="currentRequest",tr="requestSentTimestamp",et="mainQueue",k="retryQueue",ot="flushTimeoutHandle",d="flushInterval",ir="retryInterval",rr="maxStorageUse",ur="maxBatchSize",fr="queueDumpInterval",s="isInstrumentationEnabled",er="maxDirectErrors",tu="pageInfoTimeout",ei={},iu=["CI.Click","CI.BoxModel","CI.FilterFlare"],oi={},g="sj_evt",st="sj_be",si;(function(n){n[n.EVENT=0]="EVENT";n[n.MASTER_PAGE_IMPRESSION=1]="MASTER_PAGE_IMPRESSION"})(si||(si={}));or=["IsCI","VDPChapterTimestampClick"],function(n){function p(n){var t=["proactive","search","zinc"].some(function(t){return n.indexOf(t)==1});return"eventLogQueue"+(t?"_Online":"_Offline")}function a(){return f&&i[s]}function u(){var n,t;if(a()){n=rt();try{t=o;w[t]=n}catch(i){if(i.name.toLowerCase().indexOf("quota")>=0)f=!1;else throw i;}}}function c(){a()&&(e&&clearTimeout(e),e=setTimeout(u,i[fr]))}function k(){var n,e,i,u,r;if(w){if(n=w[o],t=[],typeof n=="string"||n&&n.length!==0)try{if(t=JSON.parse(n),t.some(function(n){return!n.log}))y("LSItemErr",t.length,_G.IG),t=[];else if(e=t.length,e>0){for(i=0,u=t;i0}function tt(n,i){for(var f=[],s=i?r[0]:t,e=0,u,o,l;e0&&(l=o/2,r.push(f.slice(0,l)),r.push(f.slice(l)));c()}function it(){var n,t,i;if(r.length>0){for(n=r[0],t=0;t0)for(r=0,n=0;n=u){t.splice(0,n+1);y("QueueTrim",n+1,_G.IG,!0);break}return JSON.stringify(t)}function ut(n){var i,r=(i={log:n,retried:!1},i[h]=!1,i.size=0,i),f=JSON.stringify(r).length+3;r.size=f;t.push(r);ti?u():c()}var t=[],f=!1,e=null,r=[],v=_w.location.pathname,o=p(v);n.dumpToStorage=u;n.initialize=k;n.getBatch=d;n.clearSentItems=g;n.markFailedItems=tt;n.recordRetryAttempt=it;n.append=ut}(u||(u={}));t.enqueue=p;t.collectCommonEventProperties=ht;t.modifyRoute=ct;c=(it={},it[et]={getInterval:function(){return i[d]}},it[k]={getInterval:function(){return i[ir]}},it);t.DirectLog=ai;t.LogPerf=ar;t.LogEvent=tt;t.LogFilterFlare=vr;t.LogCustomData=yr;pr=function(n,t,i,r){for(var f=[],u=4;u0&&f.length%2==0)for(c=0;c