"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[289],{58887:function(e,t,n){n.d(t,{fy:function(){return t8}});var r,o,i,a,s,c,u,l,f,d,p,v,g,h,m,y,b,S,w,C,E={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},k=console,_={};Object.keys(E).forEach(function(e){_[e]=k[e]});var x="Datadog Browser SDK:",O={debug:_.debug.bind(k,x),log:_.log.bind(k,x),info:_.info.bind(k,x),warn:_.warn.bind(k,x),error:_.error.bind(k,x)},T="https://docs.datadoghq.com";function R(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return e.apply(void 0,n)}catch(e){O.error(t,e)}}}var L=function(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},I=!1;function A(e){I=e}function P(e,t,n){var r=n.value;n.value=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(c?N(r):r).apply(this,e)}}function N(e){return function(){return U(e,this,arguments)}}function U(e,t,n){try{return e.apply(t,n)}catch(e){if(D(e),c)try{c(e)}catch(e){D(e)}}}function D(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];I&&O.error.apply(O,L(["[MONITOR]"],e,!1))}function B(e,t){return -1!==e.indexOf(t)}function M(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach(function(e){return t.push(e)});else for(var n=0;n<e.length;n++)t.push(e[n]);return t}function q(e){return Object.keys(e).map(function(t){return e[t]})}function j(e,t){return e.slice(0,t.length)===t}function G(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}),e}function H(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:window),e}var F=/[^\u0000-\u007F]/;function V(e){return F.test(e)?void 0!==window.TextEncoder?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function z(e,t){var n,r=H();return r.Zone&&"function"==typeof r.Zone.__symbol__&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}function J(e,t){return z(H(),"setTimeout")(N(e),t)}function W(e){z(H(),"clearTimeout")(e)}function Y(e,t){return z(H(),"setInterval")(N(e),t)}function K(e){z(H(),"clearInterval")(e)}function Z(e,t,n){var r,o,i=!n||void 0===n.leading||n.leading,a=!n||void 0===n.trailing||n.trailing,s=!1;return{throttled:function(){for(var n=[],c=0;c<arguments.length;c++)n[c]=arguments[c];if(s){r=n;return}i?e.apply(void 0,n):r=n,s=!0,o=J(function(){a&&r&&e.apply(void 0,r),s=!1,r=void 0},t)},cancel:function(){W(o),s=!1,r=void 0}}}function $(){}function X(e,t,n){if("object"!=typeof e||null===e)return JSON.stringify(e);var r=Q(Object.prototype),o=Q(Array.prototype),i=Q(Object.getPrototypeOf(e)),a=Q(e);try{return JSON.stringify(e,t,n)}catch(e){return"<error: unable to serialize object>"}finally{r(),o(),i(),a()}}function Q(e){var t=e.toJSON;return t?(delete e.toJSON,function(){e.toJSON=t}):$}function ee(e,t){return Object.keys(e).some(function(n){return e[n]===t})}function et(e){return 0===Object.keys(e).length}function en(e){var t=0,n=Z(function(n){t=V(X(n)),e()},200),r=n.throttled,o=n.cancel,i=function(){o(),t=0};return{updateCustomerData:function(e){et(e)?i():r(e)},resetCustomerData:i,getBytesCount:function(){return t},stop:function(){o()}}}function er(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function eo(e,t,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var e=new WeakSet;return{hasAlreadyBeenSeen:function(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen:function(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}()),void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var r=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,r)}if(!n.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var o=Array.isArray(e)?e:[],i=0;i<t.length;++i)o[i]=eo(o[i],t[i],n);return o}var a="object"===er(e)?e:{};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(a[s]=eo(a[s],t[s],n));return a}}function ei(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0;r<t.length;r++){var o=t[r];null!=o&&(e=eo(e,o))}return e}function ea(e,t){void 0===t&&(t=225280);var n,r=Q(Object.prototype),o=Q(Array.prototype),i=[],a=new WeakMap,s=es(e,"$",void 0,i,a),c=(null===(n=JSON.stringify(s))||void 0===n?void 0:n.length)||0;if(c>t){ec(t,"discarded",e);return}for(;i.length>0&&c<t;){var u=i.shift(),l=0;if(Array.isArray(u.source))for(var f=0;f<u.source.length;f++){var d=es(u.source[f],u.path,f,i,a);if(void 0!==d?c+=JSON.stringify(d).length:c+=4,c+=l,l=1,c>t){ec(t,"truncated",e);break}u.target[f]=d}else for(var f in u.source)if(Object.prototype.hasOwnProperty.call(u.source,f)){var d=es(u.source[f],u.path,f,i,a);if(void 0!==d&&(c+=JSON.stringify(d).length+l+f.length+3,l=1),c>t){ec(t,"truncated",e);break}u.target[f]=d}}return r(),o(),s}function es(e,t,n,r,o){var i=function(e){if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(e){}return e}(e);if(!i||"object"!=typeof i)return"bigint"==typeof i?"[BigInt] ".concat(i.toString()):"function"==typeof i?"[Function] ".concat(i.name||"unknown"):"symbol"==typeof i?"[Symbol] ".concat(i.description||i.toString()):i;var a=function(e){try{if(e instanceof Event)return{isTrusted:e.isTrusted};var t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return"[".concat(t[1],"]")}catch(e){}return"[Unserializable]"}(i);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;if(o.has(e))return"[Reference seen at ".concat(o.get(e),"]");var s=void 0!==n?"".concat(t,".").concat(n):t,c=Array.isArray(i)?[]:{};return o.set(e,s),r.push({source:i,target:c,path:s}),c}function ec(e,t,n){O.warn("The data provided has been ".concat(t," as it is over the limit of ").concat(e," characters:"),n)}var eu=function(){function e(e){this.onFirstSubscribe=e,this.observers=[]}return e.prototype.subscribe=function(e){var t=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0),this.observers.push(e),{unsubscribe:function(){t.observers=t.observers.filter(function(t){return e!==t}),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},e.prototype.notify=function(e){this.observers.forEach(function(t){return t(e)})},e}();function el(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new eu(function(t){var n=e.map(function(e){return e.subscribe(function(e){return t.notify(e)})});return function(){return n.forEach(function(e){return e.unsubscribe()})}})}function ef(e){var t={},n=new eu,r={getContext:function(){return eo(void 0,t)},setContext:function(o){"object"===er(o)?(t=ea(o),e.updateCustomerData(t)):r.clearContext(),n.notify()},setContextProperty:function(r,o){t[r]=ea(o),e.updateCustomerData(t),n.notify()},removeContextProperty:function(r){delete t[r],e.updateCustomerData(t),n.notify()},clearContext:function(){t={},e.resetCustomerData(),n.notify()},changeObservable:n};return r}var ed={GRANTED:"granted",NOT_GRANTED:"not-granted"};function ep(e,t,n,r,o){var i=void 0===o?{}:o,a=i.once,s=i.capture,c=i.passive,u=N(function(t){(t.isTrusted||t.__ddIsTrusted||e.allowUntrustedEvents)&&(a&&d(),r(t))}),l=c?{capture:s,passive:c}:s,f=z(t,"addEventListener");function d(){var e=z(t,"removeEventListener");n.forEach(function(n){return e.call(t,n,u,l)})}return n.forEach(function(e){return f.call(t,e,u,l)}),{stop:d}}(r=u||(u={})).BEFORE_UNLOAD="beforeunload",r.CLICK="click",r.DBL_CLICK="dblclick",r.KEY_DOWN="keydown",r.LOAD="load",r.POP_STATE="popstate",r.SCROLL="scroll",r.TOUCH_START="touchstart",r.TOUCH_END="touchend",r.TOUCH_MOVE="touchmove",r.VISIBILITY_CHANGE="visibilitychange",r.PAGE_SHOW="pageshow",r.FREEZE="freeze",r.RESUME="resume",r.DOM_CONTENT_LOADED="DOMContentLoaded",r.POINTER_DOWN="pointerdown",r.POINTER_UP="pointerup",r.POINTER_CANCEL="pointercancel",r.HASH_CHANGE="hashchange",r.PAGE_HIDE="pagehide",r.MOUSE_DOWN="mousedown",r.MOUSE_UP="mouseup",r.MOUSE_MOVE="mousemove",r.FOCUS="focus",r.BLUR="blur",r.CONTEXT_MENU="contextmenu",r.RESIZE="resize",r.CHANGE="change",r.INPUT="input",r.PLAY="play",r.PAUSE="pause",r.SECURITY_POLICY_VIOLATION="securitypolicyviolation",r.SELECTION_CHANGE="selectionchange",r.STORAGE="storage";var ev=[];function eg(e,t,n,r){var o="".concat("_dd_c","_").concat(n,"_").concat(r);function i(){var e=localStorage.getItem(o);return null!==e?JSON.parse(e):{}}ev.push(ep(e,window,[u.STORAGE],function(e){o===e.key&&t.setContext(i())},void 0)),t.changeObservable.subscribe(function(){localStorage.setItem(o,JSON.stringify(t.getContext()))}),t.setContext(ei(i(),t.getContext()))}function eh(e){var t=[],n=e_(e,"stack"),r=String(e);return n&&j(n,r)&&(n=n.slice(r.length)),n&&n.split("\n").forEach(function(e){var n=function(e){var t=eb.exec(e);if(t){var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),o=eS.exec(t[2]);return r&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||"?",line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}}(e)||function(e){var t=ew.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:"?",line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=eC.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||"?",line:+t[3],url:t[2]}}(e)||function(e){var t=eE.exec(e);if(t){var n=t[3]&&t[3].indexOf(" > eval")>-1,r=ek.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||"?",line:t[4]?+t[4]:void 0,url:t[3]}}}(e);n&&(!n.func&&n.line&&(n.func="?"),t.push(n))}),{message:e_(e,"message"),name:e_(e,"name"),stack:t}}var em="((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",ey="(?::(\\d+))",eb=RegExp("^\\s*at (.*?) ?\\(".concat(em).concat(ey,"?").concat(ey,"?\\)?\\s*$"),"i"),eS=new RegExp("\\((\\S*)".concat(ey).concat(ey,"\\)")),ew=RegExp("^\\s*at ?".concat(em).concat(ey,"?").concat(ey,"??\\s*$"),"i"),eC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,eE=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,ek=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function e_(e,t){if("object"==typeof e&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var ex=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function eO(){var e,t=Error();if(!t.stack)try{throw t}catch(e){}return U(function(){var n=eh(t);n.stack=n.stack.slice(2),e=eT(n)}),e}function eT(e){var t=eR(e);return e.stack.forEach(function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"(".concat(e.args.join(", "),")"):"",o=e.line?":".concat(e.line):"",i=e.line&&e.column?":".concat(e.column):"";t+="\n  at ".concat(n).concat(r," @ ").concat(e.url).concat(o).concat(i)}),t}function eR(e){return"".concat(e.name||"Error",": ").concat(e.message)}var eL="No stack, consider using an instance of Error";function eI(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,o=e.startClocks,i=e.nonErrorPrefix,a=e.source,s=e.handling,c=n instanceof Error,u=(null==t?void 0:t.message)&&(null==t?void 0:t.name)?t.message:c?"Empty message":"".concat(i," ").concat(X(ea(n))),l=void 0!==t&&(c||t.stack.length>0&&(t.stack.length>1||void 0!==t.stack[0].url))?eT(t):eL,f=c?eP(n,a):void 0,d=null==t?void 0:t.name,p=eA(n);return{startClocks:o,source:a,handling:s,handlingStack:r,originalError:n,type:d,message:u,stack:l,causes:f,fingerprint:p}}function eA(e){return e instanceof Error&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function eP(e,t){for(var n=e,r=[];(null==n?void 0:n.cause)instanceof Error&&r.length<10;){var o=eh(n.cause);r.push({message:n.cause.message,source:t,type:null==o?void 0:o.name,stack:o&&eT(o)}),n=n.cause}return r.length?r:void 0}(o=l||(l={})).WRITABLE_RESOURCE_GRAPHQL="writable_resource_graphql",o.CUSTOM_VITALS="custom_vitals",o.TOLERANT_RESOURCE_TIMINGS="tolerant_resource_timings",o.REMOTE_CONFIGURATION="remote_configuration",o.PLUGINS="plugins";var eN=new Set,eU="datadoghq.com",eD="pci.browser-intake-datadoghq.com";function eB(){return new Date().getTime()}function eM(){return performance.now()}function eq(){return{relative:eM(),timeStamp:eB()}}function ej(){return void 0===f&&(f=performance.timing.navigationStart),f}function eG(e,t){var n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function eH(e){return 0!==e&&100*Math.random()<=e}function eF(e){return"number"==typeof e&&e>=0&&e<=100}function eV(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}var ez=function(){function e(){this.buffer=[]}return e.prototype.add=function(e){this.buffer.push(e)>500&&this.buffer.splice(0,1)},e.prototype.remove=function(e){eV(this.buffer,e)},e.prototype.drain=function(e){this.buffer.forEach(function(t){return t(e)}),this.buffer.length=0},e}(),eJ={log:"log",configuration:"configuration",usage:"usage"},eW=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],eY=["ddog-gov.com"],eK=new ez,eZ=function(e){eK.add(function(){return eZ(e)})};function e$(e,t){D(E.debug,e,t),eZ(G({type:eJ.log,message:e,status:"debug"},t))}function eX(e,t){eZ(G({type:eJ.log,status:"error"},function(e){if(e instanceof Error){var t=eh(e);return{error:{kind:t.name,stack:eT((t.stack=t.stack.filter(function(e){return!e.url||eW.some(function(t){return j(e.url,t)})}),t))},message:t.message}}return{error:{stack:eL},message:"".concat("Uncaught"," ").concat(X(e))}}(e),t))}function eQ(e){var t=G({},e);return["id","name","email"].forEach(function(e){e in t&&(t[e]=String(t[e]))}),t}function e0(e,t){t.silentMultipleInit||O.error("".concat(e," is already initialized."))}var e1={AGENT:"agent",CONSOLE:"console",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function e2(e,t,n){var r=n.getHandler(),o=Array.isArray(r)?r:[r];return e4[e]>=e4[n.getLevel()]&&B(o,t)}var e3={ok:"ok",debug:"debug",info:"info",notice:"notice",warn:"warn",error:"error",critical:"critical",alert:"alert",emerg:"emerg"},e4=((d={})[e3.ok]=0,d[e3.debug]=1,d[e3.info]=2,d[e3.notice]=4,d[e3.warn]=5,d[e3.error]=6,d[e3.critical]=7,d[e3.alert]=8,d[e3.emerg]=9,d),e5=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},e8={console:"console",http:"http"},e6=Object.keys(e3),e9=function(){function e(e,t,n,r,o,i){void 0===r&&(r=e8.http),void 0===o&&(o=e3.debug),void 0===i&&(i={}),this.handleLogStrategy=e,this.handlerType=r,this.level=o,this.contextManager=ef(t),this.contextManager.setContext(i),n&&this.contextManager.setContextProperty("logger",{name:n})}return e.prototype.logImplementation=function(e,t,n,r,o){if(void 0===n&&(n=e3.info),null!=r){var i,a=eI({stackTrace:r instanceof Error?eh(r):void 0,originalError:r,nonErrorPrefix:"Provided",source:e1.LOGGER,handling:"handled",startClocks:eq()});i={stack:a.stack,kind:a.type,message:a.message,causes:a.causes}}var s=ea(t),c=i?ei({error:i},s):s;this.handleLogStrategy({message:ea(e),context:c,status:n},this,o)},e.prototype.log=function(e,t,n,r){var o;void 0===n&&(n=e3.info),e2(n,e8.http,this)&&(o=eO()),this.logImplementation(e,t,n,r,o)},e.prototype.setContext=function(e){this.contextManager.setContext(e)},e.prototype.getContext=function(){return this.contextManager.getContext()},e.prototype.setContextProperty=function(e,t){this.contextManager.setContextProperty(e,t)},e.prototype.removeContextProperty=function(e){this.contextManager.removeContextProperty(e)},e.prototype.clearContext=function(){this.contextManager.clearContext()},e.prototype.setHandler=function(e){this.handlerType=e},e.prototype.getHandler=function(){return this.handlerType},e.prototype.setLevel=function(e){this.level=e},e.prototype.getLevel=function(){return this.level},e5([P],e.prototype,"logImplementation",null),e}();function e7(e){return function(t,n,r){var o;e2(e,e8.http,this)&&(o=eO()),this.logImplementation(t,n,e,r,o)}}function te(){var e=H().DatadogEventBridge;if(e)return{getCapabilities:function(){var t;return JSON.parse((null===(t=e.getCapabilities)||void 0===t?void 0:t.call(e))||"[]")},getPrivacyLevel:function(){var t;return null===(t=e.getPrivacyLevel)||void 0===t?void 0:t.call(e)},getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts())},send:function(t,n,r){e.send(JSON.stringify({eventType:t,event:n,view:r?{id:r}:void 0}))}}}function tt(e){void 0===e&&(e=null===(t=H().location)||void 0===t?void 0:t.hostname);var t,n=te();return!!n&&n.getAllowedWebViewHosts().some(function(t){var n,r;return e===t||(n=e,r=".".concat(t),n.slice(-r.length)===r)})}function tn(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,tn)}e9.prototype.ok=e7(e3.ok),e9.prototype.debug=e7(e3.debug),e9.prototype.info=e7(e3.info),e9.prototype.notice=e7(e3.notice),e9.prototype.warn=e7(e3.warn),e9.prototype.error=e7(e3.error),e9.prototype.critical=e7(e3.critical),e9.prototype.alert=e7(e3.alert),e9.prototype.emerg=e7(e3.emerg);var tr=/([\w-]+)\s*=\s*([^;]+)/g;function to(e,t,n,r){var o=new Date;o.setTime(o.getTime()+n);var i="expires=".concat(o.toUTCString()),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain=".concat(r.domain):"",c=r&&r.secure?";secure":"",u=r&&r.partitioned?";partitioned":"";document.cookie="".concat(e,"=").concat(t,";").concat(i,";path=/;samesite=").concat(a).concat(s).concat(c).concat(u)}function ti(e){return function(e,t){for(tr.lastIndex=0;;){var n=tr.exec(e);if(n){if(n[1]===t)return n[2]}else break}}(document.cookie,e)}function ta(e){return v||(v=function(e){var t=new Map;for(tr.lastIndex=0;;){var n=tr.exec(e);if(n)t.set(n[1],n[2]);else break}return t}(document.cookie)),v.get(e)}var ts="_dd_s",tc=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function tu(){return{isExpired:"1"}}function tl(e){return void 0!==e.isExpired||!((void 0===e.created||eB()-Number(e.created)<144e5)&&(void 0===e.expire||eB()<Number(e.expire)))}function tf(e){e.expire=String(eB()+9e5)}function td(e){return Object.keys(e).map(function(t){return[t,e[t]]}).map(function(e){var t=e[0],n=e[1];return"".concat(t,"=").concat(n)}).join("&")}function tp(e){var t={};return e&&(-1!==e.indexOf("&")||tc.test(e))&&e.split("&").forEach(function(e){var n=tc.exec(e);if(null!==n){var r=n[1],o=n[2];t[r]=o}}),t}function tv(){return tp(ti(ts))}function tg(e){localStorage.setItem(ts,td(e))}function th(){return tp(localStorage.getItem(ts))}function tm(){tg(tu())}var ty=[];function tb(e,t,n){void 0===n&&(n=0);var r,o,i=t.isLockEnabled,a=t.persistSession,s=t.expireSession,c=function(e){return a(G({},e,{lock:o}))},u=function(){var e=t.retrieveSession(),n=e.lock;return e.lock&&delete e.lock,{session:e,lock:n}};if(h||(h=e),e!==h){ty.push(e);return}if(i&&n>=100){tw(t);return}var l=u();if(i&&(l.lock||(o=tn(),c(l.session),(l=u()).lock!==o))){tS(e,t,n);return}var f=e.process(l.session);if(i&&(l=u()).lock!==o){tS(e,t,n);return}if(f&&(tl(f)?s():(tf(f),i?c(f):a(f))),i&&!(f&&tl(f))){if((l=u()).lock!==o){tS(e,t,n);return}a(l.session),f=l.session}null===(r=e.after)||void 0===r||r.call(e,f||l.session),tw(t)}function tS(e,t,n){J(function(){tb(e,t,n+1)},10)}function tw(e){h=void 0;var t=ty.shift();t&&tb(t,e)}function tC(e){return function(e,t){var n=function(){if(void 0===m)try{var e=new tE("http://test/path");m="http://test/path"===e.href}catch(e){m=!1}return m?tE:void 0}();if(n)try{return void 0!==t?new n(e,t):new n(e)}catch(n){throw Error("Failed to construct URL: ".concat(String(n)," ").concat(X({url:e,base:t})))}if(void 0===t&&!/:/.test(e))throw Error("Invalid URL: '".concat(e,"'"));var r=document,o=r.createElement("a");if(void 0!==t){var i=(r=document.implementation.createHTMLDocument("")).createElement("base");i.href=t,r.head.appendChild(i),r.body.appendChild(o)}return o.href=e,o}(e,location.href).href}var tE=URL;function tk(e,t,n){var r=function(e,t){var n="/api/v2/".concat(t),r=e.proxy;if("string"==typeof r){var o=tC(r);return function(e){return"".concat(o,"?ddforward=").concat(encodeURIComponent("".concat(n,"?").concat(e)))}}if("function"==typeof r)return function(e){return r({path:n,parameters:e})};var i=function(e,t){var n=t.site,r=void 0===n?eU:n,o=t.internalAnalyticsSubdomain;if("logs"===e&&t.usePciIntake&&r===eU)return eD;if(o&&r===eU)return"".concat(o,".").concat(eU);if("dd0g-gov.com"===r)return"http-intake.logs.".concat(r);var i=r.split("."),a=i.pop();return"browser-intake-".concat(i.join("-"),".").concat(a)}(t,e);return function(e){return"https://".concat(i).concat(n,"?").concat(e)}}(e,t);return{build:function(o,i){var a,s,c,u,l,f;return r((a=e.clientToken,s=e.internalAnalyticsSubdomain,c=i.retry,u=i.encoding,l=["sdk_version:".concat("5.22.0"),"api:".concat(o)].concat(n),c&&l.push("retry_count:".concat(c.count),"retry_after:".concat(c.lastFailureStatus)),f=["ddsource=browser","ddtags=".concat(encodeURIComponent(l.join(","))),"dd-api-key=".concat(a),"dd-evp-origin-version=".concat(encodeURIComponent("5.22.0")),"dd-evp-origin=browser","dd-request-id=".concat(tn())],u&&f.push("dd-evp-encoding=".concat(u)),"rum"===t&&f.push("batch_time=".concat(eB())),s&&f.reverse(),f.join("&")))},urlPrefix:r(""),trackType:t}}var t_=/[^a-z0-9_:./-]/;function tx(e,t){var n=200-e.length-1;(t.length>n||t_.test(t))&&O.warn("".concat(e," value doesn't meet tag requirements and will be sanitized. More details: ").concat(T,"/getting_started/tagging/#defining-tags"));var r=t.replace(/,/g,"_");return"".concat(e,":").concat(r)}function tO(e,t){return null==e||"string"==typeof e||(O.error("".concat(t," must be defined as a string")),!1)}var tT={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function tR(e,t,n,r,o){return n?eT({name:e,message:t,stack:[{func:"?",url:n,line:null!=r?r:void 0,column:null!=o?o:void 0}]}):void 0}function tL(e,t,n){var r;if(void 0===e)return[];if(!("all"===e||Array.isArray(e)&&e.every(function(e){return B(t,e)}))){O.error("".concat(n,' should be "all" or an array with allowed values "').concat(t.join('", "'),'"'));return}return"all"===e?t:(r=new Set,e.forEach(function(e){return r.add(e)}),M(r))}var tI="logs",tA={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function tP(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||ta("datadog-synthetics-injects-rum"))}var tN=1/0,tU=function(){function e(e,t){var n=this;this.expireDelay=e,this.maxEntries=t,this.entries=[],this.clearOldValuesInterval=Y(function(){return n.clearOldValues()},6e4)}return e.prototype.add=function(e,t){var n=this,r={value:e,startTime:t,endTime:tN,remove:function(){eV(n.entries,r)},close:function(e){r.endTime=e}};return this.maxEntries&&this.entries.length>=this.maxEntries&&this.entries.pop(),this.entries.unshift(r),r},e.prototype.find=function(e,t){void 0===e&&(e=tN),void 0===t&&(t={returnInactive:!1});for(var n=0,r=this.entries;n<r.length;n++){var o=r[n];if(o.startTime<=e){if(t.returnInactive||e<=o.endTime)return o.value;break}}},e.prototype.closeActive=function(e){var t=this.entries[0];t&&t.endTime===tN&&t.close(e)},e.prototype.findAll=function(e,t){void 0===e&&(e=tN),void 0===t&&(t=0);var n=e+t;return this.entries.filter(function(t){return t.startTime<=n&&e<=t.endTime}).map(function(e){return e.value})},e.prototype.reset=function(){this.entries=[]},e.prototype.stop=function(){K(this.clearOldValuesInterval)},e.prototype.clearOldValues=function(){for(var e=eM()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<e;)this.entries.pop()},e}(),tD=[];function tB(e){return eH(e.sessionSampleRate)?"1":"0"}var tM=!1;function tq(e){var t=window;if(tP()){var n,r,o=i(t.DD_RUM_SYNTHETICS);return o||tM||(tM=!0,e$("Logs sent before RUM is injected by the synthetics worker",{testId:"string"==typeof(n=window._DATADOG_SYNTHETICS_PUBLIC_ID||ta("datadog-synthetics-public-id"))?n:void 0,resultId:"string"==typeof(r=window._DATADOG_SYNTHETICS_RESULT_ID||ta("datadog-synthetics-result-id"))?r:void 0})),o}return i(t.DD_RUM);function i(t){if(t&&t.getInternalContext)return t.getInternalContext(e)}}var tj={},tG=((y={})[E.log]=e3.info,y[E.debug]=e3.debug,y[E.info]=e3.info,y[E.warn]=e3.warn,y[E.error]=e3.error,y),tH=((b={})[tT.cspViolation]=e3.error,b[tT.intervention]=e3.error,b[tT.deprecation]=e3.warn,b);function tF(e,t,n,r){var o=(void 0===r?{}:r).computeHandlingStack,i=e[t];if("function"!=typeof i){if(!j(t,"on"))return{stop:$};i=$}var a=!1,s=function(){if(a)return i.apply(this,arguments);var e,t=M(arguments);U(n,null,[{target:this,parameters:t,onPostCall:function(t){e=t},handlingStack:o?eO():void 0}]);var r=i.apply(this,t);return e&&U(e,null,[r]),r};return e[t]=s,{stop:function(){a=!0,e[t]===s&&(e[t]=i)}}}var tV=new WeakMap;function tz(e){var t=e.target,n=e.parameters,r=n[0],o=n[1];tV.set(t,{state:"open",method:String(r).toUpperCase(),url:tC(String(o))})}function tJ(e){var t=e.target,n=tV.get(t);n&&(n.isAborted=!0)}function tW(e,t){return e.length>t.requestErrorResponseLengthLimit?"".concat(e.substring(0,t.requestErrorResponseLengthLimit),"..."):e}var tY=function(){function e(){this.callbacks={}}return e.prototype.notify=function(e,t){var n=this.callbacks[e];n&&n.forEach(function(e){return e(t)})},e.prototype.subscribe=function(e,t){var n=this;return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:function(){n.callbacks[e]=n.callbacks[e].filter(function(e){return t!==e})}}},e}(),tK=((C={})[e3.ok]=E.debug,C[e3.debug]=E.debug,C[e3.info]=E.info,C[e3.notice]=E.info,C[e3.warn]=E.warn,C[e3.error]=E.error,C[e3.critical]=E.error,C[e3.alert]=E.error,C[e3.emerg]=E.error,C),tZ=function(){function e(e,t,n,r){var o=this;this.encoder=e,this.request=t,this.flushController=n,this.messageBytesLimit=r,this.upsertBuffer={},this.flushSubscription=this.flushController.flushObservable.subscribe(function(e){return o.flush(e)})}return e.prototype.add=function(e){this.addOrUpdate(e)},e.prototype.upsert=function(e,t){this.addOrUpdate(e,t)},e.prototype.stop=function(){this.flushSubscription.unsubscribe()},e.prototype.flush=function(e){var t,n=q(this.upsertBuffer).join("\n");this.upsertBuffer={};var r=(t=e.reason,B(q(tA),t)),o=r?this.request.sendOnExit:this.request.send;if(r&&this.encoder.isAsync){var i=this.encoder.finishSync();i.outputBytesCount&&o(t$(i));var a=[i.pendingData,n].filter(Boolean).join("\n");a&&o({data:a,bytesCount:V(a)})}else n&&this.encoder.write(this.encoder.isEmpty?n:"\n".concat(n)),this.encoder.finish(function(e){o(t$(e))})},e.prototype.addOrUpdate=function(e,t){var n=X(e),r=this.encoder.estimateEncodedBytesCount(n);if(r>=this.messageBytesLimit){O.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB. More details: ").concat(T,"/real_user_monitoring/browser/troubleshooting/#technical-limitations"));return}this.hasMessageFor(t)&&this.remove(t),this.push(n,r,t)},e.prototype.push=function(e,t,n){var r=this;this.flushController.notifyBeforeAddMessage(t),void 0!==n?(this.upsertBuffer[n]=e,this.flushController.notifyAfterAddMessage()):this.encoder.write(this.encoder.isEmpty?e:"\n".concat(e),function(e){r.flushController.notifyAfterAddMessage(e-t)})},e.prototype.remove=function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=this.encoder.estimateEncodedBytesCount(t);this.flushController.notifyAfterRemoveMessage(n)},e.prototype.hasMessageFor=function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},e}();function t$(e){return{data:"string"==typeof e.output?e.output:new Blob([e.output],{type:"text/plain"}),bytesCount:e.outputBytesCount,encoding:e.encoding}}function tX(e,t,n,r,o){0===t.transportStatus&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?tQ(e,t,n,{onSuccess:function(){return t0(0,t,n,r,o)},onFailure:function(){t.queuedPayloads.enqueue(e),function e(t,n,r,o){2===t.transportStatus&&J(function(){tQ(t.queuedPayloads.first(),t,n,{onSuccess:function(){t.queuedPayloads.dequeue(),t.currentBackoffTime=1e3,t0(1,t,n,r,o)},onFailure:function(){t.currentBackoffTime=Math.min(6e4,2*t.currentBackoffTime),e(t,n,r,o)}})},t.currentBackoffTime)}(t,n,r,o)}}):t.queuedPayloads.enqueue(e)}function tQ(e,t,n,r){var o=r.onSuccess,i=r.onFailure;t.bandwidthMonitor.add(e),n(e,function(n){t.bandwidthMonitor.remove(e),"opaque"!==n.type&&(0===n.status&&!navigator.onLine||408===n.status||429===n.status||n.status>=500)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},i()):(t.transportStatus=0,o())})}function t0(e,t,n,r,o){0===e&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:"Reached max ".concat(r," events size queued for upload: ").concat(3,"MiB"),source:e1.AGENT,startClocks:eq()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=t1();i.size()>0;)tX(i.dequeue(),t,n,r,o)}function t1(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=3145728}}}var t2=!1;function t3(e,t,n,r){var o=new XMLHttpRequest;o.open("POST",t,!0),n instanceof Blob&&o.setRequestHeader("Content-Type",n.type),ep(e,o,["loadend"],function(){null==r||r({status:o.status})},{once:!0}),o.send(n)}function t4(e,t,n,r,o,i){var a=c(e,t),s=n&&c(e,n);function c(e,t){var n,a,s,c=t.endpoint;return new tZ(t.encoder,(n=e.batchBytesLimit,a={transportStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=81920&&this.ongoingRequestCount<32},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:t1(),queueFullReported:!1},s=function(t,r){return function(e,t,n,r,o){if(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}()&&r.bytesCount<n){var i=t.build("fetch",r);fetch(i,{method:"POST",body:r.data,keepalive:!0,mode:"cors"}).then(N(function(e){return null==o?void 0:o({status:e.status,type:e.type})}),N(function(){t3(e,t.build("xhr",r),r.data,o)}))}else t3(e,t.build("xhr",r),r.data,o)}(e,c,n,t,r)},{send:function(e){tX(e,a,s,c.trackType,r)},sendOnExit:function(t){(function(e,t,n,r){if(navigator.sendBeacon&&r.bytesCount<n)try{var o=t.build("beacon",r);if(navigator.sendBeacon(o,r.data))return}catch(e){t2||(t2=!0,eX(e))}t3(e,t.build("xhr",r),r.data)})(e,c,n,t)}}),function(e){var t,n=e.messagesLimit,r=e.bytesLimit,o=e.durationLimit,i=e.pageExitObservable,a=e.sessionExpireObservable,s=i.subscribe(function(e){return d(e.reason)}),c=a.subscribe(function(){return d("session_expire")}),u=new eu(function(){return function(){s.unsubscribe(),c.unsubscribe()}}),l=0,f=0;function d(e){if(0!==f){var t=f,n=l;f=0,l=0,p(),u.notify({reason:e,messagesCount:t,bytesCount:n})}}function p(){W(t),t=void 0}return{flushObservable:u,get messagesCount(){return f},notifyBeforeAddMessage:function(e){l+e>=r&&d("bytes_limit"),f+=1,l+=e,void 0===t&&(t=J(function(){d("duration_limit")},o))},notifyAfterAddMessage:function(e){void 0===e&&(e=0),l+=e,f>=n?d("messages_limit"):l>=r&&d("bytes_limit")},notifyAfterRemoveMessage:function(e){l-=e,0==(f-=1)&&p()}}}({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:o,sessionExpireObservable:i}),e.messageBytesLimit)}return{flushObservable:a.flushController.flushObservable,add:function(e,t){void 0===t&&(t=!0),a.add(e),s&&t&&s.add(n.transformMessage?n.transformMessage(e):e)},upsert:function(e,t){a.upsert(e,t),s&&s.upsert(n.transformMessage?n.transformMessage(e):e,t)},stop:function(){a.stop(),null==s||s.stop()}}}function t5(){var e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write:function(n,r){var o=V(n);t+=o,e+=n,r&&r(o)},finish:function(e){e(this.finishSync())},finishSync:function(){var n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,n},estimateEncodedBytesCount:function(e){return e.length}}}var t8=function(e){var t,n,r,o=function(e){void 0===e&&(e=2);var t=new Map,n=!1;function r(r){if(void 0===r&&(r=0),!n&&0!==e){var o=2===e?3072:16384,i=r;t.forEach(function(e){i+=e.getBytesCount()}),i>o&&(O.warn("Customer data exceeds the recommended ".concat(o/1024,"KiB threshold. More details: ").concat(T,"/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-threshold-warning")),n=!0)}}return{createDetachedTracker:function(){var e=en(function(){return r(e.getBytesCount())});return e},getOrCreateTracker:function(e){return t.has(e)||t.set(e,en(r)),t.get(e)},setCompressionStatus:function(t){0===e&&(e=t,r())},getCompressionStatus:function(){return e},stop:function(){t.forEach(function(e){return e.stop()}),t.clear()}}}(),i=ef(o.getOrCreateTracker(2)),a=ef(o.getOrCreateTracker(1)),s={tryToInit:function(e){t||(t=e)},update:function(e){t=e,n.notify()},isGranted:function(){return t===ed.GRANTED},observable:n=new eu};function c(){return{view:{referrer:document.referrer,url:window.location.href},context:i.getContext(),user:a.getContext()}}var u=function(e,t,n){var r,o,i=new ez,a=t.observable.subscribe(s);function s(){if(o&&r&&t.isGranted()){a.unsubscribe();var e=n(r,o);i.drain(e)}}return{init:function(e){if(!e){O.error("Missing configuration");return}if(Array.isArray(n=e.enableExperimentalFeatures)&&function(e){e.forEach(function(e){eN.add(e)})}(n.filter(function(e){return ee(l,e)})),tt()&&(e=G({},e,{clientToken:"empty"})),r=e,o){e0("DD_LOGS",e);return}var n,i=function(e){!0===e.usePciIntake&&e.site&&"datadoghq.com"!==e.site&&O.warn("PCI compliance for Logs is only available for Datadog organizations in the US1 site. Default intake will be used.");var t=function(e){var t,n,r,o,i,a,s,c,u,l,f,d,p,v,h,m;if(!e||!e.clientToken){O.error("Client Token is not configured, we will not send any data.");return}if(void 0!==e.sessionSampleRate&&!eF(e.sessionSampleRate)){O.error("Session Sample Rate should be a number between 0 and 100");return}if(void 0!==e.telemetrySampleRate&&!eF(e.telemetrySampleRate)){O.error("Telemetry Sample Rate should be a number between 0 and 100");return}if(void 0!==e.telemetryConfigurationSampleRate&&!eF(e.telemetryConfigurationSampleRate)){O.error("Telemetry Configuration Sample Rate should be a number between 0 and 100");return}if(void 0!==e.telemetryUsageSampleRate&&!eF(e.telemetryUsageSampleRate)){O.error("Telemetry Usage Sample Rate should be a number between 0 and 100");return}if(tO(e.version,"Version")&&tO(e.env,"Env")&&tO(e.service,"Service")){if(void 0!==e.trackingConsent&&!ee(ed,e.trackingConsent)){O.error('Tracking Consent should be either "granted" or "not-granted"');return}if(e.site&&(a=e.site,!/(datadog|ddog|datad0g|dd0g)/.test(a))){O.error("Site should be a valid Datadog site. Learn more here: ".concat(T,"/getting_started/site/."));return}return G({beforeSend:e.beforeSend&&R(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:((h=!function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var t="dd_cookie_test_".concat(tn()),n="test";to(t,n,6e4,e);var r=ti(t)===n;return to(t,"",0,e),r}catch(e){return O.error(e),!1}}(((v={}).secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,v.crossSite=!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,v.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(v.domain=function(){if(void 0===g){for(var e="dd_site_test_".concat(tn()),t=window.location.hostname.split("."),n=t.pop();t.length&&!ti(e);)to(e,"test",1e3,{domain:n="".concat(t.pop(),".").concat(n)});to(e,"",0,{domain:n}),g=n}return g}()),v))?void 0:{type:"Cookie",cookieOptions:v})||!e.allowFallbackToLocalStorage||(h=function(){try{var e=tn(),t="".concat("_dd_test_").concat(e);localStorage.setItem(t,e);var n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:"LocalStorage"}:void 0}catch(e){return}}()),h),sessionSampleRate:null!==(t=e.sessionSampleRate)&&void 0!==t?t:100,telemetrySampleRate:null!==(n=e.telemetrySampleRate)&&void 0!==n?n:20,telemetryConfigurationSampleRate:null!==(r=e.telemetryConfigurationSampleRate)&&void 0!==r?r:5,telemetryUsageSampleRate:null!==(o=e.telemetryUsageSampleRate)&&void 0!==o?o:5,service:e.service||void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:null!==(i=e.trackingConsent)&&void 0!==i?i:ed.GRANTED,storeContextsAcrossPages:!!e.storeContextsAcrossPages,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144},(s=e.site||eU,c=e.env,u=e.service,l=e.version,f=e.datacenter,d=[],c&&d.push(tx("env",c)),u&&d.push(tx("service",u)),l&&d.push(tx("version",l)),f&&d.push(tx("datacenter",f)),m=q(p={logsEndpointBuilder:tk(e,"logs",d),rumEndpointBuilder:tk(e,"rum",d),sessionReplayEndpointBuilder:tk(e,"replay",d)}).map(function(e){return e.urlPrefix}),s===eU&&m.push("https://".concat(eD,"/")),G({isIntakeUrl:function(e){return m.some(function(t){return 0===e.indexOf(t)})},replica:function(e,t,n){if(e.replica){var r=G({},e,{site:eU,clientToken:e.replica.clientToken}),o={logsEndpointBuilder:tk(r,"logs",n),rumEndpointBuilder:tk(r,"rum",n)};return t.push.apply(t,q(o).map(function(e){return e.urlPrefix})),G({applicationId:e.replica.applicationId},o)}}(e,m,d),site:s},p)))}}(e),n=tL(e.forwardConsoleLogs,q(E),"Forward Console Logs"),r=tL(e.forwardReports,q(tT),"Forward Reports");if(t&&n&&r)return e.forwardErrorsToLogs&&!B(n,E.error)&&n.push(E.error),G({forwardErrorsToLogs:!1!==e.forwardErrorsToLogs,forwardConsoleLogs:n,forwardReports:r,requestErrorResponseLengthLimit:32768,sendLogsAfterSessionExpiration:!!e.sendLogsAfterSessionExpiration},t)}(e);i&&(o=i,t.tryToInit(i.trackingConsent),s())},get initConfiguration(){return r},getInternalContext:$,handleLog:function(t,n,r,o,a){void 0===o&&(o=e()),void 0===a&&(a=eB()),i.add(function(e){return e.handleLog(t,n,r,o,a)})}}}(c,s,function(t,n){t.storeContextsAcrossPages&&(eg(n,i,tI,2),eg(n,a,tI,1));var r=e(t,n,c,s);return u=G({init:function(e){e0("DD_LOGS",e)},initConfiguration:t},r),r}),f={};return Object.defineProperty(r=G({version:"5.22.0",onReady:function(e){e()}},{logger:new e9(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return u.handleLog.apply(u,e)},o.createDetachedTracker()),init:N(function(e){return u.init(e)}),setTrackingConsent:N(function(e){s.update(e),eZ({type:eJ.usage,usage:{feature:"set-tracking-consent",tracking_consent:e}})}),getGlobalContext:N(function(){return i.getContext()}),setGlobalContext:N(function(e){return i.setContext(e)}),setGlobalContextProperty:N(function(e,t){return i.setContextProperty(e,t)}),removeGlobalContextProperty:N(function(e){return i.removeContextProperty(e)}),clearGlobalContext:N(function(){return i.clearContext()}),createLogger:N(function(e,t){return void 0===t&&(t={}),f[e]=new e9(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return u.handleLog.apply(u,e)},o.createDetachedTracker(),ea(e),t.handler,t.level,ea(t.context)),f[e]}),getLogger:N(function(e){return f[e]}),getInitConfiguration:N(function(){return eo(void 0,u.initConfiguration)}),getInternalContext:N(function(e){return u.getInternalContext(e)}),setUser:N(function(e){var t;(t="object"===er(e))||O.error("Unsupported user:",e),t&&a.setContext(eQ(e))}),getUser:N(function(){return a.getContext()}),setUserProperty:N(function(e,t){var n,r=eQ(((n={})[e]=t,n))[e];a.setContextProperty(e,r)}),removeUserProperty:N(function(e){return a.removeContextProperty(e)}),clearUser:N(function(){return a.clearContext()})}),"_setDebug",{get:function(){return A},enumerable:!1}),r}(function(e,t,n,r){var o=new tY,i=[];o.subscribe(1,function(e){return eG("logs",e)});var a=function(e){o.notify(0,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,origin:e1.AGENT,status:e3.error}}),e$("Error reported to customer",{"error.message":e.message})},s=new eu(function(e){var n=ep(t,window,[u.VISIBILITY_CHANGE,u.FREEZE],function(t){t.type===u.VISIBILITY_CHANGE&&"hidden"===document.visibilityState?e.notify({reason:tA.HIDDEN}):t.type===u.FREEZE&&e.notify({reason:tA.FROZEN})},{capture:!0}).stop,r=ep(t,window,[u.BEFORE_UNLOAD],function(){e.notify({reason:tA.UNLOADING})},void 0).stop;return function(){n(),r()}}),l=!t.sessionStoreStrategyType||tt()||tP()?(d="1"===tB(t)?{}:void 0,{findTrackedSession:function(){return d},expireObservable:new eu}):{findTrackedSession:function(e,t){void 0===t&&(t={returnInactive:!1});var n=v.findSession(e,t);return n&&"1"===n.trackingType?{id:n.id}:void 0},expireObservable:(v=function(e,t,n,r){var o,i,a,s,c,l,f,d,v,g=new eu,h=new eu,m=function(e,t,n){var r,o,i,a,s,c,u=new eu,l=new eu,f=new eu,d="Cookie"===e.type?(a=e.cookieOptions,!function(e){if(!ta(ts)){var t=ta("_dd"),n=ta("_dd_r"),r=ta("_dd_l"),o={};t&&(o.id=t),r&&/^[01]$/.test(r)&&(o.logs=r),n&&/^[012]$/.test(n)&&(o.rum=n),et(o)||(tf(o),e.persistSession(o))}}(s={isLockEnabled:1===(null!=p?p:(void 0===r&&(r=window),i=r.navigator.userAgent,p=r.chrome||/HeadlessChrome/.test(i)?1:(null===(o=r.navigator.vendor)||void 0===o?void 0:o.indexOf("Apple"))===0||/safari/i.test(i)&&!/chrome|android/i.test(i)?2:r.document.documentMode?0:3)),persistSession:function(e){to(ts,td(e),9e5,a)},retrieveSession:tv,expireSession:function(){to(ts,td(tu()),144e5,a)}}),s):{isLockEnabled:!1,persistSession:tg,retrieveSession:th,expireSession:tm},v=d.expireSession,g=Y(function(){tb({process:function(e){return tl(e)?tu():void 0},after:b},d)},1e3);S();var h=Z(function(){tb({process:function(e){if(!et(e)){var r=b(e);return function(e){if(et(e))return 0;var r=n(e[t]),o=r.trackingType,i=r.isTracked;e[t]=o,delete e.isExpired,i&&!e.id&&(e.id=tn(),e.created=String(eB()))}(r),r}},after:function(e){et(e)||w()||(c=e,u.notify()),c=e}},d)},1e3),m=h.throttled,y=h.cancel;function b(e){var n;return tl(e)&&(e=tu()),w()&&((n=e,c.id!==n.id||c[t]!==n[t])?(c=tu(),l.notify()):(f.notify({previousState:c,newState:e}),c=e)),e}function S(){tb({process:function(e){if(et(e))return tu()},after:function(e){c=e}},d)}function w(){return void 0!==c[t]}return{expandOrRenewSession:m,expandSession:function(){tb({process:function(e){return w()?b(e):void 0}},d)},getSession:function(){return c},renewObservable:u,expireObservable:l,sessionStateUpdateObservable:f,restartSession:S,expire:function(){y(),v(),b(tu())},stop:function(){K(g)},updateSessionState:function(e){tb({process:function(t){return G({},t,e)},after:b},d)}}}(e.sessionStoreStrategyType,t,n);tD.push(function(){return m.stop()});var y=new tU(144e5);function b(){return{id:m.getSession().id,trackingType:m.getSession()[t],isReplayForced:!!m.getSession().forcedReplay}}return tD.push(function(){return y.stop()}),m.renewObservable.subscribe(function(){y.add(b(),eM()),g.notify()}),m.expireObservable.subscribe(function(){h.notify(),y.closeActive(eM())}),m.expandOrRenewSession(),y.add(b(),{relative:0,timeStamp:ej()}.relative),r.observable.subscribe(function(){r.isGranted()?m.expandOrRenewSession():m.expire()}),v=ep(e,window,[u.CLICK,u.TOUCH_START,u.KEY_DOWN,u.SCROLL],function(){r.isGranted()&&m.expandOrRenewSession()},{capture:!0,passive:!0}).stop,tD.push(v),o=e,i=function(){return m.expandSession()},a=function(){"visible"===document.visibilityState&&i()},s=ep(o,document,[u.VISIBILITY_CHANGE],a,void 0).stop,tD.push(s),c=Y(a,6e4),tD.push(function(){K(c)}),l=e,f=function(){return m.restartSession()},d=ep(l,window,[u.RESUME],f,{capture:!0}).stop,tD.push(d),{findSession:function(e,t){return y.find(e,t)},renewObservable:g,expireObservable:h,sessionStateUpdateObservable:m.sessionStateUpdateObservable,expire:m.expire,updateSessionState:m.updateSessionState}}(t,"logs",function(e){var n;return{trackingType:n="0"===e||"1"===e?e:tB(t),isTracked:"1"===n}},r)).expireObservable},f=function(e,t,n,r,o){var i,a,s,u,l,f,d,p,v=(s=new eu,u=new Set,l=!B(eY,t.site)&&eH(t.telemetrySampleRate),(i={})[eJ.log]=l,i[eJ.configuration]=l&&eH(t.telemetryConfigurationSampleRate),i[eJ.usage]=l&&eH(t.telemetryUsageSampleRate),f={is_local_file:"file:"===window.location.protocol,is_worker:"WorkerGlobalScope"in self},eZ=function(e){var n=X(e);if(i[e.type]&&u.size<t.maxTelemetryEventsPerPage&&!u.has(n)){var r,o,c=ei({type:"telemetry",date:eB(),service:"browser-logs-sdk",version:"5.22.0",source:"browser",_dd:{format_version:2},telemetry:ei(e,{runtime_env:f,connectivity:{status:(o=window.navigator).onLine?"connected":"not_connected",interfaces:o.connection&&o.connection.type?[o.connection.type]:void 0,effective_type:null===(r=o.connection)||void 0===r?void 0:r.effectiveType}}),experimental_features:M(eN)},void 0!==a?a():{});s.notify(c),eG("telemetry",c),u.add(n)}},c=eX,{setContextProvider:function(e){a=e},observable:s,enabled:l});v.setContextProvider(function(){var e,t,n,r,i,a;return{application:{id:null===(e=tq())||void 0===e?void 0:e.application_id},session:{id:null===(t=o.findTrackedSession())||void 0===t?void 0:t.id},view:{id:null===(r=null===(n=tq())||void 0===n?void 0:n.view)||void 0===r?void 0:r.id},action:{id:null===(a=null===(i=tq())||void 0===i?void 0:i.user_action)||void 0===a?void 0:a.id}}});var g=[];if(tt()){var h=te(),m=v.observable.subscribe(function(e){return h.send("internal_telemetry",e)});g.push(function(){return m.unsubscribe()})}else{var y=t4(t,{endpoint:t.rumEndpointBuilder,encoder:t5()},t.replica&&{endpoint:t.replica.rumEndpointBuilder,encoder:t5()},n,r,o.expireObservable);g.push(function(){return y.stop()});var b=v.observable.subscribe(function(e){return y.add(e,"datad0g.com"===t.site)});g.push(function(){return b.unsubscribe()})}return eK.drain(),d={session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_cross_site_session_cookie:e.useCrossSiteSessionCookie,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent},p=G({forward_errors_to_logs:e.forwardErrorsToLogs,forward_console_logs:e.forwardConsoleLogs,forward_reports:e.forwardReports,use_pci_intake:e.usePciIntake,send_logs_after_session_expiration:e.sendLogsAfterSessionExpiration},d),eZ({type:eJ.configuration,configuration:p}),{telemetry:v,stop:function(){g.forEach(function(e){return e()})}}}(e,t,a,s,l).stop;if(i.push(function(){return f()}),function(e,t){function n(n,r){var o,i,a,s,c,u,l;function f(e){var o={isAborted:r.isAborted,handlingStack:r.handlingStack};t.notify(0,{rawLogsEvent:{message:"".concat("xhr"===n?"XHR":"Fetch"," error ").concat(r.method," ").concat(r.url),date:r.startClocks.timeStamp,error:{stack:e||"Failed to load"},http:{method:r.method,status_code:r.status,url:r.url},status:e3.error,origin:e1.NETWORK},domainContext:o})}!e.isIntakeUrl(r.url)&&(0===r.status&&"opaque"!==r.responseType||r.status>=500)&&("xhr"in r?f("string"==typeof(o=r.xhr).response?tW(o.response,e):o.response):r.response?(i=r.response,a=f,(s=function(e){try{return e.clone()}catch(e){return}}(i))&&s.body?window.TextDecoder?(c=s.body,u=e.requestErrorResponseLengthLimit,l=function(e,t){e?a("Unable to retrieve response: ".concat(e)):a(t)},function(e,t,n){var r=e.getReader(),o=[],i=0;function a(){if(r.cancel().catch($),n.collectStreamBody){if(1===o.length)s=o[0];else{s=new Uint8Array(i);var e,a,s,c=0;o.forEach(function(e){s.set(e,c),c+=e.length})}e=s.slice(0,n.bytesLimit),a=s.length>n.bytesLimit}t(void 0,e,a)}(function e(){r.read().then(N(function(t){if(t.done){a();return}n.collectStreamBody&&o.push(t.value),(i+=t.value.length)>n.bytesLimit?a():e()}),N(function(e){return t(e)}))})()}(c,function(e,t,n){if(e)l(e);else{var r=new TextDecoder().decode(t);n&&(r+="..."),l(void 0,r)}},{bytesLimit:u,collectStreamBody:!0})):s.text().then(N(function(t){return a(tW(t,e))}),N(function(e){return a("Unable to retrieve response: ".concat(e))})):a()):r.error&&f(tW(eT(eh(r.error)),e)))}e.forwardErrorsToLogs&&((S||(S=new eu(function(t){var n=tF(XMLHttpRequest.prototype,"open",tz).stop,r=tF(XMLHttpRequest.prototype,"send",function(n){(function(e,t,n){var r=e.target,o=e.handlingStack,i=tV.get(r);if(i){i.state="start",i.startClocks=eq(),i.isAborted=!1,i.xhr=r,i.handlingStack=o;var a=!1,s=tF(r,"onreadystatechange",function(){r.readyState===XMLHttpRequest.DONE&&c()}).stop,c=function(){var e;u(),s(),a||(a=!0,i.state="complete",i.duration=(e=i.startClocks.timeStamp,eB()-e),i.status=r.status,n.notify(G({},i)))},u=ep(t,r,["loadend"],c,void 0).stop;n.notify(i)}})(n,e,t)},{computeHandlingStack:!0}).stop,o=tF(XMLHttpRequest.prototype,"abort",tJ).stop;return function(){n(),r(),o()}})),S).subscribe(function(e){"complete"===e.state&&n("xhr",e)}),(w||(w=new eu(function(e){if(window.fetch)return tF(window,"fetch",function(t){var n,r,o,i,a,s,c,u,l;return n=t.parameters,r=t.onPostCall,o=t.handlingStack,i=n[0],void 0===(s=(a=n[1])&&a.method)&&i instanceof Request&&(s=i.method),c=void 0!==s?String(s).toUpperCase():"GET",u=i instanceof Request?i.url:tC(String(i)),l={state:"start",init:a,input:i,method:c,startClocks:eq(),url:u,handlingStack:o},void(e.notify(l),n[0]=l.input,n[1]=l.init,r(function(t){return function(e,t,n){var r=function(t){n.state="resolve","stack"in t||t instanceof Error?(n.status=0,n.isAborted=t instanceof DOMException&&t.code===DOMException.ABORT_ERR,n.error=t):"status"in t&&(n.response=t,n.responseType=t.type,n.status=t.status,n.isAborted=!1),e.notify(n)};t.then(N(r),N(r))}(e,t,l)}))},{computeHandlingStack:!0}).stop})),w).subscribe(function(e){"resolve"===e.state&&n("fetch",e)}))}(t,o),function(e,t){if(e.forwardErrorsToLogs){var n,r,o,i,a=new eu;(o=(n=r=function(e,t){var n=eI({stackTrace:e,originalError:t,startClocks:eq(),nonErrorPrefix:"Uncaught",source:e1.SOURCE,handling:"unhandled"});a.notify(n)},tF(window,"onerror",function(e){var t,r,o,i,a,s=e.parameters,c=s[0],u=s[1],l=s[2],f=s[3],d=s[4];n(a=d instanceof Error?eh(d):{name:("[object String]"===({}).toString.call(c)&&(r=(t=ex.exec(c))[1],o=t[2]),i={name:r,message:o}).name,message:i.message,stack:[{url:u,column:f,line:l}]},null!=d?d:c)})).stop,i=tF(window,"onunhandledrejection",function(e){var t=e.parameters[0].reason||"Empty reason";r(eh(t),t)}).stop,{stop:function(){o(),i()}}).stop,a.subscribe(function(e){t.notify(0,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,error:{kind:e.type,stack:e.stack,causes:e.causes},origin:e1.SOURCE,status:e3.error}})})}}(t,o),function(e,t){var n;(n=e.forwardConsoleLogs.map(function(e){return tj[e]||(tj[e]=new eu(function(t){var n=k[e];return k[e]=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n.apply(console,r);var i=eO();U(function(){t.notify(function(e,t,n){var r,o,i,a=e.map(function(e){return"string"==typeof e?ea(e):e instanceof Error?eR(eh(e)):X(ea(e),void 0,2)}).join(" ");if(t===E.error){var s=function(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n))return r}}(e,function(e){return e instanceof Error});r=s?eT(eh(s)):void 0,o=eA(s),i=s?eP(s,"console"):void 0}return{api:t,message:a,stack:r,handlingStack:n,fingerprint:o,causes:i}}(r,e,i))})},function(){k[e]=n}})),tj[e]}),el.apply(void 0,n)).subscribe(function(e){var n={rawLogsEvent:{date:eB(),message:e.message,origin:e1.CONSOLE,error:e.api===E.error?{stack:e.stack,fingerprint:e.fingerprint,causes:e.causes}:void 0,status:tG[e.api]},domainContext:{handlingStack:e.handlingStack}};t.notify(0,n)})}(t,o),(g=t.forwardReports,h=[],B(g,tT.cspViolation)&&h.push(new eu(function(e){return ep(t,document,[u.SECURITY_POLICY_VIOLATION],function(t){var n,r,o,i,a,s;e.notify((n=t,a=tT.cspViolation,s="'".concat(n.blockedURI,"' blocked by '").concat(n.effectiveDirective,"' directive"),{type:tT.cspViolation,subtype:n.effectiveDirective,message:"".concat(a,": ").concat(s),stack:tR(n.effectiveDirective,n.originalPolicy?"".concat(s,' of the policy "').concat((i=(o=(r=n.originalPolicy).charCodeAt(99))>=55296&&o<=56319?101:100,r.length<=i?r:"".concat(r.slice(0,i)).concat("...")),'"'):"no policy",n.sourceFile,n.lineNumber,n.columnNumber),originalReport:n}))},void 0).stop})),(m=g.filter(function(e){return e!==tT.cspViolation})).length&&h.push(new eu(function(e){if(window.ReportingObserver){var t=N(function(t,n){return t.forEach(function(t){var n,r;e.notify({type:n=t.type,subtype:(r=t.body).id,message:"".concat(n,": ").concat(r.message),originalReport:t,stack:tR(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)})})}),n=new window.ReportingObserver(t,{types:m,buffered:!0});return n.observe(),function(){n.disconnect()}}})),el.apply(void 0,h)).subscribe(function(e){var t,n,r,i=e.message,a=tH[e.type];a===e3.error?r={kind:e.subtype,stack:e.stack}:e.stack&&(i+=" Found in ".concat((t=e.stack,null===(n=/@ (.+)/.exec(t))||void 0===n?void 0:n[1]))),o.notify(0,{rawLogsEvent:{date:eB(),message:i,origin:e1.REPORT,error:r,status:a}})}),y=e6.concat(["custom"]),b={},y.forEach(function(e){var n,r,o;b[e]=(n=t.eventRateLimiterThreshold,r=0,o=!1,{isLimitReached:function(){if(0===r&&J(function(){r=0},6e4),(r+=1)<=n||o)return o=!1,!1;if(r===n+1){o=!0;try{a({message:"Reached max number of ".concat(e,"s by minute: ").concat(n),source:e1.AGENT,startClocks:eq()})}finally{o=!1}}return!0}})}),o.subscribe(0,function(e){var r,i,a=e.rawLogsEvent,s=e.messageContext,c=e.savedCommonContext,u=e.domainContext,f=a.date-ej(),d=l.findTrackedSession(f);if(d||t.sendLogsAfterSessionExpiration&&l.findTrackedSession(f,{returnInactive:!0})){var p=(void 0===c?void 0:c)||n(),v=ei({service:t.service,session_id:null==d?void 0:d.id,usr:et(p.user)?void 0:p.user,view:p.view},p.context,tq(f),a,void 0===s?void 0:s);(null===(r=t.beforeSend)||void 0===r?void 0:r.call(t,v,u))===!1||v.origin!==e1.AGENT&&(null!==(i=b[v.status])&&void 0!==i?i:b.custom).isLimitReached()||o.notify(1,v)}}),tt())!function(e){var t=te();e.subscribe(1,function(e){t.send("log",e)})}(o);else{var d,v,g,h,m,y,b,C,x=(C=t4(t,{endpoint:t.logsEndpointBuilder,encoder:t5()},t.replica&&{endpoint:t.replica.logsEndpointBuilder,encoder:t5()},a,s,l.expireObservable),o.subscribe(1,function(e){C.add(e)}),C).stop;i.push(function(){return x()})}return{handleLog:function(e,t,n,r,i){var a,s,c=ei(t.getContext(),e.context);if(e2(e.status,e8.console,t)&&(a=e.status,s=e.message,_[tK[a]].call(k,s,c)),e2(e.status,e8.http,t)){var u={rawLogsEvent:{date:i||eB(),message:e.message,status:e.status,origin:e1.LOGGER},messageContext:c,savedCommonContext:r};n&&(u.domainContext={handlingStack:n}),o.notify(0,u)}},getInternalContext:function(e){var t=l.findTrackedSession(e);if(t)return{session_id:t.id}},stop:function(){i.forEach(function(e){return e()})}}});(s=(i=H())[a="DD_LOGS"])&&!s.q&&s.version&&O.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),i[a]=t8,s&&s.q&&s.q.forEach(function(e){return R(e,"onReady callback threw an error:")()})},52185:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{requestIdleCallback:function(){return n},cancelIdleCallback:function(){return r}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);