;/*FB_PKG_DELIM*/ __d("AsyncTypedRequest",["AsyncRequest"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t){var n;return n=e.call(this,t)||this,n.setReplaceTransportMarkers(),n}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.promisePayload=function(n){return e.prototype.promisePayload.call(this,n)},n.setPayloadHandler=function(n){return e.prototype.setPayloadHandler.call(this,n),this},t})(r("AsyncRequest"));l.default=e}),98); __d("DGWBestEffortCallbacks",[],(function(t,n,r,o,a,i){"use strict";var e=function(t,n){var e=!1,r=null;for(var o of t)try{o()}catch(t){e||(e=!0,r=t)}e&&n(r)};i.runCallbacksBestEffort=e}),66); __d("DGWInternalCertPriming",["Promise","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i){"use strict";var e,l=new Set(["gateway.internalfb.com"]),s=4e3,u=new Map,c=new Map;function d(e){try{var t=new URL(e);return t.protocol==="wss:"&&l.has(t.hostname)?t.host:null}catch(e){return null}}function m(e){return d(e)!=null}function p(t){var r=t.replace(/^wss:/i,"https:");return new(e||(e=n("Promise")))(function(e){var t=Reflect.get(globalThis,"clearTimeout"),n=Reflect.get(globalThis,"setTimeout"),o=!1,a=function(r){o||(o=!0,t(i),e(r))},i=n(function(){return a(!1)},s);try{var l=new XMLHttpRequest;l.onloadend=function(){return a(!0)},l.open("GET",r),l.withCredentials=!0,l.send()}catch(e){a(!1)}})}function _(e){return f.apply(this,arguments)}function f(){return f=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){var t=d(e);if(t==null)return!1;var n=u.get(t);if(n!=null)return yield n,!1;var r=p(e);u.set(t,r);var o=yield r;return!o&&u.get(t)===r&&u.delete(t),!0}),f.apply(this,arguments)}function g(e){return h.apply(this,arguments)}function h(){return h=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){var t=d(e);if(t==null)return!1;var n=c.get(t);if(n!=null)return yield n,!1;var r=p(e);c.set(t,r),u.set(t,r);var o=yield r;return o||(c.get(t)===r&&c.delete(t),u.get(t)===r&&u.delete(t)),!0}),h.apply(this,arguments)}i.shouldPrimeInternalCert=m,i.primeInternalCertOnce=_,i.primeInternalCertForRetryOnce=g}),66); __d("XFalcoBeaconControllerRouteBuilder",["jsRouteBuilder"],(function(t,n,r,o,a,i,l){var e=r("jsRouteBuilder")("/ajax/falco/",Object.freeze({}),void 0),s=e;l.default=s}),98); __d("FalcoBeaconTransport",["invariant","XFalcoBeaconControllerRouteBuilder","promiseDone"],(function(t,n,r,o,a,i,l,s){"use strict";var e=50,u=30*1024,c=48*1024,d="]}",m=/^\d+$/;function p(e){if(e==null)return{kind:"loggedOut"};var t=e.claims,n=e.appScopedIdentity;if(n!=null)return n===""||n==="0"?{kind:"loggedOut"}:{kind:"user",identifier:n,claims:t};var r=e.fbIdentity;if(r==null||String(r.accountId)==="0")return{kind:"loggedOut"};var o=String(r.accountId),a=String(r.actorId);return!m.test(o)||!m.test(a)?null:{kind:"user",identifier:o+":"+a,claims:t}}function _(e){for(var t=0,n=0;n=55296&&r<=56319&&n+1=56320&&e.charCodeAt(n+1)<=57343?(t+=4,n++):t+=3}return t}function f(e,t){var n=p(t.identity);if(n==null)return null;var r=g(t.policy.r),o=JSON.stringify({event:t.name,timeInMs:t.time,rate:r,payload:t.extra});return{entry:e,prefix:'{"sessionId":'+JSON.stringify(t.sessionId)+","+('"user":'+JSON.stringify(n)+',"events":['),part:o,bytes:_(o)}}function g(e){return Number.isInteger(e)||s(0,185197,e),e}function h(t){var n=new Map;for(var r of t){var o,a=(o=n.get(r.prefix))!=null?o:[];a.push(r),n.set(r.prefix,a)}var i=[],l=function(){var t=s[0],n=s[1],r=_(t)+d.length,o=[],a=r,l=function(){i.push({entries:o.map(function(e){return e.entry}),body:t+o.map(function(e){return e.part}).join(",")+d,bytes:a}),o=[],a=r};for(var c of n)(o.length>=e||o.length>0&&a+1+c.bytes>u)&&l(),a+=c.bytes+(o.length>0?1:0),o.push(c);o.length>0&&l()};for(var s of n)l();return i}function y(e,t){var n=[];for(var r of e){var o=f(r,t(r));o!=null&&n.push(o)}return h(n)}function C(e,n){var r;if(typeof((r=t.navigator)==null?void 0:r.sendBeacon)!="function")return"unsupported";try{return t.navigator.sendBeacon(e,n)?"sent":"refused"}catch(e){return"refused"}}function b(){return r("XFalcoBeaconControllerRouteBuilder").buildUri({}).toString()}function v(t){var n=[],o=0,a=void 0,i=!1,l=!1,s=[],d=0,m=new Set;function p(e){if(e.bytes>c){g(e,!1);return}s.push(e),_()}function _(){for(;s.length>0;){var e=s[0];if(document.visibilityState==="hidden"){var n=C(b(),e.body);if(n==="sent"){s.shift(),t.onSettled(e.entries,{kind:"assumed"});continue}if(n==="refused")return}if(d+e.bytes>c)return;s.shift(),g(e,!0)}}function g(e,n){var o=!1,a=function(r){o||(o=!0,m.delete(i),t.onSettled(e.entries,r))},i=function(){return a({kind:"assumed"})},l=function(r){a(r),n&&(d-=e.bytes,_())};n&&(d+=e.bytes,m.add(i)),r("promiseDone")(window.fetch(b(),{method:"POST",headers:{"Content-Type":"application/json"},body:e.body,credentials:"same-origin",keepalive:n}),function(e){return l(e.ok?{kind:"accepted"}:{kind:"rejected",status:e.status})},function(){return l(n?{kind:"assumed"}:{kind:"unsent"})})}function y(){window.clearTimeout(a),a=void 0,i=!1;var e=n;n=[],o=0;for(var t of h(e))p(t);_()}function v(){y();var e=s;s=[];for(var n of e)t.onSettled(n.entries,C(b(),n.body)==="sent"?{kind:"assumed"}:{kind:"unsent"});for(var r of Array.from(m))r()}function S(e){var n=f(e,t.getEvent(e));return n==null&&t.onSettled([e],{kind:"invalid"}),n}function R(){l||(l=!0,window.addEventListener("pagehide",y),document.addEventListener("visibilitychange",y))}function L(r,l){R();var s=S(r);if(s!=null){if((n.length>=e||n.length>0&&o+s.bytes>u)&&y(),n.push(s),o+=s.bytes,document.visibilityState==="hidden"){y();return}(a==null||l&&!i)&&(window.clearTimeout(a),a=window.setTimeout(y,l?t.immediateDelayMs:t.normalDelayMs),i=l)}}return{log:function(t){return L(t,!1)},logImmediately:function(t){return L(t,!0)},logCritical:function(t){R();var e=S(t);if(e!=null)for(var n of h([e]))p(n)},onUnload:v}}l.utf8ByteLength=_,l.createRequests=y,l.createFalcoBeaconTransport=v}),98); __d("HeroHoldLoggingBoundaryRegistry",[],(function(t,n,r,o,a,i){"use strict";var e=100,l=new Map;function s(e){l.has(e)||l.set(e,{holdIDs:[],name:null})}function u(e,t){var n=l.get(e);n!=null&&(n.name=t)}function c(t,n){var r,o=(r=l.get(t))==null?void 0:r.holdIDs;o!=null&&(o.push(n),o.length>e&&o.shift())}function d(e){var t;return(t=l.get(e))==null?void 0:t.name}function m(e){var t,n;return(t=(n=l.get(e))==null?void 0:n.holdIDs)!=null?t:[]}function p(e){l.delete(e)}i.addBoundary=s,i.updateBoundaryName=u,i.addHoldID=c,i.getBoundaryName=d,i.getHoldIDs=m,i.removeBoundary=p}),66);