!function(){"use strict";var t={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},e=console,n={};Object.keys(t).forEach((function(t){n[t]=e[t]}));var r="Datadog Browser SDK:",i={debug:n.debug.bind(e,r),log:n.log.bind(e,r),info:n.info.bind(e,r),warn:n.warn.bind(e,r),error:n.error.bind(e,r)};function o(t,e){return function(){for(var n=[],r=0;r=0;return n||e.push(t),n}}}()),void 0===e)return t;if("object"!=typeof e||null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){var r=e.flags||[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.sticky?"y":"",e.unicode?"u":""].join("");return new RegExp(e.source,r)}if(!n.hasAlreadyBeenSeen(e)){if(Array.isArray(e)){for(var i=Array.isArray(t)?t:[],o=0;o"}finally{r(),i(),o(),a()}}function D(t){var e=t,n=e.toJSON;return n?(delete e.toJSON,function(){e.toJSON=n}):N}var F=220*S,B="$",V=3;function H(t,e){var n;void 0===e&&(e=F);var r=D(Object.prototype),i=D(Array.prototype),o=[],a=new WeakMap,s=q(t,B,void 0,o,a),u=(null===(n=JSON.stringify(s))||void 0===n?void 0:n.length)||0;if(!(u>e)){for(;o.length>0&&ue){j(e,"truncated",t);break}c.target[d]=f}else for(var d in c.source)if(Object.prototype.hasOwnProperty.call(c.source,d)){var f;if(void 0!==(f=q(c.source[d],c.path,d,o,a))&&(u+=JSON.stringify(f).length+l+d.length+V,l=1),u>e){j(e,"truncated",t);break}c.target[d]=f}}return r(),i(),s}j(e,"discarded",t)}function q(t,e,n,r,i){var o=function(t){var e=t;if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(t){}return t}(t);if(!o||"object"!=typeof o)return function(t){if("bigint"==typeof t)return"[BigInt] ".concat(t.toString());if("function"==typeof t)return"[Function] ".concat(t.name||"unknown");if("symbol"==typeof t)return"[Symbol] ".concat(t.description||t.toString());return t}(o);var a=function(t){try{if(t instanceof Event)return{isTrusted:t.isTrusted};var e=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(e&&e[1])return"[".concat(e[1],"]")}catch(t){}return"[Unserializable]"}(o);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;var s=t;if(i.has(s))return"[Reference seen at ".concat(i.get(s),"]");var u=void 0!==n?"".concat(e,".").concat(n):e,c=Array.isArray(o)?[]:{};return i.set(s,u),r.push({source:o,target:c,path:u}),c}function j(t,e,n){i.warn("The data provided has been ".concat(e," as it is over the limit of ").concat(t," characters:"),n)}var G,Z=function(){function t(t){this.onFirstSubscribe=t,this.observers=[]}return t.prototype.subscribe=function(t){var e=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(t),{unsubscribe:function(){e.observers=e.observers.filter((function(e){return t!==e})),!e.observers.length&&e.onLastUnsubscribe&&e.onLastUnsubscribe()}}},t.prototype.notify=function(t){this.observers.forEach((function(e){return e(t)}))},t}();function K(){for(var t=[],e=0;eW&&(i.warn("The ".concat(X[e]," data exceeds the recommended ").concat(W/S,"KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-3kib-warning")),!0)}var J=200;function $(t,e){void 0===e&&(e=k);var n,r={},i=!1,o=new Z,a=O((function(r){n=e(z(r)),i||(i=Y(n,t))}),J).throttled,s={getBytesCount:function(){return n},get:function(){return r},add:function(t,e){r[t]=e,a(r),o.notify()},remove:function(t){delete r[t],a(r),o.notify()},set:function(t){a(r=t),o.notify()},getContext:function(){return U(r)},setContext:function(t){"object"===L(t)?(r=H(t),a(r)):s.clearContext(),o.notify()},setContextProperty:function(t,e){r[t]=H(e),a(r),o.notify()},removeContextProperty:function(t){delete r[t],a(r),o.notify()},clearContext:function(){r={},n=0,o.notify()},changeObservable:o};return s}var Q=function(){function t(){this.buffer=[]}return t.prototype.add=function(t){this.buffer.push(t)>500&&this.buffer.splice(0,1)},t.prototype.drain=function(){this.buffer.forEach((function(t){return t()})),this.buffer.length=0},t}();function tt(t){return 0!==t&&100*Math.random()<=t}function et(t,e){return+t.toFixed(e)}function nt(t){return rt(t)&&t>=0&&t<=100}function rt(t){return"number"==typeof t}var it,ot,at=1e3,st=60*at,ut=60*st,ct=365*(24*ut);function lt(t){return{relative:t,timeStamp:dt(t)}}function dt(t){var e=pt()-performance.now();return e>wt()?Math.round(yt(e,t)):function(t){return Math.round(yt(wt(),t))}(t)}function ft(t){return rt(t)?et(1e6*t,0):t}function pt(){return(new Date).getTime()}function vt(){return pt()}function ht(){return performance.now()}function mt(){return{relative:ht(),timeStamp:vt()}}function gt(){return{relative:0,timeStamp:wt()}}function _t(t,e){return e-t}function yt(t,e){return t+e}function bt(t){return t-wt()}function wt(){return void 0===it&&(it=performance.timing.navigationStart),it}function St(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,St)}function Tt(t,e){var n=new RegExp("(?:^|;)\\s*".concat(e,"\\s*=\\s*([^;]+)")).exec(t);return n?n[1]:void 0}function Et(t,e,n){void 0===n&&(n="");var r=t.charCodeAt(e-1),i=r>=55296&&r<=56319?e+1:e;return t.length<=i?t:"".concat(t.slice(0,i)).concat(n)}function kt(t,e,n,r){var i=new Date;i.setTime(i.getTime()+n);var o="expires=".concat(i.toUTCString()),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain=".concat(r.domain):"",u=r&&r.secure?";secure":"";document.cookie="".concat(t,"=").concat(e,";").concat(o,";path=/;samesite=").concat(a).concat(s).concat(u)}function xt(t){return Tt(document.cookie,t)}function Ct(t,e){kt(t,"",0,e)}var At="datadog-synthetics-public-id",Rt="datadog-synthetics-result-id",It="datadog-synthetics-injects-rum";function Ot(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||xt(It))}function Nt(){var t=w().DatadogEventBridge;if(t)return{getAllowedWebViewHosts:function(){return JSON.parse(t.getAllowedWebViewHosts())},send:function(e,n){t.send(JSON.stringify({eventType:e,event:n}))}}}function Lt(t){var e;void 0===t&&(t=null===(e=w().location)||void 0===e?void 0:e.hostname);var n=Nt();return!!n&&n.getAllowedWebViewHosts().some((function(e){return t===e||(n=t,r=".".concat(e),n.slice(-r.length)===r);var n,r}))}function Mt(t,e,n,r,i){return Ut(t,e,[n],r,i)}function Ut(t,e,n,r,i){var o=void 0===i?{}:i,a=o.once,s=o.capture,u=o.passive,c=l(a?function(t){p(),r(t)}:r),d=u?{capture:s,passive:u}:s,f=x(e,"addEventListener");function p(){var t=x(e,"removeEventListener");n.forEach((function(n){return t.call(e,n,c,d)}))}return n.forEach((function(t){return f.call(e,t,c,d)})),{stop:p}}var Pt="_dd_c",zt=[];function Dt(t,e,n,r){void 0===r&&(r=k);var i=function(t,e){return"".concat(Pt,"_").concat(t,"_").concat(e)}(e,n),o=$(n,r);return a(),zt.push(Mt(t,window,"storage",(function(t){var e=t.key;i===e&&a()}))),o.changeObservable.subscribe((function(){localStorage.setItem(i,JSON.stringify(o.getContext()))})),o;function a(){var t=localStorage.getItem(i),e=null!==t?JSON.parse(t):{};o.setContext(e)}}var Ft="?";function Bt(t){var e=[],n=Xt(t,"stack"),r=String(t);return n&&_(n,r)&&(n=n.slice(r.length)),n&&n.split("\n").forEach((function(t){var n=function(t){var e=qt.exec(t);if(!e)return;var n=e[2]&&0===e[2].indexOf("native"),r=e[2]&&0===e[2].indexOf("eval"),i=jt.exec(e[2]);r&&i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3]);return{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||Ft,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}(t)||function(t){var e=Gt.exec(t);if(!e)return;return{args:[],column:e[3]?+e[3]:void 0,func:Ft,line:e[2]?+e[2]:void 0,url:e[1]}}(t)||function(t){var e=Zt.exec(t);if(!e)return;return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||Ft,line:+e[3],url:e[2]}}(t)||function(t){var e=Kt.exec(t);if(!e)return;var n=e[3]&&e[3].indexOf(" > eval")>-1,r=Wt.exec(e[3]);n&&r&&(e[3]=r[1],e[4]=r[2],e[5]=void 0);return{args:e[2]?e[2].split(","):[],column:e[5]?+e[5]:void 0,func:e[1]||Ft,line:e[4]?+e[4]:void 0,url:e[3]}}(t);n&&(!n.func&&n.line&&(n.func=Ft),e.push(n))})),{message:Xt(t,"message"),name:Xt(t,"name"),stack:e}}var Vt="((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet||\\w+\\.|\\/).*?)",Ht="(?::(\\d+))",qt=new RegExp("^\\s*at (.*?) ?\\(".concat(Vt).concat(Ht,"?").concat(Ht,"?\\)?\\s*$"),"i"),jt=new RegExp("\\((\\S*)".concat(Ht).concat(Ht,"\\)"));var Gt=new RegExp("^\\s*at ?".concat(Vt).concat(Ht,"?").concat(Ht,"??\\s*$"),"i");var Zt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var Kt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Wt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Xt(t,e){if("object"==typeof t&&t&&e in t){var n=t[e];return"string"==typeof n?n:void 0}}var Yt,Jt="No stack, consider using an instance of Error";function $t(t){var e=t.stackTrace,n=t.originalError,r=t.handlingStack,i=t.startClocks,o=t.nonErrorPrefix,a=t.source,s=t.handling,u=n instanceof Error,c=function(t,e,n,r){return(null==t?void 0:t.message)&&(null==t?void 0:t.name)?t.message:e?"Empty message":"".concat(n," ").concat(z(H(r)))}(e,u,o,n),l=function(t,e){if(void 0===e)return!1;if(t)return!0;return e.stack.length>0&&(e.stack.length>1||void 0!==e.stack[0].url)}(u,e)?te(e):Jt,d=u?function(t,e){var n=t,r=[];for(;(null==n?void 0:n.cause)instanceof Error&&r.length<10;){var i=Bt(n.cause);r.push({message:n.cause.message,source:e,type:null==i?void 0:i.name,stack:i&&te(i)}),n=n.cause}return r.length?r:void 0}(n,a):void 0;return{startClocks:i,source:a,handling:s,handlingStack:r,originalError:n,type:null==e?void 0:e.name,message:c,stack:l,causes:d,fingerprint:Qt(n)}}function Qt(t){return t instanceof Error&&"dd_fingerprint"in t?String(t.dd_fingerprint):void 0}function te(t){var e=ee(t);return t.stack.forEach((function(t){var n="?"===t.func?"":t.func,r=t.args&&t.args.length>0?"(".concat(t.args.join(", "),")"):"",i=t.line?":".concat(t.line):"",o=t.line&&t.column?":".concat(t.column):"";e+="\n at ".concat(n).concat(r," @ ").concat(t.url).concat(i).concat(o)})),e}function ee(t){return"".concat(t.name||"Error",": ").concat(t.message)}function ne(){var t,e=new Error;if(!e.stack)try{throw e}catch(t){}return d((function(){var n=Bt(e);n.stack=n.stack.slice(2),t=te(n)})),t}function re(t){var e=b({},t);return["id","name","email"].forEach((function(t){t in e&&(e[t]=String(e[t]))})),e}!function(t){t.PAGEHIDE="pagehide",t.FEATURE_FLAGS="feature_flags",t.RESOURCE_PAGE_STATES="resource_page_states",t.PAGE_STATES="page_states",t.COLLECT_FLUSH_REASON="collect_flush_reason",t.NO_RESOURCE_DURATION_FROZEN_STATE="no_resource_duration_frozen_state",t.SCROLLMAP="scrollmap",t.INTERACTION_TO_NEXT_PAINT="interaction_to_next_paint",t.WEB_VITALS_ATTRIBUTION="web_vitals_attribution",t.DISABLE_REPLAY_INLINE_CSS="disable_replay_inline_css"}(Yt||(Yt={}));var ie=new Set;function oe(t){return ie.has(t)}function ae(){return ie}function se(t){return b({},t)}function ue(t,e){return Object.keys(t).some((function(n){return t[n]===e}))}function ce(t){return 0===Object.keys(t).length}var le,de,fe,pe=4*ut,ve=15*st;var he="_dd_s",me=/^([a-z]+)=([a-z0-9-]+)$/,ge="&";function _e(t){return ce(t)}function ye(t){t.expire=String(pt()+ve)}function be(t){return g(t).map((function(t){var e=t[0],n=t[1];return"".concat(e,"=").concat(n)})).join(ge)}function we(t){var e={};return function(t){return!!t&&(-1!==t.indexOf(ge)||me.test(t))}(t)&&t.split(ge).forEach((function(t){var n=me.exec(t);if(null!==n){var r=n[1],i=n[2];e[r]=i}})),e}var Se="_dd",Te="_dd_r",Ee="_dd_l",ke="rum",xe="logs";function Ce(t){var e=function(t){var e={};e.secure=!!t.useSecureSessionCookie||!!t.useCrossSiteSessionCookie,e.crossSite=!!t.useCrossSiteSessionCookie,t.trackSessionAcrossSubdomains&&(e.domain=function(){if(void 0===ot){for(var t="dd_site_test_".concat(St()),e=window.location.hostname.split("."),n=e.pop();e.length&&!xt(t);)n="".concat(e.pop(),".").concat(n),kt(t,"test",at,{domain:n});Ct(t,{domain:n}),ot=n}return ot}());return e}(t);return function(t){if(void 0===document.cookie||null===document.cookie)return!1;try{var e="dd_cookie_test_".concat(St()),n="test";kt(e,n,st,t);var r=xt(e)===n;return Ct(e,t),r}catch(t){return i.error(t),!1}}(e)?{type:"Cookie",cookieOptions:e}:void 0}function Ae(t){var e,n={isLockEnabled:null!=de?de:de=!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent),persistSession:(e=t,function(t){kt(he,be(t),ve,e)}),retrieveSession:Re,clearSession:Ie(t)};return function(t){if(!xt(he)){var e=xt(Se),n=xt(Te),r=xt(Ee),i={};e&&(i.id=e),r&&/^[01]$/.test(r)&&(i[xe]=r),n&&/^[012]$/.test(n)&&(i[ke]=n),_e(i)||(ye(i),t.persistSession(i))}}(n),n}function Re(){return we(xt(he))}function Ie(t){return function(){Ct(he,t)}}var Oe="_dd_test_";function Ne(t){localStorage.setItem(he,be(t))}function Le(){return we(localStorage.getItem(he))}function Me(){localStorage.removeItem(he)}var Ue,Pe=10,ze=100,De=[];function Fe(t,e,n){var r;void 0===n&&(n=0);var i=e.isLockEnabled,o=e.retrieveSession,a=e.persistSession,s=e.clearSession;if(Ue||(Ue=t),t===Ue)if(i&&n>=ze)Ve(e);else{var u,c=o();if(i){if(c.lock)return void Be(t,e,n);if(u=St(),c.lock=u,a(c),(c=o()).lock!==u)return void Be(t,e,n)}var l=t.process(c);if(i&&(c=o()).lock!==u)Be(t,e,n);else{if(l&&(_e(l)?s():(ye(l),a(l))),i&&(!l||!_e(l))){if((c=o()).lock!==u)return void Be(t,e,n);delete c.lock,a(c),l=c}null===(r=t.after)||void 0===r||r.call(t,l||c),Ve(e)}}else De.push(t)}function Be(t,e,n){C((function(){Fe(t,e,n+1)}),Pe)}function Ve(t){Ue=void 0;var e=De.shift();e&&Fe(e,t)}var He=at;function qe(t){var e=Ce(t);return!e&&t.allowFallbackToLocalStorage&&(e=function(){try{var t=St(),e="".concat(Oe).concat(t);localStorage.setItem(e,t);var n=localStorage.getItem(e);return localStorage.removeItem(e),t===n?{type:"LocalStorage"}:void 0}catch(t){return}}()),e}function je(t,e,n){var r=new Z,i=new Z,o="Cookie"===t.type?Ae(t.cookieOptions):{isLockEnabled:!1,persistSession:Ne,retrieveSession:Le,clearSession:Me},a=o.clearSession,s=o.retrieveSession,u=R((function(){Fe({process:function(t){return f(t)?void 0:{}},after:l},o)}),He),c=function(){var t=s();if(f(t))return t;return{}}();function l(t){return f(t)||(t={}),d()&&(!function(t){return c.id!==t.id||c[e]!==t[e]}(t)?c=t:(c={},i.notify())),t}function d(){return void 0!==c[e]}function f(t){return(void 0===t.created||pt()-Number(t.created)n||an.test(e))&&i.warn("".concat(t," value doesn't meet tag requirements and will be sanitized"));var r=e.replace(/,/g,"_");return"".concat(t,":").concat(r)}function un(t){var e=function(t){var e=t.env,n=t.service,r=t.version,i=t.datacenter,o=[];return e&&o.push(sn("env",e)),n&&o.push(sn("service",n)),r&&o.push(sn("version",r)),i&&o.push(sn("datacenter",i)),o}(t),n=function(t,e){return{logsEndpointBuilder:rn(t,"logs",e),rumEndpointBuilder:rn(t,"rum",e),sessionReplayEndpointBuilder:rn(t,"sessionReplay",e)}}(t,e),r=m(n).map((function(t){return t.urlPrefix})),i=function(t,e,n){if(!t.replica)return;var r=b({},t,{site:$e,clientToken:t.replica.clientToken}),i={logsEndpointBuilder:rn(r,"logs",n),rumEndpointBuilder:rn(r,"rum",n)};return e.push.apply(e,m(i).map((function(t){return t.urlPrefix}))),b({applicationId:t.replica.applicationId},i)}(t,r,e);return b({isIntakeUrl:function(t){return r.some((function(e){return 0===t.indexOf(e)}))},replica:i,site:t.site||$e},n)}var cn={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"};function ln(t){var e,n,r;if(t&&t.clientToken){var a=null!==(e=t.sessionSampleRate)&&void 0!==e?e:t.sampleRate;if(void 0===a||nt(a))if(void 0===t.telemetrySampleRate||nt(t.telemetrySampleRate)){if(void 0===t.telemetryConfigurationSampleRate||nt(t.telemetryConfigurationSampleRate))return Array.isArray(t.enableExperimentalFeatures)&&t.enableExperimentalFeatures.filter((function(t){return ue(Yt,t)})).forEach((function(t){ie.add(t)})),b({beforeSend:t.beforeSend&&o(t.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:qe(t),sessionSampleRate:null!=a?a:100,telemetrySampleRate:null!==(n=t.telemetrySampleRate)&&void 0!==n?n:20,telemetryConfigurationSampleRate:null!==(r=t.telemetryConfigurationSampleRate)&&void 0!==r?r:5,service:t.service,silentMultipleInit:!!t.silentMultipleInit,batchBytesLimit:16*S,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*at,batchMessagesLimit:50,messageBytesLimit:256*S},un(t));i.error("Telemetry Configuration Sample Rate should be a number between 0 and 100")}else i.error("Telemetry Sample Rate should be a number between 0 and 100");else i.error("Session Sample Rate should be a number between 0 and 100")}else i.error("Client Token is not configured, we will not send any data.")}function dn(t){var e=L(t);return"string"===e||"function"===e||t instanceof RegExp}function fn(t,e,n){return void 0===n&&(n=!1),t.some((function(t){try{if("function"==typeof t)return t(e);if(t instanceof RegExp)return t.test(e);if("string"==typeof t)return n?_(e,t):t===e}catch(t){i.error(t)}return!1}))}function pn(t){0!==t.status||t.isAborted||(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function vn(t,e,n,r){if(void 0!==hn()&&n.findTrackedSession()){var i,o,a,s,u,c=h(t.allowedTracingUrls,(function(t){return fn([t.match],e.url,!0)}));if(c)e.traceId=new mn,e.spanId=new mn,e.traceSampled=!rt(t.traceSampleRate)||tt(t.traceSampleRate),r((i=e.traceId,o=e.spanId,a=e.traceSampled,s=c.propagatorTypes,u={},s.forEach((function(t){switch(t){case"datadog":b(u,{"x-datadog-origin":"rum","x-datadog-parent-id":o.toDecimalString(),"x-datadog-sampling-priority":a?"1":"0","x-datadog-trace-id":i.toDecimalString()});break;case"tracecontext":b(u,{traceparent:"00-0000000000000000".concat(i.toPaddedHexadecimalString(),"-").concat(o.toPaddedHexadecimalString(),"-0").concat(a?"1":"0")});break;case"b3":b(u,{b3:"".concat(i.toPaddedHexadecimalString(),"-").concat(o.toPaddedHexadecimalString(),"-").concat(a?"1":"0")});break;case"b3multi":b(u,{"X-B3-TraceId":i.toPaddedHexadecimalString(),"X-B3-SpanId":o.toPaddedHexadecimalString(),"X-B3-Sampled":a?"1":"0"})}})),u))}}function hn(){return window.crypto||window.msCrypto}var mn=function(){function t(){this.buffer=new Uint8Array(8),hn().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}return t.prototype.toString=function(t){var e=this.readInt32(0),n=this.readInt32(4),r="";do{var i=e%t*4294967296+n;e=Math.floor(e/t),n=Math.floor(i/t),r=(i%t).toString(t)+r}while(e||n);return r},t.prototype.toDecimalString=function(){return this.toString(10)},t.prototype.toPaddedHexadecimalString=function(){var t=this.toString(16);return Array(17-t.length).join("0")+t},t.prototype.readInt32=function(t){return 16777216*this.buffer[t]+(this.buffer[t+1]<<16)+(this.buffer[t+2]<<8)+this.buffer[t+3]},t}();function gn(t){var e,n,r,o,a,s;if(t.applicationId)if(void 0===t.sessionReplaySampleRate||nt(t.sessionReplaySampleRate)){var u=null!==(e=t.premiumSampleRate)&&void 0!==e?e:t.replaySampleRate;if(void 0!==u&&void 0!==t.sessionReplaySampleRate&&(i.warn("Ignoring Premium Sample Rate because Session Replay Sample Rate is set"),u=void 0),void 0===u||nt(u)){var c=null!==(n=t.traceSampleRate)&&void 0!==n?n:t.tracingSampleRate;if(void 0===c||nt(c))if(void 0===t.excludedActivityUrls||Array.isArray(t.excludedActivityUrls)){var l=function(t){void 0!==t.allowedTracingUrls&&void 0!==t.allowedTracingOrigins&&i.warn("Both allowedTracingUrls and allowedTracingOrigins (deprecated) have been defined. The parameter allowedTracingUrls will override allowedTracingOrigins.");if(void 0!==t.allowedTracingUrls){if(!Array.isArray(t.allowedTracingUrls))return void i.error("Allowed Tracing URLs should be an array");if(0!==t.allowedTracingUrls.length&&void 0===t.service)return void i.error("Service needs to be configured when tracing is enabled");var e=[];return t.allowedTracingUrls.forEach((function(t){var n;dn(t)?e.push({match:t,propagatorTypes:["datadog"]}):"object"===L(n=t)&&dn(n.match)&&Array.isArray(n.propagatorTypes)?e.push(t):i.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",t)})),e}if(void 0!==t.allowedTracingOrigins){if(!Array.isArray(t.allowedTracingOrigins))return void i.error("Allowed Tracing Origins should be an array");if(0!==t.allowedTracingOrigins.length&&void 0===t.service)return void i.error("Service needs to be configured when tracing is enabled");var n=[];return t.allowedTracingOrigins.forEach((function(t){var e=function(t){var e;"string"==typeof t?e=t:t instanceof RegExp?e=function(e){return t.test(Ze(e))}:"function"==typeof t&&(e=function(e){return t(Ze(e))});if(void 0===e)return void i.warn("Allowed Tracing Origins parameters should be a string, RegExp or function. Ignoring parameter",t);return{match:e,propagatorTypes:["datadog"]}}(t);e&&n.push(e)})),n}return[]}(t);if(l){var d=ln(t);if(d){var f=!!(null!==(r=t.trackUserInteractions)&&void 0!==r?r:t.trackInteractions),p=!!t.trackFrustrations;return b({applicationId:t.applicationId,version:t.version,actionNameAttribute:t.actionNameAttribute,sessionReplaySampleRate:null!==(a=null!==(o=t.sessionReplaySampleRate)&&void 0!==o?o:u)&&void 0!==a?a:100,oldPlansBehavior:void 0===t.sessionReplaySampleRate,traceSampleRate:c,allowedTracingUrls:l,excludedActivityUrls:null!==(s=t.excludedActivityUrls)&&void 0!==s?s:[],workerUrl:t.workerUrl,trackUserInteractions:f||p,trackFrustrations:p,trackViewsManually:!!t.trackViewsManually,trackResources:t.trackResources,trackLongTasks:t.trackLongTasks,subdomain:t.subdomain,defaultPrivacyLevel:ue(cn,t.defaultPrivacyLevel)?t.defaultPrivacyLevel:cn.MASK_USER_INPUT,customerDataTelemetrySampleRate:1},d)}}}else i.error("Excluded Activity Urls should be an array");else i.error("Trace Sample Rate should be a number between 0 and 100")}else i.error("Premium Sample Rate should be a number between 0 and 100")}else i.error("Session Replay Sample Rate should be a number between 0 and 100");else i.error("Application ID is not configured, no RUM data will be collected.")}function _n(t){var e=new Set;return Array.isArray(t.allowedTracingUrls)&&t.allowedTracingUrls.length>0&&t.allowedTracingUrls.forEach((function(t){dn(t)?e.add("datadog"):"object"===L(t)&&Array.isArray(t.propagatorTypes)&&t.propagatorTypes.forEach((function(t){return e.add(t)}))})),Array.isArray(t.allowedTracingOrigins)&&t.allowedTracingOrigins.length>0&&e.add("datadog"),v(e)}function yn(t,e,n){return{context:t.getContext(),user:e.getContext(),hasReplay:!!n.isRecording()||void 0}}function bn(t,e){var n=window.__ddBrowserSdkExtensionCallback;n&&n({type:t,payload:e})}var wn,Sn={log:"log",configuration:"configuration"},Tn=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost",""],En=["ddog-gov.com"],kn={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1};function xn(t,e){var n,r=new Z;kn.telemetryEnabled=!p(En,e.site)&&tt(e.telemetrySampleRate),kn.telemetryConfigurationEnabled=kn.telemetryEnabled&&tt(e.telemetryConfigurationSampleRate);var i={is_local_file:"file:"===window.location.protocol,is_worker:"WorkerGlobalScope"in self};return wn=function(e){if(kn.telemetryEnabled){var o=function(t,e,r){return P({type:"telemetry",date:vt(),service:t,version:"4.50.1",source:"browser",_dd:{format_version:2},telemetry:P(e,{runtime_env:r}),experimental_features:v(ae())},void 0!==n?n():{})}(t,e,i);r.notify(o),bn("telemetry",o)}},a=An,b(kn,{maxEventsPerPage:e.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(t){n=t},observable:r,enabled:kn.telemetryEnabled}}function Cn(e,n){f(t.debug,e,n),Rn(b({type:Sn.log,message:e,status:"debug"},n))}function An(t,e){Rn(b({type:Sn.log,status:"error"},function(t){if(t instanceof Error){var e=Bt(t);return{error:{kind:e.name,stack:te(In(e))},message:e.message}}return{error:{stack:Jt},message:"".concat("Uncaught"," ").concat(z(t))}}(t),e))}function Rn(t){wn&&kn.sentEventCountt[n])return!1;return!0}function Fn(t){var e=Bn(t);if(e){var n=e.startTime,r=e.fetchStart,i=e.redirectStart,o=e.redirectEnd,a=e.domainLookupStart,s=e.domainLookupEnd,u=e.connectStart,c=e.secureConnectionStart,l=e.connectEnd,d=e.requestStart,f=e.responseStart,p={download:Hn(n,f,e.responseEnd),first_byte:Hn(n,d,f)};return l!==r&&(p.connect=Hn(n,u,l),Dn(u,c,l)&&(p.ssl=Hn(n,c,l))),s!==r&&(p.dns=Hn(n,a,s)),Vn(t)&&(p.redirect=Hn(n,i,o)),p}}function Bn(t){if(Dn(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd)){if(!Vn(t))return t;var e=t.redirectStart,n=t.redirectEnd;if(e=0;e-=1){var n,r=t.body.childNodes[e];if(n=er(r))return n;if(!Gn(r))break}}(t);if(!e)return;return tr(Tt(e,"trace-id"),Tt(e,"trace-time"))}(t);if(e&&!(e.traceTime<=pt()-$n))return e.traceId}function tr(t,e){var n=e&&Number(e);if(t&&n)return{traceId:t,traceTime:n}}function er(t){if(t&&function(t){return t.nodeType===Node.COMMENT_NODE}(t)){var e=/^\s*DATADOG;(.*?)\s*$/.exec(t.data);if(e)return e[1]}}function nr(){return void 0!==window.performance&&"getEntries"in performance}function rr(t){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(t)}function ir(t,e){if(function(t,e){Mn(t,"interactive",(function(){var t,n={entryType:Jn.RESOURCE,initiatorType:Un,traceId:Qn(document),toJSON:function(){return b({},t,{toJSON:void 0})}};if(rr(Jn.NAVIGATION)&&performance.getEntriesByType(Jn.NAVIGATION).length>0){var r=performance.getEntriesByType(Jn.NAVIGATION)[0];t=b(r.toJSON(),n)}else{var i=or();t=b(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},n)}e(t)}))}(e,(function(n){ar(t,e,[n])})),nr()){var n=performance.getEntries();C((function(){return ar(t,e,n)}))}if(window.PerformanceObserver){var r=l((function(n){return ar(t,e,n.getEntries())})),i=[Jn.RESOURCE,Jn.NAVIGATION,Jn.LONG_TASK,Jn.PAINT],o=[Jn.LARGEST_CONTENTFUL_PAINT,Jn.FIRST_INPUT,Jn.LAYOUT_SHIFT,Jn.EVENT];try{o.forEach((function(t){new window.PerformanceObserver(r).observe({type:t,buffered:!0,durationThreshold:40})}))}catch(t){i.push.apply(i,o)}new PerformanceObserver(r).observe({entryTypes:i}),nr()&&"addEventListener"in performance&&Mt(e,performance,"resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}rr(Jn.NAVIGATION)||function(t,e){function n(){e(b(or(),{entryType:Jn.NAVIGATION}))}Mn(t,"complete",(function(){C(n)}))}(e,(function(n){ar(t,e,[n])})),rr(Jn.FIRST_INPUT)||function(t,e){var n=pt(),r=!1,i=Ut(0,window,["click","mousedown","keydown","touchstart","pointerdown"],(function(e){if(e.cancelable){var n={entryType:Jn.FIRST_INPUT,processingStart:ht(),processingEnd:ht(),startTime:e.timeStamp,duration:0,name:""};"pointerdown"===e.type?o(t,n):a(n)}}),{passive:!0,capture:!0}).stop;function o(t,e){Ut(0,window,["pointerup","pointercancel"],(function(t){"pointerup"===t.type&&a(e)}),{once:!0})}function a(t){if(!r){r=!0,i();var o=t.processingStart-t.startTime;o>=0&&o=0&&n.entries.splice(t,1)},close:function(t){r.endTime=t}};return this.maxEntries&&this.entries.length>=this.maxEntries&&this.entries.pop(),this.entries.unshift(r),r},t.prototype.find=function(t){void 0===t&&(t=br);for(var e=0,n=this.entries;e0&&this.entries[this.entries.length-1].endTimen.bytesLimit}e(void 0,t,a)}!function t(){r.read().then(l((function(e){e.done?a():(n.collectStreamBody&&i.push(e.value),(o+=e.value.length)>n.bytesLimit?a():t())})),l((function(t){return e(t)})))}()}(n.body,(function(){e(_t(t.startClocks.timeStamp,vt()))}),{bytesLimit:Number.POSITIVE_INFINITY,collectStreamBody:!1}):e(_t(t.startClocks.timeStamp,vt()))}(i,(function(e){n.clearTracingIfNeeded(i),t.notify(6,{duration:e,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:"fetch",url:i.url,response:i.response,init:i.init,input:i.input})}))}}))}(t,e,r)}function Dr(){var t=Pr;return Pr+=1,t}function Fr(t){var e=t.lifeCycle,n=t.isChildEvent,r=t.onChange,i=void 0===r?N:r,o={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},a=e.subscribe(11,(function(t){var e;if("view"!==t.type&&n(t))switch(t.type){case"error":o.errorCount+=1,i();break;case"action":o.actionCount+=1,t.action.frustration&&(o.frustrationCount+=t.action.frustration.type.length),i();break;case"long_task":o.longTaskCount+=1,i();break;case"resource":(null===(e=t._dd)||void 0===e?void 0:e.discarded)||(o.resourceCount+=1,i())}}));return{stop:function(){a.unsubscribe()},eventCounts:o}}var Br=100,Vr=100;function Hr(t,e,n,r,i){var o=function(t,e,n){var r=new Z((function(){var i,o=[],a=0;o.push(e.subscribe(c),t.subscribe(0,(function(t){t.some((function(t){return t.entryType===Jn.RESOURCE&&!qr(n,t.name)}))&&c()})),t.subscribe(5,(function(t){qr(n,t.url)||(void 0===i&&(i=t.requestIndex),a+=1,c())})),t.subscribe(6,(function(t){qr(n,t.url)||void 0===i||t.requestIndex0})}}));return r}(t,e,n);return function(t,e,n){var r,i=!1,o=C(l((function(){return c({hadActivity:!1})})),Br),a=void 0!==n?C(l((function(){return c({hadActivity:!0,end:vt()})})),n):void 0,s=t.subscribe((function(t){var e=t.isBusy;A(o),A(r);var n=vt();e||(r=C(l((function(){return c({hadActivity:!0,end:n})})),Vr))})),u=function(){i=!0,A(o),A(r),A(a),s.unsubscribe()};function c(t){i||(u(),e(t))}return{stop:u}}(o,r,i)}function qr(t,e){return fn(t.excludedActivityUrls,e)}var jr="data-dd-action-name";function Gr(t,e){return Zr(t,jr)||e&&Zr(t,e)||$r(t,e,Xr)||$r(t,e,Yr)||""}function Zr(t,e){var n;if(function(){void 0===Wr&&(Wr="closest"in HTMLElement.prototype);return Wr}())n=t.closest("[".concat(e,"]"));else for(var r=t;r;){if(r.hasAttribute(e)){n=r;break}r=r.parentElement}if(n)return ti(Qr(n.getAttribute(e).trim()))}var Kr,Wr,Xr=[function(t,e){if(function(){void 0===Kr&&(Kr="labels"in HTMLInputElement.prototype);return Kr}()){if("labels"in t&&t.labels&&t.labels.length>0)return ei(t.labels[0],e)}else if(t.id){var n=t.ownerDocument&&h(t.ownerDocument.querySelectorAll("label"),(function(e){return e.htmlFor===t.id}));return n&&ei(n,e)}},function(t){if("INPUT"===t.nodeName){var e=t,n=e.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return e.value}},function(t,e){if("BUTTON"===t.nodeName||"LABEL"===t.nodeName||"button"===t.getAttribute("role"))return ei(t,e)},function(t){return t.getAttribute("aria-label")},function(t,e){var n=t.getAttribute("aria-labelledby");if(n)return n.split(/\s+/).map((function(e){return function(t,e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}(t,e)})).filter((function(t){return Boolean(t)})).map((function(t){return ei(t,e)})).join(" ")},function(t){return t.getAttribute("alt")},function(t){return t.getAttribute("name")},function(t){return t.getAttribute("title")},function(t){return t.getAttribute("placeholder")},function(t,e){if("options"in t&&t.options.length>0)return ei(t.options[0],e)}],Yr=[function(t,e){return ei(t,e)}],Jr=10;function $r(t,e,n){for(var r=t,i=0;i<=Jr&&r&&"BODY"!==r.nodeName&&"HTML"!==r.nodeName&&"HEAD"!==r.nodeName;){for(var o=0,a=n;o100?"".concat(Et(t,100)," [...]"):t}function ei(t,e){if(!t.isContentEditable){if("innerText"in t){var n=t.innerText,r=function(e){for(var r=t.querySelectorAll(e),i=0;i0&&(n=n.replace(a,""))}}};return(null!=le?le:le=Boolean(document.documentMode))&&r("script, style"),r("[".concat(jr,"]")),e&&r("[".concat(e,"]")),n}return t.textContent}}var ni,ri=[jr,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],ii=[ui,function(t){if(t.id&&!si(t.id))return"#".concat(y(t.id))}],oi=[ui,function(t){if("BODY"===t.tagName)return;if(t.classList.length>0)for(var e=0;e").concat(e):t}var vi=at,hi=100;function mi(t,e){var n,r=[],i=0;function o(t){t.stopObservable.subscribe(a),r.push(t),A(n),n=C(s,vi)}function a(){1===i&&r.every((function(t){return t.isStopped()}))&&(i=2,e(r))}function s(){A(n),0===i&&(i=1,a())}return o(t),{tryAppend:function(t){return 0===i&&(r.length>0&&(e=r[r.length-1].event,n=t.event,!(e.target===n.target&&(a=e,u=n,Math.sqrt(Math.pow(a.clientX-u.clientX,2)+Math.pow(a.clientY-u.clientY,2))<=hi)&&e.timeStamp-n.timeStamp<=vi))?(s(),!1):(o(t),!0));var e,n,a,u},stop:function(){s()}}}function gi(){var t=window.getSelection();return!t||t.isCollapsed}function _i(t){return t.target instanceof Element&&!1!==t.isPrimary}var yi=3;function bi(t,e){if(function(t){if(t.some((function(t){return t.getUserActivity().selection})))return!1;for(var e=0;e0},get hasPageActivity(){return void 0!==o},getUserActivity:n,addFrustration:function(t){d.push(t)},startClocks:s,isStopped:function(){return 1===l||2===l},clone:function(){return xi(t,e,n,r,i)},validate:function(e){if(v(),1===l){var n=c.eventCounts,u=n.resourceCount,f=n.errorCount,p=n.longTaskCount,h=b({type:"click",duration:o&&_t(s.timeStamp,o),startClocks:s,id:a,frustrationTypes:d,counts:{resourceCount:u,errorCount:f,longTaskCount:p},events:null!=e?e:[i],event:i},r);t.notify(1,h),l=2}},discard:function(){v(),l=2}}}function Ci(t,e){var n=Ai(t)?{action:{id:t.id,loading_time:ft(t.duration),frustration:{type:t.frustrationTypes},error:{count:t.counts.errorCount},long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}},_dd:{action:{target:t.target,position:t.position}}}:void 0;return{customerContext:Ai(t)?void 0:t.context,rawRumEvent:P({action:{id:St(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:"action",view:{in_foreground:e.isInActivePageStateAt(t.startClocks.relative)}},n),startTime:t.startClocks.relative,domainContext:Ai(t)?{event:t.event,events:t.events}:{}}}function Ai(t){return"custom"!==t.type}var Ri=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function Ii(t){var e=function(t){return kr(window,"onerror",{before:function(e,n,r,i,o){var a;if(o instanceof Error)a=Bt(o);else{var s=[{url:n,column:i,line:r}],u=function(t){var e,n,r;"[object String]"==={}.toString.call(t)&&(n=(e=Ri.exec(t))[1],r=e[2]);return{name:n,message:r}}(e);a={name:u.name,message:u.message,stack:s}}t(a,null!=o?o:e)}})}(t).stop,n=function(t){return kr(window,"onunhandledrejection",{before:function(e){var n=e.reason||"Empty reason",r=Bt(n);t(r,n)}})}(t).stop;return{stop:function(){e(),n()}}}var Oi={};function Ni(n){var r=n.map((function(n){return Oi[n]||(Oi[n]=function(n){var r=new Z((function(){var i=e[n];return e[n]=function(){for(var e=[],o=0;o=r-o&&Di(n)<=yt(i,o);var n,r,i,o}));return 1===n.length?n[0]:void 0}}}function Di(t){return yt(t.startTime,t.duration)}function Fi(t,e,n,r){t.subscribe(6,(function(i){t.notify(10,function(t,e,n,r){var i,o="xhr"===t.type?"xhr":"fetch",a=zi(t),s=a?lt(a.startTime):t.startClocks,u=a?Vi(a):void 0,c=function(t,e){var n=t.traceSampled&&t.traceId&&t.spanId;if(!n)return;return{_dd:{span_id:t.spanId.toDecimalString(),trace_id:t.traceId.toDecimalString(),rule_psr:Hi(e)}}}(t,e),l=qi(n,s),d=function(t,e,n){var r;if(!oe(Yt.NO_RESOURCE_DURATION_FROZEN_STATE))return ft(n);var i=null===(r=t.findAll(e.relative,n))||void 0===r?void 0:r.some((function(t){return"frozen"===t.state}));return i?void 0:ft(n)}(r,s,t.duration),f=ji(r,s,null!==(i=null==a?void 0:a.duration)&&void 0!==i?i:t.duration),p=P({date:s.timeStamp,resource:{id:St(),type:o,duration:d,method:t.method,status_code:t.status,url:t.url},type:"resource"},c,u,l,f);return{startTime:s.relative,rawRumEvent:p,domainContext:{performanceEntry:a&&a,xhr:t.xhr,response:t.response,requestInput:t.input,requestInit:t.init,error:t.error}}}(i,e,n,r))})),t.subscribe(0,(function(i){for(var o=0,a=i;o=0?i.start:0,s=o?o.start:ft(e);n.push({start:a,duration:s-a})}}return n}var Zi=10*st;var Ki,Wi=10*st;function Xi(t,e,n,r){var i,o,a,s={},u=function(t,e){return{stop:t.subscribe(0,(function(t){for(var n=0,r=t;n=0&&i.responseStart<=ht()?i.responseStart:void 0})}})).unsubscribe}}(t,(function(t){n(t.loadEvent),s.navigationTimings=t,r()})).stop,c=(void 0===i&&(i=window),"hidden"===document.visibilityState?o=0:(o=1/0,a=Ut(0,i,["pagehide","visibilitychange"],(function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||(o=t.timeStamp,a())}),{capture:!0}).stop),{get timeStamp(){return o},stop:function(){null==a||a()}}),l=function(t,e,n){return{stop:t.subscribe(0,(function(t){var r=h(t,(function(t){return t.entryType===Jn.PAINT&&"first-contentful-paint"===t.name&&t.startTime=0;n-=1){var r=t[n];if(e(r,n,t))return r}}(t,(function(t){return t.entryType===Jn.LARGEST_CONTENTFUL_PAINT&&t.startTime=0?o:0,time:i.startTime,targetSelector:a})}})).unsubscribe}}(t,e,c,(function(t){s.firstInput=t,r()})).stop;return{stop:function(){u(),l(),d(),f(),c.stop()},initialViewMetrics:s}}function Yi(t,e,n){if(!rr(Jn.LAYOUT_SHIFT))return{stop:N};var r=0;n({value:0});var i=function(){var t,e,n,r,i=0,o=0;return{update:function(a){var s,u;void 0===t||a.startTime-e>=at||a.startTime-t>=5*at?(t=e=a.startTime,i=a.value,o=0,n=void 0):(i+=a.value,e=a.startTime),a.value>o&&(o=a.value,r=a.startTime,n=(null===(s=a.sources)||void 0===s?void 0:s.length)?null===(u=h(a.sources,(function(t){return!!t.node&&Zn(t.node)})))||void 0===u?void 0:u.node:void 0)},value:function(){return i},largestLayoutShiftTarget:function(){return n},largestLayoutShiftTime:function(){return r}}}();return{stop:e.subscribe(0,(function(e){for(var o=0,a=e;or)){var u=et(r=i.value(),4),c=i.largestLayoutShiftTarget(),l=void 0;oe(Yt.WEB_VITALS_ATTRIBUTION)&&c&&(l=ai(c,t.actionNameAttribute)),n({value:u,targetSelector:l})}}})).unsubscribe}}var Ji=0,$i=1/0,Qi=0;var to,eo=function(){return Ki?Ji:window.performance.interactionCount||0},no=10;function ro(t,e,n,r){if(!(rr(Jn.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&oe(Yt.INTERACTION_TO_NEXT_PAINT)))return{getInteractionToNextPaint:function(){},stop:N};var i,o=function(t){"interactionCount"in performance||Ki||(Ki=new window.PerformanceObserver(l((function(t){t.getEntries().forEach((function(t){var e=t;e.interactionId&&($i=Math.min($i,e.interactionId),Qi=Math.max(Qi,e.interactionId),Ji=(Qi-$i)/7+1)}))})))).observe({type:"event",buffered:!0,durationThreshold:0});var e="initial_load"===t?0:eo();return{getViewInteractionCount:function(){return eo()-e}}}(n).getViewInteractionCount,a=function(t){var e=[];function n(){e.sort((function(t,e){return e.duration-t.duration})).splice(no)}return{process:function(t){var r=e.findIndex((function(e){return t.interactionId===e.interactionId})),i=e[e.length-1];-1!==r?t.duration>e[r].duration&&(e[r]=t,n()):(e.lengthi.duration)&&(e.push(t),n())},estimateP98Interaction:function(){var n=Math.min(e.length-1,Math.floor(t()/50));return e[n]}}}(o),s=-1,u=!1,c=r.subscribe(0,(function(n){for(var r,o=0,c=n;o10*st&&!u&&(u=!0,Cn("INP outlier",{inp:s,interaction:{timeFromViewStart:_t(e.relative,d.startTime),duration:d.duration,startTime:d.startTime,processingStart:d.processingStart,processingEnd:d.processingEnd,interactionId:d.interactionId,name:d.name,targetNodeName:null===(r=d.target)||void 0===r?void 0:r.nodeName}})),i=oe(Yt.WEB_VITALS_ATTRIBUTION)&&d.target&&Zn(d.target)?ai(d.target,t.actionNameAttribute):void 0)})).unsubscribe;return{getInteractionToNextPaint:function(){return s>=0?{value:s,targetSelector:i}:o()?{value:0}:void 0},stop:c}}function io(){var t,e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function oo(){var t,e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}function ao(t){return to||(to=function(t){var e=new Z((function(){var n=O((function(){e.notify(so())}),200).throttled;return Mt(t,window,"resize",n,{capture:!0,passive:!0}).stop}));return e}(t)),to}function so(){var t=window.visualViewport;return t?{width:Number(t.width*t.scale),height:Number(t.height*t.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}var uo=at;function co(t,e,n,r){void 0===r&&(r=function(t,e){void 0===e&&(e=uo);var n=new Z((function(){function r(){var t,e,r,i;n.notify((t=oo(),e=so().height,r=Math.round((document.scrollingElement||document.documentElement).scrollHeight),i=Math.round(e+t),{scrollHeight:r,scrollDepth:i,scrollTop:t}))}if(window.ResizeObserver){var i=O(r,e,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,a=new ResizeObserver(l(i.throttled));a.observe(o);var s=Mt(t,window,"scroll",i.throttled,{passive:!0});return function(){i.cancel(),a.unobserve(o),s.stop()}}}));return n}(t));var i=0,o=0,a=0,s=r.subscribe((function(t){var r=t.scrollDepth,s=t.scrollTop,u=t.scrollHeight,c=!1;if(r>i&&(i=r,c=!0),u>o){o=u;var l=ht();a=_t(e.relative,l),c=!0}c&&n({maxDepth:Math.min(i,o),maxDepthScrollTop:s,maxScrollHeight:o,maxScrollHeightTime:a})}));return{stop:function(){return s.unsubscribe()}}}function lo(t,e,n,r,i,o){var a={},s=function(t,e,n,r,i,o){var a="initial_load"===r,s=!0,u=[];function c(){!s&&!a&&u.length>0&&o(Math.max.apply(Math,u))}return{stop:Hr(t,e,n,(function(t){s&&(s=!1,t.hadActivity&&u.push(_t(i.timeStamp,t.end)),c())})).stop,setLoadEvent:function(t){a&&(a=!1,u.push(t),c())}}}(t,e,n,i,o,(function(t){a.loadingTime=t,r()})),u=s.stop,c=s.setLoadEvent,l=co(n,o,(function(t){a.scroll=t})).stop,d=Yi(n,t,(function(t){a.cumulativeLayoutShift=t,r()})).stop,f=ro(n,o,i,t),p=f.stop,v=f.getInteractionToNextPaint;return{stop:function(){u(),d(),l(),p()},setLoadEvent:c,getCommonViewMetrics:function(){return a.interactionToNextPaint=v(),a}}}var fo=3e3,po=5*st,vo=5*st;function ho(t,e,n,r,o,a,s){var u,c=new Set,l=d("initial_load",gt(),s);function d(o,a,s){var u=function(t,e,n,r,o,a,s){void 0===a&&(a=mt());var u,c,l,d,f=St(),p=new Z,v={},h=0,m=se(r),g=!0;s&&(c=s.name,l=s.service,d=s.version);t.notify(2,{id:f,name:c,startClocks:a,service:l,version:d});var _=O(z,fo,{leading:!1}),y=_.throttled,b=_.cancel,w=lo(t,e,n,y,o,a),S=w.setLoadEvent,T=w.stop,E=w.getCommonViewMetrics,k="initial_load"===o?Xi(t,n,S,y):{stop:N,initialViewMetrics:{}},x=k.stop,A=k.initialViewMetrics,L=function(t,e,n){var r=Fr({lifeCycle:t,isChildEvent:function(t){return t.view.id===e},onChange:n});return{stop:r.stop,eventCounts:r.eventCounts}}(t,f,y),M=L.stop,U=L.eventCounts,P=R(z,po);function z(){b(),h+=1;var e=void 0===u?vt():u.timeStamp;t.notify(3,{customTimings:v,documentVersion:h,id:f,name:c,service:l,version:d,loadingType:o,location:m,startClocks:a,commonViewMetrics:E(),initialViewMetrics:A,duration:_t(a.timeStamp,e),isActive:void 0===u,sessionIsActive:g,eventCounts:U})}return z(),{name:c,service:l,version:d,stopObservable:p,end:function(e){var n,r,i=this;void 0===e&&(e={}),u||(u=null!==(n=e.endClocks)&&void 0!==n?n:mt(),g=null===(r=e.sessionIsActive)||void 0===r||r,t.notify(4,{endClocks:u}),I(P),T(),z(),C((function(){i.stop()}),vo))},stop:function(){x(),M(),p.notify()},addTiming:function(t,e){if(!u){var n=function(t){return t=this.messageBytesLimit?i.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB.")):(this.hasMessageFor(e)&&this.remove(e),this.push(r,o,e))},t.prototype.process=function(t){var e=z(t);return{processedMessage:e,messageBytesCount:k(e)}},t.prototype.push=function(t,e,n){var r=this.flushController.messagesCount>0?1:0;this.flushController.notifyBeforeAddMessage(e+r),void 0!==n?this.upsertBuffer[n]=t:this.pushOnlyBuffer.push(t),this.flushController.notifyAfterAddMessage()},t.prototype.remove=function(t){var e=this.upsertBuffer[t];delete this.upsertBuffer[t];var n=k(e),r=this.flushController.messagesCount>1?1:0;this.flushController.notifyAfterRemoveMessage(n+r)},t.prototype.hasMessageFor=function(t){return void 0!==t&&void 0!==this.upsertBuffer[t]},t}(),Co=80*S,Ao=32,Ro=3*T,Io=st,Oo=at;function No(t,e,n,r,i){0===e.transportStatus&&0===e.queuedPayloads.size()&&e.bandwidthMonitor.canHandle(t)?Mo(t,e,n,{onSuccess:function(){return Uo(0,e,n,r,i)},onFailure:function(){e.queuedPayloads.enqueue(t),Lo(e,n,r,i)}}):e.queuedPayloads.enqueue(t)}function Lo(t,e,n,r){2===t.transportStatus&&C((function(){Mo(t.queuedPayloads.first(),t,e,{onSuccess:function(){t.queuedPayloads.dequeue(),t.currentBackoffTime=Oo,Uo(1,t,e,n,r)},onFailure:function(){t.currentBackoffTime=Math.min(Io,2*t.currentBackoffTime),Lo(t,e,n,r)}})}),t.currentBackoffTime)}function Mo(t,e,n,r){var i=r.onSuccess,o=r.onFailure;e.bandwidthMonitor.add(t),n(t,(function(n){e.bandwidthMonitor.remove(t),!function(t){return"opaque"!==t.type&&(0===t.status&&!navigator.onLine||408===t.status||429===t.status||(e=t.status,e>=500));var e}(n)?(e.transportStatus=0,i()):(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:n.status},o())}))}function Uo(t,e,n,r,i){0===t&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(i({message:"Reached max ".concat(r," events size queued for upload: ").concat(Ro/T,"MiB"),source:sr.AGENT,startClocks:mt()}),e.queueFullReported=!0);var o=e.queuedPayloads;for(e.queuedPayloads=Po();o.size()>0;)No(o.dequeue(),e,n,r,i)}function Po(){var t=[];return{bytesCount:0,enqueue:function(e){this.isFull()||(t.push(e),this.bytesCount+=e.bytesCount)},first:function(){return t[0]},dequeue:function(){var e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size:function(){return t.length},isFull:function(){return this.bytesCount>=Ro}}}function zo(t,e,n,r){var i={transportStatus:0,currentBackoffTime:Oo,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(t){return 0===this.ongoingRequestCount||this.ongoingByteCount+t.bytesCount<=Co&&this.ongoingRequestCount=r&&f("bytes_limit"),d+=1,l+=t,void 0===e&&(e=C((function(){f("duration_limit")}),i))},notifyAfterAddMessage:function(){d>=n?f("messages_limit"):l>=r&&f("bytes_limit")},notifyAfterRemoveMessage:function(t){l-=t,0===(d-=1)&&p()}}}function Vo(t,e,n,r,i,o){var a=t.replica,s=function(t,e,n,r,i,o){var a=u(t,e.endpoint),s=n&&u(t,n.endpoint);function u(t,e){return new xo(zo(t,e,t.batchBytesLimit,r),Bo({messagesLimit:t.batchMessagesLimit,bytesLimit:t.batchBytesLimit,durationLimit:t.flushTimeout,pageExitObservable:i,sessionExpireObservable:o}),t.messageBytesLimit)}return{flushObservable:a.flushController.flushObservable,add:function(t,e){void 0===e&&(e=!0),a.add(t),s&&e&&s.add(n.transformMessage?n.transformMessage(t):t)},upsert:function(t,e){a.upsert(t,e),s&&s.upsert(n.transformMessage?n.transformMessage(t):t,e)},stop:function(){a.stop(),null==s||s.stop()}}}(t,{endpoint:t.rumEndpointBuilder},a&&{endpoint:a.rumEndpointBuilder,transformMessage:function(t){return P(t,{application:{id:a.applicationId}})}},r,i,o);return e.subscribe(11,(function(t){"view"===t.type?s.upsert(t,t.view.id):s.add(t)})),n.subscribe((function(e){return s.add(e,function(t){return t.site===Je}(t))})),s}var Ho=pe;function qo(t,e){var n=se(e),r=new Z((function(){var e=function(t,e){var n=kr(history,"pushState",{after:e}).stop,r=kr(history,"replaceState",{after:e}).stop,i=Mt(t,window,"popstate",e).stop;return{stop:function(){n(),r(),i()}}}(t,i).stop,n=function(t,e){return Mt(t,window,"hashchange",e)}(t,i).stop;return function(){e(),n()}}));function i(){if(n.href!==e.href){var t=se(e);r.notify({newLocation:t,oldLocation:n}),n=t}}return r}var jo=pe,Go=200;var Zo,Ko,Wo,Xo=10*at;function Yo(){0!==Zo.batchCount&&(Cn("Customer data measures",Zo),Qo())}function Jo(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function $o(t,e){t.sum+=e.sum,t.min=Math.min(t.min,e.min),t.max=Math.max(t.max,e.max)}function Qo(){Zo={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0},globalContextBytes:{min:1/0,max:0,sum:0},userContextBytes:{min:1/0,max:0,sum:0},featureFlagBytes:{min:1/0,max:0,sum:0}}}function ta(){Wo=!1,Ko={globalContextBytes:{min:1/0,max:0,sum:0},userContextBytes:{min:1/0,max:0,sum:0},featureFlagBytes:{min:1/0,max:0,sum:0}}}var ea=4e3,na=500,ra=pe;function ia(t,e){void 0===e&&(e=na);var n,r=new Sr(ra,ea);o(oa(),ht());var i=Ut(0,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],(function(t){t.isTrusted&&o(function(t){if("freeze"===t.type)return"frozen";if("pagehide"===t.type)return t.persisted?"frozen":"terminated";return oa()}(t),t.timeStamp)}),{capture:!0}).stop;function o(t,e){void 0===e&&(e=ht()),t!==n&&(n=t,r.closeActive(e),r.add({state:n,startTime:e},e))}return{findAll:function(t,n){var i=r.findAll(t,n);if(0!==i.length){for(var o=[],a=Math.max(0,i.length-e),s=i.length-1;s>=a;s--){var u=i[s],c=_t(t,u.startTime);o.push({state:u.state,start:ft(c)})}return o}},isInActivePageStateAt:function(t){var e=r.find(t);return void 0!==e&&"active"===e.state},addPageState:o,stop:function(){i(),r.stop()}}}function oa(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}function aa(t,e){var n=e.session,r=e.viewContext,i=e.errorType,o=n?n.id:"no-session-id",a=[];void 0!==i&&a.push("error-type=".concat(i)),r&&(a.push("seed=".concat(r.id)),a.push("from=".concat(r.startClocks.timeStamp)));var s,u,c,l=(u=(s=t).site,c=s.subdomain||function(t){switch(t.site){case $e:case Qe:return"app";case Je:return"dd";default:return}}(s),"https://".concat(c?"".concat(c,"."):"").concat(u)),d="/rum/replay/sessions/".concat(o);return"".concat(l).concat(d,"?").concat(a.join("&"))}var sa={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},ua={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},ca={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},la={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},da={Play:0,Pause:1};function fa(t,e){return{data:b({source:t},e),type:sa.IncrementalSnapshot,timestamp:vt()}}var pa={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:cn.ALLOW,MASK:cn.MASK,MASK_USER_INPUT:cn.MASK_USER_INPUT},va="data-dd-privacy",ha="allow",ma="mask",ga="mask-user-input",_a="hidden",ya="dd-privacy-allow",ba="dd-privacy-mask",wa="dd-privacy-mask-user-input",Sa="dd-privacy-hidden",Ta="***",Ea="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",ka={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},xa=1e5;function Ca(t,e){var n=Yn(t),r=n?Ca(n,e):e;return Aa(Ra(t),r)}function Aa(t,e){switch(e){case pa.HIDDEN:case pa.IGNORE:return e}switch(t){case pa.ALLOW:case pa.MASK:case pa.MASK_USER_INPUT:case pa.HIDDEN:case pa.IGNORE:return t;default:return e}}function Ra(t){if(Zn(t)){var e=t.getAttribute(va);if("BASE"===t.tagName)return pa.ALLOW;if("INPUT"===t.tagName){var n=t;if("password"===n.type||"email"===n.type||"tel"===n.type)return pa.MASK;if("hidden"===n.type)return pa.MASK;var r=n.getAttribute("autocomplete");if(r&&0===r.indexOf("cc-"))return pa.MASK}return e===_a||t.classList.contains(Sa)?pa.HIDDEN:e===ma||t.classList.contains(ba)?pa.MASK:e===ga||t.classList.contains(wa)?pa.MASK_USER_INPUT:e===ha||t.classList.contains(ya)?pa.ALLOW:function(t){if("SCRIPT"===t.nodeName)return!0;if("LINK"===t.nodeName){var e=i("rel");return/preload|prefetch/i.test(e)&&"script"===i("as")||"shortcut icon"===e||"icon"===e}if("META"===t.nodeName){var n=i("name"),r=(e=i("rel"),i("property"));return/^msapplication-tile(image|color)$/.test(n)||"application-name"===n||"icon"===e||"apple-touch-icon"===e||"shortcut icon"===e||"keywords"===n||"description"===n||/^(og|twitter|fb):/.test(r)||/^(og|twitter):/.test(n)||"pinterest"===n||"robots"===n||"googlebot"===n||"bingbot"===n||t.hasAttribute("http-equiv")||"author"===n||"generator"===n||"framework"===n||"publisher"===n||"progid"===n||/^article:/.test(r)||/^product:/.test(r)||"google-site-verification"===n||"yandex-verification"===n||"csrf-token"===n||"p:domain_verify"===n||"verify-v1"===n||"verification"===n||"shopify-checkout-api-token"===n}function i(e){return(t.getAttribute(e)||"").toLowerCase()}return!1}(t)?pa.IGNORE:void 0}}function Ia(t,e){switch(e){case pa.MASK:case pa.HIDDEN:case pa.IGNORE:return!0;case pa.MASK_USER_INPUT:return Gn(t)?Oa(t.parentNode):Oa(t);default:return!1}}function Oa(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;var e=t;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!ka[e.tagName]}var Na=function(t){return t.replace(/\S/g,"x")};function La(t,e,n){var r,i=null===(r=t.parentElement)||void 0===r?void 0:r.tagName,o=t.textContent||"";if(!e||o.trim()){var a=n;if("SCRIPT"===i)o=Ta;else if(a===pa.HIDDEN)o=Ta;else if(Ia(t,a))if("DATALIST"===i||"SELECT"===i||"OPTGROUP"===i){if(!o.trim())return}else o="OPTION"===i?Ta:Na(o);return o}}var Ma=new WeakMap;function Ua(t){return Ma.has(t)}function Pa(t){return Ma.get(t)}function za(t,e){var n=t.tagName,r=t.value;if(Ia(t,e)){var i=t.type;if("INPUT"===n&&("button"===i||"submit"===i||"reset"===i))return r;if(!r||"OPTION"===n)return;return Ta}return"OPTION"===n||"SELECT"===n?t.value:"INPUT"===n||"TEXTAREA"===n?r:void 0}var Da=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,Fa=/^[A-Za-z]+:|^\/\//,Ba=/^data:.*,/i;function Va(t,e){return t.replace(Da,(function(t,n,r,i,o,a){var s=r||o||a;if(!e||!s||Fa.test(s)||Ba.test(s))return t;var u=n||i||"";return"url(".concat(u).concat(function(t,e){try{return Ke(t,e).href}catch(e){return t}}(s,e)).concat(u,")")}))}var Ha=/[^a-z1-6-_]/;function qa(t){var e=t.toLowerCase().trim();return Ha.test(e)?"div":e}function ja(t){if(void 0!==t&&0!==t.length)return t.map((function(t){var e=t.cssRules||t.rules;return{cssRules:Array.from(e,(function(t){return t.cssText})),disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0}}))}function Ga(t,e,n,r){if(e===pa.HIDDEN)return null;var i=t.getAttribute(n);if(e===pa.MASK&&n!==va&&!ri.includes(n)&&n!==r.actionNameAttribute){var o=t.tagName;switch(n){case"title":case"alt":case"placeholder":return Ta}if(!("IMG"!==o&&"SOURCE"!==o||"src"!==n&&"srcset"!==n))return Ea;if("A"===o&&"href"===n)return Ta;if(i&&_(n,"data-"))return Ta}return i&&"string"==typeof i&&i.length>xa&&"data:"===i.slice(0,5)?"data:truncated":i}function Za(t){if(!t)return null;var e;try{e=t.rules||t.cssRules}catch(t){}return e?Va(Array.from(e,(null!=fe?fe:fe=/^((?!chrome|android).)*safari/i.test(navigator.userAgent))?Ka:Wa).join(""),t.href):null}function Ka(t){if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")){return t.cssText.replace(/(\[[\w-]+[^\\])(:[^\]]+\])/g,"$1\\$2")}return Wa(t)}function Wa(t){return function(t){return"styleSheet"in t}(t)&&Za(t.styleSheet)||t.cssText}function Xa(t,e){var n=function(t,e){switch(t.nodeType){case t.DOCUMENT_NODE:return function(t,e){return{type:ua.Document,childNodes:Ja(t,e),adoptedStyleSheets:ja(t.adoptedStyleSheets)}}(t,e);case t.DOCUMENT_FRAGMENT_NODE:return function(t,e){var n=Wn(t);n&&e.serializationContext.shadowRootsController.addShadowRoot(t);return{type:ua.DocumentFragment,childNodes:Ja(t,e),isShadowRoot:n,adoptedStyleSheets:n?ja(t.adoptedStyleSheets):void 0}}(t,e);case t.DOCUMENT_TYPE_NODE:return n=t,{type:ua.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId};case t.ELEMENT_NODE:return function(t,e){var n,r=qa(t.tagName),i=(a=t,"svg"===a.tagName||a instanceof SVGElement||void 0),o=Aa(Ra(t),e.parentNodePrivacyLevel);var a;if(o===pa.HIDDEN){var s=t.getBoundingClientRect(),u=s.width,c=s.height;return{type:ua.Element,tagName:r,attributes:(n={rr_width:"".concat(u,"px"),rr_height:"".concat(c,"px")},n[va]=_a,n),childNodes:[],isSVG:i}}if(o===pa.IGNORE)return;var l=function(t,e,n){var r;if(e===pa.HIDDEN)return{};for(var i={},o=qa(t.tagName),a=t.ownerDocument,s=0;s0||Kn(t)}(t)&&"style"!==r){d=Ja(t,e.parentNodePrivacyLevel===o&&e.ignoreWhiteSpace===("head"===r)?e:b({},e,{parentNodePrivacyLevel:o,ignoreWhiteSpace:"head"===r}))}return{type:ua.Element,tagName:r,attributes:l,childNodes:d,isSVG:i}}(t,e);case t.TEXT_NODE:return function(t,e){var n=La(t,e.ignoreWhiteSpace||!1,e.parentNodePrivacyLevel);if(void 0===n)return;return{type:ua.Text,textContent:n}}(t,e);case t.CDATA_SECTION_NODE:return{type:ua.CDATA,textContent:""}}var n}(t,e);if(!n)return null;var r=Pa(t)||Ya++,i=n;return i.id=r,function(t,e){Ma.set(t,e)}(t,r),e.serializedNodeIds&&e.serializedNodeIds.add(r),i}var Ya=1;function Ja(t,e){var n=[];return Xn(t,(function(t){var r=Xa(t,e);r&&n.push(r)})),n}function $a(t,e,n){return Xa(t,{serializationContext:n,parentNodePrivacyLevel:e.defaultPrivacyLevel,configuration:e})}function Qa(t){return Boolean(t.changedTouches)}function ts(t){return!0===t.composed&&Kn(t.target)?t.composedPath()[0]:t.target}var es=function(t,e){var n=window.visualViewport,r={layoutViewportX:t,layoutViewportY:e,visualViewportX:t,visualViewportY:e};return n?(!function(t){return Math.abs(t.pageTop-t.offsetTop-window.scrollY)>25||Math.abs(t.pageLeft-t.offsetLeft-window.scrollX)>25}(n)?(r.visualViewportX=Math.round(t-n.offsetLeft),r.visualViewportY=Math.round(e-n.offsetTop)):(r.layoutViewportX=Math.round(t+n.offsetLeft),r.layoutViewportY=Math.round(e+n.offsetTop)),r):r},ns=function(t){return{scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width}},rs=50;function is(t){var e=Qa(t)?t.changedTouches[0]:t,n=e.clientX,r=e.clientY;if(window.visualViewport){var i=es(n,r);n=i.visualViewportX,r=i.visualViewportY}if(Number.isFinite(n)&&Number.isFinite(r))return{x:n,y:r};t.isTrusted&&Cn("mouse/touch event without x/y")}var os,as=100;var ss=((os={}).pointerup=la.MouseUp,os.mousedown=la.MouseDown,os.click=la.Click,os.contextmenu=la.ContextMenu,os.dblclick=la.DblClick,os.focus=la.Focus,os.blur=la.Blur,os.touchstart=la.TouchStart,os.touchend=la.TouchEnd,os);function us(t,e,n){void 0===n&&(n=document);var r,i=t.defaultPrivacyLevel,o=new WeakMap,a=n!==document,s=Ut(0,n,a?["change"]:["input","change"],(function(t){var e=ts(t);(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)&&c(e)}),{capture:!0,passive:!0}).stop;if(a)r=N;else{var u=[xr(HTMLInputElement.prototype,"value",c),xr(HTMLInputElement.prototype,"checked",c),xr(HTMLSelectElement.prototype,"value",c),xr(HTMLTextAreaElement.prototype,"value",c),xr(HTMLSelectElement.prototype,"selectedIndex",c)];r=function(){u.forEach((function(t){return t.stop()}))}}return function(){r(),s()};function c(t){var e=Ca(t,i);if(e!==pa.HIDDEN){var n,r=t.type;if("radio"===r||"checkbox"===r){if(Ia(t,e))return;n={isChecked:t.checked}}else{var o=za(t,e);if(void 0===o)return;n={text:o}}l(t,n);var a,s,u=t.name;"radio"===r&&u&&t.checked&&(a=document.querySelectorAll('input[type="radio"][name="'.concat(y(u),'"]')),s=function(e){e!==t&&l(e,{isChecked:!1})},Array.prototype.forEach.call(a,s))}}function l(t,n){if(Ua(t)){var r=o.get(t);r&&r.text===n.text&&r.isChecked===n.isChecked||(o.set(t,n),e(b({id:Pa(t)},n)))}}}function cs(t){for(var e=[],n=t;n.parentRule;){var r=Array.from(n.parentRule.cssRules).indexOf(n);e.unshift(r),n=n.parentRule}if(n.parentStyleSheet){var i=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return e.unshift(i),e}}var ls=200;var ds=100;function fs(t){var e=N,n=[];function r(){e(),t(n),n=[]}return{addMutations:function(t){0===n.length&&(e=function(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){var n=window.requestIdleCallback(l(t),e);return function(){return window.cancelIdleCallback(n)}}var r=window.requestAnimationFrame(l(t));return function(){return window.cancelAnimationFrame(r)}}(r,{timeout:ds})),n.push.apply(n,t)},flush:r,stop:function(){e()}}}function ps(t,e,n,r){var i=Ln();if(!i)return{stop:N,flush:N};var o=fs((function(r){!function(t,e,n,r){t.filter((function(t){return"childList"===t.type})).forEach((function(t){t.removedNodes.forEach((function(t){vs(t,r.removeShadowRoot)}))}));var i=t.filter((function(t){return t.target.isConnected&&function(t){for(var e=t;e;){if(!Ua(e)&&!Wn(e))return!1;e=Yn(e)}return!0}(t.target)&&Ca(t.target,n.defaultPrivacyLevel)!==pa.HIDDEN})),o=function(t,e,n){for(var r=new Set,i=new Map,o=function(t){t.addedNodes.forEach((function(t){r.add(t)})),t.removedNodes.forEach((function(e){r.has(e)||i.set(e,t.target),r.delete(e)}))},a=0,s=t;ays&&function(){if(!_s)return;if(_s.keys)_s.delete(_s.keys().next().value);else{var t=!0;_s.forEach((function(e,n){t&&(_s.delete(n),t=!1)}))}}()),e}var Ss=function(){function t(t,e,n){this.encoder=t;var r=e.view.id;this.metadata=b({start:1/0,end:-1/0,creation_reason:n,records_count:0,has_full_snapshot:!1,index_in_view:bs(r),source:"browser"},e),function(t){ws(t).segments_count+=1}(r)}return t.prototype.addRecord=function(t,e){var n;this.metadata.start=Math.min(this.metadata.start,t.timestamp),this.metadata.end=Math.max(this.metadata.end,t.timestamp),this.metadata.records_count+=1,(n=this.metadata).has_full_snapshot||(n.has_full_snapshot=t.type===sa.FullSnapshot),bn("record",{record:t,segment:this.metadata}),ws(this.metadata.view.id).records_count+=1;var r=1===this.metadata.records_count?'{"records":[':",";this.encoder.write(r+JSON.stringify(t),e)},t.prototype.flush=function(t){var e=this;if(0===this.metadata.records_count)throw new Error("Empty segment flushed");this.encoder.write("],".concat(JSON.stringify(this.metadata).slice(1),"\n"),(function(){var n,r;n=e.metadata.view.id,r=e.encoder.rawBytesCount,ws(n).segments_total_raw_size+=r,t(e.metadata)})),this.encoder.reset()},t}(),Ts=30*at,Es=6e4;function ks(t,e,n,r,i,o){return function(t,e,n,r){var i={status:0,nextSegmentCreationReason:"init"},o=t.subscribe(2,(function(){s("view_change")})).unsubscribe,a=t.subscribe(9,(function(t){s(t.reason)})).unsubscribe;function s(t){1===i.status&&(i.segment.flush((function(e){var i=function(t,e,n){var r=new FormData;r.append("segment",new Blob([t],{type:"application/octet-stream"}),"".concat(e.session.id,"-").concat(e.start));var i=b({raw_segment_size:n,compressed_segment_size:t.byteLength},e),o=JSON.stringify(i);return r.append("event",new Blob([o],{type:"application/json"})),{data:r,bytesCount:t.byteLength}}(r.encodedBytes,e,r.rawBytesCount);Nn(t)?n.sendOnExit(i):n.send(i)})),A(i.expirationTimeoutId)),i="stop"!==t?{status:0,nextSegmentCreationReason:t}:{status:2}}return{addRecord:function(t){if(2!==i.status){if(0===i.status){var n=e();if(!n)return;i={status:1,segment:new Ss(r,n,i.nextSegmentCreationReason),expirationTimeoutId:C((function(){s("segment_duration_limit")}),Ts)}}var o=i.segment;o.addRecord(t,(function(){1===i.status&&i.segment===o&&r.encodedBytesCount>Es&&s("segment_bytes_limit")}))}},stop:function(){s("stop"),o(),a()}}}(t,(function(){return function(t,e,n){var r=e.findTrackedSession(),i=n.findView();if(!r||!i)return;return{application:{id:t},session:{id:r.id},view:{id:i.id}}}(e.applicationId,n,r)}),i,o)}function xs(){return"function"==typeof Array.from&&"function"==typeof CSSSupportsRule&&"function"==typeof URL.createObjectURL&&"forEach"in NodeList.prototype}function Cs(t,e,n,r){var i=e.findTrackedSession(),o=function(t,e){if(!xs())return"browser-not-supported";if(!t)return"rum-not-tracked";if(!t.sessionReplayAllowed)return"incorrect-session-plan";if(!e)return"replay-not-started"}(i,r);return aa(t,{viewContext:n.findView(),errorType:o,session:i})}function As(t,e,n){var r,i=0,o=[],a=0,s=[],u=Mt(t,e,"message",(function(t){var e=t.data;if("wrote"===e.type&&e.streamId===n){var a=s.shift();a&&a.id===e.id?(0===e.id?(i=e.additionalBytesCount,o=[e.result]):(i+=e.additionalBytesCount,o.push(e.result)),r=e.trailer,a.callback()):(u(),Cn("Worker responses received out of order."))}})).stop;return{get encodedBytes(){return o.length?function(t){for(var e=t.reduce((function(t,e){return t+e.length}),0),n=new Uint8Array(e),r=0,i=0,o=t;i=0;)t[e]=0}var a=256,n=286,r=30,i=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),_=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),l=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);e(o);var d=new Array(60);e(d);var u=new Array(512);e(u);var f=new Array(256);e(f);var c=new Array(29);e(c);var p,g,w,v=new Array(r);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(v);var y=function(t){return t<256?u[t]:u[256+(t>>>7)]},k=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},z=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,r,s=new Array(16),_=0;for(n=1;n<=i;n++)s[n]=_=_+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=A(s[h]++,h))}},Z=function(t){var e;for(e=0;e8?k(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var r=2*e,i=2*a;return t[r]>1;a>=1;a--)R(t,s,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*r]=s[2*a]+s[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=r,t.heap[1]=r++,R(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,s,_,h,l=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(s=0;s<=i;s++)t.bl_count[s]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=l[2*l[2*(n=t.heap[a])+1]+1]+1)>p&&(s=p,g++),l[2*n+1]=s,n>o||(t.bl_count[s]++,_=0,n>=c&&(_=f[n-c]),h=l[2*n],t.opt_len+=h*(s+_),u&&(t.static_len+=h*(d[2*n+1]+_)));if(0!==g){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)(r=t.heap[--a])>o||(l[2*r+1]!==s&&(t.opt_len+=(s-l[2*r+1])*l[2*r],l[2*r+1]=s),n--)}}(t,e),E(s,o,t.bl_count)},T=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++_0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==e?O(t,e,n,r):4===t.strategy||s===i?(z(t,2+(r?1:0),3),L(t,o,d)):(z(t,4+(r?1:0),3),function(t,e,a,n){var r;for(z(t,e-257,5),z(t,a-1,5),z(t,n-4,4),r=0;r>=7;l>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(f[n]+a+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){z(t,2,3),x(t,256,o),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0},H=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),M=function(t,e,a,n){var r=H,i=n+a;t^=-1;for(var s=n;s>>8^r[255&(t^e[s])];return-1^t},Y={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},P=B._tr_init,j=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,rt=K.Z_BUF_ERROR,it=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,_t=K.Z_HUFFMAN_ONLY,ht=K.Z_RLE,lt=K.Z_FIXED,ot=K.Z_DEFAULT_STRATEGY,dt=K.Z_UNKNOWN,ut=K.Z_DEFLATED,ft=258,ct=262,pt=103,gt=113,wt=666,vt=function(t,e){return t.msg=Y[e],e},bt=function(t){return(t<<1)-(t>4?9:0)},mt=function(t){for(var e=t.length;--e>=0;)t[e]=0},yt=function(t,e,a){return(e<t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,kt(t.strm)},xt=function(t,e){t.pending_buf[t.pending++]=e},At=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,_=t.nice_match,h=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,l=t.window,o=t.w_mask,d=t.prev,u=t.strstart+ft,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),_>t.lookahead&&(_=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&is){if(t.match_start=e,s=n,n>=_)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&o])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead},Zt=function(t){var e,a,n,r,i,s,_,h,l,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-ct)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,_=t.window,h=t.strstart+t.lookahead,l=r,o=void 0,(o=s.avail_in)>l&&(o=l),a=0===o?0:(s.avail_in-=o,_.set(s.input.subarray(s.next_in,s.next_in+o),h),1===s.state.wrap?s.adler=C(s.adler,_,o,h):2===s.state.wrap&&(s.adler=M(s.adler,_,o,h)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=yt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2},St=function(t,e){for(var a,n,r;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Lt=[new Rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Zt(t),0===t.lookahead&&e===q)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,zt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ct&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(zt(t,!1),t.strm.avail_out),1)})),new Rt(4,4,8,4,Ut),new Rt(4,5,16,8,Ut),new Rt(4,6,32,32,Ut),new Rt(4,4,16,16,St),new Rt(8,16,32,32,St),new Rt(8,16,128,128,St),new Rt(8,32,128,256,St),new Rt(32,128,258,1024,St),new Rt(32,258,258,4096,St)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ut,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),mt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Tt=function(t){if(!t||!t.state)return vt(t,at);t.total_in=t.total_out=0,t.data_type=dt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:gt,t.adler=2===e.wrap?0:1,e.last_flush=q,P(e),tt},It=function(t){var e,a=Tt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,mt(e.head),e.max_lazy_match=Lt[e.level].max_lazy,e.good_match=Lt[e.level].good_length,e.nice_match=Lt[e.level].nice_length,e.max_chain_length=Lt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Nt=function(t,e,a,n,r,i){if(!t)return at;var s=1;if(e===it&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==ut||n<8||n>15||e<0||e>9||i<0||i>lt)return vt(t,at);8===n&&(n=9);var _=new Ft;return t.state=_,_.strm=t,_.wrap=s,_.gzhead=null,_.w_bits=n,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=r+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+3-1)/3),_.window=new Uint8Array(2*_.w_size),_.head=new Uint16Array(_.hash_size),_.prev=new Uint16Array(_.w_size),_.lit_bufsize=1<$||e<0)return t?vt(t,at):at;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===wt&&e!==V)return vt(t,0===t.avail_out?rt:at);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,xt(r,31),xt(r,139),xt(r,8),r.gzhead?(xt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xt(r,255&r.gzhead.time),xt(r,r.gzhead.time>>8&255),xt(r,r.gzhead.time>>16&255),xt(r,r.gzhead.time>>24&255),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(xt(r,255&r.gzhead.extra.length),xt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=M(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,3),r.status=gt);else{var s=ut+(r.w_bits-8<<4)<<8;s|=(r.strategy>=_t||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=gt,At(r,s),0!==r.strstart&&(At(r,t.adler>>>16),At(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending!==r.pending_buf_size));)xt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindexa&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindexa&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=pt)}else r.status=pt;if(r.status===pt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&kt(t),r.pending+2<=r.pending_buf_size&&(xt(r,255&t.adler),xt(r,t.adler>>8&255),t.adler=0,r.status=gt)):r.status=gt),0!==r.pending){if(kt(t),0===t.avail_out)return r.last_flush=-1,tt}else if(0===t.avail_in&&bt(e)<=bt(i)&&e!==V)return vt(t,rt);if(r.status===wt&&0!==t.avail_in)return vt(t,rt);if(0!==t.avail_in||0!==r.lookahead||e!==q&&r.status!==wt){var _=r.strategy===_t?function(t,e){for(var a;;){if(0===t.lookahead&&(Zt(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===ht?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=ft){if(Zt(t),t.lookahead<=ft&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+ft;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&rt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):Lt[r.level].func(r,e);if(3!==_&&4!==_||(r.status=wt),1===_||3===_)return 0===t.avail_out&&(r.last_flush=-1),tt;if(2===_&&(e===J?W(r):e!==$&&(j(r,0,0,!1),e===Q&&(mt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),kt(t),0===t.avail_out))return r.last_flush=-1,tt}return e!==V?tt:r.wrap<=0?et:(2===r.wrap?(xt(r,255&t.adler),xt(r,t.adler>>8&255),xt(r,t.adler>>16&255),xt(r,t.adler>>24&255),xt(r,255&t.total_in),xt(r,t.total_in>>8&255),xt(r,t.total_in>>16&255),xt(r,t.total_in>>24&255)):(At(r,t.adler>>>16),At(r,65535&t.adler)),kt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?tt:et)},deflateEnd:function(t){if(!t||!t.state)return at;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==pt&&e!==gt&&e!==wt?vt(t,at):(t.state=null,e===gt?vt(t,nt):tt)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return at;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return at;if(1===r&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(mt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,_=t.next_in,h=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Zt(n);n.lookahead>=3;){var l=n.strstart,o=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[l+3-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++}while(--o);n.strstart=l,n.lookahead=2,Zt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=_,t.input=h,t.avail_in=s,n.wrap=r,tt},deflateInfo:"pako deflate (from Nodeca project)"};for(var Dt=new Uint8Array(256),Bt=0;Bt<256;Bt++)Dt[Bt]=Bt>=252?6:Bt>=248?5:Bt>=240?4:Bt>=224?3:Bt>=192?2:1;Dt[254]=Dt[254]=1;var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Ht=Object.prototype.toString,Mt=K.Z_NO_FLUSH,Yt=K.Z_SYNC_FLUSH,Kt=K.Z_FULL_FLUSH,Pt=K.Z_FINISH,jt=K.Z_OK,Gt=K.Z_STREAM_END,Xt=K.Z_DEFAULT_COMPRESSION,Wt=K.Z_DEFAULT_STRATEGY,qt=K.Z_DEFLATED;function Jt(){this.options={level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;var e=Ot.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==jt)throw new Error(Y[e]);if(t.header&&Ot.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a="[object ArrayBuffer]"===Ht.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Ot.deflateSetDictionary(this.strm,a))!==jt)throw new Error(Y[e]);this._dict_set=!0}}function Qt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:String(e),streamId:a})}}function Vt(t){var e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}Jt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Pt:Mt,"[object ArrayBuffer]"===Ht.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Yt||n===Kt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=Ot.deflate(r,n))===Gt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Ot.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===jt;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===jt&&(this.result=function(t){for(var e=0,a=0,n=t.length;a>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,K.Z_SYNC_FLUSH),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:Vt(n),additionalBytesCount:i.length};case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){Qt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){Qt(e,t)}}()}();'])))}var Os={status:0};function Ns(t,e,n,r){switch(void 0===r&&(r=Is),0===Os.status&&function(t,e,n){void 0===n&&(n=Is);try{var r=n(t),o=Mt(t,r,"error",(function(n){Ms(t,e,n)})).stop,a=Mt(t,r,"message",(function(n){var r,i=n.data;"errored"===i.type?Ms(t,e,i.error,i.streamId):"initialized"===i.type&&(r=i.version,1===Os.status&&(Os={status:3,worker:Os.worker,stop:Os.stop,version:r}))})).stop;r.postMessage({action:"init"}),C((function(){return function(t){1===Os.status&&(i.error("".concat(t," failed to start: a timeout occurred while initializing the Worker")),Os.initializationFailureCallbacks.forEach((function(t){return t()})),Os={status:2})}(e)}),Rs),Os={status:1,worker:r,stop:function(){o(),a()},initializationFailureCallbacks:[]}}catch(n){Ms(t,e,n)}}(t,e,r),Os.status){case 1:return Os.initializationFailureCallbacks.push(n),Os.worker;case 3:return Os.worker}}function Ls(){return Os.status}function Ms(t,e,n,r){if(1===Os.status||0===Os.status){if(i.error("".concat(e," failed to start: an error occurred while creating the Worker:"),n),n instanceof Event||n instanceof Error&&(p(a=n.message,"Content Security Policy")||p(a,"requires 'TrustedScriptURL'"))){var o=void 0;o=t.workerUrl?"Please make sure the Worker URL ".concat(t.workerUrl," is correct and CSP is correctly configured."):"Please make sure CSP is correctly configured.",i.error("".concat(o," See documentation at https://docs.datadoghq.com/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay"))}else An(n);1===Os.status&&Os.initializationFailureCallbacks.forEach((function(t){return t()})),Os={status:2}}else An(n,{worker_version:3===Os.status&&Os.version,stream_id:r});var a}var Us,Ps,zs,Ds,Fs=function(t,e){if(Lt()||!xs())return{start:N,stop:N,getReplayStats:function(){},onRumStart:N,isRecording:function(){return!1},getSessionReplayLink:function(){}};var n={status:0},r=function(){n={status:1}},i=function(){n={status:0}};return{start:function(){return r()},stop:function(){return i()},getSessionReplayLink:function(t,e,r){return Cs(t,e,r,0!==n.status)},onRumStart:function(o,a,s,u){o.subscribe(7,(function(){2!==n.status&&3!==n.status||(i(),n={status:1})})),o.subscribe(8,(function(){1===n.status&&r()})),r=function(){var r=s.findTrackedSession();r&&r.sessionReplayAllowed?2!==n.status&&3!==n.status&&(n={status:2},Mn(a,"interactive",(function(){if(2===n.status){var r=Ns(a,"Datadog Session Replay",(function(){i()}),e);if(r){var c=t(o,a,s,u,As(a,r,1)).stop;n={status:3,stopRecording:c}}else n={status:0}}}))):n={status:1}},i=function(){0!==n.status&&(3===n.status&&n.stopRecording(),n={status:0})},1===n.status&&r()},isRecording:function(){return 3===Ls()&&3===n.status},getReplayStats:function(t){return 3===Ls()?function(t){return null==_s?void 0:_s.get(t)}(t):void 0}}}((function(t,e,n,r,i,o){var a=o||zo(e,e.sessionReplayEndpointBuilder,Es,(function(e){t.notify(12,{error:e}),Cn("Error reported to customer",{"error.message":e.message})})),s=ks(t,e,n,r,a,i),u=s.addRecord,c=s.stop,l=gs({emit:u,configuration:e,lifeCycle:t}),d=l.stop,f=l.takeSubsequentFullSnapshot,p=l.flushMutations,v=t.subscribe(4,(function(){p(),u({timestamp:vt(),type:sa.ViewEnd})})).unsubscribe,h=t.subscribe(2,(function(t){f(t.startClocks.timeStamp)})).unsubscribe;return{stop:function(){v(),h(),d(),c()}}})),Bs=function(t,e,n){var r=(void 0===n?{}:n).ignoreInitIfSyntheticsWillInjectRum,o=void 0===r||r,a=!1,s=$(2),u=$(1),f=function(){},p=function(){},v=N,h=function(){},m=new Q,g=function(t,e){void 0===e&&(e=vt()),m.add((function(){return g(t,e)}))},_=function(t,e){void 0===e&&(e=mt()),m.add((function(){return _(t,e)}))},y=function(t,n){void 0===n&&(n=yn(s,u,e)),m.add((function(){return y(t,n)}))},w=function(t,n){void 0===n&&(n=yn(s,u,e)),m.add((function(){return w(t,n)}))},S=function(t,e){m.add((function(){return S(t,e)}))};function T(n,r,i){if(n.storeContextsAcrossPages){var o=s.getContext();(s=Dt(r,"rum",2)).setContext(P(s.getContext(),o));var a=u.getContext();(u=Dt(r,"rum",1)).setContext(P(u.getContext(),a))}var c=t(n,r,e,s,u,i);h=function(){return e.getSessionReplayLink(r,c.session,c.viewContexts)},_=c.startView,y=c.addAction,w=c.addError,g=c.addTiming,S=c.addFeatureFlagEvaluation,f=c.getInternalContext,v=c.stopSession,m.drain(),e.onRumStart(c.lifeCycle,r,c.session,c.viewContexts)}var E,k,x=l((function(t){_("object"==typeof t?t:{name:t})})),C=(E={init:l((function(t){if(t){if(p=function(){return U(t)},!o||!Ot()){var e=Lt();if(e&&(t=function(t){return b({},t,{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100})}(t)),function(t){return!a||(t.silentMultipleInit||i.error("DD_RUM is already initialized."),!1)}(t)){var n=gn(t);if(n)if(e||n.sessionStoreStrategyType){if(n.trackViewsManually){var r=m;m=new Q,_=function(e){T(t,n,e)},r.drain()}else T(t,n);a=!0}else i.warn("No storage available for session. We will not send any data.")}}}else i.error("Missing configuration")})),addRumGlobalContext:l((function(t,e){return s.add(t,e)})),setGlobalContextProperty:l((function(t,e){return s.setContextProperty(t,e)})),removeRumGlobalContext:l((function(t){return s.remove(t)})),removeGlobalContextProperty:l((function(t){return s.removeContextProperty(t)})),getRumGlobalContext:l((function(){return s.get()})),getGlobalContext:l((function(){return s.getContext()})),setRumGlobalContext:l((function(t){return s.set(t)})),setGlobalContext:l((function(t){return s.setContext(t)})),clearGlobalContext:l((function(){return s.clearContext()})),getInternalContext:l((function(t){return f(t)})),getInitConfiguration:l((function(){return p()})),addAction:l((function(t,e){y({name:H(t),context:H(e),startClocks:mt(),type:"custom"})})),addError:function(t,e){var n=ne();d((function(){w({error:t,handlingStack:n,context:H(e),startClocks:mt()})}))},addTiming:l((function(t,e){g(H(t),e)})),setUser:l((function(t){(function(t){var e="object"===L(t);return e||i.error("Unsupported user:",t),e})(t)&&u.setContext(re(t))})),getUser:l((function(){return u.getContext()})),setUserProperty:l((function(t,e){var n,r=re((n={},n[t]=e,n))[t];u.setContextProperty(t,r)})),removeUserProperty:l((function(t){return u.removeContextProperty(t)})),removeUser:l((function(){return u.clearContext()})),clearUser:l((function(){return u.clearContext()})),startView:x,stopSession:l((function(){v()})),startSessionReplayRecording:l(e.start),stopSessionReplayRecording:l(e.stop),addFeatureFlagEvaluation:l((function(t,e){S(H(t),H(e))})),getSessionReplayLink:l((function(){return h()}))},k=b({version:"4.50.1",onReady:function(t){t()}},E),Object.defineProperty(k,"_setDebug",{get:function(){return c},enumerable:!1}),k);return C}((function(t,e,n,r,i,o){var a=[],s=new yr;s.subscribe(11,(function(t){return bn("rum",t)}));var u=function(t){var e=xn("browser-rum-sdk",t);if(Lt()){var n=Nt();e.observable.subscribe((function(t){return n.send("internal_telemetry",t)}))}return e}(e);u.setContextProvider((function(){var t,n;return{application:{id:e.applicationId},session:{id:null===(t=h.findTrackedSession())||void 0===t?void 0:t.id},view:{id:null===(n=T.findView())||void 0===n?void 0:n.id},action:{id:C.findActionId()}}}));var c=function(t){s.notify(12,{error:t}),Cn("Error reported to customer",{"error.message":t.message})},d=function(t,e){if(void 0===e&&(e=k),!oe(Yt.FEATURE_FLAGS))return{findFeatureFlagEvaluations:function(){},getFeatureFlagBytesCount:function(){return 0},addFeatureFlagEvaluation:N,stop:N};var n=new Sr(jo),r=0,i=!1;t.subscribe(4,(function(t){var e=t.endClocks;n.closeActive(e.relative)})),t.subscribe(2,(function(t){var e=t.startClocks;n.add({},e.relative),r=0}));var o=O((function(t){r=e(z(t)),i||(i=Y(r,0))}),Go),a=o.throttled;return{findFeatureFlagEvaluations:function(t){return n.find(t)},getFeatureFlagBytesCount:function(){return n.find()?r:0},addFeatureFlagEvaluation:function(t,e){var r=n.find();r&&(r[t]=e,a(r))},stop:o.cancel}}(s),f=function(t){var e=new Z((function(){var n=oe(Yt.PAGEHIDE),r=Ut(0,window,["visibilitychange","freeze","pagehide"],(function(t){"pagehide"===t.type&&n?e.notify({reason:On.PAGEHIDE}):"visibilitychange"===t.type&&"hidden"===document.visibilityState?e.notify({reason:On.HIDDEN}):"freeze"===t.type&&e.notify({reason:On.FROZEN})}),{capture:!0}).stop,i=N;return n||(i=Mt(t,window,"beforeunload",(function(){e.notify({reason:On.UNLOADING})})).stop),function(){r(),i()}}));return e}(e),v=f.subscribe((function(t){s.notify(9,t)}));a.push((function(){return v.unsubscribe()}));var h=Lt()?function(){var t={id:"00000000-aaaa-0000-aaaa-000000000000",plan:1,sessionReplayAllowed:!1,longTaskAllowed:!0,resourceAllowed:!0};return{findTrackedSession:function(){return t},expire:N,expireObservable:new Z}}():Eo(e,s);if(Lt())!function(t){var e=Nt();t.subscribe(11,(function(t){e.send("rum",t)}))}(s);else{var m=Vo(e,s,u.observable,c,f,h.expireObservable);a.push((function(){return m.stop()})),function(t,e,n,r,i,o,a){e.enabled&&tt(t.customerDataTelemetrySampleRate)&&(Qo(),ta(),n.subscribe(11,(function(t){Wo=!0,Jo(Ko.globalContextBytes,ce(r.get())?0:r.getBytesCount()),Jo(Ko.userContextBytes,ce(i.get())?0:i.getBytesCount());var e=o.findFeatureFlagEvaluations(),n=p(["view","error"],t.type)&&e&&!ce(e);Jo(Ko.featureFlagBytes,n?o.getFeatureFlagBytesCount():0)})),a.subscribe((function(t){var e=t.bytesCount,n=t.messagesCount;Wo&&(Zo.batchCount+=1,Jo(Zo.batchBytesCount,e),Jo(Zo.batchMessagesCount,n),$o(Zo.globalContextBytes,Ko.globalContextBytes),$o(Zo.userContextBytes,Ko.userContextBytes),$o(Zo.featureFlagBytes,Ko.featureFlagBytes),ta())})),R(Yo,Xo))}(e,u,s,r,i,d,m.flushObservable)}var g,_,y=(g=Ln(),_=new Z((function(){if(g){var t=new g(l((function(){return _.notify()})));return t.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return t.disconnect()}}})),_),w=qo(e,location),S=function(t,e,n,r,i,o,a,s){var u=function(t){var e=new Sr(Tr);return t.subscribe(2,(function(t){e.add(function(t){return{service:t.service,version:t.version,id:t.id,name:t.name,startClocks:t.startClocks}}(t),t.startClocks.relative)})),t.subscribe(4,(function(t){var n=t.endClocks;e.closeActive(n.relative)})),t.subscribe(8,(function(){e.reset()})),{findView:function(t){return e.find(t)},stop:function(){e.stop()}}}(t),c=function(t,e,n){var r,i=new Sr(Ho);t.subscribe(4,(function(t){var e=t.endClocks;i.closeActive(e.relative)})),t.subscribe(2,(function(t){var e=t.startClocks,o=n.href;i.add(a({url:o,referrer:r||document.referrer}),e.relative),r=o}));var o=e.subscribe((function(t){var e=t.newLocation,n=i.find();if(n){var r=ht();i.closeActive(r),i.add(a({url:e.href,referrer:n.referrer}),r)}}));function a(t){return{url:t.url,referrer:t.referrer}}return{findUrl:function(t){return i.find(t)},stop:function(){o.unsubscribe(),i.stop()}}}(t,i,n),l=ia(),d=function(t,e,n,r){t.subscribe(1,(function(e){return t.notify(10,Ci(e,r))}));var i={findActionId:N};return n.trackUserInteractions&&(i=ki(t,e,n).actionContexts),{addAction:function(e,n){t.notify(10,b({savedCommonContext:n},Ci(e,r)))},actionContexts:i}}(t,o,e,l),f=d.addAction,p=d.actionContexts,v=function(t){var e=so();return{get:function(){return{viewport:e}},stop:ao(t).subscribe((function(t){e=t})).unsubscribe}}(e);return gr(e,t,r,u,c,p,v,a,s),{viewContexts:u,pageStateHistory:l,urlContexts:c,addAction:f,actionContexts:p,stop:function(){v.stop(),l.stop(),c.stop(),u.stop(),l.stop()}}}(s,e,location,h,w,y,(function(){return yn(r,i,n)}),c),T=S.viewContexts,E=S.pageStateHistory,x=S.urlContexts,C=S.actionContexts,A=S.addAction,I=S.stop;a.push(I),function(t){kn.telemetryConfigurationEnabled&&Rn({type:Sn.configuration,configuration:t})}(function(t){var e,n,r=function(t){var e,n,r=null!==(e=t.proxy)&&void 0!==e?e:t.proxyUrl;return{session_sample_rate:null!==(n=t.sessionSampleRate)&&void 0!==n?n:t.sampleRate,telemetry_sample_rate:t.telemetrySampleRate,telemetry_configuration_sample_rate:t.telemetryConfigurationSampleRate,use_before_send:!!t.beforeSend,use_cross_site_session_cookie:t.useCrossSiteSessionCookie,use_secure_session_cookie:t.useSecureSessionCookie,use_proxy:void 0!==r?!!r:void 0,silent_multiple_init:t.silentMultipleInit,track_session_across_subdomains:t.trackSessionAcrossSubdomains,track_resources:t.trackResources,track_long_task:t.trackLongTasks,allow_fallback_to_local_storage:!!t.allowFallbackToLocalStorage,store_contexts_across_pages:!!t.storeContextsAcrossPages}}(t);return b({premium_sample_rate:t.premiumSampleRate,replay_sample_rate:t.replaySampleRate,session_replay_sample_rate:t.sessionReplaySampleRate,trace_sample_rate:null!==(e=t.traceSampleRate)&&void 0!==e?e:t.tracingSampleRate,action_name_attribute:t.actionNameAttribute,use_allowed_tracing_origins:Array.isArray(t.allowedTracingOrigins)&&t.allowedTracingOrigins.length>0,use_allowed_tracing_urls:Array.isArray(t.allowedTracingUrls)&&t.allowedTracingUrls.length>0,selected_tracing_propagators:_n(t),default_privacy_level:t.defaultPrivacyLevel,use_excluded_activity_urls:Array.isArray(t.excludedActivityUrls)&&t.excludedActivityUrls.length>0,use_worker_url:!!t.workerUrl,track_frustrations:t.trackFrustrations,track_views_manually:t.trackViewsManually,track_user_interactions:null!==(n=t.trackUserInteractions)&&void 0!==n?n:t.trackInteractions},r)}(t)),function(t,e){t.subscribe(0,(function(n){for(var r=0,i=n;r