var Ze={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},vt=console,Yt={};Object.keys(Ze).forEach(function(t){Yt[t]=vt[t]});var de="Datadog Browser SDK:",T={debug:Yt.debug.bind(vt,de),log:Yt.log.bind(vt,de),info:Yt.info.bind(vt,de),warn:Yt.warn.bind(vt,de),error:Yt.error.bind(vt,de)},Qe="https://docs.datadoghq.com",sa="".concat(Qe,"/real_user_monitoring/browser/troubleshooting"),tr="More details:";function ua(t,e){return function(){for(var r=[],n=0;n=0&&t<=100}function Ce(t){return typeof t=="number"}var F=1e3,X=60*F,ca=60*X,uo=24*ca,da=365*uo;function er(t){return{relative:t,timeStamp:lo(t)}}function co(t){return{relative:Kr(t),timeStamp:t}}function lo(t){var e=Q()-performance.now();return e>Ie()?Math.round(te(e,t)):vo(t)}function fo(){return Math.round(Q()-te(Ie(),performance.now()))}function w(t){return Ce(t)?qe(t*1e6,0):t}function Q(){return new Date().getTime()}function D(){return Q()}function tt(){return performance.now()}function j(){return{relative:tt(),timeStamp:D()}}function la(){return{relative:0,timeStamp:Ie()}}function V(t,e){return e-t}function te(t,e){return t+e}function Kr(t){return t-Ie()}function vo(t){return Math.round(te(Ie(),t))}function po(t){return t=0;r-=1){var n=t[r];if(e(n,r,t))return n}}function _o(t,e){Array.prototype.forEach.call(t,e)}function va(t){return Object.keys(t).map(function(e){return t[e]})}function Xr(t){return Object.keys(t).map(function(e){return[e,t[e]]})}function Ae(t,e){return t.slice(0,e.length)===e}function bo(t,e){return t.slice(-e.length)===e}function E(t){for(var e=[],r=1;r>parseInt(t,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,H)}var Ye=/([\w-]+)\s*=\s*([^;]+)/g;function ye(t,e){for(Ye.lastIndex=0;;){var r=Ye.exec(t);if(r){if(r[1]===e)return r[2]}else break}}function To(t){var e=new Map;for(Ye.lastIndex=0;;){var r=Ye.exec(t);if(r)e.set(r[1],r[2]);else break}return e}function ma(t,e,r){r===void 0&&(r="");var n=t.charCodeAt(e-1),a=n>=55296&&n<=56319,i=a?e+1:e;return t.length<=i?t:"".concat(t.slice(0,i)).concat(r)}function Co(){return Jr()===0}function Io(){return Jr()===1}function Ao(){return Jr()===2}var De;function Jr(){return De??(De=Ro())}function Ro(t){var e;t===void 0&&(t=window);var r=t.navigator.userAgent;return t.chrome||/HeadlessChrome/.test(r)?1:((e=t.navigator.vendor)===null||e===void 0?void 0:e.indexOf("Apple"))===0||/safari/i.test(r)&&!/chrome|android/i.test(r)?2:t.document.documentMode?0:3}var rt;(function(t){t.WRITABLE_RESOURCE_GRAPHQL="writable_resource_graphql",t.REMOTE_CONFIGURATION="remote_configuration",t.LONG_ANIMATION_FRAME="long_animation_frame",t.ANONYMOUS_USER_TRACKING="anonymous_user_tracking",t.ACTION_NAME_MASKING="action_name_masking",t.CONSISTENT_TRACE_SAMPLING="consistent_trace_sampling",t.DELAY_VIEWPORT_COLLECTION="delay_viewport_collection"})(rt||(rt={}));var $r=new Set;function ko(t){Array.isArray(t)&&xo(t.filter(function(e){return Ke(rt,e)}))}function xo(t){t.forEach(function(e){$r.add(e)})}function pt(t){return $r.has(t)}function Oo(){return $r}function Re(t,e,r,n){r===void 0&&(r=0);var a=new Date;a.setTime(a.getTime()+r);var i="expires=".concat(a.toUTCString()),o=n&&n.crossSite?"none":"strict",s=n&&n.domain?";domain=".concat(n.domain):"",c=n&&n.secure?";secure":"",u=n&&n.partitioned?";partitioned":"";document.cookie="".concat(t,"=").concat(e,";").concat(i,";path=/;samesite=").concat(o).concat(s).concat(c).concat(u)}function Zr(t){return ye(document.cookie,t)}var _r;function _t(t){return _r||(_r=To(document.cookie)),_r.get(t)}function ga(t,e){Re(t,"",0,e)}function No(t){if(document.cookie===void 0||document.cookie===null)return!1;try{var e="dd_cookie_test_".concat(H()),r="test";Re(e,r,X,t);var n=Zr(e)===r;return ga(e,t),n}catch(a){return T.error(a),!1}}var br;function Lo(){if(br===void 0){for(var t="dd_site_test_".concat(H()),e="test",r=window.location.hostname.split("."),n=r.pop();r.length&&!Zr(t);)n="".concat(r.pop(),".").concat(n),Re(t,e,F,{domain:n});ga(t,{domain:n}),br=n}return br}var re="_dd_s";function Ct(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function _n(t){var e=E({},t),r=["id","name","email"];return r.forEach(function(n){n in e&&(e[n]=String(e[n]))}),e}function Mo(t){var e=Ct(t)==="object";return e||T.error("Unsupported user:",t),e}function Do(){return Math.floor(Math.random()*Math.pow(2,53)).toString(36)}var Ht=4*ca,_a=15*X,Po=da,Se={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},ba=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Qr="&";function Uo(t){return!!t&&(t.indexOf(Qr)!==-1||ba.test(t))}var Vo="1";function Lt(t){var e={isExpired:Vo};return pt(rt.ANONYMOUS_USER_TRACKING)&&(t?.anonymousId?e.anonymousId=t?.anonymousId:e.anonymousId=Do()),e}function He(t){return Vt(t)}function ya(t){return!He(t)}function We(t){return t.isExpired!==void 0||!Bo(t)}function Bo(t){return(t.created===void 0||Q()-Number(t.created)=rs){Sn(e);return}var u,l=c();if(a){if(l.lock){Pe(t,e,r);return}if(u=H(),s(l.session),l=c(),l.lock!==u){Pe(t,e,r);return}}var f=t.process(l.session);if(a&&(l=c(),l.lock!==u)){Pe(t,e,r);return}if(f&&(We(f)?o(f):(Sa(f),a?s(f):i(f))),a&&!(f&&We(f))){if(l=c(),l.lock!==u){Pe(t,e,r);return}i(l.session),f=l.session}(n=t.after)===null||n===void 0||n.call(t,f||l.session),Sn(e)}function Pe(t,e,r){U(function(){Mt(t,e,r+1)},es)}function Sn(t){Ge=void 0;var e=Ta.shift();e&&Mt(e,t)}var En=F;function ns(t){switch(t.sessionPersistence){case Se.COOKIE:return bn(t);case Se.LOCAL_STORAGE:return yn();case void 0:{var e=bn(t);return!e&&t.allowFallbackToLocalStorage&&(e=yn()),e}default:T.error("Invalid session persistence '".concat(String(t.sessionPersistence),"'"))}}function as(t,e,r){var n=new R,a=new R,i=new R,o=t.type===Se.COOKIE?Ko(t.cookieOptions):Zo(),s=o.expireSession,c=ee(p,En),u;g();var l=ht(function(){Mt({process:function(_){if(!He(_)){var N=h(_);return m(N),N}},after:function(_){ya(_)&&!b()&&B(_),u=_}},o)},En),f=l.throttled,d=l.cancel;function v(){Mt({process:function(_){return b()?h(_):void 0}},o)}function p(){Mt({process:function(_){return We(_)?Lt(_):void 0},after:h},o)}function h(_){return We(_)&&(_=Lt(_)),b()&&(I(_)?O():(i.notify({previousState:u,newState:_}),u=_)),_}function g(){Mt({process:function(_){if(He(_))return Lt(_)},after:function(_){u=_}},o)}function m(_){if(He(_))return!1;var N=r(_[e]),Rt=N.trackingType,P=N.isTracked;_[e]=Rt,delete _.isExpired,P&&!_.id&&(_.id=H(),_.created=String(Q()))}function b(){return u[e]!==void 0}function I(_){return u.id!==_.id||u[e]!==_[e]}function O(){u=Lt(u),a.notify()}function B(_){u=_,n.notify()}function A(_){Mt({process:function(N){return E({},N,_)},after:h},o)}return{expandOrRenewSession:f,expandSession:v,getSession:function(){return u},renewObservable:n,expireObservable:a,sessionStateUpdateObservable:i,restartSession:g,expire:function(){d(),s(u),h(Lt(u))},stop:function(){rr(c)},updateSessionState:A}}var zr={GRANTED:"granted",NOT_GRANTED:"not-granted"};function is(t){var e=new R;return{tryToInit:function(r){t||(t=r)},update:function(r){t=r,e.notify()},isGranted:function(){return t===zr.GRANTED},observable:e}}function Gt(t,e,r){if(typeof t!="object"||t===null)return JSON.stringify(t);var n=Wt(Object.prototype),a=Wt(Array.prototype),i=Wt(Object.getPrototypeOf(t)),o=Wt(t);try{return JSON.stringify(t,e,r)}catch{return""}finally{n(),a(),i(),o()}}function Wt(t){var e=t,r=e.toJSON;return r?(delete e.toJSON,function(){e.toJSON=r}):C}function en(t){return nr(t,location.href).href}function os(t){try{return!!nr(t)}catch{return!1}}function ss(t){var e=nr(t).pathname;return e[0]==="/"?e:"/".concat(e)}function nr(t,e){var r=us();if(r)try{return e!==void 0?new r(t,e):new r(t)}catch(o){throw new Error("Failed to construct URL: ".concat(String(o)," ").concat(Gt({url:t,base:e})))}if(e===void 0&&!/:/.test(t))throw new Error("Invalid URL: '".concat(t,"'"));var n=document,a=n.createElement("a");if(e!==void 0){n=document.implementation.createHTMLDocument("");var i=n.createElement("base");i.href=e,n.head.appendChild(i),n.body.appendChild(a)}return a.href=t,a}var wn=URL,Ue;function us(){if(Ue===void 0)try{var t=new wn("http://test/path");Ue=t.href==="http://test/path"}catch{Ue=!1}return Ue?wn:void 0}var Ca="datad0g.com",cs="dd0g-gov.com",Dt="datadoghq.com",ds="datadoghq.eu",ls="ddog-gov.com",fs="pci.browser-intake-datadoghq.com",vs=["ddsource","ddtags"];function me(t,e,r){var n=ps(t,e);return{build:function(a,i){var o=ms(t,e,r,a,i);return n(o)},urlPrefix:n(""),trackType:e}}function ps(t,e){var r="/api/v2/".concat(e),n=t.proxy;if(typeof n=="string"){var a=en(n);return function(o){return"".concat(a,"?ddforward=").concat(encodeURIComponent("".concat(r,"?").concat(o)))}}if(typeof n=="function")return function(o){return n({path:r,parameters:o})};var i=hs(e,t);return function(o){return"https://".concat(i).concat(r,"?").concat(o)}}function hs(t,e){var r=e.site,n=r===void 0?Dt:r,a=e.internalAnalyticsSubdomain;if(t==="logs"&&e.usePciIntake&&n===Dt)return fs;if(a&&n===Dt)return"".concat(a,".").concat(Dt);if(n===cs)return"http-intake.logs.".concat(n);var i=n.split("."),o=i.pop();return"browser-intake-".concat(i.join("-"),".").concat(o)}function ms(t,e,r,n,a){var i=t.clientToken,o=t.internalAnalyticsSubdomain,s=a.retry,c=a.encoding,u=["sdk_version:".concat("5.35.1"),"api:".concat(n)].concat(r);s&&u.push("retry_count:".concat(s.count),"retry_after:".concat(s.lastFailureStatus));var l=["ddsource=browser","ddtags=".concat(encodeURIComponent(u.join(","))),"dd-api-key=".concat(i),"dd-evp-origin-version=".concat(encodeURIComponent("5.35.1")),"dd-evp-origin=browser","dd-request-id=".concat(H())];return c&&l.push("dd-evp-encoding=".concat(c)),e==="rum"&&l.push("batch_time=".concat(D())),o&&l.reverse(),l.join("&")}var gs=200;function _s(t){var e=t.env,r=t.service,n=t.version,a=t.datacenter,i=[];return e&&i.push(Ve("env",e)),r&&i.push(Ve("service",r)),n&&i.push(Ve("version",n)),a&&i.push(Ve("datacenter",a)),i}function Ve(t,e){var r=gs-t.length-1;(e.length>r||bs(e))&&T.warn("".concat(t," value doesn't meet tag requirements and will be sanitized. ").concat(tr," ").concat(Qe,"/getting_started/tagging/#defining-tags"));var n=e.replace(/,/g,"_");return"".concat(t,":").concat(n)}function bs(t){return ys()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(t):!1}function ys(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}function Ss(t){var e=t.site||Dt,r=_s(t),n=Es(t,r),a=ws(t,r);return E({replica:a,site:e},n)}function Es(t,e){return{logsEndpointBuilder:me(t,"logs",e),rumEndpointBuilder:me(t,"rum",e),sessionReplayEndpointBuilder:me(t,"replay",e)}}function ws(t,e){if(t.replica){var r=E({},t,{site:Dt,clientToken:t.replica.clientToken}),n={logsEndpointBuilder:me(r,"logs",e),rumEndpointBuilder:me(r,"rum",e)};return E({applicationId:t.replica.applicationId},n)}}function Ts(t){return vs.every(function(e){return et(t,e)})}var ge={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"},Fr={ALL:"all",SAMPLED:"sampled"};function yr(t,e){return t!=null&&typeof t!="string"?(T.error("".concat(e," must be defined as a string")),!1):!0}function Cs(t){return t&&typeof t=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(t)?(T.error("Site should be a valid Datadog site. ".concat(tr," ").concat(Qe,"/getting_started/site/.")),!1):!0}function Xt(t,e){return t!==void 0&&!so(t)?(T.error("".concat(e," Sample Rate should be a number between 0 and 100")),!1):!0}function Is(t){var e,r,n,a,i;if(!t||!t.clientToken){T.error("Client Token is not configured, we will not send any data.");return}if(!(!Cs(t.site)||!Xt(t.sessionSampleRate,"Session")||!Xt(t.telemetrySampleRate,"Telemetry")||!Xt(t.telemetryConfigurationSampleRate,"Telemetry Configuration")||!Xt(t.telemetryUsageSampleRate,"Telemetry Usage")||!yr(t.version,"Version")||!yr(t.env,"Env")||!yr(t.service,"Service"))){if(t.trackingConsent!==void 0&&!Ke(zr,t.trackingConsent)){T.error('Tracking Consent should be either "granted" or "not-granted"');return}return E({beforeSend:t.beforeSend&&ua(t.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:ns(t),sessionSampleRate:(e=t.sessionSampleRate)!==null&&e!==void 0?e:100,telemetrySampleRate:(r=t.telemetrySampleRate)!==null&&r!==void 0?r:20,telemetryConfigurationSampleRate:(n=t.telemetryConfigurationSampleRate)!==null&&n!==void 0?n:5,telemetryUsageSampleRate:(a=t.telemetryUsageSampleRate)!==null&&a!==void 0?a:5,service:t.service||void 0,silentMultipleInit:!!t.silentMultipleInit,allowUntrustedEvents:!!t.allowUntrustedEvents,trackingConsent:(i=t.trackingConsent)!==null&&i!==void 0?i:zr.GRANTED,storeContextsAcrossPages:!!t.storeContextsAcrossPages,batchBytesLimit:16*yt,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*F,batchMessagesLimit:50,messageBytesLimit:256*yt},Ss(t))}}function As(t){return{session_sample_rate:t.sessionSampleRate,telemetry_sample_rate:t.telemetrySampleRate,telemetry_configuration_sample_rate:t.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:t.telemetryUsageSampleRate,use_before_send:!!t.beforeSend,use_cross_site_session_cookie:t.useCrossSiteSessionCookie,use_partitioned_cross_site_session_cookie:t.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:t.useSecureSessionCookie,use_proxy:!!t.proxy,silent_multiple_init:t.silentMultipleInit,track_session_across_subdomains:t.trackSessionAcrossSubdomains,session_persistence:t.sessionPersistence,allow_fallback_to_local_storage:!!t.allowFallbackToLocalStorage,store_contexts_across_pages:!!t.storeContextsAcrossPages,allow_untrusted_events:!!t.allowUntrustedEvents,tracking_consent:t.trackingConsent}}var ke="?";function It(t){var e=[],r=Sr(t,"stack"),n=String(t);return r&&Ae(r,n)&&(r=r.slice(n.length)),r&&r.split(` `).forEach(function(a){var i=xs(a)||Ns(a)||Ms(a)||Us(a);i&&(!i.func&&i.line&&(i.func=ke),e.push(i))}),{message:Sr(t,"message"),name:Sr(t,"name"),stack:e}}var Ia="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet||\\w+\\.|\\/).*?)",Qt="(?::(\\d+))",Rs=new RegExp("^\\s*at (.*?) ?\\(".concat(Ia).concat(Qt,"?").concat(Qt,"?\\)?\\s*$"),"i"),ks=new RegExp("\\((\\S*)".concat(Qt).concat(Qt,"\\)"));function xs(t){var e=Rs.exec(t);if(e){var r=e[2]&&e[2].indexOf("native")===0,n=e[2]&&e[2].indexOf("eval")===0,a=ks.exec(e[2]);return n&&a&&(e[2]=a[1],e[3]=a[2],e[4]=a[3]),{args:r?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||ke,line:e[3]?+e[3]:void 0,url:r?void 0:e[2]}}}var Os=new RegExp("^\\s*at ?".concat(Ia).concat(Qt,"?").concat(Qt,"??\\s*$"),"i");function Ns(t){var e=Os.exec(t);if(e)return{args:[],column:e[3]?+e[3]:void 0,func:ke,line:e[2]?+e[2]:void 0,url:e[1]}}var Ls=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Ms(t){var e=Ls.exec(t);if(e)return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||ke,line:+e[3],url:e[2]}}var Ds=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Ps=/(\S+) line (\d+)(?:> eval line \d+)*> eval/i;function Us(t){var e=Ds.exec(t);if(e){var r=e[3]&&e[3].indexOf("> eval")>-1,n=Ps.exec(e[3]);return r&&n&&(e[3]=n[1],e[4]=n[2],e[5]=void 0),{args:e[2]?e[2].split(","):[],column:e[5]?+e[5]:void 0,func:e[1]||ke,line:e[4]?+e[4]:void 0,url:e[3]}}}function Sr(t,e){if(!(typeof t!="object"||!t||!(e in t))){var r=t[e];return typeof r=="string"?r:void 0}}function Vs(t,e,r,n){var a=[{url:e,column:n,line:r}],i=zs(t),o=i.name,s=i.message;return{name:o,message:s,stack:a}}var Bs=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function zs(t){var e,r,n;return{}.toString.call(t)==="[object String]"&&(e=Bs.exec(t),r=e[1],n=e[2]),{name:r,message:n}}function Xe(){var t=2,e=new Error,r;if(!e.stack)try{throw e}catch{}return Bt(function(){var n=It(e);n.stack=n.stack.slice(t),r=ne(n)}),r}function ne(t){var e=Aa(t);return t.stack.forEach(function(r){var n=r.func==="?"?"":r.func,a=r.args&&r.args.length>0?"(".concat(r.args.join(", "),")"):"",i=r.line?":".concat(r.line):"",o=r.line&&r.column?":".concat(r.column):"";e+=` at `.concat(n).concat(a," @ ").concat(r.url).concat(i).concat(o)}),e}function Aa(t){return"".concat(t.name||"Error",": ").concat(t.message)}function Y(t,e,r,n){var a=n===void 0?{}:n,i=a.computeHandlingStack,o=t[e];if(typeof o!="function")if(e in t&&Ae(e,"on"))o=C;else return{stop:C};var s=!1,c=function(){if(s)return o.apply(this,arguments);var u=Wr(arguments),l;Bt(r,null,[{target:this,parameters:u,onPostCall:function(d){l=d},handlingStack:i?Xe():void 0}]);var f=o.apply(this,u);return l&&Bt(l,null,[f]),f};return t[e]=c,{stop:function(){s=!0,t[e]===c&&(t[e]=o)}}}function le(t,e,r){var n=Object.getOwnPropertyDescriptor(t,e);if(!n||!n.set||!n.configurable)return{stop:C};var a=C,i=function(s,c){U(function(){i!==a&&r(s,c)},0)},o=function(s){n.set.call(this,s),i(this,s)};return Object.defineProperty(t,e,{set:o}),{stop:function(){var s;((s=Object.getOwnPropertyDescriptor(t,e))===null||s===void 0?void 0:s.set)===o&&Object.defineProperty(t,e,n),i=a}}}var Fs=220*yt,Hs="$",Gs=3;function L(t,e){e===void 0&&(e=Fs);var r=Wt(Object.prototype),n=Wt(Array.prototype),a=[],i=new WeakMap,o=Er(t,Hs,void 0,a,i),s=JSON.stringify(o),c=s?s.length:0;if(c>e){wr(e,"discarded",t);return}for(;a.length>0&&ce){wr(e,"truncated",t);break}u.target[f]=d}else for(var f in u.source)if(Object.prototype.hasOwnProperty.call(u.source,f)){var d=Er(u.source[f],u.path,f,a,i);if(d!==void 0&&(c+=JSON.stringify(d).length+l+f.length+Gs,l=1),c>e){wr(e,"truncated",t);break}u.target[f]=d}}return r(),n(),o}function Er(t,e,r,n,a){var i=Ks(t);if(!i||typeof i!="object")return js(i);var o=qs(i);if(o!=="[Object]"&&o!=="[Array]"&&o!=="[Error]")return o;var s=t;if(a.has(s))return"[Reference seen at ".concat(a.get(s),"]");var c=r!==void 0?"".concat(e,".").concat(r):e,u=Array.isArray(i)?[]:{};return a.set(s,c),n.push({source:i,target:u,path:c}),u}function js(t){return typeof t=="bigint"?"[BigInt] ".concat(t.toString()):typeof t=="function"?"[Function] ".concat(t.name||"unknown"):typeof t=="symbol"?"[Symbol] ".concat(t.description||t.toString()):t}function qs(t){try{if(t instanceof Event)return{isTrusted:t.isTrusted};var e=Object.prototype.toString.call(t),r=e.match(/\[object (.*)\]/);if(r&&r[1])return"[".concat(r[1],"]")}catch{}return"[Unserializable]"}function Ks(t){var e=t;if(e&&typeof e.toJSON=="function")try{return e.toJSON()}catch{}return t}function wr(t,e,r){T.warn("The data provided has been ".concat(e," as it is over the limit of ").concat(t," characters:"),r)}var Ra="No stack, consider using an instance of Error";function ka(t){var e=t.stackTrace,r=t.originalError,n=t.handlingStack,a=t.startClocks,i=t.nonErrorPrefix,o=t.source,s=t.handling,c=At(r),u=Ys(e,c,i,r),l=Ws(c,e)?ne(e):Ra,f=c?Oa(r,o):void 0,d=e?e.name:void 0,v=xa(r);return{startClocks:a,source:o,handling:s,handlingStack:n,originalError:r,type:d,message:u,stack:l,causes:f,fingerprint:v}}function Ys(t,e,r,n){return t?.message&&t?.name?t.message:e?"Empty message":"".concat(r," ").concat(Gt(L(n)))}function Ws(t,e){return e===void 0?!1:t?!0:e.stack.length>0&&(e.stack.length>1||e.stack[0].url!==void 0)}function xa(t){return At(t)&&"dd_fingerprint"in t?String(t.dd_fingerprint):void 0}function At(t){return t instanceof Error||Object.prototype.toString.call(t)==="[object Error]"}function Oa(t,e){for(var r=t,n=[];At(r?.cause)&&n.length<10;){var a=It(r.cause);n.push({message:r.cause.message,source:e,type:a?.name,stack:a&&ne(a)}),r=r.cause}return n.length?n:void 0}var ae={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function Xs(t){var e=function(a,i){var o=ka({stackTrace:a,originalError:i,startClocks:j(),nonErrorPrefix:"Uncaught",source:ae.SOURCE,handling:"unhandled"});t.notify(o)},r=Js(e).stop,n=$s(e).stop;return{stop:function(){r(),n()}}}function Js(t){return Y(window,"onerror",function(e){var r=e.parameters,n=r[0],a=r[1],i=r[2],o=r[3],s=r[4],c;At(s)?c=It(s):c=Vs(n,a,i,o),t(c,s??n)})}function $s(t){return Y(window,"onunhandledrejection",function(e){var r=e.parameters[0],n=r.reason||"Empty reason",a=It(n);t(a,n)})}function Zs(t){var e=E({version:"5.35.1",onReady:function(r){r()}},t);return Object.defineProperty(e,"_setDebug",{get:function(){return wo},enumerable:!1}),e}function Qs(t,e,r){var n=t[e];n&&!n.q&&n.version&&T.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),t[e]=r,n&&n.q&&n.q.forEach(function(a){return ua(a,"onReady callback threw an error:")()})}function Na(t,e){e.silentMultipleInit||T.error("".concat(t," is already initialized."))}function x(t,e,r,n,a){return W(t,e,[r],n,a)}function W(t,e,r,n,a){var i=a===void 0?{}:a,o=i.once,s=i.capture,c=i.passive,u=y(function(p){!p.isTrusted&&!p.__ddIsTrusted&&!t.allowUntrustedEvents||(o&&v(),n(p))}),l=c?{capture:s,passive:c}:s,f=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,d=Et(f,"addEventListener");r.forEach(function(p){return d.call(e,p,u,l)});function v(){var p=Et(f,"removeEventListener");r.forEach(function(h){return p.call(e,h,u,l)})}return{stop:v}}var Ee={intervention:"intervention",cspViolation:"csp_violation"};function tu(t,e){var r=[];et(e,Ee.cspViolation)&&r.push(ru(t));var n=e.filter(function(a){return a!==Ee.cspViolation});return n.length&&r.push(eu(n)),ha.apply(void 0,r)}function eu(t){return new R(function(e){if(window.ReportingObserver){var r=y(function(a,i){return a.forEach(function(o){return e.notify(nu(o))})}),n=new window.ReportingObserver(r,{types:t,buffered:!0});return n.observe(),function(){n.disconnect()}}})}function ru(t){return new R(function(e){var r=x(t,document,"securitypolicyviolation",function(n){e.notify(au(n))}).stop;return r})}function nu(t){var e=t.type,r=t.body;return La({type:r.id,message:"".concat(e,": ").concat(r.message),originalError:t,stack:Ma(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)})}function au(t){var e="'".concat(t.blockedURI,"' blocked by '").concat(t.effectiveDirective,"' directive");return La({type:t.effectiveDirective,message:"".concat(Ee.cspViolation,": ").concat(e),originalError:t,csp:{disposition:t.disposition},stack:Ma(t.effectiveDirective,t.originalPolicy?"".concat(e,' of the policy "').concat(ma(t.originalPolicy,100,"..."),'"'):"no policy",t.sourceFile,t.lineNumber,t.columnNumber)})}function La(t){return E({startClocks:j(),source:ae.REPORT,handling:"unhandled"},t)}function Ma(t,e,r,n,a){return r?ne({name:t,message:e,stack:[{func:"?",url:r,line:n??void 0,column:a??void 0}]}):void 0}function rn(t,e){var r=window.__ddBrowserSdkExtensionCallback;r&&r({type:t,payload:e})}function Je(t,e,r){if(r===void 0&&(r=iu()),e===void 0)return t;if(typeof e!="object"||e===null)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){var n=e.flags||[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.sticky?"y":"",e.unicode?"u":""].join("");return new RegExp(e.source,n)}if(!r.hasAlreadyBeenSeen(e)){if(Array.isArray(e)){for(var a=Array.isArray(t)?t:[],i=0;i=0;return n||e.push(r),n}}}function Da(){var t,e=window.navigator;return{status:e.onLine?"connected":"not_connected",interfaces:e.connection&&e.connection.type?[e.connection.type]:void 0,effective_type:(t=e.connection)===null||t===void 0?void 0:t.effectiveType}}function Pa(t,e){var r=t.indexOf(e);r>=0&&t.splice(r,1)}var ou=500;function Ua(){var t=[],e=function(a){var i=t.push(a);i>ou&&t.splice(0,1)},r=function(a){Pa(t,a)},n=function(a){t.forEach(function(i){return i(a)}),t.length=0};return{add:e,remove:r,drain:n}}var Ut={log:"log",configuration:"configuration",usage:"usage"},su=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost",""],uu=[ls],Va=Ua(),ie=function(t){Va.add(function(){return ie(t)})};function cu(t,e){var r,n,a=new R,i=new Set,o=!et(uu,e.site)&&Pt(e.telemetrySampleRate),s=(r={},r[Ut.log]=o,r[Ut.configuration]=o&&Pt(e.telemetryConfigurationSampleRate),r[Ut.usage]=o&&Pt(e.telemetryUsageSampleRate),r),c=du();ie=function(l){var f=Gt(l);if(s[l.type]&&i.size0&&n[n.length-1].endTime=r&&n.pop(),n.unshift(p),p}function s(d,v){d===void 0&&(d=Be),v===void 0&&(v={returnInactive:!1});for(var p=0,h=n;p=500}function Tu(t){try{return t.clone()}catch{return}}var Cu=80*yt,Iu=32,Ba=3*fa,Au=X,za=F;function Fa(t,e,r,n,a){e.transportStatus===0&&e.queuedPayloads.size()===0&&e.bandwidthMonitor.canHandle(t)?Ga(t,e,r,{onSuccess:function(){return ja(0,e,r,n,a)},onFailure:function(){e.queuedPayloads.enqueue(t),Ha(e,r,n,a)}}):e.queuedPayloads.enqueue(t)}function Ha(t,e,r,n){t.transportStatus===2&&U(function(){var a=t.queuedPayloads.first();Ga(a,t,e,{onSuccess:function(){t.queuedPayloads.dequeue(),t.currentBackoffTime=za,ja(1,t,e,r,n)},onFailure:function(){t.currentBackoffTime=Math.min(Au,t.currentBackoffTime*2),Ha(t,e,r,n)}})},t.currentBackoffTime)}function Ga(t,e,r,n){var a=n.onSuccess,i=n.onFailure;e.bandwidthMonitor.add(t),r(t,function(o){e.bandwidthMonitor.remove(t),Ru(o)?(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:o.status},i()):(e.transportStatus=0,a())})}function ja(t,e,r,n,a){t===0&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(a({message:"Reached max ".concat(n," events size queued for upload: ").concat(Ba/fa,"MiB"),source:ae.AGENT,startClocks:j()}),e.queueFullReported=!0);var i=e.queuedPayloads;for(e.queuedPayloads=qa();i.size()>0;)Fa(i.dequeue(),e,r,n,a)}function Ru(t){return t.type!=="opaque"&&(t.status===0&&!navigator.onLine||t.status===408||t.status===429||wu(t.status))}function ku(){return{transportStatus:0,currentBackoffTime:za,bandwidthMonitor:xu(),queuedPayloads:qa(),queueFullReported:!1}}function qa(){var t=[];return{bytesCount:0,enqueue:function(e){this.isFull()||(t.push(e),this.bytesCount+=e.bytesCount)},first:function(){return t[0]},dequeue:function(){var e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size:function(){return t.length},isFull:function(){return this.bytesCount>=Ba}}}function xu(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(t){return this.ongoingRequestCount===0||this.ongoingByteCount+t.bytesCount<=cu&&this.ongoingrequestcount=a){T.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(a,"KB. ").concat(tr," ").concat(sa,"/#technical-limitations"));return}c(v)&&u(v),s(p,h,v)}function f(d){var v=va(i).join(` `);i={};var p=Wa(d.reason),h=p?r.sendOnExit:r.send;if(p&&e.isAsync){var g=e.finishSync();g.outputBytesCount&&h(Cn(g));var m=[g.pendingData,v].filter(Boolean).join(` `);m&&h({data:m,bytesCount:Yr(m)})}else v&&e.write(e.isEmpty?v:` `.concat(v)),e.finish(function(b){h(Cn(b))})}return{flushController:n,add:l,upsert:l,stop:o.unsubscribe}}function Cn(t){var e;return typeof t.output=="string"?e=t.output:e=new Blob([t.output],{type:"text/plain"}),{data:e,bytesCount:t.outputBytesCount,encoding:t.encoding}}function Vu(t){var e=t.messagesLimit,r=t.bytesLimit,n=t.durationLimit,a=t.pageExitObservable,i=t.sessionExpireObservable,o=a.subscribe(function(h){return f(h.reason)}),s=i.subscribe(function(){return f("session_expire")}),c=new R(function(){return function(){o.unsubscribe(),s.unsubscribe()}}),u=0,l=0;function f(h){if(l!==0){var g=l,m=u;l=0,u=0,p(),c.notify({reason:h,messagesCount:g,bytesCount:m})}}var d;function v(){d===void 0&&(d=U(function(){f("duration_limit")},n))}function p(){J(d),d=void 0}return{flushObservable:c,get messagesCount(){return l},notifyBeforeAddMessage:function(h){u+h>=r&&f("bytes_limit"),l+=1,u+=h,v()},notifyAfterAddMessage:function(h){h===void 0&&(h=0),u+=h,l>=e?f("messages_limit"):u>=r&&f("bytes_limit")},notifyAfterRemoveMessage:function(h){u-=h,l-=1,l===0&&p()}}}function Bu(t,e,r,n,a,i,o){o===void 0&&(o=Uu);var s=u(t,e),c=r&&u(t,r);function u(l,f){var d=f.endpoint,v=f.encoder;return o({encoder:v,request:Ka(d,l.batchBytesLimit,n),flushController:Vu({messagesLimit:l.batchMessagesLimit,bytesLimit:l.batchBytesLimit,durationLimit:l.flushTimeout,pageExitObservable:a,sessionExpireObservable:i}),messageBytesLimit:l.messageBytesLimit})}return{flushObservable:s.flushController.flushObservable,add:function(l,f){f===void 0&&(f=!0),s.add(l),c&&f&&c.add(r.transformMessage?r.transformMessage(l):l)},upsert:function(l,f){s.upsert(l,f),c&&c.upsert(r.transformMessage?r.transformMessage(l):l,f)},stop:function(){s.stop(),c&&c.stop()}}}function zu(){var t="",e=0;return{isAsync:!1,get isEmpty(){return!t},write:function(r,n){var a=Yr(r);e+=a,t+=r,n&&n(a)},finish:function(r){r(this.finishSync())},finishSync:function(){var r={output:t,outputBytesCount:e,rawBytesCount:e,pendingData:""};return t="",e=0,r},estimateEncodedBytesCount:function(r){return r.length}}}var Fu=(function(){function t(){this.callbacks={}}return t.prototype.notify=function(e,r){var n=this.callbacks[e];n&&n.forEach(function(a){return a(r)})},t.prototype.subscribe=function(e,r){var n=this;return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),{unsubscribe:function(){n.callbacks[e]=n.callbacks[e].filter(function(a){return r!==a})}}},t})();function Tr(t,e,r){var n=0,a=!1;return{isLimitReached:function(){if(n===0&&U(function(){n=0},X),n+=1,n<=e||a)return a=!1,!1;if(n===e+1){a=!0;try{r({message:"Reached max number of ".concat(t,"s by minute: ").concat(e),source:ae.AGENT,startClocks:j()})}finally{a=!1}}return!0}}}function an(t,e,r){if(document.readyState===e||document.readyState==="complete")return r(),{stop:C};var n=e==="complete"?"load":"DOMContentLoaded";return x(t,window,n,r,{once:!0})}var Cr,on=new WeakMap;function Hu(t){return Cr||(Cr=Gu(t)),Cr}function Gu(t){return new R(function(e){var r=Y(XMLHttpRequest.prototype,"open",ju).stop,n=Y(XMLHttpRequest.prototype,"send",function(i){qu(i,t,e)},{computeHandlingStack:!0}).stop,a=Y(XMLHttpRequest.prototype,"abort",Ku).stop;return function(){r(),n(),a()}})}function ju(t){var e=t.target,r=t.parameters,n=r[0],a=r[1];on.set(e,{state:"open",method:String(n).toUpperCase(),url:en(String(a))})}function qu(t,e,r){var n=t.target,a=t.handlingStack,i=on.get(n);if(i){var o=i;o.state="start",o.startClocks=j(),o.isAborted=!1,o.xhr=n,o.handlingStack=a;var s=!1,c=Y(n,"onreadystatechange",function(){n.readyState===XMLHttpRequest.DONE&&u()}).stop,u=function(){if(l(),c(),!s){s=!0;var f=i;f.state="complete",f.duration=V(o.startClocks.timeStamp,D()),f.status=n.status,r.notify(be(f))}},l=x(e,n,"loadend",u).stop;r.notify(o)}}function Ku(t){var e=t.target,r=on.get(e);r&&(r.isAborted=!0)}var Ir;function Xa(){return Ir||(Ir=Yu()),Ir}function Yu(){return new R(function(t){if(window.fetch){var e=Y(window,"fetch",function(r){return Wu(r,t)},{computeHandlingStack:!0}).stop;return e}})}function Wu(t,e){var r=t.parameters,n=t.onPostCall,a=t.handlingStack,i=r[0],o=r[1],s=o&&o.method;s===void 0&&i instanceof Request&&(s=i.method);var c=s!==void 0?String(s).toUpperCase():"GET",u=i instanceof Request?i.url:en(String(i)),l=j(),f={state:"start",init:o,input:i,method:c,startClocks:l,url:u,handlingStack:a};e.notify(f),r[0]=f.input,r[1]=f.init,n(function(d){return Xu(e,d,f)})}function Xu(t,e,r){var n=r;function a(i){n.state="resolve",E(n,i),t.notify(n)}e.then(y(function(i){a({response:i,responseType:i.type,status:i.status,isAborted:!1})}),y(function(i){var o,s;a({status:0,isAborted:((s=(o=n.init)===null||o===void 0?void 0:o.signal)===null||s===void 0?void 0:s.aborted)||i instanceof DOMException&&i.code===DOMException.ABORT_ERR,error:i})}))}function Ja(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){var r=window.requestIdleCallback(y(t),e);return function(){return window.cancelIdleCallback(r)}}return $u(t)}var Ju=50;function $u(t){var e=Q(),r=U(function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,Ju-(Q()-e))}})},0);return function(){return J(r)}}var Zu=F,Qu=30;function tc(){var t=[];function e(n){var a;if(n.didTimeout){var i=performance.now();a=function(){return Qu-(performance.now()-i)}}else a=n.timeRemaining.bind(n);for(;a()>0&&t.length;)t.shift()();t.length&&r()}function r(){Ja(e,{timeout:Zu})}return{push:function(n){t.push(n)===1&&r()}}}var Ar={};function ec(t){var e=t.map(function(r){return Ar[r]||(Ar[r]=rc(r)),Ar[r]});return ha.apply(void 0,e)}function rc(t){return new R(function(e){var r=vt[t];return vt[t]=function(){for(var n=[],a=0;ai&&(fc(i),r=!0)}}return{createDetachedTracker:function(){var a=An(function(){return n(a.getBytesCount())});return a},getOrCreateTracker:function(a){return e.has(a)||e.set(a,An(n)),e.get(a)},setCompressionStatus:function(a){t===0&&(t=a,n())},getCompressionStatus:function(){return t},stop:function(){e.forEach(function(a){return a.stop()}),e.clear()}}}function An(t){var e=0,r=ht(function(o){e=Yr(Gt(o)),t()},dc),n=r.throttled,a=r.cancel,i=function(){a(),e=0};return{updateCustomerData:function(o){Vt(o)?i():n(o)},resetCustomerData:i,getBytesCount:function(){return e},stop:function(){a()}}}function fc(t){T.warn("Customer data exceeds the recommended ".concat(t/yt,"KiB threshold. ").concat(tr," ").concat(sa,"/#customer-data-exceeds-the-recommended-threshold-warning"))}function vc(t,e,r){var n=t.getReader(),a=0;i();function i(){n.read().then(y(function(s){if(s.done){o();return}a+=s.value.length,a>r.bytesLimit?o():i()}),y(function(s){return e(s)}))}function o(){n.cancel().catch(C);var s,c;e(void 0,s,c)}}var pc="datadog-synthetics-public-id",hc="datadog-synthetics-result-id",mc="datadog-synthetics-injects-rum";function $a(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||_t(mc))}function gc(){var t=window._DATADOG_SYNTHETICS_PUBLIC_ID||_t(pc);return typeof t=="string"?t:void 0}function _c(){var t=window._DATADOG_SYNTHETICS_RESULT_ID||_t(hc);return typeof t=="string"?t:void 0}function sn(t){var e=Ct(t);return e==="string"||e==="function"||t instanceof RegExp}function Za(t,e,r){return r===void 0&&(r=!1),t.some(function(n){try{if(typeof n=="function")return n(e);if(n instanceof RegExp)return n.test(e);if(typeof n=="string")return r?Ae(e,n):n===e}catch(a){T.error(a)}return!1})}function bc(t,e,r){return{context:t.getContext(),user:e.getContext(),hasReplay:r.isRecording()?!0:void 0}}function yc(){var t=new Map,e=new WeakMap;return{vitalsByName:t,vitalsByReference:e}}function Sc(t,e,r){function n(i){return!e.wasInPageStateDuringPeriod("frozen",i.startClocks.relative,i.duration)}function a(i){n(i)&&t.notify(12,wc(i))}return{addDurationVital:a,startDurationVital:function(i,o){return o===void 0&&(o={}),Qa(r,i,o)},stopDurationVital:function(i,o){o===void 0&&(o={}),ti(a,r,i,o)}}}function Qa(t,e,r){var n=t.vitalsByName,a=t.vitalsByReference;r===void 0&&(r={});var i={name:e,startClocks:j(),context:r.context,description:r.description},o={__dd_vital_reference:!0};return n.set(e,i),a.set(o,i),o}function ti(t,e,r,n){var a=e.vitalsByName,i=e.vitalsByReference;n===void 0&&(n={});var o=typeof r=="string"?a.get(r):i.get(r);o&&(t(Ec(o,o.startClocks,n,j())),typeof r=="string"?a.delete(r):i.delete(r))}function Ec(t,e,r,n){var a;return{name:t.name,type:"duration",startClocks:e,duration:V(e.timeStamp,n.timeStamp),context:ut(t.context,r.context),description:(a=r.description)!==null&&a!==void 0?a:t.description}}function wc(t,e){var r={date:t.startClocks.timeStamp,vital:{id:H(),type:t.type,name:t.name,duration:w(t.duration),description:t.description},type:"vital"};return r._dd={vital:{computed_value:!0}},{rawRumEvent:r,startTime:t.startClocks.relative,customerContext:t.context,domainContext:{}}}function ei(){return window.crypto||window.msCrypto}function Tc(){return ni(64)}function ri(){return ni(63)}var Rr;function ni(t){return Rr||(Rr=pt(rt.CONSISTENT_TRACE_SAMPLING)&&Cc()?Ic:Ac),Rr(t)}function Cc(){try{return crypto.getRandomValues(new BigUint64Array(1)),!0}catch{return!1}}function Ic(t){var e=crypto.getRandomValues(new BigUint64Array(1))[0];return t===63&&(e>>=BigInt("1")),e}function Ac(t){var e=ei().getRandomValues(new Uint32Array(2));return t===63&&(e[e.length-1]>>>=1),{toString:function(r){r===void 0&&(r=10);var n=e[1],a=e[0],i="";do{var o=n%r*4294967296+a;n=Math.floor(n/r),a=Math.floor(o/r),i=(o%r).toString(r)+i}while(n||a);return i}}}function jt(t){var e=t.toString(16);return Array(17-e.length).join("0")+e}function Rc(t,e){if(e===100)return!0;if(e===0)return!1;if(typeof t!="bigint")return Pt(e);var r=BigInt("1111111111111111111"),n=BigInt("0x10000000000000000"),a=t*r%n;return Number(a)<=e/100*number(n)}function kc(t){var e=t;return Ct(e)==="object"&&sn(e.match)&&Array.isArray(e.propagatorTypes)}function xc(t){t.status===0&&!t.isAborted&&(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function Oc(t,e){return{clearTracingIfNeeded:xc,traceFetch:function(r){return Rn(t,r,e,function(n){var a;if(r.input instanceof Request&&!(!((a=r.init)===null||a===void 0)&&a.headers))r.input=new Request(r.input),Object.keys(n).forEach(function(o){r.input.headers.append(o,n[o])});else{r.init=be(r.init);var i=[];r.init.headers instanceof Headers?r.init.headers.forEach(function(o,s){i.push([s,o])}):Array.isArray(r.init.headers)?r.init.headers.forEach(function(o){i.push(o)}):r.init.headers&&Object.keys(r.init.headers).forEach(function(o){i.push([o,r.init.headers[o]])}),r.init.headers=i.concat(Xr(n))}})},traceXhr:function(r,n){return Rn(t,r,e,function(a){Object.keys(a).forEach(function(i){n.setRequestHeader(i,a[i])})})}}}function Rn(t,e,r,n){if(!(!Nc()||!r.findTrackedSession())){var a=St(t.allowedTracingUrls,function(s){return Za([s.match],e.url,!0)});if(a){var i=Tc();e.traceSampled=Rc(i,t.traceSampleRate);var o=e.traceSampled||t.traceContextInjection===Fr.ALL;o&&(e.traceId=i,e.spanId=ri(),n(Lc(e.traceId,e.spanId,e.traceSampled,a.propagatorTypes)))}}}function Nc(){return ei()!==void 0}function Lc(t,e,r,n){var a={};return n.forEach(function(i){switch(i){case"datadog":{E(a,{"x-datadog-origin":"rum","x-datadog-parent-id":e.toString(),"x-datadog-sampling-priority":r?"1":"0","x-datadog-trace-id":t.toString()});break}case"tracecontext":{E(a,{traceparent:"00-0000000000000000".concat(jt(t),"-").concat(jt(e),"-0").concat(r?"1":"0")});break}case"b3":{E(a,{b3:"".concat(jt(t),"-").concat(jt(e),"-").concat(r?"1":"0")});break}case"b3multi":{E(a,{"X-B3-TraceId":jt(t),"X-B3-SpanId":jt(e),"X-B3-Sampled":r?"1":"0"});break}}}),a}var ai=["tracecontext","datadog"];function Mc(t){var e,r,n;if(!t.applicationId){T.error("Application ID is not configured, no RUM data will be collected.");return}if(!(!Xt(t.sessionReplaySampleRate,"Session Replay")||!Xt(t.traceSampleRate,"Trace"))){if(t.excludedActivityUrls!==void 0&&!Array.isArray(t.excludedActivityUrls)){T.error("Excluded Activity Urls should be an array");return}var a=Dc(t);if(a){var i=Is(t);if(i){var o=(e=t.sessionReplaySampleRate)!==null&&e!==void 0?e:0;return E({applicationId:t.applicationId,version:t.version||void 0,actionNameAttribute:t.actionNameAttribute,sessionReplaySampleRate:o,startSessionReplayRecordingManually:t.startSessionReplayRecordingManually!==void 0?!!t.startSessionReplayRecordingManually:o===0,traceSampleRate:(r=t.traceSampleRate)!==null&&r!==void 0?r:100,rulePsr:Ce(t.traceSampleRate)?t.traceSampleRate/100:void 0,allowedTracingUrls:a,excludedActivityUrls:(n=t.excludedActivityUrls)!==null&&n!==void 0?n:[],workerUrl:t.workerUrl,compressIntakeRequests:!!t.compressIntakeRequests,trackUserInteractions:!!t.trackUserInteractions,trackViewsManually:!!t.trackViewsManually,trackResources:!!t.trackResources,trackLongTasks:!!t.trackLongTasks,subdomain:t.subdomain,defaultPrivacyLevel:Ke(ge,t.defaultPrivacyLevel)?t.defaultPrivacyLevel:ge.MASK,enablePrivacyForActionName:!!t.enablePrivacyForActionName,customerDataTelemetrySampleRate:1,traceContextInjection:Ke(Fr,t.traceContextInjection)?t.traceContextInjection:Fr.ALL,plugins:t.plugins||[]},i)}}}}function Dc(t){if(t.allowedTracingUrls===void 0)return[];if(!Array.isArray(t.allowedTracingUrls)){T.error("Allowed Tracing URLs should be an array");return}if(t.allowedTracingUrls.length!==0&&t.service===void 0){T.error("Service needs to be configured when tracing is enabled");return}var e=[];return t.allowedTracingUrls.forEach(function(r){sn(r)?e.push({match:r,propagatorTypes:ai}):kc(r)?e.push(r):T.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",r)}),e}function Pc(t){var e=new Set;return Array.isArray(t.allowedTracingUrls)&&t.allowedTracingUrls.length>0&&t.allowedTracingUrls.forEach(function(r){sn(r)?ai.forEach(function(n){return e.add(n)}):Ct(r)==="object"&&Array.isArray(r.propagatorTypes)&&r.propagatorTypes.forEach(function(n){return e.add(n)})}),Wr(e)}function Uc(t){var e,r=As(t);return E({session_replay_sample_rate:t.sessionReplaySampleRate,start_session_replay_recording_manually:t.startSessionReplayRecordingManually,trace_sample_rate:t.traceSampleRate,trace_context_injection:t.traceContextInjection,action_name_attribute:t.actionNameAttribute,use_allowed_tracing_urls:Array.isArray(t.allowedTracingUrls)&&t.allowedTracingUrls.length>0,selected_tracing_propagators:Pc(t),default_privacy_level:t.defaultPrivacyLevel,enable_privacy_for_action_name:t.enablePrivacyForActionName,use_excluded_activity_urls:Array.isArray(t.excludedActivityUrls)&&t.excludedActivityUrls.length>0,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,plugins:(e=t.plugins)===null||e===void 0?void 0:e.map(function(n){var a;return E({name:n.name},(a=n.getConfigurationTelemetry)===null||a===void 0?void 0:a.call(n))})},r)}var Vc="https://d3uc069fcn7uxw.cloudfront.net/configuration";function Bc(t,e){Fc(t,function(r){e(zc(t,r))})}function zc(t,e){return E({},t,e)}function Fc(t,e){var r=new XMLHttpRequest;x(t,r,"load",function(){r.status===200?e(JSON.parse(r.responseText)):kn()}),x(t,r,"error",function(){kn()}),r.open("GET","".concat(Vc,"/").concat(encodeURIComponent(t.remoteConfigurationId),".json")),r.send()}function kn(){T.error("Error fetching the remote configuration.")}function Hc(t,e,r){if(t)for(var n=0,a=t;nt[r])return!1;return!0}function ud(t){return t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch"}function cd(t){var e=t.duration,r=t.startTime,n=t.responseEnd;return e===0&&r=0}function di(t){var e=Nn(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd),r=ld(t)?Nn(t.startTime,t.redirectStart,t.redirectEnd,t.fetchStart):!0;return e&&r}function ld(t){return t.redirectEnd>t.startTime}function Ot(t,e,r){if(t<=e&&e<=r)return{duration:w(v(e,r)),start:w(v(t,e))}}function li(t){return t.nextHopProtocol===""?void 0:t.nextHopProtocol}function fi(t){return t.deliveryType===""?"other":t.deliveryType}function fd(t){if(t.startTime=0&&c0&&r.notify(l)},a,i=!0,o=new PerformanceObserver(y(function(u){i?a=U(function(){return n(u.getEntries())}):n(u.getEntries())}));try{o.observe(e)}catch{var s=[k.RESOURCE,k.NAVIGATION,k.LONG_TASK,k.PAINT];if(et(s,e.type)){e.buffered&&(a=U(function(){return n(performance.getEntriesByType(e.type))}));try{o.observe({entryTypes:[e.type]})}catch{return}}}i=!1,bd(t);var c;return!ar(k.FIRST_INPUT)&&e.type===k.FIRST_INPUT&&(c=_d(t,function(u){n([u])}).stop),function(){o.disconnect(),c&&c(),J(a)}}})}var fe;function bd(t){return!fe&&yd()&&"addEventListener"in performance&&(fe=x(t,performance,"resourcetimingbufferfull",function(){performance.clearResourceTimings()})),function(){fe?.stop()}}function yd(){return window.performance!==void 0&&"getEntries"in performance}function ar(t){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(t)}function Sd(t){return t.filter(function(e){return!Ed(e)})}function Ed(t){return t.entryType===k.RESOURCE&&(!un(t.name)||!ci(t))}var _i=100,wd=100;function cn(t,e,r,n,a,i){var o=Cd(t,e,r,n);return Td(o,a,i)}function Td(t,e,r){var n,a=!1,i=U(y(function(){return u({hadActivity:!1})}),_i),o=r!==void 0?U(y(function(){return u({hadActivity:!0,end:D()})}),r):void 0,s=t.subscribe(function(l){var f=l.isBusy;J(i),J(n);var d=D();f||(n=U(y(function(){return u({hadActivity:!0,end:d})}),wd))}),c=function(){a=!0,J(i),J(n),J(o),s.unsubscribe()};function u(l){a||(c(),e(l))}return{stop:c}}function Cd(t,e,r,n){return new R(function(a){var i=[],o,s=0;return i.push(e.subscribe(c),r.subscribe(c),ct(n,{type:k.RESOURCE}).subscribe(function(u){u.some(function(l){return!xr(n,l.name)})&&c()}),t.subscribe(7,function(u){xr(n,u.url)||(o===void 0&&(o=u.requestIndex),s+=1,c())}),t.subscribe(8,function(u){xr(n,u.url)||o===void 0||u.requestIndex0})}})}function xr(t,e){return Za(t.excludedActivityUrls,e)}function wt(t){return window.CSS&&window.CSS.escape?window.CSS.escape(t):t.replace(/([0円-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(e,r){return r?e==="0円"?"�":"".concat(e.slice(0,-1),"\\").concat(e.charCodeAt(e.length-1).toString(16)," "):"\\".concat(e)})}function Jt(t,e){return t.matches?t.matches(e):t.msMatchesSelector?t.msMatchesSelector(e):!1}function xe(t){if(t.parentElement)return t.parentElement;for(;t.parentNode;){if(t.parentNode.nodeType===Node.ELEMENT_NODE)return t.parentNode;t=t.parentNode}return null}function Id(t){if(t.classList)return t.classList;var e=(t.getAttribute("class")||"").trim();return e?e.split(/\s+/):[]}var Dn=1,Ad=(function(){function t(e){var r=this;this.map=new WeakMap,e&&e.forEach(function(n){return r.map.set(n,Dn)})}return t.prototype.add=function(e){return this.map.set(e,Dn),this},t.prototype.delete=function(e){return this.map.delete(e)},t.prototype.has=function(e){return this.map.has(e)},t})();function bi(t){return t.nodeType===Node.TEXT_NODE}function Rd(t){return t.nodeType===Node.COMMENT_NODE}function ce(t){return t.nodeType===Node.ELEMENT_NODE}function ir(t){return ce(t)&&!!t.shadowRoot}function dn(t){var e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&ce(e.host)}function kd(t){return t.childNodes.length>0||ir(t)}function yi(t,e){for(var r=t.firstChild;r;)e(r),r=r.nextSibling;ir(t)&&e(t.shadowRoot)}function or(t){return dn(t)?t.host:t.parentNode}var S={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:ge.ALLOW,MASK:ge.MASK,MASK_USER_INPUT:ge.MASK_USER_INPUT},ln="data-dd-privacy",xd="hidden",Od="dd-privacy-",bt="***",Pn="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",Nd={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},Ld="x";function dt(t,e,r){if(r&&r.has(t))return r.get(t);var n=or(t),a=n?dt(n,e,r):e,i=Ei(t),o=Si(i,a);return r&&r.set(t,o),o}function Si(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.HIDDEN:case S.IGNORE:return t;default:return e}}function Ei(t){if(ce(t)){if(t.tagName==="BASE")return S.ALLOW;if(t.tagName==="INPUT"){var e=t;if(e.type==="password"||e.type==="email"||e.type==="tel"||e.type==="hidden")return S.MASK;var r=e.getAttribute("autocomplete");if(r&&(r.startsWith("cc-")||r.endsWith("-password")))return S.MASK}if(Jt(t,$t(S.HIDDEN)))return S.HIDDEN;if(Jt(t,$t(S.MASK)))return S.MASK;if(Jt(t,$t(S.MASK_USER_INPUT)))return S.MASK_USER_INPUT;if(Jt(t,$t(S.ALLOW)))return S.ALLOW;if(Dd(t))return S.IGNORE}}function sr(t,e){switch(e){case S.MASK:case S.HIDDEN:case S.IGNORE:return!0;case S.MASK_USER_INPUT:return bi(t)?Un(t.parentNode):Un(t);default:return!1}}function Un(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;var e=t;if(e.tagName==="INPUT")switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!Nd[e.tagName]}var Md=function(t){return t.replace(/\S/g,Ld)};function wi(t,e,r){var n,a=(n=t.parentElement)===null||n===void 0?void 0:n.tagName,i=t.textContent||"";if(!(e&&!i.trim())){var o=r,s=a==="SCRIPT";if(s)i=bt;else if(o===S.HIDDEN)i=bt;else if(sr(t,o))if(a==="DATALIST"||a==="SELECT"||a==="OPTGROUP"){if(!i.trim())return}else a==="OPTION"?i=bt:i=Md(i);return i}}function Dd(t){if(t.nodeName==="SCRIPT")return!0;if(t.nodeName==="LINK"){var e=a("rel");return/preload|prefetch/i.test(e)&&a("as")==="script"||e==="shortcut icon"||e==="icon"}if(t.nodeName==="META"){var r=a("name"),e=a("rel"),n=a("property");return/^msapplication-tile(image|color)$/.test(r)||r==="application-name"||e==="icon"||e==="apple-touch-icon"||e==="shortcut icon"||r==="keywords"||r==="description"||/^(og|twitter|fb):/.test(n)||/^(og|twitter):/.test(r)||r==="pinterest"||r==="robots"||r==="googlebot"||r==="bingbot"||t.hasAttribute("http-equiv")||r==="author"||r==="generator"||r==="framework"||r==="publisher"||r==="progid"||/^article:/.test(n)||/^product:/.test(n)||r==="google-site-verification"||r==="yandex-verification"||r==="csrf-token"||r==="p:domain_verify"||r==="verify-v1"||r==="verification"||r==="shopify-checkout-api-token"}function a(i){return(t.getAttribute(i)||"").toLowerCase()}return!1}function $t(t){return"[".concat(ln,'="').concat(t,'"], .').concat(Od).concat(t)}var fn="data-dd-action-name",Pd="Masked Element";function Ud(t,e,r){var n=e.enablePrivacyForActionName,a=e.actionNameAttribute,i=Vn(t,fn)||a&&Vn(t,a);return i?{name:i,nameSource:"custom_attribute"}:r===S.MASK?{name:Pd,nameSource:"mask_placeholder"}:Bn(t,a,Vd,n)||Bn(t,a,Bd,n)||{name:"",nameSource:"blank"}}function Vn(t,e){var r;if(jd())r=t.closest("[".concat(e,"]"));else for(var n=t;n;){if(n.hasAttribute(e)){r=n;break}n=xe(n)}if(r){var a=r.getAttribute(e);return Ci(Ti(a.trim()))}}var Vd=[function(t,e,r){if(Gd()){if("labels"in t&&t.labels&&t.labels.length>0)return he(t.labels[0],e)}else if(t.id){var n=t.ownerDocument&&St(t.ownerDocument.querySelectorAll("label"),function(a){return a.htmlFor===t.id});return n&&he(n,e,r)}},function(t){if(t.nodeName==="INPUT"){var e=t,r=e.getAttribute("type");if(r==="button"||r==="submit"||r==="reset")return{name:e.value,nameSource:"text_content"}}},function(t,e,r){if(t.nodeName==="BUTTON"||t.nodeName==="LABEL"||t.getAttribute("role")==="button")return he(t,e,r)},function(t){return ve(t,"aria-label")},function(t,e,r){var n=t.getAttribute("aria-labelledby");if(n)return{name:n.split(/\s+/).map(function(a){return Fd(t,a)}).filter(function(a){return!!a}).map(function(a){return Ii(a,e,r)}).join(" "),nameSource:"text_content"}},function(t){return ve(t,"alt")},function(t){return ve(t,"name")},function(t){return ve(t,"title")},function(t){return ve(t,"placeholder")},function(t,e){if("options"in t&&t.options.length>0)return he(t.options[0],e)}],Bd=[function(t,e,r){return he(t,e,r)}],zd=10;function Bn(t,e,r,n){for(var a=t,i=0;i<=zd&&a&&a.nodename!=="body"&&a.nodename!=="html"&&a.nodename!=="head";){for(var o=0,s=r;o100?"".concat(ma(t,100)," [...]"):t}function Fd(t,e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}function ve(t,e){return{name:t.getAttribute(e)||"",nameSource:"standard_attribute"}}function he(t,e,r){return{name:Ii(t,e,r)||"",nameSource:"text_content"}}function Ii(t,e,r){if(!t.isContentEditable){if("innerText"in t){var n=t.innerText,a=function(i){for(var o=t.querySelectorAll(i),s=0;s0&&(n=n.replace(u,""))}}};return Hd()||a("script, style"),a("[".concat(fn,"]")),e&&a("[".concat(e,"]")),r&&a("".concat($t(S.HIDDEN),", ").concat($t(S.MASK))),n}return t.textContent}}function Hd(){return!Co()}var Or;function Gd(){return Or===void 0&&(Or="labels"in HTMLInputElement.prototype),Or}var Nr;function jd(){return Nr===void 0&&(Nr="closest"in HTMLElement.prototype),Nr}var Ai=[fn,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],qd=[ki,Yd],Kd=[ki,Wd,Xd];function Oe(t,e){if(tl(t)){for(var r,n=t;n&&n.nodeName!=="HTML";){var a=zn(n,qd,$d,e,r);if(a)return a;var i=zn(n,Kd,Zd,e,r);r=i||we(Jd(n),r),n=xe(n)}return r}}function Ri(t){return/[0-9]/.test(t)}function Yd(t){if(t.id&&!Ri(t.id))return"#".concat(wt(t.id))}function Wd(t){if(t.tagName!=="BODY")for(var e=Id(t),r=0;r").concat(e):t}var ze;function Qd(){if(ze===void 0)try{document.querySelector(":scope"),ze=!0}catch{ze=!1}return ze}function tl(t){return"isConnected"in t?t.isConnected:t.ownerDocument.documentElement.contains(t)}var xi=F,el=100;function rl(t,e){var r=[],n=0,a;i(t);function i(c){c.stopObservable.subscribe(o),r.push(c),J(a),a=U(s,xi)}function o(){n===1&&r.every(function(c){return c.isStopped()})&&(n=2,e(r))}function s(){J(a),n===0&&(n=1,o())}return{tryAppend:function(c){return n!==0?!1:r.length>0&&!nl(r[r.length-1].event,c.event)?(s(),!1):(i(c),!0)},stop:function(){s()}}}function nl(t,e){return t.target===e.target&&al(t,e)<=el&&t.timestamp-e.timestamp<=xi}function al(t,e){return Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2))}function il(t,e){var r=e.onPointerDown,n=e.onPointerUp,a,i={selection:!1,input:!1,scroll:!1},o,s=[x(t,window,"pointerdown",function(c){Hn(c)&&(a=Fn(),i={selection:!1,input:!1,scroll:!1},o=r(c))},{capture:!0}),x(t,window,"selectionchange",function(){(!a||!Fn())&&(i.selection=!0)},{capture:!0}),x(t,window,"scroll",function(){i.scroll=!0},{capture:!0,passive:!0}),x(t,window,"pointerup",function(c){if(Hn(c)&&o){var u=i;n(o,c,function(){return u}),o=void 0}},{capture:!0}),x(t,window,"input",function(){i.input=!0},{capture:!0})];return{stop:function(){s.forEach(function(c){return c.stop()})}}}function Fn(){var t=window.getSelection();return!t||t.isCollapsed}function Hn(t){return t.target instanceof Element&&t.isPrimary!==!1}var Gn=3;function ol(t,e){if(sl(t))return e.addFrustration("rage_click"),t.some(jn)&&e.addFrustration("dead_click"),e.hasError&&e.addFrustration("error_click"),{isRage:!0};var r=t.some(function(n){return n.getUserActivity().selection});return t.forEach(function(n){n.hasError&&n.addFrustration("error_click"),jn(n)&&!r&&n.addFrustration("dead_click")}),{isRage:!1}}function sl(t){if(t.some(function(r){return r.getUserActivity().selection||r.getUserActivity().scroll}))return!1;for(var e=0;eOi&&_e.delete(n)})}var dl=5*X;function ll(t,e,r,n){var a=se({expireDelay:dl}),i=new R,o;t.subscribe(10,function(){a.reset()}),t.subscribe(5,l);var s=il(n,{onPointerDown:function(f){return fl(n,t,e,f,r)},onPointerUp:function(f,d,v){var p=f.clickActionBase,h=f.hadActivityOnPointerDown;vl(n,t,e,r,a,i,u,p,d,v,h)}}).stop,c={findActionId:function(f){return a.findAll(f)}};return{stop:function(){l(),i.notify(),s()},actionContexts:c};function u(f){if(!o||!o.tryAppend(f)){var d=f.clone();o=rl(f,function(v){hl(v,d)})}}function l(){o&&o.stop()}}function fl(t,e,r,n,a){var i=t.enablePrivacyForActionName?dt(n.target,t.defaultPrivacyLevel):S.ALLOW;if(i!==S.HIDDEN){var o=pl(n,i,t),s=!1;return cn(e,r,a,t,function(c){s=c.hadActivity},_i),{clickActionBase:o,hadActivityOnPointerDown:function(){return s}}}}function vl(t,e,r,n,a,i,o,s,c,u,l){var f,d=Li(e,a,u,s,c);o(d);var v=(f=s?.target)===null||f===void 0?void 0:f.selector;v&&Ni(c.timeStamp,v);var p=cn(e,r,n,t,function(m){m.hadActivity&&m.end0},get hasPageActivity(){return l!==void 0},getUserActivity:r,addFrustration:function(p){f.push(p)},startClocks:o,isStopped:function(){return u===1||u===2},clone:function(){return Li(t,e,r,n,a)},validate:function(p){if(v(),u===1){var h=c.eventCounts,g=h.resourceCount,m=h.errorCount,b=h.longTaskCount,I=E({type:"click",duration:l&&V(o.timeStamp,l),startClocks:o,id:i,frustrationTypes:f,counts:{resourceCount:g,errorCount:m,longTaskCount:b},events:p??[a],event:a},n);t.notify(0,I),u=2}},discard:function(){v(),u=2}}}function hl(t,e){var r=ol(t,e).isRage;r?(t.forEach(function(n){return n.discard()}),e.stop(D()),e.validate(t.map(function(n){return n.event}))):(e.discard(),t.forEach(function(n){return n.validate()}))}function ml(t,e,r,n,a){var i;t.subscribe(0,function(c){return t.notify(12,qn(c,a))});var o={findActionId:C},s=C;return n.trackUserInteractions&&(i=ll(t,e,r,n),o=i.actionContexts,s=i.stop),{addAction:function(c,u){t.notify(12,E({savedCommonContext:u},qn(c,a)))},actionContexts:o,stop:s}}function qn(t,e){var r=Fe(t)?{action:{id:t.id,loading_time:mi(w(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:pt(rt.ACTION_NAME_MASKING)?t.nameSource:void 0}}}:void 0,n=Fe(t)?void 0:t.context,a=ut({action:{id:H(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:"action",view:{in_foreground:e.wasInPageStateAt("active",t.startClocks.relative)}},r),i=Fe(t)?{events:t.events}:{};return!Fe(t)&&t.handlingStack&&(i.handlingStack=t.handlingStack),{customerContext:n,rawRumEvent:a,startTime:t.startClocks.relative,domainContext:i}}function Fe(t){return t.type!=="custom"}function gl(t){var e=ec([Ze.error]).subscribe(function(r){return t.notify(r.error)});return{stop:function(){e.unsubscribe()}}}function _l(t,e){var r=tu(t,[Ee.cspViolation,Ee.intervention]).subscribe(function(n){return e.notify(n)});return{stop:function(){r.unsubscribe()}}}function bl(t,e,r,n){var a=new R;return gl(a),Xs(a),_l(e,a),a.subscribe(function(i){return t.notify(14,{error:i})}),yl(t,r,n)}function yl(t,e,r){return t.subscribe(14,function(n){var a=n.error,i=n.customerContext,o=n.savedCommonContext;t.notify(12,E({customerContext:i,savedCommonContext:o},Sl(a,e,r)))}),{addError:function(n,a){var i=n.error,o=n.handlingStack,s=n.startClocks,c=n.context,u=At(i)?It(i):void 0,l=ka({stackTrace:u,originalError:i,handlingStack:o,startClocks:s,nonErrorPrefix:"Provided",source:ae.CUSTOM,handling:"handled"});t.notify(14,{customerContext:c,savedCommonContext:a,error:l})}}}function Sl(t,e,r){var n={date:t.startClocks.timeStamp,error:{id:H(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,type:t.type,handling:t.handling,causes:t.causes,source_type:"browser",fingerprint:t.fingerprint,csp:t.csp},type:"error",view:{in_foreground:e.wasInPageStateAt("active",t.startClocks.relative)}},a=r.findFeatureFlagEvaluations(t.startClocks.relative);a&&!Vt(a)&&(n.feature_flags=a);var i={error:t.originalError,handlingStack:t.handlingStack};return{rawRumEvent:n,startTime:t.startClocks.relative,domainContext:i}}function El(t,e){var r=ct(e,{type:k.LONG_TASK,buffered:!0}).subscribe(function(n){for(var a=0,i=n;a=e-n&&Mi(t)<=te(r,n)}var Cl=2*X;function Il(t){var e=Al(t)||Rl(t);if(!(!e||e.traceTime<=q()-cl))return e.traceId}function Al(t){var e=t.querySelector("meta[name=dd-trace-id]"),r=t.querySelector("meta[name=dd-trace-time]");return Di(e&&e.content,r&&r.content)}function Rl(t){var e=kl(t);if(e)return Di(ye(e,"trace-id"),ye(e,"trace-time"))}function Di(t,e){var r=e&&Number(e);if(!(!t||!r))return{traceId:t,traceTime:r}}function kl(t){for(var e=0;e=0;e-=1){var n=t.body.childNodes[e],r=Yn(n);if(r)return r;if(!bi(n))break}}function Yn(t){if(t&&Rd(t)){var e=/^\s*DATADOG;(.*?)\s*$/.exec(t.data);if(e)return e[1]}}function Pi(){if(ar(k.NAVIGATION)){var t=performance.getEntriesByType(k.NAVIGATION)[0];if(t)return t}var e=xl(),r=E({entryType:k.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.responseEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:function(){return E({},r,{toJSON:void 0})}},e);return r}function xl(){var t={},e=performance.timing;for(var r in e)if(Ce(e[r])){var n=r,a=e[n];t[n]=a===0?0:Kr(a)}return t}function Ol(t,e){an(t,"interactive",function(){var r=E(Pi().toJSON(),{entryType:k.RESOURCE,initiatorType:ui,traceId:Il(document),toJSON:function(){return E({},r,{toJSON:void 0})}});e(r)})}function Nl(t,e,r,n,a){n===void 0&&(n=tc()),a===void 0&&(a=Ol),t.subscribe(8,function(s){o(function(){return Ll(s,e,r)})});var i=ct(e,{type:k.RESOURCE,buffered:!0}).subscribe(function(s){for(var c=function(d){ud(d)||o(function(){return Wn(d,e)})},u=0,l=s;u=0?o:0,time:i.startTime,targetSelector:s})}});return{stop:function(){n.unsubscribe()}}}function Hl(t,e,r){return r===void 0&&(r=Pi),ql(t,function(){var n=r();jl(n)||e(Gl(n))})}function Gl(t){return{domComplete:t.domComplete,domContentLoaded:t.domContentLoadedEventEnd,domInteractive:t.domInteractive,loadEvent:t.loadEventEnd,firstByte:t.responseStart>=0&&t.responseStart<=tt()?t.responsestart:void 0}}function jl(t){return t.loadEventEnd<=0}function ql(t,e){var r,n=an(t,"complete",function(){r=U(function(){return e()})}).stop;return{stop:function(){n(),J(r)}}}var Kl=10*X;function Yl(t,e,r,n){var a=1/0,i=W(t,r,["pointerdown","keydown"],function(c){a=c.timeStamp},{capture:!0,once:!0}).stop,o=0,s=ct(t,{type:k.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(function(c){var u=go(c,function(f){return f.entryType===k.LARGEST_CONTENTFUL_PAINT&&f.startTimeo});if(u){var l=void 0;u.element&&(l=Oe(u.element,t.actionNameAttribute)),n({value:u.startTime,targetSelector:l}),o=u.size}});return{stop:function(){i(),s.unsubscribe()}}}function Vi(t,e){e===void 0&&(e=window);var r,n;return document.visibilityState==="hidden"?r=0:(r=1/0,n=W(t,e,["pagehide","visibilitychange"],function(a){(a.type==="pagehide"||document.visibilityState==="hidden")&&(r=a.timeStamp,n())},{capture:!0}).stop),{get timeStamp(){return r},stop:function(){n?.()}}}function Wl(t,e,r){var n={},a=Hl(t,function(l){e(l.loadEvent),n.navigationTimings=l,r()}).stop,i=Vi(t),o=zl(t,i,function(l){n.firstContentfulPaint=l,r()}).stop,s=Yl(t,i,window,function(l){n.largestContentfulPaint=l,r()}).stop,c=Fl(t,i,function(l){n.firstInput=l,r()}).stop;function u(){a(),o(),s(),c(),i.stop()}return{stop:u,initialViewMetrics:n}}function Xl(t,e,r){if(!tf())return{stop:C};var n=0,a,i;r({value:0});var o=Ql(),s=ct(t,{type:k.LAYOUT_SHIFT,buffered:!0}).subscribe(function(c){for(var u=0,l=c;un){n=v;var h=a?.deref();r({value:qe(n,4),targetSelector:h&&Oe(h,t.actionNameAttribute),time:i})}}}});return{stop:function(){s.unsubscribe()}}}function Jl(t){var e;if(t)return(e=St(t,function(r){return!!r.node&&ce(r.node)}))===null||e===void 0?void 0:e.node}var $l=5*F,Zl=F;function Ql(){var t=0,e,r,n=0;return{update:function(a){var i=e===void 0||a.startTime-r>=Zl||a.startTime-e>=$l,o;return i?(e=r=a.startTime,n=t=a.value,o=!0):(t+=a.value,r=a.startTime,o=a.value>n,o&&(n=a.value)),{cumulatedValue:t,isMaxValue:o}}}}function tf(){return ar(k.LAYOUT_SHIFT)&&"WeakRef"in window}var je,Bi=0,Lr=1/0,Mr=0;function ef(){"interactionCount"in performance||je||(je=new window.PerformanceObserver(y(function(t){t.getEntries().forEach(function(e){var r=e;r.interactionId&&(Lr=Math.min(Lr,r.interactionId),Mr=Math.max(Mr,r.interactionId),Bi=(Mr-Lr)/7+1)})})),je.observe({type:"event",buffered:!0,durationThreshold:0}))}var Xn=function(){return je?Bi:window.performance.interactionCount||0},Jn=10,rf=1*X;function nf(t,e,r){if(!sf())return{getInteractionToNextPaint:function(){},setViewEnd:C,stop:C};var n=of(r),a=n.getViewInteractionCount,i=n.stopViewInteractionCount,o=1/0,s=af(a),c=-1,u,l;function f(p){for(var h=0,g=p;h=e&&m.startTime<=o&&s.process(m)}var b=s.estimateP98Interaction();b&&b.duration!==c&&(c=b.duration,l=V(e,b.startTime),u=cl(b.startTime),!u&&b.target&&ce(b.target)&&(u=Oe(b.target,t.actionNameAttribute)))}var d=ct(t,{type:k.FIRST_INPUT,buffered:!0}).subscribe(f),v=ct(t,{type:k.EVENT,durationThreshold:40,buffered:!0}).subscribe(f);return{getInteractionToNextPaint:function(){if(c>=0)return{value:Math.min(c,rf),targetSelector:u,time:l};if(a())return{value:0}},setViewEnd:function(p){o=p,i()},stop:function(){v.unsubscribe(),d.unsubscribe()}}}function af(t){var e=[];function r(){e.sort(function(n,a){return a.duration-n.duration}).splice(Jn)}return{process:function(n){var a=e.findIndex(function(o){return n.interactionId===o.interactionId}),i=e[e.length-1];a!==-1?n.duration>e[a].duration&&(e[a]=n,r()):(e.lengthi.duration)&&(e.push(n),r())},estimateP98Interaction:function(){var n=Math.min(e.length-1,Math.floor(t()/50));return e[n]}}}function of(t){ef();var e=t==="initial_load"?0:Xn(),r={stopped:!1};function n(){return Xn()-e}return{getViewInteractionCount:function(){return r.stopped?r.interactionCount:n()},stopViewInteractionCount:function(){r={stopped:!0,interactionCount:n()}}}}function sf(){return ar(k.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function uf(t,e,r,n,a,i,o){var s=a==="initial_load",c=!0,u=[],l=Vi(n);function f(){if(!c&&!s&&u.length>0){var v=Math.max.apply(Math,u);va&&(a=u,d=!0),f>i){i=f;var v=tt();o=V(e.relative,v),d=!0}d&&r({maxDepth:Math.min(a,i),maxDepthScrollTop:l,maxScrollHeight:i,maxScrollHeightTime:o})});return{stop:function(){return s.unsubscribe()}}}function ff(){var t=vn(),e=Te().height,r=Math.round((document.scrollingElement||document.documentElement).scrollHeight),n=Math.round(e+t);return{scrollHeight:r,scrollDepth:n,scrollTop:t}}function vf(t,e){return e===void 0&&(e=df),new R(function(r){function n(){r.notify(ff())}if(window.ResizeObserver){var a=ht(n,e,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,o=new ResizeObserver(y(a.throttled));i&&o.observe(i);var s=x(t,window,"scroll",a.throttled,{passive:!0});return function(){a.cancel(),o.disconnect(),s.stop()}}})}function pf(t,e,r,n,a,i,o){var s={},c=uf(t,e,r,n,i,o,function(m){s.loadingTime=m,a()}),u=c.stop,l=c.setLoadEvent,f=lf(n,o,function(m){s.scroll=m}).stop,d=Xl(n,o.relative,function(m){s.cumulativeLayoutShift=m,a()}).stop,v=nf(n,o.relative,i),p=v.stop,h=v.getInteractionToNextPaint,g=v.setViewEnd;return{stop:function(){u(),d(),f()},stopINPTracking:p,setLoadEvent:l,setViewEnd:g,getCommonViewMetrics:function(){return s.interactionToNextPaint=h(),s}}}var hf=3e3,mf=5*X,gf=5*X;function _f(t,e,r,n,a,i,o,s){var c=new Set,u=f("initial_load",la(),s);d();var l;o&&(l=v(i));function f(p,h,g){var m=bf(e,r,n,a,t,p,h,g);return c.add(m),m.stopObservable.subscribe(function(){c.delete(m)}),m}function d(){e.subscribe(10,function(){u=f("route_change",void 0,{name:u.name,service:u.service,version:u.version,context:u.contextManager.getContext()})}),e.subscribe(9,function(){u.end({sessionIsActive:!1})}),e.subscribe(11,function(p){p.reason===Zt.UNLOADING&&u.end()})}function v(p){return p.subscribe(function(h){var g=h.oldLocation,m=h.newLocation;Sf(g,m)&&(u.end(),u=f("route_change"))})}return{addTiming:function(p,h){h===void 0&&(h=D()),u.addTiming(p,h)},startView:function(p,h){u.end({endClocks:h}),u=f("route_change",h,p)},setViewContext:function(p){u.contextManager.setContext(p)},setViewContextProperty:function(p,h){u.contextManager.setContextProperty(p,h)},setViewName:function(p){u.setViewName(p)},stop:function(){l&&l.unsubscribe(),u.end(),c.forEach(function(p){return p.stop()})}}}function bf(t,e,r,n,a,i,o,s){o===void 0&&(o=j());var c=H(),u=new R,l={},f=0,d,v=be(a),p=Gr(),h=!0,g,m,b,I;s&&(g=s.name,m=s.service||void 0,b=s.version||void 0,s.context&&(I=s.context,p.setContext(I)));var O={id:c,name:g,startClocks:o,service:m,version:b,context:I};t.notify(1,O),t.notify(2,O);var B=ht(kt,hf,{leading:!1}),A=B.throttled,_=B.cancel,N=pf(t,e,r,n,A,i,o),Rt=N.setLoadEvent,P=N.setViewEnd,cr=N.stop,dr=N.stopINPTracking,mt=N.getCommonViewMetrics,Le=i==="initial_load"?Wl(n,Rt,A):{stop:C,initialViewMetrics:{}},lr=Le.stop,fr=Le.initialViewMetrics,Me=Vl(t,c,A),vr=Me.stop,pr=Me.eventCounts,hr=ee(kt,mf);kt(),p.changeObservable.subscribe(function(){t.notify(3,{id:c,name:g,context:p.getContext(),startClocks:o}),A()});function kt(){_(),f+=1;var $=d===void 0?D():d.timeStamp;t.notify(4,{customTimings:l,documentVersion:f,id:c,name:g,service:m,version:b,context:p.getContext(),loadingType:i,location:v,startClocks:o,commonViewMetrics:mt(),initialViewMetrics:fr,duration:V(o.timeStamp,$),isActive:d===void 0,sessionIsActive:h,eventCounts:pr})}return{get name(){return g},service:m,version:b,contextManager:p,stopObservable:u,end:function($){var lt=this,xt,z;$===void 0&&($={}),!d&&(d=(xt=$.endClocks)!==null&&xt!==void 0?xt:j(),h=(z=$.sessionIsActive)!==null&&z!==void 0?z:!0,t.notify(5,{endClocks:d}),t.notify(6,{endClocks:d}),rr(hr),P(d.relative),cr(),kt(),U(function(){lt.stop()},gf))},stop:function(){lr(),vr(),dr(),u.notify()},addTiming:function(,ドルlt){if(!d){var xt=po(lt)?lt:V(o.timeStamp,lt);l[yf($)]=xt,A()}},setViewName:function($){g=,ドルkt()}}}function yf(t){var e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return e!==t&&T.warn("Invalid timing name: ".concat(t,", sanitized to: ").concat(e)),e}function Sf(t,e){return t.pathname!==e.pathname||!Ef(e.hash)&&$n(e.hash)!==$n(t.hash)}function Ef(t){var e=t.substring(1);return e!==""&&!!document.getElementById(e)}function $n(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}function wf(t,e,r,n,a,i,o,s,c,u){return t.subscribe(4,function(l){return t.notify(12,Tf(l,e,o,c,s))}),_f(r,t,n,a,e,i,!e.trackViewsManually,u)}function Tf(t,e,r,n,a){var i,o,s,c,u,l,f,d,v,p,h,g,m,b,I,O,B=n.getReplayStats(t.id),A=r.findFeatureFlagEvaluations(t.startClocks.relative),_=a.findAll(t.startClocks.relative,t.duration),N={_dd:{document_version:t.documentVersion,replay_stats:B,page_states:_,configuration:{start_session_replay_recording_manually:e.startSessionReplayRecordingManually}},date:t.startClocks.timeStamp,type:"view",view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:(i=t.commonViewMetrics.cumulativeLayoutShift)===null||i===void 0?void 0:i.value,cumulative_layout_shift_time:w((o=t.commonViewMetrics.cumulativeLayoutShift)===null||o===void 0?void 0:o.time),cumulative_layout_shift_target_selector:(s=t.commonViewMetrics.cumulativeLayoutShift)===null||s===void 0?void 0:s.targetSelector,first_byte:w((c=t.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.firstByte),dom_complete:w((u=t.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.domComplete),dom_content_loaded:w((l=t.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domContentLoaded),dom_interactive:w((f=t.initialViewMetrics.navigationTimings)===null||f===void 0?void 0:f.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:w(t.initialViewMetrics.firstContentfulPaint),first_input_delay:w((d=t.initialViewMetrics.firstInput)===null||d===void 0?void 0:d.delay),first_input_time:w((v=t.initialViewMetrics.firstInput)===null||v===void 0?void 0:v.time),first_input_target_selector:(p=t.initialViewMetrics.firstInput)===null||p===void 0?void 0:p.targetSelector,interaction_to_next_paint:w((h=t.commonViewMetrics.interactionToNextPaint)===null||h===void 0?void 0:h.value),interaction_to_next_paint_time:w((g=t.commonViewMetrics.interactionToNextPaint)===null||g===void 0?void 0:g.time),interaction_to_next_paint_target_selector:(m=t.commonViewMetrics.interactionToNextPaint)===null||m===void 0?void 0:m.targetSelector,is_active:t.isActive,name:t.name,largest_contentful_paint:w((b=t.initialViewMetrics.largestContentfulPaint)===null||b===void 0?void 0:b.value),largest_contentful_paint_target_selector:(I=t.initialViewMetrics.largestContentfulPaint)===null||I===void 0?void 0:I.targetSelector,load_event:w((O=t.initialViewMetrics.navigationTimings)===null||O===void 0?void 0:O.loadEvent),loading_time:mi(w(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},resource:{count:t.eventCounts.resourceCount},time_spent:w(t.duration)},feature_flags:A&&!Vt(A)?A:void 0,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:w(t.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:B?!0:void 0,is_active:t.sessionIsActive?void 0:!1},privacy:{replay_level:e.defaultPrivacyLevel}};return Vt(t.customTimings)||(N.view.custom_timings=yo(t.customTimings,w)),{rawRumEvent:N,startTime:t.startClocks.relative,domainContext:{location:t.location}}}var Cf="rum";function If(t,e,r){var n=bu(t,Cf,function(a){return Rf(t,a)},r);return n.expireObservable.subscribe(function(){e.notify(9)}),n.renewObservable.subscribe(function(){e.notify(10)}),n.sessionStateUpdateObservable.subscribe(function(a){var i=a.previousState,o=a.newState;if(!i.forcedReplay&&o.forcedReplay){var s=n.findSession();s&&(s.isReplayForced=!0)}}),{findTrackedSession:function(a){var i=n.findSession(a);if(!(!i||!Hi(i.trackingType)))return{id:i.id,sessionReplay:i.trackingType==="1"?1:i.isReplayForced?2:0,anonymousId:i.anonymousId}},expire:n.expire,expireObservable:n.expireObservable,setForcedReplay:function(){return n.updateSessionState({forcedReplay:"1"})}}}function Af(){var t={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:Ya("records")?1:0};return{findTrackedSession:function(){return t},expire:C,expireObservable:new R,setForcedReplay:C}}function Rf(t,e){var r;return kf(e)?r=e:Pt(t.sessionSampleRate)?Pt(t.sessionReplaySampleRate)?r="1":r="2":r="0",{trackingType:r,isTracked:Hi(r)}}function kf(t){return t==="0"||t==="1"||t==="2"}function Hi(t){return t==="2"||t==="1"}function xf(t,e,r,n,a,i,o){var s=t.replica,c=Bu(t,{endpoint:t.rumEndpointBuilder,encoder:o(2)},s&&{endpoint:s.rumEndpointBuilder,transformMessage:function(u){return ut(u,{application:{id:s.applicationId}})},encoder:o(3)},n,a,i);return e.subscribe(13,function(u){u.type==="view"?c.upsert(u,u.view.id):c.add(u)}),r.subscribe(function(u){return c.add(u,fu(t))}),c}function Of(t){var e=ue();t.subscribe(13,function(r){e.send("rum",r)})}var Nf=Ht;function Lf(t,e,r){var n=se({expireDelay:Nf}),a;t.subscribe(1,function(s){var c=s.startClocks,u=r.href;n.add(o({url:u,referrer:a||document.referrer}),c.relative),a=u}),t.subscribe(6,function(s){var c=s.endClocks;n.closeActive(c.relative)});var i=e.subscribe(function(s){var c=s.newLocation,u=n.find();if(u){var l=tt();n.closeActive(l),n.add(o({url:c.href,referrer:u.referrer}),l)}});function o(s){var c=s.url,u=s.referrer;return{url:c,referrer:u}}return{findUrl:function(s){return n.find(s)},stop:function(){i.unsubscribe(),n.stop()}}}function Mf(t,e){var r=be(e);return new R(function(n){var a=Df(t,o).stop,i=Pf(t,o).stop;function o(){if(r.href!==e.href){var s=be(e);n.notify({newLocation:s,oldLocation:r}),r=s}}return function(){a(),i()}})}function Df(t,e){var r=Y(Zn("pushState"),"pushState",function(i){var o=i.onPostCall;o(e)}).stop,n=Y(Zn("replaceState"),"replaceState",function(i){var o=i.onPostCall;o(e)}).stop,a=x(t,window,"popstate",e).stop;return{stop:function(){r(),n(),a()}}}function Pf(t,e){return x(t,window,"hashchange",e)}function Zn(t){return Object.prototype.hasOwnProperty.call(history,t)?history:History.prototype}var Uf=Ht;function Vf(t,e){var r=se({expireDelay:Uf});return t.subscribe(1,function(n){var a=n.startClocks;r.add({},a.relative),e.resetCustomerData()}),t.subscribe(6,function(n){var a=n.endClocks;r.closeActive(a.relative)}),{findFeatureFlagEvaluations:function(n){return r.find(n)},addFeatureFlagEvaluation:function(n,a){var i=r.find();i&&(i[n]=a,e.updateCustomerData(i))},stop:function(){return e.stop()}}}var Bf=10*F,ft,Nt,jr;function zf(t,e,r,n,a){var i=e.enabled&&Pt(t.customerDataTelemetrySampleRate);i&&(Gi(),Qn(),r.subscribe(13,function(o){jr=!0,pe(Nt.globalContextBytes,n.getOrCreateTracker(2).getBytesCount()),pe(Nt.userContextBytes,n.getOrCreateTracker(1).getBytesCount()),pe(Nt.featureFlagBytes,et(["view","error"],o.type)?n.getOrCreateTracker(0).getBytesCount():0)}),a.subscribe(function(o){var s=o.bytesCount,c=o.messagesCount;jr&&(ft.batchCount+=1,pe(ft.batchBytesCount,s),pe(ft.batchMessagesCount,c),Pr(ft.globalContextBytes,Nt.globalContextBytes),Pr(ft.userContextBytes,Nt.userContextBytes),Pr(ft.featureFlagBytes,Nt.featureFlagBytes),Qn())}),ee(Ff,Bf))}function Ff(){ft.batchCount!==0&&(oe("Customer data measures",ft),Gi())}function gt(){return{min:1/0,max:0,sum:0}}function pe(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function Pr(t,e){t.sum+=e.sum,t.min=Math.min(t.min,e.min),t.max=Math.max(t.max,e.max)}function Gi(){ft={batchCount:0,batchBytesCount:gt(),batchMessagesCount:gt(),globalContextBytes:gt(),userContextBytes:gt(),featureFlagBytes:gt()}}function Qn(){jr=!1,Nt={globalContextBytes:gt(),userContextBytes:gt(),featureFlagBytes:gt()}}var Hf=4e3,Gf=500,jf=Ht;function qf(t,e){e===void 0&&(e=Gf);var r=se({expireDelay:jf,maxEntries:Hf}),n;i(ji(),tt());var a=W(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],function(s){i(Kf(s),s.timeStamp)},{capture:!0}).stop;function i(s,c){c===void 0&&(c=tt()),s!==n&&(n=s,r.closeActive(c),r.add({state:n,startTime:c},c))}var o={findAll:function(s,c){var u=r.findAll(s,c);if(u.length!==0){for(var l=[],f=Math.max(0,u.length-e),d=u.length-1;d>=f;d--){var v=u[d],p=V(s,v.startTime);l.push({state:v.state,start:w(p)})}return l}},wasInPageStateAt:function(s,c){return o.wasInPageStateDuringPeriod(s,c,0)},wasInPageStateDuringPeriod:function(s,c,u){return r.findAll(c,u).some(function(l){return l.state===s})},addPageState:i,stop:function(){a(),r.stop()}};return o}function Kf(t){return t.type==="freeze"?"frozen":t.type==="pagehide"?t.persisted?"frozen":"terminated":ji()}function ji(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function Yf(t){var e,r;pt(rt.DELAY_VIEWPORT_COLLECTION)?r=requestAnimationFrame(function(){e=Te()}):e=Te();var n=Fi(t).subscribe(function(a){e=a}).unsubscribe;return{get:function(){return e?{viewport:e}:void 0},stop:function(){n(),r&&cancelAnimationFrame(r)}}}function Wf(t,e){var r=window.cookieStore?Xf(t):$f;return new R(function(n){return r(e,function(a){return n.notify(a)})})}function Xf(t){return function(e,r){var n=x(t,window.cookieStore,"change",function(a){var i=St(a.changed,function(o){return o.name===e})||St(a.deleted,function(o){return o.name===e});i&&r(i.value)});return n.stop}}var Jf=F;function $f(t,e){var r=ye(document.cookie,t),n=ee(function(){var a=ye(document.cookie,t);a!==r&&e(a)},Jf);return function(){rr(n)}}var ta="datadog-ci-visibility-test-execution-id";function Zf(t,e){var r;e===void 0&&(e=Wf(t,ta));var n=_t(ta)||((r=window.Cypress)===null||r===void 0?void 0:r.env("traceId")),a=e.subscribe(function(i){n=i});return{get:function(){if(typeof n=="string")return{test_execution_id:n}},stop:function(){return a.unsubscribe()}}}function Qf(t,e){var r=ct(e,{type:k.LONG_ANIMATION_FRAME,buffered:!0}).subscribe(function(n){for(var a=0,i=n;aov&&fv()),e}function fv(){if(G)if(G.keys){var t=G.keys().next().value;t&&G.delete(t)}else{var e=!0;G.forEach(function(r,n){e&&(G.delete(n),e=!1)})}}var pn=new WeakMap;function st(t){return pn.has(t)}function vv(t){for(var e=t;e;){if(!st(e)&&!dn(e))return!1;e=or(e)}return!0}function K(t){return pn.get(t)}function pv(t,e){pn.set(t,e)}function hn(t,e){var r=t.tagName,n=t.value;if(sr(t,e)){var a=t.type;return r==="INPUT"&&(a==="button"||a==="submit"||a==="reset")?n:!n||r==="OPTION"?void 0:bt}if(r==="OPTION"||r==="SELECT")return t.value;if(!(r!=="INPUT"&&r!=="TEXTAREA"))return n}var hv=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,mv=/^[A-Za-z]+:|^\/\//,gv=/^data:.*,/i;function _v(t,e){return t.replace(hv,function(r,n,a,i,o,s){var c=a||o||s;if(!e||!c||mv.test(c)||gv.test(c))return r;var u=n||i||"";return"url(".concat(u).concat(bv(c,e)).concat(u,")")})}function bv(t,e){try{return nr(t,e).href}catch{return t}}var yv=/[^a-z1-6-_]/;function qi(t){var e=t.toLowerCase().trim();return yv.test(e)?"div":e}function ea(t,e){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='".concat(t,"' height='").concat(e,"' style='background-color:silver'%3E%3C/svg%3E")}var ot={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},Ft={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},Z={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},at={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},ra={Play:0,Pause:1};function Ki(t){if(!(t===void 0||t.length===0))return t.map(function(e){var r=e.cssRules||e.rules,n=Array.from(r,function(i){return i.cssText}),a={cssRules:n,disabled:e.disabled||void 0,media:e.media.length>0?Array.from(e.media):void 0};return a})}function Yi(t,e,r,n){if(e===S.HIDDEN)return null;var a=t.getAttribute(r);if(e===S.MASK&&r!==ln&&!Ai.includes(r)&&r!==n.actionNameAttribute){var i=t.tagName;switch(r){case"title":case"alt":case"placeholder":return bt}if(i==="IMG"&&(r==="src"||r==="srcset")){var o=t;if(o.naturalWidth>0)return ea(o.naturalWidth,o.naturalHeight);var s=t.getBoundingClientRect(),c=s.width,u=s.height;return c>0||u>0?ea(c,u):Pn}if(i==="SOURCE"&&(r==="src"||r==="srcset"))return Pn;if(i==="A"&&r==="href"||a&&Ae(r,"data-")||i==="IFRAME"&&r==="srcdoc")return bt}return!a||typeof a!="string"?a:vi(a)?pi(a):a}function Sv(t,e,r){var n;if(e===S.HIDDEN)return{};for(var a={},i=qi(t.tagName),o=t.ownerDocument,s=0;sna||Math.abs(t.pageLeft-t.offsetLeft-window.scrollX)>na}var Uv=function(t,e){var r=window.visualViewport,n={layoutViewportX:t,layoutViewportY:e,visualViewportX:t,visualViewportY:e};if(r)Pv(r)?(n.layoutViewportX=Math.round(t+r.offsetLeft),n.layoutViewportY=Math.round(e+r.offsetTop)):(n.visualViewportX=Math.round(t-r.offsetLeft),n.visualViewportY=Math.round(e-r.offsetTop));else return n;return n},Ji=function(t){return{scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width}};function it(t,e){return{data:E({source:t},e),type:ot.IncrementalSnapshot,timestamp:D()}}var Vv=50;function Bv(t,e){var r=ht(function(o){var s=Ne(o);if(st(s)){var c=$i(o);if(!c)return;var u={id:K(s),timeOffset:0,x:c.x,y:c.y};e(it(Xi(o)?Z.TouchMove:Z.MouseMove,{positions:[u]}))}},Vv,{trailing:!1}),n=r.throttled,a=r.cancel,i=W(t,document,["mousemove","touchmove"],n,{capture:!0,passive:!0}).stop;return{stop:function(){i(),a()}}}function $i(t){var e=Xi(t)?t.changedTouches[0]:t,r=e.clientX,n=e.clientY;if(window.visualViewport){var a=Uv(r,n),i=a.visualViewportX,o=a.visualViewportY;r=i,n=o}if(!Number.isFinite(r)||!Number.isFinite(n)){t.isTrusted&&oe("mouse/touch event without x/y");return}return{x:r,y:n}}var nt,aa=(nt={},nt.pointerup=at.MouseUp,nt.mousedown=at.MouseDown,nt.click=at.Click,nt.contextmenu=at.ContextMenu,nt.dblclick=at.DblClick,nt.focus=at.Focus,nt.blur=at.Blur,nt.touchstart=at.TouchStart,nt.touchend=at.TouchEnd,nt);function zv(t,e,r){var n=function(a){var i=Ne(a);if(!(dt(i,t.defaultPrivacyLevel)===S.HIDDEN||!st(i))){var o=K(i),s=aa[a.type],c;if(s!==at.Blur&&s!==at.Focus){var u=$i(a);if(!u)return;c={id:o,type:s,x:u.x,y:u.y}}else c={id:o,type:s};var l=E({id:r.getIdForEvent(a)},it(Z.MouseInteraction,c));e(l)}};return W(t,document,Object.keys(aa),n,{capture:!0,passive:!0})}var Fv=100;function Zi(t,e,r,n){n===void 0&&(n=document);var a=ht(function(c){var u=Ne(c);if(!(!u||dt(u,t.defaultPrivacyLevel)===S.HIDDEN||!st(u))){var l=K(u),f=u===document?{scrollTop:vn(),scrollLeft:zi()}:{scrollTop:Math.round(u.scrollTop),scrollLeft:Math.round(u.scrollLeft)};r.set(u,f),e(it(Z.Scroll,{id:l,x:f.scrollLeft,y:f.scrollTop}))}},Fv),i=a.throttled,o=a.cancel,s=x(t,n,"scroll",i,{capture:!0,passive:!0}).stop;return{stop:function(){s(),o()}}}var Hv=200;function Gv(t,e){var r=Fi(t).subscribe(function(n){e(it(Z.ViewportResize,n))});return{stop:function(){r.unsubscribe()}}}function jv(t,e){var r=window.visualViewport;if(!r)return{stop:C};var n=ht(function(){e({data:Ji(r),type:ot.VisualViewport,timestamp:D()})},Hv,{trailing:!1}),a=n.throttled,i=n.cancel,o=W(t,r,["resize","scroll"],a,{capture:!0,passive:!0}).stop;return{stop:function(){o(),i()}}}function qv(t,e){return W(t,document,["play","pause"],function(r){var n=Ne(r);!n||dt(n,t.defaultPrivacyLevel)===S.HIDDEN||!st(n)||e(it(Z.MediaInteraction,{id:K(n),type:r.type==="play"?ra.Play:ra.Pause}))},{capture:!0,passive:!0})}function Kv(t){function e(a,i){a&&st(a.ownerNode)&&i(K(a.ownerNode))}var r=[Y(CSSStyleSheet.prototype,"insertRule",function(a){var i=a.target,o=a.parameters,s=o[0],c=o[1];e(i,function(u){return t(it(Z.StyleSheetRule,{id:u,adds:[{rule:s,index:c}]}))})}),Y(CSSStyleSheet.prototype,"deleteRule",function(a){var i=a.target,o=a.parameters[0];e(i,function(s){return t(it(Z.StyleSheetRule,{id:s,removes:[{index:o}]}))})})];typeof CSSGroupingRule<"u"?n(cssgroupingrule):(n(cssmediarule),n(csssupportsrule));function n(a){r.push(Y(a.prototype,"insertRule",function(i){var o=i.target,s=i.parameters,c=s[0],u=s[1];e(o.parentStyleSheet,function(l){var f=ia(o);f&&(f.push(u||0),t(it(Z.StyleSheetRule,{id:l,adds:[{rule:c,index:f}]})))})}),Y(a.prototype,"deleteRule",function(i){var o=i.target,s=i.parameters[0];e(o.parentStyleSheet,function(c){var u=ia(o);u&&(u.push(s),t(it(Z.StyleSheetRule,{id:c,removes:[{index:u}]})))})}))}return{stop:function(){r.forEach(function(a){return a.stop()})}}}function ia(t){for(var e=[],r=t;r.parentRule;){var n=Array.from(r.parentRule.cssRules),a=n.indexOf(r);e.unshift(a),r=r.parentRule}if(r.parentStyleSheet){var i=Array.from(r.parentStyleSheet.cssRules),o=i.indexOf(r);return e.unshift(o),e}}function Yv(t,e){return W(t,window,["focus","blur"],function(){e({data:{has_focus:document.hasFocus()},type:ot.Focus,timestamp:D()})})}function Wv(t,e,r){var n=t.subscribe(12,function(a){var i,o;a.rawRumEvent.type==="action"&&a.rawRumEvent.action.type==="click"&&(!((o=(i=a.rawRumEvent.action.frustration)===null||i===void 0?void 0:i.type)===null||o===void 0)&&o.length)&&"events"in a.domainContext&&a.domainContext.events&&a.domainContext.events.length&&e({timestamp:a.rawRumEvent.date,type:ot.FrustrationRecord,data:{frustrationTypes:a.rawRumEvent.action.frustration.type,recordIds:a.domainContext.events.map(function(s){return r.getIdForEvent(s)})}})});return{stop:function(){n.unsubscribe()}}}function Xv(t,e){var r=t.subscribe(5,function(){e({timestamp:D(),type:ot.ViewEnd})});return{stop:function(){r.unsubscribe()}}}function Qi(t,e,r){r===void 0&&(r=document);var n=t.defaultPrivacyLevel,a=new WeakMap,i=r!==document,o=W(t,r,i?["change"]:["input","change"],function(f){var d=Ne(f);(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement||d instanceof HTMLSelectElement)&&u(d)},{capture:!0,passive:!0}).stop,s;if(i)s=C;else{var c=[le(HTMLInputElement.prototype,"value",u),le(HTMLInputElement.prototype,"checked",u),le(HTMLSelectElement.prototype,"value",u),le(HTMLTextAreaElement.prototype,"value",u),le(HTMLSelectElement.prototype,"selectedIndex",u)];s=function(){c.forEach(function(f){return f.stop()})}}return{stop:function(){s(),o()}};function u(f){var d=dt(f,n);if(d!==S.HIDDEN){var v=f.type,p;if(v==="radio"||v==="checkbox"){if(sr(f,d))return;p={isChecked:f.checked}}else{var h=hn(f,d);if(h===void 0)return;p={text:h}}l(f,p);var g=f.name;v==="radio"&&g&&f.checked&&_o(document.querySelectorAll('input[type="radio"][name="'.concat(wt(g),'"]')),function(m){m!==f&&l(m,{isChecked:!1})})}}function l(f,d){if(st(f)){var v=a.get(f);(!v||v.text!==d.text||v.isChecked!==d.isChecked)&&(a.set(f,d),e(it(Z.Input,E({id:K(f)},d))))}}}var Jv=100,$v=16;function Zv(t){var e=C,r=[];function n(){e(),t(r),r=[]}var a=ht(n,$v,{leading:!1}),i=a.throttled,o=a.cancel;return{addMutations:function(s){r.length===0&&(e=Ja(i,{timeout:Jv})),r.push.apply(r,s)},flush:n,stop:function(){e(),o()}}}function to(t,e,r,n){var a=ii();if(!a)return{stop:C,flush:C};var i=Zv(function(s){Qv(s.concat(o.takeRecords()),t,e,r)}),o=new a(y(i.addMutations));return o.observe(n,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:function(){o.disconnect(),i.stop()},flush:function(){i.flush()}}}function Qv(t,e,r,n){var a=new Map;t.filter(function(d){return d.type==="childList"}).forEach(function(d){d.removedNodes.forEach(function(v){eo(v,n.removeShadowRoot)})});var i=t.filter(function(d){return d.target.isConnected&&vv(d.target)&&dt(d.target,r.defaultPrivacyLevel,a)!==S.HIDDEN}),o=tp(i.filter(function(d){return d.type==="childList"}),r,n,a),s=o.adds,c=o.removes,u=o.hasBeenSerialized,l=ep(i.filter(function(d){return d.type==="characterData"&&!u(d.target)}),r,a),f=rp(i.filter(function(d){return d.type==="attributes"&&!u(d.target)}),r,a);!l.length&&!f.length&&!c.length&&!s.length||e(it(Z.Mutation,{adds:s,removes:c,texts:l,attributes:f}))}function tp(t,e,r,n){for(var a=new Set,i=new Map,o=function(A){A.addedNodes.forEach(function(_){a.add(_)}),A.removedNodes.forEach(function(_){a.has(_)||i.set(_,A.target),a.delete(_)})},s=0,c=t;sro&&s("segment_bytes_limit")})}},stop:function(){s("stop"),i(),o()}}}function pp(t,e,r){var n=e.findTrackedSession(),a=r.findView();if(!(!n||!a))return{application:{id:t},session:{id:n.id},view:{id:a.id}}}function hp(t){var e=ue();return{addRecord:function(r){var n=t.findView();e.send("record",r,n.id)}}}function mp(t,e,r,n,a,i){var o=[],s=function(d){t.notify(14,{error:d}),oe("Error reported to customer",{"error.message":d.message})},c=i||Ka(e.sessionReplayEndpointBuilder,ro,s),u;if(zt())u=hp(n).addRecord;else{var l=fp(t,e,r,n,c,a);u=l.addRecord,o.push(l.stop)}var f=up({emit:u,configuration:e,lifeCycle:t,viewHistory:n}).stop;return o.push(f),{stop:function(){o.forEach(function(d){return d()})}}}function no(t,e,r){var n=0,a=[],i,o=0,s=[],c=x(t,e,"message",function(f){var d=f.data;if(!(d.type!=="wrote"||d.streamId!==r)){n+=d.additionalBytesCount,a.push(d.result),i=d.trailer;var v=s.shift();v&&v.id===d.id?v.writeCallback?v.writeCallback(d.result.byteLength):v.finishCallback&&v.finishCallback():(c(),oe("Worker responses received out of order."))}}).stop;function u(){var f=a.length===0?new Uint8Array(0):mo(a.concat(i)),d={rawBytesCount:n,output:f,outputBytesCount:f.byteLength,encoding:"deflate"};return n=0,a=[],d}function l(){o>0&&(e.postMessage({action:"reset",streamId:r}),o=0)}return{isAsync:!0,get isEmpty(){return o===0},write:function(f,d){e.postMessage({action:"write",id:o,data:f,streamId:r}),s.push({id:o,writeCallback:d,data:f}),o+=1},finish:function(f){l(),s.length?(s.forEach(function(d){delete d.writeCallback}),s[s.length-1].finishCallback=function(){return f(u())}):f(u())},finishSync:function(){l();var f=s.map(function(d){return delete d.writeCallback,delete d.finishCallback,d.data}).join("");return E(u(),{pendingData:f})},estimateEncodedBytesCount:function(f){return f.length/8},stop:function(){c()}}}var gp=30*F;function ao(t){return new Worker(t.workerUrl||URL.createObjectURL(new Blob(['!function(){"use strict";function t(t){for(var e=t.reduce((function(t,e){return t+e.length}),0),a=new Uint8Array(e),n=0,r=0,i=t;r=0;)t[e]=0}var a=256,n=286,r=30,i=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),h=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]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),_=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);e(o);var d=new Array(60);e(d);var u=new Array(512);e(u);var f=new Array(256);e(f);var c=new Array(29);e(c);var p,g,w,v=new Array(r);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(v);var y=function(t){return t<256?u[t]:u[256+(t>>>7)]},k=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},z=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<>>=1,a<<=1}while(--e>0);return a>>>1},U=function(t,e,a){var n,r,s=new Array(16),h=0;for(n=1;n<=i;n++)s[n]=h=h+a[n-1]<<1;for(r=0;r<=e;r++){var l=t[2*r+1];0!==l&&(t[2*r]=A(s[l]++,l))}},I=function(t){var e;for(e=0;e8?k(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},E=function(t,e,a,n){var r=2*e,i=2*a;return t[r]>1;a>=1;a--)S(t,s,a);r=_;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*r]=s[2*a]+s[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=r,t.heap[1]=r++,S(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,s,h,l,_=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(s=0;s<=i;s++)t.bl_count[s]=0;for(_[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=_[2*_[2*(n=t.heap[a])+1]+1]+1)>p&&(s=p,g++),_[2*n+1]=s,n>o||(t.bl_count[s]++,h=0,n>=c&&(h=f[n-c]),l=_[2*n],t.opt_len+=l*(s+h),u&&(t.static_len+=l*(d[2*n+1]+h)));if(0!==g){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)(r=t.heap[--a])>o||(_[2*r+1]!==s&&(t.opt_len+=(s-_[2*r+1])*_[2*r],_[2*r+1]=s),n--)}}(t,e),U(s,o,t.bl_count)},j=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],++h0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*_[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==e?t(t,e,n,r):4===t.strategy||s===i?(z(t,2+(r?1:0),3),c(t,o,d)):(z(t,4+(r?1:0),3),function(t,e,a,n){var r;for(z(t,e-257,5),z(t,a-1,5),z(t,n-4,4),r=0;r>=7;_>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(f[n]+a+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){z(t,2,3),x(t,256,o),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},K=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},n=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}()),O=function(t,e,a,n){var r=N,i=n+a;t^=-1;for(var s=n;s>>8^r[255&(t^e[s])];return~t},q={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"},F=0,G=2,J=3,P=4,Q=0,V=1,W=-1,X=0,Y=8,Z=R._tr_init,$=R._tr_stored_block,tt=R._tr_flush_block,et=R._tr_tally,at=R._tr_align,nt=F,rt=1,it=J,st=P,ht=5,lt=Q,_t=V,ot=-2,dt=-3,ut=-5,ft=W,ct=1,pt=2,gt=3,wt=4,vt=X,bt=2,mt=Y,yt=258,kt=262,zt=103,xt=113,At=666,Ut=function(t,e){return t.msg=q[e],e},It=function(t){return(t<<1)-(t>4?9:0)},Bt=function(t){for(var e=t.length;--e>=0;)t[e]=0},Et=function(t,e,a){return(e<t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Ct=function(t,e){tt(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,St(t.strm)},Dt=function(t,e){t.pending_buf[t.pending++]=e},jt=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Mt=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-kt?t.strstart-(t.w_size-kt):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+yt,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]&&is){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},lt=function(t){var e,a,n,r,i,s,h,l,_,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-kt)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,_=r,o=void 0,(o=s.avail_in)>_&&(o=_),a=0===o?0:(s.avail_in-=o,h.set(s.input.subarray(s.next_in,s.next_in+o),l),1===s.state.wrap?s.adler=K(s.adler,h,o,l):2===s.state.wrap&&(s.adler=O(s.adler,h,o,l)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=Et(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=Et(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead=3&&(t.ins_h=Et(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-kt&&(t.match_length=mt(t,a)),t.match_length>=3)if(n=et(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=Et(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=Et(t,t.ins_h,t.window[t.strstart+1]);else n=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===st?(ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(ct(t,!1),0===t.strm.avail_out)?1:2},ht=function(t,e){for(var a,n,r;;){if(t.lookahead=3&&(t.ins_h=Et(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=et(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=et(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&&(ct(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=et(t,0,t.window[t.strstart-1]))&&Ct(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=et(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===st?(ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(ct(t,!1),0===t.strm.avail_out)?1:2};function Rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Kt=[new Rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(lt(t),0===t.lookahead&&e===nt)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,Ct(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-kt&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Ct(t,!1),t.strm.avail_out),1)})),new Rt(4,4,8,4,Tt),new Rt(4,5,16,8,Tt),new Rt(4,6,32,32,Tt),new Rt(4,4,16,16,Ht),new Rt(8,16,32,32,Ht),new Rt(8,16,128,128,Ht),new Rt(8,32,128,256,Ht),new Rt(32,128,258,1024,Ht),new Rt(32,258,258,4096,Ht)];function Nt(){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=mt,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),Bt(this.dyn_ltree),Bt(this.dyn_dtree),Bt(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),Bt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Bt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Ot=function(t){if(!t||!t.state)return Ut(t,ot);t.total_in=t.total_out=0,t.data_type=bt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:xt,t.adler=2===e.wrap?0:1,e.last_flush=nt,z(e),lt},qt=function(t){var e,a=Ot(t);return a===lt&&((e=t.state).window_size=2*e.w_size,Bt(e.head),e.max_lazy_match=Kt[e.level].max_lazy,e.good_match=Kt[e.level].good_length,e.nice_match=Kt[e.level].nice_length,e.max_chain_length=Kt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Ft=function(t,e,a,n,r,i){if(!t)return ot;var s=1;if(e===ft&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==mt||n<8||n>15||e<0||e>9||i<0||i>wt)return Ut(t,ot);8===n&&(n=9);var h=new Nt;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<ht||e<0)return t?Ut(t,ot):ot;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===At&&e!==st)return Ut(t,0===t.avail_out?ut:ot);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Dt(r,31),Dt(r,139),Dt(r,8),r.gzhead?(Dt(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)),Dt(r,255&r.gzhead.time),Dt(r,r.gzhead.time>>8&255),Dt(r,r.gzhead.time>>16&255),Dt(r,r.gzhead.time>>24&255),Dt(r,9===r.level?2:r.strategy>=pt||r.level<2?4:0),dt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(dt(r,255&r.gzhead.extra.length),dt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=O(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Dt(r,0),Dt(r,0),Dt(r,0),Dt(r,0),Dt(r,0),Dt(r,9===r.level?2:r.strategy>=pt||r.level<2?4:0),dt(r,3),r.status=xt);else{var s=mt+(r.w_bits-8<<4)<<8;s|=(r.strategy>=pt||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=xt,jt(r,s),0!==r.strstart&&(jt(r,t.adler>>>16),jt(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=O(t.adler,r.pending_buf,r.pending-a,a)),St(t),a=r.pending,r.pending!==r.pending_buf_size));)Dt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=O(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=O(t.adler,r.pending_buf,r.pending-a,a)),St(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindexa&&(t.adler=O(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=O(t.adler,r.pending_buf,r.pending-a,a)),St(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindexa&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=zt)}else r.status=zt;if(r.status===zt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&St(t),r.pending+2<=r.pending_buf_size&&(dt(r,255&t.adler),dt(r,t.adler>>8&255),t.adler=0,r.status=xt)):r.status=xt),0!==r.pending){if(St(t),0===t.avail_out)return r.last_flush=-1,lt}else if(0===t.avail_in&&It(e)<=it(i)&&e!==st)return Ut(t,ut);if(r.status===At&&0!==t.avail_in)return Ut(t,ut);if(0!==t.avail_in||0!==r.lookahead||e!==nt&&r.status!==At){var h=r.strategy===pt?function(t,e){for(var a;;){if(0===t.lookahead&&(Lt(t),0===t.lookahead)){if(e===nt)return 1;break}if(t.match_length=0,a=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ct(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===gt?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=yt){if(lt(t),t.lookahead<=yt&&e===nt)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+yt;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&rt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=et(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ct(t,!1),0===t.strm.avail_out)?1:2}(r,e):Kt[r.level].func(r,e);if(3!==h&&4!==h||(r.status=At),1===h||3===h)return 0===t.avail_out&&(r.last_flush=-1),lt;if(2===h&&(e===rt?at(r):e!==ht&&($(r,0,0,!1),e===it&&(Bt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),St(t),0===t.avail_out))return r.last_flush=-1,lt}return e!==st?lt:r.wrap<=0?_t:(2===r.wrap?(dt(r,255&t.adler),dt(r,t.adler>>8&255),Dt(r,t.adler>>16&255),Dt(r,t.adler>>24&255),Dt(r,255&t.total_in),Dt(r,t.total_in>>8&255),Dt(r,t.total_in>>16&255),Dt(r,t.total_in>>24&255)):(jt(r,t.adler>>>16),jt(r,65535&t.adler)),St(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?lt:_t)},deflateEnd:function(t){if(!t||!t.state)return ot;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==zt&&e!==xt&&e!==At?Ut(t,ot):(t.state=null,e===xt?Ut(t,dt):lt)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return ot;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return ot;if(1===r&&(t.adler=K(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(Bt(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,Lt(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=Et(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,Lt(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,lt},deflateInfo:"pako deflate (from Nodeca project)"};for(var Jt=new Uint8Array(256),Pt=0;Pt<256;pt++)jt[pt]=pt>=252?6:Pt>=248?5:Pt>=240?4:Pt>=224?3:Pt>=192?2:1;Jt[254]=Jt[254]=1;var Qt=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},Vt=Object.prototype.toString,Wt=F,Xt=G,Yt=J,Zt=P,$t=Q,te=V,ee=W,ae=X,ne=Y;function re(){this.options={level:ee,method:ne,chunkSize:16384,windowBits:15,memLevel:8,strategy:ae};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 Qt,this.strm.avail_out=0;var e=Gt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==$t)throw new Error(q[e]);if(t.header&&Gt.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a="[object ArrayBuffer]"===Vt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Gt.deflateSetDictionary(this.strm,a))!==$t)throw new Error(q[e]);this._dict_set=!0}}function ie(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:String(e),streamId:a})}}function se(t){var e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}re.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?Zt:Wt,"[object ArrayBuffer]"===Vt.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Xt||n===Yt)&&r.avail_out<=6)this.ondata(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=gt.deflate(r,n))===te)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Gt.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===$t;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},re.prototype.onData=function(t){this.chunks.push(t)},re.prototype.onEnd=function(t){t===$t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,G),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:se(n),additionalBytesCount:i.length};case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){ie(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){ie(e,t)}}()}();'])))}var M={status:0};function io(t,e,r,n){switch(n===void 0&&(n=ao),M.status===0&&_p(t,e,n),M.status){case 1:return M.initializationFailureCallbacks.push(r),M.worker;case 3:return M.worker}}function oa(){return M.status}function _p(t,e,r){r===void 0&&(r=ao);try{var n=r(t),a=x(t,n,"error",function(s){Ur(t,e,s)}).stop,i=x(t,n,"message",function(s){var c=s.data;c.type==="errored"?Ur(t,e,c.error,c.streamId):c.type==="initialized"&&yp(c.version)}).stop;n.postMessage({action:"init"}),U(function(){return bp(e)},gp);var o=function(){a(),i()};M={status:1,worker:n,stop:o,initializationFailureCallbacks:[]}}catch(s){Ur(t,e,s)}}function bp(t){M.status===1&&(T.error("".concat(t," failed to start: a timeout occurred while initializing the Worker")),M.initializationFailureCallbacks.forEach(function(e){return e()}),M={status:2})}function yp(t){M.status===1&&(M={status:3,worker:M.worker,stop:M.stop,version:t})}function Ur(t,e,r,n){if(M.status===1||M.status===0){if(T.error("".concat(e," failed to start: an error occurred while creating the Worker:"),r),r instanceof Event||r instanceof Error&&Sp(r.message)){var a=void 0;t.workerUrl?a="Please make sure the Worker URL ".concat(t.workerUrl," is correct and CSP is correctly configured."):a="Please make sure CSP is correctly configured.",T.error("".concat(a," See documentation at ").concat(Qe,"/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay"))}else $e(r);M.status===1&&M.initializationFailureCallbacks.forEach(function(i){return i()}),M={status:2}}else $e(r,{worker_version:M.status===3&&M.version,stream_id:n})}function Sp(t){return et(t,"Content Security Policy")||et(t,"requires 'TrustedScriptURL'")}function oo(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function Ep(t,e,r,n){var a=e.findTrackedSession(),i=wp(a,n),o=r.findView();return nv(t,{viewContext:o,errorType:i,session:a})}function wp(t,e){if(!oo())return"browser-not-supported";if(!t)return"rum-not-tracked";if(t.sessionReplay===0)return"incorrect-session-plan";if(!e)return"replay-not-started"}function Tp(t,e,r,n,a,i){var o=0;e.subscribe(9,function(){(o===2||o===3)&&(c(),o=1)}),e.subscribe(11,function(l){l.reason===Zt.UNLOADING&&c()}),e.subscribe(10,function(){o===1&&s()});function s(l){var f=r.findTrackedSession();if(Cp(f,l)){o=1;return}Ip(o)||(o=2,an(t,"interactive",function(){if(o===2){var d=i();if(!d){o=0;return}u=a(e,t,r,n,d).stop,o=3}}),Ap(f,l)&&r.setForcedReplay())}function c(){o!==0&&o===3&&u?.(),o=0}var u;return{start:s,stop:c,getSessionReplayLink:function(){return Ep(t,r,n,o!==0)},isRecording:function(){return o===3}}}function Cp(t,e){return!t||t.sessionReplay===0&&(!e||!e.force)}function Ip(t){return t===2||t===3}function Ap(t,e){return e&&e.force&&t.sessionReplay===0}function Rp(){var t=0;return{strategy:{start:function(){t=1},stop:function(){t=2},isRecording:function(){return!1},getSessionReplayLink:C},shouldStartImmediately:function(e){return t===1||t===0&&!e.startSessionReplayRecordingManually}}}function kp(t,e){if(zt()&&!Ya("records")||!oo())return{start:C,stop:C,getReplayStats:function(){},onRumStart:C,isRecording:function(){return!1},getSessionReplayLink:function(){}};var r=Rp(),n=r.strategy,a=r.shouldStartImmediately;return{start:function(o){return n.start(o)},stop:function(){return n.stop()},getSessionReplayLink:function(){return n.getSessionReplayLink()},onRumStart:i,isRecording:function(){return oa()===3&&n.isRecording()},getReplayStats:function(o){return oa()===3?lv(o):void 0}};function i(o,s,c,u,l){var f;function d(){return f||(l??(l=io(s,"Datadog Session Replay",function(){n.stop()},e)),l&&(f=no(s,l,1))),f}n=Tp(s,o,c,u,t,d),a(s)&&n.start()}}var xp=kp(mp),Op=qc(tv,xp,{startDeflateWorker:io,createDeflateEncoder:no});Qs(Tt(),"DD_RUM",Op);export{ge as DefaultPrivacyLevel,Op as datadogRum};

AltStyle によって変換されたページ (->オリジナル) /