if (self.CavalryLogger) { CavalryLogger.start_js(["8jCGD"]); } __d("BanzaiConsts",[],(function(a,b,c,d,e,f){a={SEND:"Banzai:SEND",OK:"Banzai:OK",ERROR:"Banzai:ERROR",SHUTDOWN:"Banzai:SHUTDOWN",BASIC:"basic",VITAL:"vital",BASIC_WAIT:6e4,BASIC_WAIT_COMET:2e3,VITAL_WAIT:1e3,BATCH_SIZE_LIMIT:64e3,EXPIRY:864e5,BATCH_TIMEOUT:1e4,LAST_STORAGE_FLUSH:"banzai:last_storage_flush",STORAGE_FLUSH_INTERVAL:12*60*6e4,ODS_ROUTE:"categorized_ods",POST_READY:0,POST_INFLIGHT:1,POST_SENT:2};e.exports=a}),null); __d("cancelIdleCallback",["requireCond","cr:692209"],(function(a,b,c,d,e,f){e.exports=b("cr:692209")}),null); __d("once",[],(function(a,b,c,d,e,f){"use strict";function a(a){var b=g(a);for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b}function g(a){var b=a,c;a=function(){if(b){for(var a=arguments.length,d=new Array(a),e=0;e=4){var a=j.indexOf(g);a>=0&&j.splice(a,1);try{a=g.status}catch(b){a=0}a==200?(c&&c(),e||o.inform((i||(i=b("BanzaiConsts"))).OK)):(d&&d(a),e||o.inform((i||(i=b("BanzaiConsts"))).ERROR))}};j.push(g);g.send(a,!1)},setHooks:function(a){},setUnloadHook:function(a){b("Run").onAfterUnload(a._unload)},onUnload:function(a){b("Run").onAfterUnload(a)},isOkToSendViaBeacon:function(){return!0}};e.exports=o}),null); __d("isAdsExcelAddinURI",[],(function(a,b,c,d,e,f){var g=new RegExp("(^|\\.)fbaddins\\.com$","i"),h=["https"];function a(a){if(a.isEmpty()&&a.toString()!=="#")return!1;return!a.getDomain()&&!a.getProtocol()?!1:h.indexOf(a.getProtocol())!==-1&&g.test(a.getDomain())}e.exports=a}),null); __d("isValidAsyncSignalURI",[],(function(a,b,c,d,e,f){var g=new RegExp("((^|\\.)instagram\\.com$)|((^|\\.)wit\\.ai$)|((^|\\.)accountkit\\.com$)","i"),h=["https"];function a(a){if(a.isEmpty()&&a.toString()!=="#")return!1;return!a.getDomain()&&!a.getProtocol()?!1:h.includes(a.getProtocol())&&g.test(a.getDomain())}e.exports=a}),null); __d("AsyncSignal",["Promise","ErrorGuard","QueryString","Run","TimeSlice","TrackingConfig","URI","ZeroRewrites","getAsyncParams","isAdsExcelAddinURI","isFacebookURI","isMessengerDotComURI","isValidAsyncSignalURI","isWorkplaceDotComURI","memoize","promiseDone"],(function(a,b,c,d,e,f){var g,h,i;function a(a,c){this.data=c||{},this.uri=a.toString(),b("TrackingConfig").domain&&this.uri.charAt(0)=="/"&&(this.uri=b("TrackingConfig").domain+this.uri)}a.prototype.setHandler=function(a){this.handler=a;return this};a.prototype.setTimeout=function(a){this.timeout=a;return this};a.prototype.send=function(){b("TimeSlice").guard(this._send.bind(this),"AsyncSignal send",{propagationType:b("TimeSlice").PropagationType.ORPHAN})()};a.prototype._send=function(){var a=this.handler,c=this.data;c.asyncSignal=(Math.random()*1e4|0)+1;var d=b("ZeroRewrites").rewriteURI(new(g||(g=b("URI")))(this.uri));d=b("isFacebookURI")(d)||b("isMessengerDotComURI")(d)||b("isAdsExcelAddinURI")(d)||b("isWorkplaceDotComURI")(d)||b("isValidAsyncSignalURI")(d);if(d)Object.assign(c,b("getAsyncParams")("POST"));else throw new Error("'"+this.uri+"' is an external URL, you should not send async signals to offsite links.");var e=b("QueryString").appendToUrl(this.uri,c);i||(i=new(b("Promise"))(function(a){b("Run").onAfterLoad(a)}));d=i.then(function(){return new(b("Promise"))(function(a,b){var c=new Image();c.onload=a;c.onerror=c.onabort=b;c.src=e})});if(a){var f=!1,j=b("memoize")(function(){(h||(h=b("ErrorGuard"))).applyWithGuard(a,null,[f])});b("promiseDone")(d.then(function(){f=!0,j()},j));this.timeout&&setTimeout(j,this.timeout)}return this};e.exports=a}),null); __d("PluginBundleInit",["DOM"],(function(a,b,c,d,e,f){e.exports={init:function(){var a=document.getElementById("jsbundle-loader");a&&b("DOM").remove(a)}}}),null); __d("intlSummarizeNumber",["FbtNumberType","IntlCompactDecimalNumberFormatConfig","IntlVariations","intlNumUtils"],(function(a,b,c,d,e,f){var g=3,h=14,i={ROUND:"ROUND",TRUNCATE:"TRUNCATE"},j={SHORT:"SHORT",LONG:"LONG"};function a(a,c,d,e){d===void 0&&(d=j.SHORT);e===void 0&&(e=i.ROUND);d=b("IntlCompactDecimalNumberFormatConfig")[d==j.SHORT?"short_patterns":"long_patterns"];var f=a===0?0:Math.floor(Math.log10(Math.abs(a)));f>h&&(f=h);var l=k(a,f,c,e,d),m=l[0],n=l[1];l=l[2];if(l){f+=1;l=k(a,f,c,e,d);m=l[0];n=l[1];l[2]}e=b("FbtNumberType").getVariation(m)||b("IntlVariations").NUMBER_OTHER;l=f.toString();l=(d=d)!=null?(d=d[l])!=null?d[e.toString()]:d:d;if(!l||f2?1:0);g=e==i.TRUNCATE?b("intlNumUtils").truncateLongNumber(j.toString(),d):j.toFixed(d);e=parseFloat(g)*(a<0?-1:1);return[e,e%1===0&&!k?0:d,g.length>f+(d>0?d+1:0)+(j>=0?0:1)&&c>>b}function p(a,b){return a[b]+(a[b+1]<<8)+(a[b+2]<<16)+(a[b+3]<<24)}function q(a,b,c){return a[b]===a[c]&&a[b+1]===a[c+1]&&a[b+2]===a[c+2]&&a[b+3]===a[c+3]}function r(a,b,c,d,e){var f;for(f=0;f>>8,e+=3);r(a,b,d,e,c);return e+c}function t(a,b,c,d){if(d<12&&c<2048){a[b]=1+(d-4<<2)+(c>>>8<<5);a[b+1]=c&255;return b+2}else{a[b]=2+(d-1<<2);a[b+1]=c&255;a[b+2]=c>>>8;return b+3}}function u(a,b,c,d){while(d>=68)b=t(a,b,c,64),d-=64;d>64&&(b=t(a,b,c,60),d-=60);return t(a,b,c,d)}function v(a,b,c,d,e){var f=1;while(1<=x){c=h-x;b+=1;x=o(p(a,b),g);while(w){t=32;l=b;do{b=l;k=x;v=t>>>5;t+=1;l=b+v;if(b>c){w=!1;break}x=o(p(a,l),g);r=i+f[k];f[k]=b-i}while(!q(a,b,r));if(!w)break;e=s(a,j,b-j,d,e);do{v=b;k=4;while(b+k=c){w=!1;break}t=o(p(a,b-1),g);f[t]=b-1-i;v=o(p(a,b),g);r=i+f[v];f[v]=b-i}while(q(a,b,r));if(!w)break;b+=1;x=o(p(a,b),g)}}j>>7,a>0&&(b[c]+=128),c+=1;while(a>0);return c}function x(a){this.array=a}x.prototype.maxCompressedLength=function(){var a=this.array.length;return 32+a+Math.floor(a/6)};x.prototype.compressToBuffer=function(a){var b=this.array,c=b.length,d=0,e=0,f;e=w(c,a,e);while(d>>b!==d)return-1;a|=d<>>2)+1;if(g>60){if(d+3>=c)return!1;h=g-60;g=b[d]+(b[d+1]<<8)+(b[d+2]<<16)+(b[d+3]<<24);g=(g&y[h])+1;d+=h}if(d+g>c)return!1;r(b,d,a,e,g);d+=g;e+=g}else{switch(f&3){case 1:g=(f>>>2&7)+4;i=b[d]+(f>>>5<<8);d+=1;break;case 2:if(d+1>=c)return!1;g=(f>>>2)+1;i=b[d]+(b[d+1]<<8);d+=2;break;case 3:if(d+3>=c)return!1;g=(f>>>2)+1;i=b[d]+(b[d+1]<<8)+(b[d+2]<<16)+(b[d+3]<<24);d+=4;break;default:break}if(i===0||i>e)return!1;z(a,e,i,g);e+=g}}return!0};e.exports.uncompress=a;e.exports.compress=b}),null); __d("SnappyCompressUtil",["SnappyCompress"],(function(a,b,c,d,e,f){"use strict";var g={compressUint8ArrayToSnappy:function(c){if(c==null)return null;var d=null;try{d=b("SnappyCompress").compress(c)}catch(a){return null}c="";for(var e=0;e127)return null;c[d]=e}return g.compressUint8ArrayToSnappy(c)},compressStringToSnappyBinary:function(c){if(a.Uint8Array===void 0)return null;var d=null;if(a.TextEncoder!==void 0)d=new TextEncoder().encode(c);else{d=new a.Uint8Array(c.length);for(var e=0;e127)return null;d[e]=f}}f=null;try{f=b("SnappyCompress").compress(d)}catch(a){return null}return f}};e.exports=g}),null); __d("BanzaiBase",["BanzaiAdapter","BanzaiCompressionUtils","BanzaiConsts","BanzaiLazyQueue","BanzaiUtils","CurrentUser","ErrorGuard","ExecutionEnvironment","FBLogger","NavigationMetrics","SetIdleTimeoutAcrossTransitions","Visibility","WebSession","performanceAbsoluteNow"],(function(a,b,c,d,e,f){var g,h,i,j="categorized_ods",k="blue_send_via_beacon_failure";c="blue_messages_received";d="blue_messages_sent";var l="blue_total_messages_received",m="blue_total_messages_sent",n={received:c,sent:d},o,p,q=[],r=null,s=0,t=0,u=0,v=0,w={_clearPostBuffer:function(){q=[]},_gatherWadsAndPostsFromBuffer:function(a,c,d,e,f){var g={currentSize:0,keepRetryable:d,overlimit:!1,sendMinimumOnePost:f,wadMap:new Map()};d=e.filter(function(d,e){return b("BanzaiUtils").filterPost(d,a,c,g)});g.overlimit&&d.length&&w._schedule(0);if(c.length+t+s!==0){s+=2;f=c.length+t+2;u+=2;v+=c.length+2;w.counterTracker("received",s,a,c);w.counterTracker("sent",f,a,c)}s=0;t=0;return d},_getEventTime:function(){return(g||(g=b("performanceAbsoluteNow")))()},_getWebSessionId:function(){return b("WebSession").getId()},_getPostBuffer:function(){return q},_getUserId:function(){return b("CurrentUser").getID()},_getAppId:function(){return b("CurrentUser").getAppID()},_initialize:function(){b("ExecutionEnvironment").canUseDOM&&(w.adapter.useBeacon&&b("Visibility").isSupported()?(b("Visibility").addListener(b("Visibility").HIDDEN,function(){w._getPostBuffer().length>0&&(w._tryToSendViaBeacon()||w._store(!1))}),w.isEnabled("enable_client_logging_clear_on_visible")&&b("Visibility").addListener(b("Visibility").VISIBLE,function(){w._tryToSendViaBeacon()||w._restore(!1)})):w.adapter.setHooks(w),w.adapter.setUnloadHook(w),b("NavigationMetrics").addListener(b("NavigationMetrics").Events.NAVIGATION_DONE,function(a,c){if(c.pageType!=="normal")return;w._restore(!1);b("NavigationMetrics").removeCurrentListener()}))},_sendBeacon:function(b,c){return a.navigator.sendBeacon(b,c)},_prepForTransit:function(a){var c=new FormData();c.append("ts",String(Date.now()));var d={};Object.keys(d).sort().forEach(function(a){var b=d[a];if(b===void 0)return;if(b===null){c.append(a,"");return}c.append(a,String(b))});var e=b("BanzaiCompressionUtils").outOfBandsPosts(a);Object.keys(e).forEach(function(a){c.append(a,e[a])});c.append("q",JSON.stringify(a));return c},_prepWadForTransit:function(a){b("BanzaiCompressionUtils").compressWad(a,b("BanzaiAdapter").preferredCompressionMethod())},_processCallbacksAndSendViaBeacon:function(){var a=[],c=[],d=[];w._gatherWadsAndPostsFromBuffer(c,d,!0,a,!1);if(c.length>0){c[0].send_method="beacon";c.map(w._prepWadForTransit);d=w._prepForTransit(c);a=b("BanzaiAdapter").getEndPointUrl(!0);c=w._sendBeacon(a,d);c||b("FBLogger")("banzai").warn("Error sending beacon")}},_restore:function(a){a=b("BanzaiAdapter").getStorage();var c=function(a){q.push(a)};(h||(h=b("ErrorGuard"))).applyWithGuard(a.restore,a,[c]);w._schedule(b("BanzaiAdapter").config.RESTORE_WAIT||(i||(i=b("BanzaiConsts"))).VITAL_WAIT)},_schedule:function(a){var c=w._getEventTime()+a;if(!p||c0&&((!w.adapter.useBeacon||!w._tryToSendViaBeacon())&&w._store(!1))},BASIC:{delay:b("BanzaiAdapter").config.MAX_WAIT||(i||(i=b("BanzaiConsts"))).BASIC_WAIT},BASIC_WAIT:(i||(i=b("BanzaiConsts"))).BASIC_WAIT,ERROR:i.ERROR,OK:i.OK,SEND:i.SEND,SHUTDOWN:i.SHUTDOWN,VITAL:{delay:b("BanzaiAdapter").config.MIN_WAIT||(i||(i=b("BanzaiConsts"))).VITAL_WAIT},VITAL_WAIT:i.VITAL_WAIT,adapter:b("BanzaiAdapter"),canUseNavigatorBeacon:function(){return Boolean(navigator&&navigator.sendBeacon&&b("BanzaiAdapter").isOkToSendViaBeacon())},counterTracker:function(a,c,d,e){var f;c=c;a=b("BanzaiUtils").wrapData(j,{2979:{banzai:(f={},f[n[a]]=[c],f)}},w._getEventTime(),!0);e.push(a);d.push({webSessionId:w._getWebSessionId(),posts:[a],needs_compression:!0,user:w._getUserId(),app_id:w._getAppId()})},flush:function(a,c){b("SetIdleTimeoutAcrossTransitions").clear(o),w._sendWithCallbacks(a,c)},isEnabled:function(a){return Boolean(b("BanzaiAdapter").config.gks&&b("BanzaiAdapter").config.gks[a])},post:function(a,c,d){var e;a||b("FBLogger")("banzai").mustfix("Banzai.post called without specifying a route");var f=(e=JSON.stringify(c))!=null?e:"",g=d==null?void 0:d.retry;if(b("BanzaiAdapter").config.disabled)return;if(!b("ExecutionEnvironment").canUseDOM&&!b("ExecutionEnvironment").isInWorker)return;var h=w.adapter.getTopLevel();if(h){var j;try{j=h.require("Banzai")}catch(a){j=null}if(j){j.post.apply(j,arguments);return}}var k=b("BanzaiAdapter").config.blacklist;if(k&&(k.indexOf&&(typeof k.indexOf=="function"&&k.indexOf(a)!=-1)))return;var l=f.length;s++;u++;var m=b("BanzaiUtils").wrapData(a,c,w._getEventTime(),g,l),n=m;(d==null?void 0:d.callback)&&(n.__meta.callback=d==null?void 0:d.callback);(d==null?void 0:d.compress)!=null&&(n.__meta.compress=d==null?void 0:d.compress);var o=d==null?void 0:d.delay;o==null&&(o=(i||(i=b("BanzaiConsts"))).BASIC_WAIT);if(d==null?void 0:d.signal){n.__meta.status=(i||(i=b("BanzaiConsts"))).POST_INFLIGHT;var p=[{user:w._getUserId(),webSessionId:w._getWebSessionId(),app_id:w._getAppId(),posts:[m],trigger:a}];b("BanzaiAdapter").send(w._prepForTransit(p),function(){v++,t++,n.__meta.status=(i||(i=b("BanzaiConsts"))).POST_SENT,n.__meta.callback&&n.__meta.callback()},function(a){b("BanzaiUtils").retryPost(m,a,q)},!0);if(!g)return}q.push(m);(w._schedule(o)||!r)&&(r=a);var x=b("BanzaiLazyQueue").flushQueue();x.forEach(function(a){return w.post.apply(w,a)})},subscribe:b("BanzaiAdapter").subscribe};w._initialize();e.exports=w}),null);