@datadog/webpack-plugin 3.0.9 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";const t={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},e=console,n={};Object.keys(t).forEach((t=>{n[t]=e[t]}));const r="Datadog Browser SDK:",o={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)},i="https://docs.datadoghq.com",s=`${i}/real_user_monitoring/browser/troubleshooting`,a="More details:";function c(t,e){return(...n)=>{try{return t(...n)}catch(t){o.error(e,t)}}}function u(t){return 0!==t&&100*Math.random()<=t}function l(t,e){return+t.toFixed(e)}function d(t){return"number"==typeof t}const f=1e3,p=6e4,m=31536e6;function h(t){return{relative:t,timeStamp:g(t)}}function g(t){const e=b()-performance.now();return e>A()?Math.round(E(e,t)):function(t){return Math.round(E(A(),t))}(t)}function v(){return Math.round(b()-E(A(),performance.now()))}function y(t){return d(t)?l(1e6*t,0):t}function b(){return(new Date).getTime()}function _(){return b()}function w(){return performance.now()}function S(){return{relative:w(),timeStamp:_()}}function k(){return{relative:0,timeStamp:A()}}function T(t,e){return e-t}function E(t,e){return t+e}function x(t){return t-A()}let C;function A(){var t,e;return void 0===C&&(C=null!==(e=null===(t=performance.timing)||void 0===t?void 0:t.navigationStart)&&void 0!==e?e:performance.timeOrigin),C}const I=/[^\u0000-\u007F]/;function R(t){return I.test(t)?void 0!==window.TextEncoder?(new TextEncoder).encode(t).length:new Blob([t]).size:t.length}function N(t){if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}function O(t){return{...t}}function L(t,e){return Object.keys(t).some((n=>t[n]===e))}function M(t){return 0===Object.keys(t).length}function P(t,e){const n={};for(const r of Object.keys(t))n[r]=e(t[r]);return n}function D(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let t=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof t&&(t="object"==typeof self?self:"object"==typeof window?window:{}),t}const U=D(),z="WorkerGlobalScope"in U;function $(t,e){const n=D();let r;return n.Zone&&"function"==typeof n.Zone.__symbol__&&(r=t[n.Zone.__symbol__(e)]),r||(r=t[e]),r}let V,B=!1;function F(t){B=t}function q(t){return function(){return j(t,this,arguments)}}function j(t,e,n){try{return t.apply(e,n)}catch(t){H(t)}}function H(t){if(G(t),V)try{V(t)}catch(t){G(t)}}function G(...t){B&&o.error("[MONITOR]",...t)}function W(t,e){return $(D(),"setTimeout")(q(t),e)}function K(t){$(D(),"clearTimeout")(t)}function J(t,e){return $(D(),"setInterval")(q(t),e)}function Y(t){$(D(),"clearInterval")(t)}function Z(t){var e;const n=null===(e=U.queueMicrotask)||void 0===e?void 0:e.bind(U);"function"==typeof n?n(q(t)):Promise.resolve().then(q(t))}class X{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach((e=>e(t)))}addObserver(t){this.observers.push(t),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(t){this.observers=this.observers.filter((e=>t!==e)),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function Q(...t){return new X((e=>{const n=t.map((t=>t.subscribe((t=>e.notify(t)))));return()=>n.forEach((t=>t.unsubscribe()))}))}class tt extends X{constructor(t){super(),this.maxBufferSize=t,this.buffer=[]}notify(t){this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(t)}subscribe(t){let e=!1;const n={unsubscribe:()=>{e=!0,this.removeObserver(t)}};return Z((()=>{for(const n of this.buffer){if(e)return;t(n)}e||this.addObserver(t)})),n}unbuffer(){Z((()=>{this.maxBufferSize=this.buffer.length=0}))}}function et(t,e,n){const r=!n||void 0===n.leading||n.leading,o=!n||void 0===n.trailing||n.trailing;let i,s,a=!1;return{throttled:(...n)=>{a?i=n:(r?t(...n):i=n,a=!0,s=W((()=>{o&&i&&t(...i),a=!1,i=void 0}),e))},cancel:()=>{K(s),a=!1,i=void 0}}}function nt(){}function rt(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,rt)}const ot=/([\w-]+)\s*=\s*([^;]+)/g;function it(t,e){for(ot.lastIndex=0;;){const n=ot.exec(t);if(!n)break;if(n[1]===e)return n[2]}}function st(t,e,n=""){const r=t.charCodeAt(e-1),o=r>=55296&&r<=56319?e+1:e;return t.length<=o?t:`${t.slice(0,o)}${n}`}let at,ct,ut,lt;function dt(){return null!=at?at:at=function(t=window){var e;const n=t.navigator.userAgent;if(t.chrome||/HeadlessChrome/.test(n))return 0;if(0===(null===(e=t.navigator.vendor)||void 0===e?void 0:e.indexOf("Apple"))||/safari/i.test(n)&&!/chrome|android/i.test(n))return 1;return 2}()}function ft(t){return pt(t,location.href).href}function pt(t,e){const{URL:n}=function(){if(!ct){let t,e;try{t=document.createElement("iframe"),t.style.display="none",document.body.appendChild(t),e=t.contentWindow}catch(t){e=U}ct={URL:e.URL},null==t||t.remove()}return ct}();try{return void 0!==e?new n(t,e):new n(t)}catch(t){throw new Error(`Failed to construct URL: ${String(t)}`)}}function mt(t,e,n=0,r){const o=new Date;o.setTime(o.getTime()+n);const i=`expires=${o.toUTCString()}`,s=r&&r.crossSite?"none":"strict",a=r&&r.domain?`;domain=${r.domain}`:"",c=r&&r.secure?";secure":"",u=r&&r.partitioned?";partitioned":"";document.cookie=`${t}=${e};${i};path=/;samesite=${s}${a}${c}${u}`}function ht(t){return it(document.cookie,t)}function gt(t){return function(t){const e=new Map;for(ot.lastIndex=0;;){const n=ot.exec(t);if(!n)break;{const t=n[1],r=n[2];e.has(t)?e.get(t).push(r):e.set(t,[r])}}return e}(document.cookie).get(t)||[]}function vt(t){return ut||(ut=function(t){const e=new Map;for(ot.lastIndex=0;;){const n=ot.exec(t);if(!n)break;e.set(n[1],n[2])}return e}(document.cookie)),ut.get(t)}function yt(t,e){mt(t,"",0,e)}function bt(t=location.hostname,e=document.referrer){if(void 0===lt){const n=function(t,e){try{return t||pt(e).hostname}catch(t){}}(t,e);if(n){const t=`dd_site_test_${rt()}`,e="test",r=n.split(".");let o=r.pop();for(;r.length&&!ht(t);)o=`${r.pop()}.${o}`,mt(t,e,f,{domain:o});yt(t,{domain:o}),lt=o}}return lt}const _t="_dd_s";function wt(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(e(r,n,t))return r}}function St(t){return Object.values(t)}function kt(t){return Object.entries(t)}const Tt=144e5,Et=9e5,xt=m,Ct="cookie",At="local-storage",It=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function Rt(t,e){const n={isExpired:"1"};return e.trackAnonymousUser&&(null==t?void 0:t.anonymousId)&&(n.anonymousId=null==t?void 0:t.anonymousId),n}function Nt(t){return M(t)}function Ot(t){return!Nt(t)}function Lt(t){return void 0!==t.isExpired||!((void 0===(e=t).created||b()-Number(e.created)<Tt)&&(void 0===e.expire||b()<Number(e.expire)));var e}function Mt(t){t.expire=String(b()+Et)}function Pt(t){return kt(t).map((([t,e])=>"anonymousId"===t?`aid=${e}`:`${t}=${e}`)).join("&")}function Dt(t){const e={};return function(t){return!!t&&(-1!==t.indexOf("&")||It.test(t))}(t)&&t.split("&").forEach((t=>{const n=It.exec(t);if(null!==n){const[,t,r]=n;"aid"===t?e.anonymousId=r:e[t]=r}})),e}function Ut(t){const e=function(t){const e={};if(e.secure=!!t.useSecureSessionCookie||!!t.usePartitionedCrossSiteSessionCookie,e.crossSite=!!t.usePartitionedCrossSiteSessionCookie,e.partitioned=!!t.usePartitionedCrossSiteSessionCookie,t.trackSessionAcrossSubdomains){const t=bt();if(!t)return;e.domain=t}return e}(t);return e&&function(t){if(void 0===document.cookie||null===document.cookie)return!1;try{const e=`dd_cookie_test_${rt()}`,n="test";mt(e,n,p,t);const r=ht(e)===n;return yt(e,t),r}catch(t){return o.error(t),!1}}(e)?{type:Ct,cookieOptions:e}:void 0}function zt(t,e){const n={isLockEnabled:0===dt(),persistSession:n=>$t(e,t,n,Et),retrieveSession:()=>Vt(e,t),expireSession:n=>$t(e,t,Rt(n,t),Tt)};return function(t){if(!vt(_t)){const e=vt("_dd"),n=vt("_dd_r"),r=vt("_dd_l"),o={};e&&(o.id=e),r&&/^[01]$/.test(r)&&(o.logs=r),n&&/^[012]$/.test(n)&&(o.rum=n),Ot(o)&&(Mt(o),t.persistSession(o))}}(n),n}function $t(t,e,n,r){let o=Pt(n);e.betaEncodeCookieOptions&&(o=Pt({...n,...M(n)?{}:{c:Bt(t)}})),mt(_t,o,e.trackAnonymousUser?xt:r,t)}function Vt(t,e){if(e.betaEncodeCookieOptions)return function(t){const e=gt(_t),n=Bt(t);let r;for(const t of e.reverse())if(r=Dt(t),r.c===n)break;return null==r||delete r.c,null!=r?r:{}}(t);return Dt(ht(_t))}function Bt(t){let e=0;return e|=0,e|=(t.domain?t.domain.split(".").length-1:0)<<1,e|=t.crossSite?1:0,e.toString(16)}function Ft(){try{const t=rt(),e=`_dd_test_${t}`;localStorage.setItem(e,t);const n=localStorage.getItem(e);return localStorage.removeItem(e),t===n?{type:At}:void 0}catch(t){return}}function qt(t){return{isLockEnabled:!1,persistSession:jt,retrieveSession:Ht,expireSession:e=>function(t,e){jt(Rt(t,e))}(e,t)}}function jt(t){localStorage.setItem(_t,Pt(t))}function Ht(){return Dt(localStorage.getItem(_t))}const Gt="--",Wt=[];let Kt;function Jt(t,e,n=0){var r;const{isLockEnabled:o,persistSession:i,expireSession:s}=e,a=t=>i({...t,lock:u}),c=()=>{const{lock:t,...n}=e.retrieveSession();return{session:n,lock:t&&!Xt(t)?t:void 0}};if(Kt||(Kt=t),t!==Kt)return void Wt.push(t);if(o&&n>=100)return void Zt(e);let u,l=c();if(o){if(l.lock)return void Yt(t,e,n);if(u=rt()+Gt+_(),a(l.session),l=c(),l.lock!==u)return void Yt(t,e,n)}let d=t.process(l.session);if(o&&(l=c(),l.lock!==u))Yt(t,e,n);else{if(d&&(Lt(d)?s(d):(Mt(d),o?a(d):i(d))),o&&(!d||!Lt(d))){if(l=c(),l.lock!==u)return void Yt(t,e,n);i(l.session),d=l.session}null===(r=t.after)||void 0===r||r.call(t,d||l.session),Zt(e)}}function Yt(t,e,n){W((()=>{Jt(t,e,n+1)}),10)}function Zt(t){Kt=void 0;const e=Wt.shift();e&&Jt(e,t)}function Xt(t){const[,e]=t.split(Gt);return!e||T(Number(e),_())>1e3}const Qt=f;function te(t){switch(t.sessionPersistence){case Ct:return Ut(t);case At:return Ft();case void 0:{let e=Ut(t);return!e&&t.allowFallbackToLocalStorage&&(e=Ft()),e}default:o.error(`Invalid session persistence '${String(t.sessionPersistence)}'`)}}function ee(t,e,n,r,o=function(t,e){return t.type===Ct?zt(e,t.cookieOptions):qt(e)}(t,e)){const i=new X,s=new X,a=new X,c=J((function(){const t=o.retrieveSession();Lt(t)?Jt({process:t=>Lt(t)?Rt(t,e):void 0,after:f},o):f(t)}),Qt);let u;p();const{throttled:l,cancel:d}=et((()=>{Jt({process:t=>{if(Nt(t))return;const e=f(t);return function(t){if(Nt(t))return!1;const e=r(t[n]);t[n]=e,delete t.isExpired,"0"===e||t.id||(t.id=rt(),t.created=String(b()))}(e),e},after:t=>{Ot(t)&&!m()&&function(t){u=t,i.notify()}(t),u=t}},o)}),Qt);function f(t){return Lt(t)&&(t=Rt(t,e)),m()&&(!function(t){return u.id!==t.id||u[n]!==t[n]}(t)?(a.notify({previousState:u,newState:t}),u=t):(u=Rt(u,e),s.notify())),t}function p(){Jt({process:t=>{if(Nt(t))return t.anonymousId=rt(),Rt(t,e)},after:t=>{u=t}},o)}function m(){return void 0!==(null==u?void 0:u[n])}return{expandOrRenewSession:l,expandSession:function(){Jt({process:t=>m()?f(t):void 0},o)},getSession:()=>u,renewObservable:i,expireObservable:s,sessionStateUpdateObservable:a,restartSession:p,expire:t=>{d(),!1===t&&u&&delete u.anonymousId,o.expireSession(u),f(Rt(u,e))},stop:()=>{Y(c)},updateSessionState:function(t){Jt({process:e=>({...e,...t}),after:f},o)}}}const ne={GRANTED:"granted",NOT_GRANTED:"not-granted"};function re(t){return null===t?"null":Array.isArray(t)?"array":typeof t}function oe(t){const e=re(t);return"string"===e||"function"===e||t instanceof RegExp}function ie(t,e,n=!1){return t.some((t=>{try{if("function"==typeof t)return t(e);if(t instanceof RegExp)return t.test(e);if("string"==typeof t)return n?e.startsWith(t):t===e}catch(t){o.error(t)}return!1}))}const se=["chrome-extension://","moz-extension://"];function ae(t){return se.some((e=>t.includes(e)))}function ce(t,e,n=("undefined"!=typeof location?location.origin:"")){const r=t.allowedTrackingOrigins;if(!r)return!function(t,e=""){return!ae(t)&&ae(e.split("\n").filter((t=>{const e=t.trim();return e.length&&/^at\s+|@/.test(e)}))[1]||"")}(n,e)||(o.error("Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided."),!1);const i=ie(r,n);return i||o.error("SDK initialized on a non-allowed domain."),i}const ue="datad0g.com",le="datadoghq.com",de="datadoghq.eu",fe=["ddsource","dd-api-key","dd-request-id"];function pe(t,e,n){const r=function(t,e){const n=`/api/v2/${e}`,r=t.proxy;if("string"==typeof r){const t=ft(r);return e=>`${t}?ddforward=${encodeURIComponent(`${n}?${e}`)}`}if("function"==typeof r)return t=>r({path:n,parameters:t});const o=me(e,t);return t=>`https://${o}${n}?${t}`}(t,e);return{build(o,i){const s=function({clientToken:t,internalAnalyticsSubdomain:e,source:n="browser"},r,o,{retry:i,encoding:s},a=[]){const c=[`ddsource=${n}`,`dd-api-key=${t}`,`dd-evp-origin-version=${encodeURIComponent("6.24.0")}`,"dd-evp-origin=browser",`dd-request-id=${rt()}`].concat(a);s&&c.push(`dd-evp-encoding=${s}`);"rum"===r&&(c.push(`batch_time=${_()}`,`_dd.api=${o}`),i&&c.push(`_dd.retry_count=${i.count}`,`_dd.retry_after=${i.lastFailureStatus}`));e&&c.reverse();return c.join("&")}(t,e,o,i,n);return r(s)},trackType:e}}function me(t,e){const{site:n=le,internalAnalyticsSubdomain:r}=e;if("logs"===t&&e.usePciIntake&&n===le)return"pci.browser-intake-datadoghq.com";if(r&&n===le)return`${r}.${le}`;if("dd0g-gov.com"===n)return`http-intake.logs.${n}`;const o=n.split("."),i=o.pop();return`browser-intake-${o.join("-")}.${i}`}function he(t){const e=t.site||le,n=function(t){if("flutter"===t||"unity"===t)return t;return"browser"}(t.source),r=function(t){return{logsEndpointBuilder:pe(t,"logs"),rumEndpointBuilder:pe(t,"rum"),profilingEndpointBuilder:pe(t,"profile"),sessionReplayEndpointBuilder:pe(t,"replay"),exposuresEndpointBuilder:pe(t,"exposures")}}({...t,site:e,source:n}),o=function(t){if(!t.replica)return;const e={...t,site:le,clientToken:t.replica.clientToken};return{logsEndpointBuilder:pe(e,"logs"),rumEndpointBuilder:pe(e,"rum",[`application.id=${t.replica.applicationId}`])}}({...t,site:e,source:n});return{replica:o,site:e,source:n,...r}}const ge={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},ve={ALL:"all",SAMPLED:"sampled"};function ye(t,e){return null==t||"string"==typeof t||(o.error(`${e} must be defined as a string`),!1)}function be(t,e){return!!(void 0===t||(n=t,d(n)&&n>=0&&n<=100))||(o.error(`${e} Sample Rate should be a number between 0 and 100`),!1);var n}function _e(t,e){var n,r,s,u,l,d,f,p,m,h;if(t&&t.clientToken)if(void 0===t.allowedTrackingOrigins||Array.isArray(t.allowedTrackingOrigins)){if((!(g=t.site)||"string"!=typeof g||/(datadog|ddog|datad0g|dd0g)/.test(g)||(o.error(`Site should be a valid Datadog site. ${a} ${i}/getting_started/site/.`),0))&&be(t.sessionSampleRate,"Session")&&be(t.telemetrySampleRate,"Telemetry")&&be(t.telemetryConfigurationSampleRate,"Telemetry Configuration")&&be(t.telemetryUsageSampleRate,"Telemetry Usage")&&ye(t.version,"Version")&&ye(t.env,"Env")&&ye(t.service,"Service")&&ce(t,null!=e?e:"")){var g;if(void 0===t.trackingConsent||L(ne,t.trackingConsent))return{beforeSend:t.beforeSend&&c(t.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:z?void 0:te(t),sessionSampleRate:null!==(n=t.sessionSampleRate)&&void 0!==n?n:100,telemetrySampleRate:null!==(r=t.telemetrySampleRate)&&void 0!==r?r:20,telemetryConfigurationSampleRate:null!==(s=t.telemetryConfigurationSampleRate)&&void 0!==s?s:5,telemetryUsageSampleRate:null!==(u=t.telemetryUsageSampleRate)&&void 0!==u?u:5,service:null!==(l=t.service)&&void 0!==l?l:void 0,env:null!==(d=t.env)&&void 0!==d?d:void 0,version:null!==(f=t.version)&&void 0!==f?f:void 0,datacenter:null!==(p=t.datacenter)&&void 0!==p?p:void 0,silentMultipleInit:!!t.silentMultipleInit,allowUntrustedEvents:!!t.allowUntrustedEvents,trackingConsent:null!==(m=t.trackingConsent)&&void 0!==m?m:ne.GRANTED,trackAnonymousUser:null===(h=t.trackAnonymousUser)||void 0===h||h,storeContextsAcrossPages:!!t.storeContextsAcrossPages,betaEncodeCookieOptions:!!t.betaEncodeCookieOptions,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:z?1:50,messageBytesLimit:262144,variant:t.variant,sdkVersion:t.sdkVersion,...he(t)};o.error('Tracking Consent should be either "granted" or "not-granted"')}}else o.error("Allowed Tracking Origins must be an array");else o.error("Client Token is not configured, we will not send any data.")}var we;!function(t){t.TRACK_INTAKE_REQUESTS="track_intake_requests",t.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",t.FEATURE_OPERATION_VITAL="feature_operation_vital",t.SHORT_SESSION_INVESTIGATION="short_session_investigation",t.AVOID_FETCH_KEEPALIVE="avoid_fetch_keepalive"}(we||(we={}));const Se=new Set;function ke(t){Array.isArray(t)&&t.filter((t=>L(we,t))).forEach((t=>{Se.add(t)}))}function Te(t){return Se.has(t)}function Ee(){return Se}const xe="?";function Ce(t){var e,n;const r=[];let o=De(t,"stack");const i=String(t);if(o&&o.startsWith(i)&&(o=o.slice(i.length)),o&&o.split("\n").forEach((t=>{const e=function(t){const e=Re.exec(t);if(!e)return;const n=e[2]&&0===e[2].indexOf("native"),r=e[2]&&0===e[2].indexOf("eval"),o=Ne.exec(e[2]);r&&o&&(e[2]=o[1],e[3]=o[2],e[4]=o[3]);return{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||xe,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}(t)||function(t){const e=Oe.exec(t);if(!e)return;return{args:[],column:e[3]?+e[3]:void 0,func:xe,line:e[2]?+e[2]:void 0,url:e[1]}}(t)||function(t){const e=Le.exec(t);if(!e)return;return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||xe,line:+e[3],url:e[2]}}(t)||function(t){const e=Me.exec(t);if(!e)return;const n=e[3]&&e[3].indexOf(" > eval")>-1,r=Pe.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]||xe,line:e[4]?+e[4]:void 0,url:e[3]}}(t);e&&(!e.func&&e.line&&(e.func=xe),r.push(e))})),r.length>0&&function(){if(void 0!==Ve)return Ve;class t extends Error{constructor(){super(),this.name="Error"}}const[e,n]=[t,Error].map((t=>new t));return Ve=$e(Object.getPrototypeOf(e))&&n.stack!==e.stack,Ve}()&&t instanceof Error){const o=[];let i=t;for(;(i=Object.getPrototypeOf(i))&&$e(i);){const t=(null===(e=i.constructor)||void 0===e?void 0:e.name)||xe;o.push(t)}for(let t=o.length-1;t>=0&&(null===(n=r[0])||void 0===n?void 0:n.func)===o[t];t--)r.shift()}return{message:De(t,"message"),name:De(t,"name"),stack:r}}const Ae="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",Ie="(?::(\\d+))",Re=new RegExp(`^\\s*at (.*?) ?\\(${Ae}${Ie}?${Ie}?\\)?\\s*$`,"i"),Ne=new RegExp(`\\((\\S*)${Ie}${Ie}\\)`);const Oe=new RegExp(`^\\s*at ?${Ae}${Ie}?${Ie}??\\s*$`,"i");const Le=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;const Me=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,Pe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function De(t,e){if("object"!=typeof t||!t||!(e in t))return;const n=t[e];return"string"==typeof n?n:void 0}function Ue(t,e,n,r){if(void 0===e)return;const{name:o,message:i}=function(t){let e,n;"[object String]"==={}.toString.call(t)&&([,e,n]=ze.exec(t));return{name:e,message:n}}(t);return{name:o,message:i,stack:[{url:e,column:r,line:n}]}}const ze=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function $e(t){return String(t.constructor).startsWith("class ")}let Ve;function Be(t){const e=new Error(t);let n;return e.name="HandlingStack",j((()=>{const t=Ce(e);t.stack=t.stack.slice(2),n=Fe(t)})),n}function Fe(t){let e=qe(t);return t.stack.forEach((t=>{const n="?"===t.func?"<anonymous>":t.func,r=t.args&&t.args.length>0?`(${t.args.join(", ")})`:"",o=t.line?`:${t.line}`:"",i=t.line&&t.column?`:${t.column}`:"";e+=`\n at ${n}${r} @ ${t.url}${o}${i}`})),e}function qe(t){return`${t.name||"Error"}: ${t.message}`}function je(t,e,n,{computeHandlingStack:r}={}){let o=t[e];if("function"!=typeof o){if(!(e in t)||!e.startsWith("on"))return{stop:nt};o=nt}let i=!1;const s=function(){if(i)return o.apply(this,arguments);const t=Array.from(arguments);let e;j(n,null,[{target:this,parameters:t,onPostCall:t=>{e=t},handlingStack:r?Be("instrumented method"):void 0}]);const s=o.apply(this,t);return e&&j(e,null,[s]),s};return t[e]=s,{stop:()=>{i=!0,t[e]===s&&(t[e]=o)}}}function He(t,e,n){const r=Object.getOwnPropertyDescriptor(t,e);if(!r||!r.set||!r.configurable)return{stop:nt};const o=nt;let i=(t,e)=>{W((()=>{i!==o&&n(t,e)}),0)};const s=function(t){r.set.call(this,t),i(this,t)};return Object.defineProperty(t,e,{set:s}),{stop:()=>{var n;(null===(n=Object.getOwnPropertyDescriptor(t,e))||void 0===n?void 0:n.set)===s&&Object.defineProperty(t,e,r),i=o}}}function Ge(t,e,n){if("object"!=typeof t||null===t)return JSON.stringify(t);const r=We(Object.prototype),o=We(Array.prototype),i=We(Object.getPrototypeOf(t)),s=We(t);try{return JSON.stringify(t,e,n)}catch(t){return"<error: unable to serialize object>"}finally{r(),o(),i(),s()}}function We(t){const e=t,n=e.toJSON;return n?(delete e.toJSON,()=>{e.toJSON=n}):nt}function Ke(t,e=225280){const n=We(Object.prototype),r=We(Array.prototype),o=[],i=new WeakMap,s=Je(t,"$",void 0,o,i),a=JSON.stringify(s);let c=a?a.length:0;if(!(c>e)){for(;o.length>0&&c<e;){const n=o.shift();let r=0;if(Array.isArray(n.source))for(let s=0;s<n.source.length;s++){const a=Je(n.source[s],n.path,s,o,i);if(c+=void 0!==a?JSON.stringify(a).length:4,c+=r,r=1,c>e){Ze(e,"truncated",t);break}n.target[s]=a}else for(const s in n.source)if(Object.prototype.hasOwnProperty.call(n.source,s)){const a=Je(n.source[s],n.path,s,o,i);if(void 0!==a&&(c+=JSON.stringify(a).length+r+s.length+3,r=1),c>e){Ze(e,"truncated",t);break}n.target[s]=a}}return n(),r(),s}Ze(e,"discarded",t)}function Je(t,e,n,r,o){const i=function(t){const e=t;if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(t){}return t}(t);if(!i||"object"!=typeof i)return function(t){if("bigint"==typeof t)return`[BigInt] ${t.toString()}`;if("function"==typeof t)return`[Function] ${t.name||"unknown"}`;if("symbol"==typeof t)return`[Symbol] ${t.description||t.toString()}`;return t}(i);const s=Ye(i);if("[Object]"!==s&&"[Array]"!==s&&"[Error]"!==s)return s;const a=t;if(o.has(a))return`[Reference seen at ${o.get(a)}]`;const c=void 0!==n?`${e}.${n}`:e,u=Array.isArray(i)?[]:{};return o.set(a,c),r.push({source:i,target:u,path:c}),u}function Ye(t){try{if(t instanceof Event)return{type:(e=t).type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?Ye(e.currentTarget):null,target:e.target?Ye(e.target):null};if(t instanceof RegExp)return`[RegExp] ${t.toString()}`;const n=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch(t){}var e;return"[Unserializable]"}function Ze(t,e,n){o.warn(`The data provided has been ${e} as it is over the limit of ${t} characters:`,n)}const Xe="No stack, consider using an instance of Error";function Qe({stackTrace:t,originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:i,useFallbackStack:s=!0,source:a,handling:c}){const u=rn(e);return!t&&u&&(t=Ce(e)),{startClocks:o,source:a,handling:c,handlingStack:n,componentStack:r,originalError:e,type:t?t.name:void 0,message:tn(t,u,i,e),stack:t?Fe(t):s?Xe:void 0,causes:u?on(e,a):void 0,fingerprint:en(e),context:nn(e)}}function tn(t,e,n,r){return(null==t?void 0:t.message)&&(null==t?void 0:t.name)?t.message:e?"Empty message":`${n} ${Ge(Ke(r))}`}function en(t){return rn(t)&&"dd_fingerprint"in t?String(t.dd_fingerprint):void 0}function nn(t){if(null!==t&&"object"==typeof t&&"dd_context"in t)return t.dd_context}function rn(t){return t instanceof Error||"[object Error]"===Object.prototype.toString.call(t)}function on(t,e){let n=t;const r=[];for(;rn(null==n?void 0:n.cause)&&r.length<10;){const t=Ce(n.cause);r.push({message:n.cause.message,source:e,type:null==t?void 0:t.name,stack:t&&Fe(t)}),n=n.cause}return r.length?r:void 0}const sn="agent",an="console",cn="custom",un="source",ln="report";function dn(){return new X((t=>{const e=(e,n)=>{const r=Qe({stackTrace:n,originalError:e,startClocks:S(),nonErrorPrefix:"Uncaught",source:un,handling:"unhandled"});t.notify(r)},{stop:n}=(r=e,je(D(),"onerror",(({parameters:[t,e,n,o,i]})=>{let s;rn(i)||(s=Ue(t,e,n,o)),r(null!=i?i:t,s)})));var r;const{stop:o}=function(t){return je(D(),"onunhandledrejection",(({parameters:[e]})=>{t(e.reason||"Empty reason")}))}(e);return()=>{n(),o()}}))}function fn(t,e){e.silentMultipleInit||o.error(`${t} is already initialized.`)}function pn(t,e,n,r,o){return mn(t,e,[n],r,o)}function mn(t,e,n,r,{once:o,capture:i,passive:s}={}){const a=q((e=>{(e.isTrusted||e.__ddIsTrusted||t.allowUntrustedEvents)&&(o&&d(),r(e))})),c=s?{capture:i,passive:s}:i,u=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,l=$(u,"addEventListener");function d(){const t=$(u,"removeEventListener");n.forEach((n=>t.call(e,n,a,c)))}return n.forEach((t=>l.call(e,t,a,c))),{stop:d}}const hn="intervention",gn="csp_violation";function vn(t,e){const n=[];e.includes(gn)&&n.push(function(t){return new X((e=>{const{stop:n}=pn(t,document,"securitypolicyviolation",(t=>{e.notify(function(t){const e=`'${t.blockedURI}' blocked by '${t.effectiveDirective}' directive`;return yn({type:t.effectiveDirective,message:`${gn}: ${e}`,originalError:t,csp:{disposition:t.disposition},stack:bn(t.effectiveDirective,t.originalPolicy?`${e} of the policy "${st(t.originalPolicy,100,"...")}"`:"no policy",t.sourceFile,t.lineNumber,t.columnNumber)})}(t))}));return n}))}(t));const r=e.filter((t=>t!==gn));return r.length&&n.push(function(t){return new X((e=>{if(!window.ReportingObserver)return;const n=q(((t,n)=>t.forEach((t=>e.notify(function(t){const{type:e,body:n}=t;return yn({type:n.id,message:`${e}: ${n.message}`,originalError:t,stack:bn(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}(t)))))),r=new window.ReportingObserver(n,{types:t,buffered:!0});return r.observe(),()=>{r.disconnect()}}))}(r)),Q(...n)}function yn(t){return{startClocks:S(),source:ln,handling:"unhandled",...t}}function bn(t,e,n,r,o){return n?Fe({name:t,message:e,stack:[{func:"?",url:n,line:null!=r?r:void 0,column:null!=o?o:void 0}]}):void 0}function _n(t){const{env:e,service:n,version:r,datacenter:o,sdkVersion:i,variant:s}=t,a=[wn("sdk_version",null!=i?i:"6.24.0")];return e&&a.push(wn("env",e)),n&&a.push(wn("service",n)),r&&a.push(wn("version",r)),o&&a.push(wn("datacenter",o)),s&&a.push(wn("variant",s)),a}function wn(t,e){const n=e?`${t}:${e}`:t;return(n.length>200||function(t){if(!function(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch(t){return!1}}())return!1;return new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(t)}(n))&&o.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${a} ${i}/getting_started/tagging/#defining-tags`),function(t){return t.replace(/,/g,"_")}(n)}function Sn(t,e){const n=U.__ddBrowserSdkExtensionCallback;n&&n({type:t,payload:e})}function kn(t,e,n=function(){if("undefined"!=typeof WeakSet){const t=new WeakSet;return{hasAlreadyBeenSeen(e){const n=t.has(e);return n||t.add(e),n}}}const t=[];return{hasAlreadyBeenSeen(e){const n=t.indexOf(e)>=0;return n||t.push(e),n}}}()){if(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){const t=e.flags||[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.sticky?"y":"",e.unicode?"u":""].join("");return new RegExp(e.source,t)}if(n.hasAlreadyBeenSeen(e))return;if(Array.isArray(e)){const r=Array.isArray(t)?t:[];for(let t=0;t<e.length;++t)r[t]=kn(r[t],e[t],n);return r}const r="object"===re(t)?t:{};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=kn(r[t],e[t],n));return r}function Tn(t){return kn(void 0,t)}function En(...t){let e;for(const n of t)null!=n&&(e=kn(e,n));return e}function xn(){var t;const e=U.navigator;return{status:e.onLine?"connected":"not_connected",interfaces:e.connection&&e.connection.type?[e.connection.type]:void 0,effective_type:null===(t=e.connection)||void 0===t?void 0:t.effectiveType}}const Cn=20971520,An=f;function In(t,e,n,r,o,i){0===e.transportStatus&&0===e.queuedPayloads.size()&&e.bandwidthMonitor.canHandle(t)?Nn(t,e,n,i,{onSuccess:()=>On(0,e,n,r,o,i),onFailure:()=>{e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t}),Rn(e,n,r,o,i)}}):e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t})}function Rn(t,e,n,r,o){2===t.transportStatus&&W((()=>{Nn(t.queuedPayloads.first(),t,e,o,{onSuccess:()=>{t.queuedPayloads.dequeue(),t.currentBackoffTime=An,On(1,t,e,n,r,o)},onFailure:()=>{t.currentBackoffTime=Math.min(6e4,2*t.currentBackoffTime),Rn(t,e,n,r,o)}})}),t.currentBackoffTime)}function Nn(t,e,n,r,{onSuccess:o,onFailure:i}){e.bandwidthMonitor.add(t),n(t,(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,r.notify({type:"success",bandwidth:e.bandwidthMonitor.stats(),payload:t}),o()):(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:"failure",bandwidth:e.bandwidthMonitor.stats(),payload:t}),i())}))}function On(t,e,n,r,o,i){0===t&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(o({message:`Reached max ${r} events size queued for upload: 20MiB`,source:sn,startClocks:S()}),e.queueFullReported=!0);const s=e.queuedPayloads;for(e.queuedPayloads=Ln();s.size()>0;)In(s.dequeue(),e,n,r,o,i)}function Ln(){const t=[];return{bytesCount:0,enqueue(e){return!this.isFull()&&(t.push(e),this.bytesCount+=e.bytesCount,!0)},first:()=>t[0],dequeue(){const e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size:()=>t.length,isFull(){return this.bytesCount>=Cn}}}function Mn(t,e,n){const r=new X,o={transportStatus:0,currentBackoffTime:An,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle(t){return 0===this.ongoingRequestCount||this.ongoingByteCount+t.bytesCount<=81920&&this.ongoingRequestCount<32},add(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}},queuedPayloads:Ln(),queueFullReported:!1};return{observable:r,send:i=>{for(const s of t)In(i,o,((t,n)=>{Te(we.AVOID_FETCH_KEEPALIVE)?zn(s,t,n):Un(s,e,t,n)}),s.trackType,n,r)},sendOnExit:n=>{for(const r of t)Pn(r,e,n)}}}function Pn(t,e,n){if(!!navigator.sendBeacon&&n.bytesCount<e)try{const e=t.build("beacon",n);if(navigator.sendBeacon(e,n.data))return}catch(t){!function(t){Dn||(Dn=!0,H(t))}(t)}zn(t,n)}let Dn=!1;function Un(t,e,n,r){if(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(t){return!1}}()&&n.bytesCount<e){const e=t.build("fetch-keepalive",n);fetch(e,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then(q((t=>null==r?void 0:r({status:t.status,type:t.type})))).catch(q((()=>zn(t,n,r))))}else zn(t,n,r)}function zn(t,e,n){const r=t.build("fetch",e);fetch(r,{method:"POST",body:e.data,mode:"cors"}).then(q((t=>null==n?void 0:n({status:t.status,type:t.type})))).catch(q((()=>null==n?void 0:n({status:0}))))}function $n(){const t=D().DatadogEventBridge;if(t)return{getCapabilities(){var e;return JSON.parse((null===(e=t.getCapabilities)||void 0===e?void 0:e.call(t))||"[]")},getPrivacyLevel(){var e;return null===(e=t.getPrivacyLevel)||void 0===e?void 0:e.call(t)},getAllowedWebViewHosts:()=>JSON.parse(t.getAllowedWebViewHosts()),send(e,n,r){const o=r?{id:r}:void 0;t.send(JSON.stringify({eventType:e,event:n,view:o}))}}}function Vn(t){const e=$n();return!!e&&e.getCapabilities().includes(t)}function Bn(t){var e;void 0===t&&(t=null===(e=D().location)||void 0===e?void 0:e.hostname);const n=$n();return!!n&&n.getAllowedWebViewHosts().some((e=>t===e||t.endsWith(`.${e}`)))}const Fn={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function qn(t){return St(Fn).includes(t)}function jn({encoder:t,request:e,flushController:n,messageBytesLimit:r}){let i={};const c=n.flushObservable.subscribe((n=>function(n){const r=St(i).join("\n");i={};const o=qn(n.reason),s=o?e.sendOnExit:e.send;if(o&&t.isAsync){const e=t.finishSync();e.outputBytesCount&&s(Hn(e));const n=[e.pendingData,r].filter(Boolean).join("\n");n&&s({data:n,bytesCount:R(n)})}else r&&t.write(t.isEmpty?r:`\n${r}`),t.finish((t=>{s(Hn(t))}))}(n)));function u(e,c){const u=Ge(e),l=t.estimateEncodedBytesCount(u);l>=r?o.warn(`Discarded a message whose size was bigger than the maximum allowed size ${r}KB. ${a} ${s}/#technical-limitations`):(function(t){return void 0!==t&&void 0!==i[t]}(c)&&function(e){const r=i[e];delete i[e];const o=t.estimateEncodedBytesCount(r);n.notifyAfterRemoveMessage(o)}(c),function(e,r,o){n.notifyBeforeAddMessage(r),void 0!==o?(i[o]=e,n.notifyAfterAddMessage()):t.write(t.isEmpty?e:`\n${e}`,(t=>{n.notifyAfterAddMessage(t-r)}))}(u,l,c))}return{flushController:n,add:u,upsert:u,stop:c.unsubscribe}}function Hn(t){let e;return e="string"==typeof t.output?t.output:new Blob([t.output],{type:"text/plain"}),{data:e,bytesCount:t.outputBytesCount,encoding:t.encoding}}function Gn({messagesLimit:t,bytesLimit:e,durationLimit:n,pageMayExitObservable:r,sessionExpireObservable:o}){const i=r.subscribe((t=>d(t.reason))),s=o.subscribe((()=>d("session_expire"))),a=new X((()=>()=>{i.unsubscribe(),s.unsubscribe()}));let c,u=0,l=0;function d(t){if(0===l)return;const e=l,n=u;l=0,u=0,f(),a.notify({reason:t,messagesCount:e,bytesCount:n})}function f(){K(c),c=void 0}return{flushObservable:a,get messagesCount(){return l},notifyBeforeAddMessage(t){u+t>=e&&d("bytes_limit"),l+=1,u+=t,void 0===c&&(c=W((()=>{d("duration_limit")}),n))},notifyAfterAddMessage(n=0){u+=n,l>=t?d("messages_limit"):u>=e&&d("bytes_limit")},notifyAfterRemoveMessage(t){u-=t,l-=1,0===l&&f()}}}const Wn="DISCARDED",Kn="SKIPPED";const Jn="log",Yn="configuration",Zn="usage",Xn=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],Qn=["ddog-gov.com"];let tr;function er(){return tr||(tr=new tt(100)),tr}function nr(t,e,n,r,o,i){const s=new X,{stop:a}=function(t,e,n,r,o){const i=[];if(Bn()){const t=$n(),e=o.subscribe((e=>t.send("internal_telemetry",e)));i.push(e.unsubscribe)}else{const s=[t.rumEndpointBuilder];t.replica&&function(t){return t.site===ue}(t)&&s.push(t.replica.rumEndpointBuilder);const a=jn({encoder:r(4),request:Mn(s,t.batchBytesLimit,e),flushController:Gn({messagesLimit:t.batchMessagesLimit,bytesLimit:t.batchBytesLimit,durationLimit:t.flushTimeout,pageMayExitObservable:n,sessionExpireObservable:new X}),messageBytesLimit:t.messageBytesLimit});i.push(a.stop);const c=o.subscribe(a.add);i.push(c.unsubscribe)}return{stop:()=>i.forEach((t=>t()))}}(e,r,o,i,s),{enabled:c,metricsEnabled:l}=function(t,e,n,r,o=1){const i={},s=!Qn.includes(e.site)&&u(e.telemetrySampleRate),a={[Jn]:s,[Yn]:s&&u(e.telemetryConfigurationSampleRate),[Zn]:s&&u(e.telemetryUsageSampleRate),metric:s&&u(o)},c={is_local_file:"file:"===(null===(d=U.location)||void 0===d?void 0:d.protocol),is_worker:z},l=er();var d;return l.subscribe((({rawEvent:o,metricName:s})=>{if(s&&!a.metric||!a[o.type])return;const u=s||o.status||o.type;let l=i[u];if(l||(l=i[u]=new Set),l.size>=e.maxTelemetryEventsPerPage)return;const d=Ge(o);if(l.has(d))return;const p=n.triggerHook(1,{startTime:S().relative});if(p===Wn)return;const m=f(p,t,o,c);r.notify(m),Sn("telemetry",m),l.add(d)})),l.unbuffer(),function(t){V=t}(or),{enabled:s,metricsEnabled:a.metric};function f(t,n,r,o){const i={type:"telemetry",date:S().timeStamp,service:n,version:"6.24.0",source:"browser",_dd:{format_version:2},telemetry:En(r,{runtime_env:o,connectivity:xn(),sdk_setup:"npm"}),ddtags:_n(e).join(","),experimental_features:Array.from(Ee())};return En(i,t)}}(t,e,n,s);return{stop:a,enabled:c,metricsEnabled:l}}function rr(e,n){G(t.debug,e,n),er().notify({rawEvent:{type:Jn,message:e,status:"debug",...n}})}function or(t,e){er().notify({rawEvent:{type:Jn,status:"error",...ar(t),...e}})}function ir(t,e){er().notify({rawEvent:{type:Jn,message:t,status:"debug",...e},metricName:t})}function sr(t){er().notify({rawEvent:{type:Zn,usage:t}})}function ar(t){if(rn(t)){const e=Ce(t);return{error:{kind:e.name,stack:Fe(cr(e))},message:e.message}}return{error:{stack:Xe},message:`Uncaught ${Ge(t)}`}}function cr(t){return t.stack=t.stack.filter((t=>!t.url||Xn.some((e=>t.url.startsWith(e))))),t}function ur(t,e){const n=t.indexOf(e);n>=0&&t.splice(n,1)}function lr(t){return Array.isArray(t)&&t.length>0}const dr=1/0;let fr=null;const pr=new Set;function mr({expireDelay:t,maxEntries:e}){let n=[];fr||(fr=J((()=>{pr.forEach((t=>t()))}),6e4));const r=()=>{const e=w()-t;for(;n.length>0&&n[n.length-1].endTime<e;)n.pop()};return pr.add(r),{add:function(t,r){const o={value:t,startTime:r,endTime:dr,remove:()=>{ur(n,o)},close:t=>{o.endTime=t}};return e&&n.length>=e&&n.pop(),n.unshift(o),o},find:function(t=Infinity,e={returnInactive:!1}){for(const r of n)if(r.startTime<=t){if(e.returnInactive||t<=r.endTime)return r.value;break}},closeActive:function(t){const e=n[0];e&&e.endTime===dr&&e.close(t)},findAll:function(t=Infinity,e=0){const r=E(t,e);return n.filter((e=>e.startTime<=r&&t<=e.endTime)).map((t=>t.value))},reset:function(){n=[]},stop:function(){pr.delete(r),0===pr.size&&fr&&(Y(fr),fr=null)}}}function hr(){return!z&&Boolean(U._DATADOG_SYNTHETICS_INJECTS_RUM||vt("datadog-synthetics-injects-rum"))}function gr(){const t=window._DATADOG_SYNTHETICS_PUBLIC_ID||vt("datadog-synthetics-public-id");return"string"==typeof t?t:void 0}function vr(){const t=window._DATADOG_SYNTHETICS_RESULT_ID||vt("datadog-synthetics-result-id");return"string"==typeof t?t:void 0}function yr(){return Boolean(gr()&&vr())}const br=p,_r=Tt;function wr(t,e,n,r){const o=new X,i=new X,s=ee(t.sessionStoreStrategyType,t,e,n),a=mr({expireDelay:_r});if(s.renewObservable.subscribe((()=>{a.add(c(),w()),o.notify()})),s.expireObservable.subscribe((()=>{i.notify(),a.closeActive(w())})),s.expandOrRenewSession(),a.add(c(),k().relative),Te(we.SHORT_SESSION_INVESTIGATION)){const e=s.getSession();e&&function(t,e){if(!window.cookieStore||!e.created)return;const n=Number(e.created),r=b(),{stop:o}=pn(t,cookieStore,"change",i);function i(t){const i=wt(t.changed,(t=>t.name===_t));if(!i)return;const s=b()-n;if(s>84e4)o();else{const t=Dt(i.value);if(t.id&&t.id!==e.id){o();const n=b()-r;Sr().then((r=>{rr("Session cookie changed",{time:n,session_age:s,old:e,new:t,cookie:r})})).catch(H)}}}}(t,e)}function c(){const n=s.getSession();return n?{id:n.id,trackingType:n[e],isReplayForced:!!n.forcedReplay,anonymousId:n.anonymousId}:(async function(t){const e=t.sessionStoreStrategyType;if(!e)return;let n,r;e.type===Ct?(n=Vt(e.cookieOptions,t),r={cookie:await Sr(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):n=Ht();rr("Unexpected session state",{sessionStoreStrategyType:e.type,session:n,isSyntheticsTest:yr(),createdTimestamp:null==n?void 0:n.created,expireTimestamp:null==n?void 0:n.expire,...r})}(t).catch((()=>{})),{id:"invalid",trackingType:"0",isReplayForced:!1,anonymousId:void 0})}return r.observable.subscribe((()=>{r.isGranted()?s.expandOrRenewSession():s.expire(!1)})),function(t,e){const{stop:n}=mn(t,window,["click","touchstart","keydown","scroll"],e,{capture:!0,passive:!0})}(t,(()=>{r.isGranted()&&s.expandOrRenewSession()})),function(t,e){const n=()=>{"visible"===document.visibilityState&&e()},{stop:r}=pn(t,document,"visibilitychange",n);J(n,br)}(t,(()=>s.expandSession())),function(t,e){const{stop:n}=pn(t,window,"resume",e,{capture:!0})}(t,(()=>s.restartSession())),{findSession:(t,e)=>a.find(t,e),renewObservable:o,expireObservable:i,sessionStateUpdateObservable:s.sessionStateUpdateObservable,expire:s.expire,updateSessionState:s.updateSessionState}}async function Sr(){let t;return t="cookieStore"in window?await window.cookieStore.getAll(_t):document.cookie.split(/\s*;\s*/).filter((t=>t.startsWith(_t))),{count:t.length,domain:bt()||"undefined",...t}}function kr(){let t="",e=0;return{isAsync:!1,get isEmpty(){return!t},write(n,r){const o=R(n);e+=o,t+=n,r&&r(o)},finish(t){t(this.finishSync())},finishSync(){const n={output:t,outputBytesCount:e,rawBytesCount:e,pendingData:""};return t="",e=0,n},estimateEncodedBytesCount:t=>t.length}}function Tr(t,e,n){let r=0,o=!1;return{isLimitReached(){if(0===r&&W((()=>{r=0}),p),r+=1,r<=e||o)return o=!1,!1;if(r===e+1){o=!0;try{n({message:`Reached max number of ${t}s by minute: ${e}`,source:sn,startClocks:S()})}finally{o=!1}}return!0}}}function Er(t,e,n){if(document.readyState===e||"complete"===document.readyState)return n(),{stop:nt};return pn(t,window,"complete"===e?"load":"DOMContentLoaded",n,{once:!0})}function xr(t,e){return new Promise((n=>{Er(t,e,n)}))}let Cr;const Ar=new WeakMap;function Ir(t){return Cr||(Cr=function(t){return new X((e=>{const{stop:n}=je(XMLHttpRequest.prototype,"open",Rr),{stop:r}=je(XMLHttpRequest.prototype,"send",(n=>{!function({target:t,parameters:[e],handlingStack:n},r,o){const i=Ar.get(t);if(!i)return;const s=i;s.state="start",s.startClocks=S(),s.isAborted=!1,s.xhr=t,s.handlingStack=n,s.requestBody=e;let a=!1;const{stop:c}=je(t,"onreadystatechange",(()=>{t.readyState===XMLHttpRequest.DONE&&u()})),u=()=>{if(l(),c(),a)return;a=!0;const e=i;e.state="complete",e.duration=T(s.startClocks.timeStamp,_()),e.status=t.status,"string"==typeof t.response&&(e.responseBody=t.response),o.notify(O(e))},{stop:l}=pn(r,t,"loadend",u);o.notify(s)}(n,t,e)}),{computeHandlingStack:!0}),{stop:o}=je(XMLHttpRequest.prototype,"abort",Nr);return()=>{n(),r(),o()}}))}(t)),Cr}function Rr({target:t,parameters:[e,n]}){Ar.set(t,{state:"open",method:String(e).toUpperCase(),url:ft(String(n))})}function Nr({target:t}){const e=Ar.get(t);e&&(e.isAborted=!0)}let Or;const Lr=[];function Mr({responseBodyAction:t}={}){return t&&Lr.push(t),Or||(Or=new X((t=>{if(!U.fetch)return;const{stop:e}=je(U,"fetch",(e=>function({parameters:t,onPostCall:e,handlingStack:n},r){const[o,i]=t;let s=i&&i.method;void 0===s&&o instanceof Request&&(s=o.method);const a=void 0!==s?String(s).toUpperCase():"GET",c=o instanceof Request?o.url:ft(String(o)),u=S(),l={state:"start",init:i,input:o,method:a,startClocks:u,url:c,handlingStack:n};r.notify(l),t[0]=l.input,t[1]=l.init,e((t=>{(async function(t,e,n){var r,o;const i=n;let s;i.state="resolve";try{s=await e}catch(e){return i.status=0,i.isAborted=(null===(o=null===(r=i.init)||void 0===r?void 0:r.signal)||void 0===o?void 0:o.aborted)||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,i.error=e,void t.notify(i)}i.response=s,i.status=s.status,i.responseType=s.type,i.isAborted=!1;const a=Lr.reduce(((t,e)=>Math.max(t,e(i))),0);if(0!==a){const t=function(t){try{return t.clone()}catch(t){return}}(s);if(t&&t.body)try{const e=await async function(t,e){const n=t.getReader(),r=[];for(;;){const t=await n.read();if(t.done)break;e.collectStreamBody&&r.push(t.value)}return n.cancel().catch(nt),e.collectStreamBody?N(r):void 0}(t.body,{collectStreamBody:2===a});i.responseBody=e&&(new TextDecoder).decode(e)}catch(t){}}t.notify(i)})(r,t,l).catch(H)}))}(e,t)),{computeHandlingStack:!0});return e}))),Or}function Pr(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback(q(t),e);return()=>window.cancelIdleCallback(n)}return function(t){const e=b(),n=W((()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,Dr-(b()-e))})}),0);return()=>K(n)}(t)}const Dr=50;let Ur={};function zr(n){return Q(...n.map((n=>(Ur[n]||(Ur[n]=function(n){return new X((r=>{const o=e[n];return e[n]=(...e)=>{o.apply(console,e);const i=Be("console error");j((()=>{r.notify(function(e,n,r){const o=e.map((t=>function(t){if("string"==typeof t)return Ke(t);if(rn(t))return qe(Ce(t));return Ge(Ke(t),void 0,2)}(t))).join(" ");if(n===t.error){const t=Qe({originalError:e.find(rn),handlingStack:r,startClocks:S(),source:an,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return t.message=o,{api:n,message:o,handlingStack:r,error:t}}return{api:n,message:o,error:void 0,handlingStack:r}}(e,n,i))}))},()=>{e[n]=o}}))}(n)),Ur[n]))))}function $r(t,e,n){const r={...t};for(const[t,{required:i,type:s}]of Object.entries(e))"string"!==s||Vr(r[t])||(r[t]=String(r[t])),i&&Vr(r[t])&&o.warn(`The property ${t} of ${n} is required; context will not be sent to the intake.`);return r}function Vr(t){return null==t||""===t}function Br(t="",{propertiesConfig:e={}}={}){let n={};const r=new X,i={getContext:()=>Tn(n),setContext:s=>{!function(t){const e="object"===re(t);return e||o.error("Unsupported context:",t),e}(s)?i.clearContext():n=Ke($r(s,e,t)),r.notify()},setContextProperty:(o,i)=>{n=Ke($r({...n,[o]:i},e,t)),r.notify()},removeContextProperty:o=>{delete n[o],$r(n,e,t),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}function Fr(t,e,n,r){return q(((...o)=>(r&&sr({feature:r}),t()[e][n](...o))))}const qr="_dd_c",jr=[];function Hr(t,e,n,r){const o=function(t,e){return`${qr}_${t}_${e}`}(n,r);jr.push(pn(t,window,"storage",(({key:t})=>{o===t&&e.setContext(s())}))),e.changeObservable.subscribe((function(){localStorage.setItem(o,JSON.stringify(e.getContext()))}));const i=En(s(),e.getContext());function s(){const t=localStorage.getItem(o);return t?JSON.parse(t):{}}M(i)||e.setContext(i)}function Gr(){return Br("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function Wr(){return Br("global context")}function Kr(){return Br("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}const Jr="userContext",Yr="globalContext",Zr="accountContext",Xr="getContext",Qr="setContext",to="setContextProperty",eo="removeContextProperty",no="clearContext",ro="document",oo="xhr",io="beacon",so="fetch",ao="css",co="js",uo="image",lo="font",fo="media",po="other",mo={FETCH:so,XHR:oo};function ho(){try{return(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch(t){return}}const go="action",vo="error",yo="long_task",bo="view",_o="resource",wo="vital",So="long-task",ko="long-animation-frame",To="initial_load",Eo="route_change",xo="bf_cache",Co="click",Ao="custom",Io="rage_click",Ro="error_click",No="dead_click",Oo="duration",Lo="operation_step";function Mo(t,e,n){function r(n){(function(t){return!e.wasInPageStateDuringPeriod("frozen",t.startClocks.relative,t.duration)})(n)&&t.notify(12,Uo(n))}return{addOperationStepVital:function(e,n,r,o){if(!Te(we.FEATURE_OPERATION_VITAL))return;const{operationKey:i,context:s,description:a}=r||{},c={name:e,type:Lo,operationKey:i,failureReason:o,stepType:n,startClocks:S(),context:Ke(s),description:a};t.notify(12,Uo(c))},addDurationVital:r,startDurationVital:(t,e={})=>Po(n,t,e),stopDurationVital:(t,e={})=>{Do(r,n,t,e)}}}function Po({vitalsByName:t,vitalsByReference:e},n,r={}){const o={name:n,startClocks:S(),...r},i={__dd_vital_reference:!0};return t.set(n,o),e.set(i,o),i}function Do(t,{vitalsByName:e,vitalsByReference:n},r,o={}){const i="string"==typeof r?e.get(r):n.get(r);i&&(t(function(t,e,n,r){var o;return{name:t.name,type:Oo,startClocks:e,duration:T(e.timeStamp,r.timeStamp),context:En(t.context,n.context),description:null!==(o=n.description)&&void 0!==o?o:t.description}}(i,i.startClocks,o,S())),"string"==typeof r?e.delete(r):n.delete(r))}function Uo(t){const{startClocks:e,type:n,name:r,description:o,context:i}=t,s={id:rt(),type:n,name:r,description:o,...n===Oo?{duration:y(t.duration)}:{step_type:t.stepType,operation_key:t.operationKey,failure_reason:t.failureReason}};return{rawRumEvent:{date:e.timeStamp,vital:s,type:wo,context:i},startTime:e.relative,duration:n===Oo?t.duration:void 0,domainContext:{}}}function zo(t,e,n){if(t)for(const r of t){const t=r[e];t&&t(n)}}const $o=new Map;function Vo(t,e){if(100===e)return!0;if(0===e)return!1;const n=$o.get(e);if(n&&t===n.sessionId)return n.decision;let r;return r=window.BigInt?function(t,e){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000");return Number(t*n%r)<=e/100*Number(r)}(BigInt(`0x${t.split("-")[4]}`),e):u(e),$o.set(e,{sessionId:t,decision:r}),r}function Bo(){return Fo(63)}function Fo(t){const e=crypto.getRandomValues(new Uint32Array(2));return 63===t&&(e[e.length-1]>>>=1),{toString(t=10){let n=e[1],r=e[0],o="";do{const e=n%t*4294967296+r;n=Math.floor(n/t),r=Math.floor(e/t),o=(e%t).toString(t)+o}while(n||r);return o}}}function qo(t){return t.toString(16).padStart(16,"0")}function jo(t){0!==t.status||t.isAborted||(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function Ho(t,e,n,r,o,i){const s=n.findTrackedSession();if(!s)return;const a=t.allowedTracingUrls.find((t=>ie([t.match],e.url,!0)));if(!a)return;const c=Vo(s.id,t.traceSampleRate);(c||t.traceContextInjection===ve.ALL)&&(e.traceSampled=c,e.traceId=Fo(64),e.spanId=Bo(),i(function(t,e,n,r,o,i,s,a){const c={};if(o.forEach((r=>{switch(r){case"datadog":Object.assign(c,{"x-datadog-origin":"rum","x-datadog-parent-id":e.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":t.toString()});break;case"tracecontext":Object.assign(c,{traceparent:`00-0000000000000000${qo(t)}-${qo(e)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break;case"b3":Object.assign(c,{b3:`${qo(t)}-${qo(e)}-${n?"1":"0"}`});break;case"b3multi":Object.assign(c,{"X-B3-TraceId":qo(t),"X-B3-SpanId":qo(e),"X-B3-Sampled":n?"1":"0"})}})),a.propagateTraceBaggage){const t={"session.id":r},e=i.getContext().id;"string"==typeof e&&(t["user.id"]=e);const n=s.getContext().id;"string"==typeof n&&(t["account.id"]=n);const o=Object.entries(t).map((([t,e])=>`${t}=${encodeURIComponent(e)}`)).join(",");o&&(c.baggage=o)}return c}(e.traceId,e.spanId,e.traceSampled,s.id,a.propagatorTypes,r,o,t)))}const Go=["tracecontext","datadog"];function Wo(t,e){var n,r,i,s,a,c,u;if(void 0===t.trackFeatureFlagsForEvents||Array.isArray(t.trackFeatureFlagsForEvents)||o.warn("trackFeatureFlagsForEvents should be an array"),!t.applicationId)return void o.error("Application ID is not configured, no RUM data will be collected.");if(!be(t.sessionReplaySampleRate,"Session Replay")||!be(t.traceSampleRate,"Trace"))return;if(void 0!==t.excludedActivityUrls&&!Array.isArray(t.excludedActivityUrls))return void o.error("Excluded Activity Urls should be an array");const l=function(t){if(void 0===t.allowedTracingUrls)return[];if(!Array.isArray(t.allowedTracingUrls))return void o.error("Allowed Tracing URLs should be an array");if(0!==t.allowedTracingUrls.length&&void 0===t.service)return void o.error("Service needs to be configured when tracing is enabled");const e=[];return t.allowedTracingUrls.forEach((t=>{oe(t)?e.push({match:t,propagatorTypes:Go}):!function(t){const e=t;return"object"===re(e)&&oe(e.match)&&Array.isArray(e.propagatorTypes)}(t)?o.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",t):e.push(t)})),e}(t);if(!l)return;const f=_e(t,e),p=function(t){if(!t.allowedGraphQlUrls)return[];if(!Array.isArray(t.allowedGraphQlUrls))return o.warn("allowedGraphQlUrls should be an array"),[];const e=[];return t.allowedGraphQlUrls.forEach((t=>{oe(t)?e.push({match:t,trackPayload:!1,trackResponseErrors:!1}):t&&"object"==typeof t&&"match"in t&&oe(t.match)&&e.push({match:t.match,trackPayload:!!t.trackPayload,trackResponseErrors:!!t.trackResponseErrors})})),e}(t);if(!f)return;const m=null!==(n=t.sessionReplaySampleRate)&&void 0!==n?n:0;return{applicationId:t.applicationId,actionNameAttribute:t.actionNameAttribute,sessionReplaySampleRate:m,startSessionReplayRecordingManually:void 0!==t.startSessionReplayRecordingManually?!!t.startSessionReplayRecordingManually:0===m,traceSampleRate:null!==(r=t.traceSampleRate)&&void 0!==r?r:100,rulePsr:d(t.traceSampleRate)?t.traceSampleRate/100:void 0,allowedTracingUrls:l,excludedActivityUrls:null!==(i=t.excludedActivityUrls)&&void 0!==i?i:[],workerUrl:t.workerUrl,compressIntakeRequests:!!t.compressIntakeRequests,trackUserInteractions:!(null!==(s=t.trackUserInteractions)&&void 0!==s&&!s),trackViewsManually:!!t.trackViewsManually,trackResources:!(null!==(a=t.trackResources)&&void 0!==a&&!a),trackLongTasks:!(null!==(c=t.trackLongTasks)&&void 0!==c&&!c),trackBfcacheViews:!!t.trackBfcacheViews,trackEarlyRequests:!!t.trackEarlyRequests,subdomain:t.subdomain,defaultPrivacyLevel:L(ge,t.defaultPrivacyLevel)?t.defaultPrivacyLevel:ge.MASK,enablePrivacyForActionName:!!t.enablePrivacyForActionName,traceContextInjection:L(ve,t.traceContextInjection)?t.traceContextInjection:ve.SAMPLED,plugins:t.plugins||[],trackFeatureFlagsForEvents:t.trackFeatureFlagsForEvents||[],profilingSampleRate:null!==(u=t.profilingSampleRate)&&void 0!==u?u:0,propagateTraceBaggage:!!t.propagateTraceBaggage,allowedGraphQlUrls:p,...f}}function Ko(t){const e=new Set;return lr(t.allowedTracingUrls)&&t.allowedTracingUrls.forEach((t=>{oe(t)?Go.forEach((t=>e.add(t))):"object"===re(t)&&Array.isArray(t.propagatorTypes)&&t.propagatorTypes.forEach((t=>e.add(t)))})),Array.from(e)}function Jo(t){return lr(t)&&t.some((t=>"object"==typeof t&&"trackResponseErrors"in t&&!!t.trackResponseErrors))}function Yo(t){var e;const n={session_sample_rate:(r=t).sessionSampleRate,telemetry_sample_rate:r.telemetrySampleRate,telemetry_configuration_sample_rate:r.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:r.telemetryUsageSampleRate,use_before_send:!!r.beforeSend,use_partitioned_cross_site_session_cookie:r.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:r.useSecureSessionCookie,use_proxy:!!r.proxy,silent_multiple_init:r.silentMultipleInit,track_session_across_subdomains:r.trackSessionAcrossSubdomains,track_anonymous_user:r.trackAnonymousUser,session_persistence:r.sessionPersistence,allow_fallback_to_local_storage:!!r.allowFallbackToLocalStorage,store_contexts_across_pages:!!r.storeContextsAcrossPages,allow_untrusted_events:!!r.allowUntrustedEvents,tracking_consent:r.trackingConsent,use_allowed_tracking_origins:Array.isArray(r.allowedTrackingOrigins),beta_encode_cookie_options:r.betaEncodeCookieOptions,source:r.source,sdk_version:r.sdkVersion,variant:r.variant};var r,o;return{session_replay_sample_rate:t.sessionReplaySampleRate,start_session_replay_recording_manually:t.startSessionReplayRecordingManually,trace_sample_rate:t.traceSampleRate,trace_context_injection:t.traceContextInjection,propagate_trace_baggage:t.propagateTraceBaggage,action_name_attribute:t.actionNameAttribute,use_allowed_tracing_urls:lr(t.allowedTracingUrls),use_allowed_graph_ql_urls:lr(t.allowedGraphQlUrls),use_track_graph_ql_payload:(o=t.allowedGraphQlUrls,lr(o)&&o.some((t=>"object"==typeof t&&"trackPayload"in t&&!!t.trackPayload))),use_track_graph_ql_response_errors:Jo(t.allowedGraphQlUrls),selected_tracing_propagators:Ko(t),default_privacy_level:t.defaultPrivacyLevel,enable_privacy_for_action_name:t.enablePrivacyForActionName,use_excluded_activity_urls:lr(t.excludedActivityUrls),use_worker_url:!!t.workerUrl,compress_intake_requests:t.compressIntakeRequests,track_views_manually:t.trackViewsManually,track_user_interactions:t.trackUserInteractions,track_resources:t.trackResources,track_long_task:t.trackLongTasks,track_bfcache_views:t.trackBfcacheViews,track_early_requests:t.trackEarlyRequests,plugins:null===(e=t.plugins)||void 0===e?void 0:e.map((t=>{var e;return{name:t.name,...null===(e=t.getConfigurationTelemetry)||void 0===e?void 0:e.call(t)}})),track_feature_flags_for_events:t.trackFeatureFlagsForEvents,remote_configuration_id:t.remoteConfigurationId,profiling_sample_rate:t.profilingSampleRate,use_remote_configuration_proxy:!!t.remoteConfigurationProxy,...n}}const Zo=/[a-zA-Z_$]/,Xo=/[a-zA-Z0-9_$]/,Qo=/[0-9]/,ti=/[a-fA-F0-9]/,ei={0:()=>!1,1:()=>!1,2:t=>Zo.test(t),3:t=>Xo.test(t),4:t=>"."===t,5:t=>"["===t,6:t=>"]"===t,7:t=>Qo.test(t),8:t=>"'\"".includes(t),9:(t,e)=>t===e.quote,10:()=>!0,11:t=>"\\"===t,12:(t,e)=>void 0===e.escapeSequence?`${e.quote}/\\bfnrtu`.includes(t):!!(e.escapeSequence.startsWith("u")&&e.escapeSequence.length<5)&&ti.test(t)},ni={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},ri=[2,3,7,10],oi=[4,5,6];const ii={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function si(t){return t.startsWith("u")?String.fromCharCode(parseInt(t.slice(1),16)):ii[t]}const ai=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function ci(t,e){let n;const r=function(){const t={fetch:{}};return{get:()=>t,increment:(e,n)=>{t[e]||(t[e]={}),t[e][n]||(t[e][n]=0),t[e][n]=t[e][n]+1}}}(),i=await async function(t){let e;try{e=await fetch(function(t){if(t.remoteConfigurationProxy)return t.remoteConfigurationProxy;return`https://sdk-configuration.${me("rum",t)}/v1/${encodeURIComponent(t.remoteConfigurationId)}.json`}(t))}catch(t){e=void 0}if(!e||!e.ok)return{ok:!1,error:new Error("Error fetching the remote configuration.")};const n=await e.json();if(n.rum)return{ok:!0,value:n.rum};return{ok:!1,error:new Error("No remote configuration for RUM.")}}(t);return i.ok?(r.increment("fetch","success"),n=function(t,e,n,r){const i={...t};return ai.forEach((t=>{t in e&&(i[t]=s(e[t]))})),Object.keys(n).forEach((t=>{void 0!==e[t]&&a(n[t],e[t])})),i;function s(t){if(Array.isArray(t))return t.map(s);if(function(t){return"object"==typeof t&&null!==t}(t)){if("rcSerializedType"in t){const e=t.rcSerializedType;switch(e){case"string":return t.value;case"regex":return ui(t.value);case"dynamic":return c(t);default:return void o.error(`Unsupported remote configuration: "rcSerializedType": "${e}"`)}}return P(t,s)}return t}function a(t,e){e.forEach((({key:e,value:n})=>{t.setContextProperty(e,s(n))}))}function c(t){const e=t.strategy;let n;switch(e){case"cookie":n=u(t);break;case"dom":n=l(t);break;case"js":n=f(t);break;default:return void o.error(`Unsupported remote configuration: "strategy": "${e}"`)}const r=t.extractor;return void 0!==r&&"string"==typeof n?function(t,e){const n=ui(t.value);if(void 0===n)return;const r=n.exec(e);if(null===r)return;const[o,i]=r;return i||o}(r,n):n}function u({name:t}){const e=ht(t);return r.increment("cookie",void 0!==e?"success":"missing"),e}function l({selector:t,attribute:e}){let n;try{n=document.querySelector(t)}catch(e){return o.error(`Invalid selector in the remote configuration: '${t}'`),void r.increment("dom","failure")}if(!n)return void r.increment("dom","missing");if(d(n,e))return o.error(`Forbidden element selected by the remote configuration: '${t}'`),void r.increment("dom","failure");const i=void 0!==e?n.getAttribute(e):n.textContent;if(null!==i)return r.increment("dom","success"),i;r.increment("dom","missing")}function d(t,e){return"password"===t.getAttribute("type")&&"value"===e}function f({path:t}){let e=window;const n=function(t){const e=[];let n,r=0;const o={quote:void 0,escapeSequence:void 0};let i="";for(const a of t){if(n=ni[r].find((t=>ei[t](a,o))),!n)return[];if(void 0!==o.escapeSequence&&12!==n){if(s=o.escapeSequence,!("\"'/\\bfnrt".includes(s)||s.startsWith("u")&&5===s.length))return[];i+=si(o.escapeSequence),o.escapeSequence=void 0}ri.includes(n)?i+=a:oi.includes(n)&&""!==i?(e.push(i),i=""):12===n?o.escapeSequence=o.escapeSequence?`${o.escapeSequence}${a}`:a:8===n?o.quote=a:9===n&&(o.quote=void 0),r=n}var s;return ni[r].includes(1)?(""!==i&&e.push(i),e):[]}(t);if(0===n.length)return o.error(`Invalid JSON path in the remote configuration: '${t}'`),void r.increment("js","failure");for(const i of n){if(!(i in e))return void r.increment("js","missing");try{e=e[i]}catch(e){return o.error(`Error accessing: '${t}'`,e),void r.increment("js","failure")}}return r.increment("js","success"),e}}(t,i.value,e,r)):(r.increment("fetch","failure"),o.error(i.error)),ir("remote configuration metrics",{metrics:r.get()}),n}function ui(t){try{return new RegExp(t)}catch(e){o.error(`Invalid regex in the remote configuration: '${t}'`)}}function li({ignoreInitIfSyntheticsWillInjectRum:t=!0,startDeflateWorker:e},n,r,i){const s=function(){const t=[];return{add:e=>{t.push(e)>500&&t.splice(0,1)},remove:e=>{ur(t,e)},drain:e=>{t.forEach((t=>t(e))),t.length=0}}}(),a=Wr();di(a,Yr,s);const c=Kr();di(c,Jr,s);const u=Gr();let l,d,f,p;di(u,Zr,s);const m=n.observable.subscribe(g),h={};function g(){if(!f||!p||!n.isGranted())return;let t;if(m.unsubscribe(),p.trackViewsManually){if(!l)return;s.remove(l.callback),t=l.options}const e=i(p,d,t);s.drain(e)}function v(t,r){const i=Bn();if(i&&(t=function(t){var e,n;return{...t,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:null!==(e=t.defaultPrivacyLevel)&&void 0!==e?e:null===(n=$n())||void 0===n?void 0:n.getPrivacyLevel()}}(t)),f=t,function(t){er().notify({rawEvent:{type:Yn,configuration:t}})}(Yo(t)),p)return void fn("DD_RUM",t);const s=Wo(t,r);s&&(i||s.sessionStoreStrategyType?s.compressIntakeRequests&&!i&&e&&(d=e(s,"Datadog RUM",nt),!d)||(p=s,Mr().subscribe(nt),n.tryToInit(s.trackingConsent),g()):o.warn("No storage available for session. We will not send any data."))}const y=t=>{s.add((e=>e.addDurationVital(t)))};return{init(e,n,r){e?(ke(e.enableExperimentalFeatures),f=e,t&&hr()||(zo(e.plugins,"onInit",{initConfiguration:e,publicApi:n}),e.remoteConfigurationId?ci(e,{user:c,context:a}).then((t=>{t&&v(t,r)})).catch(H):v(e,r))):o.error("Missing configuration")},get initConfiguration(){return f},getInternalContext:nt,stopSession:nt,addTiming(t,e=_()){s.add((n=>n.addTiming(t,e)))},startView(t,e=S()){const n=n=>{n.startView(t,e)};s.add(n),l||(l={options:t,callback:n},g())},setViewName(t){s.add((e=>e.setViewName(t)))},setViewContext(t){s.add((e=>e.setViewContext(t)))},setViewContextProperty(t,e){s.add((n=>n.setViewContextProperty(t,e)))},getViewContext:()=>h,globalContext:a,userContext:c,accountContext:u,addAction(t){s.add((e=>e.addAction(t)))},addError(t){s.add((e=>e.addError(t)))},addFeatureFlagEvaluation(t,e){s.add((n=>n.addFeatureFlagEvaluation(t,e)))},startDurationVital:(t,e)=>Po(r,t,e),stopDurationVital(t,e){Do(y,r,t,e)},addDurationVital:y,addOperationStepVital:(t,e,n,r)=>{s.add((o=>o.addOperationStepVital(Ke(t),e,Ke(n),Ke(r))))}}}function di(t,e,n){t.changeObservable.subscribe((()=>{const r=t.getContext();n.add((t=>t[e].setContext(r)))}))}function fi(){let t;const e=window;if(e.Zone&&(t=$(e,"MutationObserver"),e.MutationObserver&&t===e.MutationObserver)){const n=$(new e.MutationObserver(nt),"originalInstance");t=n&&n.constructor}return t||(t=e.MutationObserver),t}const pi=class{constructor(){this.callbacks={}}notify(t,e){const n=this.callbacks[t];n&&n.forEach((t=>t(e)))}subscribe(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter((t=>e!==t))}}}},mi=Tt;const hi="initial_document",gi=[[ro,t=>hi===t],[oo,t=>"xmlhttprequest"===t],[so,t=>"fetch"===t],[io,t=>"beacon"===t],[ao,(t,e)=>/\.css$/i.test(e)],[co,(t,e)=>/\.js$/i.test(e)],[uo,(t,e)=>["image","img","icon"].includes(t)||null!==/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(e)],[lo,(t,e)=>null!==/\.(woff|eot|woff2|ttf)$/i.exec(e)],[fo,(t,e)=>["audio","video"].includes(t)||null!==/\.(mp3|mp4)$/i.exec(e)]];function vi(t){const e=t.name;if(!function(t){try{return!!pt(t)}catch(t){return!1}}(e))return po;const n=function(t){const e=pt(t).pathname;return"/"===e[0]?e:`/${e}`}(e);for(const[e,r]of gi)if(r(t.initiatorType,n))return e;return po}function yi(...t){for(let e=1;e<t.length;e+=1)if(t[e-1]>t[e])return!1;return!0}function bi(t){return"xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType}function _i(t){if(!Si(t))return;const{startTime:e,fetchStart:n,workerStart:r,redirectStart:o,redirectEnd:i,domainLookupStart:s,domainLookupEnd:a,connectStart:c,secureConnectionStart:u,connectEnd:l,requestStart:d,responseStart:f,responseEnd:p}=t,m={download:ki(e,f,p),first_byte:ki(e,d,f)};return 0<r&&r<n&&(m.worker=ki(e,r,n)),n<l&&(m.connect=ki(e,c,l),c<=u&&u<=l&&(m.ssl=ki(e,u,l))),n<a&&(m.dns=ki(e,s,a)),e<i&&(m.redirect=ki(e,o,i)),m}function wi(t){return t.duration>=0}function Si(t){const e=yi(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd),n=!function(t){return t.redirectEnd>t.startTime}(t)||yi(t.startTime,t.redirectStart,t.redirectEnd,t.fetchStart);return e&&n}function ki(t,e,n){if(t<=e&&e<=n)return{duration:y(T(e,n)),start:y(T(t,e))}}function Ti(t){return""===t.nextHopProtocol?void 0:t.nextHopProtocol}function Ei(t){return""===t.deliveryType?"other":t.deliveryType}function xi(t){if(t.startTime<t.responseStart){const{encodedBodySize:e,decodedBodySize:n,transferSize:r}=t;return{size:n,encoded_body_size:e,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function Ci(t){return t&&(!function(t){return fe.every((e=>t.includes(e)))}(t)||Te(we.TRACK_INTAKE_REQUESTS))}const Ai=/data:(.+)?(;base64)?,/g;function Ii(t,e=24e3){if(t.length<=e||!t.startsWith("data:"))return t;const n=t.substring(0,100).match(Ai);return n?`${n[0]}[...]`:t}function Ri(t,e){const n=function(t,e=!1){if(!t||"string"!=typeof t)return;let n;try{n=JSON.parse(t)}catch(t){return}if(!n||!n.query)return;const r=n.query.trim(),o=function(t){var e;return null===(e=t.match(/^\s*(query|mutation|subscription)\b/i))||void 0===e?void 0:e[1]}(r),i=n.operationName;if(!o)return;let s;n.variables&&(s=JSON.stringify(n.variables));return{operationType:o,operationName:i,variables:s,payload:e?st(r,32768,"..."):void 0}}(t.requestBody,e.trackPayload);if(n){if(e.trackResponseErrors&&t.responseBody){const e=function(t){let e;try{e=JSON.parse(t)}catch(t){return}if(!e||"object"!=typeof e)return;const n=e;if(!lr(n.errors))return;return n.errors.map((t=>{var e;return{message:t.message,path:t.path,locations:t.locations,code:null===(e=t.extensions)||void 0===e?void 0:e.code}}))}(t.responseBody);e&&(n.errors_count=e.length,n.errors=e)}return n}}function Ni(t,e){return e.allowedGraphQlUrls.find((e=>ie([e.match],t)))}let Oi=1;function Li(t,e,n,r,o){const i=function(t,e,n,r){return{clearTracingIfNeeded:jo,traceFetch:o=>Ho(t,o,e,n,r,(t=>{var e;if(o.input instanceof Request&&!(null===(e=o.init)||void 0===e?void 0:e.headers))o.input=new Request(o.input),Object.keys(t).forEach((e=>{o.input.headers.append(e,t[e])}));else{o.init=O(o.init);const e=[];o.init.headers instanceof Headers?o.init.headers.forEach(((t,n)=>{e.push([n,t])})):Array.isArray(o.init.headers)?o.init.headers.forEach((t=>{e.push(t)})):o.init.headers&&Object.keys(o.init.headers).forEach((t=>{e.push([t,o.init.headers[t]])})),o.init.headers=e.concat(kt(t))}})),traceXhr:(o,i)=>Ho(t,o,e,n,r,(t=>{Object.keys(t).forEach((e=>{i.setRequestHeader(e,t[e])}))}))}}(e,n,r,o);!function(t,e,n){const r=Ir(e).subscribe((e=>{const r=e;if(Ci(r.url))switch(r.state){case"start":n.traceXhr(r,r.xhr),r.requestIndex=Mi(),t.notify(7,{requestIndex:r.requestIndex,url:r.url});break;case"complete":n.clearTracingIfNeeded(r),t.notify(8,{duration:r.duration,method:r.method,requestIndex:r.requestIndex,spanId:r.spanId,startClocks:r.startClocks,status:r.status,traceId:r.traceId,traceSampled:r.traceSampled,type:mo.XHR,url:r.url,xhr:r.xhr,isAborted:r.isAborted,handlingStack:r.handlingStack,requestBody:r.requestBody,responseBody:r.responseBody})}}))}(t,e,i),function(t,e,n){const r=Mr({responseBodyAction:t=>{var n;return(null===(n=Ni(t.url,e))||void 0===n?void 0:n.trackResponseErrors)?2:1}}).subscribe((e=>{var r;const o=e;if(Ci(o.url))switch(o.state){case"start":n.traceFetch(o),o.requestIndex=Mi(),t.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"resolve":n.clearTracingIfNeeded(o),t.notify(8,{duration:T(o.startClocks.timeStamp,_()),method:o.method,requestIndex:o.requestIndex,responseType:o.responseType,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:mo.FETCH,url:o.url,response:o.response,init:o.init,input:o.input,isAborted:o.isAborted,handlingStack:o.handlingStack,requestBody:null===(r=o.init)||void 0===r?void 0:r.body,responseBody:o.responseBody})}}))}(t,e,i)}function Mi(){const t=Oi;return Oi+=1,t}function Pi(t){return d(t)&&t<0?void 0:t}function Di({lifeCycle:t,isChildEvent:e,onChange:n=nt}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=t.subscribe(13,(t=>{var o;if("view"!==t.type&&"vital"!==t.type&&e(t))switch(t.type){case vo:r.errorCount+=1,n();break;case go:r.actionCount+=1,t.action.frustration&&(r.frustrationCount+=t.action.frustration.type.length),n();break;case yo:r.longTaskCount+=1,n();break;case _o:(null===(o=t._dd)||void 0===o?void 0:o.discarded)||(r.resourceCount+=1,n())}}));return{stop:()=>{o.unsubscribe()},eventCounts:r}}function Ui(t,e){const n=b();let r=!1;const{stop:o}=mn(t,window,["click","mousedown","keydown","touchstart","pointerdown"],(e=>{if(!e.cancelable)return;const n={entryType:"first-input",processingStart:w(),processingEnd:w(),startTime:e.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};"pointerdown"===e.type?function(t,e){mn(t,window,["pointerup","pointercancel"],(t=>{"pointerup"===t.type&&i(e)}),{once:!0})}(t,n):i(n)}),{passive:!0,capture:!0});return{stop:o};function i(t){if(!r){r=!0,o();const i=t.processingStart-t.startTime;i>=0&&i<b()-n&&e(t)}}}var zi;function $i(t,e){return new X((n=>{if(!window.PerformanceObserver)return;const r=t=>{const e=function(t){return t.filter((t=>!function(t){return!(t.entryType!==zi.RESOURCE||Ci(t.name)&&wi(t))}(t)))}(t);e.length>0&&n.notify(e)};let o,i=!0;const s=new PerformanceObserver(q((t=>{i?o=W((()=>r(t.getEntries()))):r(t.getEntries())})));try{s.observe(e)}catch(t){if([zi.RESOURCE,zi.NAVIGATION,zi.LONG_TASK,zi.PAINT].includes(e.type)){e.buffered&&(o=W((()=>r(performance.getEntriesByType(e.type)))));try{s.observe({entryTypes:[e.type]})}catch(t){return}}}let a;return i=!1,function(t){!Vi&&void 0!==window.performance&&"getEntries"in performance&&"addEventListener"in performance&&(Vi=pn(t,performance,"resourcetimingbufferfull",(()=>{performance.clearResourceTimings()})))}(t),Bi(zi.FIRST_INPUT)||e.type!==zi.FIRST_INPUT||({stop:a}=Ui(t,(t=>{r([t])}))),()=>{s.disconnect(),a&&a(),K(o)}}))}let Vi;function Bi(t){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(t)}function Fi(t){return t.nodeType===Node.TEXT_NODE}function qi(t){return t.nodeType===Node.ELEMENT_NODE}function ji(t){return qi(t)&&Boolean(t.shadowRoot)}function Hi(t){const e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&qi(e.host)}function Gi(t,e){let n=t.firstChild;for(;n;)e(n),n=n.nextSibling;ji(t)&&e(t.shadowRoot)}function Wi(t){return Hi(t)?t.host:t.parentNode}!function(t){t.EVENT="event",t.FIRST_INPUT="first-input",t.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",t.LAYOUT_SHIFT="layout-shift",t.LONG_TASK="longtask",t.LONG_ANIMATION_FRAME="long-animation-frame",t.NAVIGATION="navigation",t.PAINT="paint",t.RESOURCE="resource",t.VISIBILITY_STATE="visibility-state"}(zi||(zi={}));const Ki=100,Ji="data-dd-excluded-activity-mutations";function Yi(t,e,n,r,o,i){const s=function(t,e,n,r){return new X((o=>{const i=[];let s,a=0;return i.push(e.subscribe((t=>{t.every(Xi)||c()})),n.subscribe(c),$i(r,{type:zi.RESOURCE}).subscribe((t=>{t.some((t=>!Zi(r,t.name)))&&c()})),t.subscribe(7,(t=>{Zi(r,t.url)||(void 0===s&&(s=t.requestIndex),a+=1,c())})),t.subscribe(8,(t=>{Zi(r,t.url)||void 0===s||t.requestIndex<s||(a-=1,c())}))),()=>{i.forEach((t=>t.unsubscribe()))};function c(){o.notify({isBusy:a>0})}}))}(t,e,n,r);return function(t,e,n){let r,o=!1;const i=W(q((()=>u({hadActivity:!1}))),100),s=void 0!==n?W(q((()=>u({hadActivity:!0,end:_()}))),n):void 0,a=t.subscribe((({isBusy:t})=>{K(i),K(r);const e=_();t||(r=W(q((()=>u({hadActivity:!0,end:e}))),100))})),c=()=>{o=!0,K(i),K(r),K(s),a.unsubscribe()};function u(t){o||(c(),e(t))}return{stop:c}}(s,o,i)}function Zi(t,e){return ie(t.excludedActivityUrls,e)}function Xi(t){const e="characterData"===t.type?t.target.parentElement:t.target;return Boolean(e&&qi(e)&&e.matches(`[${Ji}], [${Ji}] *`))}const Qi="data-dd-action-name",ts=[Qi,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],es=[is,function(t){if(t.id&&!os(t.id))return`#${CSS.escape(t.id)}`}],ns=[is,function(t){if("BODY"===t.tagName)return;const e=t.classList;for(let n=0;n<e.length;n+=1){const r=e[n];if(!os(r))return`${CSS.escape(t.tagName)}.${CSS.escape(r)}`}},function(t){return CSS.escape(t.tagName)}];function rs(t,e){if(!t.isConnected)return;let n,r=t;for(;r&&"HTML"!==r.nodeName;){const t=as(r,es,cs,e,n);if(t)return t;n=as(r,ns,us,e,n)||ls(ss(r),n),r=r.parentElement}return n}function os(t){return/[0-9]/.test(t)}function is(t,e){if(e){const t=n(e);if(t)return t}for(const t of ts){const e=n(t);if(e)return e}function n(e){if(t.hasAttribute(e))return`${CSS.escape(t.tagName)}[${e}="${CSS.escape(t.getAttribute(e))}"]`}}function ss(t){let e=t.parentElement.firstElementChild,n=1;for(;e&&e!==t;)e.tagName===t.tagName&&(n+=1),e=e.nextElementSibling;return`${CSS.escape(t.tagName)}:nth-of-type(${n})`}function as(t,e,n,r,o){for(const i of e){const e=i(t,r);if(e&&n(t,e,o))return ls(e,o)}}function cs(t,e,n){return 1===t.ownerDocument.querySelectorAll(ls(e,n)).length}function us(t,e,n){let r;if(void 0===n)r=t=>t.matches(e);else{const t=ls(`${e}:scope`,n);r=e=>null!==e.querySelector(t)}let o=t.parentElement.firstElementChild;for(;o;){if(o!==t&&r(o))return!1;o=o.nextElementSibling}return!0}function ls(t,e){return e?`${t}>${e}`:t}const ds={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:ge.ALLOW,MASK:ge.MASK,MASK_USER_INPUT:ge.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:ge.MASK_UNLESS_ALLOWLISTED},fs="data-dd-privacy",ps="hidden",ms="***",hs="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",gs={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function vs(t){return`[${fs}="${t}"], .dd-privacy-${t}`}function ys(t,e,n){if(n&&n.has(t))return n.get(t);const r=Wi(t),o=r?ys(r,e,n):e,i=bs(_s(t),o);return n&&n.set(t,i),i}function bs(t,e){switch(e){case ds.HIDDEN:case ds.IGNORE:return e}switch(t){case ds.ALLOW:case ds.MASK:case ds.MASK_USER_INPUT:case ds.MASK_UNLESS_ALLOWLISTED:case ds.HIDDEN:case ds.IGNORE:return t;default:return e}}function _s(t){if(qi(t)){if("BASE"===t.tagName)return ds.ALLOW;if("INPUT"===t.tagName){const e=t;if("password"===e.type||"email"===e.type||"tel"===e.type)return ds.MASK;if("hidden"===e.type)return ds.MASK;const n=e.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return ds.MASK}return t.matches(vs(ds.HIDDEN))?ds.HIDDEN:t.matches(vs(ds.MASK))?ds.MASK:t.matches(vs(ds.MASK_UNLESS_ALLOWLISTED))?ds.MASK_UNLESS_ALLOWLISTED:t.matches(vs(ds.MASK_USER_INPUT))?ds.MASK_USER_INPUT:t.matches(vs(ds.ALLOW))?ds.ALLOW:function(t){if("SCRIPT"===t.nodeName)return!0;if("LINK"===t.nodeName){const t=e("rel");return/preload|prefetch/i.test(t)&&"script"===e("as")||"shortcut icon"===t||"icon"===t}if("META"===t.nodeName){const n=e("name"),r=e("rel"),o=e("property");return/^msapplication-tile(image|color)$/.test(n)||"application-name"===n||"icon"===r||"apple-touch-icon"===r||"shortcut icon"===r||"keywords"===n||"description"===n||/^(og|twitter|fb):/.test(o)||/^(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(o)||/^product:/.test(o)||"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 e(e){return(t.getAttribute(e)||"").toLowerCase()}return!1}(t)?ds.IGNORE:void 0}}function ws(t,e){switch(e){case ds.MASK:case ds.HIDDEN:case ds.IGNORE:return!0;case ds.MASK_UNLESS_ALLOWLISTED:return Fi(t)?!!Ss(t.parentNode)||!Es(t.textContent||""):Ss(t);case ds.MASK_USER_INPUT:return Fi(t)?Ss(t.parentNode):Ss(t);default:return!1}}function Ss(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;const e=t;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!gs[e.tagName]}const ks=t=>t.replace(/\S/g,"x");function Ts(t,e){var n;const r=null===(n=t.parentElement)||void 0===n?void 0:n.tagName;let o=t.textContent||"";if("HEAD"===r&&!o.trim())return;const i=e;if("SCRIPT"===r)o=ms;else if(i===ds.HIDDEN)o=ms;else if(ws(t,i))if("DATALIST"===r||"SELECT"===r||"OPTGROUP"===r){if(!o.trim())return}else o="OPTION"===r?ms:i===ds.MASK_UNLESS_ALLOWLISTED?function(t,e){if(Es(t))return t;return e||ks(t)}(o):ks(o);return o}function Es(t){var e;return!t||!t.trim()||((null===(e=window.$DD_ALLOW)||void 0===e?void 0:e.has(t.toLocaleLowerCase()))||!1)}const xs=f;function Cs(t,e){const n=[];let r,o=0;function i(t){t.stopObservable.subscribe(s),n.push(t),K(r),r=W(a,xs)}function s(){1===o&&n.every((t=>t.isStopped()))&&(o=2,e(n))}function a(){K(r),0===o&&(o=1,s())}return i(t),{tryAppend:t=>{return 0===o&&(n.length>0&&(e=n[n.length-1].event,r=t.event,!(e.target===r.target&&(s=e,c=r,Math.sqrt(Math.pow(s.clientX-c.clientX,2)+Math.pow(s.clientY-c.clientY,2))<=100)&&e.timeStamp-r.timeStamp<=xs))?(a(),!1):(i(t),!0));var e,r,s,c},stop:()=>{a()}}}function As(t,e){const n=t.closest(`[${e}]`);if(!n)return;return Ms(Ls(n.getAttribute(e).trim()))}const Is=[(t,e)=>{if("labels"in t&&t.labels&&t.labels.length>0)return Ds(t.labels[0],e)},t=>{if("INPUT"===t.nodeName){const e=t,n=e.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return{name:e.value,nameSource:"text_content"}}},(t,e)=>{if("BUTTON"===t.nodeName||"LABEL"===t.nodeName||"button"===t.getAttribute("role"))return Ds(t,e)},t=>Ps(t,"aria-label"),(t,e)=>{const n=t.getAttribute("aria-labelledby");if(n)return{name:n.split(/\s+/).map((e=>function(t,e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}(t,e))).filter((t=>Boolean(t))).map((t=>Us(t,e))).join(" "),nameSource:"text_content"}},t=>Ps(t,"alt"),t=>Ps(t,"name"),t=>Ps(t,"title"),t=>Ps(t,"placeholder"),(t,e)=>{if("options"in t&&t.options.length>0)return Ds(t.options[0],e)}],Rs=[(t,e)=>Ds(t,e)],Ns=10;function Os(t,e,n){let r=t,o=0;for(;o<=Ns&&r&&"BODY"!==r.nodeName&&"HTML"!==r.nodeName&&"HEAD"!==r.nodeName;){for(const t of e){const e=t(r,n);if(e){const{name:t,nameSource:n}=e,r=t&&t.trim();if(r)return{name:Ms(Ls(r)),nameSource:n}}}if("FORM"===r.nodeName)break;r=r.parentElement,o+=1}}function Ls(t){return t.replace(/\s+/g," ")}function Ms(t){return t.length>100?`${st(t,100)} [...]`:t}function Ps(t,e){return{name:t.getAttribute(e)||"",nameSource:"standard_attribute"}}function Ds(t,e){return{name:Us(t,e)||"",nameSource:"text_content"}}function Us(t,e){if(t.isContentEditable)return;const{enablePrivacyForActionName:n,actionNameAttribute:r,defaultPrivacyLevel:o}=e;if(Te(we.USE_TREE_WALKER_FOR_ACTION_NAME))return function(t,e,n,r){const o=new Map,i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,a);let s="";for(;i.nextNode();){const t=i.currentNode;qi(t)?("BR"===t.nodeName||"P"===t.nodeName||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(t).display))&&(s+=" "):s+=t.textContent||""}return s.replace(/\s+/g," ").trim();function a(t){const i=ys(t,r,o);if(n&&i&&ws(t,i))return NodeFilter.FILTER_REJECT;if(qi(t)){if(t.hasAttribute(Qi)||e&&t.hasAttribute(e))return NodeFilter.FILTER_REJECT;const n=getComputedStyle(t);if("visible"!==n.visibility||"none"===n.display||n.contentVisibility&&"visible"!==n.contentVisibility)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}(t,r,n,o);if("innerText"in t){let e=t.innerText;const o=n=>{const r=t.querySelectorAll(n);for(let t=0;t<r.length;t+=1){const n=r[t];if("innerText"in n){const t=n.innerText;t&&t.trim().length>0&&(e=e.replace(t,""))}}};return o(`[${Qi}]`),r&&o(`[${r}]`),n&&o(`${vs(ds.HIDDEN)}, ${vs(ds.MASK)}`),e}return t.textContent}function zs(){const t=window.getSelection();return!t||t.isCollapsed}function $s(t){return t.target instanceof Element&&!1!==t.isPrimary}function Vs(t,e){if(function(t){if(t.some((t=>t.getUserActivity().selection||t.getUserActivity().scroll)))return!1;for(let e=0;e<t.length-2;e+=1)if(t[e+3-1].event.timeStamp-t[e].event.timeStamp<=f)return!0;return!1}(t))return e.addFrustration(Io),t.some(Fs)&&e.addFrustration(No),e.hasError&&e.addFrustration(Ro),{isRage:!0};const n=t.some((t=>t.getUserActivity().selection));return t.forEach((t=>{t.hasError&&t.addFrustration(Ro),Fs(t)&&!n&&t.addFrustration(No)})),{isRage:!1}}const Bs='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function Fs(t){if(t.hasPageActivity||t.getUserActivity().input||t.getUserActivity().scroll)return!1;let e=t.event.target;return"LABEL"===e.tagName&&e.hasAttribute("for")&&(e=document.getElementById(e.getAttribute("for"))),!e||!e.matches(Bs)}const qs=1e4,js=new Map;function Hs(t,e){js.set(t,e),js.forEach(((t,e)=>{T(e,w())>1e4&&js.delete(e)}))}function Gs(t,e,n,r){const o=mr({expireDelay:3e5}),i=new X;let s;t.subscribe(10,(()=>{o.reset()})),t.subscribe(5,u),t.subscribe(11,(t=>{t.reason===Fn.UNLOADING&&u()}));const{stop:a}=function(t,{onPointerDown:e,onPointerUp:n}){let r,o,i={selection:!1,input:!1,scroll:!1};const s=[pn(t,window,"pointerdown",(t=>{$s(t)&&(r=zs(),i={selection:!1,input:!1,scroll:!1},o=e(t))}),{capture:!0}),pn(t,window,"selectionchange",(()=>{r&&zs()||(i.selection=!0)}),{capture:!0}),pn(t,window,"scroll",(()=>{i.scroll=!0}),{capture:!0,passive:!0}),pn(t,window,"pointerup",(t=>{if($s(t)&&o){const e=i;n(o,t,(()=>e)),o=void 0}}),{capture:!0}),pn(t,window,"input",(()=>{i.input=!0}),{capture:!0})];return{stop:()=>{s.forEach((t=>t.stop()))}}}(r,{onPointerDown:o=>function(t,e,n,r,o){let i;i=t.enablePrivacyForActionName?ys(r.target,t.defaultPrivacyLevel):ds.ALLOW;if(i===ds.HIDDEN)return;const s=function(t,e,n){const r=t.target.getBoundingClientRect(),o=rs(t.target,n.actionNameAttribute);o&&Hs(t.timeStamp,o);const{name:i,nameSource:s}=function(t,e,n=ds.ALLOW){const{actionNameAttribute:r}=e,o=As(t,Qi)||r&&As(t,r);return o?{name:o,nameSource:"custom_attribute"}:n===ds.MASK?{name:"Masked Element",nameSource:"mask_placeholder"}:Os(t,Is,e)||Os(t,Rs,e)||{name:"",nameSource:"blank"}}(t.target,n,e);return{type:Co,target:{width:Math.round(r.width),height:Math.round(r.height),selector:o},position:{x:Math.round(t.clientX-r.left),y:Math.round(t.clientY-r.top)},name:i,nameSource:s}}(r,i,t);let a=!1;return Yi(e,n,o,t,(t=>{a=t.hadActivity}),Ki),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}(r,t,e,o,n),onPointerUp:({clickActionBase:s,hadActivityOnPointerDown:a},u,l)=>{!function(t,e,n,r,o,i,s,a,c,u,l){var d;const f=Ws(e,o,u,a,c);s(f);const p=null===(d=null==a?void 0:a.target)||void 0===d?void 0:d.selector;p&&Hs(c.timeStamp,p);const{stop:m}=Yi(e,n,r,t,(t=>{t.hadActivity&&t.end<f.startClocks.timeStamp?f.discard():t.hadActivity?f.stop(t.end):l()?f.stop(f.startClocks.timeStamp):f.stop()}),qs),h=e.subscribe(5,(({endClocks:t})=>{f.stop(t.timeStamp)})),g=i.subscribe((()=>{f.stop()}));f.stopObservable.subscribe((()=>{h.unsubscribe(),m(),g.unsubscribe()}))}(r,t,e,n,o,i,c,s,u,l,a)}});return{stop:()=>{u(),i.notify(),a()},actionContexts:{findActionId:t=>o.findAll(t)}};function c(t){if(!s||!s.tryAppend(t)){const e=t.clone();s=Cs(t,(t=>{!function(t,e){const{isRage:n}=Vs(t,e);n?(t.forEach((t=>t.discard())),e.stop(_()),e.validate(t.map((t=>t.event)))):(e.discard(),t.forEach((t=>t.validate())))}(t,e)}))}}function u(){s&&s.stop()}}function Ws(t,e,n,r,o){const i=rt(),s=S(),a=e.add(i,s.relative),c=Di({lifeCycle:t,isChildEvent:t=>void 0!==t.action&&(Array.isArray(t.action.id)?t.action.id.includes(i):t.action.id===i)});let u,l=0;const d=[],f=new X;function p(t){0===l&&(u=t,l=1,u?a.close(x(u)):a.remove(),c.stop(),f.notify())}return{event:o,stop:p,stopObservable:f,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return void 0!==u},getUserActivity:n,addFrustration:t=>{d.push(t)},startClocks:s,isStopped:()=>1===l||2===l,clone:()=>Ws(t,e,n,r,o),validate:e=>{if(p(),1!==l)return;const{resourceCount:n,errorCount:a,longTaskCount:f}=c.eventCounts,m={duration:u&&T(s.timeStamp,u),startClocks:s,id:i,frustrationTypes:d,counts:{resourceCount:n,errorCount:a,longTaskCount:f},events:null!=e?e:[o],event:o,...r};t.notify(0,m),l=2},discard:()=>{p(),l=2}}}function Ks(t){const e=Js(t)?{action:{id:t.id,loading_time:Pi(y(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,name_source:t.nameSource}}}:{context:t.context},n=En({action:{id:rt(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:go},e),r=Js(t)?t.duration:void 0,o=Js(t)?{events:t.events}:{handlingStack:t.handlingStack};return{rawRumEvent:n,duration:r,startTime:t.startClocks.relative,domainContext:o}}function Js(t){return t.type!==Ao}function Ys(e,n,r){const o=new X;return r.subscribe((t=>{0===t.type&&o.notify(t.error)})),function(e){const n=zr([t.error]).subscribe((t=>e.notify(t.error)))}(o),function(t,e){const n=vn(t,[gn,hn]).subscribe((t=>e.notify(t)))}(n,o),o.subscribe((t=>e.notify(14,{error:t}))),function(t){return t.subscribe(14,(({error:e})=>{t.notify(12,function(t){const e={date:t.startClocks.timeStamp,error:{id:rt(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,component_stack:t.componentStack,type:t.type,handling:t.handling,causes:t.causes,source_type:"browser",fingerprint:t.fingerprint,csp:t.csp},type:vo,context:t.context},n={error:t.originalError,handlingStack:t.handlingStack};return{rawRumEvent:e,startTime:t.startClocks.relative,domainContext:n}}(e))})),{addError:({error:e,handlingStack:n,componentStack:r,startClocks:o,context:i})=>{const s=Qe({originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:"Provided",source:cn,handling:"handled"});s.context=En(s.context,i),t.notify(14,{error:s})}}}(e)}const Zs=new WeakSet;function Xs(t){if(!performance||!("getEntriesByName"in performance))return;const e=performance.getEntriesByName(t.url,"resource");if(!e.length||!("toJSON"in e[0]))return;const n=e.filter((t=>!Zs.has(t))).filter((t=>wi(t)&&Si(t))).filter((e=>function(t,e,n){const r=1;return t.startTime>=e-r&&Qs(t)<=E(n,r)}(e,t.startClocks.relative,Qs({startTime:t.startClocks.relative,duration:t.duration}))));return 1===n.length?(Zs.add(n[0]),n[0].toJSON()):void 0}function Qs(t){return E(t.startTime,t.duration)}function ta(t){const e=function(t){const e=t.querySelector("meta[name=dd-trace-id]"),n=t.querySelector("meta[name=dd-trace-time]");return ea(e&&e.content,n&&n.content)}(t)||function(t){const e=function(t){for(let e=0;e<t.childNodes.length;e+=1){const n=na(t.childNodes[e]);if(n)return n}if(t.body)for(let e=t.body.childNodes.length-1;e>=0;e-=1){const n=t.body.childNodes[e],r=na(n);if(r)return r;if(!Fi(n))break}}(t);if(!e)return;return ea(it(e,"trace-id"),it(e,"trace-time"))}(t);if(e&&!(e.traceTime<=b()-12e4))return e.traceId}function ea(t,e){const n=e&&Number(e);if(t&&n)return{traceId:t,traceTime:n}}function na(t){if(t&&function(t){return t.nodeType===Node.COMMENT_NODE}(t)){const e=/^\s*DATADOG;(.*?)\s*$/.exec(t.data);if(e)return e[1]}}function ra(){if(Bi(zi.NAVIGATION)){const t=performance.getEntriesByType(zi.NAVIGATION)[0];if(t)return t}const t=function(){const t={},e=performance.timing;for(const n in e)if(d(e[n])){const r=n,o=e[r];t[r]=0===o?0:x(o)}return t}(),e={entryType:zi.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:t.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...e,toJSON:void 0}),...t};return e}function oa(t,e,n=ra){Er(t,"interactive",(()=>{const t=n(),r=Object.assign(t.toJSON(),{entryType:zi.RESOURCE,initiatorType:hi,duration:t.responseEnd,traceId:ta(document),toJSON:()=>({...r,toJSON:void 0})});e(r)}))}function ia(t,e,n,r=function(){const t=[];function e(e){let r;if(e.didTimeout){const t=performance.now();r=()=>30-(performance.now()-t)}else r=e.timeRemaining.bind(e);for(;r()>0&&t.length;)t.shift()();t.length&&n()}function n(){Pr(e,{timeout:1e3})}return{push(e){1===t.push(e)&&n()},stop(){t.length=0}}}(),o=oa){let i;const s=e.trackEarlyRequests;s?i=function(t){const e=new Set,n=t.subscribe(8,(t=>{e.add(t),e.size>1e3&&(rr("Too many requests"),e.delete(e.values().next().value))}));return{getMatchingRequest(t){let n,r=1/0;for(const o of e){const e=t.startTime-o.startClocks.relative;0<=e&&e<r&&o.url===t.name&&(r=Math.abs(e),n=o)}return n&&e.delete(n),n},stop(){n.unsubscribe()}}}(t):t.subscribe(8,(t=>{c((()=>function(t,e,n){const r=Xs(t);return aa(r,t,n,e)}(t,e,n)))}));const a=$i(e,{type:zi.RESOURCE,buffered:!0}).subscribe((t=>{for(const r of t)!s&&bi(r)||c((()=>sa(r,e,n,i)))}));function c(e){r.push((()=>{const n=e();n&&t.notify(12,n)}))}return o(e,(t=>{c((()=>sa(t,e,n,i)))})),{stop:()=>{r.stop(),a.unsubscribe()}}}function sa(t,e,n,r){return aa(t,bi(t)&&r?r.getMatchingRequest(t):void 0,n,e)}function aa(t,e,n,r){if(!t&&!e)return;const o=e?function(t,e){const n=t.traceSampled&&t.traceId&&t.spanId;if(!n)return;return{_dd:{span_id:t.spanId.toString(),trace_id:t.traceId.toString(),rule_psr:e.rulePsr}}}(e,r):function(t,e){const n=t.traceId;if(!n)return;return{_dd:{trace_id:t.traceId,span_id:Bo().toString(),rule_psr:e.rulePsr}}}(t,r);if(!r.trackResources&&!o)return;const i=t?h(t.startTime):e.startClocks,s=t?function(t){const{duration:e,startTime:n,responseEnd:r}=t;return 0===e&&n<r?T(n,r):e}(t):function(t,e,n){return t.wasInPageStateDuringPeriod("frozen",e.relative,n)?void 0:n}(n,i,e.duration),a=e&&function(t,e){const n=Ni(t.url,e);if(!n)return;return Ri(t,n)}(e,r),c=En({date:i.timeStamp,resource:{id:rt(),duration:y(s),type:e?e.type===mo.XHR?oo:so:vi(t),method:e?e.method:void 0,status_code:e?e.status:(u=t.responseStatus,0===u?void 0:u),url:e?Ii(e.url):t.name,protocol:t&&Ti(t),delivery_type:t&&Ei(t),graphql:a},type:_o,_dd:{discarded:!r.trackResources}},o,t&&function(t){const{renderBlockingStatus:e}=t;return{resource:{render_blocking_status:e,...xi(t),..._i(t)}}}(t));var u;return{startTime:i.relative,duration:s,rawRumEvent:c,domainContext:ca(t,e)}}function ca(t,e){if(e){const n={performanceEntry:t,isAborted:e.isAborted,handlingStack:e.handlingStack};return e.type===mo.XHR?{xhr:e.xhr,...n}:{requestInput:e.input,requestInit:e.init,response:e.response,error:e.error,...n}}return{performanceEntry:t}}function ua(t,e,n=ra){return function(t,e){let n;const{stop:r}=Er(t,"complete",(()=>{n=W((()=>e()))}));return{stop:()=>{r(),K(n)}}}(t,(()=>{const t=n();(function(t){return t.loadEventEnd<=0})(t)||e(function(t){return{domComplete:t.domComplete,domContentLoaded:t.domContentLoadedEventEnd,domInteractive:t.domInteractive,loadEvent:t.loadEventEnd,firstByte:t.responseStart>=0&&t.responseStart<=w()?t.responseStart:void 0}}(t))}))}function la(t,e,n=window){if("hidden"===document.visibilityState)return{timeStamp:0,stop:nt};if(Bi(zi.VISIBILITY_STATE)){const t=performance.getEntriesByType(zi.VISIBILITY_STATE).filter((t=>"hidden"===t.name)).find((t=>t.startTime>=e.relative));if(t)return{timeStamp:t.startTime,stop:nt}}let r=1/0;const{stop:o}=mn(t,n,["pagehide","visibilitychange"],(t=>{"pagehide"!==t.type&&"hidden"!==document.visibilityState||(r=t.timeStamp,o())}),{capture:!0});return{get timeStamp(){return r},stop:o}}function da(t,e,n,r){const o={},{stop:i}=ua(t,(t=>{n(t.loadEvent),o.navigationTimings=t,r()})),s=la(t,e),{stop:a}=function(t,e,n){return{stop:$i(t,{type:zi.PAINT,buffered:!0}).subscribe((t=>{const r=t.find((t=>"first-contentful-paint"===t.name&&t.startTime<e.timeStamp&&t.startTime<6e5));r&&n(r.startTime)})).unsubscribe}}(t,s,(t=>{o.firstContentfulPaint=t,r()})),{stop:c}=function(t,e,n,r){let o=1/0;const{stop:i}=mn(t,n,["pointerdown","keydown"],(t=>{o=t.timeStamp}),{capture:!0,once:!0});let s=0;const a=$i(t,{type:zi.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe((n=>{const i=wt(n,(t=>t.entryType===zi.LARGEST_CONTENTFUL_PAINT&&t.startTime<o&&t.startTime<e.timeStamp&&t.startTime<6e5&&t.size>s));if(i){let e;i.element&&(e=rs(i.element,t.actionNameAttribute)),r({value:i.startTime,targetSelector:e,resourceUrl:(a=i,""===a.url?void 0:a.url)}),s=i.size}var a}));return{stop:()=>{i(),a.unsubscribe()}}}(t,s,window,(t=>{o.largestContentfulPaint=t,r()})),{stop:u}=function(t,e,n){const r=$i(t,{type:zi.FIRST_INPUT,buffered:!0}).subscribe((r=>{const o=r.find((t=>t.startTime<e.timeStamp));if(o){const e=T(o.startTime,o.processingStart);let r;o.target&&qi(o.target)&&(r=rs(o.target,t.actionNameAttribute)),n({delay:e>=0?e:0,time:o.startTime,targetSelector:r})}}));return{stop:()=>{r.unsubscribe()}}}(t,s,(t=>{o.firstInput=t,r()}));return{stop:function(){i(),a(),c(),u(),s.stop()},initialViewMetrics:o}}const fa=(t,e)=>t*e,pa=t=>fa(t.previousRect.width,t.previousRect.height)+fa(t.currentRect.width,t.currentRect.height)-((t,e)=>{const n=Math.max(t.left,e.left),r=Math.max(t.top,e.top),o=Math.min(t.right,e.right),i=Math.min(t.bottom,e.bottom);return n>=o||r>=i?0:fa(o-n,i-r)})(t.previousRect,t.currentRect);function ma(t,e,n){if(!Bi(zi.LAYOUT_SHIFT)||!("WeakRef"in window))return{stop:nt};let r,o=0;n({value:0});const i=function(){let t,e,n=0,r=0;return{update:o=>{let i;return void 0===t||o.startTime-e>=ya||o.startTime-t>=va?(t=e=o.startTime,r=n=o.value,i=!0):(n+=o.value,e=o.startTime,i=o.value>r,i&&(r=o.value)),{cumulatedValue:n,isMaxValue:i}}}}(),s=$i(t,{type:zi.LAYOUT_SHIFT,buffered:!0}).subscribe((s=>{var a;for(const c of s){if(c.hadRecentInput||c.startTime<e)continue;const{cumulatedValue:s,isMaxValue:u}=i.update(c);if(u){const t=ha(c.sources);r={target:(null==t?void 0:t.node)?new WeakRef(t.node):void 0,time:T(e,c.startTime),previousRect:null==t?void 0:t.previousRect,currentRect:null==t?void 0:t.currentRect,devicePixelRatio:window.devicePixelRatio}}if(s>o){o=s;const e=null===(a=null==r?void 0:r.target)||void 0===a?void 0:a.deref();n({value:l(o,4),targetSelector:e&&rs(e,t.actionNameAttribute),time:null==r?void 0:r.time,previousRect:(null==r?void 0:r.previousRect)?ga(r.previousRect):void 0,currentRect:(null==r?void 0:r.currentRect)?ga(r.currentRect):void 0,devicePixelRatio:null==r?void 0:r.devicePixelRatio})}}}));return{stop:()=>{s.unsubscribe()}}}function ha(t){let e;for(const n of t)if(n.node&&qi(n.node)){const t=pa(n);(!e||pa(e)<t)&&(e=n)}return e}function ga({x:t,y:e,width:n,height:r}){return{x:t,y:e,width:n,height:r}}const va=5e3,ya=f;let ba,_a=0,wa=1/0,Sa=0;const ka=()=>ba?_a:window.performance.interactionCount||0;function Ta(t,e,n){if(!(Bi(zi.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint:()=>{},setViewEnd:nt,stop:nt};const{getViewInteractionCount:r,stopViewInteractionCount:o}=function(t){"interactionCount"in performance||ba||(ba=new window.PerformanceObserver(q((t=>{t.getEntries().forEach((t=>{const e=t;e.interactionId&&(wa=Math.min(wa,e.interactionId),Sa=Math.max(Sa,e.interactionId),_a=(Sa-wa)/7+1)}))}))),ba.observe({type:"event",buffered:!0,durationThreshold:0}));const e=t===To?0:ka();let n={stopped:!1};function r(){return ka()-e}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}(n);let i=1/0;const s=function(t){const e=[];function n(){e.sort(((t,e)=>e.duration-t.duration)).splice(10)}return{process(t){const r=e.findIndex((e=>t.interactionId===e.interactionId)),o=e[e.length-1];-1!==r?t.duration>e[r].duration&&(e[r]=t,n()):(e.length<10||t.duration>o.duration)&&(e.push(t),n())},estimateP98Interaction(){const n=Math.min(e.length-1,Math.floor(t()/50));return e[n]}}}(r);let a,c,u=-1;function l(n){for(const t of n)t.interactionId&&t.startTime>=e&&t.startTime<=i&&s.process(t);const r=s.estimateP98Interaction();r&&r.duration!==u&&(u=r.duration,c=T(e,r.startTime),a=function(t){const e=js.get(t);return js.delete(t),e}(r.startTime),!a&&r.target&&qi(r.target)&&(a=rs(r.target,t.actionNameAttribute)))}const d=$i(t,{type:zi.FIRST_INPUT,buffered:!0}).subscribe(l),f=$i(t,{type:zi.EVENT,durationThreshold:40,buffered:!0}).subscribe(l);return{getInteractionToNextPaint:()=>u>=0?{value:Math.min(u,6e4),targetSelector:a,time:c}:r()?{value:0}:void 0,setViewEnd:t=>{i=t,o()},stop:()=>{f.unsubscribe(),d.unsubscribe()}}}function Ea(){let t;const e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function xa(){let t;const e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}let Ca;function Aa(t){return Ca||(Ca=function(t){return new X((e=>{const{throttled:n}=et((()=>{e.notify(Ia())}),200);return pn(t,window,"resize",n,{capture:!0,passive:!0}).stop}))}(t)),Ca}function Ia(){const 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)}}function Ra(t,e,n,r=function(t,e=1e3){return new X((n=>{function r(){n.notify(function(){const t=xa(),{height:e}=Ia(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(e+t);return{scrollHeight:n,scrollDepth:r,scrollTop:t}}())}if(window.ResizeObserver){const n=et(r,e,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,i=new ResizeObserver(q(n.throttled));o&&i.observe(o);const s=pn(t,window,"scroll",n.throttled,{passive:!0});return()=>{n.cancel(),i.disconnect(),s.stop()}}}))}(t)){let o=0,i=0,s=0;const a=r.subscribe((({scrollDepth:t,scrollTop:r,scrollHeight:a})=>{let c=!1;if(t>o&&(o=t,c=!0),a>i){i=a;const t=w();s=T(e.relative,t),c=!0}c&&n({maxDepth:Math.min(o,i),maxDepthScrollTop:r,maxScrollHeight:i,maxScrollHeightTime:s})}));return{stop:()=>a.unsubscribe()}}function Na(t,e,n,r,o,i,s){const a={},{stop:c,setLoadEvent:u}=function(t,e,n,r,o,i,s){let a=o===To,c=!0;const u=[],l=la(r,i);function d(){if(!c&&!a&&u.length>0){const t=Math.max(...u);t<l.timeStamp-i.relative&&s(t)}}const{stop:f}=Yi(t,e,n,r,(t=>{c&&(c=!1,t.hadActivity&&u.push(T(i.timeStamp,t.end)),d())}));return{stop:()=>{f(),l.stop()},setLoadEvent:t=>{a&&(a=!1,u.push(t),d())}}}(t,e,n,r,i,s,(t=>{a.loadingTime=t,o()})),{stop:l}=Ra(r,s,(t=>{a.scroll=t})),{stop:d}=ma(r,s.relative,(t=>{a.cumulativeLayoutShift=t,o()})),{stop:f,getInteractionToNextPaint:p,setViewEnd:m}=Ta(r,s.relative,i);return{stop:()=>{c(),d(),l()},stopINPTracking:f,setLoadEvent:u,setViewEnd:m,getCommonViewMetrics:()=>(a.interactionToNextPaint=p(),a)}}function Oa(t,e,n){var r,o;r=t.relative,o=t=>{e.firstContentfulPaint=t,e.largestContentfulPaint={value:t},n()},requestAnimationFrame((()=>{requestAnimationFrame((()=>{o(T(r,w()))}))}))}const La=3e5,Ma=3e5;function Pa(t,e,n,r,i,s,a,c){const u=new Set;let l,d,f=p(To,k(),c);function p(s,a,c){const l=function(t,e,n,r,i,s,a=S(),c){const u=rt(),l=new X,d={};let f,p=0;const h=O(i),g=Br();let v=!0,y=null==c?void 0:c.name;const b=(null==c?void 0:c.service)||r.service,w=(null==c?void 0:c.version)||r.version,k=null==c?void 0:c.context;k&&g.setContext(k);const E={id:u,name:y,startClocks:a,service:b,version:w,context:k};t.notify(1,E),t.notify(2,E);const{throttled:x,cancel:C}=et(F,3e3,{leading:!1}),{setLoadEvent:A,setViewEnd:I,stop:R,stopINPTracking:N,getCommonViewMetrics:L}=Na(t,e,n,r,B,s,a),{stop:M,initialViewMetrics:P}=s===To?da(r,a,A,B):{stop:nt,initialViewMetrics:{}};s===xo&&Oa(a,P,B);const{stop:D,eventCounts:U}=function(t,e,n){const{stop:r,eventCounts:o}=Di({lifeCycle:t,isChildEvent:t=>t.view.id===e,onChange:n});return{stop:r,eventCounts:o}}(t,u,B),z=J(F,La),$=t.subscribe(11,(t=>{t.reason===Fn.UNLOADING&&F()}));function V(){t.notify(3,{id:u,name:y,context:g.getContext(),startClocks:a,sessionIsActive:v})}function B(){V(),x()}function F(){C(),V(),p+=1;const e=void 0===f?_():f.timeStamp;t.notify(4,{customTimings:d,documentVersion:p,id:u,name:y,service:b,version:w,context:g.getContext(),loadingType:s,location:h,startClocks:a,commonViewMetrics:L(),initialViewMetrics:P,duration:T(a.timeStamp,e),isActive:void 0===f,sessionIsActive:v,eventCounts:U})}return F(),g.changeObservable.subscribe(B),{get name(){return y},service:b,version:w,contextManager:g,stopObservable:l,end(e={}){var n,r;f||(f=null!==(n=e.endClocks)&&void 0!==n?n:S(),v=null===(r=e.sessionIsActive)||void 0===r||r,t.notify(5,{endClocks:f}),t.notify(6,{endClocks:f}),Y(z),I(f.relative),R(),$.unsubscribe(),F(),W((()=>{this.stop()}),Ma))},stop(){M(),D(),N(),l.notify()},addTiming(t,e){if(f)return;const n=function(t){return t<m}(e)?e:T(a.timeStamp,e);d[function(t){const e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");e!==t&&o.warn(`Invalid timing name: ${t}, sanitized to: ${e}`);return e}(t)]=n,B()},setViewName(t){y=t,F()}}}(e,n,r,i,t,s,a,c);return u.add(l),l.stopObservable.subscribe((()=>{u.delete(l)})),l}return e.subscribe(10,(()=>{f=p(Eo,void 0,{name:f.name,service:f.service,version:f.version,context:f.contextManager.getContext()})})),e.subscribe(9,(()=>{f.end({sessionIsActive:!1})})),a&&(d=function(t){return t.subscribe((({oldLocation:t,newLocation:e})=>{var n,r;r=e,((n=t).pathname!==r.pathname||!function(t){const e=t.substring(1);return""!==e&&!!document.getElementById(e)}(r.hash)&&Da(r.hash)!==Da(n.hash))&&(f.end(),f=p(Eo))}))}(s),i.trackBfcacheViews&&(l=function(t,e){const{stop:n}=pn(t,window,"pageshow",(t=>{t.persisted&&e(t)}),{capture:!0});return n}(i,(t=>{f.end();const e=h(t.timeStamp);f=p(xo,e,void 0)})))),{addTiming:(t,e=_())=>{f.addTiming(t,e)},startView:(t,e)=>{f.end({endClocks:e}),f=p(Eo,e,t)},setViewContext:t=>{f.contextManager.setContext(t)},setViewContextProperty:(t,e)=>{f.contextManager.setContextProperty(t,e)},setViewName:t=>{f.setViewName(t)},getViewContext:()=>f.contextManager.getContext(),stop:()=>{d&&d.unsubscribe(),l&&l(),f.end(),u.forEach((t=>t.stop()))}}}function Da(t){const e=t.indexOf("?");return e<0?t:t.slice(0,e)}function Ua(t,e,n,r,o,i,s,a,c,u){return t.subscribe(4,(e=>t.notify(12,function(t,e,n){var r,o,i,s,a,c,u,l,d,f,p,m,h,g,v,b,_,w;const S=n.getReplayStats(t.id),k=null===(o=null===(r=t.commonViewMetrics)||void 0===r?void 0:r.cumulativeLayoutShift)||void 0===o?void 0:o.devicePixelRatio,T={_dd:{document_version:t.documentVersion,replay_stats:S,cls:k?{device_pixel_ratio:k}:void 0,configuration:{start_session_replay_recording_manually:e.startSessionReplayRecordingManually}},date:t.startClocks.timeStamp,type:bo,view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:null===(i=t.commonViewMetrics.cumulativeLayoutShift)||void 0===i?void 0:i.value,cumulative_layout_shift_time:y(null===(s=t.commonViewMetrics.cumulativeLayoutShift)||void 0===s?void 0:s.time),cumulative_layout_shift_target_selector:null===(a=t.commonViewMetrics.cumulativeLayoutShift)||void 0===a?void 0:a.targetSelector,first_byte:y(null===(c=t.initialViewMetrics.navigationTimings)||void 0===c?void 0:c.firstByte),dom_complete:y(null===(u=t.initialViewMetrics.navigationTimings)||void 0===u?void 0:u.domComplete),dom_content_loaded:y(null===(l=t.initialViewMetrics.navigationTimings)||void 0===l?void 0:l.domContentLoaded),dom_interactive:y(null===(d=t.initialViewMetrics.navigationTimings)||void 0===d?void 0:d.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:y(t.initialViewMetrics.firstContentfulPaint),first_input_delay:y(null===(f=t.initialViewMetrics.firstInput)||void 0===f?void 0:f.delay),first_input_time:y(null===(p=t.initialViewMetrics.firstInput)||void 0===p?void 0:p.time),first_input_target_selector:null===(m=t.initialViewMetrics.firstInput)||void 0===m?void 0:m.targetSelector,interaction_to_next_paint:y(null===(h=t.commonViewMetrics.interactionToNextPaint)||void 0===h?void 0:h.value),interaction_to_next_paint_time:y(null===(g=t.commonViewMetrics.interactionToNextPaint)||void 0===g?void 0:g.time),interaction_to_next_paint_target_selector:null===(v=t.commonViewMetrics.interactionToNextPaint)||void 0===v?void 0:v.targetSelector,is_active:t.isActive,name:t.name,largest_contentful_paint:y(null===(b=t.initialViewMetrics.largestContentfulPaint)||void 0===b?void 0:b.value),largest_contentful_paint_target_selector:null===(_=t.initialViewMetrics.largestContentfulPaint)||void 0===_?void 0:_.targetSelector,load_event:y(null===(w=t.initialViewMetrics.navigationTimings)||void 0===w?void 0:w.loadEvent),loading_time:Pi(y(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},performance:za(t.commonViewMetrics,t.initialViewMetrics),resource:{count:t.eventCounts.resourceCount},time_spent:y(t.duration)},display:t.commonViewMetrics.scroll?{scroll:{max_depth:t.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:t.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:t.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:y(t.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:e.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:ho()}};M(t.customTimings)||(T.view.custom_timings=P(t.customTimings,y));return{rawRumEvent:T,startTime:t.startClocks.relative,duration:t.duration,domainContext:{location:t.location}}}(e,n,a)))),e.register(0,(({startTime:t,eventType:e})=>{const n=c.findView(t);return n?{type:e,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:Wn})),e.register(1,(({startTime:t})=>{var e;return{view:{id:null===(e=c.findView(t))||void 0===e?void 0:e.id}}})),Pa(r,t,o,i,n,s,!n.trackViewsManually,u)}function za({cumulativeLayoutShift:t,interactionToNextPaint:e},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:o}){return{cls:t&&{score:t.value,timestamp:y(t.time),target_selector:t.targetSelector,previous_rect:t.previousRect,current_rect:t.currentRect},fcp:n&&{timestamp:y(n)},fid:r&&{duration:y(r.delay),timestamp:y(r.time),target_selector:r.targetSelector},inp:e&&{duration:y(e.value),timestamp:y(e.time),target_selector:e.targetSelector},lcp:o&&{timestamp:y(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl}}}function $a(t,e,n){const r=wr(t,"rum",(e=>function(t,e){if(n=e,"0"===n||"1"===n||"2"===n)return e;var n;if(!u(t.sessionSampleRate))return"0";if(!u(t.sessionReplaySampleRate))return"2";return"1"}(t,e)),n);return r.expireObservable.subscribe((()=>{e.notify(9)})),r.renewObservable.subscribe((()=>{e.notify(10)})),r.sessionStateUpdateObservable.subscribe((({previousState:t,newState:e})=>{if(!t.forcedReplay&&e.forcedReplay){const t=r.findSession();t&&(t.isReplayForced=!0)}})),{findTrackedSession:t=>{const e=r.findSession(t);if(e&&"0"!==e.trackingType)return{id:e.id,sessionReplay:"1"===e.trackingType?1:e.isReplayForced?2:0,anonymousId:e.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:"1"})}}const Va=Tt;function Ba(t,e){let n=O(e);return new X((r=>{const{stop:o}=function(t,e){const{stop:n}=je(Fa("pushState"),"pushState",(({onPostCall:t})=>{t(e)})),{stop:r}=je(Fa("replaceState"),"replaceState",(({onPostCall:t})=>{t(e)})),{stop:o}=pn(t,window,"popstate",e);return{stop:()=>{n(),r(),o()}}}(t,s),{stop:i}=function(t,e){return pn(t,window,"hashchange",e)}(t,s);function s(){if(n.href===e.href)return;const t=O(e);r.notify({newLocation:t,oldLocation:n}),n=t}return()=>{o(),i()}}))}function Fa(t){return Object.prototype.hasOwnProperty.call(history,t)?history:History.prototype}const qa=Tt;let ja,Ha;function Ga(){0!==ja.batchCount&&(ir("Customer data measures",ja),Ka())}function Wa(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function Ka(){ja={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0}}}const Ja=Tt;function Ya(t,e,n=500){const r=mr({expireDelay:Ja,maxEntries:4e3});let o;if(Bi(zi.VISIBILITY_STATE)){performance.getEntriesByType(zi.VISIBILITY_STATE).forEach((t=>{s("hidden"===t.name?"hidden":"active",t.startTime)}))}s(Xa(),w());const{stop:i}=mn(e,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],(t=>{s(function(t){if("freeze"===t.type)return"frozen";if("pagehide"===t.type)return t.persisted?"frozen":"terminated";return Xa()}(t),t.timeStamp)}),{capture:!0});function s(t,e=w()){t!==o&&(o=t,r.closeActive(e),r.add({state:o,startTime:e},e))}function a(t,e,n){return r.findAll(e,n).some((e=>e.state===t))}return t.register(0,(({startTime:t,duration:e=0,eventType:o})=>{if(o===bo){return{type:o,_dd:{page_states:Za(r.findAll(t,e),t,n)}}}return o===go||o===vo?{type:o,view:{in_foreground:a("active",t,0)}}:Kn})),{wasInPageStateDuringPeriod:a,addPageState:s,stop:()=>{i(),r.stop()}}}function Za(t,e,n){if(0!==t.length)return t.slice(-n).reverse().map((({state:t,startTime:n})=>({state:t,start:y(T(e,n))})))}function Xa(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}function Qa(t,e){const n=window.cookieStore?function(t){return(e,n)=>pn(t,window.cookieStore,"change",(t=>{const r=t.changed.find((t=>t.name===e))||t.deleted.find((t=>t.name===e));r&&n(r.value)})).stop}(t):ec;return new X((t=>n(e,(e=>t.notify(e)))))}const tc=f;function ec(t,e){const n=it(document.cookie,t),r=J((()=>{const r=it(document.cookie,t);r!==n&&e(r)}),tc);return()=>{Y(r)}}const nc="datadog-ci-visibility-test-execution-id";function rc(t,e,n){const r=Tn(t),o=n(r);return kt(e).forEach((([e,n])=>oc(t,r,e.split(/\.|(?=\[\])/),n))),o}function oc(t,e,n,r){const[o,...i]=n;if("[]"!==o){if(ic(t)&&ic(e))return i.length>0?oc(t[o],e[o],i,r):void function(t,e,n,r){const o=re(n);o===r?t[e]=Ke(n):"object"!==r||"undefined"!==o&&"null"!==o||(t[e]={})}(t,o,e[o],r)}else Array.isArray(t)&&Array.isArray(e)&&t.forEach(((t,n)=>oc(t,e[n],i,r)))}function ic(t){return"object"===re(t)}const sc={"view.name":"string","view.url":"string","view.referrer":"string"},ac={context:"object"},cc={service:"string",version:"string"};let uc;function lc(t,e,n,r){uc={[bo]:{"view.performance.lcp.resource_url":"string",...ac,...sc,...cc},[vo]:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...ac,...sc,...cc},[_o]:{"resource.url":"string","resource.graphql.variables":"string",...ac,...sc,...cc},[go]:{"action.target.name":"string",...ac,...sc,...cc},[yo]:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...ac,...sc,...cc},[wo]:{...ac,...sc,...cc}};const i={[vo]:Tr(vo,t.eventRateLimiterThreshold,r),[go]:Tr(go,t.eventRateLimiterThreshold,r),[wo]:Tr(wo,t.eventRateLimiterThreshold,r)};e.subscribe(12,(({startTime:r,duration:s,rawRumEvent:a,domainContext:c})=>{const u=n.triggerHook(0,{eventType:a.type,startTime:r,duration:s});if(u===Wn)return;const l=En(u,a,{ddtags:_n(t).join(",")});(function(t,e,n,r){var i;if(e){const r=rc(t,uc[t.type],(t=>e(t,n)));if(!1===r&&t.type!==bo)return!1;!1===r&&o.warn("Can't dismiss view events using beforeSend!")}const s=null===(i=r[t.type])||void 0===i?void 0:i.isLimitReached();return!s})(l,t.beforeSend,c,i)&&(M(l.context)&&delete l.context,e.notify(13,l))}))}const dc=function(){const t={};return{register:(e,n)=>(t[e]||(t[e]=[]),t[e].push(n),{unregister:()=>{t[e]=t[e].filter((t=>t!==n))}}),triggerHook(e,n){const r=t[e]||[],o=[];for(const t of r){const e=t(n);if(e===Wn)return Wn;e!==Kn&&o.push(e)}return En(...o)}}},fc=[go,vo,yo,_o,wo];function pc(t,{session:e,viewContext:n,errorType:r}){const o=e?e.id:"no-session-id",i=[];void 0!==r&&i.push(`error-type=${r}`),n&&(i.push(`seed=${n.id}`),i.push(`from=${n.startClocks.timeStamp}`));const s=function(t){const e=t.site,n=t.subdomain||function(t){switch(t.site){case le:case de:return"app";case ue:return"dd";default:return}}(t);return`https://${n?`${n}.`:""}${e}`}(t);return`${s}${`/rum/replay/sessions/${o}`}?${i.join("&")}`}function mc(t,e){return new Promise((n=>{t.write(e),t.finish((t=>{n(t)}))}))}let hc;function gc(t){let e;return hc||(hc=new Map),hc.has(t)?e=hc.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},hc.set(t,e),hc.size>1e3&&function(){if(!hc)return;const t=hc.keys().next().value;t&&hc.delete(t)}()),e}function vc(t,e,n){let r,o=0,i=[],s=!0,a=0;const c=[],{stop:u}=pn(t,e,"message",(({data:t})=>{if("wrote"!==t.type||t.streamId!==n)return;const e=c[0];e&&(e.id===t.id?(c.shift(),o+=t.additionalBytesCount,i.push(t.result),r=t.trailer,e.writeCallback?e.writeCallback(t.result.byteLength):e.finishCallback&&e.finishCallback()):e.id<t.id&&u())}));function l(){const t=0===i.length?new Uint8Array(0):N(i.concat(r)),e={rawBytesCount:o,output:t,outputBytesCount:t.byteLength,encoding:"deflate"};return o=0,i=[],e}function d(){s||(e.postMessage({action:"reset",streamId:n}),s=!0)}return{isAsync:!0,get isEmpty(){return s},write(t,r){e.postMessage({action:"write",id:a,data:t,streamId:n}),c.push({id:a,writeCallback:r,data:t}),s=!1,a+=1},finish(t){d(),c.length?(c.forEach((t=>{delete t.writeCallback})),c[c.length-1].finishCallback=()=>t(l())):t(l())},finishSync(){d();const t=c.map((t=>t.data)).join("");return c.length=0,{...l(),pendingData:t}},estimateEncodedBytesCount:t=>t.length/8,stop(){u()}}}function yc({configuredUrl:t,error:e,source:n,scriptType:r}){if(o.error(`${n} failed to start: an error occurred while initializing the ${r}:`,e),e instanceof Event||e instanceof Error&&((s=e.message).includes("Content Security Policy")||s.includes("requires 'TrustedScriptURL'"))){let e;e=t?`Please make sure the ${r} URL ${t} is correct and CSP is correctly configured.`:"Please make sure CSP is correctly configured.",o.error(`${e} See documentation at ${i}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else"worker"===r&&or(e);var s}function bc(t){return new Worker(t.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=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]),n=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]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(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 g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,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},S=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}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={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"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>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&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>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))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&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<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(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<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(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-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(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=W(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=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(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_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(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=W(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&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(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=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(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 st=[new it(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(at(t),0===t.lookahead&&0===e)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,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){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=8,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),V(this.dyn_ltree),V(this.dyn_dtree),V(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),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(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}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[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),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(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)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(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=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(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=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(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=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)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+H;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]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(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)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=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},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};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 ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(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,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(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=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.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?4:0,"[object ArrayBuffer]"===ct.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),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;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},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.24.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|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,2),{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){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let _c={status:0};function wc(t,e,n,r=bc){switch(0===_c.status&&function(t,e,n=bc){try{const r=n(t),{stop:i}=pn(t,r,"error",(n=>{kc(t,e,n)})),{stop:s}=pn(t,r,"message",(({data:n})=>{var r;"errored"===n.type?kc(t,e,n.error,n.streamId):"initialized"===n.type&&(r=n.version,1===_c.status&&(_c={status:3,worker:_c.worker,stop:_c.stop,version:r}))}));r.postMessage({action:"init"}),W((()=>function(t){1===_c.status&&(o.error(`${t} failed to start: a timeout occurred while initializing the Worker`),_c.initializationFailureCallbacks.forEach((t=>t())),_c={status:2})}(e)),3e4);_c={status:1,worker:r,stop:()=>{i(),s()},initializationFailureCallbacks:[]}}catch(n){kc(t,e,n)}}(t,e,r),_c.status){case 1:return _c.initializationFailureCallbacks.push(n),_c.worker;case 3:return _c.worker}}function Sc(){return _c.status}function kc(t,e,n,r){1===_c.status||0===_c.status?(yc({configuredUrl:t.workerUrl,error:n,source:e,scriptType:"worker"}),1===_c.status&&_c.initializationFailureCallbacks.forEach((t=>t())),_c={status:2}):or(n,{worker_version:3===_c.status&&_c.version,stream_id:r})}function Tc(){return"function"==typeof Array.from&&"function"==typeof CSSSupportsRule&&"function"==typeof URL.createObjectURL&&"forEach"in NodeList.prototype}function Ec(t,e,n,r){const o=e.findTrackedSession(),i=function(t,e){if(!Tc())return"browser-not-supported";if(!t)return"rum-not-tracked";if(0===t.sessionReplay)return"incorrect-session-plan";if(!e)return"replay-not-started"}(o,r);return pc(t,{viewContext:n.findView(),errorType:i,session:o})}function xc(t,e,n,r,o,i,s){let a,c=0;e.subscribe(9,(()=>{2!==c&&3!==c||(f(),c=1)})),e.subscribe(10,(()=>{1===c&&d()}));const u=new X;!function(t,e){if(!t.metricsEnabled)return{stop:nt};let n,r,o;const{unsubscribe:i}=e.subscribe((t=>{switch(t.type){case"start":n={forced:t.forced,timestamp:_()},r=void 0,o=void 0;break;case"document-ready":n&&(r=T(n.timestamp,_()));break;case"recorder-settled":n&&(o=T(n.timestamp,_()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":i(),n&&ir("Recorder init metrics",{metrics:(e=n.forced,s=o,a=T(n.timestamp,_()),c=t.type,u=r,{forced:e,loadRecorderModuleDuration:s,recorderInitDuration:a,result:c,waitForDocReadyDuration:u})})}var e,s,a,c,u}))}(s,u);const l=async l=>{u.notify({type:"start",forced:l});const[d]=await Promise.all([Cc(u,{type:"recorder-settled"},o()),Cc(u,{type:"document-ready"},xr(t,"interactive"))]);if(2!==c)return void u.notify({type:"aborted"});if(!d)return c=0,void u.notify({type:"recorder-load-failed"});const f=i();if(!f)return c=0,void u.notify({type:"deflate-encoder-load-failed"});({stop:a}=d(e,t,n,r,f,s)),c=3,u.notify({type:"succeeded"})};function d(t){const e=n.findTrackedSession();if(function(t,e){return!t||0===t.sessionReplay&&(!e||!e.force)}(e,t))return void(c=1);if(function(t){return 2===t||3===t}(c))return;c=2;const r=function(t,e){return e&&e.force&&0===t.sessionReplay}(e,t)||!1;l(r).catch(H),r&&n.setForcedReplay()}function f(){3===c&&(null==a||a()),c=0}return{start:d,stop:f,getSessionReplayLink:()=>Ec(t,n,r,0!==c),isRecording:()=>3===c}}async function Cc(t,e,n){try{return await n}finally{t.notify(e)}}async function Ac(){return(await Promise.resolve().then((function(){return Ku}))).startRecording}async function Ic(t=Rc){try{return await t()}catch(t){yc({error:t,source:"Profiler",scriptType:"module"})}}async function Rc(){return(await Promise.resolve().then((function(){return rl}))).createRumProfiler}const Nc=function(t,e){if(Bn()&&!Vn("records")||!Tc())return{start:nt,stop:nt,getReplayStats:()=>{},onRumStart:nt,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=function(){let t=0;return{strategy:{start(){t=1},stop(){t=2},isRecording:()=>!1,getSessionReplayLink:nt},shouldStartImmediately:e=>1===t||0===t&&!e.startSessionReplayRecordingManually}}();return{start:t=>n.start(t),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:function(o,i,s,a,c,u){let l;n=xc(i,o,s,a,t,(function(){l||(null!=c||(c=wc(i,"Datadog Session Replay",(()=>{n.stop()}),e)),c&&(l=vc(i,c,1)));return l}),u),r(i)&&n.start()},isRecording:()=>3===Sc()&&n.isRecording(),getReplayStats:t=>3===Sc()?function(t){return null==hc?void 0:hc.get(t)}(t):void 0}}((async function(t=Ac){try{return await t()}catch(t){yc({error:t,source:"Recorder",scriptType:"module"})}})),Oc=function(){let t;return{onRumStart:function(e,n,r,o,i,s){const a=o.findTrackedSession();if(!a)return;if(!Vo(a.id,r.profilingSampleRate))return;const c=(t=>{let e={status:"starting"};return t.register(0,(({eventType:t})=>t!==bo&&t!==yo?Kn:{type:t,_dd:{profiling:e}})),{get:()=>e,set:t=>{e=t}}})(n);void 0!==D().Profiler?Ic().then((n=>{if(!n)return rr("[DD_RUM] Failed to lazy load the RUM Profiler"),void c.set({status:"error",error_reason:"failed-to-lazy-load"});t=n(r,e,o,c,s),t.start(i.findView())})).catch(H):c.set({status:"error",error_reason:"not-supported-by-browser"})},stop:()=>{null==t||t.stop().catch(H)}}}(),Lc=function(t,e,n,r={}){const o=function(t){const e=new X;return{tryToInit(e){t||(t=e)},update(n){t=n,e.notify()},isGranted:()=>t===ne.GRANTED,observable:e}}(),i={vitalsByName:new Map,vitalsByReference:new WeakMap},s=function(t=dn){const e=new tt(500),n=t().subscribe((t=>{e.notify({type:0,error:t})}));return{observable:e,stop:()=>{n.unsubscribe()}}}().observable;let a=li(r,o,i,((c,u,l)=>{const d=u&&r.createDeflateEncoder?t=>r.createDeflateEncoder(c,u,t):kr,f=t(c,e,n,l,d,o,i,s,r.sdkName);return e.onRumStart(f.lifeCycle,c,f.session,f.viewHistory,u,f.telemetry),n.onRumStart(f.lifeCycle,f.hooks,c,f.session,f.viewHistory,d),a=function(t,e){return{init:t=>{fn("DD_RUM",t)},initConfiguration:t.initConfiguration,...e}}(a,f),zo(c.plugins,"onRumStart",{strategy:a,addEvent:f.addEvent}),f}));const c=()=>a,u=q((t=>{const e="object"==typeof t?t:{name:t};a.startView(e),sr({feature:"start-view"})})),l=function(t){const e={version:"6.24.0",onReady(t){t()},...t};return Object.defineProperty(e,"_setDebug",{get:()=>F,enumerable:!1}),e}({init:t=>{const e=(new Error).stack;j((()=>a.init(t,l,e)))},setTrackingConsent:q((t=>{o.update(t),sr({feature:"set-tracking-consent",tracking_consent:t})})),setViewName:q((t=>{a.setViewName(t),sr({feature:"set-view-name"})})),setViewContext:q((t=>{a.setViewContext(t),sr({feature:"set-view-context"})})),setViewContextProperty:q(((t,e)=>{a.setViewContextProperty(t,e),sr({feature:"set-view-context-property"})})),getViewContext:q((()=>(sr({feature:"set-view-context-property"}),a.getViewContext()))),getInternalContext:q((t=>a.getInternalContext(t))),getInitConfiguration:q((()=>Tn(a.initConfiguration))),addAction:(t,e)=>{const n=Be("action");j((()=>{a.addAction({name:Ke(t),context:Ke(e),startClocks:S(),type:Ao,handlingStack:n}),sr({feature:"add-action"})}))},addError:(t,e)=>{const n=Be("error");j((()=>{a.addError({error:t,handlingStack:n,context:Ke(e),startClocks:S()}),sr({feature:"add-error"})}))},addTiming:q(((t,e)=>{a.addTiming(Ke(t),e)})),setGlobalContext:Fr(c,Yr,Qr,"set-global-context"),getGlobalContext:Fr(c,Yr,Xr,"get-global-context"),setGlobalContextProperty:Fr(c,Yr,to,"set-global-context-property"),removeGlobalContextProperty:Fr(c,Yr,eo,"remove-global-context-property"),clearGlobalContext:Fr(c,Yr,no,"clear-global-context"),setUser:Fr(c,Jr,Qr,"set-user"),getUser:Fr(c,Jr,Xr,"get-user"),setUserProperty:Fr(c,Jr,to,"set-user-property"),removeUserProperty:Fr(c,Jr,eo,"remove-user-property"),clearUser:Fr(c,Jr,no,"clear-user"),setAccount:Fr(c,Zr,Qr,"set-account"),getAccount:Fr(c,Zr,Xr,"get-account"),setAccountProperty:Fr(c,Zr,to,"set-account-property"),removeAccountProperty:Fr(c,Zr,eo,"remove-account-property"),clearAccount:Fr(c,Zr,no,"clear-account"),startView:u,stopSession:q((()=>{a.stopSession(),sr({feature:"stop-session"})})),addFeatureFlagEvaluation:q(((t,e)=>{a.addFeatureFlagEvaluation(Ke(t),Ke(e)),sr({feature:"add-feature-flag-evaluation"})})),getSessionReplayLink:q((()=>e.getSessionReplayLink())),startSessionReplayRecording:q((t=>{e.start(t),sr({feature:"start-session-replay-recording",force:t&&t.force})})),stopSessionReplayRecording:q((()=>e.stop())),addDurationVital:q(((t,e)=>{var n;sr({feature:"add-duration-vital"}),a.addDurationVital({name:Ke(t),type:Oo,startClocks:(n=e.startTime,{relative:x(n),timeStamp:n}),duration:e.duration,context:Ke(e&&e.context),description:Ke(e&&e.description)})})),startDurationVital:q(((t,e)=>(sr({feature:"start-duration-vital"}),a.startDurationVital(Ke(t),{context:Ke(e&&e.context),description:Ke(e&&e.description)})))),stopDurationVital:q(((t,e)=>{sr({feature:"stop-duration-vital"}),a.stopDurationVital("string"==typeof t?Ke(t):t,{context:Ke(e&&e.context),description:Ke(e&&e.description)})})),startFeatureOperation:q(((t,e)=>{sr({feature:"add-operation-step-vital",action_type:"start"}),a.addOperationStepVital(t,"start",e)})),succeedFeatureOperation:q(((t,e)=>{sr({feature:"add-operation-step-vital",action_type:"succeed"}),a.addOperationStepVital(t,"end",e)})),failFeatureOperation:q(((t,e,n)=>{sr({feature:"add-operation-step-vital",action_type:"fail"}),a.addOperationStepVital(t,"end",n,e)}))});return l}((function(t,e,n,r,o,i,s,a,c){const u=[],d=new pi,f=dc();d.subscribe(13,(t=>Sn("rum",t)));const p=t=>{d.notify(14,{error:t}),rr("Error reported to customer",{"error.message":t.message})},m=function(t){return new X((e=>{const{stop:n}=mn(t,window,["visibilitychange","freeze"],(t=>{"visibilitychange"===t.type&&"hidden"===document.visibilityState?e.notify({reason:Fn.HIDDEN}):"freeze"===t.type&&e.notify({reason:Fn.FROZEN})}),{capture:!0}),r=pn(t,window,"beforeunload",(()=>{e.notify({reason:Fn.UNLOADING})})).stop;return()=>{n(),r()}}))}(t),g=m.subscribe((t=>{d.notify(11,t)}));u.push((()=>g.unsubscribe()));const b=nr("browser-rum-sdk",t,f,p,m,o);u.push(b.stop);const S=Bn()?function(){const t={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:Vn("records")?1:0};return{findTrackedSession:()=>t,expire:nt,expireObservable:new X,setForcedReplay:nt}}():$a(t,d,i);if(Bn())!function(t){const e=$n();t.subscribe(13,(t=>{e.send("rum",t)}))}(d);else{const e=function(t,e,n,r,o,i){const s=[t.rumEndpointBuilder];t.replica&&s.push(t.replica.rumEndpointBuilder);const a=jn({encoder:i(2),request:Mn(s,t.batchBytesLimit,n),flushController:Gn({messagesLimit:t.batchMessagesLimit,bytesLimit:t.batchBytesLimit,durationLimit:t.flushTimeout,pageMayExitObservable:r,sessionExpireObservable:o}),messageBytesLimit:t.messageBytesLimit});return e.subscribe(13,(t=>{t.type===bo?a.upsert(t,t.view.id):a.add(t)})),a}(t,d,p,m,S.expireObservable,o);u.push((()=>e.stop())),function(t,e,n){t.metricsEnabled&&(Ka(),Ha=!1,e.subscribe(13,(()=>{Ha=!0})),n.subscribe((({bytesCount:t,messagesCount:e})=>{Ha&&(Ha=!1,ja.batchCount+=1,Wa(ja.batchBytesCount,t),Wa(ja.batchMessagesCount,e))})),J(Ga,1e4))}(b,d,e.flushController.flushObservable)}const k=function(){const t=fi();return new X((e=>{if(!t)return;const n=new t(q((t=>e.notify(t))));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()}))}(),T=Ba(t,location),{observable:E,stop:x}=function(){const t=new X,{stop:e}=je(window,"open",(()=>t.notify()));return{observable:t,stop:e}}();u.push(x),function(t,e,n){t.register(0,(({eventType:t})=>{const r=e.source;return{type:t,_dd:{format_version:2,drift:v(),configuration:{session_sample_rate:l(e.sessionSampleRate,3),session_replay_sample_rate:l(e.sessionReplaySampleRate,3),profiling_sample_rate:l(e.profilingSampleRate,3),beta_encode_cookie_options:e.betaEncodeCookieOptions},browser_sdk_version:Bn()?"6.24.0":void 0,sdk_name:n},application:{id:e.applicationId},date:_(),source:r}})),t.register(1,(()=>({application:{id:e.applicationId}})))}(f,t,c);const C=Ya(f,t),A=function(t){const e=mr({expireDelay:mi});return t.subscribe(1,(t=>{e.add(function(t){return{service:t.service,version:t.version,context:t.context,id:t.id,name:t.name,startClocks:t.startClocks}}(t),t.startClocks.relative)})),t.subscribe(6,(({endClocks:t})=>{e.closeActive(t.relative)})),t.subscribe(3,(t=>{const n=e.find(t.startClocks.relative);n&&(t.name&&(n.name=t.name),t.context&&(n.context=t.context),n.sessionIsActive=t.sessionIsActive)})),t.subscribe(10,(()=>{e.reset()})),{findView:t=>e.find(t),stop:()=>{e.stop()}}}(d);u.push((()=>A.stop()));const I=function(t,e,n,r){const o=mr({expireDelay:Va});let i;t.subscribe(1,(({startClocks:t})=>{const e=r.href;o.add(a({url:e,referrer:i||document.referrer}),t.relative),i=e})),t.subscribe(6,(({endClocks:t})=>{o.closeActive(t.relative)}));const s=n.subscribe((({newLocation:t})=>{const e=o.find();if(e){const n=w();o.closeActive(n),o.add(a({url:t.href,referrer:e.referrer}),n)}}));function a({url:t,referrer:e}){return{url:t,referrer:e}}return e.register(0,(({startTime:t,eventType:e})=>{const n=o.find(t);return n?{type:e,view:{url:n.url,referrer:n.referrer}}:Wn})),{findUrl:t=>o.find(t),stop:()=>{s.unsubscribe(),o.stop()}}}(d,f,T,location);u.push((()=>I.stop()));const R=function(t,e,n){const r=mr({expireDelay:qa});return t.subscribe(1,(({startClocks:t})=>{r.add({},t.relative)})),t.subscribe(6,(({endClocks:t})=>{r.closeActive(t.relative)})),e.register(0,(({startTime:t,eventType:e})=>{if(!n.trackFeatureFlagsForEvents.concat([bo,vo]).includes(e))return Kn;const o=r.find(t);return!o||M(o)?Kn:{type:e,feature_flags:o}})),{addFeatureFlagEvaluation:(t,e)=>{const n=r.find();n&&(n[t]=e)}}}(d,f,t);!function(t,e,n,r){t.register(0,(({eventType:t,startTime:o})=>{const i=e.findTrackedSession(o),s=r.findView(o);if(!i||!s)return Wn;let a,c,u;return t===bo?(a=!!n.getReplayStats(s.id)||void 0,c=1===i.sessionReplay,u=!!s.sessionIsActive&&void 0):a=!!n.isRecording()||void 0,{type:t,session:{id:i.id,type:"user",has_replay:a,sampled_for_replay:c,is_active:u}}})),t.register(1,(({startTime:t})=>{const n=e.findTrackedSession(t);return n?{session:{id:n.id}}:Kn}))}(f,S,e,A),function(t){t.register(0,(({eventType:t})=>({type:t,connectivity:xn()})))}(f),function(t,e){t.register(1,(()=>e.isGranted()?Kn:Wn))}(f,i);const N=function(t,e,n){const r=Wr();return e.storeContextsAcrossPages&&Hr(e,r,n,2),t.register(0,(()=>({context:r.getContext()}))),r}(f,t,"rum"),O=function(t,e,n,r){const o=Kr();return e.storeContextsAcrossPages&&Hr(e,o,r,1),t.register(0,(({eventType:t,startTime:r})=>{const i=o.getContext(),s=n.findTrackedSession(r);return s&&s.anonymousId&&!i.anonymous_id&&e.trackAnonymousUser&&(i.anonymous_id=s.anonymousId),M(i)?Kn:{type:t,usr:i}})),t.register(1,(({startTime:t})=>{var e;return{anonymous_id:null===(e=n.findTrackedSession(t))||void 0===e?void 0:e.anonymousId}})),o}(f,t,S,"rum"),L=function(t,e,n){const r=Gr();return e.storeContextsAcrossPages&&Hr(e,r,n,4),t.register(0,(()=>{const t=r.getContext();return M(t)||!t.id?Kn:{account:t}})),r}(f,t,"rum"),{actionContexts:P,addAction:D,addEvent:U,stop:z}=function(t,e,n,r,o,i,s){const a=function(t,e,n,r,o){const{unsubscribe:i}=t.subscribe(0,(e=>{t.notify(12,Ks(e))}));e.register(0,(({startTime:t,eventType:e})=>{if(e!==vo&&e!==_o&&e!==yo)return Kn;const n=s.findActionId(t);return n?{type:e,action:{id:n}}:Kn})),e.register(1,(({startTime:t})=>({action:{id:s.findActionId(t)}})));let s={findActionId:nt},a=nt;return o.trackUserInteractions&&({actionContexts:s,stop:a}=Gs(t,n,r,o)),{addAction:e=>{t.notify(12,Ks(e))},actionContexts:s,stop:()=>{i(),a()}}}(t,e,o,i,n),c=function(t){return{addEvent:(e,n,r,o)=>{fc.includes(n.type)&&t.notify(12,{startTime:e,rawRumEvent:n,domainContext:r,duration:o})}}}(t),u=function(t,e){let n;const r=requestAnimationFrame(q((()=>{n=Ia()}))),o=Aa(e).subscribe((t=>{n=t})).unsubscribe;return t.register(0,(({eventType:t})=>({type:t,display:n?{viewport:n}:void 0}))),{stop:()=>{o(),r&&cancelAnimationFrame(r)}}}(e,n),l=function(t,e,n=Qa(t,nc)){var r;let o=vt(nc)||(null===(r=window.Cypress)||void 0===r?void 0:r.env("traceId"));const i=n.subscribe((t=>{o=t}));return e.register(0,(({eventType:t})=>"string"!=typeof o?Kn:{type:t,session:{type:"ci_test"},ci_test:{test_execution_id:o}})),{stop:()=>{i.unsubscribe()}}}(n,e);return function(t){t.register(0,(({eventType:t})=>yr()?{type:t,session:{type:"synthetics"},synthetics:{test_id:gr(),result_id:vr(),injected:hr()}}:Kn))}(e),lc(n,t,e,s),{pageStateHistory:r,addAction:a.addAction,addEvent:c.addEvent,actionContexts:a.actionContexts,stop:()=>{a.stop(),l.stop(),u.stop(),r.stop()}}}(d,f,t,C,k,E,p);u.push(z);const{addTiming:$,startView:V,setViewName:B,setViewContext:F,setViewContextProperty:j,getViewContext:H,stop:G}=Ua(d,f,t,location,k,E,T,e,A,r);u.push(G);const{stop:W}=function(t,e){if(!e.metricsEnabled)return{stop:nt};const{unsubscribe:n}=t.subscribe(4,(({initialViewMetrics:t})=>{var e,r;t.largestContentfulPaint&&t.navigationTimings&&(ir("Initial view metrics",{metrics:(e=t.largestContentfulPaint,r=t.navigationTimings,{lcp:{value:e.value},navigation:{domComplete:r.domComplete,domContentLoaded:r.domContentLoaded,domInteractive:r.domInteractive,firstByte:r.firstByte,loadEvent:r.loadEvent}})}),n())}));return{stop:n}}(d,b);u.push(W);const{stop:K}=ia(d,t,C);if(u.push(K),t.trackLongTasks)if(Bi(zi.LONG_ANIMATION_FRAME)){const{stop:e}=function(t,e){const n=$i(e,{type:zi.LONG_ANIMATION_FRAME,buffered:!0}).subscribe((e=>{for(const n of e){const e=h(n.startTime),r={date:e.timeStamp,long_task:{id:rt(),entry_type:ko,duration:y(n.duration),blocking_duration:y(n.blockingDuration),first_ui_event_timestamp:y(n.firstUIEventTimestamp),render_start:y(n.renderStart),style_and_layout_start:y(n.styleAndLayoutStart),start_time:y(n.startTime),scripts:n.scripts.map((t=>({duration:y(t.duration),pause_duration:y(t.pauseDuration),forced_style_and_layout_duration:y(t.forcedStyleAndLayoutDuration),start_time:y(t.startTime),execution_start:y(t.executionStart),source_url:t.sourceURL,source_function_name:t.sourceFunctionName,source_char_position:t.sourceCharPosition,invoker:t.invoker,invoker_type:t.invokerType,window_attribution:t.windowAttribution})))},type:yo,_dd:{discarded:!1}};t.notify(12,{rawRumEvent:r,startTime:e.relative,duration:n.duration,domainContext:{performanceEntry:n}})}}));return{stop:()=>n.unsubscribe()}}(d,t);u.push(e)}else!function(t,e){const n=$i(e,{type:zi.LONG_TASK,buffered:!0}).subscribe((n=>{for(const r of n){if(r.entryType!==zi.LONG_TASK)break;if(!e.trackLongTasks)break;const n=h(r.startTime),o={date:n.timeStamp,long_task:{id:rt(),entry_type:So,duration:y(r.duration)},type:yo,_dd:{discarded:!1}};t.notify(12,{rawRumEvent:o,startTime:n.relative,duration:r.duration,domainContext:{performanceEntry:r}})}}))}(d,t);const{addError:Y}=Ys(d,t,a);a.unbuffer(),Li(d,t,S,O,L);const Z=Mo(d,C,s),Q=function(t,e,n,r,o){return{get:i=>{const s=n.findView(i),a=o.findUrl(i),c=e.findTrackedSession(i);if(c&&s&&a){const e=r.findActionId(i);return{application_id:t,session_id:c.id,user_action:e?{id:e}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}(t.applicationId,S,A,P,I);return u.push((()=>n.stop())),{addAction:D,addEvent:U,addError:Y,addTiming:$,addFeatureFlagEvaluation:R.addFeatureFlagEvaluation,startView:V,setViewContext:F,setViewContextProperty:j,getViewContext:H,setViewName:B,lifeCycle:d,viewHistory:A,session:S,stopSession:()=>S.expire(),getInternalContext:Q.get,startDurationVital:Z.startDurationVital,stopDurationVital:Z.stopDurationVital,addDurationVital:Z.addDurationVital,addOperationStepVital:Z.addOperationStepVital,globalContext:N,userContext:O,accountContext:L,telemetry:b,stop:()=>{u.forEach((t=>t()))},hooks:f}}),Nc,Oc,{startDeflateWorker:wc,createDeflateEncoder:vc,sdkName:"rum"});!function(t,e,n){const r=t[e];r&&!r.q&&r.version&&o.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),t[e]=n,r&&r.q&&r.q.forEach((t=>c(t,"onReady callback threw an error:")()))}(D(),"DD_RUM",Lc);globalThis.DD_RUM=Lc;const Mc=2,Pc=3,Dc=4,Uc=6,zc=7,$c=8,Vc=9,Bc=0,Fc=1,qc=2,jc=3,Hc=4,Gc=11,Wc=0,Kc=1,Jc=2,Yc=3,Zc=4,Xc=5,Qc=6,tu=7,eu=8,nu=5,ru=6,ou=0,iu=1;function su(t){return Boolean(t.changedTouches)}function au(t){return!0===t.composed&&ji(t.target)?t.composedPath()[0]:t.target}const cu=(t,e)=>{const 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},uu=t=>({scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width});function lu(t,e){return{data:{source:t,...e},type:Pc,timestamp:_()}}function du(t,e,n){const{throttled:r,cancel:o}=et((t=>{const r=au(t),o=e.nodeIds.get(r);if(void 0===o)return;const i=fu(t);if(!i)return;const s={id:o,timeOffset:0,x:i.x,y:i.y};n(lu(su(t)?Qc:Kc,{positions:[s]}))}),50,{trailing:!1}),{stop:i}=mn(t,document,["mousemove","touchmove"],r,{capture:!0,passive:!0});return{stop:()=>{i(),o()}}}function fu(t){let{clientX:e,clientY:n}=su(t)?t.changedTouches[0]:t;if(window.visualViewport){const{visualViewportX:t,visualViewportY:r}=cu(e,n);e=t,n=r}if(Number.isFinite(e)&&Number.isFinite(n))return{x:e,y:n}}const pu={pointerup:0,mousedown:1,click:2,contextmenu:3,dblclick:4,focus:nu,blur:ru,touchstart:7,touchend:9};function mu(t,e,n,r){return mn(t,document,Object.keys(pu),(o=>{const i=au(o),s=e.nodeIds.get(i);if(void 0===s||ys(i,t.defaultPrivacyLevel)===ds.HIDDEN)return;const a=pu[o.type];let c;if(a!==ru&&a!==nu){const t=fu(o);if(!t)return;c={id:s,type:a,x:t.x,y:t.y}}else c={id:s,type:a};const u={id:r.getIdForEvent(o),...lu(Jc,c)};n(u)}),{capture:!0,passive:!0})}function hu(t,e,n,r,o=document){const{throttled:i,cancel:s}=et((o=>{const i=au(o);if(!i)return;const s=e.nodeIds.get(i);if(void 0===s||ys(i,t.defaultPrivacyLevel)===ds.HIDDEN)return;const a=i===document?{scrollTop:xa(),scrollLeft:Ea()}:{scrollTop:Math.round(i.scrollTop),scrollLeft:Math.round(i.scrollLeft)};r.set(i,a),n(lu(Yc,{id:s,x:a.scrollLeft,y:a.scrollTop}))}),100),{stop:a}=pn(t,o,"scroll",i,{capture:!0,passive:!0});return{stop:()=>{a(),s()}}}function gu(t,e){const n=Aa(t).subscribe((t=>{e(lu(Zc,t))}));return{stop:()=>{n.unsubscribe()}}}function vu(t,e){const n=window.visualViewport;if(!n)return{stop:nt};const{throttled:r,cancel:o}=et((()=>{e({data:uu(n),type:$c,timestamp:_()})}),200,{trailing:!1}),{stop:i}=mn(t,n,["resize","scroll"],r,{capture:!0,passive:!0});return{stop:()=>{i(),o()}}}function yu(t,e,n){return mn(t,document,["play","pause"],(r=>{const o=au(r);if(!o)return;const i=e.nodeIds.get(o);void 0!==i&&ys(o,t.defaultPrivacyLevel)!==ds.HIDDEN&&n(lu(tu,{id:i,type:"play"===r.type?ou:iu}))}),{capture:!0,passive:!0})}function bu(t,e){function n(e,n){if(!e||!e.ownerNode)return;const r=t.nodeIds.get(e.ownerNode);void 0!==r&&n(r)}const r=[je(CSSStyleSheet.prototype,"insertRule",(({target:t,parameters:[r,o]})=>{n(t,(t=>e(lu(eu,{id:t,adds:[{rule:r,index:o}]}))))})),je(CSSStyleSheet.prototype,"deleteRule",(({target:t,parameters:[r]})=>{n(t,(t=>e(lu(eu,{id:t,removes:[{index:r}]}))))}))];function o(t){r.push(je(t.prototype,"insertRule",(({target:t,parameters:[r,o]})=>{n(t.parentStyleSheet,(n=>{const i=_u(t);i&&(i.push(o||0),e(lu(eu,{id:n,adds:[{rule:r,index:i}]})))}))})),je(t.prototype,"deleteRule",(({target:t,parameters:[r]})=>{n(t.parentStyleSheet,(n=>{const o=_u(t);o&&(o.push(r),e(lu(eu,{id:n,removes:[{index:o}]})))}))})))}return"undefined"!=typeof CSSGroupingRule?o(CSSGroupingRule):(o(CSSMediaRule),o(CSSSupportsRule)),{stop:()=>{r.forEach((t=>t.stop()))}}}function _u(t){const e=[];let n=t;for(;n.parentRule;){const t=Array.from(n.parentRule.cssRules).indexOf(n);e.unshift(t),n=n.parentRule}if(!n.parentStyleSheet)return;const r=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return e.unshift(r),e}function wu(t,e){return mn(t,window,["focus","blur"],(()=>{e({data:{has_focus:document.hasFocus()},type:Uc,timestamp:_()})}))}function Su(t,e,n){const r=t.subscribe(12,(t=>{var r,o;t.rawRumEvent.type===go&&t.rawRumEvent.action.type===Co&&(null===(o=null===(r=t.rawRumEvent.action.frustration)||void 0===r?void 0:r.type)||void 0===o?void 0:o.length)&&"events"in t.domainContext&&t.domainContext.events&&t.domainContext.events.length&&e({timestamp:t.rawRumEvent.date,type:Vc,data:{frustrationTypes:t.rawRumEvent.action.frustration.type,recordIds:t.domainContext.events.map((t=>n.getIdForEvent(t)))}})}));return{stop:()=>{r.unsubscribe()}}}function ku(t,e){const n=t.subscribe(5,(()=>{e({timestamp:_(),type:zc})}));return{stop:()=>{n.unsubscribe()}}}function Tu(t,e){const n=t.tagName,r=t.value;if(ws(t,e)){const e=t.type;if("INPUT"===n&&("button"===e||"submit"===e||"reset"===e))return r;if(!r||"OPTION"===n)return;return ms}return"OPTION"===n||"SELECT"===n?t.value:"INPUT"===n||"TEXTAREA"===n?r:void 0}const Eu=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,xu=/^[A-Za-z]+:|^\/\//,Cu=/^["']?data:.*,/i;function Au(t,e){return t.replace(Eu,((t,n,r,o,i,s)=>{const a=r||i||s;if(!e||!a||xu.test(a)||Cu.test(a))return t;const c=n||o||"";return`url(${c}${function(t,e){try{return pt(t,e).href}catch(e){return t}}(a,e)}${c})`}))}const Iu=/[^a-z1-6-_]/;function Ru(t){const e=t.toLowerCase().trim();return Iu.test(e)?"div":e}function Nu(t,e){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${e}' style='background-color:silver'%3E%3C/svg%3E`}function Ou(t){if(void 0!==t&&0!==t.length)return t.map((t=>{const e=t.cssRules||t.rules;return{cssRules:Array.from(e,(t=>t.cssText)),disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0}}))}function Lu(t,e,n,r){if(e===ds.HIDDEN)return null;const o=t.getAttribute(n);if(e===ds.MASK&&n!==fs&&!ts.includes(n)&&n!==r.actionNameAttribute){const e=t.tagName;switch(n){case"title":case"alt":case"placeholder":return ms}if("IMG"===e&&("src"===n||"srcset"===n)){const e=t;if(e.naturalWidth>0)return Nu(e.naturalWidth,e.naturalHeight);const{width:n,height:r}=t.getBoundingClientRect();return n>0||r>0?Nu(n,r):hs}if("SOURCE"===e&&("src"===n||"srcset"===n))return hs;if("A"===e&&"href"===n)return ms;if(o&&n.startsWith("data-"))return ms;if("IFRAME"===e&&"srcdoc"===n)return ms}return o&&"string"==typeof o?Ii(o,1e6):o}function Mu(t,e,n){t[e].count+=1,t[e].max=Math.max(t[e].max,n),t[e].sum+=n}function Pu(t){if(!t)return null;let e;try{e=t.rules||t.cssRules}catch(t){}if(!e)return null;return Au(Array.from(e,1===dt()?Du:Uu).join(""),t.href)}function Du(t){if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")){const e=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return t.cssText.replace(e,"$1\\$2")}return Uu(t)}function Uu(t){return function(t){return"styleSheet"in t}(t)&&Pu(t.styleSheet)||t.cssText}function zu(t,e,n){const r=function(t,e,n){switch(t.nodeType){case t.DOCUMENT_NODE:return function(t,e,n){return{type:Bc,childNodes:$u(t,e,n),adoptedStyleSheets:Ou(t.adoptedStyleSheets)}}(t,e,n);case t.DOCUMENT_FRAGMENT_NODE:return function(t,e,n){const r=Hi(t);r&&n.serializationContext.shadowRootsController.addShadowRoot(t);return{type:Gc,childNodes:$u(t,e,n),isShadowRoot:r,adoptedStyleSheets:r?Ou(t.adoptedStyleSheets):void 0}}(t,e,n);case t.DOCUMENT_TYPE_NODE:return{type:Fc,name:(r=t).name,publicId:r.publicId,systemId:r.systemId};case t.ELEMENT_NODE:return function(t,e,n){const r=Ru(t.tagName),o=(s=t,"svg"===s.tagName||s instanceof SVGElement||void 0),i=bs(_s(t),e);var s;if(i===ds.HIDDEN){const{width:e,height:n}=t.getBoundingClientRect();return{type:qc,tagName:r,attributes:{rr_width:`${e}px`,rr_height:`${n}px`,[fs]:ps},childNodes:[],isSVG:o}}if(i===ds.IGNORE)return;const a=function(t,e,n){if(e===ds.HIDDEN)return{};const r={},o=Ru(t.tagName),i=t.ownerDocument;for(let o=0;o<t.attributes.length;o+=1){const i=t.attributes.item(o).name,s=Lu(t,e,i,n.configuration);null!==s&&(r[i]=s)}if(t.value&&("textarea"===o||"select"===o||"option"===o||"input"===o)){const n=Tu(t,e);void 0!==n&&(r.value=n)}if("option"===o&&e===ds.ALLOW){const e=t;e.selected&&(r.selected=e.selected)}if("link"===o){const e=Array.from(i.styleSheets).find((e=>e.href===t.href)),o=Pu(e);o&&e&&(Mu(n.serializationContext.serializationStats,"cssText",o.length),r._cssText=o)}if("style"===o&&t.sheet){const e=Pu(t.sheet);e&&(Mu(n.serializationContext.serializationStats,"cssText",e.length),r._cssText=e)}const s=t;if("input"!==o||"radio"!==s.type&&"checkbox"!==s.type||(e===ds.ALLOW?r.checked=!!s.checked:ws(s,e)&&delete r.checked),"audio"===o||"video"===o){const e=t;r.rr_mediaState=e.paused?"paused":"played"}let a,c;const u=n.serializationContext;switch(u.status){case 0:a=Math.round(t.scrollTop),c=Math.round(t.scrollLeft),(a||c)&&u.elementsScrollPositions.set(t,{scrollTop:a,scrollLeft:c});break;case 1:u.elementsScrollPositions.has(t)&&({scrollTop:a,scrollLeft:c}=u.elementsScrollPositions.get(t))}return c&&(r.rr_scrollLeft=c),a&&(r.rr_scrollTop=a),r}(t,i,n);let c=[];(function(t){return t.childNodes.length>0||ji(t)})(t)&&"style"!==r&&(c=$u(t,i,n));return{type:qc,tagName:r,attributes:a,childNodes:c,isSVG:o}}(t,e,n);case t.TEXT_NODE:return function(t,e){const n=Ts(t,e);if(void 0===n)return;return{type:jc,textContent:n}}(t,e);case t.CDATA_SECTION_NODE:return{type:Hc,textContent:""}}var r}(t,e,n);if(!r)return null;const o=n.scope.nodeIds.assign(t),i=r;return i.id=o,n.serializedNodeIds&&n.serializedNodeIds.add(o),i}function $u(t,e,n){const r=[];return Gi(t,(t=>{const o=zu(t,e,n);o&&r.push(o)})),r}function Vu(t,e,n,r){const o=_(),i=zu(t,e.defaultPrivacyLevel,{serializationContext:r,configuration:e,scope:n});return Mu(r.serializationStats,"serializationDuration",T(o,_())),i}function Bu(t,e,n,r=document){const o=t.defaultPrivacyLevel,i=new WeakMap,s=r!==document,{stop:a}=mn(t,r,s?["change"]:["input","change"],(t=>{const e=au(t);(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)&&u(e)}),{capture:!0,passive:!0});let c;if(s)c=nt;else{const t=[He(HTMLInputElement.prototype,"value",u),He(HTMLInputElement.prototype,"checked",u),He(HTMLSelectElement.prototype,"value",u),He(HTMLTextAreaElement.prototype,"value",u),He(HTMLSelectElement.prototype,"selectedIndex",u)];c=()=>{t.forEach((t=>t.stop()))}}return{stop:()=>{c(),a()}};function u(t){const n=ys(t,o);if(n===ds.HIDDEN)return;const r=t.type;let i;if("radio"===r||"checkbox"===r){if(ws(t,n))return;i={isChecked:t.checked}}else{const e=Tu(t,n);if(void 0===e)return;i={text:e}}l(t,i,e);const s=t.name;"radio"===r&&s&&t.checked&&document.querySelectorAll(`input[type="radio"][name="${CSS.escape(s)}"]`).forEach((n=>{n!==t&&l(n,{isChecked:!1},e)}))}function l(t,e,r){const o=r.nodeIds.get(t);if(void 0===o)return;const s=i.get(t);s&&s.text===e.text&&s.isChecked===e.isChecked||(i.set(t,e),n(lu(Xc,{id:o,...e})))}}function Fu(t,e,n,r,o){const i=fi();if(!i)return{stop:nt,flush:nt};const s=function(t){let e=nt,n=[];function r(){e(),t(n),n=[]}const{throttled:o,cancel:i}=et(r,16,{leading:!1});return{addMutations:t=>{0===n.length&&(e=Pr(o,{timeout:100})),n.push(...t)},flush:r,stop:()=>{e(),i()}}}((o=>{!function(t,e,n,r,o){const i=new Map;t.filter((t=>"childList"===t.type)).forEach((t=>{t.removedNodes.forEach((t=>{qu(t,o.removeShadowRoot)}))}));const s=t.filter((t=>t.target.isConnected&&r.nodeIds.areAssignedForNodeAndAncestors(t.target)&&ys(t.target,n.defaultPrivacyLevel,i)!==ds.HIDDEN)),a={cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}},{adds:c,removes:u,hasBeenSerialized:l}=function(t,e,n,r,o,i){const s=new Set,a=new Map;for(const e of t)e.addedNodes.forEach((t=>{s.add(t)})),e.removedNodes.forEach((t=>{s.has(t)||a.set(t,e.target),s.delete(t)}));const c=Array.from(s);u=c,u.sort(((t,e)=>{const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_CONTAINS||n&Node.DOCUMENT_POSITION_FOLLOWING?1:n&Node.DOCUMENT_POSITION_PRECEDING?-1:0}));var u;const l=new Set,d={status:2,serializationStats:r,shadowRootsController:o},f=[];for(const t of c){if(m(t))continue;const o=ys(t.parentNode,e.defaultPrivacyLevel,i);if(o===ds.HIDDEN||o===ds.IGNORE)continue;const s=_(),a=zu(t,o,{serializedNodeIds:l,serializationContext:d,configuration:e,scope:n});if(Mu(r,"serializationDuration",T(s,_())),!a)continue;const c=Wi(t);f.push({nextId:h(t),parentId:n.nodeIds.get(c),node:a})}const p=[];return a.forEach(((t,e)=>{const r=n.nodeIds.get(t),o=n.nodeIds.get(e);void 0!==r&&void 0!==o&&p.push({parentId:r,id:o})})),{adds:f,removes:p,hasBeenSerialized:m};function m(t){const e=n.nodeIds.get(t);return void 0!==e&&l.has(e)}function h(t){let e=t.nextSibling;for(;e;){const t=n.nodeIds.get(e);if(void 0!==t)return t;e=e.nextSibling}return null}}(s.filter((t=>"childList"===t.type)),n,r,a,o,i),d=function(t,e,n,r){var o;const i=[],s=new Set,a=t.filter((t=>!s.has(t.target)&&(s.add(t.target),!0)));for(const t of a){if(t.target.textContent===t.oldValue)continue;const s=n.nodeIds.get(t.target);if(void 0===s)continue;const a=ys(Wi(t.target),e.defaultPrivacyLevel,r);a!==ds.HIDDEN&&a!==ds.IGNORE&&i.push({id:s,value:null!==(o=Ts(t.target,a))&&void 0!==o?o:null})}return i}(s.filter((t=>"characterData"===t.type&&!l(t.target))),n,r,i),f=function(t,e,n,r){const o=[],i=new Map,s=t.filter((t=>{const e=i.get(t.target);return(!e||!e.has(t.attributeName))&&(e?e.add(t.attributeName):i.set(t.target,new Set([t.attributeName])),!0)})),a=new Map;for(const t of s){if(t.target.getAttribute(t.attributeName)===t.oldValue)continue;const i=n.nodeIds.get(t.target);if(void 0===i)continue;const s=ys(t.target,e.defaultPrivacyLevel,r),c=Lu(t.target,s,t.attributeName,e);let u;if("value"===t.attributeName){const e=Tu(t.target,s);if(void 0===e)continue;u=e}else u="string"==typeof c?c:null;let l=a.get(t.target);l||(l={id:i,attributes:{}},o.push(l),a.set(t.target,l)),l.attributes[t.attributeName]=u}return o}(s.filter((t=>"attributes"===t.type&&!l(t.target))),n,r,i);if(!(d.length||f.length||u.length||c.length))return;e(lu(Wc,{adds:c,removes:u,texts:d,attributes:f}),a)}(o.concat(a.takeRecords()),t,e,n,r)})),a=new i(q(s.addMutations));return a.observe(o,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{a.disconnect(),s.stop()},flush:()=>{s.flush()}}}function qu(t,e){ji(t)&&e(t.shadowRoot),Gi(t,(t=>qu(t,e)))}function ju(t){const{emit:e,configuration:n,lifeCycle:r}=t;if(!e)throw new Error("emit function is required");const o=(n,r)=>{e(n,r),Sn("record",{record:n});const o=t.viewHistory.findView();gc(o.id).records_count+=1},i=function(){const t=new WeakMap;return{set(e,n){(e!==document||document.scrollingElement)&&t.set(e===document?document.scrollingElement:e,n)},get:e=>t.get(e),has:e=>t.has(e)}}(),s={nodeIds:function(){const t=new WeakMap;let e=1;const n=e=>t.get(e);return{assign:r=>{let o=n(r);return void 0===o&&(o=e++,t.set(r,o)),o},get:n,areAssignedForNodeAndAncestors:t=>{let e=t;for(;e;){if(void 0===n(e)&&!Hi(e))return!1;e=Wi(e)}return!0}}}()};const a=((t,e,n,r)=>{const o=new Map,i={addShadowRoot:s=>{if(o.has(s))return;const a=Fu(n,t,e,i,s),c=Bu(t,e,n,s),u=hu(t,e,n,r,s);o.set(s,{flush:()=>a.flush(),stop:()=>{a.stop(),c.stop(),u.stop()}})},removeShadowRoot:t=>{const e=o.get(t);e&&(e.stop(),o.delete(t))},stop:()=>{o.forEach((({stop:t})=>t()))},flush:()=>{o.forEach((({flush:t})=>t()))}};return i})(n,s,o,i),{stop:c}=function(t,e,n,r,o,i,s){const a=(n,i)=>{const{width:a,height:c}=Ia();s({data:{height:c,href:window.location.href,width:a},type:Dc,timestamp:n}),s({data:{has_focus:document.hasFocus()},type:Uc,timestamp:n});const u={cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}};s({data:{node:Vu(document,r,o,{status:i,elementsScrollPositions:t,serializationStats:u,shadowRootsController:e}),initialOffset:{left:Ea(),top:xa()}},type:Mc,timestamp:n},u),window.visualViewport&&s({data:uu(window.visualViewport),type:$c,timestamp:n})};a(_(),0);const{unsubscribe:c}=n.subscribe(2,(t=>{i(),a(t.startClocks.timeStamp,1)}));return{stop:c}}(i,a,r,n,s,u,o);function u(){a.flush(),d.flush()}const l=function(){const t=new WeakMap;let e=1;return{getIdForEvent:n=>(t.has(n)||t.set(n,e++),t.get(n))}}(),d=Fu(o,n,s,a,document),f=[d,du(n,s,o),mu(n,s,o,l),hu(n,s,o,i,document),gu(n,o),Bu(n,s,o),yu(n,s,o),bu(s,o),wu(n,o),vu(n,o),Su(r,o,l),ku(r,(t=>{u(),o(t)}))];return{stop:()=>{a.stop(),f.forEach((t=>t.stop())),c()},flushMutations:u,shadowRootsController:a}}function Hu({context:t,creationReason:e,encoder:n}){let r=0;const o=t.view.id,i=function(t){return gc(t).segments_count}(o),s={start:1/0,end:-1/0,creation_reason:e,records_count:0,has_full_snapshot:!1,index_in_view:i,source:"browser",...t},a={cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}};return function(t){gc(t).segments_count+=1}(o),{addRecord:function(t,e,o){s.start=Math.min(s.start,t.timestamp),s.end=Math.max(s.end,t.timestamp),s.records_count+=1,s.has_full_snapshot||(s.has_full_snapshot=t.type===Mc),e&&function(t,e){for(const n of["cssText","serializationDuration"])t[n].count+=e[n].count,t[n].max=Math.max(t[n].max,e[n].max),t[n].sum+=e[n].sum}(a,e);const i=n.isEmpty?'{"records":[':",";n.write(i+JSON.stringify(t),(t=>{r+=t,o(r)}))},flush:function(t){if(n.isEmpty)throw new Error("Empty segment flushed");n.write(`],${JSON.stringify(s).slice(1)}\n`),n.finish((e=>{!function(t,e){gc(t).segments_total_raw_size+=e}(s.view.id,e.rawBytesCount),t(s,a,e)}))}}}let Gu=6e4;function Wu(t,e,n,r,o,i){return function(t,e,n,r){let o={status:0,nextSegmentCreationReason:"init"};const{unsubscribe:i}=t.subscribe(2,(()=>{a("view_change")})),{unsubscribe:s}=t.subscribe(11,(t=>{a(t.reason)}));function a(t){1===o.status&&(o.segment.flush(((e,r,o)=>{const i=function(t,e,n,r){const o=new FormData;o.append("segment",new Blob([t],{type:"application/octet-stream"}),`${e.session.id}-${e.start}`);const i={raw_segment_size:r,compressed_segment_size:t.byteLength,...e},s=JSON.stringify(i);return o.append("event",new Blob([s],{type:"application/json"})),{data:o,bytesCount:t.byteLength,cssText:n.cssText,isFullSnapshot:0===e.index_in_view,rawSize:r,recordCount:e.records_count,serializationDuration:n.serializationDuration}}(o.output,e,r,o.rawBytesCount);qn(t)?n.sendOnExit(i):n.send(i)})),K(o.expirationTimeoutId)),o="stop"!==t?{status:0,nextSegmentCreationReason:t}:{status:2}}return{addRecord:(t,n)=>{if(2!==o.status){if(0===o.status){const t=e();if(!t)return;o={status:1,segment:Hu({encoder:r,context:t,creationReason:o.nextSegmentCreationReason}),expirationTimeoutId:W((()=>{a("segment_duration_limit")}),5e3)}}o.segment.addRecord(t,n,(t=>{t>Gu&&a("segment_bytes_limit")}))}},stop:()=>{a("stop"),i(),s()}}}(t,(()=>function(t,e,n){const r=e.findTrackedSession(),o=n.findView();if(!r||!o)return;return{application:{id:t},session:{id:r.id},view:{id:o.id}}}(e.applicationId,n,r)),o,i)}var Ku=Object.freeze({__proto__:null,startRecording:function(t,e,n,r,o,i,s){const a=[],c=s||Mn([e.sessionReplayEndpointBuilder],Gu,(e=>{t.notify(14,{error:e}),rr("Error reported to customer",{"error.message":e.message})}));let u;if(Bn())({addRecord:u}=function(t){const e=$n();return{addRecord:n=>{const r=t.findView();e.send("record",n,r.id)}}}(r));else{const s=Wu(t,e,n,r,c,o);u=s.addRecord,a.push(s.stop);const l=function(t,e){if(!t.metricsEnabled)return{stop:nt};const{unsubscribe:n}=e.subscribe((t=>{var e,n,r;("failure"===t.type||"queue-full"===t.type||"success"===t.type&&t.payload.isFullSnapshot)&&ir("Segment network request metrics",{metrics:(e=t.type,n=t.bandwidth,{cssText:{count:(r=t.payload).cssText.count,max:r.cssText.max,sum:r.cssText.sum},isFullSnapshot:r.isFullSnapshot,ongoingRequests:{count:n.ongoingRequestCount,totalSize:n.ongoingByteCount},recordCount:r.recordCount,result:e,serializationDuration:{count:r.serializationDuration.count,max:r.serializationDuration.max,sum:r.serializationDuration.sum},size:{compressed:r.bytesCount,raw:r.rawSize}})})}));return{stop:n}}(i,c.observable);a.push(l.stop)}const{stop:l}=ju({emit:u,configuration:e,lifeCycle:t,viewHistory:r});return a.push(l),{stop:()=>{a.forEach((t=>t()))}}}});const Ju=new Map;function Yu(t){for(const e of Ju.keys())e<t&&Ju.delete(e)}function Zu({rawRumEvent:t,startTime:e}){if(t.type!==yo)return;!function(t,e){Ju.set(e,t)}(t.long_task.id,e)}const Xu=/\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g;const Qu=(t,e)=>t||function(t){return t?t.replace(Xu,"/?"):"/"}(e);function tl(t,e,n){const r={application:{id:e}};n&&(r.session={id:n});const{ids:o,names:i}=function(t){const e={ids:[],names:[]};for(const n of t)e.ids.push(n.viewId),n.viewName&&e.names.push(n.viewName);return e.names=Array.from(new Set(e.names)),e}(t.views);o.length&&(r.view={id:o,name:i});const s=t.longTasks.map((t=>t.id)).filter((t=>void 0!==t));return s.length&&(r.long_task={id:s}),r}function el(t,e,n){const r=function(t,e,n){const r=_n(e),o=tl(t,e.applicationId,n),i=function(t){const e=t.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"]);return e}(r),s={...o,attachments:["wall-time.json"],start:new Date(t.startClocks.timeStamp).toISOString(),end:new Date(t.endClocks.timeStamp).toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:i.join(","),_dd:{clock_drift:v()}};return s}(t,e,n);return{event:r,"wall-time.json":t}}const nl={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};var rl=Object.freeze({__proto__:null,DEFAULT_RUM_PROFILER_CONFIGURATION:nl,createRumProfiler:function(t,e,n,r,i,s=nl){const a=function(t,e,n,r){const o=Mn([t.profilingEndpointBuilder],t.batchBytesLimit,(t=>{e.notify(14,{error:t}),rr("Error reported to customer",{"error.message":t.message})})),i=n(r);return{async send({event:t,...e}){const n=new FormData,r=Ge(t);if(!r)throw new Error("Failed to serialize event");n.append("event",new Blob([r],{type:"application/json"}),"event.json");let s=r.length;for(const[t,r]of kt(e)){const e=Ge(r);if(!e)throw new Error("Failed to serialize attachment");const o=await mc(i,e);s+=o.outputBytesCount,n.append(t,new Blob([o.output]),t)}o.send({data:n,bytesCount:s})}}}(t,e,i,6),c=Bi(zi.LONG_ANIMATION_FRAME);let u;const l=[];let d={state:"stopped"};function f(){const n=D().Profiler;if(!n)throw r.set({status:"error",error_reason:"not-supported-by-browser"}),new Error("RUM Profiler is not supported in this browser.");p(d).catch(H);const{cleanupTasks:i,observer:a}=function(n){if("running"===n.state)return{cleanupTasks:n.cleanupTasks,observer:n.observer};const r=[];let o;if(t.trackLongTasks){o=new PerformanceObserver(y),o.observe({entryTypes:[c?"long-animation-frame":"longtask"]});const t=e.subscribe(12,(t=>{Zu(t)}));r.push((()=>null==o?void 0:o.disconnect())),r.push(t.unsubscribe)}const i=e.subscribe(2,(t=>{const e={viewId:t.id,viewName:Qu(t.name,document.location.pathname),startClocks:t.startClocks};g(e),u=e}));return r.push(i.unsubscribe),{cleanupTasks:r,observer:o}}(d);let l;try{l=new n({sampleInterval:s.sampleIntervalMs,maxBufferSize:Math.round(1.5*s.collectIntervalMs/s.sampleIntervalMs)})}catch(t){return void(t instanceof Error&&t.message.includes("disabled by Document Policy")?(o.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",t),r.set({status:"error",error_reason:"missing-document-policy-header"})):r.set({status:"error",error_reason:"unexpected-exception"}))}r.set({status:"running",error_reason:void 0}),d={state:"running",startClocks:S(),profiler:l,timeoutId:W(f,s.collectIntervalMs),longTasks:[],views:[],cleanupTasks:i,observer:a},g(u),l.addEventListener("samplebufferfull",v)}async function p(e){var r,o;if("running"!==e.state)return;b(null!==(o=null===(r=e.observer)||void 0===r?void 0:r.takeRecords())&&void 0!==o?o:[]),K(e.timeoutId),e.profiler.removeEventListener("samplebufferfull",v);const{startClocks:i,longTasks:c,views:u}=e,l=S();await e.profiler.stop().then((e=>{const r=S(),o=c.length>0,d=T(i.timeStamp,r.timeStamp)<s.minProfileDurationMs,f=function(t){let e=0;for(const n of t)void 0!==n.stackId&&e++;return e}(e.samples)<s.minNumberOfSamples;(o||!d&&!f)&&(!function(e){var r;const o=null===(r=n.findTrackedSession())||void 0===r?void 0:r.id,i=el(e,t,o);a.send(i)}(Object.assign(e,{startClocks:i,endClocks:r,clocksOrigin:k(),longTasks:c,views:u,sampleInterval:s.sampleIntervalMs})),Yu(l.relative))})).catch(H)}async function m(t){"running"===d.state&&(d.cleanupTasks.forEach((t=>t())),await p(d),d={state:t})}function g(t){"running"===d.state&&t&&d.views.push(t)}function v(){f()}function y(t){b(t.getEntries())}function b(t){var e;if("running"===d.state)for(const n of t){if(n.duration<s.sampleIntervalMs)continue;const t=h(n.startTime),r=(e=t.relative,Ju.get(e));d.longTasks.push({id:r,duration:n.duration,entryType:n.entryType,startClocks:t})}}function _(){"hidden"===document.visibilityState&&"running"===d.state?m("paused").catch(H):"visible"===document.visibilityState&&"paused"===d.state&&f()}function w(){f()}return{start:function(e){"running"!==d.state&&(u=e?{startClocks:e.startClocks,viewId:e.id,viewName:Qu(e.name,document.location.pathname)}:void 0,l.push(pn(t,window,"visibilitychange",_).stop,pn(t,window,"beforeunload",w).stop),f())},stop:async function(){await m("stopped"),l.forEach((t=>t())),Yu(S().relative),r.set({status:"stopped",error_reason:void 0})},isStopped:function(){return"stopped"===d.state},isRunning:function(){return"running"===d.state},isPaused:function(){return"paused"===d.state}}}});
1
+ "use strict";const t={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},e=console,n={};Object.keys(t).forEach((t=>{n[t]=e[t]}));const r="Datadog Browser SDK:",o={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)},i="https://docs.datadoghq.com",s=`${i}/real_user_monitoring/browser/troubleshooting`,a="More details:";function c(t,e){return(...n)=>{try{return t(...n)}catch(t){o.error(e,t)}}}function u(t){return 0!==t&&100*Math.random()<=t}function l(t,e){return+t.toFixed(e)}function d(t){return"number"==typeof t}function f(t){return{...t}}function p(t,e){return Object.keys(t).some((n=>t[n]===e))}function h(t){return 0===Object.keys(t).length}function m(t,e){const n={};for(const r of Object.keys(t))n[r]=e(t[r]);return n}function g(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let t=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof t&&(t="object"==typeof self?self:"object"==typeof window?window:{}),t}const v=g(),y="WorkerGlobalScope"in v;function _(t,e){const n=g();let r;return n.Zone&&"function"==typeof n.Zone.__symbol__&&(r=t[n.Zone.__symbol__(e)]),r||(r=t[e]),r}let b,w=!1;function S(t){w=t}function k(t){return function(...e){return T(t,this,e)}}function T(t,e,n){try{return t.apply(e,n)}catch(t){E(t)}}function E(t){if(x(t),b)try{b(t)}catch(t){x(t)}}function x(...t){w&&o.error("[MONITOR]",...t)}function C(t,e){return _(g(),"setTimeout")(k(t),e)}function A(t){_(g(),"clearTimeout")(t)}function I(t,e){return _(g(),"setInterval")(k(t),e)}function R(t){_(g(),"clearInterval")(t)}function N(t){var e;const n=null===(e=v.queueMicrotask)||void 0===e?void 0:e.bind(v);"function"==typeof n?n(k(t)):Promise.resolve().then(k(t))}class O{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach((e=>e(t)))}addObserver(t){this.observers.push(t),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(t){this.observers=this.observers.filter((e=>t!==e)),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function M(...t){return new O((e=>{const n=t.map((t=>t.subscribe((t=>e.notify(t)))));return()=>n.forEach((t=>t.unsubscribe()))}))}class P extends O{constructor(t){super(),this.maxBufferSize=t,this.buffer=[]}notify(t){this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(t)}subscribe(t){let e=!1;const n={unsubscribe:()=>{e=!0,this.removeObserver(t)}};return N((()=>{for(const n of this.buffer){if(e)return;t(n)}e||this.addObserver(t)})),n}unbuffer(){N((()=>{this.maxBufferSize=this.buffer.length=0}))}}const D=1e3,L=6e4,U=31536e6;function z(t){return{relative:t,timeStamp:$(t)}}function $(t){const e=F()-performance.now();return e>J()?Math.round(K(e,t)):function(t){return Math.round(K(J(),t))}(t)}function V(){return Math.round(F()-K(J(),performance.now()))}function B(t){return d(t)?l(1e6*t,0):t}function F(){return(new Date).getTime()}function q(){return F()}function j(){return performance.now()}function H(){return{relative:j(),timeStamp:q()}}function G(){return{relative:0,timeStamp:J()}}function W(t,e){return e-t}function K(t,e){return t+e}function Y(t){return t-J()}let X;function J(){var t,e;return void 0===X&&(X=null!==(e=null===(t=performance.timing)||void 0===t?void 0:t.navigationStart)&&void 0!==e?e:performance.timeOrigin),X}function Z(t,e,n){const r=!n||void 0===n.leading||n.leading,o=!n||void 0===n.trailing||n.trailing;let i,s,a=!1;return{throttled:(...n)=>{a?i=n:(r?t(...n):i=n,a=!0,s=C((()=>{o&&i&&t(...i),a=!1,i=void 0}),e))},cancel:()=>{A(s),a=!1,i=void 0}}}function Q(){}function tt(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,tt)}const et=/(\S+?)\s*=\s*(.+?)(?:;|$)/g;function nt(t,e){for(et.lastIndex=0;;){const n=et.exec(t);if(!n)break;if(n[1]===e)return n[2]}}function rt(t,e,n=""){const r=t.charCodeAt(e-1),o=r>=55296&&r<=56319?e+1:e;return t.length<=o?t:`${t.slice(0,o)}${n}`}let ot,it,st,at;function ct(){return null!=ot?ot:ot=function(t=window){var e;const n=t.navigator.userAgent;if(t.chrome||/HeadlessChrome/.test(n))return 0;if(0===(null===(e=t.navigator.vendor)||void 0===e?void 0:e.indexOf("Apple"))||/safari/i.test(n)&&!/chrome|android/i.test(n))return 1;return 2}()}function ut(t){return lt(t,location.href).href}function lt(t,e){const{URL:n}=function(){if(!it){let t,e;try{t=document.createElement("iframe"),t.style.display="none",document.body.appendChild(t),e=t.contentWindow}catch(t){e=v}it={URL:e.URL},null==t||t.remove()}return it}();try{return void 0!==e?new n(t,e):new n(t)}catch(t){throw new Error(`Failed to construct URL: ${String(t)}`)}}function dt(t,e,n=0,r){const o=new Date;o.setTime(o.getTime()+n);const i=`expires=${o.toUTCString()}`,s=r&&r.crossSite?"none":"strict",a=r&&r.domain?`;domain=${r.domain}`:"",c=r&&r.secure?";secure":"",u=r&&r.partitioned?";partitioned":"";document.cookie=`${t}=${e};${i};path=/;samesite=${s}${a}${c}${u}`}function ft(t){return nt(document.cookie,t)}function pt(t){return function(t){const e=new Map;for(et.lastIndex=0;;){const n=et.exec(t);if(!n)break;{const t=n[1],r=n[2];e.has(t)?e.get(t).push(r):e.set(t,[r])}}return e}(document.cookie).get(t)||[]}function ht(t){return st||(st=function(t){const e=new Map;for(et.lastIndex=0;;){const n=et.exec(t);if(!n)break;e.set(n[1],n[2])}return e}(document.cookie)),st.get(t)}function mt(t,e){dt(t,"",0,e)}function gt(t=location.hostname,e=document.referrer){if(void 0===at){const n=function(t,e){try{return t||lt(e).hostname}catch(t){}}(t,e);if(n){const t=`dd_site_test_${tt()}`,e="test",r=n.split(".");let o=r.pop();for(;r.length&&!ft(t);)o=`${r.pop()}.${o}`,dt(t,e,D,{domain:o});mt(t,{domain:o}),at=o}}return at}const vt="_dd_s";function yt(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(e(r,n,t))return r}}function _t(t){return Object.values(t)}function bt(t){return Object.entries(t)}const wt=144e5,St=9e5,kt=U,Tt="cookie",Et="local-storage",xt=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function Ct(t,e){const n={isExpired:"1"};return e.trackAnonymousUser&&(null==t?void 0:t.anonymousId)&&(n.anonymousId=null==t?void 0:t.anonymousId),n}function At(t){return h(t)}function It(t){return!At(t)}function Rt(t){return void 0!==t.isExpired||!((void 0===(e=t).created||F()-Number(e.created)<wt)&&(void 0===e.expire||F()<Number(e.expire)));var e}function Nt(t){t.expire=String(F()+St)}function Ot(t){return bt(t).map((([t,e])=>"anonymousId"===t?`aid=${e}`:`${t}=${e}`)).join("&")}function Mt(t){const e={};return function(t){return!!t&&(-1!==t.indexOf("&")||xt.test(t))}(t)&&t.split("&").forEach((t=>{const n=xt.exec(t);if(null!==n){const[,t,r]=n;"aid"===t?e.anonymousId=r:e[t]=r}})),e}function Pt(t){const e=function(t){const e={};if(e.secure=!!t.useSecureSessionCookie||!!t.usePartitionedCrossSiteSessionCookie,e.crossSite=!!t.usePartitionedCrossSiteSessionCookie,e.partitioned=!!t.usePartitionedCrossSiteSessionCookie,t.trackSessionAcrossSubdomains){const t=gt();if(!t)return;e.domain=t}return e}(t);return e&&function(t){if(void 0===document.cookie||null===document.cookie)return!1;try{const e=`dd_cookie_test_${tt()}`,n="test";dt(e,n,L,t);const r=ft(e)===n;return mt(e,t),r}catch(t){return o.error(t),!1}}(e)?{type:Tt,cookieOptions:e}:void 0}function Dt(t,e){const n={isLockEnabled:0===ct(),persistSession:n=>Lt(e,t,n,St),retrieveSession:()=>Ut(e,t),expireSession:n=>Lt(e,t,Ct(n,t),wt)};return function(t){if(!ht(vt)){const e=ht("_dd"),n=ht("_dd_r"),r=ht("_dd_l"),o={};e&&(o.id=e),r&&/^[01]$/.test(r)&&(o.logs=r),n&&/^[012]$/.test(n)&&(o.rum=n),It(o)&&(Nt(o),t.persistSession(o))}}(n),n}function Lt(t,e,n,r){let o=Ot(n);e.betaEncodeCookieOptions&&(o=Ot({...n,...h(n)?{}:{c:zt(t)}})),dt(vt,o,e.trackAnonymousUser?kt:r,t)}function Ut(t,e){if(e.betaEncodeCookieOptions)return function(t){const e=pt(vt),n=zt(t);let r;for(const t of e.reverse())if(r=Mt(t),r.c===n)break;return null==r||delete r.c,null!=r?r:{}}(t);return Mt(ft(vt))}function zt(t){let e=0;return e|=0,e|=(t.domain?t.domain.split(".").length-1:0)<<1,e|=t.crossSite?1:0,e.toString(16)}function $t(){try{const t=tt(),e=`_dd_test_${t}`;localStorage.setItem(e,t);const n=localStorage.getItem(e);return localStorage.removeItem(e),t===n?{type:Et}:void 0}catch(t){return}}function Vt(t){return{isLockEnabled:!1,persistSession:Bt,retrieveSession:Ft,expireSession:e=>function(t,e){Bt(Ct(t,e))}(e,t)}}function Bt(t){localStorage.setItem(vt,Ot(t))}function Ft(){return Mt(localStorage.getItem(vt))}const qt="--",jt=[];let Ht;function Gt(t,e,n=0){var r;const{isLockEnabled:o,persistSession:i,expireSession:s}=e,a=t=>i({...t,lock:u}),c=()=>{const{lock:t,...n}=e.retrieveSession();return{session:n,lock:t&&!Yt(t)?t:void 0}};if(Ht||(Ht=t),t!==Ht)return void jt.push(t);if(o&&n>=100)return void Kt(e);let u,l=c();if(o){if(l.lock)return void Wt(t,e,n);if(u=tt()+qt+q(),a(l.session),l=c(),l.lock!==u)return void Wt(t,e,n)}let d=t.process(l.session);if(o&&(l=c(),l.lock!==u))Wt(t,e,n);else{if(d&&(Rt(d)?s(d):(Nt(d),o?a(d):i(d))),o&&(!d||!Rt(d))){if(l=c(),l.lock!==u)return void Wt(t,e,n);i(l.session),d=l.session}null===(r=t.after)||void 0===r||r.call(t,d||l.session),Kt(e)}}function Wt(t,e,n){C((()=>{Gt(t,e,n+1)}),10)}function Kt(t){Ht=void 0;const e=jt.shift();e&&Gt(e,t)}function Yt(t){const[,e]=t.split(qt);return!e||W(Number(e),q())>1e3}const Xt=D;function Jt(t){switch(t.sessionPersistence){case Tt:return Pt(t);case Et:return $t();case void 0:{let e=Pt(t);return!e&&t.allowFallbackToLocalStorage&&(e=$t()),e}default:o.error(`Invalid session persistence '${String(t.sessionPersistence)}'`)}}function Zt(t,e,n,r,o=function(t,e){return t.type===Tt?Dt(e,t.cookieOptions):Vt(e)}(t,e)){const i=new O,s=new O,a=new O,c=I((function(){const t=o.retrieveSession();Rt(t)?Gt({process:t=>Rt(t)?Ct(t,e):void 0,after:f},o):f(t)}),Xt);let u;p();const{throttled:l,cancel:d}=Z((()=>{Gt({process:t=>{if(At(t))return;const e=f(t);return function(t){if(At(t))return!1;const e=r(t[n]);t[n]=e,delete t.isExpired,"0"===e||t.id||(t.id=tt(),t.created=String(F()))}(e),e},after:t=>{It(t)&&!h()&&function(t){u=t,i.notify()}(t),u=t}},o)}),Xt);function f(t){return Rt(t)&&(t=Ct(t,e)),h()&&(!function(t){return u.id!==t.id||u[n]!==t[n]}(t)?(a.notify({previousState:u,newState:t}),u=t):(u=Ct(u,e),s.notify())),t}function p(){Gt({process:t=>{if(At(t))return t.anonymousId=tt(),Ct(t,e)},after:t=>{u=t}},o)}function h(){return void 0!==(null==u?void 0:u[n])}return{expandOrRenewSession:l,expandSession:function(){Gt({process:t=>h()?f(t):void 0},o)},getSession:()=>u,renewObservable:i,expireObservable:s,sessionStateUpdateObservable:a,restartSession:p,expire:t=>{d(),!1===t&&u&&delete u.anonymousId,o.expireSession(u),f(Ct(u,e))},stop:()=>{R(c)},updateSessionState:function(t){Gt({process:e=>({...e,...t}),after:f},o)}}}const Qt={GRANTED:"granted",NOT_GRANTED:"not-granted"};function te(t){return null===t?"null":Array.isArray(t)?"array":typeof t}function ee(t){return"object"===te(t)}function ne(t){const e=te(t);return"string"===e||"function"===e||t instanceof RegExp}function re(t,e,n=!1){return t.some((t=>{try{if("function"==typeof t)return t(e);if(t instanceof RegExp)return t.test(e);if("string"==typeof t)return n?e.startsWith(t):t===e}catch(t){o.error(t)}return!1}))}const oe=["chrome-extension://","moz-extension://"];function ie(t){return oe.some((e=>t.includes(e)))}function se(t,e,n=("undefined"!=typeof location?location.origin:"")){const r=t.allowedTrackingOrigins;if(!r)return!function(t,e=""){return!ie(t)&&ie(e.split("\n").filter((t=>{const e=t.trim();return e.length&&/^at\s+|@/.test(e)}))[1]||"")}(n,e)||(o.error("Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided."),!1);const i=re(r,n);return i||o.error("SDK initialized on a non-allowed domain."),i}const ae="datad0g.com",ce="datadoghq.com",ue="datadoghq.eu",le=["ddsource","dd-api-key","dd-request-id"];function de(t,e,n){const r=function(t,e){const n=`/api/v2/${e}`,r=t.proxy;if("string"==typeof r){const t=ut(r);return e=>`${t}?ddforward=${encodeURIComponent(`${n}?${e}`)}`}if("function"==typeof r)return t=>r({path:n,parameters:t});const o=fe(e,t);return t=>`https://${o}${n}?${t}`}(t,e);return{build(o,i){const s=function({clientToken:t,internalAnalyticsSubdomain:e,source:n="browser"},r,o,{retry:i,encoding:s},a=[]){const c=[`ddsource=${n}`,`dd-api-key=${t}`,`dd-evp-origin-version=${encodeURIComponent("6.26.0")}`,"dd-evp-origin=browser",`dd-request-id=${tt()}`].concat(a);s&&c.push(`dd-evp-encoding=${s}`);"rum"===r&&(c.push(`batch_time=${q()}`,`_dd.api=${o}`),i&&c.push(`_dd.retry_count=${i.count}`,`_dd.retry_after=${i.lastFailureStatus}`));e&&c.reverse();return c.join("&")}(t,e,o,i,n);return r(s)},trackType:e}}function fe(t,e){const{site:n=ce,internalAnalyticsSubdomain:r}=e;if("logs"===t&&e.usePciIntake&&n===ce)return"pci.browser-intake-datadoghq.com";if(r&&n===ce)return`${r}.${ce}`;if("dd0g-gov.com"===n)return`http-intake.logs.${n}`;const o=n.split("."),i=o.pop();return`browser-intake-${o.join("-")}.${i}`}function pe(t){const e=t.site||ce,n=function(t){if("flutter"===t||"unity"===t)return t;return"browser"}(t.source),r=function(t){return{logsEndpointBuilder:de(t,"logs"),rumEndpointBuilder:de(t,"rum"),profilingEndpointBuilder:de(t,"profile"),sessionReplayEndpointBuilder:de(t,"replay"),exposuresEndpointBuilder:de(t,"exposures"),flagEvaluationEndpointBuilder:de(t,"flagevaluation")}}({...t,site:e,source:n}),o=function(t){if(!t.replica)return;const e={...t,site:ce,clientToken:t.replica.clientToken};return{logsEndpointBuilder:de(e,"logs"),rumEndpointBuilder:de(e,"rum",[`application.id=${t.replica.applicationId}`])}}({...t,site:e,source:n});return{replica:o,site:e,source:n,...r}}const he={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},me={ALL:"all",SAMPLED:"sampled"};function ge(t,e){return null==t||"string"==typeof t||(o.error(`${e} must be defined as a string`),!1)}function ve(t,e){return!!(void 0===t||(n=t,d(n)&&n>=0&&n<=100))||(o.error(`${e} Sample Rate should be a number between 0 and 100`),!1);var n}function ye(t,e){var n,r,s,u,l,d,f,h,m,g;if(t&&t.clientToken)if(void 0===t.allowedTrackingOrigins||Array.isArray(t.allowedTrackingOrigins)){if((!(v=t.site)||"string"!=typeof v||/(datadog|ddog|datad0g|dd0g)/.test(v)||(o.error(`Site should be a valid Datadog site. ${a} ${i}/getting_started/site/.`),0))&&ve(t.sessionSampleRate,"Session")&&ve(t.telemetrySampleRate,"Telemetry")&&ve(t.telemetryConfigurationSampleRate,"Telemetry Configuration")&&ve(t.telemetryUsageSampleRate,"Telemetry Usage")&&ge(t.version,"Version")&&ge(t.env,"Env")&&ge(t.service,"Service")&&se(t,null!=e?e:"")){var v;if(void 0===t.trackingConsent||p(Qt,t.trackingConsent))return{beforeSend:t.beforeSend&&c(t.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:y?void 0:Jt(t),sessionSampleRate:null!==(n=t.sessionSampleRate)&&void 0!==n?n:100,telemetrySampleRate:null!==(r=t.telemetrySampleRate)&&void 0!==r?r:20,telemetryConfigurationSampleRate:null!==(s=t.telemetryConfigurationSampleRate)&&void 0!==s?s:5,telemetryUsageSampleRate:null!==(u=t.telemetryUsageSampleRate)&&void 0!==u?u:5,service:null!==(l=t.service)&&void 0!==l?l:void 0,env:null!==(d=t.env)&&void 0!==d?d:void 0,version:null!==(f=t.version)&&void 0!==f?f:void 0,datacenter:null!==(h=t.datacenter)&&void 0!==h?h:void 0,silentMultipleInit:!!t.silentMultipleInit,allowUntrustedEvents:!!t.allowUntrustedEvents,trackingConsent:null!==(m=t.trackingConsent)&&void 0!==m?m:Qt.GRANTED,trackAnonymousUser:null===(g=t.trackAnonymousUser)||void 0===g||g,storeContextsAcrossPages:!!t.storeContextsAcrossPages,betaEncodeCookieOptions:!!t.betaEncodeCookieOptions,variant:t.variant,sdkVersion:t.sdkVersion,...pe(t)};o.error('Tracking Consent should be either "granted" or "not-granted"')}}else o.error("Allowed Tracking Origins must be an array");else o.error("Client Token is not configured, we will not send any data.")}var _e;!function(t){t.TRACK_INTAKE_REQUESTS="track_intake_requests",t.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",t.FEATURE_OPERATION_VITAL="feature_operation_vital",t.SHORT_SESSION_INVESTIGATION="short_session_investigation",t.AVOID_FETCH_KEEPALIVE="avoid_fetch_keepalive",t.START_STOP_ACTION="start_stop_action",t.USE_CHANGE_RECORDS="use_change_records",t.SOURCE_CODE_CONTEXT="source_code_context"}(_e||(_e={}));const be=new Set;function we(t){Array.isArray(t)&&t.filter((t=>p(_e,t))).forEach((t=>{be.add(t)}))}function Se(t){return be.has(t)}function ke(){return be}const Te="?";function Ee(t){var e,n;const r=[];let o=Pe(t,"stack");const i=String(t);if(o&&o.startsWith(i)&&(o=o.slice(i.length)),o&&o.split("\n").forEach((t=>{const e=function(t){const e=Ae.exec(t);if(!e)return;const n=e[2]&&0===e[2].indexOf("native"),r=e[2]&&0===e[2].indexOf("eval"),o=Ie.exec(e[2]);r&&o&&(e[2]=o[1],e[3]=o[2],e[4]=o[3]);return{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||Te,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}(t)||function(t){const e=Re.exec(t);if(!e)return;return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||Te,line:e[3]?+e[3]:void 0,url:e[2]}}(t)||function(t){const e=Ne.exec(t);if(!e)return;return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||Te,line:+e[3],url:e[2]}}(t)||function(t){const e=Oe.exec(t);if(!e)return;const n=e[3]&&e[3].indexOf(" > eval")>-1,r=Me.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]||Te,line:e[4]?+e[4]:void 0,url:e[3]}}(t);e&&(!e.func&&e.line&&(e.func=Te),r.push(e))})),r.length>0&&function(){if(void 0!==ze)return ze;class t extends Error{constructor(){super(),this.name="Error"}}const[e,n]=[t,Error].map((t=>new t));return ze=Ue(Object.getPrototypeOf(e))&&n.stack!==e.stack,ze}()&&t instanceof Error){const o=[];let i=t;for(;(i=Object.getPrototypeOf(i))&&Ue(i);){const t=(null===(e=i.constructor)||void 0===e?void 0:e.name)||Te;o.push(t)}for(let t=o.length-1;t>=0&&(null===(n=r[0])||void 0===n?void 0:n.func)===o[t];t--)r.shift()}return{message:Pe(t,"message"),name:Pe(t,"name"),stack:r}}const xe="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",Ce="(?::(\\d+))",Ae=new RegExp(`^\\s*at (.*?) ?\\(${xe}${Ce}?${Ce}?\\)?\\s*$`,"i"),Ie=new RegExp(`\\((\\S*)${Ce}${Ce}\\)`);const Re=new RegExp(`^\\s*at\\s*(?:(.*)?(?: @))?\\s*${xe}${Ce}?${Ce}??\\s*$`,"i");const Ne=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;const Oe=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,Me=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Pe(t,e){return ee(t)&&"string"==typeof t[e]?t[e]:void 0}function De(t,e,n,r){if(void 0===e)return;const{name:o,message:i}=function(t){let e,n;"[object String]"==={}.toString.call(t)&&([,e,n]=Le.exec(t));return{name:e,message:n}}(t);return{name:o,message:i,stack:[{url:e,column:r,line:n}]}}const Le=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function Ue(t){return String(t.constructor).startsWith("class ")}let ze;function $e(t){const e=new Error(t);let n;return e.name="HandlingStack",T((()=>{const t=Ee(e);t.stack=t.stack.slice(2),n=Ve(t)})),n}function Ve(t){let e=Be(t);return t.stack.forEach((t=>{const n="?"===t.func?"<anonymous>":t.func,r=t.args&&t.args.length>0?`(${t.args.join(", ")})`:"",o=t.line?`:${t.line}`:"",i=t.line&&t.column?`:${t.column}`:"";e+=`\n at ${n}${r} @ ${t.url}${o}${i}`})),e}function Be(t){return`${t.name||"Error"}: ${t.message}`}function Fe(t,e,n,{computeHandlingStack:r}={}){let o=t[e];if("function"!=typeof o){if(!(e in t)||"string"!=typeof e||!e.startsWith("on"))return{stop:Q};o=Q}let i=!1;const s=function(){if(i)return o.apply(this,arguments);const t=Array.from(arguments);let e;T(n,null,[{target:this,parameters:t,onPostCall:t=>{e=t},handlingStack:r?$e("instrumented method"):void 0}]);const s=o.apply(this,t);return e&&T(e,null,[s]),s};return t[e]=s,{stop:()=>{i=!0,t[e]===s&&(t[e]=o)}}}function qe(t,e,n){const r=Object.getOwnPropertyDescriptor(t,e);if(!r||!r.set||!r.configurable)return{stop:Q};const o=Q;let i=(t,e)=>{C((()=>{i!==o&&n(t,e)}),0)};const s=function(t){r.set.call(this,t),i(this,t)};return Object.defineProperty(t,e,{set:s}),{stop:()=>{var n;(null===(n=Object.getOwnPropertyDescriptor(t,e))||void 0===n?void 0:n.set)===s&&Object.defineProperty(t,e,r),i=o}}}const je=/[^\u0000-\u007F]/;function He(t){return je.test(t)?void 0!==window.TextEncoder?(new TextEncoder).encode(t).length:new Blob([t]).size:t.length}function Ge(t){if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}function We(t,e,n){if("object"!=typeof t||null===t)return JSON.stringify(t);const r=Ke(Object.prototype),o=Ke(Array.prototype),i=Ke(Object.getPrototypeOf(t)),s=Ke(t);try{return JSON.stringify(t,e,n)}catch(t){return"<error: unable to serialize object>"}finally{r(),o(),i(),s()}}function Ke(t){const e=t,n=e.toJSON;return n?(delete e.toJSON,()=>{e.toJSON=n}):Q}function Ye(t,e=225280){const n=Ke(Object.prototype),r=Ke(Array.prototype),o=[],i=new WeakMap,s=Xe(t,"$",void 0,o,i),a=JSON.stringify(s);let c=a?a.length:0;if(!(c>e)){for(;o.length>0&&c<e;){const n=o.shift();let r=0;if(Array.isArray(n.source))for(let s=0;s<n.source.length;s++){const a=Xe(n.source[s],n.path,s,o,i);if(c+=void 0!==a?JSON.stringify(a).length:4,c+=r,r=1,c>e){Ze(e,"truncated",t);break}n.target[s]=a}else for(const s in n.source)if(Object.prototype.hasOwnProperty.call(n.source,s)){const a=Xe(n.source[s],n.path,s,o,i);if(void 0!==a&&(c+=JSON.stringify(a).length+r+s.length+3,r=1),c>e){Ze(e,"truncated",t);break}n.target[s]=a}}return n(),r(),s}Ze(e,"discarded",t)}function Xe(t,e,n,r,o){const i=function(t){const e=t;if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(t){}return t}(t);if(!i||"object"!=typeof i)return function(t){if("bigint"==typeof t)return`[BigInt] ${t.toString()}`;if("function"==typeof t)return`[Function] ${t.name||"unknown"}`;if("symbol"==typeof t)return`[Symbol] ${t.description||t.toString()}`;return t}(i);const s=Je(i);if("[Object]"!==s&&"[Array]"!==s&&"[Error]"!==s)return s;const a=t;if(o.has(a))return`[Reference seen at ${o.get(a)}]`;const c=void 0!==n?`${e}.${n}`:e,u=Array.isArray(i)?[]:{};return o.set(a,c),r.push({source:i,target:u,path:c}),u}function Je(t){try{if(t instanceof Event)return{type:(e=t).type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?Je(e.currentTarget):null,target:e.target?Je(e.target):null};if(t instanceof RegExp)return`[RegExp] ${t.toString()}`;const n=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch(t){}var e;return"[Unserializable]"}function Ze(t,e,n){o.warn(`The data provided has been ${e} as it is over the limit of ${t} characters:`,n)}const Qe="No stack, consider using an instance of Error";function tn({originalError:t,stackTrace:e,source:n,useFallbackStack:r=!0,nonErrorPrefix:o}){const i=sn(t);return!e&&i&&(e=Ee(t)),{source:n,type:e?e.name:void 0,message:nn(e,i,o,t),stack:e?Ve(e):r?Qe:void 0}}function en({stackTrace:t,originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:i,useFallbackStack:s=!0,source:a,handling:c}){return{startClocks:o,handling:c,handlingStack:n,componentStack:r,originalError:e,...tn({originalError:e,stackTrace:t,source:a,useFallbackStack:s,nonErrorPrefix:i}),causes:sn(e)?an(e,a):void 0,fingerprint:rn(e),context:on(e)}}function nn(t,e,n,r){return(null==t?void 0:t.message)&&(null==t?void 0:t.name)?t.message:e?"Empty message":n?`${n} ${We(Ye(r))}`:We(Ye(r))}function rn(t){return sn(t)&&"dd_fingerprint"in t?String(t.dd_fingerprint):void 0}function on(t){if(ee(t))return t.dd_context}function sn(t){return t instanceof Error||"[object Error]"===Object.prototype.toString.call(t)}function an(t,e){const n=[];let r=t.cause;for(;null!=r&&n.length<10;){const t=tn({originalError:r,source:e,useFallbackStack:!1});n.push(t),r=sn(r)?r.cause:void 0}return n.length?n:void 0}const cn="agent",un="console",ln="custom",dn="source",fn="report";function pn(){return new O((t=>{const e=(e,n)=>{const r=en({stackTrace:n,originalError:e,startClocks:H(),nonErrorPrefix:"Uncaught",source:dn,handling:"unhandled"});t.notify(r)},{stop:n}=(r=e,Fe(g(),"onerror",(({parameters:[t,e,n,o,i]})=>{let s;sn(i)||(s=De(t,e,n,o)),r(null!=i?i:t,s)})));var r;const{stop:o}=function(t){return Fe(g(),"onunhandledrejection",(({parameters:[e]})=>{t(e.reason||"Empty reason")}))}(e);return()=>{n(),o()}}))}function hn(t,e){e.silentMultipleInit||o.error(`${t} is already initialized.`)}function mn(t,e,n,r,o){return gn(t,e,[n],r,o)}function gn(t,e,n,r,{once:o,capture:i,passive:s}={}){const a=k((e=>{(e.isTrusted||e.__ddIsTrusted||t.allowUntrustedEvents)&&(o&&d(),r(e))})),c=s?{capture:i,passive:s}:i,u=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,l=_(u,"addEventListener");function d(){const t=_(u,"removeEventListener");n.forEach((n=>t.call(e,n,a,c)))}return n.forEach((t=>l.call(e,t,a,c))),{stop:d}}const vn="intervention",yn="csp_violation";function _n(t,e){const n=[];e.includes(yn)&&n.push(function(t){return new O((e=>{const{stop:n}=mn(t,document,"securitypolicyviolation",(t=>{e.notify(function(t){const e=`'${t.blockedURI}' blocked by '${t.effectiveDirective}' directive`;return bn({type:t.effectiveDirective,message:`${yn}: ${e}`,originalError:t,csp:{disposition:t.disposition},stack:wn(t.effectiveDirective,t.originalPolicy?`${e} of the policy "${rt(t.originalPolicy,100,"...")}"`:"no policy",t.sourceFile,t.lineNumber,t.columnNumber)})}(t))}));return n}))}(t));const r=e.filter((t=>t!==yn));return r.length&&n.push(function(t){return new O((e=>{if(!window.ReportingObserver)return;const n=k(((t,n)=>t.forEach((t=>e.notify(function(t){const{type:e,body:n}=t;return bn({type:n.id,message:`${e}: ${n.message}`,originalError:t,stack:wn(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}(t)))))),r=new window.ReportingObserver(n,{types:t,buffered:!0});return r.observe(),()=>{r.disconnect()}}))}(r)),M(...n)}function bn(t){return{startClocks:H(),source:fn,handling:"unhandled",...t}}function wn(t,e,n,r,o){return n?Ve({name:t,message:e,stack:[{func:"?",url:n,line:null!=r?r:void 0,column:null!=o?o:void 0}]}):void 0}function Sn(t){const{env:e,service:n,version:r,datacenter:o,sdkVersion:i,variant:s}=t,a=[kn("sdk_version",null!=i?i:"6.26.0")];return e&&a.push(kn("env",e)),n&&a.push(kn("service",n)),r&&a.push(kn("version",r)),o&&a.push(kn("datacenter",o)),s&&a.push(kn("variant",s)),a}function kn(t,e){const n=e?`${t}:${e}`:t;return(n.length>200||function(t){if(!function(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch(t){return!1}}())return!1;return new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(t)}(n))&&o.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${a} ${i}/getting_started/tagging/#defining-tags`),function(t){return t.replace(/,/g,"_")}(n)}function Tn(t,e){const n=v.__ddBrowserSdkExtensionCallback;n&&n({type:t,payload:e})}function En(t,e,n=function(){if("undefined"!=typeof WeakSet){const t=new WeakSet;return{hasAlreadyBeenSeen(e){const n=t.has(e);return n||t.add(e),n}}}const t=[];return{hasAlreadyBeenSeen(e){const n=t.indexOf(e)>=0;return n||t.push(e),n}}}()){if(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){const t=e.flags||[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.sticky?"y":"",e.unicode?"u":""].join("");return new RegExp(e.source,t)}if(n.hasAlreadyBeenSeen(e))return;if(Array.isArray(e)){const r=Array.isArray(t)?t:[];for(let t=0;t<e.length;++t)r[t]=En(r[t],e[t],n);return r}const r="object"===te(t)?t:{};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=En(r[t],e[t],n));return r}function xn(t){return En(void 0,t)}function Cn(...t){let e;for(const n of t)null!=n&&(e=En(e,n));return e}function An(){var t;const e=v.navigator;return{status:e.onLine?"connected":"not_connected",interfaces:e.connection&&e.connection.type?[e.connection.type]:void 0,effective_type:null===(t=e.connection)||void 0===t?void 0:t.effectiveType}}function In(t,e){return _(g(),"fetch")(t,e)}const Rn=20971520,Nn=D;function On(t,e,n,r,o,i){0===e.transportStatus&&0===e.queuedPayloads.size()&&e.bandwidthMonitor.canHandle(t)?Pn(t,e,n,i,{onSuccess:()=>Dn(0,e,n,r,o,i),onFailure:()=>{e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t}),Mn(e,n,r,o,i)}}):e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t})}function Mn(t,e,n,r,o){2===t.transportStatus&&C((()=>{Pn(t.queuedPayloads.first(),t,e,o,{onSuccess:()=>{t.queuedPayloads.dequeue(),t.currentBackoffTime=Nn,Dn(1,t,e,n,r,o)},onFailure:()=>{t.currentBackoffTime=Math.min(6e4,2*t.currentBackoffTime),Mn(t,e,n,r,o)}})}),t.currentBackoffTime)}function Pn(t,e,n,r,{onSuccess:o,onFailure:i}){e.bandwidthMonitor.add(t),n(t,(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,r.notify({type:"success",bandwidth:e.bandwidthMonitor.stats(),payload:t}),o()):(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:"failure",bandwidth:e.bandwidthMonitor.stats(),payload:t}),i())}))}function Dn(t,e,n,r,o,i){0===t&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(o({message:`Reached max ${r} events size queued for upload: 20MiB`,source:cn,startClocks:H()}),e.queueFullReported=!0);const s=e.queuedPayloads;for(e.queuedPayloads=Ln();s.size()>0;)On(s.dequeue(),e,n,r,o,i)}function Ln(){const t=[];return{bytesCount:0,enqueue(e){return!this.isFull()&&(t.push(e),this.bytesCount+=e.bytesCount,!0)},first:()=>t[0],dequeue(){const e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size:()=>t.length,isFull(){return this.bytesCount>=Rn}}}const Un=16384;function zn(t,e,n=16384){const r=new O,o={transportStatus:0,currentBackoffTime:Nn,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle(t){return 0===this.ongoingRequestCount||this.ongoingByteCount+t.bytesCount<=81920&&this.ongoingRequestCount<32},add(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}},queuedPayloads:Ln(),queueFullReported:!1};return{observable:r,send:i=>{for(const s of t)On(i,o,((t,e)=>{Se(_e.AVOID_FETCH_KEEPALIVE)?Fn(s,t,e):Bn(s,n,t,e)}),s.trackType,e,r)},sendOnExit:e=>{for(const r of t)$n(r,n,e)}}}function $n(t,e,n){if(!!navigator.sendBeacon&&n.bytesCount<e)try{const e=t.build("beacon",n);if(navigator.sendBeacon(e,n.data))return}catch(t){!function(t){Vn||(Vn=!0,E(t))}(t)}Fn(t,n)}let Vn=!1;function Bn(t,e,n,r){if(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(t){return!1}}()&&n.bytesCount<e){In(t.build("fetch-keepalive",n),{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then(k((t=>null==r?void 0:r({status:t.status,type:t.type})))).catch(k((()=>Fn(t,n,r))))}else Fn(t,n,r)}function Fn(t,e,n){In(t.build("fetch",e),{method:"POST",body:e.data,mode:"cors"}).then(k((t=>null==n?void 0:n({status:t.status,type:t.type})))).catch(k((()=>null==n?void 0:n({status:0}))))}function qn(){const t=g().DatadogEventBridge;if(t)return{getCapabilities(){var e;return JSON.parse((null===(e=t.getCapabilities)||void 0===e?void 0:e.call(t))||"[]")},getPrivacyLevel(){var e;return null===(e=t.getPrivacyLevel)||void 0===e?void 0:e.call(t)},getAllowedWebViewHosts:()=>JSON.parse(t.getAllowedWebViewHosts()),send(e,n,r){const o=r?{id:r}:void 0;t.send(JSON.stringify({eventType:e,event:n,view:o}))}}}function jn(t){const e=qn();return!!e&&e.getCapabilities().includes(t)}function Hn(t){var e;void 0===t&&(t=null===(e=g().location)||void 0===e?void 0:e.hostname);const n=qn();return!!n&&n.getAllowedWebViewHosts().some((e=>t===e||t.endsWith(`.${e}`)))}const Gn={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function Wn(t){return _t(Gn).includes(t)}const Kn=262144;function Yn({encoder:t,request:e,flushController:n}){let r={};const i=n.flushObservable.subscribe((n=>function(n){const o=_t(r).join("\n");r={};const i=Wn(n.reason),s=i?e.sendOnExit:e.send;if(i&&t.isAsync){const e=t.finishSync();e.outputBytesCount&&s(Xn(e));const n=[e.pendingData,o].filter(Boolean).join("\n");n&&s({data:n,bytesCount:He(n)})}else o&&t.write(t.isEmpty?o:`\n${o}`),t.finish((t=>{s(Xn(t))}))}(n)));function c(e,i){const c=We(e),u=t.estimateEncodedBytesCount(c);u>=Kn?o.warn(`Discarded a message whose size was bigger than the maximum allowed size 256KiB. ${a} ${s}/#technical-limitations`):(function(t){return void 0!==t&&void 0!==r[t]}(i)&&function(e){const o=r[e];delete r[e];const i=t.estimateEncodedBytesCount(o);n.notifyAfterRemoveMessage(i)}(i),function(e,o,i){n.notifyBeforeAddMessage(o),void 0!==i?(r[i]=e,n.notifyAfterAddMessage()):t.write(t.isEmpty?e:`\n${e}`,(t=>{n.notifyAfterAddMessage(t-o)}))}(c,u,i))}return{flushController:n,add:c,upsert:c,stop:i.unsubscribe}}function Xn(t){let e;return e="string"==typeof t.output?t.output:new Blob([t.output],{type:"text/plain"}),{data:e,bytesCount:t.outputBytesCount,encoding:t.encoding}}const Jn=y?1:50;function Zn({pageMayExitObservable:t,sessionExpireObservable:e}){const n=t.subscribe((t=>c(t.reason))),r=e.subscribe((()=>c("session_expire"))),o=new O((()=>()=>{n.unsubscribe(),r.unsubscribe()}));let i,s=0,a=0;function c(t){if(0===a)return;const e=a,n=s;a=0,s=0,u(),o.notify({reason:t,messagesCount:e,bytesCount:n})}function u(){A(i),i=void 0}return{flushObservable:o,get messagesCount(){return a},notifyBeforeAddMessage(t){s+t>=Un&&c("bytes_limit"),a+=1,s+=t,void 0===i&&(i=C((()=>{c("duration_limit")}),3e4))},notifyAfterAddMessage(t=0){s+=t,a>=Jn?c("messages_limit"):s>=Un&&c("bytes_limit")},notifyAfterRemoveMessage(t){s-=t,a-=1,0===a&&u()}}}const Qn="DISCARDED",tr="SKIPPED";const er="log",nr="configuration",rr="usage",or=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],ir=["ddog-gov.com"];let sr;function ar(){return sr||(sr=new P(100)),sr}function cr(t,e,n,r,o,i){const s=new O,{stop:a}=function(t,e,n,r,o){const i=[];if(Hn()){const t=qn(),e=o.subscribe((e=>t.send("internal_telemetry",e)));i.push(e.unsubscribe)}else{const s=[t.rumEndpointBuilder];t.replica&&function(t){return t.site===ae}(t)&&s.push(t.replica.rumEndpointBuilder);const a=Yn({encoder:r(4),request:zn(s,e),flushController:Zn({pageMayExitObservable:n,sessionExpireObservable:new O})});i.push(a.stop);const c=o.subscribe(a.add);i.push(c.unsubscribe)}return{stop:()=>i.forEach((t=>t()))}}(e,r,o,i,s),{enabled:c,metricsEnabled:l}=function(t,e,n,r,o=1,i=15){const s={},a=!ir.includes(e.site)&&u(e.telemetrySampleRate),c={[er]:a,[nr]:a&&u(e.telemetryConfigurationSampleRate),[rr]:a&&u(e.telemetryUsageSampleRate),metric:a&&u(o)},l={is_local_file:"file:"===(null===(f=v.location)||void 0===f?void 0:f.protocol),is_worker:y},d=ar();var f;return d.subscribe((({rawEvent:e,metricName:o})=>{if(o&&!c.metric||!c[e.type])return;const a=o||e.status||e.type;let u=s[a];if(u||(u=s[a]=new Set),u.size>=i)return;const d=We(e);if(u.has(d))return;const f=n.triggerHook(1,{startTime:H().relative});if(f===Qn)return;const h=p(f,t,e,l);r.notify(h),Tn("telemetry",h),u.add(d)})),d.unbuffer(),function(t){b=t}(lr),{enabled:a,metricsEnabled:c.metric};function p(t,n,r,o){const i={type:"telemetry",date:H().timeStamp,service:n,version:"6.26.0",source:"browser",_dd:{format_version:2},telemetry:Cn(r,{runtime_env:o,connectivity:An(),sdk_setup:"npm"}),ddtags:Sn(e).join(","),experimental_features:Array.from(ke())};return Cn(i,t)}}(t,e,n,s);return{stop:a,enabled:c,metricsEnabled:l}}function ur(e,n){x(t.debug,e,n),ar().notify({rawEvent:{type:er,message:e,status:"debug",...n}})}function lr(t,e){ar().notify({rawEvent:{type:er,status:"error",...pr(t),...e}})}function dr(t,e){ar().notify({rawEvent:{type:er,message:t,status:"debug",...e},metricName:t})}function fr(t){ar().notify({rawEvent:{type:rr,usage:t}})}function pr(t){if(sn(t)){const e=Ee(t);return{error:{kind:e.name,stack:Ve(hr(e))},message:e.message}}return{error:{stack:Qe},message:`Uncaught ${We(t)}`}}function hr(t){return t.stack=t.stack.filter((t=>!t.url||or.some((e=>t.url.startsWith(e))))),t}function mr(t,e){const n=t.indexOf(e);n>=0&&t.splice(n,1)}function gr(t){return Array.isArray(t)&&t.length>0}const vr=1/0;let yr=null;const _r=new Set;function br({expireDelay:t,maxEntries:e}){let n=[];yr||(yr=I((()=>{_r.forEach((t=>t()))}),6e4));const r=()=>{const e=j()-t;for(;n.length>0&&n[n.length-1].endTime<e;)n.pop()};return _r.add(r),{add:function(t,r){const o={value:t,startTime:r,endTime:vr,remove:()=>{mr(n,o)},close:t=>{o.endTime=t}};return e&&n.length>=e&&n.pop(),n.unshift(o),o},find:function(t=Infinity,e={returnInactive:!1}){for(const r of n)if(r.startTime<=t){if(e.returnInactive||t<=r.endTime)return r.value;break}},closeActive:function(t){const e=n[0];e&&e.endTime===vr&&e.close(t)},findAll:function(t=Infinity,e=0){const r=K(t,e);return n.filter((e=>e.startTime<=r&&t<=e.endTime)).map((t=>t.value))},reset:function(){n=[]},stop:function(){_r.delete(r),0===_r.size&&yr&&(R(yr),yr=null)}}}function wr(){return!y&&Boolean(v._DATADOG_SYNTHETICS_INJECTS_RUM||ht("datadog-synthetics-injects-rum"))}function Sr(){const t=window._DATADOG_SYNTHETICS_PUBLIC_ID||ht("datadog-synthetics-public-id");return"string"==typeof t?t:void 0}function kr(){const t=window._DATADOG_SYNTHETICS_RESULT_ID||ht("datadog-synthetics-result-id");return"string"==typeof t?t:void 0}function Tr(){return Boolean(Sr()&&kr())}const Er=L,xr=wt;function Cr(t,e,n,r){const o=new O,i=new O,s=Zt(t.sessionStoreStrategyType,t,e,n),a=br({expireDelay:xr});if(s.renewObservable.subscribe((()=>{a.add(c(),j()),o.notify()})),s.expireObservable.subscribe((()=>{i.notify(),a.closeActive(j())})),s.expandOrRenewSession(),a.add(c(),G().relative),Se(_e.SHORT_SESSION_INVESTIGATION)){const e=s.getSession();e&&function(t,e){if(!window.cookieStore||!e.created)return;const n=Number(e.created),r=F(),{stop:o}=mn(t,cookieStore,"change",i);function i(t){const i=yt(t.changed,(t=>t.name===vt));if(!i)return;const s=F()-n;if(s>84e4)o();else{const t=Mt(i.value);if(t.id&&t.id!==e.id){o();const n=F()-r;Ar().then((r=>{ur("Session cookie changed",{time:n,session_age:s,old:e,new:t,cookie:r})})).catch(E)}}}}(t,e)}function c(){const n=s.getSession();return n?{id:n.id,trackingType:n[e],isReplayForced:!!n.forcedReplay,anonymousId:n.anonymousId}:(async function(t){const e=t.sessionStoreStrategyType;if(!e)return;let n,r;e.type===Tt?(n=Ut(e.cookieOptions,t),r={cookie:await Ar(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):n=Ft();ur("Unexpected session state",{sessionStoreStrategyType:e.type,session:n,isSyntheticsTest:Tr(),createdTimestamp:null==n?void 0:n.created,expireTimestamp:null==n?void 0:n.expire,...r})}(t).catch((()=>{})),{id:"invalid",trackingType:"0",isReplayForced:!1,anonymousId:void 0})}return r.observable.subscribe((()=>{r.isGranted()?s.expandOrRenewSession():s.expire(!1)})),function(t,e){const{stop:n}=gn(t,window,["click","touchstart","keydown","scroll"],e,{capture:!0,passive:!0})}(t,(()=>{r.isGranted()&&s.expandOrRenewSession()})),function(t,e){const n=()=>{"visible"===document.visibilityState&&e()},{stop:r}=mn(t,document,"visibilitychange",n);I(n,Er)}(t,(()=>s.expandSession())),function(t,e){const{stop:n}=mn(t,window,"resume",e,{capture:!0})}(t,(()=>s.restartSession())),{findSession:(t,e)=>a.find(t,e),renewObservable:o,expireObservable:i,sessionStateUpdateObservable:s.sessionStateUpdateObservable,expire:s.expire,updateSessionState:s.updateSessionState}}async function Ar(){let t;return t="cookieStore"in window?await window.cookieStore.getAll(vt):document.cookie.split(/\s*;\s*/).filter((t=>t.startsWith(vt))),{count:t.length,domain:gt()||"undefined",...t}}function Ir(){let t="",e=0;return{isAsync:!1,get isEmpty(){return!t},write(n,r){const o=He(n);e+=o,t+=n,r&&r(o)},finish(t){t(this.finishSync())},finishSync(){const n={output:t,outputBytesCount:e,rawBytesCount:e,pendingData:""};return t="",e=0,n},estimateEncodedBytesCount:t=>t.length}}function Rr(t,e,n=3e3){let r=0,o=!1;return{isLimitReached(){if(0===r&&C((()=>{r=0}),L),r+=1,r<=n||o)return o=!1,!1;if(r===n+1){o=!0;try{e({message:`Reached max number of ${t}s by minute: ${n}`,source:cn,startClocks:H()})}finally{o=!1}}return!0}}}function Nr(t,e,n){if(document.readyState===e||"complete"===document.readyState)return n(),{stop:Q};return mn(t,window,"complete"===e?"load":"DOMContentLoaded",n,{once:!0})}function Or(t,e){return new Promise((n=>{Nr(t,e,n)}))}let Mr;const Pr=new WeakMap;function Dr(t){return Mr||(Mr=function(t){return new O((e=>{const{stop:n}=Fe(XMLHttpRequest.prototype,"open",Lr),{stop:r}=Fe(XMLHttpRequest.prototype,"send",(n=>{!function({target:t,parameters:[e],handlingStack:n},r,o){const i=Pr.get(t);if(!i)return;const s=i;s.state="start",s.startClocks=H(),s.isAborted=!1,s.xhr=t,s.handlingStack=n,s.requestBody=e;let a=!1;const{stop:c}=Fe(t,"onreadystatechange",(()=>{t.readyState===XMLHttpRequest.DONE&&u()})),u=()=>{if(l(),c(),a)return;a=!0;const e=i;e.state="complete",e.duration=W(s.startClocks.timeStamp,q()),e.status=t.status,"string"==typeof t.response&&(e.responseBody=t.response),o.notify(f(e))},{stop:l}=mn(r,t,"loadend",u);o.notify(s)}(n,t,e)}),{computeHandlingStack:!0}),{stop:o}=Fe(XMLHttpRequest.prototype,"abort",Ur);return()=>{n(),r(),o()}}))}(t)),Mr}function Lr({target:t,parameters:[e,n]}){Pr.set(t,{state:"open",method:String(e).toUpperCase(),url:ut(String(n))})}function Ur({target:t}){const e=Pr.get(t);e&&(e.isAborted=!0)}let zr;const $r=[];function Vr({responseBodyAction:t}={}){return t&&$r.push(t),zr||(zr=new O((t=>{if(!v.fetch)return;const{stop:e}=Fe(v,"fetch",(e=>function({parameters:t,onPostCall:e,handlingStack:n},r){const[o,i]=t;let s=i&&i.method;void 0===s&&o instanceof Request&&(s=o.method);const a=void 0!==s?String(s).toUpperCase():"GET",c=o instanceof Request?o.url:ut(String(o)),u=H(),l={state:"start",init:i,input:o,method:a,startClocks:u,url:c,handlingStack:n};r.notify(l),t[0]=l.input,t[1]=l.init,e((t=>{(async function(t,e,n){var r,o;const i=n;let s;i.state="resolve";try{s=await e}catch(e){return i.status=0,i.isAborted=(null===(o=null===(r=i.init)||void 0===r?void 0:r.signal)||void 0===o?void 0:o.aborted)||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,i.error=e,void t.notify(i)}i.response=s,i.status=s.status,i.responseType=s.type,i.isAborted=!1;const a=$r.reduce(((t,e)=>Math.max(t,e(i))),0);if(0!==a){const t=function(t){try{return t.clone()}catch(t){return}}(s);if(t&&t.body)try{const e=await async function(t,e){const n=t.getReader(),r=[];for(;;){const t=await n.read();if(t.done)break;e.collectStreamBody&&r.push(t.value)}return n.cancel().catch(Q),e.collectStreamBody?Ge(r):void 0}(t.body,{collectStreamBody:2===a});i.responseBody=e&&(new TextDecoder).decode(e)}catch(t){}}t.notify(i)})(r,t,l).catch(E)}))}(e,t)),{computeHandlingStack:!0});return e}))),zr}function Br(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback(k(t),e);return()=>window.cancelIdleCallback(n)}return function(t){const e=F(),n=C((()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,Fr-(F()-e))})}),0);return()=>A(n)}(t)}const Fr=50;let qr={};function jr(n){return M(...n.map((n=>(qr[n]||(qr[n]=function(n){return new O((r=>{const o=e[n];return e[n]=(...e)=>{o.apply(console,e);const i=$e("console error");T((()=>{r.notify(function(e,n,r){const o=e.map((t=>function(t){if("string"==typeof t)return Ye(t);if(sn(t))return Be(Ee(t));return We(Ye(t),void 0,2)}(t))).join(" ");if(n===t.error){const t=en({originalError:e.find(sn),handlingStack:r,startClocks:H(),source:un,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return t.message=o,{api:n,message:o,handlingStack:r,error:t}}return{api:n,message:o,error:void 0,handlingStack:r}}(e,n,i))}))},()=>{e[n]=o}}))}(n)),qr[n]))))}function Hr(t,e,n){const r={...t};for(const[t,{required:i,type:s}]of Object.entries(e))"string"!==s||Gr(r[t])||(r[t]=String(r[t])),i&&Gr(r[t])&&o.warn(`The property ${t} of ${n} is required; context will not be sent to the intake.`);return r}function Gr(t){return null==t||""===t}function Wr(t="",{propertiesConfig:e={}}={}){let n={};const r=new O,i={getContext:()=>xn(n),setContext:s=>{!function(t){const e="object"===te(t);return e||o.error("Unsupported context:",t),e}(s)?i.clearContext():n=Ye(Hr(s,e,t)),r.notify()},setContextProperty:(o,i)=>{n=Ye(Hr({...n,[o]:i},e,t)),r.notify()},removeContextProperty:o=>{delete n[o],Hr(n,e,t),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}function Kr(t,e,n,r){return k(((...o)=>(r&&fr({feature:r}),t()[e][n](...o))))}const Yr="_dd_c",Xr=[];function Jr(t,e,n,r){const o=function(t,e){return`${Yr}_${t}_${e}`}(n,r);Xr.push(mn(t,window,"storage",(({key:t})=>{o===t&&e.setContext(s())}))),e.changeObservable.subscribe((function(){localStorage.setItem(o,JSON.stringify(e.getContext()))}));const i=Cn(s(),e.getContext());function s(){const t=localStorage.getItem(o);return t?JSON.parse(t):{}}h(i)||e.setContext(i)}function Zr(){return Wr("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function Qr(){return Wr("global context")}function to(){return Wr("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}const eo="userContext",no="globalContext",ro="accountContext",oo="getContext",io="setContext",so="setContextProperty",ao="removeContextProperty",co="clearContext",uo="document",lo="xhr",fo="beacon",po="fetch",ho="css",mo="js",go="image",vo="font",yo="media",_o="other",bo={FETCH:po,XHR:lo};function wo(){try{return(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch(t){return}}const So="action",ko="error",To="long_task",Eo="view",xo="resource",Co="vital",Ao="long-task",Io="long-animation-frame",Ro="initial_load",No="route_change",Oo="bf_cache",Mo="click",Po="custom",Do="rage_click",Lo="error_click",Uo="dead_click",zo="duration",$o="operation_step";function Vo(t,e,n){function r(n){(function(t){return!e.wasInPageStateDuringPeriod("frozen",t.startClocks.relative,t.duration)})(n)&&t.notify(12,qo(n))}return{addOperationStepVital:function(e,n,r,o){if(!Se(_e.FEATURE_OPERATION_VITAL))return;const{operationKey:i,context:s,description:a}=r||{},c={name:e,type:$o,operationKey:i,failureReason:o,stepType:n,startClocks:H(),context:Ye(s),description:a};t.notify(12,qo(c))},addDurationVital:r,startDurationVital:(t,e={})=>Bo(n,t,e),stopDurationVital:(t,e={})=>{Fo(r,n,t,e)}}}function Bo({vitalsByName:t,vitalsByReference:e},n,r={}){const o={name:n,startClocks:H(),...r},i={__dd_vital_reference:!0};return t.set(n,o),e.set(i,o),i}function Fo(t,{vitalsByName:e,vitalsByReference:n},r,o={}){const i="string"==typeof r?e.get(r):n.get(r);i&&(t(function(t,e,n,r){var o;return{name:t.name,type:zo,startClocks:e,duration:W(e.timeStamp,r.timeStamp),context:Cn(t.context,n.context),description:null!==(o=n.description)&&void 0!==o?o:t.description}}(i,i.startClocks,o,H())),"string"==typeof r?e.delete(r):n.delete(r))}function qo(t){const{startClocks:e,type:n,name:r,description:o,context:i}=t,s={id:tt(),type:n,name:r,description:o,...n===zo?{duration:B(t.duration)}:{step_type:t.stepType,operation_key:t.operationKey,failure_reason:t.failureReason}};return{rawRumEvent:{date:e.timeStamp,vital:s,type:Co,context:i},startTime:e.relative,duration:n===zo?t.duration:void 0,domainContext:{}}}function jo(t,e,n){if(t)for(const r of t){const t=r[e];t&&t(n)}}const Ho=["tracecontext","datadog"];function Go(t,e){var n,r,i,s,a,c,u;if(void 0===t.trackFeatureFlagsForEvents||Array.isArray(t.trackFeatureFlagsForEvents)||o.warn("trackFeatureFlagsForEvents should be an array"),!t.applicationId)return void o.error("Application ID is not configured, no RUM data will be collected.");if(!ve(t.sessionReplaySampleRate,"Session Replay")||!ve(t.traceSampleRate,"Trace"))return;if(void 0!==t.excludedActivityUrls&&!Array.isArray(t.excludedActivityUrls))return void o.error("Excluded Activity Urls should be an array");const l=function(t){if(void 0===t.allowedTracingUrls)return[];if(!Array.isArray(t.allowedTracingUrls))return void o.error("Allowed Tracing URLs should be an array");if(0!==t.allowedTracingUrls.length&&void 0===t.service)return void o.error("Service needs to be configured when tracing is enabled");const e=[];return t.allowedTracingUrls.forEach((t=>{const n=Ko(t);n?e.push(n):o.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",t)})),e}(t);if(!l)return;const f=ye(t,e),h=function(t){if(!t.allowedGraphQlUrls)return[];if(!Array.isArray(t.allowedGraphQlUrls))return o.warn("allowedGraphQlUrls should be an array"),[];const e=[];return t.allowedGraphQlUrls.forEach((t=>{ne(t)?e.push({match:t,trackPayload:!1,trackResponseErrors:!1}):ee(t)&&ne(t.match)&&e.push({match:t.match,trackPayload:!!t.trackPayload,trackResponseErrors:!!t.trackResponseErrors})})),e}(t);if(!f)return;const m=null!==(n=t.sessionReplaySampleRate)&&void 0!==n?n:0;return{applicationId:t.applicationId,actionNameAttribute:t.actionNameAttribute,betaTrackActionsInShadowDom:!!t.betaTrackActionsInShadowDom,sessionReplaySampleRate:m,startSessionReplayRecordingManually:void 0!==t.startSessionReplayRecordingManually?!!t.startSessionReplayRecordingManually:0===m,traceSampleRate:null!==(r=t.traceSampleRate)&&void 0!==r?r:100,rulePsr:d(t.traceSampleRate)?t.traceSampleRate/100:void 0,allowedTracingUrls:l,excludedActivityUrls:null!==(i=t.excludedActivityUrls)&&void 0!==i?i:[],workerUrl:t.workerUrl,compressIntakeRequests:!!t.compressIntakeRequests,trackUserInteractions:!(null!==(s=t.trackUserInteractions)&&void 0!==s&&!s),trackViewsManually:!!t.trackViewsManually,trackResources:!(null!==(a=t.trackResources)&&void 0!==a&&!a),trackLongTasks:!(null!==(c=t.trackLongTasks)&&void 0!==c&&!c),trackBfcacheViews:!!t.trackBfcacheViews,trackEarlyRequests:!!t.trackEarlyRequests,subdomain:t.subdomain,defaultPrivacyLevel:p(he,t.defaultPrivacyLevel)?t.defaultPrivacyLevel:he.MASK,enablePrivacyForActionName:!!t.enablePrivacyForActionName,traceContextInjection:p(me,t.traceContextInjection)?t.traceContextInjection:me.SAMPLED,plugins:t.plugins||[],trackFeatureFlagsForEvents:t.trackFeatureFlagsForEvents||[],profilingSampleRate:null!==(u=t.profilingSampleRate)&&void 0!==u?u:0,propagateTraceBaggage:!!t.propagateTraceBaggage,allowedGraphQlUrls:h,...f}}function Wo(t){const e=new Set;return gr(t.allowedTracingUrls)&&t.allowedTracingUrls.forEach((t=>{var n;null===(n=Ko(t))||void 0===n||n.propagatorTypes.forEach((t=>e.add(t)))})),Array.from(e)}function Ko(t){return ne(t)?{match:t,propagatorTypes:Ho}:ee(t)&&ne(t.match)&&(null===t.propagatorTypes||void 0===t.propagatorTypes||Array.isArray(t.propagatorTypes))?{match:t.match,propagatorTypes:t.propagatorTypes||Ho}:void 0}function Yo(t){return gr(t)&&t.some((t=>ee(t)&&t.trackResponseErrors))}function Xo(t){var e;const n={session_sample_rate:(r=t).sessionSampleRate,telemetry_sample_rate:r.telemetrySampleRate,telemetry_configuration_sample_rate:r.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:r.telemetryUsageSampleRate,use_before_send:!!r.beforeSend,use_partitioned_cross_site_session_cookie:r.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:r.useSecureSessionCookie,use_proxy:!!r.proxy,silent_multiple_init:r.silentMultipleInit,track_session_across_subdomains:r.trackSessionAcrossSubdomains,track_anonymous_user:r.trackAnonymousUser,session_persistence:r.sessionPersistence,allow_fallback_to_local_storage:!!r.allowFallbackToLocalStorage,store_contexts_across_pages:!!r.storeContextsAcrossPages,allow_untrusted_events:!!r.allowUntrustedEvents,tracking_consent:r.trackingConsent,use_allowed_tracking_origins:Array.isArray(r.allowedTrackingOrigins),beta_encode_cookie_options:r.betaEncodeCookieOptions,source:r.source,sdk_version:r.sdkVersion,variant:r.variant};var r,o;return{session_replay_sample_rate:t.sessionReplaySampleRate,start_session_replay_recording_manually:t.startSessionReplayRecordingManually,trace_sample_rate:t.traceSampleRate,trace_context_injection:t.traceContextInjection,propagate_trace_baggage:t.propagateTraceBaggage,action_name_attribute:t.actionNameAttribute,use_allowed_tracing_urls:gr(t.allowedTracingUrls),use_allowed_graph_ql_urls:gr(t.allowedGraphQlUrls),use_track_graph_ql_payload:(o=t.allowedGraphQlUrls,gr(o)&&o.some((t=>ee(t)&&t.trackPayload))),use_track_graph_ql_response_errors:Yo(t.allowedGraphQlUrls),selected_tracing_propagators:Wo(t),default_privacy_level:t.defaultPrivacyLevel,enable_privacy_for_action_name:t.enablePrivacyForActionName,use_excluded_activity_urls:gr(t.excludedActivityUrls),use_worker_url:!!t.workerUrl,compress_intake_requests:t.compressIntakeRequests,track_views_manually:t.trackViewsManually,track_user_interactions:t.trackUserInteractions,track_resources:t.trackResources,track_long_task:t.trackLongTasks,track_bfcache_views:t.trackBfcacheViews,track_early_requests:t.trackEarlyRequests,plugins:null===(e=t.plugins)||void 0===e?void 0:e.map((t=>{var e;return{name:t.name,...null===(e=t.getConfigurationTelemetry)||void 0===e?void 0:e.call(t)}})),track_feature_flags_for_events:t.trackFeatureFlagsForEvents,remote_configuration_id:t.remoteConfigurationId,profiling_sample_rate:t.profilingSampleRate,use_remote_configuration_proxy:!!t.remoteConfigurationProxy,...n}}const Jo=/[a-zA-Z_$]/,Zo=/[a-zA-Z0-9_$]/,Qo=/[0-9]/,ti=/[a-fA-F0-9]/,ei={0:()=>!1,1:()=>!1,2:t=>Jo.test(t),3:t=>Zo.test(t),4:t=>"."===t,5:t=>"["===t,6:t=>"]"===t,7:t=>Qo.test(t),8:t=>"'\"".includes(t),9:(t,e)=>t===e.quote,10:()=>!0,11:t=>"\\"===t,12:(t,e)=>void 0===e.escapeSequence?`${e.quote}/\\bfnrtu`.includes(t):!!(e.escapeSequence.startsWith("u")&&e.escapeSequence.length<5)&&ti.test(t)},ni={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},ri=[2,3,7,10],oi=[4,5,6];const ii={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function si(t){return t.startsWith("u")?String.fromCharCode(parseInt(t.slice(1),16)):ii[t]}const ai=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function ci(t,e){let n;const r=function(){const t={fetch:{}};return{get:()=>t,increment:(e,n)=>{t[e]||(t[e]={}),t[e][n]||(t[e][n]=0),t[e][n]=t[e][n]+1}}}(),i=await async function(t){let e;try{e=await In(function(t){if(t.remoteConfigurationProxy)return t.remoteConfigurationProxy;return`https://sdk-configuration.${fe("rum",t)}/v1/${encodeURIComponent(t.remoteConfigurationId)}.json`}(t))}catch(t){e=void 0}if(!e||!e.ok)return{ok:!1,error:new Error("Error fetching the remote configuration.")};const n=await e.json();if(n.rum)return{ok:!0,value:n.rum};return{ok:!1,error:new Error("No remote configuration for RUM.")}}(t);return i.ok?(r.increment("fetch","success"),n=function(t,e,n,r){const i={...t};return ai.forEach((t=>{t in e&&(i[t]=s(e[t]))})),Object.keys(n).forEach((t=>{void 0!==e[t]&&a(n[t],e[t])})),i;function s(t){if(Array.isArray(t))return t.map(s);if(ee(t)){if("rcSerializedType"in t){const e=t.rcSerializedType;switch(e){case"string":return t.value;case"regex":return ui(t.value);case"dynamic":return c(t);default:return void o.error(`Unsupported remote configuration: "rcSerializedType": "${e}"`)}}return m(t,s)}return t}function a(t,e){e.forEach((({key:e,value:n})=>{t.setContextProperty(e,s(n))}))}function c(t){const e=t.strategy;let n;switch(e){case"cookie":n=u(t);break;case"dom":n=l(t);break;case"js":n=f(t);break;default:return void o.error(`Unsupported remote configuration: "strategy": "${e}"`)}const r=t.extractor;return void 0!==r&&"string"==typeof n?function(t,e){const n=ui(t.value);if(void 0===n)return;const r=n.exec(e);if(null===r)return;const[o,i]=r;return i||o}(r,n):n}function u({name:t}){const e=ft(t);return r.increment("cookie",void 0!==e?"success":"missing"),e}function l({selector:t,attribute:e}){let n;try{n=document.querySelector(t)}catch(e){return o.error(`Invalid selector in the remote configuration: '${t}'`),void r.increment("dom","failure")}if(!n)return void r.increment("dom","missing");if(d(n,e))return o.error(`Forbidden element selected by the remote configuration: '${t}'`),void r.increment("dom","failure");const i=void 0!==e?n.getAttribute(e):n.textContent;if(null!==i)return r.increment("dom","success"),i;r.increment("dom","missing")}function d(t,e){return"password"===t.getAttribute("type")&&"value"===e}function f({path:t}){let e=window;const n=function(t){const e=[];let n,r=0;const o={quote:void 0,escapeSequence:void 0};let i="";for(const a of t){if(n=ni[r].find((t=>ei[t](a,o))),!n)return[];if(void 0!==o.escapeSequence&&12!==n){if(s=o.escapeSequence,!("\"'/\\bfnrt".includes(s)||s.startsWith("u")&&5===s.length))return[];i+=si(o.escapeSequence),o.escapeSequence=void 0}ri.includes(n)?i+=a:oi.includes(n)&&""!==i?(e.push(i),i=""):12===n?o.escapeSequence=o.escapeSequence?`${o.escapeSequence}${a}`:a:8===n?o.quote=a:9===n&&(o.quote=void 0),r=n}var s;return ni[r].includes(1)?(""!==i&&e.push(i),e):[]}(t);if(0===n.length)return o.error(`Invalid JSON path in the remote configuration: '${t}'`),void r.increment("js","failure");for(const i of n){if(!(i in e))return void r.increment("js","missing");try{e=e[i]}catch(e){return o.error(`Error accessing: '${t}'`,e),void r.increment("js","failure")}}return r.increment("js","success"),e}}(t,i.value,e,r)):(r.increment("fetch","failure"),o.error(i.error)),dr("remote configuration metrics",{metrics:r.get()}),n}function ui(t){try{return new RegExp(t)}catch(e){o.error(`Invalid regex in the remote configuration: '${t}'`)}}function li({ignoreInitIfSyntheticsWillInjectRum:t=!0,startDeflateWorker:e},n,r,i){const s=function(){const t=[];return{add:e=>{t.push(e)>500&&t.splice(0,1)},remove:e=>{mr(t,e)},drain:e=>{t.forEach((t=>t(e))),t.length=0}}}(),a=Qr();di(a,no,s);const c=to();di(c,eo,s);const u=Zr();let l,d,f,p;di(u,ro,s);const h=n.observable.subscribe(g),m={};function g(){if(!f||!p||!n.isGranted())return;let t;if(h.unsubscribe(),p.trackViewsManually){if(!l)return;s.remove(l.callback),t=l.options}const e=i(p,d,t);s.drain(e)}function v(t,r){const i=Hn();if(i&&(t=function(t){var e,n;return{...t,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:null!==(e=t.defaultPrivacyLevel)&&void 0!==e?e:null===(n=qn())||void 0===n?void 0:n.getPrivacyLevel()}}(t)),f=t,function(t){ar().notify({rawEvent:{type:nr,configuration:t}})}(Xo(t)),p)return void hn("DD_RUM",t);const s=Go(t,r);s&&(i||s.sessionStoreStrategyType?s.compressIntakeRequests&&!i&&e&&(d=e(s,"Datadog RUM",Q),!d)||(p=s,Vr().subscribe(Q),n.tryToInit(s.trackingConsent),g()):o.warn("No storage available for session. We will not send any data."))}const y=t=>{s.add((e=>e.addDurationVital(t)))};return{init(e,n,r){e?(we(e.enableExperimentalFeatures),f=e,t&&wr()||(jo(e.plugins,"onInit",{initConfiguration:e,publicApi:n}),e.remoteConfigurationId?ci(e,{user:c,context:a}).then((t=>{t&&v(t,r)})).catch(E):v(e,r))):o.error("Missing configuration")},get initConfiguration(){return f},getInternalContext:Q,stopSession:Q,addTiming(t,e=q()){s.add((n=>n.addTiming(t,e)))},startView(t,e=H()){const n=n=>{n.startView(t,e)};s.add(n),l||(l={options:t,callback:n},g())},setViewName(t){s.add((e=>e.setViewName(t)))},setViewContext(t){s.add((e=>e.setViewContext(t)))},setViewContextProperty(t,e){s.add((n=>n.setViewContextProperty(t,e)))},getViewContext:()=>m,globalContext:a,userContext:c,accountContext:u,addAction(t){s.add((e=>e.addAction(t)))},startAction(t,e){const n=H();s.add((r=>r.startAction(t,e,n)))},stopAction(t,e){const n=H();s.add((r=>r.stopAction(t,e,n)))},addError(t){s.add((e=>e.addError(t)))},addFeatureFlagEvaluation(t,e){s.add((n=>n.addFeatureFlagEvaluation(t,e)))},startDurationVital:(t,e)=>Bo(r,t,e),stopDurationVital(t,e){Fo(y,r,t,e)},addDurationVital:y,addOperationStepVital:(t,e,n,r)=>{s.add((o=>o.addOperationStepVital(Ye(t),e,Ye(n),Ye(r))))}}}function di(t,e,n){t.changeObservable.subscribe((()=>{const r=t.getContext();n.add((t=>t[e].setContext(r)))}))}function fi(){let t;const e=window;if(e.Zone&&(t=_(e,"MutationObserver"),e.MutationObserver&&t===e.MutationObserver)){const n=_(new e.MutationObserver(Q),"originalInstance");t=n&&n.constructor}return t||(t=e.MutationObserver),t}const pi=class{constructor(){this.callbacks={}}notify(t,e){const n=this.callbacks[t];n&&n.forEach((t=>t(e)))}subscribe(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter((t=>e!==t))}}}},hi=wt;const mi="initial_document",gi=[[uo,t=>mi===t],[lo,t=>"xmlhttprequest"===t],[po,t=>"fetch"===t],[fo,t=>"beacon"===t],[ho,(t,e)=>/\.css$/i.test(e)],[mo,(t,e)=>/\.js$/i.test(e)],[go,(t,e)=>["image","img","icon"].includes(t)||null!==/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(e)],[vo,(t,e)=>null!==/\.(woff|eot|woff2|ttf)$/i.exec(e)],[yo,(t,e)=>["audio","video"].includes(t)||null!==/\.(mp3|mp4)$/i.exec(e)]];function vi(t){const e=t.name;if(!function(t){try{return!!lt(t)}catch(t){return!1}}(e))return _o;const n=function(t){const e=lt(t).pathname;return"/"===e[0]?e:`/${e}`}(e);for(const[e,r]of gi)if(r(t.initiatorType,n))return e;return _o}function yi(...t){for(let e=1;e<t.length;e+=1)if(t[e-1]>t[e])return!1;return!0}function _i(t){return"xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType}function bi(t){if(!Si(t))return;const{startTime:e,fetchStart:n,workerStart:r,redirectStart:o,redirectEnd:i,domainLookupStart:s,domainLookupEnd:a,connectStart:c,secureConnectionStart:u,connectEnd:l,requestStart:d,responseStart:f,responseEnd:p}=t,h={download:ki(e,f,p),first_byte:ki(e,d,f)};return 0<r&&r<n&&(h.worker=ki(e,r,n)),n<l&&(h.connect=ki(e,c,l),c<=u&&u<=l&&(h.ssl=ki(e,u,l))),n<a&&(h.dns=ki(e,s,a)),e<i&&(h.redirect=ki(e,o,i)),h}function wi(t){return t.duration>=0}function Si(t){const e=yi(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd),n=!function(t){return t.redirectEnd>t.startTime}(t)||yi(t.startTime,t.redirectStart,t.redirectEnd,t.fetchStart);return e&&n}function ki(t,e,n){if(t<=e&&e<=n)return{duration:B(W(e,n)),start:B(W(t,e))}}function Ti(t){return""===t.nextHopProtocol?void 0:t.nextHopProtocol}function Ei(t){return""===t.deliveryType?"other":t.deliveryType}function xi(t){if(t.startTime<t.responseStart){const{encodedBodySize:e,decodedBodySize:n,transferSize:r}=t;return{size:n,encoded_body_size:e,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function Ci(t){return t&&(!function(t){return le.every((e=>t.includes(e)))}(t)||Se(_e.TRACK_INTAKE_REQUESTS))}const Ai=/data:(.+)?(;base64)?,/g;function Ii(t,e=24e3){if(t.length<=e||!t.startsWith("data:"))return t;const n=t.substring(0,100).match(Ai);return n?`${n[0]}[...]`:t}const Ri=new Map;function Ni(t,e){if(100===e)return!0;if(0===e)return!1;const n=Ri.get(e);if(n&&t===n.sessionId)return n.decision;let r;return r=window.BigInt?function(t,e){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000");return Number(t*n%r)<=e/100*Number(r)}(BigInt(`0x${t.split("-")[4]}`),e):u(e),Ri.set(e,{sessionId:t,decision:r}),r}function Oi(){return Mi(63)}function Mi(t){const e=crypto.getRandomValues(new Uint32Array(2));return 63===t&&(e[e.length-1]>>>=1),{toString(t=10){let n=e[1],r=e[0],o="";do{const e=n%t*4294967296+r;n=Math.floor(n/t),r=Math.floor(e/t),o=(e%t).toString(t)+o}while(n||r);return o}}}function Pi(t){return t.toString(16).padStart(16,"0")}function Di(t){0!==t.status||t.isAborted||(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function Li(t,e,n,r,o,i){const s=n.findTrackedSession();if(!s)return;const a=t.allowedTracingUrls.find((t=>re([t.match],e.url,!0)));if(!a)return;const c=Ni(s.id,t.traceSampleRate);(c||t.traceContextInjection===me.ALL)&&(e.traceSampled=c,e.traceId=Mi(64),e.spanId=Oi(),i(function(t,e,n,r,o,i,s,a){const c={};if(o.forEach((r=>{switch(r){case"datadog":Object.assign(c,{"x-datadog-origin":"rum","x-datadog-parent-id":e.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":t.toString()});break;case"tracecontext":Object.assign(c,{traceparent:`00-0000000000000000${Pi(t)}-${Pi(e)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break;case"b3":Object.assign(c,{b3:`${Pi(t)}-${Pi(e)}-${n?"1":"0"}`});break;case"b3multi":Object.assign(c,{"X-B3-TraceId":Pi(t),"X-B3-SpanId":Pi(e),"X-B3-Sampled":n?"1":"0"})}})),a.propagateTraceBaggage){const t={"session.id":r},e=i.getContext().id;"string"==typeof e&&(t["user.id"]=e);const n=s.getContext().id;"string"==typeof n&&(t["account.id"]=n);const o=Object.entries(t).map((([t,e])=>`${t}=${encodeURIComponent(e)}`)).join(",");o&&(c.baggage=o)}return c}(e.traceId,e.spanId,e.traceSampled,s.id,a.propagatorTypes,r,o,t)))}function Ui(t,e){const n=function(t,e=!1){if(!t||"string"!=typeof t)return;let n,r,o;try{n=JSON.parse(t)}catch(i){return}if(!n)return;if(n.query){const t=n.query.trim();r=null===(i=t.match(/^\s*(query|mutation|subscription)\b/i))||void 0===i?void 0:i[1],e&&(o=rt(t,32768,"..."))}var i;const s=n.operationName;let a;n.variables&&(a=JSON.stringify(n.variables));return{operationType:r,operationName:s,variables:a,payload:o}}(t.requestBody,e.trackPayload);if(n){if(e.trackResponseErrors&&t.responseBody){const e=function(t){let e;try{e=JSON.parse(t)}catch(t){return}if(!e||"object"!=typeof e)return;const n=e;if(!gr(n.errors))return;return n.errors.map((t=>{var e;return{message:t.message,path:t.path,locations:t.locations,code:null===(e=t.extensions)||void 0===e?void 0:e.code}}))}(t.responseBody);e&&(n.error_count=e.length,n.errors=e)}return n}}function zi(t,e){return e.allowedGraphQlUrls.find((e=>re([e.match],t)))}let $i=1;function Vi(t,e,n,r,o){const i=function(t,e,n,r){return{clearTracingIfNeeded:Di,traceFetch:o=>Li(t,o,e,n,r,(t=>{var e;if(o.input instanceof Request&&!(null===(e=o.init)||void 0===e?void 0:e.headers))o.input=new Request(o.input),Object.keys(t).forEach((e=>{o.input.headers.append(e,t[e])}));else{o.init=f(o.init);const e=[];o.init.headers instanceof Headers?o.init.headers.forEach(((t,n)=>{e.push([n,t])})):Array.isArray(o.init.headers)?o.init.headers.forEach((t=>{e.push(t)})):o.init.headers&&Object.keys(o.init.headers).forEach((t=>{e.push([t,o.init.headers[t]])})),o.init.headers=e.concat(bt(t))}})),traceXhr:(o,i)=>Li(t,o,e,n,r,(t=>{Object.keys(t).forEach((e=>{i.setRequestHeader(e,t[e])}))}))}}(e,n,r,o);!function(t,e,n){const r=Dr(e).subscribe((e=>{const r=e;if(Ci(r.url))switch(r.state){case"start":n.traceXhr(r,r.xhr),r.requestIndex=Bi(),t.notify(7,{requestIndex:r.requestIndex,url:r.url});break;case"complete":n.clearTracingIfNeeded(r),t.notify(8,{duration:r.duration,method:r.method,requestIndex:r.requestIndex,spanId:r.spanId,startClocks:r.startClocks,status:r.status,traceId:r.traceId,traceSampled:r.traceSampled,type:bo.XHR,url:r.url,xhr:r.xhr,isAborted:r.isAborted,handlingStack:r.handlingStack,requestBody:r.requestBody,responseBody:r.responseBody})}}))}(t,e,i),function(t,e,n){const r=Vr({responseBodyAction:t=>{var n;return(null===(n=zi(t.url,e))||void 0===n?void 0:n.trackResponseErrors)?2:1}}).subscribe((e=>{var r;const o=e;if(Ci(o.url))switch(o.state){case"start":n.traceFetch(o),o.requestIndex=Bi(),t.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"resolve":n.clearTracingIfNeeded(o),t.notify(8,{duration:W(o.startClocks.timeStamp,q()),method:o.method,requestIndex:o.requestIndex,responseType:o.responseType,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:bo.FETCH,url:o.url,response:o.response,init:o.init,input:o.input,isAborted:o.isAborted,handlingStack:o.handlingStack,requestBody:null===(r=o.init)||void 0===r?void 0:r.body,responseBody:o.responseBody})}}))}(t,e,i)}function Bi(){const t=$i;return $i+=1,t}function Fi(t){return d(t)&&t<0?void 0:t}function qi(t){return t.nodeType===Node.TEXT_NODE}function ji(t){return t.nodeType===Node.ELEMENT_NODE}function Hi(t){return ji(t)&&Boolean(t.shadowRoot)}function Gi(t){const e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&ji(e.host)}function Wi(t,e){let n=t.firstChild;for(;n;)e(n),n=n.nextSibling;Hi(t)&&e(t.shadowRoot)}function Ki(t){return Gi(t)?t.host:t.parentNode}function Yi(t){if(t.parentElement)return t.parentElement;const e=t.parentNode;return e&&Gi(e)?e.host:null}function Xi(t,e){const n=F();let r=!1;const{stop:o}=gn(t,window,["click","mousedown","keydown","touchstart","pointerdown"],(e=>{if(!e.cancelable)return;const n={entryType:"first-input",processingStart:j(),processingEnd:j(),startTime:e.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};"pointerdown"===e.type?function(t,e){gn(t,window,["pointerup","pointercancel"],(t=>{"pointerup"===t.type&&i(e)}),{once:!0})}(t,n):i(n)}),{passive:!0,capture:!0});return{stop:o};function i(t){if(!r){r=!0,o();const i=t.processingStart-t.startTime;i>=0&&i<F()-n&&e(t)}}}var Ji;function Zi(t,e){return new O((n=>{if(!window.PerformanceObserver)return;const r=t=>{const e=function(t){return t.filter((t=>!function(t){return!(t.entryType!==Ji.RESOURCE||Ci(t.name)&&wi(t))}(t)))}(t);e.length>0&&n.notify(e)};let o,i=!0;const s=new PerformanceObserver(k((t=>{i?o=C((()=>r(t.getEntries()))):r(t.getEntries())})));try{s.observe(e)}catch(t){if([Ji.RESOURCE,Ji.NAVIGATION,Ji.LONG_TASK,Ji.PAINT].includes(e.type)){e.buffered&&(o=C((()=>r(performance.getEntriesByType(e.type)))));try{s.observe({entryTypes:[e.type]})}catch(t){return}}}let a;return i=!1,function(t){!Qi&&void 0!==window.performance&&"getEntries"in performance&&"addEventListener"in performance&&(Qi=mn(t,performance,"resourcetimingbufferfull",(()=>{performance.clearResourceTimings()})))}(t),ts(Ji.FIRST_INPUT)||e.type!==Ji.FIRST_INPUT||({stop:a}=Xi(t,(t=>{r([t])}))),()=>{s.disconnect(),a&&a(),A(o)}}))}let Qi;function ts(t){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(t)}!function(t){t.EVENT="event",t.FIRST_INPUT="first-input",t.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",t.LAYOUT_SHIFT="layout-shift",t.LONG_TASK="longtask",t.LONG_ANIMATION_FRAME="long-animation-frame",t.NAVIGATION="navigation",t.PAINT="paint",t.RESOURCE="resource",t.VISIBILITY_STATE="visibility-state"}(Ji||(Ji={}));const es=100,ns="data-dd-excluded-activity-mutations";function rs(t,e,n,r,o,i){const s=function(t,e,n,r){return new O((o=>{const i=[];let s,a=0;return i.push(e.subscribe((t=>{t.every(is)||c()})),n.subscribe(c),Zi(r,{type:Ji.RESOURCE}).subscribe((t=>{t.some((t=>!os(r,t.name)))&&c()})),t.subscribe(7,(t=>{os(r,t.url)||(void 0===s&&(s=t.requestIndex),a+=1,c())})),t.subscribe(8,(t=>{os(r,t.url)||void 0===s||t.requestIndex<s||(a-=1,c())}))),()=>{i.forEach((t=>t.unsubscribe()))};function c(){o.notify({isBusy:a>0})}}))}(t,e,n,r);return function(t,e,n){let r,o=!1;const i=C(k((()=>u({hadActivity:!1}))),100),s=void 0!==n?C(k((()=>u({hadActivity:!0,end:q()}))),n):void 0,a=t.subscribe((({isBusy:t})=>{A(i),A(r);const e=q();t||(r=C(k((()=>u({hadActivity:!0,end:e}))),100))})),c=()=>{o=!0,A(i),A(r),A(s),a.unsubscribe()};function u(t){o||(c(),e(t))}return{stop:c}}(s,o,i)}function os(t,e){return re(t.excludedActivityUrls,e)}function is(t){const e="characterData"===t.type?t.target.parentElement:t.target;return Boolean(e&&ji(e)&&e.matches(`[${ns}], [${ns}] *`))}const ss="data-dd-action-name",as="Masked Element",cs=[ss,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],us=[ps,function(t){if(t.id&&!fs(t.id))return`#${CSS.escape(t.id)}`}],ls=[ps,function(t){if("BODY"===t.tagName)return;const e=t.classList;for(let n=0;n<e.length;n+=1){const r=e[n];if(!fs(r))return`${CSS.escape(t.tagName)}.${CSS.escape(r)}`}},function(t){return CSS.escape(t.tagName)}];function ds(t,e){if(!t.isConnected)return;let n,r=t;for(;r&&"HTML"!==r.nodeName;){const t=ms(r,us,gs,e,n);if(t)return t;n=ms(r,ls,vs,e,n)||ys(hs(r),n),r=r.parentElement}return n}function fs(t){return/[0-9]/.test(t)}function ps(t,e){if(e){const t=n(e);if(t)return t}for(const t of cs){const e=n(t);if(e)return e}function n(e){if(t.hasAttribute(e))return`${CSS.escape(t.tagName)}[${e}="${CSS.escape(t.getAttribute(e))}"]`}}function hs(t){let e=t.parentElement.firstElementChild,n=1;for(;e&&e!==t;)e.tagName===t.tagName&&(n+=1),e=e.nextElementSibling;return`${CSS.escape(t.tagName)}:nth-of-type(${n})`}function ms(t,e,n,r,o){for(const i of e){const e=i(t,r);if(e&&n(t,e,o))return ys(e,o)}}function gs(t,e,n){return 1===t.ownerDocument.querySelectorAll(ys(e,n)).length}function vs(t,e,n){let r;if(void 0===n)r=t=>t.matches(e);else{const t=ys(`${e}:scope`,n);r=e=>null!==e.querySelector(t)}let o=t.parentElement.firstElementChild;for(;o;){if(o!==t&&r(o))return!1;o=o.nextElementSibling}return!0}function ys(t,e){return e?`${t}>${e}`:t}const _s={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:he.ALLOW,MASK:he.MASK,MASK_USER_INPUT:he.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:he.MASK_UNLESS_ALLOWLISTED},bs="data-dd-privacy",ws="hidden",Ss="***",ks="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",Ts={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function Es(t){return`[${bs}="${t}"], .dd-privacy-${t}`}function xs(t,e,n){if(n&&n.has(t))return n.get(t);const r=Ki(t),o=r?xs(r,e,n):e,i=Cs(As(t),o);return n&&n.set(t,i),i}function Cs(t,e){switch(e){case _s.HIDDEN:case _s.IGNORE:return e}switch(t){case _s.ALLOW:case _s.MASK:case _s.MASK_USER_INPUT:case _s.MASK_UNLESS_ALLOWLISTED:case _s.HIDDEN:case _s.IGNORE:return t;default:return e}}function As(t){if(ji(t)){if("BASE"===t.tagName)return _s.ALLOW;if("INPUT"===t.tagName){const e=t;if("password"===e.type||"email"===e.type||"tel"===e.type)return _s.MASK;if("hidden"===e.type)return _s.MASK;const n=e.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return _s.MASK}return t.matches(Es(_s.HIDDEN))?_s.HIDDEN:t.matches(Es(_s.MASK))?_s.MASK:t.matches(Es(_s.MASK_UNLESS_ALLOWLISTED))?_s.MASK_UNLESS_ALLOWLISTED:t.matches(Es(_s.MASK_USER_INPUT))?_s.MASK_USER_INPUT:t.matches(Es(_s.ALLOW))?_s.ALLOW:function(t){if("SCRIPT"===t.nodeName)return!0;if("LINK"===t.nodeName){const t=e("rel");return/preload|prefetch/i.test(t)&&"script"===e("as")||"shortcut icon"===t||"icon"===t}if("META"===t.nodeName){const n=e("name"),r=e("rel"),o=e("property");return/^msapplication-tile(image|color)$/.test(n)||"application-name"===n||"icon"===r||"apple-touch-icon"===r||"shortcut icon"===r||"keywords"===n||"description"===n||/^(og|twitter|fb):/.test(o)||/^(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(o)||/^product:/.test(o)||"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 e(e){return(t.getAttribute(e)||"").toLowerCase()}return!1}(t)?_s.IGNORE:void 0}}function Is(t,e){switch(e){case _s.MASK:case _s.HIDDEN:case _s.IGNORE:return!0;case _s.MASK_UNLESS_ALLOWLISTED:return qi(t)?!!Ns(t.parentNode)||!Ps(t.textContent||""):Ns(t);case _s.MASK_USER_INPUT:return qi(t)?Ns(t.parentNode):Ns(t);default:return!1}}function Rs(t,e,n,r,o){if(r!==_s.MASK&&r!==_s.MASK_UNLESS_ALLOWLISTED)return!1;if(e===bs||cs.includes(e)||e===o.actionNameAttribute)return!1;switch(e){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return"A"===t&&"href"===e||("IFRAME"===t&&"srcdoc"===e||(!(!n||!e.startsWith("data-"))||!("IMG"!==t&&"SOURCE"!==t||"src"!==e&&"srcset"!==e)))}function Ns(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;const e=t;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!Ts[e.tagName]}const Os=t=>t.replace(/\S/g,"x");function Ms(t,e){var n;const r=null===(n=t.parentElement)||void 0===n?void 0:n.tagName;let o=t.textContent||"";if("HEAD"===r&&!o.trim())return;const i=e;if("SCRIPT"===r)o=Ss;else if(i===_s.HIDDEN)o=Ss;else if(Is(t,i))if("DATALIST"===r||"SELECT"===r||"OPTGROUP"===r){if(!o.trim())return}else o="OPTION"===r?Ss:i===_s.MASK_UNLESS_ALLOWLISTED?Ds(o):Os(o);return o}function Ps(t){var e;return!t||!t.trim()||((null===(e=window.$DD_ALLOW)||void 0===e?void 0:e.has(t.toLocaleLowerCase()))||!1)}function Ds(t,e){return Ps(t)?t:e||Os(t)}const Ls=D;function Us(t,e){const n=[];let r,o=0;function i(t){t.stopObservable.subscribe(s),n.push(t),A(r),r=C(a,Ls)}function s(){1===o&&n.every((t=>t.isStopped()))&&(o=2,e(n))}function a(){A(r),0===o&&(o=1,s())}return i(t),{tryAppend:t=>{return 0===o&&(n.length>0&&(e=n[n.length-1].event,r=t.event,!(e.target===r.target&&(s=e,c=r,Math.sqrt(Math.pow(s.clientX-c.clientX,2)+Math.pow(s.clientY-c.clientY,2))<=100)&&e.timeStamp-r.timeStamp<=Ls))?(a(),!1):(i(t),!0));var e,r,s,c},stop:()=>{a()}}}function zs(t,e){const n=function(t,e){let n=t;for(;n;){if(n.matches(e))return n;n=Yi(n)}return null}(t,`[${e}]`);if(!n)return;return js(qs(n.getAttribute(e).trim()))}const $s=[(t,e,n)=>{if("labels"in t&&t.labels&&t.labels.length>0)return Gs(t.labels[0],e,n)},t=>{if("INPUT"===t.nodeName){const e=t,n=e.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return{name:e.value,nameSource:"text_content"}}},(t,e,n)=>{if("BUTTON"===t.nodeName||"LABEL"===t.nodeName||"button"===t.getAttribute("role"))return Gs(t,e,n)},(t,e,n)=>Hs(t,"aria-label",e,n),(t,e,n)=>{const r=t.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map((e=>function(t,e){const n=t.getRootNode();if(n instanceof ShadowRoot){const t=n.getElementById(e);if(t)return t}return t.ownerDocument?t.ownerDocument.getElementById(e):null}(t,e))).filter((t=>Boolean(t))).map((t=>Ws(t,e,n))).join(" "),nameSource:"text_content"}},(t,e,n)=>Hs(t,"alt",e,n),(t,e,n)=>Hs(t,"name",e,n),(t,e,n)=>Hs(t,"title",e,n),(t,e,n)=>Hs(t,"placeholder",e,n),(t,e,n)=>{if("options"in t&&t.options.length>0)return Gs(t.options[0],e,n)}],Vs=[(t,e,n)=>Gs(t,e,n)],Bs=10;function Fs(t,e,n,r){let o=t,i=0;for(;i<=Bs&&o&&"BODY"!==o.nodeName&&"HTML"!==o.nodeName&&"HEAD"!==o.nodeName;){for(const t of e){const e=t(o,n,r);if(e){const{name:t,nameSource:n}=e,r=t&&t.trim();if(r)return{name:js(qs(r)),nameSource:n}}}if("FORM"===o.nodeName)break;o=Yi(o),i+=1}}function qs(t){return t.replace(/\s+/g," ")}function js(t){return t.length>100?`${rt(t,100)} [...]`:t}function Hs(t,e,n,r){const{enablePrivacyForActionName:o,defaultPrivacyLevel:i}=n;let s=t.getAttribute(e);if(s&&o){const o=xs(t,i,r);Rs(t.tagName,e,s,o,n)&&(s=Ds(s,as))}else s||(s="");return{name:s,nameSource:"standard_attribute"}}function Gs(t,e,n){return{name:Ws(t,e,n)||"",nameSource:"text_content"}}function Ws(t,e,n){if(t.isContentEditable)return;const{enablePrivacyForActionName:r,actionNameAttribute:o,defaultPrivacyLevel:i}=e;if(Se(_e.USE_TREE_WALKER_FOR_ACTION_NAME))return function(t,e,n,r,o){const i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,a);let s="";for(;i.nextNode();){const t=i.currentNode;ji(t)?("BR"===t.nodeName||"P"===t.nodeName||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(t).display))&&(s+=" "):s+=t.textContent||""}return s.replace(/\s+/g," ").trim();function a(t){const i=xs(t,r,o);if(n&&i&&Is(t,i))return NodeFilter.FILTER_REJECT;if(ji(t)){if(t.hasAttribute(ss)||e&&t.hasAttribute(e))return NodeFilter.FILTER_REJECT;const n=getComputedStyle(t);if("visible"!==n.visibility||"none"===n.display||n.contentVisibility&&"visible"!==n.contentVisibility)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}(t,o,r,i,n);if("innerText"in t){let e=t.innerText;const n=n=>{const r=t.querySelectorAll(n);for(let t=0;t<r.length;t+=1){const n=r[t];if("innerText"in n){const t=n.innerText;t&&t.trim().length>0&&(e=e.replace(t,""))}}};return n(`[${ss}]`),o&&n(`[${o}]`),r&&n(`${Es(_s.HIDDEN)}, ${Es(_s.MASK)}`),e}return t.textContent}function Ks(){const t=window.getSelection();return!t||t.isCollapsed}function Ys(t){return t.target instanceof Element&&!1!==t.isPrimary}function Xs(t,e){if(function(t){if(t.some((t=>t.getUserActivity().selection||t.getUserActivity().scroll)))return!1;for(let e=0;e<t.length-2;e+=1)if(t[e+3-1].event.timeStamp-t[e].event.timeStamp<=D)return!0;return!1}(t))return e.addFrustration(Do),t.some(Zs)&&e.addFrustration(Uo),e.hasError&&e.addFrustration(Lo),{isRage:!0};const n=t.some((t=>t.getUserActivity().selection));return t.forEach((t=>{t.hasError&&t.addFrustration(Lo),Zs(t)&&!n&&t.addFrustration(Uo)})),{isRage:!1}}const Js='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function Zs(t){if(t.hasPageActivity||t.getUserActivity().input||t.getUserActivity().scroll)return!1;let e=t.event.target;return"LABEL"===e.tagName&&e.hasAttribute("for")&&(e=document.getElementById(e.getAttribute("for"))),!e||!e.matches(Js)}const Qs=1e4,ta=new Map;function ea(t,e){ta.set(t,e),ta.forEach(((t,e)=>{W(e,j())>1e4&&ta.delete(e)}))}function na(t,e,n,r,o){const i=new O;let s;t.subscribe(5,u),t.subscribe(11,u);const{stop:a}=function(t,{onPointerDown:e,onPointerUp:n}){let r,o,i={selection:!1,input:!1,scroll:!1};const s=[mn(t,window,"pointerdown",(t=>{Ys(t)&&(r=Ks(),i={selection:!1,input:!1,scroll:!1},o=e(t))}),{capture:!0}),mn(t,window,"selectionchange",(()=>{r&&Ks()||(i.selection=!0)}),{capture:!0}),mn(t,window,"scroll",(()=>{i.scroll=!0}),{capture:!0,passive:!0}),mn(t,window,"pointerup",(t=>{if(Ys(t)&&o){const e=i;n(o,t,(()=>e)),o=void 0}}),{capture:!0}),mn(t,window,"input",(()=>{i.input=!0}),{capture:!0})];return{stop:()=>{s.forEach((t=>t.stop()))}}}(r,{onPointerDown:o=>function(t,e,n,r,o){const i=t.betaTrackActionsInShadowDom?ra(r):r.target;let s;s=t.enablePrivacyForActionName?xs(i,t.defaultPrivacyLevel):_s.ALLOW;if(s===_s.HIDDEN)return;const a=function(t,e,n){const r=t.target,o=r.getBoundingClientRect(),i=ds(r,n.actionNameAttribute);i&&ea(t.timeStamp,i);const s=n.betaTrackActionsInShadowDom?ra(t):t.target,{name:a,nameSource:c}=function(t,e,n=_s.ALLOW){const r=new Map,{actionNameAttribute:o}=e,i=zs(t,ss)||o&&zs(t,o);return i?{name:i,nameSource:"custom_attribute"}:n===_s.MASK?{name:as,nameSource:"mask_placeholder"}:Fs(t,$s,e,r)||Fs(t,Vs,e,r)||{name:"",nameSource:"blank"}}(s,n,e);return{type:Mo,target:{width:Math.round(o.width),height:Math.round(o.height),selector:i},position:{x:Math.round(t.clientX-o.left),y:Math.round(t.clientY-o.top)},name:a,nameSource:c}}(r,s,t);let c=!1;return rs(e,n,o,t,(t=>{c=t.hadActivity}),es),{clickActionBase:a,hadActivityOnPointerDown:()=>c}}(r,t,e,o,n),onPointerUp:({clickActionBase:s,hadActivityOnPointerDown:a},u,l)=>{!function(t,e,n,r,o,i,s,a,c,u,l){var d;const f=oa(e,o,u,a,c);s(f);const p=null===(d=null==a?void 0:a.target)||void 0===d?void 0:d.selector;p&&ea(c.timeStamp,p);const{stop:h}=rs(e,n,r,t,(t=>{t.hadActivity&&t.end<f.startClocks.timeStamp?f.discard():t.hadActivity?f.stop(t.end):l()?f.stop(f.startClocks.timeStamp):f.stop()}),Qs),m=e.subscribe(5,(({endClocks:t})=>{f.stop(t.timeStamp)})),g=e.subscribe(11,(()=>{f.stop(q())})),v=i.subscribe((()=>{f.stop()}));f.stopObservable.subscribe((()=>{g.unsubscribe(),m.unsubscribe(),h(),v.unsubscribe()}))}(r,t,e,n,o,i,c,s,u,l,a)}});return{stop:()=>{u(),i.notify(),a()}};function c(t){if(!s||!s.tryAppend(t)){const e=t.clone();s=Us(t,(t=>{!function(t,e){const{isRage:n}=Xs(t,e);n?(t.forEach((t=>t.discard())),e.stop(q()),e.validate(t.map((t=>t.event)))):(e.discard(),t.forEach((t=>t.validate())))}(t,e),s=void 0}))}}function u(){s&&s.stop()}}function ra(t){if(t.composed&&Hi(t.target)&&"function"==typeof t.composedPath){const e=t.composedPath();if(e.length>0&&e[0]instanceof Element)return e[0]}return t.target}function oa(t,e,n,r,o){const i=e.createTrackedAction(z(o.timeStamp));let s,a=0;const c=[],u=new O;function l(t){0===a&&(s=t,a=1,s?i.stop(Y(s)):i.discard(),u.notify())}return{event:o,stop:l,stopObservable:u,get hasError(){return i.counts.errorCount>0},get hasPageActivity(){return void 0!==s},getUserActivity:n,addFrustration:t=>{c.push(t)},get startClocks(){return i.startClocks},isStopped:()=>1===a||2===a,clone:()=>oa(t,e,n,r,o),validate:e=>{if(l(),1!==a)return;const n={startClocks:i.startClocks,duration:i.duration,id:i.id,frustrationTypes:c,counts:i.counts,events:null!=e?e:[o],event:o,...r};t.notify(0,n),a=2},discard:()=>{l(),a=2}}}function ia({lifeCycle:t,isChildEvent:e,onChange:n=Q}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=t.subscribe(13,(t=>{var o;if("view"!==t.type&&"vital"!==t.type&&e(t))switch(t.type){case ko:r.errorCount+=1,n();break;case So:r.actionCount+=1,t.action.frustration&&(r.frustrationCount+=t.action.frustration.type.length),n();break;case To:r.longTaskCount+=1,n();break;case xo:(null===(o=t._dd)||void 0===o?void 0:o.discarded)||(r.resourceCount+=1,n())}}));return{stop:()=>{o.unsubscribe()},eventCounts:r}}function sa(t,e,n,r,o){const i=function(t){const e=br({expireDelay:3e5}),n=new Set,r=t.subscribe(10,(()=>{e.reset(),n.forEach((t=>t.stop())),n.clear()}));return{createTrackedAction:function(r){const o=tt(),i=e.add(o,r.relative);let s;const a=ia({lifeCycle:t,isChildEvent:t=>void 0!==t.action&&(Array.isArray(t.action.id)?t.action.id.includes(o):t.action.id===o)});function c(){a.stop(),n.delete(a)}return n.add(a),{id:o,startClocks:r,get duration(){return s},get counts(){return a.eventCounts},stop(t){i.close(t),s=W(r.relative,t),c()},discard(){i.remove(),c()}}},findActionId:function(t){const n=e.findAll(t);return n.length?n:void 0},stop:function(){r.unsubscribe(),n.forEach((t=>t.stop())),n.clear(),e.reset(),e.stop()}}}(t),{unsubscribe:s}=t.subscribe(0,(e=>{t.notify(12,aa(e))}));let a=Q;o.trackUserInteractions&&({stop:a}=na(t,n,r,o,i));const c=function(t,e,n){const r=new Map;return t.subscribe(10,(()=>r.clear())),{addAction:function(t){n({id:tt(),frustrationTypes:[],...t})},startAction:function(t,n={},o=H()){var i;const s=null!==(i=n.actionKey)&&void 0!==i?i:t,a=r.get(s);a&&(a.trackedAction.discard(),r.delete(s));const c=e.createTrackedAction(o);r.set(s,{name:t,type:n.type,context:n.context,trackedAction:c})},stopAction:function(t,e={},o=H()){var i,s;const a=null!==(i=e.actionKey)&&void 0!==i?i:t,c=r.get(a);if(!c)return;c.trackedAction.stop(o.relative);const u=[];c.trackedAction.counts.errorCount>0&&u.push(Lo);const l={id:c.trackedAction.id,name:c.name,type:(null!==(s=e.type)&&void 0!==s?s:c.type)||Po,startClocks:c.trackedAction.startClocks,duration:c.trackedAction.duration,context:Cn(c.context,e.context),counts:c.trackedAction.counts,frustrationTypes:u};n(l),r.delete(a)},stop:function(){r.forEach((t=>t.trackedAction.discard())),r.clear()}}}(t,i,(e=>{t.notify(12,aa(e))})),u={findActionId:i.findActionId};return e.register(0,(({startTime:t,eventType:e})=>{if(e!==ko&&e!==xo&&e!==To)return tr;const n=e===To?K(t,1):t,r=u.findActionId(n);return r?{type:e,action:{id:r}}:tr})),e.register(1,(({startTime:t})=>({action:{id:u.findActionId(t)}}))),{addAction:c.addAction,startAction:c.startAction,stopAction:c.stopAction,actionContexts:u,stop:()=>{s(),a(),c.stop(),i.stop()}}}function aa(t){const e=function(t){return"events"in t}(t),n=Fi(B(t.duration));return{rawRumEvent:{type:So,date:t.startClocks.timeStamp,action:{id:t.id,target:{name:t.name},type:t.type,...void 0!==n&&{loading_time:n},...t.counts&&{error:{count:t.counts.errorCount},long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}},frustration:{type:t.frustrationTypes}},...e?{_dd:{action:{target:t.target,position:t.position,name_source:t.nameSource}}}:{context:t.context}},duration:t.duration,startTime:t.startClocks.relative,domainContext:e?{events:t.events}:{handlingStack:t.handlingStack}}}function ca(e,n,r){const o=new O;return r.subscribe((t=>{0===t.type&&o.notify(t.error)})),function(e){const n=jr([t.error]).subscribe((t=>e.notify(t.error)))}(o),function(t,e){const n=_n(t,[yn,vn]).subscribe((t=>e.notify(t)))}(n,o),o.subscribe((t=>e.notify(14,{error:t}))),function(t){return t.subscribe(14,(({error:e})=>{t.notify(12,function(t){const e={date:t.startClocks.timeStamp,error:{id:tt(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,component_stack:t.componentStack,type:t.type,handling:t.handling,causes:t.causes,source_type:"browser",fingerprint:t.fingerprint,csp:t.csp},type:ko,context:t.context},n={error:t.originalError,handlingStack:t.handlingStack};return{rawRumEvent:e,startTime:t.startClocks.relative,domainContext:n}}(e))})),{addError:({error:e,handlingStack:n,componentStack:r,startClocks:o,context:i})=>{const s=en({originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:"Provided",source:ln,handling:"handled"});s.context=Cn(s.context,i),t.notify(14,{error:s})}}}(e)}const ua=new WeakSet;function la(t){if(!performance||!("getEntriesByName"in performance))return;const e=performance.getEntriesByName(t.url,"resource");if(!e.length||!("toJSON"in e[0]))return;const n=e.filter((t=>!ua.has(t))).filter((t=>wi(t)&&Si(t))).filter((e=>function(t,e,n){const r=1;return t.startTime>=e-r&&da(t)<=K(n,r)}(e,t.startClocks.relative,da({startTime:t.startClocks.relative,duration:t.duration}))));return 1===n.length?(ua.add(n[0]),n[0].toJSON()):void 0}function da(t){return K(t.startTime,t.duration)}function fa(t){const e=function(t){const e=t.querySelector("meta[name=dd-trace-id]"),n=t.querySelector("meta[name=dd-trace-time]");return pa(e&&e.content,n&&n.content)}(t)||function(t){const e=function(t){for(let e=0;e<t.childNodes.length;e+=1){const n=ha(t.childNodes[e]);if(n)return n}if(t.body)for(let e=t.body.childNodes.length-1;e>=0;e-=1){const n=t.body.childNodes[e],r=ha(n);if(r)return r;if(!qi(n))break}}(t);if(!e)return;return pa(nt(e,"trace-id"),nt(e,"trace-time"))}(t);if(e&&!(e.traceTime<=F()-12e4))return e.traceId}function pa(t,e){const n=e&&Number(e);if(t&&n)return{traceId:t,traceTime:n}}function ha(t){if(t&&function(t){return t.nodeType===Node.COMMENT_NODE}(t)){const e=/^\s*DATADOG;(.*?)\s*$/.exec(t.data);if(e)return e[1]}}function ma(){if(ts(Ji.NAVIGATION)){const t=performance.getEntriesByType(Ji.NAVIGATION)[0];if(t)return t}const t=function(){const t={},e=performance.timing;for(const n in e)if(d(e[n])){const r=n,o=e[r];t[r]=0===o?0:Y(o)}return t}(),e={entryType:Ji.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:t.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...e,toJSON:void 0}),...t};return e}function ga(t,e,n=ma){Nr(t,"interactive",(()=>{const t=n(),r=Object.assign(t.toJSON(),{entryType:Ji.RESOURCE,initiatorType:mi,duration:t.responseEnd,traceId:fa(document),toJSON:()=>({...r,toJSON:void 0})});e(r)}))}function va(t,e,n,r=function(){const t=[];function e(e){let r;if(e.didTimeout){const t=performance.now();r=()=>30-(performance.now()-t)}else r=e.timeRemaining.bind(e);for(;r()>0&&t.length;)t.shift()();t.length&&n()}function n(){Br(e,{timeout:1e3})}return{push(e){1===t.push(e)&&n()},stop(){t.length=0}}}(),o=ga){let i;const s=e.trackEarlyRequests;s?i=function(t){const e=new Set,n=t.subscribe(8,(t=>{e.add(t),e.size>1e3&&(ur("Too many requests"),e.delete(e.values().next().value))}));return{getMatchingRequest(t){let n,r=1/0;for(const o of e){const e=t.startTime-o.startClocks.relative;0<=e&&e<r&&o.url===t.name&&(r=Math.abs(e),n=o)}return n&&e.delete(n),n},stop(){n.unsubscribe()}}}(t):t.subscribe(8,(t=>{c((()=>function(t,e,n){const r=la(t);return _a(r,t,n,e)}(t,e,n)))}));const a=Zi(e,{type:Ji.RESOURCE,buffered:!0}).subscribe((t=>{for(const r of t)!s&&_i(r)||c((()=>ya(r,e,n,i)))}));function c(e){r.push((()=>{const n=e();n&&t.notify(12,n)}))}return o(e,(t=>{c((()=>ya(t,e,n,i)))})),{stop:()=>{r.stop(),a.unsubscribe()}}}function ya(t,e,n,r){return _a(t,_i(t)&&r?r.getMatchingRequest(t):void 0,n,e)}function _a(t,e,n,r){if(!t&&!e)return;const o=e?function(t,e){const n=t.traceSampled&&t.traceId&&t.spanId;if(!n)return;return{_dd:{span_id:t.spanId.toString(),trace_id:t.traceId.toString(),rule_psr:e.rulePsr}}}(e,r):function(t,e){const n=t.traceId;if(!n)return;return{_dd:{trace_id:t.traceId,span_id:Oi().toString(),rule_psr:e.rulePsr}}}(t,r);if(!r.trackResources&&!o)return;const i=t?z(t.startTime):e.startClocks,s=t?function(t){const{duration:e,startTime:n,responseEnd:r}=t;return 0===e&&n<r?W(n,r):e}(t):function(t,e,n){return t.wasInPageStateDuringPeriod("frozen",e.relative,n)?void 0:n}(n,i,e.duration),a=e&&function(t,e){const n=zi(t.url,e);if(!n)return;return Ui(t,n)}(e,r),c=Cn({date:i.timeStamp,resource:{id:tt(),duration:B(s),type:e?e.type===bo.XHR?lo:po:vi(t),method:e?e.method:void 0,status_code:e?e.status:(u=t.responseStatus,0===u?void 0:u),url:e?Ii(e.url):t.name,protocol:t&&Ti(t),delivery_type:t&&Ei(t),graphql:a},type:xo,_dd:{discarded:!r.trackResources}},o,t&&function(t){const{renderBlockingStatus:e}=t;return{resource:{render_blocking_status:e,...xi(t),...bi(t)}}}(t));var u;return{startTime:i.relative,duration:s,rawRumEvent:c,domainContext:ba(t,e)}}function ba(t,e){if(e){const n={performanceEntry:t,isAborted:e.isAborted,handlingStack:e.handlingStack};return e.type===bo.XHR?{xhr:e.xhr,...n}:{requestInput:e.input,requestInit:e.init,response:e.response,error:e.error,...n}}return{performanceEntry:t}}function wa(t,e,n=ma){return function(t,e){let n;const{stop:r}=Nr(t,"complete",(()=>{n=C((()=>e()))}));return{stop:()=>{r(),A(n)}}}(t,(()=>{const t=n();(function(t){return t.loadEventEnd<=0})(t)||e(function(t){return{domComplete:t.domComplete,domContentLoaded:t.domContentLoadedEventEnd,domInteractive:t.domInteractive,loadEvent:t.loadEventEnd,firstByte:t.responseStart>=0&&t.responseStart<=j()?t.responseStart:void 0}}(t))}))}function Sa(t,e,n=window){if("hidden"===document.visibilityState)return{timeStamp:0,stop:Q};if(ts(Ji.VISIBILITY_STATE)){const t=performance.getEntriesByType(Ji.VISIBILITY_STATE).filter((t=>"hidden"===t.name)).find((t=>t.startTime>=e.relative));if(t)return{timeStamp:t.startTime,stop:Q}}let r=1/0;const{stop:o}=gn(t,n,["pagehide","visibilitychange"],(t=>{"pagehide"!==t.type&&"hidden"!==document.visibilityState||(r=t.timeStamp,o())}),{capture:!0});return{get timeStamp(){return r},stop:o}}function ka(t,e,n,r){const o={},{stop:i}=wa(t,(t=>{n(t.loadEvent),o.navigationTimings=t,r()})),s=Sa(t,e),{stop:a}=function(t,e,n){return{stop:Zi(t,{type:Ji.PAINT,buffered:!0}).subscribe((t=>{const r=t.find((t=>"first-contentful-paint"===t.name&&t.startTime<e.timeStamp&&t.startTime<6e5));r&&n(r.startTime)})).unsubscribe}}(t,s,(t=>{o.firstContentfulPaint=t,r()})),{stop:c}=function(t,e,n,r){let o=1/0;const{stop:i}=gn(t,n,["pointerdown","keydown"],(t=>{o=t.timeStamp}),{capture:!0,once:!0});let s=0;const a=Zi(t,{type:Ji.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe((n=>{const i=yt(n,(t=>t.entryType===Ji.LARGEST_CONTENTFUL_PAINT&&t.startTime<o&&t.startTime<e.timeStamp&&t.startTime<6e5&&t.size>s));if(i){let e;i.element&&(e=ds(i.element,t.actionNameAttribute)),r({value:i.startTime,targetSelector:e,resourceUrl:(a=i,""===a.url?void 0:a.url)}),s=i.size}var a}));return{stop:()=>{i(),a.unsubscribe()}}}(t,s,window,(t=>{o.largestContentfulPaint=t,r()})),{stop:u}=function(t,e,n){const r=Zi(t,{type:Ji.FIRST_INPUT,buffered:!0}).subscribe((r=>{const o=r.find((t=>t.startTime<e.timeStamp));if(o){const e=W(o.startTime,o.processingStart);let r;o.target&&ji(o.target)&&(r=ds(o.target,t.actionNameAttribute)),n({delay:e>=0?e:0,time:o.startTime,targetSelector:r})}}));return{stop:()=>{r.unsubscribe()}}}(t,s,(t=>{o.firstInput=t,r()}));return{stop:function(){i(),a(),c(),u(),s.stop()},initialViewMetrics:o}}const Ta=(t,e)=>t*e,Ea=t=>Ta(t.previousRect.width,t.previousRect.height)+Ta(t.currentRect.width,t.currentRect.height)-((t,e)=>{const n=Math.max(t.left,e.left),r=Math.max(t.top,e.top),o=Math.min(t.right,e.right),i=Math.min(t.bottom,e.bottom);return n>=o||r>=i?0:Ta(o-n,i-r)})(t.previousRect,t.currentRect);function xa(t,e,n){if(!ts(Ji.LAYOUT_SHIFT)||!("WeakRef"in window))return{stop:Q};let r,o=0;n({value:0});const i=function(){let t,e,n=0,r=0;return{update:o=>{let i;return void 0===t||o.startTime-e>=Ra||o.startTime-t>=Ia?(t=e=o.startTime,r=n=o.value,i=!0):(n+=o.value,e=o.startTime,i=o.value>r,i&&(r=o.value)),{cumulatedValue:n,isMaxValue:i}}}}(),s=Zi(t,{type:Ji.LAYOUT_SHIFT,buffered:!0}).subscribe((s=>{var a;for(const c of s){if(c.hadRecentInput||c.startTime<e)continue;const{cumulatedValue:s,isMaxValue:u}=i.update(c);if(u){const t=Ca(c.sources);r={target:(null==t?void 0:t.node)?new WeakRef(t.node):void 0,time:W(e,c.startTime),previousRect:null==t?void 0:t.previousRect,currentRect:null==t?void 0:t.currentRect,devicePixelRatio:window.devicePixelRatio}}if(s>o){o=s;const e=null===(a=null==r?void 0:r.target)||void 0===a?void 0:a.deref();n({value:l(o,4),targetSelector:e&&ds(e,t.actionNameAttribute),time:null==r?void 0:r.time,previousRect:(null==r?void 0:r.previousRect)?Aa(r.previousRect):void 0,currentRect:(null==r?void 0:r.currentRect)?Aa(r.currentRect):void 0,devicePixelRatio:null==r?void 0:r.devicePixelRatio})}}}));return{stop:()=>{s.unsubscribe()}}}function Ca(t){let e;for(const n of t)if(n.node&&ji(n.node)){const t=Ea(n);(!e||Ea(e)<t)&&(e=n)}return e}function Aa({x:t,y:e,width:n,height:r}){return{x:t,y:e,width:n,height:r}}const Ia=5e3,Ra=D;let Na,Oa=0,Ma=1/0,Pa=0;const Da=()=>Na?Oa:window.performance.interactionCount||0;function La(t,e,n){if(!(ts(Ji.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint:()=>{},setViewEnd:Q,stop:Q};const{getViewInteractionCount:r,stopViewInteractionCount:o}=function(t){"interactionCount"in performance||Na||(Na=new window.PerformanceObserver(k((t=>{t.getEntries().forEach((t=>{const e=t;e.interactionId&&(Ma=Math.min(Ma,e.interactionId),Pa=Math.max(Pa,e.interactionId),Oa=(Pa-Ma)/7+1)}))}))),Na.observe({type:"event",buffered:!0,durationThreshold:0}));const e=t===Ro?0:Da();let n={stopped:!1};function r(){return Da()-e}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}(n);let i=1/0;const s=function(t){const e=[];function n(){e.sort(((t,e)=>e.duration-t.duration)).splice(10)}return{process(t){const r=e.findIndex((e=>t.interactionId===e.interactionId)),o=e[e.length-1];-1!==r?t.duration>e[r].duration&&(e[r]=t,n()):(e.length<10||t.duration>o.duration)&&(e.push(t),n())},estimateP98Interaction(){const n=Math.min(e.length-1,Math.floor(t()/50));return e[n]}}}(r);let a,c,u=-1;function l(n){for(const t of n)t.interactionId&&t.startTime>=e&&t.startTime<=i&&s.process(t);const r=s.estimateP98Interaction();r&&r.duration!==u&&(u=r.duration,c=W(e,r.startTime),a=function(t){const e=ta.get(t);return ta.delete(t),e}(r.startTime),!a&&r.target&&ji(r.target)&&(a=ds(r.target,t.actionNameAttribute)))}const d=Zi(t,{type:Ji.FIRST_INPUT,buffered:!0}).subscribe(l),f=Zi(t,{type:Ji.EVENT,durationThreshold:40,buffered:!0}).subscribe(l);return{getInteractionToNextPaint:()=>u>=0?{value:Math.min(u,6e4),targetSelector:a,time:c}:r()?{value:0}:void 0,setViewEnd:t=>{i=t,o()},stop:()=>{f.unsubscribe(),d.unsubscribe()}}}function Ua(){let t;const e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function za(){let t;const e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}let $a;function Va(t){return $a||($a=function(t){return new O((e=>{const{throttled:n}=Z((()=>{e.notify(Ba())}),200);return mn(t,window,"resize",n,{capture:!0,passive:!0}).stop}))}(t)),$a}function Ba(){const 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)}}function Fa(t,e,n,r=function(t,e=1e3){return new O((n=>{function r(){n.notify(function(){const t=za(),{height:e}=Ba(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(e+t);return{scrollHeight:n,scrollDepth:r,scrollTop:t}}())}if(window.ResizeObserver){const n=Z(r,e,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,i=new ResizeObserver(k(n.throttled));o&&i.observe(o);const s=mn(t,window,"scroll",n.throttled,{passive:!0});return()=>{n.cancel(),i.disconnect(),s.stop()}}}))}(t)){let o=0,i=0,s=0;const a=r.subscribe((({scrollDepth:t,scrollTop:r,scrollHeight:a})=>{let c=!1;if(t>o&&(o=t,c=!0),a>i){i=a;const t=j();s=W(e.relative,t),c=!0}c&&n({maxDepth:Math.min(o,i),maxDepthScrollTop:r,maxScrollHeight:i,maxScrollHeightTime:s})}));return{stop:()=>a.unsubscribe()}}function qa(t,e,n,r,o,i,s){const a={},{stop:c,setLoadEvent:u}=function(t,e,n,r,o,i,s){let a=o===Ro,c=!0;const u=[],l=Sa(r,i);function d(){if(!c&&!a&&u.length>0){const t=Math.max(...u);t<l.timeStamp-i.relative&&s(t)}}const{stop:f}=rs(t,e,n,r,(t=>{c&&(c=!1,t.hadActivity&&u.push(W(i.timeStamp,t.end)),d())}));return{stop:()=>{f(),l.stop()},setLoadEvent:t=>{a&&(a=!1,u.push(t),d())}}}(t,e,n,r,i,s,(t=>{a.loadingTime=t,o()})),{stop:l}=Fa(r,s,(t=>{a.scroll=t})),{stop:d}=xa(r,s.relative,(t=>{a.cumulativeLayoutShift=t,o()})),{stop:f,getInteractionToNextPaint:p,setViewEnd:h}=La(r,s.relative,i);return{stop:()=>{c(),d(),l()},stopINPTracking:f,setLoadEvent:u,setViewEnd:h,getCommonViewMetrics:()=>(a.interactionToNextPaint=p(),a)}}function ja(t,e,n){var r,o;r=t.relative,o=t=>{e.firstContentfulPaint=t,e.largestContentfulPaint={value:t},n()},requestAnimationFrame((()=>{requestAnimationFrame((()=>{o(W(r,j()))}))}))}const Ha=3e5,Ga=3e5;function Wa(t,e,n,r,i,s,a,c){const u=new Set;let l,d,p=h(Ro,G(),c);function h(s,a,c){const l=function(t,e,n,r,i,s,a=H(),c){const u=tt(),l=new O,d={};let p,h=0;const m=f(i),g=Wr();let v=!0,y=null==c?void 0:c.name;const _=(null==c?void 0:c.service)||r.service,b=(null==c?void 0:c.version)||r.version,w=null==c?void 0:c.context;w&&g.setContext(w);const S={id:u,name:y,startClocks:a,service:_,version:b,context:w};t.notify(1,S),t.notify(2,S);const{throttled:k,cancel:T}=Z(j,3e3,{leading:!1}),{setLoadEvent:E,setViewEnd:x,stop:A,stopINPTracking:N,getCommonViewMetrics:M}=qa(t,e,n,r,F,s,a),{stop:P,initialViewMetrics:D}=s===Ro?ka(r,a,E,F):{stop:Q,initialViewMetrics:{}};s===Oo&&ja(a,D,F);const{stop:L,eventCounts:z}=function(t,e,n){const{stop:r,eventCounts:o}=ia({lifeCycle:t,isChildEvent:t=>t.view.id===e,onChange:n});return{stop:r,eventCounts:o}}(t,u,F),$=I(j,Ha),V=t.subscribe(11,(t=>{t.reason===Gn.UNLOADING&&j()}));function B(){t.notify(3,{id:u,name:y,context:g.getContext(),startClocks:a,sessionIsActive:v})}function F(){B(),k()}function j(){T(),B(),h+=1;const e=void 0===p?q():p.timeStamp;t.notify(4,{customTimings:d,documentVersion:h,id:u,name:y,service:_,version:b,context:g.getContext(),loadingType:s,location:m,startClocks:a,commonViewMetrics:M(),initialViewMetrics:D,duration:W(a.timeStamp,e),isActive:void 0===p,sessionIsActive:v,eventCounts:z})}return j(),g.changeObservable.subscribe(F),{get name(){return y},service:_,version:b,contextManager:g,stopObservable:l,end(e={}){var n,r;p||(p=null!==(n=e.endClocks)&&void 0!==n?n:H(),v=null===(r=e.sessionIsActive)||void 0===r||r,t.notify(5,{endClocks:p}),t.notify(6,{endClocks:p}),R($),x(p.relative),A(),V.unsubscribe(),j(),C((()=>{this.stop()}),Ga))},stop(){P(),L(),N(),l.notify()},addTiming(t,e){if(p)return;const n=function(t){return t<U}(e)?e:W(a.timeStamp,e);d[function(t){const e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");e!==t&&o.warn(`Invalid timing name: ${t}, sanitized to: ${e}`);return e}(t)]=n,F()},setViewName(t){y=t,j()}}}(e,n,r,i,t,s,a,c);return u.add(l),l.stopObservable.subscribe((()=>{u.delete(l)})),l}return e.subscribe(10,(()=>{p=h(No,void 0,{name:p.name,service:p.service,version:p.version,context:p.contextManager.getContext()})})),e.subscribe(9,(()=>{p.end({sessionIsActive:!1})})),a&&(d=function(t){return t.subscribe((({oldLocation:t,newLocation:e})=>{var n,r;r=e,((n=t).pathname!==r.pathname||!function(t){const e=t.substring(1);return""!==e&&!!document.getElementById(e)}(r.hash)&&Ka(r.hash)!==Ka(n.hash))&&(p.end(),p=h(No))}))}(s),i.trackBfcacheViews&&(l=function(t,e){const{stop:n}=mn(t,window,"pageshow",(t=>{t.persisted&&e(t)}),{capture:!0});return n}(i,(t=>{p.end();const e=z(t.timeStamp);p=h(Oo,e,void 0)})))),{addTiming:(t,e=q())=>{p.addTiming(t,e)},startView:(t,e)=>{p.end({endClocks:e}),p=h(No,e,t)},setViewContext:t=>{p.contextManager.setContext(t)},setViewContextProperty:(t,e)=>{p.contextManager.setContextProperty(t,e)},setViewName:t=>{p.setViewName(t)},getViewContext:()=>p.contextManager.getContext(),stop:()=>{d&&d.unsubscribe(),l&&l(),p.end(),u.forEach((t=>t.stop()))}}}function Ka(t){const e=t.indexOf("?");return e<0?t:t.slice(0,e)}function Ya(t,e,n,r,o,i,s,a,c,u){return t.subscribe(4,(e=>t.notify(12,function(t,e,n){var r,o,i,s,a,c,u,l,d,f,p,g,v,y,_,b,w,S;const k=n.getReplayStats(t.id),T=null===(o=null===(r=t.commonViewMetrics)||void 0===r?void 0:r.cumulativeLayoutShift)||void 0===o?void 0:o.devicePixelRatio,E={_dd:{document_version:t.documentVersion,replay_stats:k,cls:T?{device_pixel_ratio:T}:void 0,configuration:{start_session_replay_recording_manually:e.startSessionReplayRecordingManually}},date:t.startClocks.timeStamp,type:Eo,view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:null===(i=t.commonViewMetrics.cumulativeLayoutShift)||void 0===i?void 0:i.value,cumulative_layout_shift_time:B(null===(s=t.commonViewMetrics.cumulativeLayoutShift)||void 0===s?void 0:s.time),cumulative_layout_shift_target_selector:null===(a=t.commonViewMetrics.cumulativeLayoutShift)||void 0===a?void 0:a.targetSelector,first_byte:B(null===(c=t.initialViewMetrics.navigationTimings)||void 0===c?void 0:c.firstByte),dom_complete:B(null===(u=t.initialViewMetrics.navigationTimings)||void 0===u?void 0:u.domComplete),dom_content_loaded:B(null===(l=t.initialViewMetrics.navigationTimings)||void 0===l?void 0:l.domContentLoaded),dom_interactive:B(null===(d=t.initialViewMetrics.navigationTimings)||void 0===d?void 0:d.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:B(t.initialViewMetrics.firstContentfulPaint),first_input_delay:B(null===(f=t.initialViewMetrics.firstInput)||void 0===f?void 0:f.delay),first_input_time:B(null===(p=t.initialViewMetrics.firstInput)||void 0===p?void 0:p.time),first_input_target_selector:null===(g=t.initialViewMetrics.firstInput)||void 0===g?void 0:g.targetSelector,interaction_to_next_paint:B(null===(v=t.commonViewMetrics.interactionToNextPaint)||void 0===v?void 0:v.value),interaction_to_next_paint_time:B(null===(y=t.commonViewMetrics.interactionToNextPaint)||void 0===y?void 0:y.time),interaction_to_next_paint_target_selector:null===(_=t.commonViewMetrics.interactionToNextPaint)||void 0===_?void 0:_.targetSelector,is_active:t.isActive,name:t.name,largest_contentful_paint:B(null===(b=t.initialViewMetrics.largestContentfulPaint)||void 0===b?void 0:b.value),largest_contentful_paint_target_selector:null===(w=t.initialViewMetrics.largestContentfulPaint)||void 0===w?void 0:w.targetSelector,load_event:B(null===(S=t.initialViewMetrics.navigationTimings)||void 0===S?void 0:S.loadEvent),loading_time:Fi(B(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},performance:Xa(t.commonViewMetrics,t.initialViewMetrics),resource:{count:t.eventCounts.resourceCount},time_spent:B(t.duration)},display:t.commonViewMetrics.scroll?{scroll:{max_depth:t.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:t.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:t.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:B(t.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:e.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:wo()}};h(t.customTimings)||(E.view.custom_timings=m(t.customTimings,B));return{rawRumEvent:E,startTime:t.startClocks.relative,duration:t.duration,domainContext:{location:t.location}}}(e,n,a)))),e.register(0,(({startTime:t,eventType:e})=>{const n=c.findView(t);return n?{type:e,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:Qn})),e.register(1,(({startTime:t})=>{var e;return{view:{id:null===(e=c.findView(t))||void 0===e?void 0:e.id}}})),Wa(r,t,o,i,n,s,!n.trackViewsManually,u)}function Xa({cumulativeLayoutShift:t,interactionToNextPaint:e},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:o}){return{cls:t&&{score:t.value,timestamp:B(t.time),target_selector:t.targetSelector,previous_rect:t.previousRect,current_rect:t.currentRect},fcp:n&&{timestamp:B(n)},fid:r&&{duration:B(r.delay),timestamp:B(r.time),target_selector:r.targetSelector},inp:e&&{duration:B(e.value),timestamp:B(e.time),target_selector:e.targetSelector},lcp:o&&{timestamp:B(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl}}}function Ja(t,e,n){const r=Cr(t,"rum",(e=>function(t,e){if(n=e,"0"===n||"1"===n||"2"===n)return e;var n;if(!u(t.sessionSampleRate))return"0";if(!u(t.sessionReplaySampleRate))return"2";return"1"}(t,e)),n);return r.expireObservable.subscribe((()=>{e.notify(9)})),r.renewObservable.subscribe((()=>{e.notify(10)})),r.sessionStateUpdateObservable.subscribe((({previousState:t,newState:e})=>{if(!t.forcedReplay&&e.forcedReplay){const t=r.findSession();t&&(t.isReplayForced=!0)}})),{findTrackedSession:t=>{const e=r.findSession(t);if(e&&"0"!==e.trackingType)return{id:e.id,sessionReplay:"1"===e.trackingType?1:e.isReplayForced?2:0,anonymousId:e.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:"1"})}}const Za=wt;function Qa(t,e){let n=f(e);return new O((r=>{const{stop:o}=function(t,e){const{stop:n}=Fe(tc("pushState"),"pushState",(({onPostCall:t})=>{t(e)})),{stop:r}=Fe(tc("replaceState"),"replaceState",(({onPostCall:t})=>{t(e)})),{stop:o}=mn(t,window,"popstate",e);return{stop:()=>{n(),r(),o()}}}(t,s),{stop:i}=function(t,e){return mn(t,window,"hashchange",e)}(t,s);function s(){if(n.href===e.href)return;const t=f(e);r.notify({newLocation:t,oldLocation:n}),n=t}return()=>{o(),i()}}))}function tc(t){return Object.prototype.hasOwnProperty.call(history,t)?history:History.prototype}const ec=wt;let nc,rc;function oc(){0!==nc.batchCount&&(dr("Customer data measures",nc),sc())}function ic(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function sc(){nc={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0}}}const ac=wt;function cc(t,e,n=500){const r=br({expireDelay:ac,maxEntries:4e3});let o;if(ts(Ji.VISIBILITY_STATE)){performance.getEntriesByType(Ji.VISIBILITY_STATE).forEach((t=>{s("hidden"===t.name?"hidden":"active",t.startTime)}))}s(lc(),j());const{stop:i}=gn(e,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],(t=>{s(function(t){if("freeze"===t.type)return"frozen";if("pagehide"===t.type)return t.persisted?"frozen":"terminated";return lc()}(t),t.timeStamp)}),{capture:!0});function s(t,e=j()){t!==o&&(o=t,r.closeActive(e),r.add({state:o,startTime:e},e))}function a(t,e,n){return r.findAll(e,n).some((e=>e.state===t))}return t.register(0,(({startTime:t,duration:e=0,eventType:o})=>{if(o===Eo){return{type:o,_dd:{page_states:uc(r.findAll(t,e),t,n)}}}return o===So||o===ko?{type:o,view:{in_foreground:a("active",t,0)}}:tr})),{wasInPageStateDuringPeriod:a,addPageState:s,stop:()=>{i(),r.stop()}}}function uc(t,e,n){if(0!==t.length)return t.slice(-n).reverse().map((({state:t,startTime:n})=>({state:t,start:B(W(e,n))})))}function lc(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}function dc(t,e){const n=window.cookieStore?function(t){return(e,n)=>mn(t,window.cookieStore,"change",(t=>{const r=t.changed.find((t=>t.name===e))||t.deleted.find((t=>t.name===e));r&&n(r.value)})).stop}(t):pc;return new O((t=>n(e,(e=>t.notify(e)))))}const fc=D;function pc(t,e){const n=nt(document.cookie,t),r=I((()=>{const r=nt(document.cookie,t);r!==n&&e(r)}),fc);return()=>{R(r)}}const hc="datadog-ci-visibility-test-execution-id";const mc=wt;function gc(t,e,n){const r={date:e.timeStamp,type:To,_dd:{discarded:!1}};return t.entryType===Ji.LONG_TASK?{...r,long_task:{id:n,entry_type:Ao,duration:B(t.duration)}}:{...r,long_task:{id:n,entry_type:Io,duration:B(t.duration),blocking_duration:B(t.blockingDuration),first_ui_event_timestamp:B(t.firstUIEventTimestamp),render_start:B(t.renderStart),style_and_layout_start:B(t.styleAndLayoutStart),start_time:B(t.startTime),scripts:t.scripts.map((t=>({duration:B(t.duration),pause_duration:B(t.pauseDuration),forced_style_and_layout_duration:B(t.forcedStyleAndLayoutDuration),start_time:B(t.startTime),execution_start:B(t.executionStart),source_url:t.sourceURL,source_function_name:t.sourceFunctionName,source_char_position:t.sourceCharPosition,invoker:t.invoker,invoker_type:t.invokerType,window_attribution:t.windowAttribution})))}}}function vc(t,e,n){const r=xn(t),o=n(r);return bt(e).forEach((([e,n])=>yc(t,r,e.split(/\.|(?=\[\])/),n))),o}function yc(t,e,n,r){const[o,...i]=n;if("[]"!==o){if(_c(t)&&_c(e))return i.length>0?yc(t[o],e[o],i,r):void function(t,e,n,r){const o=te(n);o===r?t[e]=Ye(n):"object"!==r||"undefined"!==o&&"null"!==o||(t[e]={})}(t,o,e[o],r)}else Array.isArray(t)&&Array.isArray(e)&&t.forEach(((t,n)=>yc(t,e[n],i,r)))}function _c(t){return"object"===te(t)}const bc={"view.name":"string","view.url":"string","view.referrer":"string"},wc={context:"object"},Sc={service:"string",version:"string"};let kc;function Tc(t,e,n,r,i){kc={[Eo]:{"view.performance.lcp.resource_url":"string",...wc,...bc,...Sc},[ko]:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...wc,...bc,...Sc},[xo]:{"resource.url":"string","resource.graphql.variables":"string",...wc,...bc,...Sc},[So]:{"action.target.name":"string",...wc,...bc,...Sc},[To]:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...wc,...bc,...Sc},[Co]:{...wc,...bc,...Sc}};const s={[ko]:Rr(ko,r,i),[So]:Rr(So,r,i),[Co]:Rr(Co,r,i)};e.subscribe(12,(({startTime:r,duration:i,rawRumEvent:a,domainContext:c})=>{const u=n.triggerHook(0,{eventType:a.type,rawRumEvent:a,domainContext:c,startTime:r,duration:i});if(u===Qn)return;const l=Cn(u,a,{ddtags:Sn(t).join(",")});(function(t,e,n,r){var i;if(e){const r=vc(t,kc[t.type],(t=>e(t,n)));if(!1===r&&t.type!==Eo)return!1;!1===r&&o.warn("Can't dismiss view events using beforeSend!")}const s=null===(i=r[t.type])||void 0===i?void 0:i.isLimitReached();return!s})(l,t.beforeSend,c,s)&&(h(l.context)&&delete l.context,e.notify(13,l))}))}const Ec=function(){const t={};return{register:(e,n)=>(t[e]||(t[e]=[]),t[e].push(n),{unregister:()=>{t[e]=t[e].filter((t=>t!==n))}}),triggerHook(e,n){const r=t[e]||[],o=[];for(const t of r){const e=t(n);if(e===Qn)return Qn;e!==tr&&o.push(e)}return Cn(...o)}}},xc=[So,ko,To,xo,Co];function Cc(t){if(!Se(_e.SOURCE_CODE_CONTEXT))return;const e=window,n=new Map;function r(){e.DD_SOURCE_CODE_CONTEXT&&(bt(e.DD_SOURCE_CODE_CONTEXT).forEach((([t,e])=>{const r=Ee({stack:t}).stack[0];r.url?n.has(r.url)||n.set(r.url,e):lr("Source code context: missing frame url",{stack:t})})),e.DD_SOURCE_CODE_CONTEXT={})}r(),t.register(0,(({domainContext:t,rawRumEvent:e})=>{r();const o=function(t,e){var n,r;if("long_task"===e.type&&"long-animation-frame"===e.long_task.entry_type)return null===(n=e.long_task.scripts[0])||void 0===n?void 0:n.source_url;let o;"handlingStack"in t&&(o=t.handlingStack);"error"===e.type&&e.error.stack&&(o=e.error.stack);const i=Ee({stack:o});return null===(r=i.stack[0])||void 0===r?void 0:r.url}(t,e);if(o){const t=n.get(o);if(t)return{type:e.type,service:t.service,version:t.version}}return tr}))}function Ac(t,{session:e,viewContext:n,errorType:r}){const o=e?e.id:"no-session-id",i=[];void 0!==r&&i.push(`error-type=${r}`),n&&(i.push(`seed=${n.id}`),i.push(`from=${n.startClocks.timeStamp}`));const s=function(t){const e=t.site,n=t.subdomain||function(t){switch(t.site){case ce:case ue:return"app";case ae:return"dd";default:return}}(t);return`https://${n?`${n}.`:""}${e}`}(t);return`${s}${`/rum/replay/sessions/${o}`}?${i.join("&")}`}function Ic(t,e){return new Promise((n=>{t.write(e),t.finish((t=>{n(t)}))}))}let Rc;function Nc(t){let e;return Rc||(Rc=new Map),Rc.has(t)?e=Rc.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},Rc.set(t,e),Rc.size>1e3&&function(){if(!Rc)return;const t=Rc.keys().next().value;t&&Rc.delete(t)}()),e}function Oc(t,e,n){let r,o=0,i=[],s=!0,a=0;const c=[],{stop:u}=mn(t,e,"message",(({data:t})=>{if("wrote"!==t.type||t.streamId!==n)return;const e=c[0];e&&(e.id===t.id?(c.shift(),o+=t.additionalBytesCount,i.push(t.result),r=t.trailer,e.writeCallback?e.writeCallback(t.result.byteLength):e.finishCallback&&e.finishCallback()):e.id<t.id&&u())}));function l(){const t=0===i.length?new Uint8Array(0):Ge(i.concat(r)),e={rawBytesCount:o,output:t,outputBytesCount:t.byteLength,encoding:"deflate"};return o=0,i=[],e}function d(){s||(e.postMessage({action:"reset",streamId:n}),s=!0)}return{isAsync:!0,get isEmpty(){return s},write(t,r){e.postMessage({action:"write",id:a,data:t,streamId:n}),c.push({id:a,writeCallback:r,data:t}),s=!1,a+=1},finish(t){d(),c.length?(c.forEach((t=>{delete t.writeCallback})),c[c.length-1].finishCallback=()=>t(l())):t(l())},finishSync(){d();const t=c.map((t=>t.data)).join("");return c.length=0,{...l(),pendingData:t}},estimateEncodedBytesCount:t=>t.length/8,stop(){u()}}}function Mc({configuredUrl:t,error:e,source:n,scriptType:r}){if(o.error(`${n} failed to start: an error occurred while initializing the ${r}:`,e),e instanceof Event||e instanceof Error&&((s=e.message).includes("Content Security Policy")||s.includes("requires 'TrustedScriptURL'"))){let e;e=t?`Please make sure the ${r} URL ${t} is correct and CSP is correctly configured.`:"Please make sure CSP is correctly configured.",o.error(`${e} See documentation at ${i}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else"worker"===r&&lr(e);var s}function Pc(t){return new Worker(t.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=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]),n=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]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(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 g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,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},S=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}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={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"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>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&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>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))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&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<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(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<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(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-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(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=W(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=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(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_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(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=W(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&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(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=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(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 st=[new it(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(at(t),0===t.lookahead&&0===e)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,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){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=8,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),V(this.dyn_ltree),V(this.dyn_dtree),V(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),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(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}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[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),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(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)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(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=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(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=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(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=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)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+H;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]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(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)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=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},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};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 ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(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,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(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=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.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?4:0,"[object ArrayBuffer]"===ct.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),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;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},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.26.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|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,2),{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){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let Dc={status:0};function Lc(t,e,n,r=Pc){switch(0===Dc.status&&function(t,e,n=Pc){try{const r=n(t),{stop:i}=mn(t,r,"error",(n=>{zc(t,e,n)})),{stop:s}=mn(t,r,"message",(({data:n})=>{var r;"errored"===n.type?zc(t,e,n.error,n.streamId):"initialized"===n.type&&(r=n.version,1===Dc.status&&(Dc={status:3,worker:Dc.worker,stop:Dc.stop,version:r}))}));r.postMessage({action:"init"}),C((()=>function(t){1===Dc.status&&(o.error(`${t} failed to start: a timeout occurred while initializing the Worker`),Dc.initializationFailureCallbacks.forEach((t=>t())),Dc={status:2})}(e)),3e4);Dc={status:1,worker:r,stop:()=>{i(),s()},initializationFailureCallbacks:[]}}catch(n){zc(t,e,n)}}(t,e,r),Dc.status){case 1:return Dc.initializationFailureCallbacks.push(n),Dc.worker;case 3:return Dc.worker}}function Uc(){return Dc.status}function zc(t,e,n,r){1===Dc.status||0===Dc.status?(Mc({configuredUrl:t.workerUrl,error:n,source:e,scriptType:"worker"}),1===Dc.status&&Dc.initializationFailureCallbacks.forEach((t=>t())),Dc={status:2}):lr(n,{worker_version:3===Dc.status&&Dc.version,stream_id:r})}function $c(){return"function"==typeof Array.from&&"function"==typeof CSSSupportsRule&&"function"==typeof URL.createObjectURL&&"forEach"in NodeList.prototype}function Vc(t,e,n,r){const o=e.findTrackedSession(),i=function(t,e){if(!$c())return"browser-not-supported";if(!t)return"rum-not-tracked";if(0===t.sessionReplay)return"incorrect-session-plan";if(!e)return"replay-not-started"}(o,r);return Ac(t,{viewContext:n.findView(),errorType:i,session:o})}function Bc(t,e,n,r,o,i,s){let a,c=0;e.subscribe(9,(()=>{2!==c&&3!==c||(f(),c=1)})),e.subscribe(10,(()=>{1===c&&d()}));const u=new O;!function(t,e){if(!t.metricsEnabled)return{stop:Q};let n,r,o;const{unsubscribe:i}=e.subscribe((t=>{switch(t.type){case"start":n={forced:t.forced,timestamp:q()},r=void 0,o=void 0;break;case"document-ready":n&&(r=W(n.timestamp,q()));break;case"recorder-settled":n&&(o=W(n.timestamp,q()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":i(),n&&dr("Recorder init metrics",{metrics:(e=n.forced,s=o,a=W(n.timestamp,q()),c=t.type,u=r,{forced:e,loadRecorderModuleDuration:s,recorderInitDuration:a,result:c,waitForDocReadyDuration:u})})}var e,s,a,c,u}))}(s,u);const l=async l=>{u.notify({type:"start",forced:l});const[d]=await Promise.all([Fc(u,{type:"recorder-settled"},o()),Fc(u,{type:"document-ready"},Or(t,"interactive"))]);if(2!==c)return void u.notify({type:"aborted"});if(!d)return c=0,void u.notify({type:"recorder-load-failed"});const f=i();if(!f)return c=0,void u.notify({type:"deflate-encoder-load-failed"});({stop:a}=d(e,t,n,r,f,s)),c=3,u.notify({type:"succeeded"})};function d(t){const e=n.findTrackedSession();if(function(t,e){return!t||0===t.sessionReplay&&(!e||!e.force)}(e,t))return void(c=1);if(function(t){return 2===t||3===t}(c))return;c=2;const r=function(t,e){return e&&e.force&&0===t.sessionReplay}(e,t)||!1;l(r).catch(E),r&&n.setForcedReplay()}function f(){3===c&&(null==a||a()),c=0}return{start:d,stop:f,getSessionReplayLink:()=>Vc(t,n,r,0!==c),isRecording:()=>3===c}}async function Fc(t,e,n){try{return await n}finally{t.notify(e)}}async function qc(){return(await Promise.resolve().then((function(){return El}))).startRecording}async function jc(t=Hc){try{return await t()}catch(t){Mc({error:t,source:"Profiler",scriptType:"module"})}}async function Hc(){return(await Promise.resolve().then((function(){return Nl}))).createRumProfiler}const Gc=function(t,e){if(Hn()&&!jn("records")||!$c())return{start:Q,stop:Q,getReplayStats:()=>{},onRumStart:Q,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=function(){let t=0;return{strategy:{start(){t=1},stop(){t=2},isRecording:()=>!1,getSessionReplayLink:Q},shouldStartImmediately:e=>1===t||0===t&&!e.startSessionReplayRecordingManually}}();return{start:t=>n.start(t),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:function(o,i,s,a,c,u){let l;n=Bc(i,o,s,a,t,(function(){l||(null!=c||(c=Lc(i,"Datadog Session Replay",(()=>{n.stop()}),e)),c&&(l=Oc(i,c,1)));return l}),u),r(i)&&n.start()},isRecording:()=>3===Uc()&&n.isRecording(),getReplayStats:t=>3===Uc()?function(t){return null==Rc?void 0:Rc.get(t)}(t):void 0}}((async function(t=qc){try{return await t()}catch(t){Mc({error:t,source:"Recorder",scriptType:"module"})}})),Wc=function(){let t;return{onRumStart:function(e,n,r,o,i,s,a){const c=o.findTrackedSession();if(!c)return;if(!Ni(c.id,r.profilingSampleRate))return;const u=function(t){let e={status:"starting"};return t.register(0,(({eventType:t})=>t!==Eo&&t!==To?tr:{type:t,_dd:{profiling:e}})),{get:()=>e,set:t=>{e=t}}}(n);void 0!==g().Profiler?jc().then((n=>{n?(t=n(r,e,o,u,s,a,i,void 0),t.start()):u.set({status:"error",error_reason:"failed-to-lazy-load"})})).catch(E):u.set({status:"error",error_reason:"not-supported-by-browser"})},stop:()=>{null==t||t.stop().catch(E)}}}(),Kc=function(t,e,n,r={}){const o=function(t){const e=new O;return{tryToInit(e){t||(t=e)},update(n){t=n,e.notify()},isGranted:()=>t===Qt.GRANTED,observable:e}}(),i={vitalsByName:new Map,vitalsByReference:new WeakMap},s=function(t=pn){const e=new P(500),n=t().subscribe((t=>{e.notify({type:0,error:t})}));return{observable:e,stop:()=>{n.unsubscribe()}}}().observable;let a=li(r,o,i,((c,u,l)=>{const d=u&&r.createDeflateEncoder?t=>r.createDeflateEncoder(c,u,t):Ir,f=t(c,e,n,l,d,o,i,s,r.sdkName);return e.onRumStart(f.lifeCycle,c,f.session,f.viewHistory,u,f.telemetry),n.onRumStart(f.lifeCycle,f.hooks,c,f.session,f.viewHistory,f.longTaskContexts,d),a=function(t,e){return{init:t=>{hn("DD_RUM",t)},initConfiguration:t.initConfiguration,...e}}(a,f),jo(c.plugins,"onRumStart",{strategy:a,addEvent:f.addEvent}),f}));const c=()=>a,u=k((t=>{const e="object"==typeof t?t:{name:t};a.startView(e),fr({feature:"start-view"})})),l=function(t){const e={version:"6.26.0",onReady(t){t()},...t};return Object.defineProperty(e,"_setDebug",{get:()=>S,enumerable:!1}),e}({init:t=>{const e=(new Error).stack;T((()=>a.init(t,l,e)))},setTrackingConsent:k((t=>{o.update(t),fr({feature:"set-tracking-consent",tracking_consent:t})})),setViewName:k((t=>{a.setViewName(t),fr({feature:"set-view-name"})})),setViewContext:k((t=>{a.setViewContext(t),fr({feature:"set-view-context"})})),setViewContextProperty:k(((t,e)=>{a.setViewContextProperty(t,e),fr({feature:"set-view-context-property"})})),getViewContext:k((()=>(fr({feature:"set-view-context-property"}),a.getViewContext()))),getInternalContext:k((t=>a.getInternalContext(t))),getInitConfiguration:k((()=>xn(a.initConfiguration))),addAction:(t,e)=>{const n=$e("action");T((()=>{a.addAction({name:Ye(t),context:Ye(e),startClocks:H(),type:Po,handlingStack:n}),fr({feature:"add-action"})}))},startAction:k(((t,e)=>{a.initConfiguration&&!Se(_e.START_STOP_ACTION)||a.startAction(Ye(t),{type:Ye(e&&e.type),context:Ye(e&&e.context),actionKey:e&&e.actionKey})})),stopAction:k(((t,e)=>{a.initConfiguration&&!Se(_e.START_STOP_ACTION)||a.stopAction(Ye(t),{type:Ye(e&&e.type),context:Ye(e&&e.context),actionKey:e&&e.actionKey})})),addError:(t,e)=>{const n=$e("error");T((()=>{a.addError({error:t,handlingStack:n,context:Ye(e),startClocks:H()}),fr({feature:"add-error"})}))},addTiming:k(((t,e)=>{a.addTiming(Ye(t),e)})),setGlobalContext:Kr(c,no,io,"set-global-context"),getGlobalContext:Kr(c,no,oo,"get-global-context"),setGlobalContextProperty:Kr(c,no,so,"set-global-context-property"),removeGlobalContextProperty:Kr(c,no,ao,"remove-global-context-property"),clearGlobalContext:Kr(c,no,co,"clear-global-context"),setUser:Kr(c,eo,io,"set-user"),getUser:Kr(c,eo,oo,"get-user"),setUserProperty:Kr(c,eo,so,"set-user-property"),removeUserProperty:Kr(c,eo,ao,"remove-user-property"),clearUser:Kr(c,eo,co,"clear-user"),setAccount:Kr(c,ro,io,"set-account"),getAccount:Kr(c,ro,oo,"get-account"),setAccountProperty:Kr(c,ro,so,"set-account-property"),removeAccountProperty:Kr(c,ro,ao,"remove-account-property"),clearAccount:Kr(c,ro,co,"clear-account"),startView:u,stopSession:k((()=>{a.stopSession(),fr({feature:"stop-session"})})),addFeatureFlagEvaluation:k(((t,e)=>{a.addFeatureFlagEvaluation(Ye(t),Ye(e)),fr({feature:"add-feature-flag-evaluation"})})),getSessionReplayLink:k((()=>e.getSessionReplayLink())),startSessionReplayRecording:k((t=>{e.start(t),fr({feature:"start-session-replay-recording",force:t&&t.force})})),stopSessionReplayRecording:k((()=>e.stop())),addDurationVital:k(((t,e)=>{var n;fr({feature:"add-duration-vital"}),a.addDurationVital({name:Ye(t),type:zo,startClocks:(n=e.startTime,{relative:Y(n),timeStamp:n}),duration:e.duration,context:Ye(e&&e.context),description:Ye(e&&e.description)})})),startDurationVital:k(((t,e)=>(fr({feature:"start-duration-vital"}),a.startDurationVital(Ye(t),{context:Ye(e&&e.context),description:Ye(e&&e.description)})))),stopDurationVital:k(((t,e)=>{fr({feature:"stop-duration-vital"}),a.stopDurationVital("string"==typeof t?Ye(t):t,{context:Ye(e&&e.context),description:Ye(e&&e.description)})})),startFeatureOperation:k(((t,e)=>{fr({feature:"add-operation-step-vital",action_type:"start"}),a.addOperationStepVital(t,"start",e)})),succeedFeatureOperation:k(((t,e)=>{fr({feature:"add-operation-step-vital",action_type:"succeed"}),a.addOperationStepVital(t,"end",e)})),failFeatureOperation:k(((t,e,n)=>{fr({feature:"add-operation-step-vital",action_type:"fail"}),a.addOperationStepVital(t,"end",n,e)}))});return l}((function(t,e,n,r,o,i,s,a,c){const u=[],d=new pi,f=Ec();d.subscribe(13,(t=>Tn("rum",t)));const p=t=>{d.notify(14,{error:t}),ur("Error reported to customer",{"error.message":t.message})},m=function(t){return new O((e=>{const{stop:n}=gn(t,window,["visibilitychange","freeze"],(t=>{"visibilitychange"===t.type&&"hidden"===document.visibilityState?e.notify({reason:Gn.HIDDEN}):"freeze"===t.type&&e.notify({reason:Gn.FROZEN})}),{capture:!0}),r=mn(t,window,"beforeunload",(()=>{e.notify({reason:Gn.UNLOADING})})).stop;return()=>{n(),r()}}))}(t),g=m.subscribe((t=>{d.notify(11,t)}));u.push((()=>g.unsubscribe()));const v=cr("browser-rum-sdk",t,f,p,m,o);u.push(v.stop);const y=Hn()?function(){const t={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:jn("records")?1:0};return{findTrackedSession:()=>t,expire:Q,expireObservable:new O,setForcedReplay:Q}}():Ja(t,d,i);if(Hn())!function(t){const e=qn();t.subscribe(13,(t=>{e.send("rum",t)}))}(d);else{const e=function(t,e,n,r,o,i){const s=[t.rumEndpointBuilder];t.replica&&s.push(t.replica.rumEndpointBuilder);const a=Yn({encoder:i(2),request:zn(s,n),flushController:Zn({pageMayExitObservable:r,sessionExpireObservable:o})});return e.subscribe(13,(t=>{t.type===Eo?a.upsert(t,t.view.id):a.add(t)})),a}(t,d,p,m,y.expireObservable,o);u.push((()=>e.stop())),function(t,e,n){t.metricsEnabled&&(sc(),rc=!1,e.subscribe(13,(()=>{rc=!0})),n.subscribe((({bytesCount:t,messagesCount:e})=>{rc&&(rc=!1,nc.batchCount+=1,ic(nc.batchBytesCount,t),ic(nc.batchMessagesCount,e))})),I(oc,1e4))}(v,d,e.flushController.flushObservable)}!function(t,e){t.register(1,(()=>e.isGranted()?tr:Qn))}(f,i);const{stop:_}=function(t,e){if(!e.metricsEnabled)return{stop:Q};const{unsubscribe:n}=t.subscribe(4,(({initialViewMetrics:t})=>{var e,r;t.largestContentfulPaint&&t.navigationTimings&&(dr("Initial view metrics",{metrics:(e=t.largestContentfulPaint,r=t.navigationTimings,{lcp:{value:e.value},navigation:{domComplete:r.domComplete,domContentLoaded:r.domContentLoaded,domInteractive:r.domInteractive,firstByte:r.firstByte,loadEvent:r.loadEvent}})}),n())}));return{stop:n}}(d,v);u.push(_);const{stop:b,...w}=function(t,e,n,r,o,i,s,a,c,u){const d=[],f=function(){const t=fi();return new O((e=>{if(!t)return;const n=new t(k((t=>e.notify(t))));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()}))}(),p=Qa(n,location),{observable:m,stop:g}=function(){const t=new O,{stop:e}=Fe(window,"open",(()=>t.notify()));return{observable:t,stop:e}}();d.push(g),function(t,e,n){t.register(0,(({eventType:t})=>{const r=e.source;return{type:t,_dd:{format_version:2,drift:V(),configuration:{session_sample_rate:l(e.sessionSampleRate,3),session_replay_sample_rate:l(e.sessionReplaySampleRate,3),profiling_sample_rate:l(e.profilingSampleRate,3),trace_sample_rate:l(e.traceSampleRate,3),beta_encode_cookie_options:e.betaEncodeCookieOptions},browser_sdk_version:Hn()?"6.26.0":void 0,sdk_name:n},application:{id:e.applicationId},date:q(),source:r}})),t.register(1,(()=>({application:{id:e.applicationId}})))}(e,n,c);const v=cc(e,n);d.push((()=>v.stop()));const y=function(t){const e=br({expireDelay:hi});return t.subscribe(1,(t=>{e.add(function(t){return{service:t.service,version:t.version,context:t.context,id:t.id,name:t.name,startClocks:t.startClocks}}(t),t.startClocks.relative)})),t.subscribe(6,(({endClocks:t})=>{e.closeActive(t.relative)})),t.subscribe(3,(t=>{const n=e.find(t.startClocks.relative);n&&(t.name&&(n.name=t.name),t.context&&(n.context=t.context),n.sessionIsActive=t.sessionIsActive)})),t.subscribe(10,(()=>{e.reset()})),{findView:t=>e.find(t),stop:()=>{e.stop()}}}(t);d.push((()=>y.stop()));const _=function(t,e,n,r){const o=br({expireDelay:Za});let i;t.subscribe(1,(({startClocks:t})=>{const e=r.href;o.add(a({url:e,referrer:i||document.referrer}),t.relative),i=e})),t.subscribe(6,(({endClocks:t})=>{o.closeActive(t.relative)}));const s=n.subscribe((({newLocation:t})=>{const e=o.find();if(e){const n=j();o.closeActive(n),o.add(a({url:t.href,referrer:e.referrer}),n)}}));function a({url:t,referrer:e}){return{url:t,referrer:e}}return e.register(0,(({startTime:t,eventType:e})=>{const n=o.find(t);return n?{type:e,view:{url:n.url,referrer:n.referrer}}:Qn})),{findUrl:t=>o.find(t),stop:()=>{s.unsubscribe(),o.stop()}}}(t,e,p,location);d.push((()=>_.stop()));const b=function(t,e,n){const r=br({expireDelay:ec});return t.subscribe(1,(({startClocks:t})=>{r.add({},t.relative)})),t.subscribe(6,(({endClocks:t})=>{r.closeActive(t.relative)})),e.register(0,(({startTime:t,eventType:e})=>{if(!n.trackFeatureFlagsForEvents.concat([Eo,ko]).includes(e))return tr;const o=r.find(t);return!o||h(o)?tr:{type:e,feature_flags:o}})),{addFeatureFlagEvaluation:(t,e)=>{const n=r.find();n&&(n[t]=e)}}}(t,e,n);(function(t,e,n,r){t.register(0,(({eventType:t,startTime:o})=>{const i=e.findTrackedSession(o),s=r.findView(o);if(!i||!s)return Qn;let a,c,u;return t===Eo?(a=!!n.getReplayStats(s.id)||void 0,c=1===i.sessionReplay,u=!!s.sessionIsActive&&void 0):a=!!n.isRecording()||void 0,{type:t,session:{id:i.id,type:"user",has_replay:a,sampled_for_replay:c,is_active:u}}})),t.register(1,(({startTime:t})=>{const n=e.findTrackedSession(t);return n?{session:{id:n.id}}:tr}))})(e,r,o,y),function(t){t.register(0,(({eventType:t})=>({type:t,connectivity:An()})))}(e);const w=function(t,e,n){const r=Qr();return e.storeContextsAcrossPages&&Jr(e,r,n,2),t.register(0,(()=>({context:r.getContext()}))),r}(e,n,"rum"),S=function(t,e,n,r){const o=to();return e.storeContextsAcrossPages&&Jr(e,o,r,1),t.register(0,(({eventType:t,startTime:r})=>{const i=o.getContext(),s=n.findTrackedSession(r);return s&&s.anonymousId&&!i.anonymous_id&&e.trackAnonymousUser&&(i.anonymous_id=s.anonymousId),h(i)?tr:{type:t,usr:i}})),t.register(1,(({startTime:t})=>{var e;return{anonymous_id:null===(e=n.findTrackedSession(t))||void 0===e?void 0:e.anonymousId}})),o}(e,n,r,"rum"),T=function(t,e,n){const r=Zr();return e.storeContextsAcrossPages&&Jr(e,r,n,4),t.register(0,(()=>{const t=r.getContext();return h(t)||!t.id?tr:{account:t}})),r}(e,n,"rum"),E=sa(t,e,f,m,n);d.push(E.stop);const x=function(t){return{addEvent:(e,n,r,o)=>{xc.includes(n.type)&&t.notify(12,{startTime:e,rawRumEvent:n,domainContext:r,duration:o})}}}(t),C=function(t,e){let n;const r=requestAnimationFrame(k((()=>{n=Ba()}))),o=Va(e).subscribe((t=>{n=t})).unsubscribe;return t.register(0,(({eventType:t})=>({type:t,display:n?{viewport:n}:void 0}))),{stop:()=>{o(),r&&cancelAnimationFrame(r)}}}(e,n);d.push(C.stop);const A=function(t,e,n=dc(t,hc)){var r;let o=ht(hc)||(null===(r=window.Cypress)||void 0===r?void 0:r.env("traceId"));const i=n.subscribe((t=>{o=t}));return e.register(0,(({eventType:t})=>"string"!=typeof o?tr:{type:t,session:{type:"ci_test"},ci_test:{test_execution_id:o}})),{stop:()=>{i.unsubscribe()}}}(n,e);d.push(A.stop),function(t){t.register(0,(({eventType:t})=>Tr()?{type:t,session:{type:"synthetics"},synthetics:{test_id:Sr(),result_id:kr(),injected:wr()}}:tr))}(e),Tc(n,t,e,u);const{addTiming:I,startView:R,setViewName:N,setViewContext:M,setViewContextProperty:P,getViewContext:D,stop:L}=Ya(t,e,n,location,f,m,p,o,y,i);Cc(e),d.push(L);const{stop:U}=va(t,n,v);d.push(U);const{stop:$,longTaskContexts:B}=function(t,e){const n=br({expireDelay:mc}),r=ts(Ji.LONG_ANIMATION_FRAME)?Ji.LONG_ANIMATION_FRAME:Ji.LONG_TASK,o=Zi(e,{type:r,buffered:!0}).subscribe((o=>{for(const i of o){if(!e.trackLongTasks)break;const o=z(i.startTime),s=tt(),a=gc(i,o,s);t.notify(12,{rawRumEvent:a,startTime:o.relative,duration:i.duration,domainContext:{performanceEntry:i}}),n.add({id:s,startClocks:o,duration:i.duration,entryType:r},o.relative),n.closeActive(K(o.relative,i.duration))}}));return{stop:()=>{o.unsubscribe(),n.stop()},longTaskContexts:{findLongTasks:(t,e)=>n.findAll(t,e)}}}(t,n);d.push($);const{addError:F}=ca(t,n,a);Vi(t,n,r,S,T);const H=Vo(t,v,s),G=function(t,e,n,r,o){return{get:i=>{const s=n.findView(i),a=o.findUrl(i),c=e.findTrackedSession(i);if(c&&s&&a){const e=r.findActionId(i);return{application_id:t,session_id:c.id,user_action:e?{id:e}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}(n.applicationId,r,y,E.actionContexts,_);return{addAction:E.addAction,startAction:E.startAction,stopAction:E.stopAction,addEvent:x.addEvent,addError:F,addTiming:I,addFeatureFlagEvaluation:b.addFeatureFlagEvaluation,startView:R,setViewContext:M,setViewContextProperty:P,getViewContext:D,setViewName:N,viewHistory:y,getInternalContext:G.get,startDurationVital:H.startDurationVital,stopDurationVital:H.stopDurationVital,addDurationVital:H.addDurationVital,addOperationStepVital:H.addOperationStepVital,globalContext:w,userContext:S,accountContext:T,longTaskContexts:B,stop:()=>d.forEach((t=>t()))}}(d,f,t,y,e,r,s,a,c,p);return u.push(b),a.unbuffer(),u.push((()=>n.stop())),{...w,lifeCycle:d,session:y,stopSession:()=>y.expire(),telemetry:v,stop:()=>{u.forEach((t=>t()))},hooks:f}}),Gc,Wc,{startDeflateWorker:Lc,createDeflateEncoder:Oc,sdkName:"rum"});!function(t,e,n){const r=t[e];r&&!r.q&&r.version&&o.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),t[e]=n,r&&r.q&&r.q.forEach((t=>c(t,"onReady callback threw an error:")()))}(g(),"DD_RUM",Kc);globalThis.DD_RUM=Kc;const Yc=2,Xc=3,Jc=4,Zc=6,Qc=7,tu=8,eu=9,nu=12,ru=0,ou=1,iu=2,su=3,au=4,cu=11,uu={AddString:0,AddNode:1,RemoveNode:2,Attribute:3,Text:4,Size:5,ScrollPosition:6,AddStyleSheet:7,AttachedStyleSheets:8,MediaPlaybackState:9,VisualViewport:10},lu=0,du=1,fu=2,pu=3,hu=4,mu=5,gu=6,vu=7,yu=8,_u=5,bu=6,wu=0,Su=1;function ku(t){let e={parent:void 0,previousSiblingId:void 0};return{advance(n){const r=t.getOrInsert(n),o=(t=>{var n;if(e.previousSiblingId===t-1)return 0;const r=null===(n=e.parent)||void 0===n?void 0:n.previousSiblingId;return void 0!==r?t-r:null})(r);return e.previousSiblingId=r,{nodeId:r,insertionPoint:o}},ascend(){e.parent&&(e=e.parent)},descend(){void 0!==e.previousSiblingId&&(e={parent:e,previousSiblingId:void 0})}}}function Tu(t,e){const n=t.tagName,r=t.value;if(Is(t,e)){const e=t.type;if("INPUT"===n&&("button"===e||"submit"===e||"reset"===e))return r;if(!r||"OPTION"===n)return;return Ss}return"OPTION"===n||"SELECT"===n?t.value:"INPUT"===n||"TEXTAREA"===n?r:void 0}const Eu=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,xu=/^[A-Za-z]+:|^\/\//,Cu=/^["']?data:.*,/i;function Au(t,e){return t.replace(Eu,((t,n,r,o,i,s)=>{const a=r||i||s;if(!e||!a||xu.test(a)||Cu.test(a))return t;const c=n||o||"";return`url(${c}${function(t,e){try{return lt(t,e).href}catch(e){return t}}(a,e)}${c})`}))}const Iu=/[^a-z1-6-_]/;function Ru(t){return t.tagName.toLowerCase()}function Nu(t,e){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${e}' style='background-color:silver'%3E%3C/svg%3E`}function Ou(t,e){if(void 0===t||0===t.length)return;const n=t=>{const n=t.cssRules||t.rules,r=Array.from(n,(t=>t.cssText));e.addMetric("cssText",r.reduce(((t,e)=>t+e.length),0));return{cssRules:r,disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0}},r=[];for(let e=0;e<t.length;e++)r.push(n(t[e]));return r}function Mu(t,e,n,r){if(e===_s.HIDDEN)return null;const o=t.getAttribute(n),i=t.tagName;if(Rs(i,n,o,e,r)){if("IMG"===i){const e=t;if(e.naturalWidth>0)return Nu(e.naturalWidth,e.naturalHeight);const{width:n,height:r}=t.getBoundingClientRect();return n>0||r>0?Nu(n,r):ks}return"SOURCE"===i?ks:Ss}return o?Ii(o,1e6):o}function Pu(t,e,n){if(e===_s.HIDDEN)return{};const r={},o=Ru(t);for(let o=0;o<t.attributes.length;o+=1){const i=t.attributes.item(o).name,s=Mu(t,e,i,n.scope.configuration);null!==s&&(r[i]=s)}if(t.value&&("textarea"===o||"select"===o||"option"===o||"input"===o)){const n=Tu(t,e);void 0!==n&&(r.value=n)}if("option"===o){const n=t;n.selected&&!Is(n,e)?r.selected="":delete r.selected}const i=t;return"input"!==o||"radio"!==i.type&&"checkbox"!==i.type||(i.checked&&!Is(i,e)?r.checked="":delete r.checked),r}function Du(t,e,n){if(e===_s.HIDDEN)return{};const r={},o=t.ownerDocument,i=Ru(t);if("link"===i){const e=Array.from(o.styleSheets).find((e=>e.href===t.href)),i=Lu(e);i&&e&&(n.addMetric("cssText",i.length),r._cssText=i)}if("style"===i&&t.sheet){const e=Lu(t.sheet);e&&(n.addMetric("cssText",e.length),r._cssText=e)}if("audio"===i||"video"===i){const e=t;r.rr_mediaState=e.paused?"paused":"played"}let s,a;switch(n.kind){case 0:s=Math.round(t.scrollTop),a=Math.round(t.scrollLeft),(s||a)&&n.scope.elementsScrollPositions.set(t,{scrollTop:s,scrollLeft:a});break;case 1:n.scope.elementsScrollPositions.has(t)&&({scrollTop:s,scrollLeft:a}=n.scope.elementsScrollPositions.get(t))}return a&&(r.rr_scrollLeft=a),s&&(r.rr_scrollTop=s),r}function Lu(t){if(!t)return null;let e;try{e=t.rules||t.cssRules}catch(t){}if(!e)return null;return Au(Array.from(e,1===ct()?Uu:zu).join(""),t.href)}function Uu(t){if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")){const e=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return t.cssText.replace(e,"$1\\$2")}return zu(t)}function zu(t){return function(t){return"styleSheet"in t}(t)&&Lu(t.styleSheet)||t.cssText}function $u(t,e,n){switch(t.nodeType){case t.DOCUMENT_NODE:return function(t,e,n){return{type:ru,id:n.assignId(t),childNodes:Vu(t,e,n),adoptedStyleSheets:Ou(t.adoptedStyleSheets,n)}}(t,e,n);case t.DOCUMENT_FRAGMENT_NODE:return function(t,e,n){const r=Gi(t);r&&n.scope.shadowRootsController.addShadowRoot(t,n.scope);return{type:cu,id:n.assignId(t),childNodes:Vu(t,e,n),isShadowRoot:r,adoptedStyleSheets:r?Ou(t.adoptedStyleSheets,n):void 0}}(t,e,n);case t.DOCUMENT_TYPE_NODE:return function(t,e){return{type:ou,id:e.assignId(t),name:t.name,publicId:t.publicId,systemId:t.systemId}}(t,n);case t.ELEMENT_NODE:return function(t,e,n){const r=function(t){const e=t.toLowerCase().trim();return Iu.test(e)?"div":e}(t.tagName),o=(s=t,"svg"===s.tagName||s instanceof SVGElement||void 0),i=Cs(As(t),e);var s;if(i===_s.HIDDEN){const{width:e,height:i}=t.getBoundingClientRect();return{type:iu,id:n.assignId(t),tagName:r,attributes:{rr_width:`${e}px`,rr_height:`${i}px`,[bs]:ws},childNodes:[],isSVG:o}}if(i===_s.IGNORE)return null;const a=n.assignId(t),c=function(t,e,n){return{...Pu(t,e,n),...Du(t,e,n)}}(t,i,n);let u=[];(function(t){return t.childNodes.length>0||Hi(t)})(t)&&"style"!==r&&(u=Vu(t,i,n));return{type:iu,id:a,tagName:r,attributes:c,childNodes:u,isSVG:o}}(t,e,n);case t.TEXT_NODE:return function(t,e,n){const r=Ms(t,e);if(void 0===r)return null;return{type:su,id:n.assignId(t),textContent:r}}(t,e,n);case t.CDATA_SECTION_NODE:return function(t,e){return{type:au,id:e.assignId(t),textContent:""}}(t,n);default:return null}}function Vu(t,e,n){const r=[];return Wi(t,(t=>{const o=$u(t,e,n);o&&r.push(o)})),r}function Bu(t,e){return $u(t,e.scope.configuration.defaultPrivacyLevel,e)}function Fu(t,e,n,r){let o;const i=As(e);if(o=i?Cs(i,n):n,o!==_s.HIDDEN){if(o!==_s.IGNORE){switch(e.nodeType){case e.CDATA_SECTION_NODE:!function(t,e,n){const{insertionPoint:r}=t.advance(e);n.addNode(r,"#cdata-section")}(t,e,r);break;case e.DOCUMENT_NODE:!function(t,e,n){const{nodeId:r,insertionPoint:o}=t.advance(e);n.addNode(o,"#document"),n.setScrollPosition(r,Ua(),za()),qu(e.adoptedStyleSheets,r,n)}(t,e,r);break;case e.DOCUMENT_FRAGMENT_NODE:!function(t,e,n){const{nodeId:r,insertionPoint:o}=t.advance(e);if(!Gi(e))return void n.addNode(o,"#document-fragment");n.addNode(o,"#shadow-root"),n.scope.shadowRootsController.addShadowRoot(e,n.scope),qu(e.adoptedStyleSheets,r,n)}(t,e,r);break;case e.DOCUMENT_TYPE_NODE:!function(t,e,n){const{insertionPoint:r}=t.advance(e);n.addNode(r,"#doctype",e.name,e.publicId,e.systemId)}(t,e,r);break;case e.ELEMENT_NODE:!function(t,e,n,r){const{nodeId:o,insertionPoint:i}=t.advance(e),s=Object.entries(Pu(e,n,r));r.addNode(i,ju(e),...s);const{_cssText:a,rr_mediaState:c,rr_scrollLeft:u,rr_scrollTop:l}=Du(e,n,r),d=e;if(void 0!==a&&d.sheet){const t=r.scope.styleSheetIds.getOrInsert(d.sheet);r.addStyleSheet(a),r.attachStyleSheets(o,[t])}"played"===c?r.setMediaPlaybackState(o,wu):"paused"===c&&r.setMediaPlaybackState(o,Su);void 0===u&&void 0===l||r.setScrollPosition(o,u||0,l||0)}(t,e,o,r);break;case e.TEXT_NODE:!function(t,e,n,r){const o=Ms(e,n);if(void 0===o)return;const{insertionPoint:i}=t.advance(e);r.addNode(i,"#text",o)}(t,e,o,r);break;default:return}switch(e.nodeType){case e.CDATA_SECTION_NODE:case e.DOCUMENT_TYPE_NODE:case e.TEXT_NODE:return}"STYLE"!==e.nodeName&&(t.descend(),Wi(e,(e=>{Fu(t,e,o,r)})),t.ascend())}}else!function(t,e,n){if(!ji(e))return;const{nodeId:r,insertionPoint:o}=t.advance(e);n.addNode(o,ju(e),[bs,ws]);const{width:i,height:s}=e.getBoundingClientRect();n.setSize(r,i,s)}(t,e,r)}function qu(t,e,n){t&&0!==t.length&&n.attachStyleSheets(e,t.map((t=>function(t,e){const n=Array.from(t.cssRules||t.rules,(t=>t.cssText)),r=t.media.length>0?Array.from(t.media):void 0;return e.addMetric("cssText",n.reduce(((t,e)=>t+e.length),0)),e.addStyleSheet(n,r,t.disabled),e.scope.styleSheetIds.getOrInsert(t)}(t,n))))}function ju(t){const e=t.nodeName;return function(t){return"http://www.w3.org/2000/svg"===t.namespaceURI}(t)?`svg>${e}`:e}function Hu(t,e,n){t[e].count+=1,t[e].max=Math.max(t[e].max,n),t[e].sum+=n}function Gu(t,e,n,r,o){const i=[],s={cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}},a={add(t){i.push(t)},addMetric(t,e){Hu(s,t,e)},assignId(t){const e=r.nodeIds.getOrInsert(t);return a.serializedNodeIds&&a.serializedNodeIds.add(e),e},kind:t,scope:r},c=q();o(a),Hu(s,"serializationDuration",W(c,q()));for(const t of i)e(t);n(s)}function Wu(t,e,n,r,o,i){const s=function(t){let e={};const n=e=>{for(let o=0,i=e.length;o<i;o++){const i=e[o];if("string"==typeof i){const n=t.size;e[o]=t.getOrInsert(i),t.size>n&&r(uu.AddString,i)}else Array.isArray(i)&&n(i)}},r=(t,r)=>{t in e||(e[t]=[t]),t!==uu.AddString&&Array.isArray(r)&&n(r),e[t].push(r)};return{add:r,flush:()=>{const t=[];return[uu.AddString,uu.AddNode,uu.RemoveNode,uu.Attribute,uu.Text,uu.Size,uu.ScrollPosition,uu.AddStyleSheet,uu.AttachedStyleSheets,uu.MediaPlaybackState,uu.VisualViewport].forEach((n=>{const r=e[n];r&&t.push(r)})),e={},t}}}(r.stringIds),a={cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}},c={addMetric(t,e){Hu(a,t,e)},addNode(...t){s.add(uu.AddNode,t)},addStyleSheet(t,e,n){n?s.add(uu.AddStyleSheet,[t,e||[],n]):e?s.add(uu.AddStyleSheet,[t,e]):s.add(uu.AddStyleSheet,[t])},attachStyleSheets(t,e){const n=[t];for(const t of e)n.push(t);s.add(uu.AttachedStyleSheets,n)},setMediaPlaybackState(t,e){s.add(uu.MediaPlaybackState,[t,e])},setScrollPosition(t,e,n){s.add(uu.ScrollPosition,[t,e,n])},setSize(t,e,n){s.add(uu.Size,[t,e,n])},kind:t,scope:r},u=q();i(c),Hu(a,"serializationDuration",W(u,q()));const l=s.flush();l.length>0&&e({data:l,type:nu,timestamp:o}),n(a)}const Ku=(t,e)=>{const 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},Yu=t=>({scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width});function Xu(t,e,n,r,o){const{width:i,height:s}=Ba();n({data:{height:s,href:window.location.href,width:i},type:Jc,timestamp:t}),n({data:{has_focus:document.hasFocus()},type:Zc,timestamp:t}),Se(_e.USE_CHANGE_RECORDS)?(1===e&&o.resetIds(),Wu(e,n,r,o,t,(t=>{Fu(ku(o.nodeIds),document,o.configuration.defaultPrivacyLevel,t)}))):Gu(e,n,r,o,(e=>{e.add(function(t,e){return{data:{node:Bu(document,e),initialOffset:{left:Ua(),top:za()}},type:Yc,timestamp:t}}(t,e))})),window.visualViewport&&n({data:Yu(window.visualViewport),type:tu,timestamp:t})}function Ju(){return Qu((()=>new Map),0)}function Zu(t){return Qu((()=>new WeakMap),t)}function Qu(t,e){let n=t(),r=e;const o=t=>n.get(t);return{clear(){n=t(),r=e},get:o,getOrInsert(t){let e=o(t);return void 0===e&&(e=r++,n.set(t,e)),e},get size(){return r-e}}}function tl(t,e,n){const r=Zu(1),o=Zu(0),i=Ju(),s=Zu(0);return{resetIds(){r.clear(),o.clear(),i.clear(),s.clear()},configuration:t,elementsScrollPositions:e,eventIds:r,nodeIds:o,shadowRootsController:n,stringIds:i,styleSheetIds:s}}function el(t){return Boolean(t.changedTouches)}function nl(t){return!0===t.composed&&Hi(t.target)?t.composedPath()[0]:t.target}function rl(t,e){return{data:{source:t,...e},type:Xc,timestamp:q()}}function ol(t,e){const{throttled:n,cancel:r}=Z((n=>{const r=nl(n),o=e.nodeIds.get(r);if(void 0===o)return;const i=il(n);if(!i)return;const s={id:o,timeOffset:0,x:i.x,y:i.y};t(rl(el(n)?gu:du,{positions:[s]}))}),50,{trailing:!1}),{stop:o}=gn(e.configuration,document,["mousemove","touchmove"],n,{capture:!0,passive:!0});return{stop:()=>{o(),r()}}}function il(t){let{clientX:e,clientY:n}=el(t)?t.changedTouches[0]:t;if(window.visualViewport){const{visualViewportX:t,visualViewportY:r}=Ku(e,n);e=t,n=r}if(Number.isFinite(e)&&Number.isFinite(n))return{x:e,y:n}}const sl={pointerup:0,mousedown:1,click:2,contextmenu:3,dblclick:4,focus:_u,blur:bu,touchstart:7,touchend:9};function al(t,e){return gn(e.configuration,document,Object.keys(sl),(n=>{const r=nl(n),o=e.nodeIds.get(r);if(void 0===o||xs(r,e.configuration.defaultPrivacyLevel)===_s.HIDDEN)return;const i=sl[n.type];let s;if(i!==bu&&i!==_u){const t=il(n);if(!t)return;s={id:o,type:i,x:t.x,y:t.y}}else s={id:o,type:i};t({id:e.eventIds.getOrInsert(n),...rl(fu,s)})}),{capture:!0,passive:!0})}function cl(t,e,n){const{throttled:r,cancel:o}=Z((t=>{const r=nl(t);if(!r)return;const o=n.nodeIds.get(r);if(void 0===o||xs(r,n.configuration.defaultPrivacyLevel)===_s.HIDDEN)return;const i=r===document?{scrollTop:za(),scrollLeft:Ua()}:{scrollTop:Math.round(r.scrollTop),scrollLeft:Math.round(r.scrollLeft)};n.elementsScrollPositions.set(r,i),e(rl(pu,{id:o,x:i.scrollLeft,y:i.scrollTop}))}),100),{stop:i}=mn(n.configuration,t,"scroll",r,{capture:!0,passive:!0});return{stop:()=>{i(),o()}}}function ul(t,e){const n=Va(e.configuration).subscribe((e=>{t(rl(hu,e))}));return{stop:()=>{n.unsubscribe()}}}function ll(t,e){const n=window.visualViewport;if(!n)return{stop:Q};const{throttled:r,cancel:o}=Z((()=>{t({data:Yu(n),type:tu,timestamp:q()})}),200,{trailing:!1}),{stop:i}=gn(e.configuration,n,["resize","scroll"],r,{capture:!0,passive:!0});return{stop:()=>{i(),o()}}}function dl(t,e){return gn(e.configuration,document,["play","pause"],(n=>{const r=nl(n);if(!r)return;const o=e.nodeIds.get(r);void 0!==o&&xs(r,e.configuration.defaultPrivacyLevel)!==_s.HIDDEN&&t(rl(vu,{id:o,type:"play"===n.type?wu:Su}))}),{capture:!0,passive:!0})}function fl(t,e){function n(t,n){if(!t||!t.ownerNode)return;const r=e.nodeIds.get(t.ownerNode);void 0!==r&&n(r)}const r=[Fe(CSSStyleSheet.prototype,"insertRule",(({target:e,parameters:[r,o]})=>{n(e,(e=>t(rl(yu,{id:e,adds:[{rule:r,index:o}]}))))})),Fe(CSSStyleSheet.prototype,"deleteRule",(({target:e,parameters:[r]})=>{n(e,(e=>t(rl(yu,{id:e,removes:[{index:r}]}))))}))];function o(e){r.push(Fe(e.prototype,"insertRule",(({target:e,parameters:[r,o]})=>{n(e.parentStyleSheet,(n=>{const i=pl(e);i&&(i.push(o||0),t(rl(yu,{id:n,adds:[{rule:r,index:i}]})))}))})),Fe(e.prototype,"deleteRule",(({target:e,parameters:[r]})=>{n(e.parentStyleSheet,(n=>{const o=pl(e);o&&(o.push(r),t(rl(yu,{id:n,removes:[{index:o}]})))}))})))}return"undefined"!=typeof CSSGroupingRule?o(CSSGroupingRule):(o(CSSMediaRule),o(CSSSupportsRule)),{stop:()=>{r.forEach((t=>t.stop()))}}}function pl(t){const e=[];let n=t;for(;n.parentRule;){const t=Array.from(n.parentRule.cssRules).indexOf(n);e.unshift(t),n=n.parentRule}if(!n.parentStyleSheet)return;const r=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return e.unshift(r),e}function hl(t,e){return gn(e.configuration,window,["focus","blur"],(()=>{t({data:{has_focus:document.hasFocus()},type:Zc,timestamp:q()})}))}function ml(t,e,n){const r=t.subscribe(12,(t=>{var r,o;t.rawRumEvent.type===So&&t.rawRumEvent.action.type===Mo&&(null===(o=null===(r=t.rawRumEvent.action.frustration)||void 0===r?void 0:r.type)||void 0===o?void 0:o.length)&&"events"in t.domainContext&&t.domainContext.events&&t.domainContext.events.length&&e({timestamp:t.rawRumEvent.date,type:eu,data:{frustrationTypes:t.rawRumEvent.action.frustration.type,recordIds:t.domainContext.events.map((t=>n.eventIds.getOrInsert(t)))}})}));return{stop:()=>{r.unsubscribe()}}}function gl(t,e,n){const r=t.subscribe(5,(()=>{n(),e({timestamp:q(),type:Qc})}));return{stop:()=>{r.unsubscribe()}}}function vl(t,e,n){const r=n.configuration.defaultPrivacyLevel,o=new WeakMap,i=t!==document,{stop:s}=gn(n.configuration,t,i?["change"]:["input","change"],(t=>{const e=nl(t);(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)&&c(e)}),{capture:!0,passive:!0});let a;if(i)a=Q;else{const t=[qe(HTMLInputElement.prototype,"value",c),qe(HTMLInputElement.prototype,"checked",c),qe(HTMLSelectElement.prototype,"value",c),qe(HTMLTextAreaElement.prototype,"value",c),qe(HTMLSelectElement.prototype,"selectedIndex",c)];a=()=>{t.forEach((t=>t.stop()))}}return{stop:()=>{a(),s()}};function c(t){const e=xs(t,r);if(e===_s.HIDDEN)return;const n=t.type;let o;if("radio"===n||"checkbox"===n){if(Is(t,e))return;o={isChecked:t.checked}}else{const n=Tu(t,e);if(void 0===n)return;o={text:n}}u(t,o);const i=t.name;"radio"===n&&i&&t.checked&&document.querySelectorAll(`input[type="radio"][name="${CSS.escape(i)}"]`).forEach((e=>{e!==t&&u(e,{isChecked:!1})}))}function u(t,r){const i=n.nodeIds.get(t);if(void 0===i)return;const s=o.get(t);s&&s.text===r.text&&s.isChecked===r.isChecked||(o.set(t,r),e(rl(mu,{id:i,...r})))}}function yl(t,e,n,r){const o=fi();if(!o)return{stop:Q,flush:Q};const i=function(t){let e=Q,n=[];function r(){e(),t(n),n=[]}const{throttled:o,cancel:i}=Z(r,16,{leading:!1});return{addMutations:t=>{0===n.length&&(e=Br(o,{timeout:100})),n.push(...t)},flush:r,stop:()=>{e(),i()}}}((t=>{Gu(2,e,n,r,(e=>function(t,e){const n=new Map;t.filter((t=>"childList"===t.type)).forEach((t=>{t.removedNodes.forEach((t=>{_l(t,e.scope.shadowRootsController.removeShadowRoot)}))}));const r=t.filter((t=>t.target.isConnected&&function(t,e){let n=t;for(;n;){if(void 0===e.get(n)&&!Gi(n))return!1;n=Ki(n)}return!0}(t.target,e.scope.nodeIds)&&xs(t.target,e.scope.configuration.defaultPrivacyLevel,n)!==_s.HIDDEN)),{adds:o,removes:i,hasBeenSerialized:s}=function(t,e,n){const r=new Set,o=new Map;for(const e of t)e.addedNodes.forEach((t=>{r.add(t)})),e.removedNodes.forEach((t=>{r.has(t)||o.set(t,e.target),r.delete(t)}));const i=Array.from(r);s=i,s.sort(((t,e)=>{const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_CONTAINS||n&Node.DOCUMENT_POSITION_FOLLOWING?1:n&Node.DOCUMENT_POSITION_PRECEDING?-1:0})),n.serializedNodeIds=new Set;var s;const a=[];for(const t of i){if(u(t))continue;const r=xs(t.parentNode,n.scope.configuration.defaultPrivacyLevel,e);if(r===_s.HIDDEN||r===_s.IGNORE)continue;const o=$u(t,r,n);if(!o)continue;const i=Ki(t);a.push({nextId:l(t),parentId:n.scope.nodeIds.get(i),node:o})}const c=[];return o.forEach(((t,e)=>{const r=n.scope.nodeIds.get(t),o=n.scope.nodeIds.get(e);void 0!==r&&void 0!==o&&c.push({parentId:r,id:o})})),{adds:a,removes:c,hasBeenSerialized:u};function u(t){var e;const r=n.scope.nodeIds.get(t);return void 0!==r&&(null===(e=n.serializedNodeIds)||void 0===e?void 0:e.has(r))}function l(t){let e=t.nextSibling;for(;e;){const t=n.scope.nodeIds.get(e);if(void 0!==t)return t;e=e.nextSibling}return null}}(r.filter((t=>"childList"===t.type)),n,e),a=function(t,e,n){var r;const o=[],i=new Set,s=t.filter((t=>!i.has(t.target)&&(i.add(t.target),!0)));for(const t of s){if(t.target.textContent===t.oldValue)continue;const i=n.scope.nodeIds.get(t.target);if(void 0===i)continue;const s=xs(Ki(t.target),n.scope.configuration.defaultPrivacyLevel,e);s!==_s.HIDDEN&&s!==_s.IGNORE&&o.push({id:i,value:null!==(r=Ms(t.target,s))&&void 0!==r?r:null})}return o}(r.filter((t=>"characterData"===t.type&&!s(t.target))),n,e),c=function(t,e,n){const r=[],o=new Map,i=t.filter((t=>{const e=o.get(t.target);return(!e||!e.has(t.attributeName))&&(e?e.add(t.attributeName):o.set(t.target,new Set([t.attributeName])),!0)})),s=new Map;for(const t of i){if(t.target.getAttribute(t.attributeName)===t.oldValue)continue;const o=n.scope.nodeIds.get(t.target);if(void 0===o)continue;const i=xs(t.target,n.scope.configuration.defaultPrivacyLevel,e),a=Mu(t.target,i,t.attributeName,n.scope.configuration);let c;if("value"===t.attributeName){const e=Tu(t.target,i);if(void 0===e)continue;c=e}else c="string"==typeof a?a:null;let u=s.get(t.target);u||(u={id:o,attributes:{}},r.push(u),s.set(t.target,u)),u.attributes[t.attributeName]=c}return r}(r.filter((t=>"attributes"===t.type&&!s(t.target))),n,e);if(!(a.length||c.length||i.length||o.length))return;e.add(rl(lu,{adds:o,removes:i,texts:a,attributes:c}))}(t.concat(s.takeRecords()),e)))})),s=new o(k(i.addMutations));return s.observe(t,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{s.disconnect(),i.stop()},flush:()=>{i.flush()}}}function _l(t,e){Hi(t)&&e(t.shadowRoot),Wi(t,(t=>_l(t,e)))}function bl(t){const{emitRecord:e,emitStats:n,configuration:r,lifeCycle:o}=t;if(!e||!n)throw new Error("emit functions are required");const i=n=>{e(n),Tn("record",{record:n});const r=t.viewHistory.findView();Nc(r.id).records_count+=1},s=((t,e)=>{const n=new Map;return{addShadowRoot:(r,o)=>{if(n.has(r))return;const i=yl(r,t,e,o),s=vl(r,t,o),a=cl(r,t,o);n.set(r,{flush:()=>i.flush(),stop:()=>{i.stop(),s.stop(),a.stop()}})},removeShadowRoot:t=>{const e=n.get(t);e&&(e.stop(),n.delete(t))},stop:()=>{n.forEach((({stop:t})=>t()))},flush:()=>{n.forEach((({flush:t})=>t()))}}})(i,n),a=tl(r,function(){const t=new WeakMap;return{set(e,n){(e!==document||document.scrollingElement)&&t.set(e===document?document.scrollingElement:e,n)},get:e=>t.get(e),has:e=>t.has(e)}}(),s),{stop:c}=function(t,e,n,r,o){Xu(q(),0,e,n,o);const{unsubscribe:i}=t.subscribe(2,(t=>{r(),Xu(t.startClocks.timeStamp,1,e,n,o)}));return{stop:i}}(o,i,n,u,a);function u(){s.flush(),l.flush()}const l=yl(document,i,n,a),d=[l,ol(i,a),al(i,a),cl(document,i,a),ul(i,a),vl(document,i,a),dl(i,a),fl(i,a),hl(i,a),ll(i,a),ml(o,i,a),gl(o,i,u)];return{stop:()=>{s.stop(),d.forEach((t=>t.stop())),c()},flushMutations:u,shadowRootsController:s}}function wl({context:t,creationReason:e,encoder:n}){let r=0;const o=t.view.id,i=function(t){return Nc(t).segments_count}(o),s={start:1/0,end:-1/0,creation_reason:e,records_count:0,has_full_snapshot:!1,index_in_view:i,source:"browser",...t},a={cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}};return function(t){Nc(t).segments_count+=1}(o),{addRecord:function(t,e){s.start=Math.min(s.start,t.timestamp),s.end=Math.max(s.end,t.timestamp),s.records_count+=1,s.has_full_snapshot||(s.has_full_snapshot=t.type===Yc||t.type===nu&&0===s.index_in_view);const o=n.isEmpty?'{"records":[':",";n.write(o+JSON.stringify(t),(t=>{r+=t,e(r)}))},addStats:function(t){!function(t,e){for(const n of["cssText","serializationDuration"])t[n].count+=e[n].count,t[n].max=Math.max(t[n].max,e[n].max),t[n].sum+=e[n].sum}(a,t)},flush:function(t){if(n.isEmpty)throw new Error("Empty segment flushed");n.write(`],${JSON.stringify(s).slice(1)}\n`),n.finish((e=>{!function(t,e){Nc(t).segments_total_raw_size+=e}(s.view.id,e.rawBytesCount),t(s,a,e)}))}}}let Sl=6e4;function kl(t,e,n,r,o,i){return function(t,e,n,r){let o={status:0,nextSegmentCreationReason:"init"};const{unsubscribe:i}=t.subscribe(2,(()=>{a("view_change")})),{unsubscribe:s}=t.subscribe(11,(t=>{a(t.reason)}));function a(t){1===o.status&&(o.segment.flush(((e,r,o)=>{const i=function(t,e,n,r){const o=new FormData;o.append("segment",new Blob([t],{type:"application/octet-stream"}),`${e.session.id}-${e.start}`);const i={raw_segment_size:r,compressed_segment_size:t.byteLength,...e},s=JSON.stringify(i);return o.append("event",new Blob([s],{type:"application/json"})),{data:o,bytesCount:t.byteLength,cssText:n.cssText,isFullSnapshot:0===e.index_in_view,rawSize:r,recordCount:e.records_count,serializationDuration:n.serializationDuration}}(o.output,e,r,o.rawBytesCount);Wn(t)?n.sendOnExit(i):n.send(i)})),A(o.expirationTimeoutId)),o="stop"!==t?{status:0,nextSegmentCreationReason:t}:{status:2}}return{addRecord:t=>{if(2!==o.status){if(0===o.status){const t=e();if(!t)return;o={status:1,segment:wl({encoder:r,context:t,creationReason:o.nextSegmentCreationReason}),expirationTimeoutId:C((()=>{a("segment_duration_limit")}),5e3)}}o.segment.addRecord(t,(t=>{t>Sl&&a("segment_bytes_limit")}))}},addStats:t=>{1===o.status&&o.segment.addStats(t)},stop:()=>{a("stop"),i(),s()}}}(t,(()=>function(t,e,n){const r=e.findTrackedSession(),o=n.findView();if(!r||!o)return;return{application:{id:t},session:{id:r.id},view:{id:o.id}}}(e.applicationId,n,r)),o,i)}function Tl(t,e){if(!t.metricsEnabled)return{stop:Q};const{unsubscribe:n}=e.subscribe((t=>{if("failure"===t.type||"queue-full"===t.type||"success"===t.type&&t.payload.isFullSnapshot){dr("Segment network request metrics",{metrics:(e=t.type,n=t.bandwidth,{cssText:{count:(r=t.payload).cssText.count,max:r.cssText.max,sum:r.cssText.sum},encoding:{fullSnapshot:Se(_e.USE_CHANGE_RECORDS)?"change":"v1",incrementalSnapshot:"v1"},isFullSnapshot:r.isFullSnapshot,ongoingRequests:{count:n.ongoingRequestCount,totalSize:n.ongoingByteCount},recordCount:r.recordCount,result:e,serializationDuration:{count:r.serializationDuration.count,max:r.serializationDuration.max,sum:r.serializationDuration.sum},size:{compressed:r.bytesCount,raw:r.rawSize}})})}var e,n,r}));return{stop:n}}var El=Object.freeze({__proto__:null,startRecording:function(t,e,n,r,o,i,s){const a=[],c=s||zn([e.sessionReplayEndpointBuilder],(e=>{t.notify(14,{error:e}),ur("Error reported to customer",{"error.message":e.message})}),Sl);let u,l;if(Hn())({addRecord:u}=function(t){const e=qn();return{addRecord:n=>{const r=t.findView();e.send("record",n,r.id)}}}(r)),l=Q;else{const s=kl(t,e,n,r,c,o);u=s.addRecord,l=s.addStats,a.push(s.stop);const d=Tl(i,c.observable);a.push(d.stop)}const{stop:d}=bl({emitRecord:u,emitStats:l,configuration:e,lifeCycle:t,viewHistory:r});return a.push(d),{stop:()=>{a.forEach((t=>t()))}}}});const xl=/\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g;const Cl=(t,e)=>t||function(t){return t?t.replace(xl,"/?"):"/"}(e);function Al(t,e,n){const r={application:{id:e}};n&&(r.session={id:n});const{ids:o,names:i}=function(t){const e={ids:[],names:[]};for(const n of t)e.ids.push(n.viewId),n.viewName&&e.names.push(n.viewName);return e.names=Array.from(new Set(e.names)),e}(t.views);o.length&&(r.view={id:o,name:i});const s=t.longTasks.map((t=>t.id)).filter((t=>void 0!==t));return s.length&&(r.long_task={id:s}),r}function Il(t,e,n){const r=function(t,e,n){const r=Sn(e),o=Al(t,e.applicationId,n),i=function(t){const e=t.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"]);return e}(r),s={...o,attachments:["wall-time.json"],start:new Date(t.startClocks.timeStamp).toISOString(),end:new Date(t.endClocks.timeStamp).toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:i.join(","),_dd:{clock_drift:V()}};return s}(t,e,n);return{event:r,"wall-time.json":t}}const Rl={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};var Nl=Object.freeze({__proto__:null,DEFAULT_RUM_PROFILER_CONFIGURATION:Rl,createRumProfiler:function(t,e,n,r,i,s,a,c=Rl){const u=function(t,e,n,r){const o=zn([t.profilingEndpointBuilder],(t=>{e.notify(14,{error:t}),ur("Error reported to customer",{"error.message":t.message})})),i=n(r);return{async send({event:t,...e}){const n=new FormData,r=We(t);if(!r)throw new Error("Failed to serialize event");n.append("event",new Blob([r],{type:"application/json"}),"event.json");let s=r.length;for(const[t,r]of bt(e)){const e=We(r);if(!e)throw new Error("Failed to serialize attachment");const o=await Ic(i,e);s+=o.outputBytesCount,n.append(t,new Blob([o.output]),t)}o.send({data:n,bytesCount:s})}}}(t,e,s,6);let l;const d=[];let f={state:"stopped",stateReason:"initializing"};function p(){if("running"===f.state)return;const e=a.findView();l=e?{startClocks:e.startClocks,viewId:e.id,viewName:Cl(e.name,document.location.pathname)}:void 0,d.push(mn(t,window,"visibilitychange",w).stop,mn(t,window,"beforeunload",S).stop),m()}async function h(t){await async function(t){if("running"!==f.state)return;await y(),f={state:"stopped",stateReason:t}}(t),d.forEach((t=>t())),r.set({status:"stopped",error_reason:void 0})}function m(){const t=g().Profiler;if(!t)throw r.set({status:"error",error_reason:"not-supported-by-browser"}),new Error("RUM Profiler is not supported in this browser.");v(f).catch(E);const{cleanupTasks:n}=function(t){if("running"===t.state)return{cleanupTasks:t.cleanupTasks};const n=[],r=e.subscribe(2,(t=>{const e={viewId:t.id,viewName:Cl(t.name,document.location.pathname),startClocks:t.startClocks};_(e),l=e}));return n.push(r.unsubscribe),{cleanupTasks:n}}(f);let i;try{i=new t({sampleInterval:c.sampleIntervalMs,maxBufferSize:Math.round(1.5*c.collectIntervalMs/c.sampleIntervalMs)})}catch(t){return void(t instanceof Error&&t.message.includes("disabled by Document Policy")?(o.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",t),r.set({status:"error",error_reason:"missing-document-policy-header"})):r.set({status:"error",error_reason:"unexpected-exception"}))}r.set({status:"running",error_reason:void 0}),f={state:"running",startClocks:H(),profiler:i,timeoutId:C(m,c.collectIntervalMs),views:[],cleanupTasks:n,longTasks:[]},_(l),i.addEventListener("samplebufferfull",b)}async function v(e){if("running"!==e.state)return;A(e.timeoutId),e.profiler.removeEventListener("samplebufferfull",b);const{startClocks:r,views:o}=e;await e.profiler.stop().then((e=>{const s=H(),a=W(r.timeStamp,s.timeStamp),l=i.findLongTasks(r.relative,a),d=a<c.minProfileDurationMs,f=function(t){let e=0;for(const n of t)void 0!==n.stackId&&e++;return e}(e.samples)<c.minNumberOfSamples;0===l.length&&(d||f)||function(e){var r;const o=null===(r=n.findTrackedSession())||void 0===r?void 0:r.id,i=Il(e,t,o);u.send(i)}(Object.assign(e,{startClocks:r,endClocks:s,clocksOrigin:G(),longTasks:l,views:o,sampleInterval:c.sampleIntervalMs}))})).catch(E)}async function y(){"running"===f.state&&(f.cleanupTasks.forEach((t=>t())),await v(f))}function _(t){"running"===f.state&&t&&f.views.push(t)}function b(){m()}function w(){"hidden"===document.visibilityState&&"running"===f.state?async function(){"running"===f.state&&(await y(),f={state:"paused"})}().catch(E):"visible"===document.visibilityState&&"paused"===f.state&&m()}function S(){m()}return e.subscribe(9,(()=>{h("session-expired").catch(E)})),e.subscribe(10,(()=>{"stopped"===f.state&&"session-expired"===f.stateReason&&p()})),{start:p,stop:async function(){await h("stopped-by-user")},isStopped:function(){return"stopped"===f.state},isRunning:function(){return"running"===f.state},isPaused:function(){return"paused"===f.state}}}});