Cloud Monitoring as a Service | Datadog Cloud Monitoring as a Service | Datadog

-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(e,t){return t?"

Cloud Monitoring as a Service | Datadog "===e?"�":"".concat(e.slice(0,-1),"\").concat(e.charCodeAt(e.length-1).toString(16)," "):"\".concat(e)})}function On(){var e={};return{get:function(){return e},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},set:function(t){e=t},getContext:function(){return M(e)},setContext:function(t){e=M(t)},setContextProperty:function(t,n){e[t]=M(n)},removeContextProperty:function(t){delete e[t]},clearContext:function(){e={}}}}Ot=function(){function e(){this.buffer=[]}return e.prototype.add=function(e){this.buffer.push(e)>500&&this.buffer.splice(0,1)},e.prototype.drain=function(){this.buffer.forEach(function(e){return e()}),this.buffer.length=0},e}();function Et(e){return{relative:e,timeStamp:fi(e)}}function fi(e){var t=w()-performance.now();return t>se()?Math.round(t+e):function(e){return Math.round(se()+e)}(e)}function o(e){return V(e)?nn(1e6*e,0):e}function w(){return(new Date).getTime()}function a(){return w()}function j(){return performance.now()}function h(){return{relative:j(),timeStamp:a()}}function Tn(){return{relative:0,timeStamp:se()}}function p(e,t){return t-e}function Un(e){return e-se()}function se(){return void 0===mt&&(mt=performance.timing.navigationStart),mt}function te(e,t,n,s){o=new Date,o.setTime(o.getTime()+n);var o,i="expires=".concat(o.toUTCString()),a=s&&s.crossSite?"none":"strict",r=s&&s.domain?";domain=".concat(s.domain):"",c=s&&s.secure?";secure":"";document.cookie="".concat(e,"=").concat(t,";").concat(i,";path=/;samesite=").concat(a).concat(r).concat(c)}function y(e){return Ze(document.cookie,e)}function Xn(e,t){te(e,"",0,t)}function Zn(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||y("datadog-synthetics-injects-rum"))}function Mt(){var e=et().DatadogEventBridge;if(e)return{getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts())},send:function(t,n){e.send(JSON.stringify({eventType:t,event:n}))}}}function R(e){void 0===e&&(e=null===(t=et().location)||void 0===t?void 0:t.hostname);var t,n=Mt();return!!n&&n.getAllowedWebViewHosts().some(function(t){return e===t||(s=e,n=".".concat(t),s.slice(-n.length)===n);var n,s})}D="?";function A(e){var n=[],t=rt(e,"stack"),s=String(e);return t&&it(t,s)&&(t=t.slice(s.length)),t&&t.split(` `).forEach(function(e){var t=function(e){if(t=Qo.exec(e),!t)return;var t,s=t[2]&&0===t[2].indexOf("native"),o=t[2]&&0===t[2].indexOf("eval"),n=Xo.exec(t[2]);return o&&n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3]),{args:s?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||D,line:t[3]?+t[3]:void 0,url:s?void 0:t[2]}}(e)||function(e){var t=Go.exec(e);if(!t)return;return{args:[],column:t[3]?+t[3]:void 0,func:D,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=Yo.exec(e);if(!t)return;return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||D,line:+t[3],url:t[2]}}(e)||function(e){if(t=Ps.exec(e),!t)return;var t,s=t[3]&&t[3].indexOf(" > eval")>-1,n=Rs.exec(t[3]);return s&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||D,line:t[4]?+t[4]:void 0,url:t[3]}}(e);t&&(!t.func&&t.line&&(t.func=D),n.push(t))}),{message:rt(e,"message"),name:rt(e,"name"),stack:n}}var es="((?:file|https?|blob|chrome-extension|native|eval|webpack||\w+\.|\/).*?)",K="(?::(\d+))",Qo=new RegExp("^\s*at (.*?) ?\(".concat(es).concat(K,"?").concat(K,"?\)?\s*$"),"i"),Xo=new RegExp("\((\S*)".concat(K).concat(K,"\)")),Go=new RegExp("^\s*at ?".concat(es).concat(K,"?").concat(K,"??\s*$"),"i"),Yo=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Ps=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Rs=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function rt(e,t){if("object"==typeof e&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var W,Y,rs="agent",Po="console",Ro="custom",oo="source",to="report";function js(e,t,n,s){return e&&(void 0!==e.message||t instanceof Error)?{message:e.message||"Empty message",stack:G(e),handlingStack:s,type:e.name}:{message:"".concat(n," ").concat(Oe(t)),stack:"No stack, consider using an instance of Error",handlingStack:s,type:e&&e.name}}function G(e){var t=Ts(e);return e.stack.forEach(function(e){var n="?"===e.func?"":e.func,s=e.args&&e.args.length>0?"(".concat(e.args.join(", "),")"):"",o=e.line?":".concat(e.line):"",i=e.line&&e.column?":".concat(e.column):"";t+=` at `.concat(n).concat(s," @ ").concat(e.url).concat(o).concat(i)}),t}function Ts(e){return"".concat(e.name||"Error",": ").concat(e.message)}function Ls(){var t,e=new Error;if(!e.stack)try{throw e}catch{}return k(function(){var n=A(e);n.stack=n.stack.slice(2),t=G(n)}),t}function ze(e){return!!W&&W.has(e)}function No(){return W||new Set}function Ne(e){return Se(e,an(window.location)).href}function $o(e){return an(Se(e))}function Se(e,t){if(function(){if(void 0!==Y)return Y;try{var e=new URL("http://test/path");return Y="http://test/path"===e.href}catch{Y=!1}return Y}())return void 0!==t?new URL(e,t):new URL(e);if(void 0===t&&!/:/.test(e))throw new Error("Invalid URL: '".concat(e,"'"));var o,n=document,s=n.createElement("a");return void 0!==t&&(o=(n=document.implementation.createHTMLDocument("")).createElement("base"),o.href=t,n.head.appendChild(o),n.body.appendChild(s)),s.href=e,s}var Pe="datadoghq.com",Is={logs:"logs",rum:"rum",sessionReplay:"session-replay"},$s={logs:"logs",rum:"rum",sessionReplay:"replay"};function J(e,t,n){var o=e.site,c=void 0===o?Pe:o,l=e.clientToken,i=c.split("."),d=i.pop(),u="".concat(Is[t],".browser-intake-").concat(i.join("-"),".").concat(d),r="https://".concat(u,"/api/v2/").concat($s[t]),s=e.proxyUrl&&Ne(e.proxyUrl);return{build:function(){var e,o="ddsource=browser"+"&ddtags=".concat(encodeURIComponent(["sdk_version:".concat("4.19.1")].concat(n).join(",")))+"&dd-api-key=".concat(l)+"&dd-evp-origin-version=".concat(encodeURIComponent("4.19.1"))+"&dd-evp-origin=browser"+"&dd-request-id=".concat(f());return"rum"===t&&(o+="&batch_time=".concat(a())),e="".concat(r,"?").concat(o),s?"".concat(s,"?ddforward=").concat(encodeURIComponent(e)):e},buildIntakeUrl:function(){return s?"".concat(s,"?ddforward"):r},endpointType:t}}Ss=/[^a-z0-9_:./-]/;function Ce(e,t){var s,o=200-e.length-1;return(t.length>o||Ss.test(t))&&n.warn("".concat(e," value doesn't meet tag requirements and will be sanitized")),s=t.replace(/,/g,"_"),"".concat(e,":").concat(s)}function qs(e){var t=function(e){var n=e.env,s=e.service,o=e.version,i=e.datacenter,t=[];return n&&t.push(Ce("env",n)),s&&t.push(Ce("service",s)),o&&t.push(Ce("version",o)),i&&t.push(Ce("datacenter",i)),t}(e),n=function(e,t){return{logsEndpointBuilder:J(e,"logs",t),rumEndpointBuilder:J(e,"rum",t),sessionReplayEndpointBuilder:J(e,"sessionReplay",t)}}(e,t),o=ut(n).map(function(e){return e.buildIntakeUrl()}),i=function(e,t,n){if(!e.replica)return;var o=s({},e,{site:Pe,clientToken:e.replica.clientToken}),i={logsEndpointBuilder:J(o,"logs",n),rumEndpointBuilder:J(o,"rum",n)};return t.push.apply(t,ut(i).map(function(e){return e.buildIntakeUrl()})),s({applicationId:e.replica.applicationId},i)}(e,o,t);return s({isIntakeUrl:function(e){return o.some(function(t){return 0===e.indexOf(t)})},replica:i,site:e.site||Pe},n)}z={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"};function Ys(e){var t,o,i;if(e&&e.clientToken)if(void 0===e.sampleRate||ye(e.sampleRate)){if(void 0===e.telemetrySampleRate||ye(e.telemetrySampleRate))return t=e.enableExperimentalFeatures,Array.isArray(t)&&(W||(W=new Set(t)),t.filter(function(e){return"string"==typeof e}).forEach(function(e){U(e,"-")&&n.warn("please use snake case for '".concat(e,"'")),W.add(e)})),s({beforeSend:e.beforeSend&&Bt(e.beforeSend,"beforeSend threw an error:"),cookieOptions:bs(e),sampleRate:null!==(o=e.sampleRate)&&void 0!==o?o:100,telemetrySampleRate:null!==(i=e.telemetrySampleRate)&&void 0!==i?i:20,service:e.service,silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144},qs(e));n.error("Telemetry Sample Rate should be a number between 0 and 100")}else n.error("Sample Rate should be a number between 0 and 100");else n.error("Client Token is not configured, we will not send any data.")}function bs(e){var t={};return t.secure=function(e){return!!e.useSecureSessionCookie||!!e.useCrossSiteSessionCookie}(e),t.crossSite=!!e.useCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===Ue){for(var t="dd_site_test_".concat(f()),n=window.location.hostname.split("."),e=n.pop();n.length&&!y(t);)e="".concat(n.pop(),".").concat(e),te(t,"test",L,{domain:e});Xn(t,{domain:e}),Ue=e}return Ue}()),t}i=function(){function e(e){this.onFirstSubscribe=e,this.observers=[]}return e.prototype.subscribe=function(e){var t=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(e),{unsubscribe:function(){t.observers=t.observers.filter(function(t){return e!==t}),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},e.prototype.notify=function(e){this.observers.forEach(function(t){return t(e)})},e}();function vs(){for(var t,n=[],e=0;e"],Uo=["ddog-gov.com"],N={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1};function Ko(e){var t,n=new i;return N.telemetryEnabled=ke(e.telemetrySampleRate),Xe=function(s){!U(Uo,e.site)&&N.telemetryEnabled&&n.notify(function(e){return S({type:"telemetry",date:a(),service:"browser-sdk",version:"4.19.1",source:"browser",_dd:{format_version:2},telemetry:e,experimental_features:sn(No())},void 0!==t?t():{})}(s))},At=ie,s(N,{maxEventsPerPage:e.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(e){t=e},observable:n}}function tt(e,t){kt(C.debug,e,t),Jn(s({message:e,status:"debug"},t))}function ie(e){Jn(s({status:"error"},function(e){if(e instanceof Error){var t=A(e);return{error:{kind:t.name,stack:G(ei(t))},message:t.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught ".concat(Oe(e))}}(e)))}function Jn(e){Xe&&N.sentEventCountt[e])return!1;return!0}function li(e){if(t=Fn(e),t){var t,n=t.startTime,l=t.fetchStart,h=t.redirectStart,u=t.redirectEnd,d=t.domainLookupStart,i=t.domainLookupEnd,a=t.connectStart,r=t.secureConnectionStart,o=t.connectEnd,m=t.requestStart,c=t.responseStart,s={download:$(n,c,t.responseEnd),first_byte:$(n,m,c)};return o!==l&&(s.connect=$(n,a,o),lt(a,r,o)&&(s.ssl=$(n,r,o))),i!==l&&(s.dns=$(n,d,i)),Cn(e)&&(s.redirect=$(n,h,u)),s}}function Fn(e){if(lt(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd)){if(!Cn(e))return e;var t=e.redirectStart,n=e.redirectEnd;if(t=0;t-=1){if(s=e.body.childNodes[t],n=bn(s))return n;if(!ji(s))break}}(e);if(!t)return;return _n(Ze(t,"trace-id"),Ze(t,"trace-time"))}(e);if(t&&!(t.traceTime0?e=s(performance.getEntriesByType("navigation")[0].toJSON(),n):(t=Jt(),e=s(t,{decodedBodySize:0,duration:t.responseEnd,name:window.location.href,startTime:0},n)),i(e)}),hn())&&(a=performance.getEntries(),setTimeout(e(function(){return ne(t,n,a)}))),window.PerformanceObserver){var i,a,r=e(function(e){return ne(t,n,e.getEntries())}),o=["resource","navigation","longtask","paint"],c=["largest-contentful-paint","first-input","layout-shift"];try{c.forEach(function(e){new PerformanceObserver(r).observe({type:e,buffered:!0})})}catch{o.push.apply(o,c)}new PerformanceObserver(r).observe({entryTypes:o}),hn()&&"addEventListener"in performance&&performance.addEventListener("resourcetimingbufferfull",function(){performance.clearResourceTimings()})}fe("navigation")||function(t){function n(){t(s(Jt(),{entryType:"navigation"}))}at("complete",function(){setTimeout(e(n))})}(function(e){ne(t,n,[e])}),fe("first-input")||function(e){var s=w(),t=!1,o=g(window,["click","mousedown","keydown","touchstart","pointerdown"],function(e){if(e.cancelable){var t={entryType:"first-input",processingStart:j(),startTime:e.timeStamp};"pointerdown"===e.type?i(t):n(t)}},{passive:!0,capture:!0}).stop;function i(e){g(window,["pointerup","pointercancel"],function(t){"pointerup"===t.type&&n(e)},{once:!0})}function n(n){if(!t){t=!0,o();var i=n.processingStart-n.startTime;i>=0&&i2500)){var e=d[d.length-1],t=j();void 0!==e&&void 0===e.end||d.push({start:t})}}function Ui(){if(0!==d.length){var e=d[d.length-1],t=j();void 0===e.end&&(e.end=t)}}function Wi(e){for(var t,n=d.length-1;n>=0;n--){if(t=d[n],void 0!==t.end&&e>t.end)break;if(e>t.start&&(void 0===t.end||e=c;i--){if(n=d[i],void 0!==n.end&&e>n.end)break;if(!(sn.start?e:n.start,l=p(e,r),u=p(r,void 0===n.end||s=0&&s.entries.splice(e,1)},close:function(e){n.endTime=e}};return this.entries.unshift(n),n},e.prototype.find=function(e){void 0===e&&(e=le);for(var t,n=0,s=this.entries;n0&&this.entries[this.entries.length-1].endTime0})}});return s}(t,n,s);return function(t,n,s){var o,r=!1,c=setTimeout(e(function(){return i({hadActivity:!1})}),100),d=s&&setTimeout(e(function(){return i({hadActivity:!0,end:a()})}),s),u=t.subscribe(function(t){var n,s=t.isBusy;clearTimeout(c),clearTimeout(o),n=a(),s||(o=setTimeout(e(function(){return i({hadActivity:!0,end:n})}),100))}),l=function(){r=!0,clearTimeout(c),clearTimeout(o),clearTimeout(d),u.unsubscribe()};function i(e){r||(l(),n(e))}return{stop:l}}(c,o,r)}function yt(e,t){return wn(e.excludedActivityUrls,t)}jn=L;function vi(t,n){var i,s=[],o=0;function r(t){t.stopObservable.subscribe(c),s.push(t),clearTimeout(i),i=setTimeout(e(a),1e3)}function c(){1===o&&s.every(function(e){return e.isStopped()})&&(o=2,n(s))}function a(){clearTimeout(i),0===o&&(o=1,c())}return r(t),{tryAppend:function(e){return 0===o&&(s.length>0&&(t=s[s.length-1].event,n=e.event,!(t.target===n.target&&(i=t,c=n,Math.sqrt(Math.pow(i.clientX-c.clientX,2)+Math.pow(i.clientY-c.clientY,2))0)return F(e.labels[0],t)}else if(e.id){var n=e.ownerDocument&&ge(e.ownerDocument.querySelectorAll("label"),function(t){return t.htmlFor===e.id});return n&&F(n,t)}},function(e){if("INPUT"===e.nodeName){var n=e,t=n.getAttribute("type");if("button"===t||"submit"===t||"reset"===t)return n.value}},function(e,t){if("BUTTON"===e.nodeName||"LABEL"===e.nodeName||"button"===e.getAttribute("role"))return F(e,t)},function(e){return e.getAttribute("aria-label")},function(e,t){var n=e.getAttribute("aria-labelledby");if(n)return n.split(/\s+/).map(function(t){return function(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}(e,t)}).filter(function(e){return Boolean(e)}).map(function(e){return F(e,t)}).join(" ")},function(e){return e.getAttribute("alt")},function(e){return e.getAttribute("name")},function(e){return e.getAttribute("title")},function(e){return e.getAttribute("placeholder")},function(e,t){if("options"in e&&e.options.length>0)return F(e.options[0],t)}],kn=[function(e,t){return F(e,t)}];function An(e,t,n){for(var o,i,a,r,s=e,c=0;c100?"".concat(rn(e,100)," [...]"):e}function F(e,t){if(!e.isContentEditable){if("innerText"in e){var n=e.innerText,s=function(t){for(var s,i,a=e.querySelectorAll(t),o=0;o0&&(n=n.replace(s,"")))};return Boolean(document.documentMode)&&s("script, style"),s("[".concat(pe,"]")),t&&s("[".concat(t,"]")),n}return e.textContent}}zn=["data-dd-action-name","data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"];function ci(e,t){var n=function(){return dt||(dt=zn.map(function(e){return function(t){return Hn(e,t)}})),dt}();return t&&(n=[function(e){return Hn(t,e)}].concat(n)),{selector:B(e,n.concat(I({})),n.concat(q({}))),selector_without_classes:B(e,n.concat(I({})),n),selector_without_body_classes:B(e,n.concat(I({})),n.concat(q({ignoreBody:!0}))),selector_without_generated_id_and_classes:B(e,n.concat(I({ignoreGeneratedValue:!0})),n.concat(q({ignoreGeneratedValue:!0}))),selector_with_only_first_class:B(e,n.concat(I({})),n.concat(q({keepOnlyFirst:!0}))),selector_all_together:B(e,n.concat(I({ignoreGeneratedValue:!0})),n.concat(q({ignoreGeneratedValue:!0,ignoreBody:!0,keepOnlyFirst:!0})))}}function Nn(e){return/[0-9]/.test(e)}function B(e,t,n){for(var i,a,o=[],s=e;s&&"HTML"!==s.nodeName;){if(i=Bn(s,t,ii),i){o.unshift(i);break}a=Bn(s,n,oi),a?o.unshift(a):o.unshift(ai(s)),s=s.parentElement}return o.join(">")}function I(e){var t=e.ignoreGeneratedValue;return function(e){if(e.id&&(!t||!Nn(e.id)))return"#".concat(nt(e.id))}}function q(e){var t=e.ignoreBody,n=e.ignoreGeneratedValue,s=e.keepOnlyFirst;return function(e){if((!t||"BODY"!==e.tagName)&&e.classList.length>0){var o=sn(e.classList);return n&&(o=o.filter(function(e){return!Nn(e)})),s&&(o=o.slice(0,1)),"".concat(e.tagName).concat(o.sort().map(function(e){return".".concat(nt(e))}).join(""))}}}function Hn(e,t){if(t.hasAttribute(e))return"".concat(t.tagName,"[").concat(e,'="').concat(nt(t.getAttribute(e)),'"]')}function ai(e){for(var s,t=e.parentElement.firstElementChild,n=0;t&&!(t.tagName===e.tagName&&(n+=1,t===e&&(s=n),void 0!==s&&n>1));)t=t.nextElementSibling;return 1===n?e.tagName:"".concat(e.tagName,":nth-of-type(").concat(s,")")}function Bn(e,t,n){for(var s,o=0,i=t;o0},get hasPageActivity(){return void 0!==r},getUserActivity:n,addFrustration:function(e){h.push(e)},isStopped:function(){return 1===a||2===a},clone:function(){return Yn(e,t,n,o)},validate:function(t){if(l(),1===a){var n=c.eventCounts,i=n.resourceCount,u=n.errorCount,m=n.longTaskCount,f=s({type:"click",duration:r&&p(o.startClocks.timeStamp,r),id:d,frustrationTypes:h,counts:{resourceCount:i,errorCount:u,longTaskCount:m},events:t??[o.event]},o);e.notify(1,f),a=2}},discard:function(){l(),a=2}}}function Gn(e,t){var i=ot(e)?{action:{id:e.id,loading_time:o(e.duration),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position}}}:void 0,a=ot(e)?void 0:e.context,n=S({action:{id:f(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:"action"},i),s=t.isInForegroundAt(e.startClocks.relative);return void 0!==s&&(n.view={in_foreground:s}),{customerContext:a,rawRumEvent:n,startTime:e.startClocks.relative,domainContext:ot(e)?{event:e.event,events:e.events}:{}}}function ot(e){return"custom"!==e.type}Qn=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function Jo(e){var t=function(e){return m(window,"onerror",{before:function(t,n,s,o,i){if(i)c=A(i),e(c,i);else{var r,c,l,d={url:n,column:o,line:s},a=t;"[object String]"==={}.toString.call(t)&&(r=Qn.exec(a),r&&(l=r[1],a=r[2])),e(c={name:l,message:"string"==typeof a?a:void 0,stack:[d]},t)}}})}(e).stop,n=function(e){return m(window,"onunhandledrejection",{before:function(t){var n=t.reason||"Empty reason",s=A(n);e(s,n)}})}(e).stop;return{stop:function(){t(),n()}}}we={};function Zo(e){var t=e.map(function(e){return we[e]||(we[e]=function(e){var t=new i(function(){var n=console[e];return console[e]=function(){for(var i,o=[],s=0;s=o-s&&Qe(n)=0&&n.responseStart=0;n-=1)if(s=e[n],t(s,n,e))return s}(e,function(e){return"largest-contentful-paint"===e.entryType&&e.startTime=0?o:0,firstInputTime:s.startTime}))}).unsubscribe}}(e,function(e){n({firstInputDelay:e.firstInputDelay,firstInputTime:e.firstInputTime})}).stop;return{stop:function(){i(),a(),r(),c()}}}function Zs(e,t,n,s,o,i){var r,a={eventCounts:{errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0}},d=gn(e,function(e){a.eventCounts=e,s()}).stop,c=function(e,t,n,s,o,i){var r="initial_load"===s,c=!0,a=[];function l(){!c&&!r&&a.length>0&&i(Math.max.apply(Math,a))}return{stop:vn(e,t,n,function(e){c&&(c=!1,e.hadActivity&&a.push(p(o.timeStamp,e.end)),l())}).stop,setLoadEvent:function(e){r&&(r=!1,a.push(e),l())}}}(e,t,n,o,i,function(e){a.loadingTime=e,s()}),u=c.stop,h=c.setLoadEvent;return fe("layout-shift")?(a.cumulativeLayoutShift=0,r=function(e,t){var n=0,s=function(){var e,t,n=0;return{update:function(s){void 0===e||s.startTime-t>=L||s.startTime-e>=5e3?(e=t=s.startTime,n=s.value):(n+=s.value,t=s.startTime)},value:function(){return n}}}();return{stop:e.subscribe(0,function(e){for(var o,i=0,a=e;in&&(n=s.value(),t(nn(n,4))))}).unsubscribe}}(e,function(e){a.cumulativeLayoutShift=e,s()}).stop):r=l,{stop:function(){d(),u(),r()},setLoadEvent:h,viewMetrics:a}}function Qs(t,n,s,o,i,r,c){var d,h=function(e){var i=ws(n,s,o,t,"initial_load",Tn(),e),a=Js(n,function(e){i.updateTimings(e),i.scheduleUpdate()}).stop;return{initialView:i,stop:a}}(c),m=h.stop,l=h.initialView,f=function(){n.subscribe(8,function(){l.end(),l=u(void 0,{name:l.name,service:l.service,version:l.version})}),n.subscribe(9,function(){l.end(),l.triggerUpdate()});var t=window.setInterval(e(function(){l.triggerUpdate()}),3e5);return{stop:function(){clearInterval(t)}}}().stop;function u(e,i){return ws(n,s,o,t,"route_change",e,i)}return r&&(d=function(e){return e.subscribe(function(e){var t,n,s,o,i=e.oldLocation,a=e.newLocation;if(t=a,(n=i).pathname!==t.pathname||(s=t.hash,o=s.substr(1),!document.getElementById(o)&&Os(t.hash)!==Os(n.hash)))return l.end(),l.triggerUpdate(),void(l=u())})}(i)),{addTiming:function(e,t){void 0===t&&(t=a()),l.addTiming(e,t),l.scheduleUpdate()},startView:function(e,t){l.end(t),l.triggerUpdate(),l=u(t,e)},stop:function(){d==null||d.unsubscribe(),m(),f(),l.end()}}}function ws(t,o,i,r,c,l,d){void 0===l&&(l=h());var u,m,g,v,y=f(),C={},x={},_=0,E=Z(r);d&&(m=d.name,g=d.service,v=d.version),t.notify(2,{id:y,name:m,startClocks:l,service:g,version:v});var w=H(e(j),3e3,{leading:!1}),O=w.throttled,k=w.cancel,b=Zs(t,o,i,O,c,l),A=b.setLoadEvent,S=b.stop,M=b.viewMetrics;function j(){_+=1;var e=void 0===u?a():u.timeStamp;t.notify(3,s({customTimings:x,documentVersion:_,id:y,name:m,service:g,version:v,loadingType:c,location:E,startClocks:l,timings:C,duration:p(l.timeStamp,e),isActive:void 0===u},M))}return j(),{name:m,service:g,version:v,scheduleUpdate:O,end:function(e){void 0===e&&(e=h()),u=e,t.notify(4,{endClocks:u}),S()},triggerUpdate:function(){k(),j()},updateTimings:function(e){C=e,void 0!==e.loadEvent&&A(e.loadEvent)},addTiming:function(e,t){var s=function(e){return e=100)Ds();else{var s,o,i,n=X();if(He()){if(n.lock)return void ae(e,t);if(o=f(),n.lock=o,De(n,e.options),(n=X()).lock!==o)return void ae(e,t)}if(s=e.process(n),He()&&(n=X()).lock!==o)ae(e,t);else{if(s&&Ns(s,e.options),He()&&(!s||!zs(s))){if((n=X()).lock!==o)return void ae(e,t);delete n.lock,De(n,e.options),s=n}null===(i=e.after)||void 0===i||i.call(e,s||n),Ds()}}else Ms.push(e)}function He(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)}function ae(t,n){setTimeout(e(function(){Q(t,n+1)}),10)}function Ds(){xe=void 0;var e=Ms.shift();e&&Q(e)}function Ns(e,t){zs(e)?function(e){te(Ee,"",0,e)}(t):(e.expire=String(w()+qt),De(e,t))}function De(e,t){te(Ee,function(e){return ct(e).map(function(e){var t=e[0],n=e[1];return"".concat(t,"=").concat(n)}).join(We)}(e),qt,t)}function X(){var e=y(Ee),t={};return function(e){return void 0!==e&&(-1!==e.indexOf(We)||ks.test(e))}(e)&&e.split(We).forEach(function(e){if(n=ks.exec(e),null!==n){var n,s=n[1],o=n[2];t[s]=o}}),t}function zs(e){return _e(e)}function Hs(t,n,s){var l=new i,d=new i,u=setInterval(e(function(){Q({options:t,process:function(e){return c(e)?void 0:{}},after:a})}),1e3),o=function(){var e=X();return c(e)?e:{}}();function a(e){return c(e)||(e={}),r()&&(function(e){return o.id!==e.id||o[n]!==e[n]}(e)?(o={},d.notify()):o=e),e}function r(){return void 0!==o[n]}function c(e){return(void 0===e.created||w()-Number(e.created)=this.messageBytesLimit?n.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB.")):(this.hasMessageFor(t)&&this.remove(t),this.willReachedBytesLimitWith(s)&&this.flush(),this.push(i,s,t),this.isFull()&&this.flush())},t.prototype.process=function(e){var t=Oe(e);return{processedMessage:t,messageBytesCount:this.computeBytesCount(t)}},t.prototype.push=function(e,t,n){this.bufferMessagesCount>0&&(this.bufferBytesCount+=1),void 0!==n?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.bufferBytesCount+=t,this.bufferMessagesCount+=1},t.prototype.remove=function(e){var t,n=this.upsertBuffer[e];delete this.upsertBuffer[e],t=this.computeBytesCount(n),this.bufferBytesCount-=t,this.bufferMessagesCount-=1,this.bufferMessagesCount>0&&(this.bufferBytesCount-=1)},t.prototype.hasMessageFor=function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},t.prototype.willReachedBytesLimitWith=function(e){return this.bufferBytesCount+e+1>=this.batchBytesLimit},t.prototype.isFull=function(){return this.bufferMessagesCount===this.batchMessagesLimit||this.bufferBytesCount>=this.batchBytesLimit},t.prototype.flushPeriodically=function(){var t=this;setTimeout(e(function(){t.flush(),t.flushPeriodically()}),this.flushTimeout)},t.prototype.setupFlushOnExit=function(){var e=this;navigator.sendBeacon&&(r(window,"beforeunload",this.beforeUnloadCallback),r(document,"visibilitychange",function(){"hidden"===document.visibilityState&&e.flushOnExit()}),r(window,"beforeunload",function(){return e.flushOnExit()}))},t}(),Ks=3145728;function As(e,t,n,s,o){0===t.transportStatus&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?Cs(e,t,n,{onSuccess:function(){return xs(0,t,n,s,o)},onFailure:function(){t.queuedPayloads.enqueue(e),Es(t,n,s,o)}}):t.queuedPayloads.enqueue(e)}function Es(t,n,s,o){2===t.transportStatus&&setTimeout(e(function(){Cs(t.queuedPayloads.first(),t,n,{onSuccess:function(){t.queuedPayloads.dequeue(),0!==t.lastFailureStatus&&tt("resuming after transport down",{failureStatus:t.lastFailureStatus}),t.currentBackoffTime=1e3,xs(1,t,n,s,o)},onFailure:function(){t.currentBackoffTime=Math.min(6e4,2*t.currentBackoffTime),Es(t,n,s,o)}})}),t.currentBackoffTime)}function Cs(e,t,n,s){var o=s.onSuccess,i=s.onFailure;t.bandwidthMonitor.add(e),n(e,function(n){t.bandwidthMonitor.remove(e),function(e){return 0===e.status||408===e.status||429===e.status||e.status>=500}(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,t.lastFailureStatus=n.status,i()):(t.transportStatus=0,o())})}function xs(e,t,n,s,o){0===e&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:"Reached max ".concat(s," events size queued for upload: ").concat(3,"MiB"),source:rs,startClocks:h()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=_s();i.size()>0;)As(i.dequeue(),t,n,s,o)}function _s(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=Ks}}}function ys(e,t,n){var s={transportStatus:0,lastFailureStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount1e5&&"data:"===i.slice(0,5)?"data:truncated":i}In=1,Ln=/[^a-z1-6-_]/;function Dn(e){var t=e.toLowerCase().trim();return Ln.test(t)?"div":t}function St(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(di).join(""):null}catch{return null}}function di(e){return function(e){return"styleSheet"in e}(e)?St(e.styleSheet)||"":e.cssText}function ui(t){var s=l,n=[];function o(){s(),t(n),n=[]}return{addMutations:function(t){0===n.length&&(s=function(t,n){if(window.requestIdleCallback){var s,o=window.requestIdleCallback(e(t),n);return function(){return window.cancelIdleCallback(o)}}return s=window.requestAnimationFrame(e(t)),function(){return window.cancelAnimationFrame(s)}}(o,{timeout:100})),n.push.apply(n,t)},flush:o,stop:function(){s()}}}function hi(n,s,o){if(i=Pn(),!i)return{stop:l};var i,a=ui(function(e){!function(e,n,s){var o=e.filter(function(e){return document.contains(e.target)&&function(e){for(var t=e;t;){if(!b(t))return!1;t=t.parentNode}return!0}(e.target)&&O(e.target,s.defaultPrivacyLevel)!==t.HIDDEN}),i=function(e,n){for(var s,i,r,l,u,g,o=new Set,v=new Map,y=function(e){ce(e.addedNodes,function(e){o.add(e)}),ce(e.removedNodes,function(t){o.has(t)||v.set(t,e.target),o.delete(t)})},d=0,h=e;d25||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>25}()?(n.layoutViewportX=Math.round(e+s.offsetLeft),n.layoutViewportY=Math.round(t+s.offsetTop)):(n.visualViewportX=Math.round(e-s.offsetLeft),n.visualViewportY=Math.round(t-s.offsetTop)),n):n},Ke=function(){var e=window.visualViewport;return{scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width}};function yn(){var t,e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function fn(){var t,e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}Ae=new WeakMap,ln=1;function cn(e){return Ae.has(e)||Ae.set(e,ln++),Ae.get(e)}function wi(n){var o,i,a,d,u,h,f,p,v=(o=n.mutationController,i=n.mutationCb,a=n.configuration,hi(o,i,a).stop),j=function(t){var n=H(e(function(e){if(n=e.target,b(n)){var n,o=xt(e)?e.changedTouches[0]:e,i=o.clientX,a=o.clientY,s={id:c(n),timeOffset:0,x:i,y:a};if(window.visualViewport){var r=st(i,a),l=r.visualViewportX,d=r.visualViewportY;s.x=l,s.y=d}t([s],xt(e)?Oo:bo)}}),50,{trailing:!1}).throttled;return g(document,["mousemove","touchmove"],n,{capture:!0,passive:!0}).stop}(n.mousemoveCb),y=function(e,n){var o=function(o){if(i=o.target,O(i,n)!==t.HIDDEN&&b(i)){var i,h,r=xt(o)?o.changedTouches[0]:o,l=r.clientX,d=r.clientY,a={id:c(i),type:Fe[o.type],x:l,y:d};if(window.visualViewport){var u=st(l,d),m=u.visualViewportX,f=u.visualViewportY;a.x=m,a.y=f}h=s({id:cn(o)},x(jo,a)),e(h)}};return g(document,Object.keys(Fe),o,{capture:!0,passive:!0}).stop}(n.mouseInteractionCb,n.configuration.defaultPrivacyLevel),_=function(n,s,o){var i=H(e(function(e){if(i=e.target,i&&O(i,s)!==t.HIDDEN&&b(i)){var i,r=c(i),a=i===document?{scrollTop:fn(),scrollLeft:yn()}:{scrollTop:Math.round(i.scrollTop),scrollLeft:Math.round(i.scrollLeft)};o.set(i,a),n({id:r,x:a.scrollLeft,y:a.scrollTop})}}),100).throttled;return r(document,"scroll",i,{capture:!0,passive:!0}).stop}(n.scrollCb,n.configuration.defaultPrivacyLevel,n.elementsScrollPositions),w=function(e){return Pt().subscribe(e).unsubscribe}(n.viewportResizeCb),C=function(e,n){i=new WeakMap;function o(e){var s,i,r,c,o=O(e,n);if(o!==t.HIDDEN){if(s=e.type,"radio"===s||"checkbox"===s){if(je(e,o))return;i={isChecked:e.checked}}else{if(r=jt(e,o),void 0===r)return;i={text:r}}a(e,i),c=e.name,"radio"===s&&c&&e.checked&&ce(document.querySelectorAll('input[type="radio"][name="'.concat(c,'"]')),function(t){t!==e&&a(t,{isChecked:!1})})}}function a(t,n){if(b(t)){var o=i.get(t);o&&o.text===n.text&&o.isChecked===n.isChecked||(i.set(t,n),e(s({id:c(t)},n)))}}var i,r=g(document,["input","change"],function(e){(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement)&&o(e.target)},{capture:!0,passive:!0}).stop,l=[oe(HTMLInputElement.prototype,"value",o),oe(HTMLInputElement.prototype,"checked",o),oe(HTMLSelectElement.prototype,"value",o),oe(HTMLTextAreaElement.prototype,"value",o),oe(HTMLSelectElement.prototype,"selectedIndex",o)];return function(){l.forEach(function(e){return e.stop()}),r()}}(n.inputCb,n.configuration.defaultPrivacyLevel),E=(d=n.mediaInteractionCb,u=n.configuration.defaultPrivacyLevel,g(document,["play","pause"],function(e){var n=e.target;n&&O(n,u)!==t.HIDDEN&&b(n)&&d({id:c(n),type:"play"===e.type?Vo:Lo})},{capture:!0,passive:!0}).stop),k=function(e){function t(e,t){e&&b(e.ownerNode)&&t(c(e.ownerNode))}var s=[m(CSSStyleSheet.prototype,"insertRule",{before:function(n,s){t(this,function(t){return e({id:t,adds:[{rule:n,index:s}]})})}}),m(CSSStyleSheet.prototype,"deleteRule",{before:function(n){t(this,function(t){return e({id:t,removes:[{index:n}]})})}})];"undefined"!=typeof CSSGroupingRule?n(CSSGroupingRule):(n(CSSMediaRule),n(CSSSupportsRule));function n(n){s.push(m(n.prototype,"insertRule",{before:function(n,s){var o=this;t(this.parentStyleSheet,function(t){var i=qn(o);i&&(i.push(s||0),e({id:t,adds:[{rule:n,index:i}]}))})}}),m(n.prototype,"deleteRule",{before:function(n){var s=this;t(this.parentStyleSheet,function(t){var o=qn(s);o&&(o.push(n),e({id:t,removes:[{index:o}]}))})}}))}return function(){return s.forEach(function(e){return e.stop()})}}(n.styleSheetCb),A=(h=n.focusCb,g(window,["focus","blur"],function(){h({has_focus:document.hasFocus()})}).stop),S=function(t){if(!window.visualViewport)return l;var n=H(e(function(){t(Ke())}),200,{trailing:!1}),s=n.throttled,o=n.cancel,i=g(window.visualViewport,["resize","scroll"],s,{capture:!0,passive:!0}).stop;return function(){i(),o()}}(n.visualViewportResizeCb),M=(f=n.lifeCycle,p=n.frustrationCb,f.subscribe(10,function(e){var t,n,s;"action"===e.rawRumEvent.type&&"click"===e.rawRumEvent.action.type&&(null===(n=null===(t=e.rawRumEvent.action.frustration)||void 0===t?void 0:t.type)||void 0===n?void 0:n.length)&&"events"in e.domainContext&&(null===(s=e.domainContext.events)||void 0===s?void 0:s.length)&&p({timestamp:e.rawRumEvent.date,type:uo,data:{frustrationTypes:e.rawRumEvent.action.frustration.type,recordIds:e.domainContext.events.map(function(e){return cn(e)})}})}).unsubscribe);return function(){v(),j(),y(),_(),w(),C(),E(),k(),A(),S(),M()}}Fe=((_={}).mouseup=Eo,_.mousedown=ko,_.click=Ao,_.contextmenu=So,_.dblclick=Mo,_.focus=Fo,_.blur=To,_.touchstart=zo,_.touchend=Do,_);function xi(e){if(t=e.emit,!t)throw new Error("emit function is required");var t,n,s=new xn,o=(n=new WeakMap,{set:function(e,t){(e!==document||document.scrollingElement)&&n.set(e===document?document.scrollingElement:e,t)},get:function(e){return n.get(e)},has:function(e){return n.has(e)}}),i=function(n,i){void 0===n&&(n=a()),void 0===i&&(i={status:0,elementsScrollPositions:o}),s.flush();var r=zt(),c=r.width,l=r.height;t({data:{height:l,href:window.location.href,width:c},type:ao,timestamp:n}),t({data:{has_focus:document.hasFocus()},type:hs,timestamp:n}),t({data:{node:ni(document,e.configuration,i),initialOffset:{left:yn(),top:fn()}},type:Be,timestamp:n}),window.visualViewport&&t({data:Ke(),type:us,timestamp:n})};return i(),{stop:wi({lifeCycle:e.lifeCycle,configuration:e.configuration,mutationController:s,elementsScrollPositions:o,inputCb:function(e){return t(x(wo,e))},mediaInteractionCb:function(e){return t(x(xo,e))},mouseInteractionCb:function(e){return t(e)},mousemoveCb:function(e,n){return t(x(n,{positions:e}))},mutationCb:function(e){return t(x(vo,e))},scrollCb:function(e){return t(x(yo,e))},styleSheetCb:function(e){return t(x(Co,e))},viewportResizeCb:function(e){return t(x(_o,e))},frustrationCb:function(e){return t(e)},focusCb:function(e){return t({data:e,type:hs,timestamp:a()})},visualViewportResizeCb:function(e){t({data:e,type:us,timestamp:a()})}}),takeSubsequentFullSnapshot:function(e){return i(e,{status:1,elementsScrollPositions:o})},flushMutations:function(){return s.flush()}}}function Ei(e){return he(e).segments_count}function on(e){he(e).records_count+=1}function Ai(e){return u?.get(e)}function he(e){var t;return u||(u=new Map),u.has(e)?t=u.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},u.set(e,t),u.size>10&&function(){if(!u)return;if(u.keys)u.delete(u.keys().next().value);else{var e=!0;u.forEach(function(t,n){e&&(u.delete(n),e=!1)})}}()),t}var Je,Fi=0,Ti=function(){function t(t,n,o,i,a,r){var c,l,d=this;this.worker=t,this.isFlushed=!1,this.id=Fi++,c=n.view.id,this.metadata=s({start:i.timestamp,end:i.timestamp,creation_reason:o,records_count:1,has_full_snapshot:i.type===Be,index_in_view:Ei(c),source:"browser"},n),function(e){he(e).segments_count+=1}(c),on(c),l=e(function(e){var n=e.data;"errored"!==n.type&&"initialized"!==n.type&&(n.id===d.id?(!function(e,t){he(e).segments_total_raw_size+=t}(c,n.additionalBytesCount),"flushed"===n.type?(r(n.result,n.rawBytesCount),t.removeEventListener("message",l)):a(n.compressedBytesCount)):n.id>d.id&&(t.removeEventListener("message",l),tt("Segment did not receive a 'flush' response before being replaced.")))}),t.addEventListener("message",l),this.worker.postMessage({data:'{"records":['.concat(JSON.stringify(i)),id:this.id,action:"write"})}return t.prototype.addRecord=function(e){var t;this.metadata.start=Math.min(this.metadata.start,e.timestamp),this.metadata.end=Math.max(this.metadata.end,e.timestamp),this.metadata.records_count+=1,on(this.metadata.view.id),(t=this.metadata).has_full_snapshot||(t.has_full_snapshot=e.type===Be),this.worker.postMessage({data:",".concat(JSON.stringify(e)),id:this.id,action:"write"})},t.prototype.flush=function(){this.worker.postMessage({data:"],".concat(JSON.stringify(this.metadata).slice(1),` `),id:this.id,action:"flush"}),this.isFlushed=!0},t}(),tn=6e4;function Di(t,n,s,o,i,a){return function(t,n,s,o,i){void 0===i&&(i=window);var a={status:0,nextSegmentCreationReason:"init"},l=t.subscribe(2,function(){c("view_change")}).unsubscribe,d=t.subscribe(9,function(){c("before_unload")}).unsubscribe,u=r(i,"visibilitychange",function(){"hidden"===document.visibilityState&&c("visibility_hidden")},{capture:!0}).stop;function c(e){1===a.status&&(a.segment.flush(),clearTimeout(a.expirationTimeoutId)),a=e?{status:0,nextSegmentCreationReason:e}:{status:2}}function h(t,i){var r,l=n();l&&(r=new Ti(o,l,t,i,function(e){!r.isFlushed&&e>tn&&c("segment_bytes_limit")},function(e,t){s(e,r.metadata,t)}),a={status:1,segment:r,expirationTimeoutId:setTimeout(e(function(){c("segment_duration_limit")}),3e4)})}return{addRecord:function(e){switch(a.status){case 0:h(a.nextSegmentCreationReason,e);break;case 1:a.segment.addRecord(e)}},stop:function(){c(),l(),d(),u()}}}(t,function(){return function(e,t,n){var s=t.findTrackedSession(),o=n.findView();if(!s||!o)return;return{application:{id:e},session:{id:s.id},view:{id:o.id}}}(n,s,o)},i,a)}function en(){return Je||(Je=URL.createObjectURL(new Blob(["(".concat(Li,")(self)")]))),new Worker(Je)}function Li(){function e(e){return function(){try{return e.apply(this,arguments)}catch(e){try{self.postMessage({type:"errored",error:e})}catch{self.postMessage({type:"errored",error:"".concat(e)})}}}}e(function(){var n=function(){var dt=4,be=0,Ae=1,ft=2;function T(e){for(var t=e.length;--t>=0;)e[t]=0}var st=0,pe=1,Ye=2,Ct=3,kt=258,le=29,V=256,B=V+1+le,A=30,oe=19,ge=2*B+1,_=15,ue=16,Vt=7,ce=256,je=16,ye=17,Me=18,ae=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]),U=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]),yt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Fe=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),bt=512,u=new Array(2*(B+2));T(u),S=new Array(2*A),T(S),M=new Array(bt),T(M),F=new Array(kt-Ct+1),T(F),$=new Array(le),T($),L=new Array(A);function he(e,t,n,s,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=s,this.max_length=o,this.has_stree=e&&e.length}function de(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}T(L);var h,S,M,F,z,L,$,G,De,Ne,Le,Pe=function(e){return e>>7)]},D=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},i=function(e,t,n){e.bi_valid>ue-n?(e.bi_buf|=t>ue-e.bi_valid,e.bi_valid+=n-ue):(e.bi_buf|=t>>=1,n0)return n>>>1},ct=function(e){16===e.bi_valid?(D(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)},at=function(e,t){var n,s,i,a,c,d,o=t.dyn_tree,u=t.max_code,m=t.stat_desc.static_tree,f=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,r=t.stat_desc.max_length,l=0;for(n=0;nr&&(n=r,l++),o[2*s+1]=n,s>u||(e.bl_count[n]++,c=0,s>=h&&(c=p[s-h]),d=o[2*s],e.opt_len+=d*(n+c),f&&(e.static_len+=d*(m[2*s+1]+c)));if(0!==l){do{for(n=r-1;0===e.bl_count[n];)n--;e.bl_count[n]--,e.bl_count[n+1]+=2,e.bl_count[r]--,l-=2}while(l>0)for(n=r;0!==n;n--)for(s=e.bl_count[n];0!==s;)(i=e.heap[--a])>u||(o[2*i+1]!==n&&(e.opt_len+=(n-o[2*i+1])*o[2*i],o[2*i+1]=n),s--)}},Ie=function(e,t,n){var s,o,i,a=new Array(_+1),r=0;for(s=1;s>=7;t8?D(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},tt=function(e,t,n,s){fe(e),s&&(D(e,n),D(e,~n)),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},Ve=function(e,t,n,s){var o=2*t,i=2*n;return e[o]>1;n>=1;n--)se(e,s,n);o=r;do n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],se(e,s,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,s[2*o]=s[2*n]+s[2*i],e.depth[o]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,s[2*n+1]=s[2*i+1]=o,e.heap[1]=o++,se(e,s,1);while(e.heap_len>=2)e.heap[--e.heap_max]=e.heap[1],at(e,t),Ie(s,a,e.bl_count)},We=function(e,t,n){var s,c,l=-1,o=t[1],i=0,a=7,r=4;for(0===o&&(a=138,r=3),t[2*(n+1)+1]=65535,c=0;c=3&&0===e.bl_tree[2*Fe[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t},_t=function(e,t,n,s){var o;for(i(e,t-257,5),i(e,n-1,5),i(e,s-4,4),o=0;o>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return be;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return Ae;for(t=32;t0?(e.strm.data_type===ft&&(e.strm.data_type=nt(e)),te(e,e.l_desc),te(e,e.d_desc),r=Xe(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(F[n]+V+1)]++,e.dyn_dtree[2*Pe(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){i(e,pe>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do i=i+(o=o+t[s++]|0)|0;while(--a)o%=65521,i%=65521}return o|i>>1:e>>>1;s[t]=e}return s}()),v=function(e,t,n,s){var o,i=Ft,a=s+n;e^=-1;for(o=s;o>>8^i[255&(e^t[o])];return-1^e},me={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"},n={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},ht=I._tr_init,qt=I._tr_stored_block,Rt=I._tr_flush_block,p=I._tr_tally,zt=I._tr_align,w=n.Z_NO_FLUSH,St=n.Z_PARTIAL_FLUSH,At=n.Z_FULL_FLUSH,g=n.Z_FINISH,xe=n.Z_BLOCK,c=n.Z_OK,Ee=n.Z_STREAM_END,a=n.Z_STREAM_ERROR,Ot=n.Z_DATA_ERROR,ee=n.Z_BUF_ERROR,xt=n.Z_DEFAULT_COMPRESSION,Dt=n.Z_FILTERED,W=n.Z_HUFFMAN_ONLY,vt=n.Z_RLE,pt=n.Z_FIXED,mt=n.Z_DEFAULT_STRATEGY,Ke=n.Z_UNKNOWN,K=n.Z_DEFLATED,ut=9,lt=15,it=8,ie=286,et=30,Je=19,Ze=2*ie+1,Qe=15,e=3,b=258,r=b+e+1,Ge=32,Z=42,ne=69,q=73,J=91,Q=103,O=113,P=666,s=1,N=2,x=3,E=4,rt=3,f=function(e,t){return e.msg=me[t],t},Se=function(e){return(e4?9:0)},m=function(e){for(var t=e.length;--t>=0;)e[t]=0},y=function(e,t,n){return(te.avail_out&&(t=e.avail_out),0!==t&&(e.output.set(n.pending_buf.subarray(n.pending_out,n.pending_out+t),e.next_out),e.next_out+=t,n.pending_out+=t,e.total_out+=t,e.avail_out-=t,n.pending-=t,0===n.pending&&(n.pending_out=0))},o=function(e,t){Rt(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,j(e.strm)},t=function(e,t){e.pending_buf[e.pending++]=t},H=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},gt=function(e,t,n,s){var o=e.avail_in;return o>s&&(o=s),0===o?0:(e.avail_in-=o,t.set(e.input.subarray(e.next_in,e.next_in+o),n),1===e.state.wrap?e.adler=Oe(e.adler,t,o,n):2===e.state.wrap&&(e.adler=v(e.adler,t,o,n)),e.next_in+=o,e.total_in+=o,o)},ze=function(e,t){var o,a,d=e.max_chain_length,s=e.strstart,i=e.prev_length,l=e.nice_match,m=e.strstart>e.w_size-r?e.strstart-(e.w_size-r):0,n=e.window,p=e.w_mask,f=e.prev,c=e.strstart+b,h=n[s+i-1],u=n[s+i];e.prev_length>=e.good_match&&(d>>=2),l>e.lookahead&&(l=e.lookahead);do if(n[(o=t)+i]===u&&n[o+i-1]===h&&n[o]===n[s]&&n[++o]===n[s+1]){s+=2,o++;do;while(n[++s]===n[++o]&&n[++s]===n[++o]&&n[++s]===n[++o]&&n[++s]===n[++o]&&n[++s]===n[++o]&&n[++s]===n[++o]&&n[++s]===n[++o]&&n[++s]===n[++o]&&si){if(e.match_start=t,i=a,a>=l)break;h=n[s+i-1],u=n[s+i]}}while((t=f[t&p])>m&&0!=--d)return i=n+(n-r)){t.window.set(t.window.subarray(n,n+n),0),t.match_start-=n,t.strstart-=n,t.block_start-=n,o=i=t.hash_size;do a=t.head[--o],t.head[o]=a>=n?a-n:0;while(--i)o=i=n;do a=t.prev[--o],t.prev[o]=a>=n?a-n:0;while(--i)c+=n}if(0===t.strm.avail_in)break;if(i=gt(t.strm,t.window,t.strstart+t.lookahead,c),t.lookahead+=i,t.lookahead+t.insert>=e)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=y(t,t.ins_h,t.window[s+1]);t.insert&&(t.ins_h=y(t,t.ins_h,t.window[s+e-1]),t.prev[s&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=s,s++,t.insert--,!(t.lookahead+t.insert=e&&(t.ins_h=y(t,t.ins_h,t.window[t.strstart+e-1]),i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==i&&t.strstart-i=e)if(a=p(t,t.strstart-t.match_start,t.match_length-e),t.lookahead-=t.match_length,t.match_length=e){t.match_length--;do t.strstart++,t.ins_h=y(t,t.ins_h,t.window[t.strstart+e-1]),i=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=y(t,t.ins_h,t.window[t.strstart+1]);else a=p(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(a&&(o(t,!1),0===t.strm.avail_out))return s}return t.insert=t.strstart=e&&(t.ins_h=y(t,t.ins_h,t.window[t.strstart+e-1]),i=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=e-1,0!==i&&t.prev_length4096)&&(t.match_length=e-1)),t.prev_length>=e&&t.match_length=e&&t.strstart>0&&(r=a[i=t.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){l=t.strstart+b;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=e?(c=p(t,1,t.match_length-e),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(c=p(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),c&&(o(t,!1),0===t.strm.avail_out))return s}return t.insert=0,n===g?(o(t,!0),0===t.strm.avail_out?x:E):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?s:N},wt=function(e,t){for(var n;;){if(0===e.lookahead&&(C(e),0===e.lookahead)){if(t===w)return s;break}if(e.match_length=0,n=p(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(o(e,!1),0===e.strm.avail_out))return s}return e.insert=0,t===g?(o(e,!0),0===e.strm.avail_out?x:E):e.last_lit&&(o(e,!1),0===e.strm.avail_out)?s:N},ke;function l(e,t,n,s,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=s,this.func=o}z=[new l(0,0,0,0,function(e,t){var n,i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead=n)&&(e.lookahead=e.strstart-n,e.strstart=n,o(e,!1),0===e.strm.avail_out))return s;if(e.strstart-e.block_start>=e.w_size-r&&(o(e,!1),0===e.strm.avail_out))return s}return e.insert=0,t===g?(o(e,!0),0===e.strm.avail_out?x:E):(e.strstart>e.block_start&&(o(e,!1),e.strm.avail_out),s)}),new l(4,4,8,4,re),new l(4,5,16,8,re),new l(4,6,32,32,re),new l(4,4,16,16,k),new l(8,16,32,32,k),new l(8,16,128,128,k),new l(8,32,128,256,k),new l(32,128,258,1024,k),new l(32,258,258,4096,k)],ke=function(t){t.window_size=2*t.w_size,m(t.head),t.max_lazy_match=z[t.level].max_lazy,t.good_match=z[t.level].good_length,t.nice_match=z[t.level].nice_length,t.max_chain_length=z[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=e-1,t.match_available=0,t.ins_h=0};function Et(){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=K,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(2*Ze),this.dyn_dtree=new Uint16Array(2*(2*et+1)),this.bl_tree=new Uint16Array(2*(2*Je+1)),m(this.dyn_ltree),m(this.dyn_dtree),m(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Qe+1),this.heap=new Uint16Array(2*ie+1),m(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*ie+1),m(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 Ce=function(e){if(!e||!e.state)return f(e,a);e.total_in=e.total_out=0,e.data_type=Ke;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap15&&(l=2,o-=16),iut||s!==K||o15||n9||rpt?f(t,a):(8===o&&(o=9),c=new Et,t.state=c,c.strm=t,c.wrap=l,c.gzhead=null,c.w_bits=o,c.w_size=1=s.w_size&&(0===i&&(m(s.head),s.strstart=0,s.block_start=0,s.insert=0),l=new Uint8Array(s.w_size),l.set(n.subarray(o-s.w_size,o),0),n=l,o=s.w_size);var s,o,i,r,l,d,u=t.avail_in,h=t.next_in,f=t.input;for(t.avail_in=o,t.next_in=0,t.input=n,C(s);s.lookahead>=e;){r=s.strstart,d=s.lookahead-(e-1);do s.ins_h=y(s,s.ins_h,s.window[r+e-1]),s.prev[r&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=r,r++;while(--d)s.strstart=r,s.lookahead=e-1,C(s)}return s.strstart+=s.lookahead,s.block_start=s.strstart,s.insert=s.lookahead,s.lookahead=0,s.match_length=s.prev_length=e-1,s.match_available=0,t.next_in=h,t.input=f,t.avail_in=u,s.wrap=i,c},R={deflateInit:function(e,t){return _e(e,t,K,lt,it,mt)},deflateInit2:_e,deflateReset:we,deflateResetKeep:Ce,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?a:(e.state.gzhead=t,c):a},deflate:function(e,n){if(!e||!e.state||n>xe||n>8&255),t(o,o.gzhead.time>>16&255),t(o,o.gzhead.time>>24&255),t(o,9===o.level?2:o.strategy>=W||o.level>8&255)),o.gzhead.hcrc&&(e.adler=v(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=ne):(t(o,0),t(o,0),t(o,0),t(o,0),t(o,0),t(o,9===o.level?2:o.strategy>=W||o.level=W||o.level>>16),H(o,65535&e.adler)),e.adler=1)),o.status===ne)if(o.gzhead.extra){for(i=o.pending;o.gzindexi&&(e.adler=v(e.adler,o.pending_buf,o.pending-i,i)),j(e),i=o.pending,o.pending!==o.pending_buf_size));)t(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>i&&(e.adler=v(e.adler,o.pending_buf,o.pending-i,i)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=q)}else o.status=q;if(o.status===q)if(o.gzhead.name){i=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>i&&(e.adler=v(e.adler,o.pending_buf,o.pending-i,i)),j(e),i=o.pending,o.pending===o.pending_buf_size)){r=1;break}r=o.gzindexi&&(e.adler=v(e.adler,o.pending_buf,o.pending-i,i)),0===r&&(o.gzindex=0,o.status=J)}else o.status=J;if(o.status===J)if(o.gzhead.comment){i=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>i&&(e.adler=v(e.adler,o.pending_buf,o.pending-i,i)),j(e),i=o.pending,o.pending===o.pending_buf_size)){r=1;break}r=o.gzindexi&&(e.adler=v(e.adler,o.pending_buf,o.pending-i,i)),0===r&&(o.status=Q)}else o.status=Q;if(o.status===Q&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&j(e),o.pending+2>8&255),e.adler=0,o.status=O)):o.status=O),0!==o.pending){if(j(e),0===e.avail_out)return o.last_flush=-1,c}else if(0===e.avail_in&&Se(n)>8&255),t(o,e.adler>>16&255),t(o,e.adler>>24&255),t(o,255&e.total_in),t(o,e.total_in>>8&255),t(o,e.total_in>>16&255),t(o,e.total_in>>24&255)):(H(o,e.adler>>>16),H(o,65535&e.adler)),j(e),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?c:Ee)},deflateEnd:function(e){if(!e||!e.state)return a;var t=e.state.status;return t!==Z&&t!==ne&&t!==q&&t!==J&&t!==Q&&t!==O&&t!==P?f(e,a):(e.state=null,t===O?f(e,Ot):c)},deflateSetDictionary:Mt,deflateInfo:"pako deflate (from Nodeca project)"};function Tt(e){for(var o=0,t=0,r=e.length;t=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;function Nt(){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}G[254]=G[254]=1;var Lt=Nt,ve=Object.prototype.toString,Pt=n.Z_NO_FLUSH,Ht=n.Z_SYNC_FLUSH,It=n.Z_FULL_FLUSH,Bt=n.Z_FINISH,Y=n.Z_OK,$t=n.Z_STREAM_END,Wt=n.Z_DEFAULT_COMPRESSION,Ut=n.Z_DEFAULT_STRATEGY,Kt=n.Z_DEFLATED;function X(){this.options={level:Wt,method:Kt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ut};var t,n,e=this.options;if(e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits>>6,s[o++]=128|63&t):t>>12,s[o++]=128|t>>>6&63,s[o++]=128|63&t):(s[o++]=240|t>>>18,s[o++]=128|t>>>12&63,s[o++]=128|t>>>6&63,s[o++]=128|63&t);return s}return X.prototype.push=function(e,t){var s,o,n=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(s=t===~~t?t:!0===t?Bt:Pt,"[object ArrayBuffer]"===ve.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),(s===Ht||s===It)&&n.avail_out0&&this.onData(n.output.subarray(0,n.next_out)),o=R.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===Y;if(0!==n.avail_out){if(s>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},X.prototype.onData=function(e){this.chunks.push(e)},X.prototype.onEnd=function(e){e===Y&&(this.result=Tt(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},{Deflate:X,constants:n,string2buf:Yt}}(),o=n.Deflate,i=n.constants,r=n.string2buf,t=new o,s=0;function a(e){var n=r(e);return t.push(n,i.Z_SYNC_FLUSH),s+=n.length,n.length}self.addEventListener("message",e(function(e){var r,n=e.data;switch(n.action){case"init":self.postMessage({type:"initialized"});break;case"write":r=a(n.data),self.postMessage({type:"wrote",id:n.id,compressedBytesCount:t.chunks.reduce(function(e,t){return e+t.length},0),additionalBytesCount:r});break;case"flush":r=n.data?a(n.data):0,t.push("",i.Z_FINISH),self.postMessage({type:"flushed",id:n.id,result:t.result,additionalBytesCount:r,rawBytesCount:s}),t=new o,s=0}}))})()}v={status:0};function Pi(t,n){switch(void 0===n&&(n=en),v.status){case 0:v={status:1,callbacks:[t]},function(t){void 0===t&&(t=en);try{var n=t();n.addEventListener("error",e(bt)),n.addEventListener("message",e(function(e){var t,s=e.data;"errored"===s.type?bt(s.error):"initialized"===s.type&&(t=n,1===v.status&&(v.callbacks.forEach(function(e){return e(t)}),v={status:3,worker:t}))})),n.postMessage({action:"init"})}catch(e){bt(e)}}(n);break;case 1:v.callbacks.push(t);break;case 2:t();break;case 3:t(v.worker)}}function bt(e){1===v.status?(n.error("Session Replay recording failed to start: an error occurred while creating the Worker:",e),e instanceof Event||e instanceof Error&&U(e.message,"Content Security Policy")?n.error("Please make sure CSP is correctly configured https://docs.datadoghq.com/real_user_monitoring/faq/content_security_policy"):ie(e),v.callbacks.forEach(function(e){return e()}),v={status:2}):ie(e)}function Ii(e,t,n,s){var o=new FormData;o.append("segment",new Blob([t],{type:"application/octet-stream"}),"".concat(n.session.id,"-").concat(n.start)),Ut(n,function(e,t){return o.append(e,t)}),o.append("raw_segment_size",s.toString()),e.sendOnExit({data:o,bytesCount:t.byteLength})}function Ut(e,t,n){void 0===n&&(n=""),ct(e).forEach(function(e){var o=e[0],s=e[1];"object"==typeof s&&null!==s?Ut(s,t,"".concat(n).concat(o,".")):t("".concat(n).concat(o),String(s))})}Ht=function(e,t){if(void 0===t&&(t=Pi),R()||"function"!=typeof Array.from||"function"!=typeof CSSSupportsRule)return{start:l,stop:l,getReplayStats:function(){},onRumStart:l,isRecording:function(){return!1}};var n={status:0},s=function(){n={status:1}},o=function(){n={status:0}};return{start:function(){return s()},stop:function(){return o()},getReplayStats:Ai,onRumStart:function(i,a,r,c){i.subscribe(7,function(){2!==n.status&&3!==n.status||(o(),n={status:1})}),i.subscribe(8,function(){1===n.status&&s()}),s=function(){var s=r.findTrackedSession();s&&s.hasPremiumPlan?2!==n.status&&3!==n.status&&(n={status:2},at("interactive",function(){2===n.status&&t(function(t){if(2===n.status)if(t){var s=e(i,a,r,c,t).stop;n={status:3,stopRecording:s}}else n={status:0}})})):n={status:1}},o=function(){0!==n.status&&(3===n.status&&n.stopRecording(),n={status:0})},1===n.status&&s()},isRecording:function(){return 3===n.status}}}(function(e,t,n,s,o,i){var d=i||ys(t.sessionReplayEndpointBuilder,tn,function(t){e.notify(12,{error:t})}),c=Di(e,t.applicationId,n,s,function(e,t,n){return Ii(d,e,t,n)},o),l=c.addRecord,u=c.stop,r=xi({emit:l,configuration:t,lifeCycle:e}),h=r.stop,m=r.takeSubsequentFullSnapshot,f=r.flushMutations,p=e.subscribe(4,function(){f(),l({timestamp:a(),type:co})}).unsubscribe,g=e.subscribe(2,function(e){m(e.startClocks.timeStamp)}).unsubscribe;return{stop:function(){p(),g(),h(),u()}}}),Rt=function(t,o,i){var m,w,x,C,v=(void 0===i?{}:i).ignoreInitIfSyntheticsWillInjectRum,A=void 0===v||v,b=!1,r=On(),c=On(),O=function(){},j=function(){},l=new Ot,u=function(e,t){void 0===t&&(t=a()),l.add(function(){return u(e,t)})},d=function(e,t){void 0===t&&(t=h()),l.add(function(){return d(e,t)})},g=function(e,t){void 0===t&&(t={context:r.getContext(),user:c.getContext()}),l.add(function(){return g(e,t)})},p=function(e,t){void 0===t&&(t={context:r.getContext(),user:c.getContext()}),l.add(function(){return p(e,t)})};function _(e,n){var s=t(e,function(){return{user:c.getContext(),context:r.getContext(),hasReplay:!!o.isRecording()||void 0}},o,n);d=s.startView,g=s.addAction,p=s.addError,u=s.addTiming,O=s.getInternalContext,l.drain(),o.onRumStart(s.lifeCycle,e,s.session,s.viewContexts)}return x=e(function(e){d("object"==typeof e?e:{name:e})}),C=(w={init:e(function(e){if(!A||!Zn()){if(R())e=function(e){return s({},e,{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sampleRate:100})}(e);else if(!function(e){return function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var o,t="dd_cookie_test_".concat(f()),s="test";return te(t,s,L,e),o=y(t)===s,Xn(t,e),o}catch(e){return n.error(e),!1}}(bs(e))?"file:"!==window.location.protocol||(n.error("Execution is not allowed in the current context."),!1):(n.warn("Cookies are not authorized, we will not send any data."),!1)}(e))return;if(function(e){return!b||(e.silentMultipleInit||n.error("DD_RUM is already initialized."),!1)}(e)){var o,t=function(e){if(e.applicationId){var o,i,a,r,c,l,d,t=null!==(o=e.premiumSampleRate)&&void 0!==o?o:e.replaySampleRate;if(void 0===t||ye(t))if(void 0===e.tracingSampleRate||ye(e.tracingSampleRate)){if(void 0!==e.allowedTracingOrigins){if(!Array.isArray(e.allowedTracingOrigins))return void n.error("Allowed Tracing Origins should be an array");if(0!==e.allowedTracingOrigins.length&&void 0===e.service)return void n.error("Service need to be configured when tracing is enabled")}if(void 0===e.excludedActivityUrls||Array.isArray(e.excludedActivityUrls)){if(r=Ys(e),r)return l=!!e.trackFrustrations,s({applicationId:e.applicationId,version:e.version,actionNameAttribute:e.actionNameAttribute,premiumSampleRate:t??100,allowedTracingOrigins:null!==(i=e.allowedTracingOrigins)&&void 0!==i?i:[],tracingSampleRate:e.tracingSampleRate,excludedActivityUrls:null!==(a=e.excludedActivityUrls)&&void 0!==a?a:[],trackInteractions:!!e.trackInteractions||l,trackFrustrations:l,trackViewsManually:!!e.trackViewsManually,defaultPrivacyLevel:(c=z,d=e.defaultPrivacyLevel,Object.keys(c).some(function(e){return c[e]===d})?e.defaultPrivacyLevel:z.MASK_USER_INPUT)},r)}else n.error("Excluded Activity Urls should be an array")}else n.error("Tracing Sample Rate should be a number between 0 and 100");else n.error("Premium Sample Rate should be a number between 0 and 100")}else n.error("Application ID is not configured, no RUM data will be collected.")}(e);t&&(t.trackViewsManually?(o=l,l=new Ot,d=function(e){_(t,e)},o.drain()):_(t),j=function(){return M(e)},b=!0)}}}),addRumGlobalContext:e(r.add),setGlobalContextProperty:e(r.setContextProperty),removeRumGlobalContext:e(r.remove),removeGlobalContextProperty:e(r.removeContextProperty),getRumGlobalContext:e(r.get),getGlobalContext:e(r.getContext),setRumGlobalContext:e(r.set),setGlobalContext:e(r.setContext),clearGlobalContext:e(r.clearContext),getInternalContext:e(function(e){return O(e)}),getInitConfiguration:e(function(){return j()}),addAction:e(function(e,t){g({name:e,context:M(t),startClocks:h(),type:"custom"})}),addError:function(e,t){var n=Ls();k(function(){p({error:e,handlingStack:n,context:M(t),startClocks:h()})})},addTiming:e(function(e,t){u(e,t)}),setUser:e(function(e){"object"==typeof e&&e?c.setContext(E(e)):n.error("Unsupported user:",e)}),getUser:e(c.getContext),setUserProperty:e(function(e,t){var n,s=E((n={},n[e]=t,n))[e];c.setContextProperty(e,s)}),removeUserProperty:e(c.removeContextProperty),removeUser:e(c.clearContext),clearUser:e(c.clearContext),startView:x,startSessionReplayRecording:e(o.start),stopSessionReplayRecording:e(o.stop)},m=s({version:"4.19.1",onReady:function(e){e()}},w),Object.defineProperty(m,"_setDebug",{get:function(){return Hi},enumerable:!1}),m),C;function E(e){var t=s(e,{});return"id"in t&&(t.id=String(t.id)),"name"in t&&(t.name=String(t.name)),"email"in t&&(t.email=String(t.email)),t}}(function(t,n,a,r){c=new Bi,h=function(e){var n,t=Ko(e);return R()&&(n=Mt(),t.observable.subscribe(function(e){return n.send("internal_telemetry",e)})),t}(t),h.setContextProvider(function(){var e,n;return{application:{id:t.applicationId},session:{id:null===(e=d.findTrackedSession())||void 0===e?void 0:e.id},view:{id:null===(n=g.findView())||void 0===n?void 0:n.id},action:{id:w.findActionId()}}}),m=function(e){c.notify(12,{error:e})},R()?function(e){var t=Mt();e.subscribe(11,function(e){t.send("rum",e)})}(c):no(t,c,h.observable,m);var c,h,m,p,v,x,d=R()?function(){var e={id:"00000000-aaaa-0000-aaaa-000000000000",hasPremiumPlan:!0,hasLitePlan:!1};return{findTrackedSession:function(){return e}}}():Vs(t,c),y=(p=Pn(),v=new i(function(){if(p){var t=new p(e(function(){return v.notify()}));return t.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return t.disconnect()}}})),b=so(location),u=function(e,t,n,o,i,a,r,c){var d=function(e){var t=new de(144e5);return e.subscribe(2,function(e){t.add(function(e){return{service:e.service,version:e.version,id:e.id,name:e.name}}(e),e.startClocks.relative)}),e.subscribe(4,function(e){var n=e.endClocks;t.closeActive(n.relative)}),e.subscribe(8,function(){t.reset()}),{findView:function(e){return t.find(e)},stop:function(){t.stop()}}}(e),h=function(e,t,n){var o,i,s=new de(144e5);e.subscribe(4,function(e){var t=e.endClocks;s.closeActive(t.relative)}),e.subscribe(2,function(e){var i=e.startClocks,t=n.href;s.add(a({url:t,referrer:o||document.referrer}),i.relative),o=t}),i=t.subscribe(function(e){var t,o=e.newLocation,n=s.find();n&&(t=j(),s.closeActive(t),s.add(a({url:o.href,referrer:n.referrer}),t))});function a(e){return{url:e.url,referrer:e.referrer}}return{findUrl:function(e){return s.find(e)},stop:function(){i.unsubscribe(),s.stop()}}}(e,i,n),u=Wo(),m=function(e,t,n,o){e.subscribe(1,function(t){return e.notify(10,Gn(t,o))});var i={findActionId:l};return n.trackInteractions&&(i=ti(e,t,n).actionContexts),{addAction:function(t,n){e.notify(10,s({savedCommonContext:n},Gn(t,o)))},actionContexts:i}}(e,a,t,u),p=m.addAction,f=m.actionContexts;return qi(t,e,o,d,h,f,r,c),{viewContexts:d,foregroundContexts:u,urlContexts:h,addAction:p,actionContexts:f,stop:function(){d.stop(),u.stop()}}}(c,t,location,d,b,y,n,m),g=u.viewContexts,_=u.foregroundContexts,C=u.urlContexts,w=u.actionContexts,E=u.addAction;!function(e,t){e.subscribe(0,function(n){for(var s,a,r,l,i=0,c=n;i>parseInt(e,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,p)}function it(e){return 0!==e&&100*Math.random()"}finally{s(),o(),i(),a()}}function R(e){var t=e,n=t.toJSON;return n?(delete t.toJSON,function(){t.toJSON=n}):D}function y(e,t){return-1!==e.indexOf(t)}function rt(e){if(Array.from)return Array.from(e);var t,n=[];if(e instanceof Set)e.forEach(function(e){return n.push(e)});else for(t=0;t=0&&e=55296&&s=0;return n||e.push(t),n}}}()),void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return c=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join(""),new RegExp(t.source,c);if(!n.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var o,i,r,c,a=Array.isArray(e)?e:[],s=0;s500&&this.buffer.splice(0,1)},e.prototype.drain=function(){this.buffer.forEach(function(e){return e()}),this.buffer.length=0},e}();function O(){return(new Date).getTime()}function c(){return O()}function T(){return performance.now()}function F(){return{relative:T(),timeStamp:c()}}function ke(e,t){return t-e}function _e(){return void 0===ge&&(ge=performance.timing.navigationStart),ge}function be(){var e=ue().DatadogEventBridge;if(e)return{getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts())},send:function(t,n){e.send(JSON.stringify({eventType:t,event:n}))}}}function L(e){void 0===e&&(e=null===(t=ue().location)||void 0===t?void 0:t.hostname);var t,n=be();return!!n&&n.getAllowedWebViewHosts().some(function(t){return e===t||(s=e,n=".".concat(t),s.slice(-n.length)===n);var n,s})}function C(e,t,n,s){o=new Date,o.setTime(o.getTime()+n);var o,i="expires=".concat(o.toUTCString()),a=s&&s.crossSite?"none":"strict",r=s&&s.domain?";domain=".concat(s.domain):"",c=s&&s.secure?";secure":"";document.cookie="".concat(e,"=").concat(t,";").concat(i,";path=/;samesite=").concat(a).concat(r).concat(c)}function a(e){return function(e,t){var n=new RegExp("(?:^|;)\s*".concat(t,"\s*=\s*([^;]+)")).exec(e);return n?n[1]:void 0}(document.cookie,e)}function Xe(e,t){C(e,"",0,t)}function Nt(){return v||new Set}function se(e){return qt(e,function(e){if(e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return"".concat(e.protocol,"//").concat(t)}(window.location)).href}function qt(e,t){if(function(){if(void 0!==E)return E;try{var e=new URL("http://test/path");return E="http://test/path"===e.href}catch{E=!1}return E}())return void 0!==t?new URL(e,t):new URL(e);if(void 0===t&&!/:/.test(e))throw new Error("Invalid URL: '".concat(e,"'"));var o,n=document,s=n.createElement("a");return void 0!==t&&(o=(n=document.implementation.createHTMLDocument("")).createElement("base"),o.href=t,n.head.appendChild(o),n.body.appendChild(s)),s.href=e,s}var ie="datadoghq.com",dn={logs:"logs",rum:"rum",sessionReplay:"session-replay"},sn={logs:"logs",rum:"rum",sessionReplay:"replay"};function x(e,t,n){var o=e.site,r=void 0===o?ie:o,l=e.clientToken,i=r.split("."),d=i.pop(),u="".concat(dn[t],".browser-intake-").concat(i.join("-"),".").concat(d),a="https://".concat(u,"/api/v2/").concat(sn[t]),s=e.proxyUrl&&se(e.proxyUrl);return{build:function(){var e,o="ddsource=browser"+"&ddtags=".concat(encodeURIComponent(["sdk_version:".concat("4.19.1")].concat(n).join(",")))+"&dd-api-key=".concat(l)+"&dd-evp-origin-version=".concat(encodeURIComponent("4.19.1"))+"&dd-evp-origin=browser"+"&dd-request-id=".concat(p());return"rum"===t&&(o+="&batch_time=".concat(c())),e="".concat(a,"?").concat(o),s?"".concat(s,"?ddforward=").concat(encodeURIComponent(e)):e},buildIntakeUrl:function(){return s?"".concat(s,"?ddforward"):a},endpointType:t}}Be=/[^a-z0-9_:./-]/;function X(e,t){var s,o=200-e.length-1;return(t.length>o||Be.test(t))&&n.warn("".concat(e," value doesn't meet tag requirements and will be sanitized")),s=t.replace(/,/g,"_"),"".concat(e,":").concat(s)}function $t(e){var t=function(e){var n=e.env,s=e.service,o=e.version,i=e.datacenter,t=[];return n&&t.push(X("env",n)),s&&t.push(X("service",s)),o&&t.push(X("version",o)),i&&t.push(X("datacenter",i)),t}(e),n=function(e,t){return{logsEndpointBuilder:x(e,"logs",t),rumEndpointBuilder:x(e,"rum",t),sessionReplayEndpointBuilder:x(e,"sessionReplay",t)}}(e,t),s=M(n).map(function(e){return e.buildIntakeUrl()}),i=function(e,t,n){if(!e.replica)return;var s=o({},e,{site:ie,clientToken:e.replica.clientToken}),i={logsEndpointBuilder:x(s,"logs",n),rumEndpointBuilder:x(s,"rum",n)};return t.push.apply(t,M(i).map(function(e){return e.buildIntakeUrl()})),o({applicationId:e.replica.applicationId},i)}(e,s,t);return o({isIntakeUrl:function(e){return s.some(function(t){return 0===e.indexOf(t)})},replica:i,site:e.site||ie},n)}function Rt(e){var t,s,i;if(e&&e.clientToken)if(void 0===e.sampleRate||ht(e.sampleRate)){if(void 0===e.telemetrySampleRate||ht(e.telemetrySampleRate))return t=e.enableExperimentalFeatures,Array.isArray(t)&&(v||(v=new Set(t)),t.filter(function(e){return"string"==typeof e}).forEach(function(e){y(e,"-")&&n.warn("please use snake case for '".concat(e,"'")),v.add(e)})),o({beforeSend:e.beforeSend&&Me(e.beforeSend,"beforeSend threw an error:"),cookieOptions:Lt(e),sampleRate:null!==(s=e.sampleRate)&&void 0!==s?s:100,telemetrySampleRate:null!==(i=e.telemetrySampleRate)&&void 0!==i?i:20,service:e.service,silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144},$t(e));n.error("Telemetry Sample Rate should be a number between 0 and 100")}else n.error("Sample Rate should be a number between 0 and 100");else n.error("Client Token is not configured, we will not send any data.")}function Lt(e){var t={};return t.secure=function(e){return!!e.useSecureSessionCookie||!!e.useCrossSiteSessionCookie}(e),t.crossSite=!!e.useCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===de){for(var t="dd_site_test_".concat(p()),n=window.location.hostname.split("."),e=n.pop();n.length&&!a(t);)e="".concat(n.pop(),".").concat(e),C(t,"test",ae,{domain:e});Xe(t,{domain:e}),de=e}return de}()),t}_="?";function l(e){var n=[],t=ve(e,"stack"),s=String(e);return t&&Oe(t,s)&&(t=t.slice(s.length)),t&&t.split(` `).forEach(function(e){var t=function(e){if(t=jt.exec(e),!t)return;var t,s=t[2]&&0===t[2].indexOf("native"),o=t[2]&&0===t[2].indexOf("eval"),n=bt.exec(t[2]);return o&&n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3]),{args:s?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||_,line:t[3]?+t[3]:void 0,url:s?void 0:t[2]}}(e)||function(e){var t=Ot.exec(e);if(!t)return;return{args:[],column:t[3]?+t[3]:void 0,func:_,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=xt.exec(e);if(!t)return;return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||_,line:+t[3],url:t[2]}}(e)||function(e){if(t=Kt.exec(e),!t)return;var t,s=t[3]&&t[3].indexOf(" > eval")>-1,n=un.exec(t[3]);return s&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||_,line:t[4]?+t[4]:void 0,url:t[3]}}(e);t&&(!t.func&&t.line&&(t.func=_),n.push(t))}),{message:ve(e,"message"),name:ve(e,"name"),stack:n}}var gt="((?:file|https?|blob|chrome-extension|native|eval|webpack||\w+\.|\/).*?)",g="(?::(\d+))",jt=new RegExp("^\s*at (.*?) ?\(".concat(gt).concat(g,"?").concat(g,"?\)?\s*$"),"i"),bt=new RegExp("\((\S*)".concat(g).concat(g,"\)")),Ot=new RegExp("^\s*at ?".concat(gt).concat(g,"?").concat(g,"??\s*$"),"i"),xt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Kt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,un=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function ve(e,t){if("object"==typeof e&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var n,s,i,r,u,m,v,_,E,S,$,W,q,Y,G,J,Ie,ne,ae,Ze,ge,Se,de,Be,A="agent",we="console",We="logger",Ue="network",je="source",Ke="report",fe,ce,re,xe,oe,$e,te,Re,Ne,De,ze,Ee;function h(e){var t=Ce(e);return e.stack.forEach(function(e){var n="?"===e.func?"":e.func,s=e.args&&e.args.length>0?"(".concat(e.args.join(", "),")"):"",o=e.line?":".concat(e.line):"",i=e.line&&e.column?":".concat(e.column):"";t+=` at `.concat(n).concat(s," @ ").concat(e.url).concat(o).concat(i)}),t}function Ce(e){return"".concat(e.name||"Error",": ").concat(e.message)}function fn(){var t,e=new Error;if(!e.stack)try{throw e}catch{}return d(function(){var n=l(e);n.stack=n.stack.slice(2),t=h(n)}),t}i=function(){function e(e){this.onFirstSubscribe=e,this.observers=[]}return e.prototype.subscribe=function(e){var t=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(e),{unsubscribe:function(){t.observers=t.observers.filter(function(t){return e!==t}),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},e.prototype.notify=function(e){this.observers.forEach(function(t){return t(e)})},e}();function Ae(){for(var t,n=[],e=0;e=0;r--)(i=e[r])&&(o=(a3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},t={debug:"debug",error:"error",info:"info",warn:"warn"},ln="console",Le="http",an=Object.keys(t),Pe=function(){function e(e,n,s,i,a){void 0===s&&(s=Le),void 0===i&&(i=t.debug),void 0===a&&(a={}),this.handleLogStrategy=e,this.handlerType=s,this.level=i,this.contextManager=pt(),this.contextManager.set(o({},a,n?{logger:{name:n}}:void 0))}return e.prototype.log=function(e,n,s){void 0===s&&(s=t.info),this.handleLogStrategy({message:e,context:f(n),status:s},this)},e.prototype.debug=function(e,n){this.log(e,n,t.debug)},e.prototype.info=function(e,n){this.log(e,n,t.info)},e.prototype.warn=function(e,n){this.log(e,n,t.warn)},e.prototype.error=function(e,n){var s={error:{origin:We}};this.log(e,P(s,n),t.error)},e.prototype.setContext=function(e){this.contextManager.set(e)},e.prototype.getContext=function(){return this.contextManager.get()},e.prototype.addContext=function(e,t){this.contextManager.add(e,t)},e.prototype.removeContext=function(e){this.contextManager.remove(e)},e.prototype.setHandler=function(e){this.handlerType=e},e.prototype.getHandler=function(){return this.handlerType},e.prototype.setLevel=function(e){this.level=e},e.prototype.getLevel=function(){return this.level},hn([Pt],e.prototype,"log",null),e}();function He(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||a("datadog-synthetics-injects-rum"))}function Yt(){var e=window._DATADOG_SYNTHETICS_RESULT_ID||a("datadog-synthetics-result-id");return"string"==typeof e?e:void 0}var pe,Ut=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","http://localhost",""],Wt=["ddog-gov.com"],j={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1};function Vt(e){var t,n=new i;return j.telemetryEnabled=it(e.telemetrySampleRate),pe=function(s){!y(Wt,e.site)&&j.telemetryEnabled&&n.notify(function(e){return P({type:"telemetry",date:c(),service:"browser-sdk",version:"4.19.1",source:"browser",_dd:{format_version:2},telemetry:e,experimental_features:rt(Nt())},void 0!==t?t():{})}(s))},Y=qe,o(j,{maxEventsPerPage:e.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(e){t=e},observable:n}}function ye(e,t){Z(s.debug,e,t),Ye(o({message:e,status:"debug"},t))}function qe(e){Ye(o({status:"error"},function(e){if(e instanceof Error){var t=l(e);return{error:{kind:t.name,stack:h(zt(t))},message:t.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught ".concat(V(e))}}(e)))}function Ye(e){pe&&j.sentEventCount=this.messageBytesLimit?n.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB.")):(this.hasMessageFor(t)&&this.remove(t),this.willReachedBytesLimitWith(s)&&this.flush(),this.push(i,s,t),this.isFull()&&this.flush())},t.prototype.process=function(e){var t=V(e);return{processedMessage:t,messageBytesCount:this.computeBytesCount(t)}},t.prototype.push=function(e,t,n){this.bufferMessagesCount>0&&(this.bufferBytesCount+=1),void 0!==n?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.bufferBytesCount+=t,this.bufferMessagesCount+=1},t.prototype.remove=function(e){var t,n=this.upsertBuffer[e];delete this.upsertBuffer[e],t=this.computeBytesCount(n),this.bufferBytesCount-=t,this.bufferMessagesCount-=1,this.bufferMessagesCount>0&&(this.bufferBytesCount-=1)},t.prototype.hasMessageFor=function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},t.prototype.willReachedBytesLimitWith=function(e){return this.bufferBytesCount+e+1>=this.batchBytesLimit},t.prototype.isFull=function(){return this.bufferMessagesCount===this.batchMessagesLimit||this.bufferBytesCount>=this.batchBytesLimit},t.prototype.flushPeriodically=function(){var t=this;setTimeout(e(function(){t.flush(),t.flushPeriodically()}),this.flushTimeout)},t.prototype.setupFlushOnExit=function(){var e=this;navigator.sendBeacon&&(k(window,"beforeunload",this.beforeUnloadCallback),k(document,"visibilitychange",function(){"hidden"===document.visibilityState&&e.flushOnExit()}),k(window,"beforeunload",function(){return e.flushOnExit()}))},t}(),St=3145728;function Je(e,t,n,s,o){0===t.transportStatus&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?tt(e,t,n,{onSuccess:function(){return nt(0,t,n,s,o)},onFailure:function(){t.queuedPayloads.enqueue(e),et(t,n,s,o)}}):t.queuedPayloads.enqueue(e)}function et(t,n,s,o){2===t.transportStatus&&setTimeout(e(function(){tt(t.queuedPayloads.first(),t,n,{onSuccess:function(){t.queuedPayloads.dequeue(),0!==t.lastFailureStatus&&ye("resuming after transport down",{failureStatus:t.lastFailureStatus}),t.currentBackoffTime=1e3,nt(1,t,n,s,o)},onFailure:function(){t.currentBackoffTime=Math.min(6e4,2*t.currentBackoffTime),et(t,n,s,o)}})}),t.currentBackoffTime)}function tt(e,t,n,s){var o=s.onSuccess,i=s.onFailure;t.bandwidthMonitor.add(e),n(e,function(n){t.bandwidthMonitor.remove(e),function(e){return 0===e.status||408===e.status||429===e.status||e.status>=500}(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,t.lastFailureStatus=n.status,i()):(t.transportStatus=0,o())})}function nt(e,t,n,s,o){0===e&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:"Reached max ".concat(s," events size queued for upload: ").concat(3,"MiB"),source:A,startClocks:F()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=st();i.size()>0;)Je(i.dequeue(),t,n,s,o)}function st(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=St}}}function Ct(e,t,n){var s={transportStatus:0,lastFailureStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount=0&&s.entries.splice(e,1)},close:function(e){n.endTime=e}};return this.entries.unshift(n),n},e.prototype.find=function(e){void 0===e&&(e=B);for(var t,n=0,s=this.entries;n0&&this.entries[this.entries.length-1].endTime=100)ut();else{var s,o,i,n=z();if(le()){if(n.lock)return void N(e,t);if(o=p(),n.lock=o,Q(n,e.options),(n=z()).lock!==o)return void N(e,t)}if(s=e.process(n),le()&&(n=z()).lock!==o)N(e,t);else{if(s&&dt(s,e.options),le()&&(!s||!ot(s))){if((n=z()).lock!==o)return void N(e,t);delete n.lock,Q(n,e.options),s=n}null===(i=e.after)||void 0===i||i.call(e,s||n),ut()}}else vt.push(e)}function le(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)}function N(t,n){setTimeout(e(function(){w(t,n+1)}),10)}function ut(){U=void 0;var e=vt.shift();e&&w(e)}function dt(e,t){ot(e)?function(e){C(K,"",0,e)}(t):(e.expire=String(O()+mt),Q(e,t))}function Q(e,t){C(K,function(e){return(t=e,Object.keys(t).map(function(e){return[e,t[e]]})).map(function(e){var t=e[0],n=e[1];return"".concat(t,"=").concat(n)}).join(he);var t}(e),mt,t)}function z(){var e=a(K),t={};return function(e){return void 0!==e&&(-1!==e.indexOf(he)||ft.test(e))}(e)&&e.split(he).forEach(function(e){if(n=ft.exec(e),null!==n){var n,s=n[1],o=n[2];t[s]=o}}),t}function ot(e){return t=e,0===Object.keys(t).length;var t}function Et(t,n,s){var l=new i,d=new i,u=setInterval(e(function(){w({options:t,process:function(e){return c(e)?void 0:{}},after:a})}),1e3),o=function(){var e=z();return c(e)?e:{}}();function a(e){return c(e)||(e={}),r()&&(function(e){return o.id!==e.id||o[n]!==e[n]}(e)?(o={},d.notify()):o=e),e}function r(){return void 0!==o[n]}function c(e){return(void 0===e.created||O()-Number(e.created)=ce[n.getLevel()]&&y(o,t)}function Dt(e,t,n,s,o,i){var r=an.concat(["custom"]),a={};r.forEach(function(e){var n,s,o,r,c;a[e]=(r=e,o=t.eventRateLimiterThreshold,c=i,n=0,s=!1,{isLimitReached:function(){if(0===n&&setTimeout(function(){n=0},Ze),(n+=1)=500}(i)||("xhr"in i?function(e,t,n){n("string"==typeof e.response?ee(e.response,t):e.response)}(i.xhr,n,a):i.response?function(t,n,s){window.TextDecoder?t.body?function(t,n,s){!function(t,n,s){var i=t.getReader(),o=[],a=0;function r(){i.read().then(e(function(e){e.done?c():(o.push(e.value),(a+=e.value.length)>n?c():r())}),e(function(e){return s(e)}))}function c(){if(i.cancel().catch(D),1===o.length)e=o[0];else{e=new Uint8Array(a);var e,t=0;o.forEach(function(n){e.set(n,t),t+=n.length})}s(void 0,e.slice(0,n),e.length>n)}r()}(t,n,function(e,t,n){if(e)s(e);else{var o=(new TextDecoder).decode(t);n&&(o+="..."),s(void 0,o)}})}(t.clone().body,n.requestErrorResponseLengthLimit,function(e,t){s(e?"Unable to retrieve response: ".concat(e):t)}):s():t.clone().text().then(e(function(e){return s(ee(e,n))}),e(function(e){return s("Unable to retrieve response: ".concat(e))}))}(i.response,n,a):i.error&&function(e,t,n){n(ee(h(l(e)),t))}(i.error,n,a))}return{stop:function(){i.unsubscribe(),a.unsubscribe()}}}function ee(e,t){return e.length>t.requestErrorResponseLengthLimit?"".concat(e.substring(0,t.requestErrorResponseLengthLimit),"..."):e}function on(e){return"xhr"===e?"XHR":"Fetch"}Re=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function rn(e){var t=function(e){return b(window,"onerror",{before:function(t,n,s,o,i){if(i)c=l(i),e(c,i);else{var r,c,d,u={url:n,column:o,line:s},a=t;"[object String]"==={}.toString.call(t)&&(r=Re.exec(a),r&&(d=r[1],a=r[2])),e(c={name:d,message:"string"==typeof a?a:void 0,stack:[u]},t)}}})}(e).stop,n=function(e){return b(window,"onunhandledrejection",{before:function(t){var n=t.reason||"Empty reason",s=l(n);e(s,n)}})}(e).stop;return{stop:function(){t(),n()}}}function cn(e){return rn(function(t,n){var s=function(e,t,n,s){return e&&(void 0!==e.message||t instanceof Error)?{message:e.message||"Empty message",stack:h(e),handlingStack:s,type:e.name}:{message:"".concat(n," ").concat(V(t)),stack:"No stack, consider using an instance of Error",handlingStack:s,type:e&&e.name}}(t,n,"Uncaught"),o=s.stack,i=s.message,a=s.type;e.notify({message:i,stack:o,type:a,source:je,startClocks:F(),originalError:n,handling:"unhandled"})})}Ne=function(){function e(){this.callbacks={}}return e.prototype.notify=function(e,t){var n=this.callbacks[e];n&&n.forEach(function(e){return e(t)})},e.prototype.subscribe=function(e,t){var n=this;return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:function(){n.callbacks[e]=n.callbacks[e].filter(function(e){return t!==e})}}},e}(),Ee=function(t){var l,u,h=!1,i=pt(),d={},m=function(){},p=new Se,a=function(e,t,n,s){void 0===n&&(n=f(b())),void 0===s&&(s=c()),p.add(function(){return a(e,t,n,s)})},g=function(){},v=new Pe(function(){for(var t=[],e=0;e
Read the 2022 Container Research Report Read the 2022 Container Report
fm=png&auto=format&lossless=1);background-repeat:repeat-y;background-position:50% 0">

Modern monitoring & security

See inside any stack, any app, at any scale, anywhere.

Thousands of customers love & trust Datadog

read our report

9 insights on real-world container use

Our latest report examines more than 1.5 billion containers run by tens of thousands of Datadog customers to understand the state of the container ecosystem.

LEARN MORE >

Careers

Join Our Pack

We are building the monitoring and security platform for developers, IT operations teams and business users in the cloud age. And we need talented people like you to join our team.

LEARN MORE >
Security Monitoring Cloud Platform