@datadog/browser-rum-shopify 7.11.0 → 7.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (()=>{var t={5021(t,e,n){n.d(e,{Z:()=>a,m:()=>s});var r=n(8789),o=n(4993),i=n(5648);function s(t){const e={version:"7.11.0",onReady(t){t()},...t};return Object.defineProperty(e,"_setDebug",{get(){return r.p},enumerable:!1}),e}function a(t,e,n){const r=t[e];r&&!r.q&&r.version&&i.V.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),t[e]=n,r?.q&&r.q.forEach(t=>(0,o.y)(t,"onReady callback threw an error:")())}},3236(t,e,n){n.d(e,{BX:()=>c,fK:()=>d,lQ:()=>a,q2:()=>s});var r=n(6447),o=n(4467),i=n(2729);function s(t,e,n,r){return a(t,[e],n,r)}function a(t,e,n,{once:i,capture:s,passive:a}={}){const c=(0,r.dm)(t=>{(t.isTrusted||t.__ddIsTrusted||!1!==u)&&(i&&p(),n(t))}),d=a?{capture:s,passive:a}:s,l=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,f=(0,o.W)(l,"addEventListener");function p(){const n=(0,o.W)(l,"removeEventListener");e.forEach(e=>n.call(t,e,c,d))}return e.forEach(e=>f.call(t,e,c,d)),{stop:p}}function c(t,e){if(!t)return!1;try{return s(t,e,i.l).stop(),!0}catch{return!1}}let u;function d(t){!0!==u&&(u=t??!1)}},465(t,e,n){n.d(e,{h:()=>i});var r=n(2128),o=n(4467);function i(t,e){return(0,o.W)(r.J,"fetch")(t,e)}},6448(t,e,n){n.d(e,{Kp:()=>u,_T:()=>c});var r=n(2128),o=n(1996),i=n(8424),s=n(3236);const a={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function c(){return new o.cP(t=>{const e=r.J.window;if(!e)return;const{stop:n}=(0,s.lQ)(e,["visibilitychange","freeze"],e=>{"visibilitychange"===e.type&&"hidden"===document.visibilityState?t.notify({reason:a.HIDDEN}):"freeze"===e.type&&t.notify({reason:a.FROZEN})},{capture:!0}),o=(0,s.q2)(e,"beforeunload",()=>{t.notify({reason:a.UNLOADING})}).stop;return()=>{n(),o()}})}function u(t){return(0,i.KQ)(a).includes(t)}n.d(e,["y5",0,a])},7409(t,e,n){n.d(e,{H:()=>i,N:()=>s});var r=n(2729),o=n(3236);function i(t,e){if(document.readyState===t||"complete"===document.readyState)return e(),{stop:r.l};const n="complete"===t?"load":"DOMContentLoaded";return(0,o.q2)(window,n,e,{once:!0})}function s(t){return new Promise(e=>{i(t,e)})}},64(t,e,n){n.d(e,{q:()=>o});var r=n(2128);function o(){const{navigator:t}=r.J;return{status:t?.onLine?"connected":"not_connected",interfaces:t?.connection?.type?[t.connection.type]:void 0,effective_type:t?.connection?.effectiveType}}},4023(t,e,n){n.d(e,["g",0,{AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"}])},1468(t,e,n){function r(t){try{return t instanceof Error||"[object Error]"===Object.prototype.toString.call(t)}catch{return!1}}n.d(e,{b:()=>r}),n.d(e,["e",0,"No stack, consider using an instance of Error"])},4215(t,e,n){function r(t,e){return t*e/100}n.d(e,{$5:()=>i,it:()=>r});const o=new Map;function i(t,e){if(100===e)return!0;if(0===e)return!1;const n=o.get(e);if(t===n?.sessionId)return n.decision;const r=function(t,e){const n=1n<<64n;return Number(1111111111111111111n*t%n)<=e/100*Number(n)}(BigInt("0x"+t.split("-")[4]),e);return o.set(e,{sessionId:t,decision:r}),r}},603(t,e,n){var r=n(8333);const o=4*r.MA,i=r.$H;n.d(e,["AQ",0,o,"HB",0,9e5,"Q_",0,{COOKIE:"cookie",MEMORY:"memory",LOCAL_STORAGE:"local-storage"},"_P",0,i])},8032(t,e,n){n.d(e,{Jv:()=>d,yN:()=>l});var r=n(2128),o=n(7286),i=n(7003);const s=new Map,a=new Set;let c=!1;function u(){const t=r.J.window?.DD_SOURCE_CODE_CONTEXT;if(!t)return;let e=!1,n=!1,u=!1;for(const[r,i]of Object.entries(t)){if(e=e||void 0!==i.ddDebugId,n=n||void 0!==i.service,u=u||void 0!==i.version,a.has(r))continue;a.add(r);const t=(0,o.T)({stack:r}).stack[0]?.url;t&&!s.has(t)&&s.set(t,i)}c||(c=!0,(0,i.Q6)({feature:"source-code-context",use_debug_id:e,use_service:n,use_version:u}))}function d(t){u();const e=new Set,n=[];for(const r of t){if(e.has(r))continue;e.add(r);const t=s.get(r)?.ddDebugId;void 0!==t&&n.push({url:r,id:t})}return n.length?n:void 0}function l(t){return u(),s.get(t)}},98(t,e,n){n.d(e,{m5:()=>i});var r=n(1864),o=n(5648);function i(t){const{env:e,service:n,version:r,datacenter:o,sdkVersion:i,variant:a}=t,c=[s("sdk_version",i??"7.11.0")];return e&&c.push(s("env",e)),n&&c.push(s("service",n)),r&&c.push(s("version",r)),o&&c.push(s("datacenter",o)),a&&c.push(s("variant",a)),c}function s(t,e){const n=e?`${t}:${e}`:t;return(n.length>200||function(t){return RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(t)}(n))&&o.V.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${r.xG} ${r.fH}/getting_started/tagging/#defining-tags`),function(t){return t.replace(/,/g,"_")}(n)}},7003(t,e,n){n.d(e,{Rr:()=>D,A2:()=>M,VJ:()=>P,Gk:()=>V,Q6:()=>L,a5:()=>N});var r=n(8333),o=n(7472),i=n(2128),s=n(8789),a=n(5119);function c(t){return 0!==t&&100*Math.random()<=t}var u=n(8383),d=n(5387),l=n(1468),f=n(4021),p=n(8925),m=n(98),h=n(1996),g=n(6447),y=n(5648),v=n(350),b=n(3487),_=n(7286),w=n(64),S=n(9305),k=n(6625),x=n(2729);const E="log",C="configuration",A="usage",T=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],I=[u.R8,u.KG];let R;function O(){return R||(R=new h.dX(100)),R}function N(t,e,n,s){const l=new h.cP,{enabled:f,metricsEnabled:y}=function(t,e,n,s,u,d=1,l=15){const f={},h=!I.includes(e.site)&&c(e.telemetrySampleRate),y={[E]:h,[C]:h&&c(e.telemetryConfigurationSampleRate),[A]:h&&c(e.telemetryUsageSampleRate),metric:h&&c(d)},_={is_local_file:"file:"===i.J.location?.protocol,is_worker:i.W},S=O();return S.subscribe(({rawEvent:i,metricName:c})=>{if(c&&!y.metric||!y[i.type])return;const d=c||i.status||i.type;let h=f[d];if(h||(h=f[d]=new Set),h.size>=l)return;const g=(0,b.s)(i);if(h.has(g))return;const S=n.trigger({startTime:(0,r.M8)().relative});if(S===a.ug)return;const k=function(t,n,i,s){const a={type:"telemetry",date:(0,r.M8)().timeStamp,service:n,version:"7.11.0",source:"browser",_dd:{format_version:2},telemetry:(0,o.kg)(i,{runtime_env:s,connectivity:(0,w.q)(),sdk_setup:"cdn",sdk_name:u}),ddtags:(0,m.m5)(e).join(","),experimental_features:Array.from((0,p.q7)())};return(0,o.kg)(a,t)}(S,t,i,_);s.notify(k),(0,v.b)("telemetry",k),h.add(g)}),S.unbuffer(),(0,g.Bd)(P),{enabled:h,metricsEnabled:y.metric}}(t,e,n,l,s),{stop:_}=function(t,e){const n=[];if((0,S.d0)()){const t=(0,S.Y9)(),r=e.subscribe(e=>t.send("internal_telemetry",e));n.push(r.unsubscribe)}else{const r=[(0,d.ns)(t,"rum")],o=(0,d.np)(t,"rum");o&&function(t){return t.site===u.Bb}(t)&&r.push(o);const i=(0,k.X)({endpoints:r,reportError:x.l});n.push(i.stop);const s=e.subscribe(i.add);n.push(s.unsubscribe)}return{stop:()=>n.forEach(t=>t())}}(e,l);return{stop:_,enabled:f,metricsEnabled:y}}function M(t,e){(0,s.N)()&&y.V.debug("[Telemetry]",t,e),O().notify({rawEvent:{type:E,message:t,status:"debug",...e}})}function P(t,e){O().notify({rawEvent:{type:E,status:"error",...$(t),...e}})}function D(t){O().notify({rawEvent:{type:C,configuration:t}})}function V(t,e){O().notify({rawEvent:{type:E,message:t,status:"debug",...e},metricName:t})}function L(t){O().notify({rawEvent:{type:A,usage:t}})}function $(t){if((0,l.b)(t)){const e=(0,_.T)(t);return{error:{kind:e.name,stack:(0,f.Yn)(U(e))},message:e.message}}return{error:{stack:l.e},message:"Uncaught "+(0,b.s)(t)}}function U(t){return t.stack=t.stack.filter(t=>!t.url||T.some(e=>t.url.startsWith(e))),t}},4993(t,e,n){n.d(e,{y:()=>o});var r=n(5648);function o(t,e){return(...n)=>{try{return t(...n)}catch(t){r.V.error(e,t)}}}},5648(t,e,n){var r=n(1864);const o=(0,r.XH)("Datadog Browser SDK:"),i=r.fH+"/real_user_monitoring/browser/troubleshooting";n.d(e,["V",0,o,"X",0,i])},7522(t,e,n){n.d(e,{N:()=>o});var r=n(2223);function o(){let t="",e=0;return{isAsync:!1,get isEmpty(){return!t},write(n,o){const i=(0,r.WW)(n);e+=i,t+=n,o&&o(i)},finish(t){t(this.finishSync())},finishSync(){const n={output:t,outputBytesCount:e,rawBytesCount:e,pendingData:""};return t="",e=0,n},estimateEncodedBytesCount(t){return t.length}}}},8925(t,e,n){n.d(e,{Aq:()=>s,R9:()=>r,q7:()=>c,sr:()=>a});var r,o=n(9056);!function(t){t.SESSION_REPLAY_RECORD_CANVAS="session_replay_record_canvas",t.TRACK_INTAKE_REQUESTS="track_intake_requests",t.TRACK_WEBSOCKETS="track_websockets"}(r||(r={}));const i=new Set;function s(t){Array.isArray(t)&&t.filter(t=>(0,o.Rj)(r,t)).forEach(t=>{i.add(t)})}function a(t){return i.has(t)}function c(){return i}},4467(t,e,n){n.d(e,{W:()=>o});var r=n(2128);function o(t,e){const n=r.J;let o;return n.Zone&&"function"==typeof n.Zone.__symbol__&&(o=t[n.Zone.__symbol__(e)]),o||(o=t[e]),o}},3444(t,e,n){n.d(e,{H7:()=>a,my:()=>c,tv:()=>l});var r=n(9671),o=n(6447),i=n(2729),s=n(4021);function a(t,e,n,{computeHandlingStack:r}={}){let o=t[e];if("function"!=typeof o){if(!(e in t)||"string"!=typeof e||!e.startsWith("on"))return{stop:i.l};o=i.l}let a=!1;const{stop:c}=u(t,e,o,function(){if(a)return o.apply(this,arguments);const t=Array.from(arguments);return d(n,{target:this,parameters:t,handlingStack:r?(0,s.uC)("instrumented method"):void 0},()=>o.apply(this,t))});return{stop(){a=!0,c()}}}function c(t,e,n,{computeHandlingStack:r}={}){const o=t[e];if("function"!=typeof o)return{stop:i.l};let a=!1;const c=function(){if(!new.target)return Reflect.apply(o,this,Array.from(arguments));const t=new.target===c?o:new.target;if(a)return Reflect.construct(o,arguments,t);const e=Array.from(arguments);return d(n,{parameters:e,handlingStack:r?(0,s.uC)("instrumented constructor"):void 0},()=>Reflect.construct(o,e,t))},l=function(t,e){for(const n of[].concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)))Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n));const{stop:n}=u(e.prototype,"constructor",e.prototype.constructor,t);return n}(c,o),{stop:f}=u(t,e,o,c);return{stop(){a=!0,l(),f()}}}function u(t,e,n,r){return t[e]=r,{stop(){t[e]===r&&(t[e]=n)}}}function d(t,e,n){let r;(0,o.um)(t,null,[{...e,onPostCall(t){r=t}}]);const i=n();return r&&(0,o.um)(r,null,[i]),i}function l(t,e,n){const o=Object.getOwnPropertyDescriptor(t,e);if(!o?.set||!o.configurable)return{stop:i.l};const s=i.l;let a=(t,e)=>{(0,r.wg)(()=>{a!==s&&n(t,e)},0)};const c=function(t){o.set.call(this,t),a(this,t)};return Object.defineProperty(t,e,{set:c}),{stop(){Object.getOwnPropertyDescriptor(t,e)?.set===c&&Object.defineProperty(t,e,o),a=s}}}},4490(t,e,n){function r(t){return t}n.d(e,{B:()=>r}),new Map},6447(t,e,n){n.d(e,{um:()=>c,dm:()=>a,Dx:()=>u,Bd:()=>d});var r=n(8789),o=n(5648);let i;const{monitored:s,monitor:a,callMonitored:c,monitorError:u}=function(t,e){function n(t){return function(...e){return o(t,this,e)}}function o(t,e,n){try{return t.apply(e,n)}catch(t){i(t)}}function i(n){const o=e=>{(0,r.N)()&&t.error("[MONITOR]",e)};o(n);try{e(n)}catch(n){o(n)}}return{monitored(t,e,r){r.value=n(r.value)},monitor:n,callMonitored:o,monitorError:i}}(o.V,t=>i?.(t));function d(t){i=t}},1996(t,e,n){n.d(e,{dX:()=>c,cP:()=>s,Fx:()=>a});var r=n(2128),o=n(6447);function i(t){const e=r.J.queueMicrotask;"function"==typeof e?e((0,o.dm)(t)):Promise.resolve().then((0,o.dm)(t))}class s{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach(e=>e(t))}addObserver(t){this.observers.push(t),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(t){this.observers=this.observers.filter(e=>t!==e),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function a(...t){return new s(e=>{const n=t.map(t=>t.subscribe(t=>e.notify(t)));return()=>n.forEach(t=>t.unsubscribe())})}class c extends s{constructor(t,e){super(),this.maxBufferSize=t,this.onDrop=e,this.buffer=[],this.droppedCount=0}notify(t){this.buffer.push(t),this.buffer.length>this.maxBufferSize&&(this.buffer.shift(),this.droppedCount++),super.notify(t)}subscribe(t){let e=!1;const n={unsubscribe:()=>{e=!0,this.removeObserver(t)}};return i(()=>{for(const n of this.buffer){if(e)return;t(n)}e||this.addObserver(t)}),n}unbuffer(){i(()=>{this.droppedCount>0&&this.onDrop&&this.onDrop(this.droppedCount),this.maxBufferSize=this.buffer.length=0})}}},7922(t,e,n){n.d(e,{BB:()=>s});var r=n(8333),o=n(9671),i=n(6447);function s(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback((0,i.dm)(t),e);return()=>window.cancelIdleCallback(n)}return function(t){const e=(0,r.x3)(),n=(0,o.wg)(()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,50-((0,r.x3)()-e))})},0);return()=>(0,o.DJ)(n)}(t)}},350(t,e,n){n.d(e,{b:()=>o});var r=n(2128);function o(t,e){const n=r.J.__ddBrowserSdkExtensionCallback;n&&n({type:t,payload:e})}},3487(t,e,n){n.d(e,{M:()=>i,s:()=>o});var r=n(2729);function o(t,e,n){if("object"!=typeof t||null===t)return JSON.stringify(t);const r=i(Object.prototype),o=i(Array.prototype),s=i(Object.getPrototypeOf(t)),a=i(t);try{return JSON.stringify(t,e,n)}catch{return"<error: unable to serialize object>"}finally{r(),o(),s(),a()}}function i(t){const e=t,n=e.toJSON;return n?(delete e.toJSON,()=>{e.toJSON=n}):r.l}},7286(t,e,n){n.d(e,{T:()=>i,h:()=>h});var r=n(8307);const o="?";function i(t){const e=[];let n=m(t,"stack");const r=t+"";if(n?.startsWith(r)&&(n=n.slice(r.length)),n&&n.split("\n").forEach(t=>{const n=function(t){const e=c.exec(t);if(!e)return;const n=0===e[2]?.indexOf("native"),r=0===e[2]?.indexOf("eval"),i=u.exec(e[2]);return r&&i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3]),{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||o,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}(t)||function(t){const e=d.exec(t);if(e)return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||o,line:e[3]?+e[3]:void 0,url:e[2]}}(t)||function(t){const e=l.exec(t);if(e)return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||o,line:+e[3],url:e[2]}}(t)||function(t){const e=f.exec(t);if(!e)return;const n=e[3]&&e[3].indexOf(" > eval")>-1,r=p.exec(e[3]);return n&&r&&(e[3]=r[1],e[4]=r[2],e[5]=void 0),{args:e[2]?e[2].split(","):[],column:e[5]?+e[5]:void 0,func:e[1]||o,line:e[4]?+e[4]:void 0,url:e[3]}}(t);n&&(!n.func&&n.line&&(n.func=o),e.push(n))}),e.length>0&&function(){if(void 0!==v)return v;const[t,e]=[class extends Error{constructor(){super(),this.name="Error"}},Error].map(t=>new t);return v=y(Object.getPrototypeOf(t))&&e.stack!==t.stack,v}()&&t instanceof Error){const n=[];let r=t;for(;(r=Object.getPrototypeOf(r))&&y(r);){const t=r.constructor?.name||o;n.push(t)}for(let t=n.length-1;t>=0&&e[0]?.func===n[t];t--)e.shift()}return{message:m(t,"message"),name:m(t,"name"),stack:e}}const s="((?:blob|native|eval|<anonymous>|[a-zA-Z][a-zA-Z0-9+.-]*:\\/\\/|\\w+\\.|\\/).*?)",a="(?::(\\d+))",c=RegExp(`^\\s*at (.*?) ?\\(${s}${a}?${a}?\\)?\\s*$`,"i"),u=RegExp(`\\((\\S*)${a}${a}\\)`),d=RegExp(`^\\s*at\\s*(?:(.*)?(?: @))?\\s*${s}${a}?${a}??\\s*$`,"i"),l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,p=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function m(t,e){return(0,r.OE)(t)&&"string"==typeof t[e]?t[e]:void 0}function h(t,e,n,r){if(void 0===e)return;const{name:o,message:i}=function(t){let e,n;return"[object String]"==={}.toString.call(t)&&([,e,n]=g.exec(t)),{name:e,message:n}}(t);return{name:o,message:i,stack:[{url:e,column:r,line:n}]}}const g=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function y(t){return(t.constructor+"").startsWith("class ")}let v},4021(t,e,n){n.d(e,{NR:()=>a,Yn:()=>s,uC:()=>i});var r=n(6447),o=n(7286);function i(t){const e=Error(t);let n;return e.name="HandlingStack",(0,r.um)(()=>{const t=(0,o.T)(e);t.stack=t.stack.slice(2),n=s(t)}),n}function s(t){let e=a(t);return t.stack.forEach(t=>{const n="?"===t.func?"<anonymous>":t.func,r=t.args&&t.args.length>0?`(${t.args.join(", ")})`:"",o=t.line?":"+t.line:"",i=t.line&&t.column?":"+t.column:"";e+=`\n at ${n}${r} @ ${t.url}${o}${i}`}),e}function a(t){return`${t.name||"Error"}: ${t.message}`}},9671(t,e,n){n.d(e,{DJ:()=>a,vG:()=>u,wg:()=>s,yb:()=>c});var r=n(2128),o=n(4467),i=n(6447);function s(t,e){return(0,o.W)(r.J,"setTimeout")((0,i.dm)(t),e)}function a(t){(0,o.W)(r.J,"clearTimeout")(t)}function c(t,e){return(0,o.W)(r.J,"setInterval")((0,i.dm)(t),e)}function u(t){(0,o.W)(r.J,"clearInterval")(t)}},6672(t,e,n){function r(t,e){const n=t.indexOf(e);n>=0&&t.splice(n,1)}function o(t){return Array.isArray(t)&&t.length>0}n.d(e,{Ai:()=>r,EI:()=>o})},2223(t,e,n){n.d(e,{WW:()=>o,wh:()=>i});const r=/[^\u0000-\u007F]/;function o(t){return r.test(t)?(new TextEncoder).encode(t).length:t.length}function i(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}n.d(e,["iH",0,1048576])},2729(t,e,n){n.d(e,{l:()=>i,n:()=>o});var r=n(9671);function o(t,e,n){const o=void 0===n?.leading||n.leading,i=void 0===n?.trailing||n.trailing;let s,a,c=!1;return{throttled(...n){c?s=n:(o?t(...n):s=n,c=!0,a=(0,r.wg)(()=>{i&&s&&t(...s),c=!1,s=void 0},e))},cancel(){(0,r.DJ)(a),c=!1,s=void 0}}}function i(){}},9056(t,e,n){n.d(e,{LG:()=>c,RI:()=>a,Rj:()=>s,XU:()=>o,yG:()=>i});const r=(t,e)=>"__proto__"===t?void 0:e;function o(t){try{return JSON.parse(t,r)}catch{}}function i(t){return{...t}}function s(t,e){return Object.keys(t).some(n=>t[n]===e)}function a(t){return 0===Object.keys(t).length}function c(t,e){const n={};for(const r of Object.keys(t))n[r]=e(t[r]);return n}},8424(t,e,n){function r(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(e(r,n,t))return r}}function o(t){return Object.values(t)}function i(t){return Object.entries(t)}n.d(e,{KQ:()=>o,Uk:()=>r,WP:()=>i})},3472(t,e,n){function r(t){return t>=500}function o(t){try{return t.clone()}catch{return}}n.d(e,{G:()=>r,i:()=>o})},2511(t,e,n){n.d(e,{qj:()=>u});var r=n(8333),o=n(9671),i=n(6672);const s=1/0;let a;const c=new Set;function u({expireDelay:t,maxEntries:e}){let n=[];const u=()=>{if(!t)return;const e=(0,r.$S)()-t;for(;n.length>0&&n[n.length-1].endTime<e;)n.pop()};return t&&(a||(a=(0,o.yb)(()=>{c.forEach(t=>t())},6e4)),c.add(u)),{add(t,r){const o={value:t,startTime:r,endTime:s,remove(){(0,i.Ai)(n,o)},close(t){o.endTime=t}};return e&&n.length>=e&&n.pop(),n.unshift(o),o},find(t=1/0,e={returnInactive:!1}){for(const r of n)if(r.startTime<=t){if(e.returnInactive||t<=r.endTime)return r.value;break}},closeActive(t){const e=n[0];e?.endTime===s&&e.close(t)},findAll(t=1/0,e=0){const o=(0,r.Gw)(t,e);return n.filter(e=>e.startTime<=o&&t<=e.endTime).map(t=>t.value)},findAllEntries(t=1/0,e=0){const o=(0,r.Gw)(t,e);return n.filter(e=>e.startTime<=o&&t<=e.endTime)},getEntries:t=>n.filter(e=>e.startTime===t),reset(){n=[]},stop(){c.delete(u),0===c.size&&a&&((0,o.vG)(a),a=void 0)}}}},6625(t,e,n){n.d(e,{X:()=>y});var r=n(1864),o=n(5648),i=n(8424),s=n(6448),a=n(3487),c=n(7522),u=n(2223),d=n(4490),l=n(1776),f=n(2128),p=n(1996),m=n(9671);const h=f.W?1:50;function g({pageMayExitObservable:t}){let e;const n=new p.cP,r=t.subscribe(t=>{e=t.reason;try{n.notify(t.reason)}finally{e=void 0}c(t.reason)}),o=new p.cP(()=>()=>{r.unsubscribe()});let i,s=0,a=0;function c(t){if(0===a)return;const e=a,n=s;a=0,s=0,(0,m.DJ)(i),i=void 0,o.notify({reason:t,messagesCount:e,bytesCount:n})}return{flushObservable:o,prepareUrgentFlushObservable:n,forceFlush:c,get messagesCount(){return a},notifyBeforeAddMessage(t){s+t>=l.AK&&c(e??"bytes_limit"),a+=1,s+=t,void 0===i&&(i=(0,m.wg)(()=>{c("duration_limit")},3e4))},notifyAfterAddMessage(t=0){s+=t,a>=h?c(e??"messages_limit"):s>=l.AK&&c(e??"bytes_limit")}}}function y({encoder:t=(0,c.N)(),endpoints:e,reportError:n}){const f=(0,d.B)(l.sA)(e,n),p=(0,d.B)(s._T)(),m=(0,d.B)(g)({pageMayExitObservable:p});let h={};const y=m.flushObservable.subscribe(e=>function(e){const n=(0,i.KQ)(h).join("\n");h={};const r=(0,s.Kp)(e.reason),o=r?f.sendOnExit:f.send;if(r&&t.isAsync){const e=t.finishSync();e.outputBytesCount&&o(v(e));const r=[e.pendingData,n].filter(Boolean).join("\n");r&&o({data:r,bytesCount:(0,u.WW)(r)})}else n&&t.write(t.isEmpty?n:"\n"+n),t.finish(t=>{o(v(t))})}(e));function b(e,n){const i=(0,a.s)(e),s=t.estimateEncodedBytesCount(i);s>=262144?o.V.warn(`Discarded a message whose size was bigger than the maximum allowed size 256KiB. ${r.xG} ${o.X}/#technical-limitations`):function(e,n,r){if(void 0!==r){let o;void 0!==h[r]?o=n-t.estimateEncodedBytesCount(h[r]):(m.notifyBeforeAddMessage(n),o=0),h[r]=e,m.notifyAfterAddMessage(o)}else m.notifyBeforeAddMessage(n),t.write(t.isEmpty?e:"\n"+e,t=>{m.notifyAfterAddMessage(t-n)})}(i,s,n)}return{get isEmpty(){return 0===m.messagesCount},add:b,upsert:b,prepareUrgentFlushObservable:m.prepareUrgentFlushObservable,forceFlush:m.forceFlush,flushObservable:m.flushObservable,stop:y.unsubscribe}}function v(t){let e;return e="string"==typeof t.output?t.output:new Blob([t.output],{type:"text/plain"}),{data:e,bytesCount:t.outputBytesCount,encoding:t.encoding}}},9305(t,e,n){n.d(e,{Ww:()=>s,Y9:()=>i,d0:()=>a});var r=n(2128),o=n(5648);function i(){const t=r.J.DatadogEventBridge;if(t)return{getCapabilities(){return JSON.parse(t.getCapabilities?.()||"[]")},getPrivacyLevel(){return t.getPrivacyLevel?.()},getIsTraceSampled(){return JSON.parse(t.getIsTraceSampled?.()||"null")},getAllowedWebViewHosts(){return JSON.parse(t.getAllowedWebViewHosts())},send(e,n,r){const o=r?{id:r}:void 0;t.send(JSON.stringify({eventType:e,event:n,view:o}))}}}function s(t){const e=i();return!!e&&e.getCapabilities().includes(t)}function a(t=r.J.location?.hostname){const e=i();return e?.getAllowedWebViewHosts().some(e=>function(t,e){if(!e.includes("*"))return t===e||t.endsWith("."+e);const n=e.split("*");if(2!==n.length)return o.V.error(`Invalid WebView host pattern "${e}": only one wildcard (*) is supported.`),!1;const[r,i]=n;return t.length>r.length+i.length&&t.startsWith(r)&&t.endsWith(i)}(t,e))??!1}},1776(t,e,n){n.d(e,{AK:()=>h,sA:()=>g});var r=n(465),o=n(6447),i=n(1996),s=n(9671),a=n(2223),c=n(3472);const u=20*a.iH;function d(t,e,n,r,o,i){0===e.transportStatus&&0===e.queuedPayloads.size()&&e.bandwidthMonitor.canHandle(t)?f(t,e,n,i,{onSuccess:()=>p(0,e,n,r,o,i),onFailure(){e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t}),l(e,n,r,o,i)}}):e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t})}function l(t,e,n,r,o){2===t.transportStatus&&(0,s.wg)(()=>{f(t.queuedPayloads.first(),t,e,o,{onSuccess(){t.queuedPayloads.dequeue(),t.currentBackoffTime=1e3,p(1,t,e,n,r,o)},onFailure(){t.currentBackoffTime=Math.min(6e4,2*t.currentBackoffTime),l(t,e,n,r,o)}})},t.currentBackoffTime)}function f(t,e,n,r,{onSuccess:o,onFailure:i}){e.bandwidthMonitor.add(t),n(t,n=>{e.bandwidthMonitor.remove(t),function(t){return"opaque"!==t.type&&(0===t.status&&!navigator.onLine||408===t.status||429===t.status||(0,c.G)(t.status))}(n)?(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:"failure",bandwidth:e.bandwidthMonitor.stats(),payload:t}),i()):(e.transportStatus=0,r.notify({type:"success",bandwidth:e.bandwidthMonitor.stats(),payload:t}),o())})}function p(t,e,n,r,o,i){0===t&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(o(`Reached max ${r} events size queued for upload: ${u/a.iH}MiB`),e.queueFullReported=!0);const s=e.queuedPayloads;for(e.queuedPayloads=m();s.size()>0;)d(s.dequeue(),e,n,r,o,i)}function m(){const t=[];return{bytesCount:0,enqueue(e){return!this.isFull()&&(t.push(e),this.bytesCount+=e.bytesCount,!0)},first(){return t[0]},dequeue(){const e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size(){return t.length},isFull(){return this.bytesCount>=u}}}const h=16384;function g(t,e,n=h){const r=new i.cP,o={transportStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle(t){return 0===this.ongoingRequestCount||this.ongoingByteCount+t.bytesCount<=81920&&this.ongoingRequestCount<32},add(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}},queuedPayloads:m(),queueFullReported:!1};return{observable:r,send(n){for(const i of t)d(n,o,(t,e)=>{b(i,t,e)},i.trackType,e,r)},sendOnExit(e){for(const r of t)y(r,n,e)}}}function y(t,e,n){if(n.bytesCount<e)try{const e=t.build("beacon",n);if(navigator.sendBeacon(e,n.data))return}catch(t){!function(t){v||(v=!0,(0,o.Dx)(t))}(t)}b(t,n)}let v=!1;function b(t,e,n){const i=t.build("fetch",e);(0,r.h)(i,{method:"POST",body:e.data,mode:"cors"}).then((0,o.dm)(t=>n?.({status:t.status,type:t.type}))).catch((0,o.dm)(()=>n?.({status:0})))}},4512(t,e,n){n.d(e,{eT:()=>Lr,o:()=>"***",$m:()=>Dr,NT:()=>Vr,Wd:()=>"hidden",bb:()=>dt,K:()=>lt,do:()=>cr,DL:()=>vt,K$:()=>Oi,wP:()=>Ui,wI:()=>ir,W3:()=>En,PJ:()=>zr,dT:()=>qr,$4:()=>sr,Gn:()=>Qo,zL:()=>Zo,dx:()=>Li,rf:()=>Jr,pB:()=>ti,g1:()=>Xo,nS:()=>nr,XS:()=>rr,p_:()=>or,AB:()=>Di,jR:()=>jr,ei:()=>qn,ap:()=>Fr,Ie:()=>Br});var r=n(8333),o=n(7472),i=n(1996);const s={GRANTED:"granted",NOT_GRANTED:"not-granted"};var a=n(1864),c=n(4490),u=n(2128),d=n(9164),l=n(3444),f=n(6447),p=n(2223),m=n(2729),h=n(3472);let g;const y=[];function v({responseBodyAction:t}={}){return t&&y.push(t),g||(g=new i.cP(t=>{if(!u.J.fetch)return;const{stop:e}=(0,l.H7)(u.J,"fetch",e=>function({parameters:t,onPostCall:e,handlingStack:n},o){const[i,s]=t;let a=s?.method;void 0===a&&i instanceof Request&&(a=i.method);const c=void 0!==a?(a+"").toUpperCase():"GET",u=i instanceof Request?i.url:(0,d.l2)(i+""),l={state:"start",init:s,input:i,method:c,startClocks:(0,r.M8)(),url:u,handlingStack:n,isAbortedOnStart:i instanceof Request&&i.signal?.aborted||s?.signal?.aborted||!1};o.notify(l),t[0]=l.input,t[1]=l.init,e(t=>{(async function(t,e,n){const r=n;let o;try{o=await e}catch(e){return void t.notify({...r,state:"resolve",status:0,isAborted:r.init?.signal?.aborted||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,error:e})}if(r.response=o,r.status=o.status,r.responseType=o.type,r.isAborted=!1,1===y.reduce((t,e)=>Math.max(t,e(r)),0)){const t=(0,h.i)(o);if(t?.body)try{const e=await async function(t){const e=t.getReader(),n=[];for(;;){const t=await e.read();if(t.done)break;n.push(t.value)}return e.cancel().catch(m.l),(0,p.wh)(n)}(t.body);r.responseBody=(new TextDecoder).decode(e)}catch{}}t.notify({...r,state:"resolve"})})(o,t,l).catch(f.Dx)})}(e,t),{computeHandlingStack:!0});return e})),g}var b=n(3236);let _;const w=new WeakMap;function S(){return _||(_="XMLHttpRequest"in u.J?new i.cP(t=>{const{stop:e}=(0,l.H7)(XMLHttpRequest.prototype,"open",k),{stop:n}=(0,l.H7)(XMLHttpRequest.prototype,"send",e=>{!function({target:t,parameters:[e],handlingStack:n},o){const i=w.get(t);if(!i)return;const s=i;s.state="start",s.startClocks=(0,r.M8)(),s.isAborted=!1,s.xhr=t,s.handlingStack=n,s.requestBody=e;let a=!1;const{stop:c}=(0,l.H7)(t,"onreadystatechange",()=>{t.readyState===XMLHttpRequest.DONE&&u()}),u=()=>{if(d(),c(),a)return;a=!0;const e=i;e.duration=(0,r.vk)(s.startClocks.timeStamp,(0,r.nx)()),e.status=t.status,"string"==typeof t.response&&(e.responseBody=t.response),o.notify({...e,state:"complete"})},{stop:d}=(0,b.q2)(t,"loadend",u);o.notify(s)}(e,t)},{computeHandlingStack:!0}),{stop:o}=(0,l.H7)(XMLHttpRequest.prototype,"abort",x);return()=>{e(),n(),o()}}):new i.cP),_}function k({target:t,parameters:[e,n]}){w.set(t,{state:"open",method:(e+"").toUpperCase(),url:(0,d.l2)(n+"")})}function x({target:t}){const e=w.get(t);e&&(e.isAborted=!0)}var E=n(7003),C=n(7286),A=n(8307),T=n(5648),I=n(3487);function R(t,e=225280){const n=(0,I.M)(Object.prototype),r=(0,I.M)(Array.prototype);try{const n=[],r=new WeakMap,o=O(t,"$",void 0,n,r),i=JSON.stringify(o);let s=i?i.length:0;if(s>e)return void M(e,"discarded",t);for(;n.length>0&&s<e;){const o=n.shift();let i=0;if(Array.isArray(o.source))for(let a=0;a<o.source.length;a++){const c=O(o.source[a],o.path,a,n,r);if(s+=void 0!==c?JSON.stringify(c).length:4,s+=i,i=1,s>e){M(e,"truncated",t);break}o.target[a]=c}else for(const a in o.source)if(Object.prototype.hasOwnProperty.call(o.source,a)){const c=O(o.source[a],o.path,a,n,r);if(void 0!==c&&(s+=JSON.stringify(c).length+i+a.length+3,i=1),s>e){M(e,"truncated",t);break}o.target[a]=c}}return o}finally{n(),r()}}function O(t,e,n,r,o){const i=function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)return t;const e=t;if("function"==typeof e.toJSON)try{return e.toJSON()}catch{}return t}(t);if(!i||"object"!=typeof i)return"bigint"==typeof(s=i)?"[BigInt] "+s.toString():"function"==typeof s?"[Function] "+(s.name||"unknown"):"symbol"==typeof s?"[Symbol] "+(s.description||s.toString()):s;var s;const a=N(i);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;const c=t;if(o.has(c))return`[Reference seen at ${o.get(c)}]`;const u=void 0!==n?`${e}.${n}`:e,d=Array.isArray(i)?[]:{};return o.set(c,u),r.push({source:i,target:d,path:u}),d}function N(t){try{if(t instanceof Event)return{type:(e=t).type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?N(e.currentTarget):null,target:e.target?N(e.target):null};if(t instanceof RegExp)return"[RegExp] "+t.toString();const n=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(n?.[1])return`[${n[1]}]`}catch{}var e;return"[Unserializable]"}function M(t,e,n){T.V.warn(`The data provided has been ${e} as it is over the limit of ${t} characters:`,n)}var P=n(4021),D=n(8032),V=n(1468);function L({originalError:t,stackTrace:e,source:n,useFallbackStack:r=!0,nonErrorPrefix:o}){const i=(0,V.b)(t);return{source:n,type:e?e.name:void 0,message:j(e,i,o,t),stack:e?(0,P.Yn)(e):r?V.e:void 0}}function $(t){return t?.stack.map(t=>t.url).filter(t=>!!t)??[]}function U(t,e){const n=e.flatMap(({stackTrace:t})=>$(t));return(0,D.Jv)($(t).concat(n))}function z({stackTrace:t,originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:i,useFallbackStack:s=!0,source:a,handling:c}){const u=t??((0,V.b)(e)?(0,C.T)(e):void 0),d=(0,V.b)(e)?function(t){const e=[];let n=t.cause;for(;null!=n&&e.length<10;){const t=(0,V.b)(n),r=t?(0,C.T)(n):void 0;e.push({originalError:n,stackTrace:r}),n=t?n.cause:void 0}return e}(e):[],l=L({originalError:e,stackTrace:u,source:a,useFallbackStack:s,nonErrorPrefix:i}),f=d.map(({originalError:t,stackTrace:e})=>L({originalError:t,stackTrace:e,source:a,useFallbackStack:!1}));return{startClocks:o,handling:c,handlingStack:n,componentStack:r,originalError:e,...l,debugIds:U(u,d),causes:f.length?f:void 0,fingerprint:q(e),context:B(e)}}function j(t,e,n,r){return t?.message&&t?.name?t.message:e?"Empty message":n?`${n} ${(0,I.s)(R(r))}`:(0,I.s)(R(r))}function q(t){return(0,V.b)(t)&&"dd_fingerprint"in t?t.dd_fingerprint+"":void 0}function B(t){if((0,A.OE)(t))return t.dd_context}var F=n(4023);function G(){return new i.cP(t=>{const e=(e,n)=>{const o=z({stackTrace:n,originalError:e,startClocks:(0,r.M8)(),nonErrorPrefix:"Uncaught",source:F.g.SOURCE,handling:"unhandled"});t.notify(o)},{stop:n}=(o=e,(0,l.H7)(u.J,"onerror",({parameters:[t,e,n,r,i]})=>{let s;(0,V.b)(i)||(s=(0,C.h)(t,e,n,r)),o(i??t,s)}));var o;const{stop:i}=function(t){return(0,b.BX)(u.J.window,"unhandledrejection")?(0,l.H7)(u.J,"onunhandledrejection",({parameters:[e]})=>{t(e.reason||"Empty reason")}):{stop:m.l}}(e);return()=>{n(),i()}})}let W={};var J=n(7522),H=n(5021);function K(t,e,n,r){return(0,f.dm)((...o)=>(r&&(0,E.Q6)({feature:r}),t()[e][n](...o)))}function Q(t,e,n){t.changeObservable.subscribe(()=>{const r=t.getContext();n.notify(t=>t[e].setContext(r))})}const Z="userContext",Y="globalContext",X="accountContext",tt="getContext",et="setContext",nt="setContextProperty",rt="removeContextProperty",ot="clearContext";function it(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,it)}const st=/(\S+?)\s*=\s*(.*?)(?:;|$)/g;function at(t,e){for(st.lastIndex=0;;){const n=st.exec(t);if(!n)break;if(n[1]===e)return n[2]}}function ct(t,e,n=""){const r=t.charCodeAt(e-1),o=r>=55296&&r<=56319?e+1:e;return t.length<=o?t:`${t.slice(0,o)}${n}`}function ut(t,e){e.silentMultipleInit||T.V.error(t+" is already initialized.")}const dt={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",VIEW_UPDATE:"view_update",RESOURCE:"resource",VITAL:"vital"},lt={LONG_TASK:"long-task",LONG_ANIMATION_FRAME:"long-animation-frame"},ft="initial_load",pt="route_change",mt="bf_cache",ht="custom",gt="error_click",yt="dead_click",vt={DURATION:"duration",OPERATION_STEP:"operation_step"};var bt=n(8383);const _t={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},wt={ALL:"all",SAMPLED:"sampled"},St={clientToken:{type:"string",required:!0},service:{type:"string"},env:{type:"string"},version:{type:"string"},site:{type:"site",default:bt.NW},proxy:{type:"union",variants:[{type:"string"},{type:"function",signature:void 0}]},sessionSampleRate:{type:"percentage",default:100},telemetrySampleRate:{type:"percentage",default:20},telemetryConfigurationSampleRate:{type:"percentage",default:5},telemetryUsageSampleRate:{type:"percentage",default:5},silentMultipleInit:{type:"boolean",default:!1,strict:!1},storeContextsAcrossPages:{type:"boolean",default:!1,strict:!1},trackAnonymousUser:{type:"boolean",default:!0,strict:!1},useSecureSessionCookie:{type:"boolean",default:!1,strict:!1},usePartitionedCrossSiteSessionCookie:{type:"boolean",default:!1,strict:!1},trackSessionAcrossSubdomains:{type:"boolean",default:!1,strict:!1},allowedTrackingOrigins:{type:"match-option",multiple:!0,strict:!1},trackingConsent:{type:"enum",values:s,default:s.GRANTED},beforeSend:{type:"function",signature:void 0},source:{type:"enum",values:["browser","flutter","unity"],default:"browser",strict:!1},sessionPersistence:{type:"enum",values:["cookie","local-storage","memory"],multiple:!0,strict:!1},replica:{type:"schema",schema:{clientToken:{type:"string",required:!0},applicationId:{type:"string"}}},datacenter:{type:"string"},sdkVersion:{type:"string"},variant:{type:"string"}};var kt=n(9305),xt=n(8925),Et=n(4993);function Ct(t,e){return+t.toFixed(e)}function At(t){return"number"==typeof t}var Tt=n(6672);function It(t,e){switch(e.type){case"string":return`"${t}" must be a non-empty string`;case"number":return void 0!==e.min&&void 0!==e.max?`"${t}" must be a number between ${e.min} and ${e.max}`:void 0!==e.min?`"${t}" must be a number greater than or equal to ${e.min}`:void 0!==e.max?`"${t}" must be a number less than or equal to ${e.max}`:`"${t}" must be a finite number`;case"percentage":return`"${t}" must be a number between 0 and 100`;case"boolean":return`"${t}" must be a boolean`;case"site":return`"${t}" must be a valid Datadog site. ${a.xG} ${a.fH}/getting_started/site/.`;case"match-option":return`"${t}" must be a string, RegExp, or function`;case"enum":return`"${t}" must be one of: "${Pt(e.values).join('", "')}"`;case"union":return`"${t}" does not match any expected type`;case"schema":return`"${t}" is not a valid object`;case"function":return`"${t}" must be a function`}}function Rt(t,e,n){const r={};for(const[i,s]of Object.entries(t)){const t=e[i],a=s.multiple?Ot(s,t,n):Mt(s,t,n);if(void 0===a){if(null!=t&&""!==t){if(n.error(It(i,s)),s.required||!1!==s.strict)return}else if(s.required)return void n.error(`"${i}" is required`);r[i]="default"in s?(0,o.Go)(s.default):void 0}else r[i]=a}return r}function Ot(t,e,n){if(null==e)return;if("enum"===t.type&&t.allowAll&&"all"===e)return Pt(t.values).slice();const r=Array.isArray(e)?e:[e],o=[];for(const e of r){const r=Mt(t,e,n);if(void 0===r){if(!1!==t.strict)return}else o.push(r)}return!1===t.strict&&0===o.length&&r.length>0?void 0:o}const Nt=/(datadog|ddog|datad0g|dd0g)/;function Mt(t,e,n){if("schema"===t.type){if("object"!=typeof e||null===e)return;return Rt(t.schema,e,n)}if("union"!==t.type){if(null!=e)switch(t.type){case"function":return"function"==typeof e?e:void 0;case"string":return"string"==typeof e&&e.length>0?e:void 0;case"number":return"number"==typeof e&&Number.isFinite(e)&&(void 0===t.min||e>=t.min)&&(void 0===t.max||e<=t.max)?e:void 0;case"percentage":return(0,A.fp)(e)?e:void 0;case"boolean":return"boolean"==typeof e?e:!1===t.strict?!!e:void 0;case"site":if("string"!=typeof e||!Nt.test(e))return;return e;case"match-option":return(0,A.Vl)(e)?e:void 0;case"enum":return"string"==typeof e&&Pt(t.values).includes(e)?e:void 0}}else{if(null==e)return;for(const r of t.variants){const t=Mt(r,e,n);if(void 0!==t)return t}}}function Pt(t){return Array.isArray(t)?t:Object.values(t)}var Dt=n(9056);function Vt(t,e,n=0,r){const o=new Date;o.setTime(o.getTime()+n);const i="expires="+o.toUTCString(),s=r?.crossSite?"none":"strict",a=r?.domain?";domain="+r.domain:"",c=r?.secure?";secure":"",u=r?.partitioned?";partitioned":"";document.cookie=`${t}=${e};${i};path=/;samesite=${s}${a}${c}${u}`}function Lt(t){const e=at(document.cookie,t);if(""!==e)return e}function $t(t){return function(t){const e=new Map;for(st.lastIndex=0;;){const n=st.exec(t);if(!n)break;{const t=n[1],r=n[2];e.has(t)?e.get(t).push(r):e.set(t,[r])}}return e}(document.cookie).get(t)||[]}let Ut,zt;function jt(t){return Ut||(Ut=function(t){const e=new Map;for(st.lastIndex=0;;){const n=st.exec(t);if(!n)break;e.set(n[1],n[2])}return e}(document.cookie)),Ut.get(t)}function qt(t,e){Vt(t,"",0,e)}var Bt=n(465),Ft=n(5387);function Gt(t,e){e.lastIndex=0;const n=e.exec(t);if(!n)return;const[r,o]=n;return o||r}const Wt=/[a-zA-Z_$]/,Jt=/[a-zA-Z0-9_$]/,Ht=/[0-9]/,Kt=/[a-fA-F0-9]/,Qt={0:()=>!1,1:()=>!1,2:t=>Wt.test(t),3:t=>Jt.test(t),4:t=>"."===t,5:t=>"["===t,6:t=>"]"===t,7:t=>Ht.test(t),8:t=>"'\"".includes(t),9:(t,e)=>t===e.quote,10:()=>!0,11:t=>"\\"===t,12:(t,e)=>void 0===e.escapeSequence?(e.quote+"/\\bfnrtu").includes(t):!!(e.escapeSequence.startsWith("u")&&e.escapeSequence.length<5)&&Kt.test(t)},Zt={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},Yt=[2,3,7,10],Xt=[4,5,6];function te(t){return"\"'/\\bfnrt".includes(t)||t.startsWith("u")&&5===t.length}const ee={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function ne(t){return t.startsWith("u")?String.fromCharCode(parseInt(t.slice(1),16)):ee[t]}const re={hit:"success",miss:"missing",error:"failure"},oe=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","telemetrySampleRate","trackAnonymousUser","trackUserInteractions","trackResources","trackLongTasks","traceContextInjection","actionNameAttribute","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];function ie(t,e,n,r){const o={...t};if(e.rum){const t=e.rum;oe.forEach(e=>{e in t&&(o[e]=i(t[e]))}),Object.keys(n).forEach(e=>{var r;void 0!==t[e]&&(r=n[e],t[e].forEach(({key:t,value:e})=>{r.setContextProperty(t,i(e))}))})}return void 0!==e.profiling?.sampleRate&&(o.profilingSampleRate=e.profiling.sampleRate),o;function i(t){if(Array.isArray(t))return t.map(i);if((0,A.OE)(t)){if("rcSerializedType"in t){const e=t.rcSerializedType;switch(e){case"string":return t.value;case"regex":return ae(t.value);case"dynamic":return function(t){const e=t.strategy;let n;switch(e){case"cookie":n=function({name:t}){const e=Lt(t);return r.increment("cookie",void 0!==e?"success":"missing"),e}(t);break;case"dom":n=function({selector:t,attribute:e}){let n;try{n=document.querySelector(t)}catch{return T.V.error(`Invalid selector in the remote configuration: '${t}'`),void r.increment("dom","failure")}if(!n)return void r.increment("dom","missing");if(function(t,e){return"password"===t.getAttribute("type")&&"value"===e}(n,e))return T.V.error(`Forbidden element selected by the remote configuration: '${t}'`),void r.increment("dom","failure");const o=void 0!==e?n.getAttribute(e):n.textContent;if(null!==o)return r.increment("dom","success"),o;r.increment("dom","missing")}(t);break;case"js":n=function({path:t}){let e=window;const n=function(t){const e=[];let n,r=0;const o={quote:void 0,escapeSequence:void 0};let i="";for(const s of t){if(n=Zt[r].find(t=>Qt[t](s,o)),!n)return[];if(void 0!==o.escapeSequence&&12!==n){if(!te(o.escapeSequence))return[];i+=ne(o.escapeSequence),o.escapeSequence=void 0}Yt.includes(n)?i+=s:Xt.includes(n)&&""!==i?(e.push(i),i=""):12===n?o.escapeSequence=o.escapeSequence?`${o.escapeSequence}${s}`:s:8===n?o.quote=s:9===n&&(o.quote=void 0),r=n}return Zt[r].includes(1)?(""!==i&&e.push(i),e):[]}(t);if(0===n.length)return T.V.error(`Invalid JSON path in the remote configuration: '${t}'`),void r.increment("js","failure");for(const o of n){if(!(o in e))return void r.increment("js","missing");try{e=e[o]}catch(e){return T.V.error(`Error accessing: '${t}'`,e),void r.increment("js","failure")}}return r.increment("js","success"),e}(t);break;case"localStorage":n=function({key:t}){let e;try{e=localStorage.getItem(t)}catch{return void r.increment("localStorage","failure")}return r.increment("localStorage",null!==e?"success":"missing"),e??void 0}(t);break;default:return void T.V.error(`Unsupported remote configuration: "strategy": "${e}"`)}const o=t.extractor;return void 0!==o&&"string"==typeof n?function(t,e){const n=ae(t.value);if(void 0!==n)return Gt(e,n)}(o,n):n}(t);default:return void T.V.error(`Unsupported remote configuration: "rcSerializedType": "${e}"`)}}return(0,Dt.LG)(t,i)}return t}}function se(){const t={fetch:{}};return{get:()=>t,increment(e,n){t[e]||(t[e]={}),t[e][n]||(t[e][n]=0),t[e][n]=t[e][n]+1}}}function ae(t){try{return RegExp(t)}catch{T.V.error(`Invalid regex in the remote configuration: '${t}'`)}}async function ce(t){let e;try{e=await(0,Bt.h)(function(t){if(t.remoteConfigurationProxy)return t.remoteConfigurationProxy;const e=ue(t);return(0,Ft.Hg)({site:t.site,path:`/v1/${encodeURIComponent(e)}.json`,subdomain:"sdk-configuration"})}(t))}catch{e=void 0}if(!e?.ok)return{ok:!1,error:Error("Error fetching the remote configuration.")};const n=await e.json();return n.rum||n.profiling?{ok:!0,value:n}:{ok:!1,error:Error("No remote configuration for RUM.")}}function ue(t){return t.remoteConfiguration?.id??t.remoteConfigurationId}const de=["tracecontext","datadog"],le=["cache-control","etag","age","expires","content-type","content-encoding","vary","content-length","server-timing","x-cache","cf-cache-status","x-vercel-cache"],fe={...St,applicationId:{type:"string",required:!0},actionNameAttribute:{type:"string"},workerUrl:{type:"string"},subdomain:{type:"string"},sessionReplaySampleRate:{type:"percentage",default:0},traceSampleRate:{type:"percentage",default:100},profilingSampleRate:{type:"percentage",default:0},compressIntakeRequests:{type:"boolean",default:!1},trackUserInteractions:{type:"boolean",default:!0,strict:!1},trackResources:{type:"boolean",default:!0,strict:!1},trackLongTasks:{type:"boolean",default:!0,strict:!1},trackViewsManually:{type:"boolean",default:!1,strict:!1},betaEnableViewUpdates:{type:"boolean"},betaTrackWebSockets:{type:"boolean",default:!1,strict:!1},enablePrivacyForActionName:{type:"boolean",default:!0},propagateTraceBaggage:{type:"boolean",default:!0},startSessionReplayRecordingManually:{type:"boolean",default:!1,strict:!1},sessionReplayCanvasRecording:{type:"schema",schema:{enable:{type:"boolean",required:!0},maxFramesPerSecond:{type:"number",min:0,max:5,default:1}}},defaultPrivacyLevel:{type:"enum",values:_t,default:_t.MASK_USER_INPUT,strict:!1},traceContextInjection:{type:"enum",values:wt,default:wt.SAMPLED,strict:!1},excludedActivityUrls:{type:"match-option",multiple:!0,default:[]},allowedTracingUrls:{type:"union",multiple:!0,strict:!1,default:[],variants:[{type:"match-option"},{type:"schema",schema:{match:{type:"match-option",required:!0},propagatorTypes:{type:"enum",values:["datadog","b3","b3multi","tracecontext"],multiple:!0,strict:!1,default:de}}}]},plugins:{type:"schema",multiple:!0,strict:!1,default:[],schema:{name:{type:"string",required:!0},getConfigurationTelemetry:{type:"function",strict:!1,signature:void 0},onInit:{type:"function",strict:!1,signature:void 0},onRumStart:{type:"function",strict:!1,signature:void 0}}},trackFeatureFlagsForEvents:{type:"enum",values:["vital","action","long_task","resource"],multiple:!0,strict:!1,default:[]}};function pe(t,e,n){return!(0,kt.d0)()&&(t??(!e&&"rum-salesforce"!==n))}function me(t){const e=new Set;return(0,Tt.EI)(t.allowedTracingUrls)&&t.allowedTracingUrls.forEach(t=>{he(t)?.propagatorTypes.forEach(t=>e.add(t))}),Array.from(e)}function he(t){return(0,A.Vl)(t)?{match:t,propagatorTypes:de}:(0,A.OE)(t)&&(0,A.Vl)(t.match)&&(null===t.propagatorTypes||void 0===t.propagatorTypes||Array.isArray(t.propagatorTypes))?{match:t.match,propagatorTypes:t.propagatorTypes||de}:void 0}function ge(t){if(!t.allowedGraphQlUrls)return[];if(!Array.isArray(t.allowedGraphQlUrls))return T.V.warn("allowedGraphQlUrls should be an array"),[];const e=[];return t.allowedGraphQlUrls.forEach(t=>{(0,A.Vl)(t)?e.push({match:t,trackPayload:!1,trackResponseErrors:!1}):(0,A.OE)(t)&&(0,A.Vl)(t.match)&&e.push({match:t.match,trackPayload:!!t.trackPayload,trackResponseErrors:!!t.trackResponseErrors})}),e}const ye=["request","response","any"];function ve(t){const e=t.trackResourceHeaders;if(void 0===e||!1===e)return[];if(!0===e)return le.map(t=>({name:t}));if(!Array.isArray(e))return T.V.warn("trackResourceHeaders should be true or an array of MatchHeader"),[];if(0===e.length)return T.V.warn("trackResourceHeaders is an empty array, no headers will be captured"),[];const n=[];return e.forEach((t,e)=>{if(!(0,A.OE)(t))return void T.V.warn(`trackResourceHeaders[${e}] should be a MatchHeader object`);if(void 0!==t.name&&!(0,A.Vl)(t.name))return void T.V.warn(`trackResourceHeaders[${e}].name should be a MatchOption`);if(void 0!==t.url&&!(0,A.Vl)(t.url))return void T.V.warn(`trackResourceHeaders[${e}].url should be a MatchOption`);if(void 0!==t.extractor&&!(t.extractor instanceof RegExp))return void T.V.warn(`trackResourceHeaders[${e}].extractor should be a RegExp`);if(void 0!==t.location&&("string"!=typeof t.location||!ye.includes(t.location)))return void T.V.warn(`trackResourceHeaders[${e}].location should be 'request', 'response', or 'any'`);const{name:r,...o}=t;n.push({...o,...void 0!==r?{name:"string"==typeof r?r.toLowerCase():r}:{}})}),n}function be(t){return(0,Tt.EI)(t)&&t.some(t=>(0,A.OE)(t)&&t.trackResponseErrors)}function _e(t,e,n){if(t)for(const r of t){const t=r[e];t&&t(n)}}const we=[];function Se(t,e,n){if("undefined"==typeof window||"undefined"==typeof localStorage)return;const r=function(t,e){return`_dd_c_${t}_${e}`}(e,n);we.push((0,b.q2)(window,"storage",({key:e})=>{r===e&&t.setContext(s())})),t.changeObservable.subscribe(function(){localStorage.setItem(r,JSON.stringify(t.getContext()))});const i=(0,o.kg)(s(),t.getContext());function s(){const t=localStorage.getItem(r);return t?(0,Dt.XU)(t)??{}:{}}(0,Dt.RI)(i)||t.setContext(i)}function ke(t,e,n){const r={...t};for(const[t,{required:o,type:i}]of Object.entries(e))"string"!==i||xe(r[t])||(r[t]=r[t]+""),o&&xe(r[t])&&T.V.warn(`The property ${t} of ${n} is required; context will not be sent to the intake.`);return r}function xe(t){return null==t||""===t}function Ee(t="",{propertiesConfig:e={}}={}){let n={};const r=new i.cP,s={getContext:()=>(0,o.Go)(n),setContext(o){!function(t){const e="object"===(0,A.Pw)(t);return e||T.V.error("Unsupported context:",t),e}(o)?s.clearContext():n=R(ke(o,e,t)),r.notify()},setContextProperty(o,i){n=R(ke({...n,[o]:i},e,t)),r.notify()},removeContextProperty(o){delete n[o],ke(n,e,t),r.notify()},clearContext(){n={},r.notify()},changeObservable:r};return s}function Ce(){return Ee("global context")}var Ae=n(5119);function Te(){return Ee("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function Ie(){return Ee("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function Re(t,e,n=!1){return t.some(t=>{try{if("function"==typeof t)return t(e);if(t instanceof RegExp)return t.lastIndex=0,t.test(e);if("string"==typeof t)return n?e.startsWith(t):t===e}catch(t){T.V.error(t)}return!1})}const Oe=["chrome-extension://","moz-extension://"];function Ne(t){return Oe.some(e=>t.includes(e))}var Me=n(2511),Pe=n(9671),De=n(4215),Ve=n(8424),Le=n(603);const $e=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function Ue(t){return t.created?Number(t.created):void 0}function ze(t){const e=t.expire&&Number(t.expire),n=Ue(t);if(e&&n)return Math.min(e,n+Le.AQ)}function je(t,e){const n={isExpired:"1"};return e.trackAnonymousUser&&t?.anonymousId&&(n.anonymousId=t?.anonymousId),n}function qe(t){return(0,Dt.RI)(t)}function Be(t){return void 0!==t.isExpired||!function(t){const e=ze(t);return!!e&&(0,r.x3)()<e}(t)}function Fe(t){t.expire=(0,r.x3)()+Le.HB+""}function Ge(t){return(0,Ve.WP)(t).map(([t,e])=>"anonymousId"===t?"aid="+e:`${t}=${e}`).join("&")}function We(t){const e={};return function(t){return!!t&&(-1!==t.indexOf("&")||$e.test(t))}(t)&&t.split("&").forEach(t=>{const n=$e.exec(t);if(null!==n){const[,t,r]=n;"aid"===t?e.anonymousId=r:e[t]=r}}),e}function Je(t,e){return qe(t)?(e.trackAnonymousUser&&(t.anonymousId=it()),je(t,e)):t}function He(t,e){if(qe(t))return t;let n=t;return Be(t)&&(n=je(t,e)),n.id||(n.id=it(),n.created=(0,r.x3)()+""),e.trackAnonymousUser&&!n.anonymousId&&(n.anonymousId=it()),delete n.isExpired,Fe(n),n}const Ke="dd_cookie_test_";async function Qe(t,e){const n=`${Ke}${it()}`,r="test",o=t(n,e);try{return await o.getAllAndSet(()=>({value:r,expireDelay:6e4})),(await o.getAll()).includes(r)}catch(t){return T.V.error(t),!1}finally{try{await o.delete()}catch{}}}function Ze(t,e){const n=(0,c.B)(u.J.cookieStore),o=new i.cP(()=>(0,b.q2)(n,"change",e=>{(e.changed.some(e=>e.name===t)||e.deleted.some(e=>e.name===t))&&o.notify()}).stop);return{async getAll(){return(await n.getAll(t)).map(t=>t.value)},delete(){return n.delete({name:t,domain:e.domain,path:"/",partitioned:e.partitioned})},async getAllAndSet(o){const i=await n.getAll(t),s=i.map(t=>t.value),{value:a,expireDelay:c}=o(s);try{await n.set({name:t,value:a,expires:(0,r.x3)()+c,path:"/",sameSite:e.crossSite?"none":"strict",domain:e.domain,secure:e.secure,partitioned:e.partitioned})}catch(n){if(!t.startsWith(Ke)){const r=$t(t);(0,E.A2)("Failed to set cookie using Cookie Store API",{"error.message":n.message,newValue:a,cookieOptions:{...e},cookies:i.map(t=>({...t})),cookieCount:i.length,documentCookies:r})}}},observable:o}}function Ye(t,e){let n=$t(t);const r=new i.cP(()=>{const e=(0,Pe.yb)(()=>{o($t(t))},1e3);return()=>{(0,Pe.vG)(e)}});function o(t){t+""!=n+""&&(n=t,r.notify())}return{getAll(){return Promise.resolve($t(t))},async getAllAndSet(n){const r=$t(t),{value:i,expireDelay:s}=n(r);Vt(t,i,s,e),await Promise.resolve(),o([i])},async delete(){qt(t,e),await Promise.resolve(),o([])},observable:r}}function Xe(){const t=(0,c.B)(u.J.cookieStore);return!(!t||!(0,b.BX)(t,"change"))}const tn="_dd_s_v2";let en;function nn(t,e){return 1===t?Ze(tn,e):Ye(tn,e)}function rn(t,e){let n;for(const r of t.slice().reverse())if(n=We(r),n.c===e)break;return delete n?.c,n??{}}function on(t){let e=0;return e|=0,e|=(t.domain?t.domain.split(".").length-1:0)<<1,e|=t.crossSite?1:0,e.toString(16)}const sn="_DD_SESSION";async function an(t){const e=void 0!==(n=t.sessionPersistence)?n:u.W?[Le.Q_.MEMORY]:[Le.Q_.COOKIE];var n;for(const n of e){const e=await cn(n,t);if(void 0!==e)return e}}function cn(t,e){switch(t){case Le.Q_.COOKIE:return async function(t){const e=function(t){const e={};if(e.secure=t.useSecureSessionCookie||t.usePartitionedCrossSiteSessionCookie,e.crossSite=t.usePartitionedCrossSiteSessionCookie,e.partitioned=t.usePartitionedCrossSiteSessionCookie,t.trackSessionAcrossSubdomains){const t=function(t=u.J.location?.hostname??"",e=("undefined"!=typeof document?document.referrer:"")){if("undefined"!=typeof document){if(void 0===zt){const n=function(t,e){try{return t||(0,d.c$)(e).hostname}catch{}}(t,e);if(n){const t="dd_site_test_"+it(),e="test",r=n.split(".");let o=r.pop();for(;r.length&&!Lt(t);)o=`${r.pop()}.${o}`,Vt(t,e,1e3,{domain:o});qt(t,{domain:o}),zt=o}}return zt}}();if(!t)return;e.domain=t}return e}(t);if(e)return Xe()&&await Qe(Ze,e)?{type:Le.Q_.COOKIE,cookieOptions:e,cookieApi:1}:await Qe(Ye,e)?{type:Le.Q_.COOKIE,cookieOptions:e,cookieApi:0}:void 0}(e);case Le.Q_.LOCAL_STORAGE:return function(){try{const t=it(),e="_dd_test_"+t;localStorage.setItem(e,t);const n=localStorage.getItem(e);return localStorage.removeItem(e),t===n?{type:Le.Q_.LOCAL_STORAGE}:void 0}catch{return}}();case Le.Q_.MEMORY:return{type:Le.Q_.MEMORY};default:return void T.V.error(`Invalid session persistence '${t+""}'`)}}function un(t,e){switch(t.type){case Le.Q_.COOKIE:return function(t,e){const{cookieOptions:n,cookieApi:r}=t,o=new i.cP,s=!!e.trackAnonymousUser,a=on(n),u=(0,c.B)(nn)(r,n);let d=!0;function l(t){return u.getAllAndSet(e=>{let r=rn(e,a);d&&(0,Dt.RI)(r)&&(r=rn($t("_dd_s"),a)),d=!1;const o=function(t,e){return Ge((0,Dt.RI)(t)?t:{...t,c:on(e)})}(t(r),n);return{value:o,expireDelay:s?Le._P:Le.AQ}})}return u.observable.subscribe(()=>{u.getAll().then(t=>{o.notify(rn(t,a))}).catch(t=>(0,f.Dx)(Error("Error while reading session cookies on change: "+t)))}),{async setSessionState(t,e){"undefined"!=typeof navigator&&navigator.locks?await navigator.locks.request(tn,()=>l(t)).catch(t=>{if(!function(t){return t instanceof Error&&("AbortError"===t.name||t.message.includes("no longer runnable"))}(t))throw t}):(en=(en??Promise.resolve()).then(()=>l(t)),await en)},sessionObservable:o}}(t,e);case Le.Q_.LOCAL_STORAGE:return function(){const t=new i.cP(t=>(0,b.q2)(window,"storage",e=>{e.key===tn&&e.storageArea===localStorage&&t.notify(We(e.newValue))}).stop);let e=!0;return{async setSessionState(n,r){let o=We(localStorage.getItem(tn));e&&qe(o)&&(o=We(localStorage.getItem("_dd_s"))),e=!1;const i=n(o);localStorage.setItem(tn,Ge(i)),await Promise.resolve(),t.notify(i)},sessionObservable:t}}();case Le.Q_.MEMORY:return function(){const t=u.J;t[sn]||(t[sn]={});const e=t[sn],n=new i.cP,r=e.onChange;return e.onChange=t=>{r?.(t),n.notify(t)},{async setSessionState(t,n){const r=e.state??{},o=(0,Dt.yG)(t(r));e.state=o,await Promise.resolve(),e.onChange?.(o)},sessionObservable:n}}()}}const dn=12*r.MA;let ln=[];async function fn(t,e){const n=(0,r.$S)(),o=new i.cP,s=new i.cP,a=await(0,c.B)(an)(t);if(!a)return void T.V.warn("No storage available for session. We will not send any data.");const d=(0,c.B)(un)(a,t),l=(0,Me.qj)({maxEntries:1e3});ln.push(()=>l.stop());let p=!1;const{throttled:h,cancel:g}=(0,m.n)(()=>{p=!1,d.setSessionState(e=>He(e,t),"expandOrRenewOnActivity").catch(f.Dx)},1e3);let y;ln.push(g),ln.push(()=>(0,Pe.DJ)(y));let v=!1;ln.push(()=>{v=!0});let _=await w().catch(t=>(0,f.Dx)(Error("Error while resolving initial session state: "+t)));if(_&&!v){for(;!e.isGranted();){if(x(),await new Promise(t=>e.onGrantedOnce(t)),v)return;if(_=await w().catch(f.Dx),!_||v)return}return l.add(C(_),(0,r.Oc)().relative),S(_),function(){const t=d.sessionObservable.subscribe(t=>{S(t),k(t)});ln.push(()=>t.unsubscribe())}(),e.observable.subscribe(()=>{e.isGranted()?(p=!1,d.setSessionState(e=>He(e,t),"expandOrRenewOnConsent").catch(f.Dx)):x()}),u.W||(function(){const{stop:t}=(0,b.lQ)(window,["click","touchstart","keydown","scroll"],()=>{e.isGranted()&&h()},{capture:!0,passive:!0});ln.push(t)}(),function(){const t=()=>{"visible"===document.visibilityState&&(p||d.setSessionState(t=>function(t){return Be(t)||qe(t)||!t.id||Fe(t),t}(t),"expandOnVisibility").catch(f.Dx))},{stop:e}=(0,b.q2)(document,"visibilitychange",t);ln.push(e);const n=(0,Pe.yb)(t,6e4);ln.push(()=>{(0,Pe.vG)(n)})}(),function(){const{stop:e}=(0,b.q2)(window,"resume",()=>{d.setSessionState(e=>Je(e,t),"initializeOnResume").catch(f.Dx)},{capture:!0});ln.push(e)}()),(0,E.Gk)("Session manager init metrics",{metrics:{duration:(0,r.vk)(n,(0,r.$S)())}}),{findSession(t,e){return l.find(t,e)},findTrackedSession(e,{returnInactive:n=!1,maxAge:o=dn}={}){const i=l.find(e,{returnInactive:n});if(i&&"invalid"!==i.id&&(0,De.$5)(i.id,t.sessionSampleRate)&&!((0,r.x3)()-i.createdAt>o))return i},renewObservable:o,expireObservable:s,expire:x,updateSessionState(t){d.setSessionState(e=>({...e,...t}),"updateState").catch(f.Dx)}}}async function w(){let e={};return await d.setSessionState(n=>{const r=Je(n,t);return e=He(r,t),e},"initialize"),e}function S(n){(0,Pe.DJ)(y);const o=ze(n);if(o){const n=o-(0,r.x3)();y=(0,Pe.wg)(()=>{d.setSessionState(n=>Be(n)?(e.isGranted()||delete n.anonymousId,je(n,t)):n,"expireOnTimeout").catch(f.Dx)},n)}}function k(t){const e=l.find(),n=void 0!==e?.id,i=void 0!==t.id,a=n&&i&&e.id!==t.id;if(!n||i&&!a||(p=!0,s.notify(),l.closeActive((0,r.$S)())),!i||n&&!a)n&&i&&!a&&(e.isReplayForced=!!t.forcedReplay);else{if(p)return;l.add(C(t),(0,r.$S)()),o.notify()}}function x(){g();const n=je(l.find(),t);e.isGranted()||delete n.anonymousId,k(n),d.setSessionState(n=>(e.isGranted()||delete n.anonymousId,je(n,t)),"expire").catch(f.Dx)}function C(t){const e=Ue(t)??(0,r.nx)();return t.id?{id:t.id,isReplayForced:!!t.forcedReplay,anonymousId:t.anonymousId,createdAt:e}:{id:"invalid",isReplayForced:!1,anonymousId:void 0,createdAt:e}}}const pn="datadog-synthetics-",mn=pn+"public-id",hn=pn+"result-id",gn=pn+"injects-rum",yn=pn+"rum-context";function vn(){return!(u.W||!u.J._DATADOG_SYNTHETICS_INJECTS_RUM&&!jt(gn))}function bn(){const t=function(){const t=u.J._DATADOG_SYNTHETICS_RUM_CONTEXT;if(t)return t;const e=jt(yn);return e?(0,Dt.XU)(decodeURIComponent(e)):{test_id:window._DATADOG_SYNTHETICS_PUBLIC_ID||jt(mn),result_id:window._DATADOG_SYNTHETICS_RESULT_ID||jt(hn)}}();return"object"==typeof(e=t)&&null!==e&&"string"==typeof e.test_id&&"string"==typeof e.result_id?t:void 0;var e}var _n=n(350),wn=n(6448);const Sn="_dd_tab_id";let kn;var xn=n(4467);function En(){let t;const e=window;if(e.Zone&&(t=(0,xn.W)(e,"MutationObserver"),e.MutationObserver&&t===e.MutationObserver)){const n=new e.MutationObserver(m.l),r=(0,xn.W)(n,"originalInstance");t=r?.constructor}return t||(t=e.MutationObserver),t}const Cn=class{constructor(){this.callbacks={}}notify(t,e){const n=this.callbacks[t];n&&n.forEach(t=>t(e))}subscribe(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(t=>e!==t)}}}},An=Le.AQ,Tn="fetch",In="other",Rn=Tn,On=[["document",t=>"navigation"===t],["xhr",t=>"xmlhttprequest"===t],[Tn,t=>"fetch"===t],["beacon",t=>"beacon"===t],["css",(t,e)=>/\.css$/i.test(e)],["js",(t,e)=>/\.js$/i.test(e)],["image",(t,e)=>["image","img","icon"].includes(t)||null!==/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(e)],["font",(t,e)=>null!==/\.(woff|eot|woff2|ttf)$/i.exec(e)],["media",(t,e)=>["audio","video"].includes(t)||null!==/\.(mp3|mp4)$/i.exec(e)]];function Nn(t){const e=t.name;if(!(0,d.AY)(e))return In;const n=(0,d.L2)(e);for(const[e,r]of On)if(r(t.initiatorType,n))return e;return In}function Mn(...t){for(let e=1;e<t.length;e+=1)if(t[e-1]>t[e])return!1;return!0}function Pn(t){return"xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType}function Dn(t){if(!function(t){const e=Mn(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd),n=!function(t){return t.redirectEnd>t.startTime}(t)||Mn(t.startTime,t.redirectStart,t.redirectEnd,t.fetchStart);return e&&n}(t))return;const{startTime:e,fetchStart:n,workerStart:r,redirectStart:o,redirectEnd:i,domainLookupStart:s,domainLookupEnd:a,connectStart:c,secureConnectionStart:u,connectEnd:d,requestStart:l,responseStart:f,responseEnd:p}=t,m={download:Vn(e,f,p),first_byte:Vn(e,l,f)};return 0<r&&r<n&&(m.worker=Vn(e,r,n)),n<d&&(m.connect=Vn(e,c,d),c<=u&&u<=d&&(m.ssl=Vn(e,u,d))),n<a&&(m.dns=Vn(e,s,a)),e<i&&(m.redirect=Vn(e,o,i)),m}function Vn(t,e,n){if(t<=e&&e<=n)return{duration:(0,r.Zj)((0,r.vk)(e,n)),start:(0,r.Zj)((0,r.vk)(t,e))}}function Ln(t){return""===t.nextHopProtocol?void 0:t.nextHopProtocol}function $n(t){return""===t.deliveryType?"other":t.deliveryType}function Un(t){if(t.startTime<t.responseStart){const{encodedBodySize:e,decodedBodySize:n,transferSize:r}=t;return{size:n,encoded_body_size:e,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function zn(t){return t&&(!(0,bt.wo)(t)||(0,xt.sr)(xt.R9.TRACK_INTAKE_REQUESTS))}const jn=/data:(.+)?(;base64)?,/g;function qn(t,e=24e3){if(t.length<=e||!t.startsWith("data:"))return t;const n=t.substring(0,100).match(jn);return n?n[0]+"[...]":t}function Bn(){return Fn(63)}function Fn(t){const e=crypto.getRandomValues(new Uint32Array(2));let n=BigInt(e[0])+(BigInt(e[1])<<32n);return 63===t&&(n&=0x7fffffffffffffffn),n}function Gn(t){return t.toString(16).padStart(16,"0")}function Wn(t){0!==t.status||t.isAborted||(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function Jn(t,e,n,r,o,i){const s=n.findTrackedSession();if(!s)return;const a=t.allowedTracingUrls.find(t=>Re([t.match],e.url,!0));if(!a)return;const c=(0,De.$5)(s.id,(0,De.it)(t.sessionSampleRate,t.traceSampleRate)),u=(0,kt.d0)()?(0,kt.Y9)()?.getIsTraceSampled()??c:c;(u||t.traceContextInjection===wt.ALL)&&(e.traceSampled=u,e.traceId=Fn(64),e.spanId=Bn(),i(function(t,e,n,r,o,i,s,a){const c={};if(o.forEach(r=>{switch(r){case"datadog":Object.assign(c,{"x-datadog-origin":"rum","x-datadog-parent-id":e.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":t.toString()});break;case"tracecontext":Object.assign(c,{traceparent:`00-0000000000000000${Gn(t)}-${Gn(e)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break;case"b3":Object.assign(c,{b3:`${Gn(t)}-${Gn(e)}-${n?"1":"0"}`});break;case"b3multi":Object.assign(c,{"X-B3-TraceId":Gn(t),"X-B3-SpanId":Gn(e),"X-B3-Sampled":n?"1":"0"})}}),a.propagateTraceBaggage){const t={"session.id":r},e=i.getContext().id;"string"==typeof e&&(t["user.id"]=e);const n=s.getContext().id;"string"==typeof n&&(t["account.id"]=n);const o=Object.entries(t).map(([t,e])=>`${t}=${encodeURIComponent(e)}`).join(",");o&&(c.baggage=o)}return c}(e.traceId,e.spanId,e.traceSampled,s.id,a.propagatorTypes,r,o,t)))}function Hn(t,e){return e.allowedGraphQlUrls.find(e=>Re([e.match],t))}let Kn,Qn=1;function Zn(t){t.requestIndex||(t.requestIndex=Qn++)}function Yn(t){return"string"==typeof t?(0,p.WW)(t):t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:"undefined"!=typeof Blob&&t instanceof Blob?t.size:0}function Xn(t,e,n){if(void 0===t.openClocks)return;const o=(0,r.vk)(t.openClocks.timeStamp,e.timeStamp);if("in"===n&&void 0===t.firstMessageInOffset?t.firstMessageInOffset=o:"out"===n&&void 0===t.firstMessageOutOffset&&(t.firstMessageOutOffset=o),"in"===n){if(void 0!==t.lastMessageInAt){const n=(0,r.vk)(t.lastMessageInAt,e.timeStamp);n>t.longestInboundSilence&&(t.longestInboundSilence=n)}t.lastMessageInAt=e.timeStamp}}function tr(t){return At(t)&&t<0?void 0:t}function er(t){return t.nodeType===Node.TEXT_NODE}function nr(t){return t.nodeType===Node.ELEMENT_NODE}function rr(t){return nr(t)&&!!t.shadowRoot}function or(t){const e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&nr(e.host)}function ir(t,e){let n=t.firstChild;for(;n;)e(n),n=n.nextSibling;rr(t)&&e(t.shadowRoot)}function sr(t){return or(t)?t.host:t.parentNode}function ar(t){if(t.parentElement)return t.parentElement;const e=t.parentNode;return e&&or(e)?e.host:null}var cr;function ur(t){return new i.cP(e=>{const n=t=>{const n=function(t){return t.filter(t=>!function(t){return!(t.entryType!==cr.RESOURCE||zn(t.name)&&function(t){return t.duration>=0}(t))}(t))}(t);n.length>0&&e.notify(n)};let r,o=!0;const i=new PerformanceObserver((0,f.dm)(t=>{o?r=(0,Pe.wg)(()=>n(t.getEntries())):n(t.getEntries())}));return i.observe(t),o=!1,!dr&&void 0!==window.performance&&"getEntries"in performance&&"addEventListener"in performance&&(dr=(0,b.q2)(performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{i.disconnect(),(0,Pe.DJ)(r)}})}let dr;function lr(t){return PerformanceObserver.supportedEntryTypes.includes(t)}!function(t){t.EVENT="event",t.FIRST_INPUT="first-input",t.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",t.LAYOUT_SHIFT="layout-shift",t.LONG_TASK="longtask",t.LONG_ANIMATION_FRAME="long-animation-frame",t.NAVIGATION="navigation",t.PAINT="paint",t.RESOURCE="resource",t.VISIBILITY_STATE="visibility-state"}(cr||(cr={}));const fr="data-dd-excluded-activity-mutations";function pr(t,e,n,o,i,s){const a=(0,c.B)(mr)(t,e,n,o);let u,d=!1;const l=(0,Pe.wg)((0,f.dm)(()=>g({hadActivity:!1})),100),p=void 0!==s?(0,Pe.wg)((0,f.dm)(()=>g({hadActivity:!0,end:(0,r.nx)()})),s):void 0,m=a.subscribe(({isBusy:t})=>{(0,Pe.DJ)(l),(0,Pe.DJ)(u);const e=(0,r.nx)();t||(u=(0,Pe.wg)((0,f.dm)(()=>g({hadActivity:!0,end:e})),100))}),h=()=>{d=!0,(0,Pe.DJ)(l),(0,Pe.DJ)(u),(0,Pe.DJ)(p),m.unsubscribe()};function g(t){d||(h(),i(t))}return{stop:h}}function mr(t,e,n,r){return new i.cP(o=>{const i=[];let s,a=0;return i.push(e.subscribe(t=>{t.every(gr)||c()}),n.subscribe(c),ur({type:cr.RESOURCE}).subscribe(t=>{t.some(t=>!hr(r,t.name))&&c()}),t.subscribe(7,t=>{hr(r,t.url)||(void 0===s&&(s=t.requestIndex),a+=1,c())}),t.subscribe(8,t=>{hr(r,t.url)||void 0===s||t.requestIndex<s||(a-=1,c())})),()=>{i.forEach(t=>t.unsubscribe())};function c(){o.notify({isBusy:a>0})}})}function hr(t,e){return Re(t.excludedActivityUrls,e)}function gr(t){const e="characterData"===t.type?t.target.parentElement:t.target;return!!(e&&nr(e)&&e.matches(`[${fr}], [${fr}] *`))}const yr="data-dd-action-name",vr="Masked Element",br=[yr,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],_r=[Ar,Er],wr=[Ar,function(t){if("BODY"===t.tagName)return;const e=t.classList;for(let n=0;n<e.length;n+=1){const r=e[n];if(!xr(r))return`${CSS.escape(t.tagName)}.${CSS.escape(r)}`}},Cr];function Sr(t,e){if(!t.isConnected)return;const n=function(t){const e=[];let n=t;for(;n;){const t=n.getRootNode();if(e.push({rootNode:t,target:n}),!or(t))break;n=t.host}return e.reverse()}(t),r=[];for(const{rootNode:t,target:o}of n){const n=kr(o,t,e);if(!n)return;r.push(n)}return r.join("::shadow ")}function kr(t,e,n){let r,o=t;for(;o&&"HTML"!==o.nodeName;){const t=Or(o,e,_r,Nr,n,r);if(t)return Pr(t,r);r=Pr(Or(o,e,wr,Mr,n,r)||Ir(o),r),o=o.parentElement}return r}function xr(t){return/[0-9]/.test(t)}function Er(t){if(t.id&&!xr(t.id))return"#"+CSS.escape(t.id)}function Cr(t){return CSS.escape(t.tagName)}function Ar(t,e){if(e){const t=n(e);if(t)return t}for(const t of br){const e=n(t);if(e)return e}function n(e){if(t.hasAttribute(e))return`${CSS.escape(t.tagName)}${Tr(e,t.getAttribute(e))}`}}function Tr(t,e){return`[${t}="${CSS.escape(e)}"]`}function Ir(t){const e=Rr(t);return`${CSS.escape(t.tagName)}:nth-of-type(${e})`}function Rr(t){let e=t.parentNode.firstElementChild,n=1;for(;e&&e!==t;)e.tagName===t.tagName&&(n+=1),e=e.nextElementSibling;return n}function Or(t,e,n,r,o,i){for(const s of n){const n=s(t,o);if(n&&r(t,e,n,i))return n}}function Nr(t,e,n,r){return 1===e.querySelectorAll(Pr(n,r)).length}function Mr(t,e,n,r){let o;if(void 0===r)o=t=>t.matches(n);else{const t=Pr(n+":scope",r);o=e=>null!==e.querySelector(t)}let i=t.previousElementSibling;for(;i;){if(o(i))return!1;i=i.previousElementSibling}for(i=t.nextElementSibling;i;){if(o(i))return!1;i=i.nextElementSibling}return!0}function Pr(t,e){return e?`${t}>${e}`:t}const Dr={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:_t.ALLOW,MASK:_t.MASK,MASK_USER_INPUT:_t.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:_t.MASK_UNLESS_ALLOWLISTED},Vr="data-dd-privacy",Lr="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",$r={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function Ur(t){return`[${Vr}="${t}"], .dd-privacy-${t}`}function zr(t,e,n){if(n?.has(t))return n.get(t);const r=sr(t),o=r?zr(r,e,n):e,i=jr(qr(t),o);return n&&n.set(t,i),i}function jr(t,e){switch(e){case Dr.HIDDEN:case Dr.IGNORE:return e}switch(t){case Dr.ALLOW:case Dr.MASK:case Dr.MASK_USER_INPUT:case Dr.MASK_UNLESS_ALLOWLISTED:case Dr.HIDDEN:case Dr.IGNORE:return t;default:return e}}function qr(t){if(nr(t)){if("BASE"===t.tagName)return Dr.ALLOW;if("INPUT"===t.tagName){const e=t;if("password"===e.type||"email"===e.type||"tel"===e.type)return Dr.MASK;if("hidden"===e.type)return Dr.MASK;const n=e.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return Dr.MASK}return t.matches(Ur(Dr.HIDDEN))?Dr.HIDDEN:t.matches(Ur(Dr.MASK))?Dr.MASK:t.matches(Ur(Dr.MASK_UNLESS_ALLOWLISTED))?Dr.MASK_UNLESS_ALLOWLISTED:t.matches(Ur(Dr.MASK_USER_INPUT))?Dr.MASK_USER_INPUT:t.matches(Ur(Dr.ALLOW))?Dr.ALLOW:function(t){if("SCRIPT"===t.nodeName)return!0;if("LINK"===t.nodeName){const t=e("rel");return/preload|prefetch/i.test(t)&&"script"===e("as")||"shortcut icon"===t||"icon"===t}if("META"===t.nodeName){const n=e("name"),r=e("rel"),o=e("property");return/^msapplication-tile(image|color)$/.test(n)||"application-name"===n||"icon"===r||"apple-touch-icon"===r||"shortcut icon"===r||"keywords"===n||"description"===n||/^(og|twitter|fb):/.test(o)||/^(og|twitter):/.test(n)||"pinterest"===n||"robots"===n||"googlebot"===n||"bingbot"===n||t.hasAttribute("http-equiv")||"author"===n||"generator"===n||"framework"===n||"publisher"===n||"progid"===n||/^article:/.test(o)||/^product:/.test(o)||"google-site-verification"===n||"yandex-verification"===n||"csrf-token"===n||"p:domain_verify"===n||"verify-v1"===n||"verification"===n||"shopify-checkout-api-token"===n}function e(e){return(t.getAttribute(e)||"").toLowerCase()}return!1}(t)?Dr.IGNORE:void 0}}function Br(t,e){switch(e){case Dr.MASK:case Dr.HIDDEN:case Dr.IGNORE:return!0;case Dr.MASK_UNLESS_ALLOWLISTED:return er(t)?!!Gr(t.parentNode)||!Hr(t.textContent||""):Gr(t);case Dr.MASK_USER_INPUT:return er(t)?Gr(t.parentNode):Gr(t);default:return!1}}function Fr(t,e,n,r,o){if(r!==Dr.MASK&&r!==Dr.MASK_UNLESS_ALLOWLISTED)return!1;if(e===Vr||br.includes(e)||e===o.actionNameAttribute)return!1;switch(e){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return"A"===t&&"href"===e||"IFRAME"===t&&"srcdoc"===e||!(!n||!e.startsWith("data-"))||!("IMG"!==t&&"SOURCE"!==t||"src"!==e&&"srcset"!==e)}function Gr(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;const e=t;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!$r[e.tagName]}function Wr(t){return t.replace(/\S/g,"x")}function Jr(t,e){const n=t.parentElement?.tagName;let r=t.textContent||"";const o=e;return"SCRIPT"===n||o===Dr.HIDDEN?r="***":Br(t,o)&&("DATALIST"===n||"SELECT"===n||"OPTGROUP"===n||(r="OPTION"===n?"***":Wr(r))),"HEAD"!==n||r.trim()?r:""}function Hr(t){return!t?.trim()||window.$DD_ALLOW?.has(t.toLocaleLowerCase())||!1}function Kr({lifeCycle:t,isChildEvent:e,onChange:n=m.l}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=t.subscribe(14,t=>{if("view"!==t.type&&"vital"!==t.type&&e(t))switch(t.type){case dt.ERROR:r.errorCount+=1,n();break;case dt.ACTION:r.actionCount+=1,t.action.frustration&&(r.frustrationCount+=t.action.frustration.type.length),n();break;case dt.LONG_TASK:r.longTaskCount+=1,n();break;case dt.RESOURCE:t._dd?.discarded||(r.resourceCount+=1,n())}});return{stop(){o.unsubscribe()},eventCounts:r}}function Qr(t){const e=(0,Me.qj)({expireDelay:3e5}),n=new Map;function i(t){n.delete(t.key),t.eventCounts?.stop()}function s(){n.forEach(t=>{i(t)}),e.reset()}const a=t.subscribe(11,s);return{start(r,o,s,a){const c=it(),u=e.add(c,o.relative),d=n.get(r);d&&i(d);const l={id:c,key:r,startClocks:o,data:s,historyEntry:u,eventCounts:a?.isChildEvent?Kr({lifeCycle:t,isChildEvent:a.isChildEvent(c)}):void 0};return n.set(r,l),l},stop(t,e,s){const a=n.get(t);if(!a)return;const c=s?(0,o.kg)(a.data,s):a.data;a.historyEntry.close(e.relative);const u=(0,r.vk)(a.startClocks.timeStamp,e.timeStamp),d=a.eventCounts?.eventCounts;return i(a),{...c,id:a.id,startClocks:a.startClocks,duration:u,counts:d}},discard(t){const e=n.get(t);if(!e)return;const r=e.eventCounts?.eventCounts;return i(e),e.historyEntry.remove(),{...e.data,id:e.id,startClocks:e.startClocks,counts:r}},getCounts:t=>n.get(t)?.eventCounts?.eventCounts,findId:t=>e.findAll(t),stopAll(){a.unsubscribe(),s(),e.stop()}}}const Zr=["HTML","BODY"],Yr=br.concat(["role","type","disabled","readonly","tabindex","draggable","target","rel","download","method","action","enctype","autocomplete"]);function Xr(t,e){const n=Cr(t),r=Er(t),o=function(t){return Array.from(t.classList).filter(t=>!xr(t)).sort().map(t=>"."+CSS.escape(t)).join("")}(t),i=function(t,e){const n=[],r=Array.from(t.attributes);for(const t of r)e.includes(t.name)&&n.push(Tr(t.name,t.value));return n.sort().join("")}(t,e),s=function(t){const e=Array.from(t.parentNode.children);if(e.length<=1)return"";const n=e.filter(e=>e.tagName===t.tagName),r=e.indexOf(t),o=Rr(t);return`:nth-child(${r+1})${n.length>1?`:nth-of-type(${o})`:""}`}(t);return`${n}${r||""}${i}${o}${s};`}function to(t,e){const n=function(t,e){let n=t;for(;n;){if(n.matches(e))return n;n=ar(n)}return null}(t,`[${e}]`);if(n)return io(oo(n.getAttribute(e).trim()))}const eo=[(t,e,n)=>{if("labels"in t&&t.labels&&t.labels.length>0)return ao(t.labels[0],e,n)},t=>{if("INPUT"===t.nodeName){const e=t,n=e.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return{name:e.value,nameSource:"text_content"}}},(t,e,n)=>{if("BUTTON"===t.nodeName||"LABEL"===t.nodeName||"button"===t.getAttribute("role"))return ao(t,e,n)},(t,e,n)=>so(t,"aria-label",e,n),(t,e,n)=>{const r=t.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(e=>function(t,e){const n=t.getRootNode();if(n instanceof ShadowRoot){const t=n.getElementById(e);if(t)return t}return t.ownerDocument?t.ownerDocument.getElementById(e):null}(t,e)).filter(t=>!!t).map(t=>co(t,e,n)).join(" "),nameSource:"text_content"}},(t,e,n)=>so(t,"alt",e,n),(t,e,n)=>so(t,"name",e,n),(t,e,n)=>so(t,"title",e,n),(t,e,n)=>so(t,"placeholder",e,n),(t,e,n)=>{if("options"in t&&t.options.length>0)return ao(t.options[0],e,n)}],no=[(t,e,n)=>ao(t,e,n)];function ro(t,e,n,r){let o=t,i=0;for(;i<=10&&o&&"BODY"!==o.nodeName&&"HTML"!==o.nodeName&&"HEAD"!==o.nodeName;){for(const t of e){const e=t(o,n,r);if(e){const{name:t,nameSource:n}=e,r=t?.trim();if(r)return{name:io(oo(r)),nameSource:n}}}if("FORM"===o.nodeName)break;o=ar(o),i+=1}}function oo(t){return t.replace(/\s+/g," ")}function io(t){return t.length>100?ct(t,100)+" [...]":t}function so(t,e,n,r){const{enablePrivacyForActionName:o,defaultPrivacyLevel:i}=n;let s=t.getAttribute(e);if(s&&o){const o=zr(t,i,r);Fr(t.tagName,e,s,o,n)&&(c=vr,s=Hr(a=s)?a:c||Wr(a))}else s||(s="");var a,c;return{name:s,nameSource:"standard_attribute"}}function ao(t,e,n){return{name:co(t,e,n)||"",nameSource:"text_content"}}function co(t,e,n){if(t.isContentEditable)return;const{enablePrivacyForActionName:r,actionNameAttribute:o,defaultPrivacyLevel:i}=e,s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,function(t){const e=zr(t,i,n);if(r&&e&&Br(t,e))return NodeFilter.FILTER_REJECT;if(nr(t)){if(t.hasAttribute(yr)||o&&t.hasAttribute(o))return NodeFilter.FILTER_REJECT;const e=getComputedStyle(t);if("visible"!==e.visibility||"none"===e.display||e.contentVisibility&&"visible"!==e.contentVisibility)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT});let a="";for(;s.nextNode();){const t=s.currentNode;nr(t)?("BR"===t.nodeName||"P"===t.nodeName||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(t).display))&&(a+=" "):a+=t.textContent||""}return a.replace(/\s+/g," ").trim()}function uo(){const t=window.getSelection();return!t||t.isCollapsed}function lo(t){return t.target instanceof Element&&!1!==t.isPrimary}function fo(t){if(t.hasPageActivity||t.getUserActivity().input||t.getUserActivity().scroll)return!1;let e=t.event.target;return"LABEL"===e.tagName&&e.hasAttribute("for")&&(e=document.getElementById(e.getAttribute("for"))),!e?.matches('input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *')}const po=new Map;function mo(t,e){po.set(t,e),po.forEach((t,e)=>{(0,r.vk)(e,(0,r.$S)())>1e4&&po.delete(e)})}function ho(t){return e=>e.action?.id?.includes(t)??!1}function go(t,e,n,o){const s=Qr(t),a=new i.cP;let c;t.subscribe(5,l),t.subscribe(12,l);const{stop:u}=function({onPointerDown:t,onPointerUp:e}){let n,r,o={selection:!1,input:!1,scroll:!1};const i=[(0,b.q2)(window,"pointerdown",e=>{lo(e)&&(n=uo(),o={selection:!1,input:!1,scroll:!1},r=t(e))},{capture:!0}),(0,b.q2)(window,"selectionchange",()=>{n&&uo()||(o.selection=!0)},{capture:!0}),(0,b.q2)(window,"scroll",()=>{o.scroll=!0},{capture:!0,passive:!0}),(0,b.q2)(window,"pointerup",t=>{if(lo(t)&&r){const n=o;e(r,t,()=>n),r=void 0}},{capture:!0}),(0,b.q2)(window,"input",()=>{o.input=!0},{capture:!0})];return{stop(){i.forEach(t=>t.stop())}}}({onPointerDown:r=>function(t,e,n,r,o){let i;if(i=t.enablePrivacyForActionName?zr(yo(r),t.defaultPrivacyLevel):Dr.ALLOW,i===Dr.HIDDEN)return;const s=function(t,e,n){const r=yo(t),o=r.getBoundingClientRect(),i=Sr(r,n.actionNameAttribute),s=function(t,e){const n=t.filter(t=>t instanceof Element&&!Zr.includes(t.tagName));if(0===n.length)return"";const r=e?[e].concat(Yr):Yr;let o="";for(const t of n)if(o+=Xr(t,r),o.length>=2048)return ct(o,2048);return o}(t.composedPath(),n.actionNameAttribute);i&&mo(t.timeStamp,i);const{name:a,nameSource:c}=function(t,e,n=Dr.ALLOW){const r=new Map,{actionNameAttribute:o}=e,i=to(t,yr)||o&&to(t,o);return i?{name:i,nameSource:"custom_attribute"}:n===Dr.MASK?{name:vr,nameSource:"mask_placeholder"}:ro(t,eo,e,r)||ro(t,no,e,r)||{name:"",nameSource:"blank"}}(r,n,e);return{type:"click",target:{width:Math.round(o.width),height:Math.round(o.height),selector:i,composedPathSelector:s||void 0},position:{x:Math.round(t.clientX-o.left),y:Math.round(t.clientY-o.top)},name:a,nameSource:c}}(r,i,t);let a=!1;return pr(e,n,o,t,t=>{a=t.hadActivity},100),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}(o,t,e,r,n),onPointerUp({clickActionBase:i,hadActivityOnPointerDown:c},u,l){!function(t,e,n,o,i,s,a,c,u,d,l){const f=vo(e,i,d,c,u);a(f);const p=c?.target?.selector;p&&mo(u.timeStamp,p);const{stop:m}=pr(e,n,o,t,t=>{t.hadActivity&&t.end<f.startClocks.timeStamp?f.discard():t.hadActivity?f.stop(t.end):l()?f.stop(f.startClocks.timeStamp):f.stop()},1e4),h=e.subscribe(5,({endClocks:t})=>{f.stop(t.timeStamp)}),g=e.subscribe(12,()=>{f.stop((0,r.nx)())}),y=s.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{g.unsubscribe(),h.unsubscribe(),m(),y.unsubscribe()})}(o,t,e,n,s,a,d,i,u,l,c)}});return{stop(){l(),a.notify(),u(),s.stopAll()},findActionId:s.findId};function d(t){if(!c?.tryAppend(t)){const e=t.clone();c=function(t){const n=[];let o,i=0;function s(t){t.stopObservable.subscribe(a),n.push(t),(0,Pe.DJ)(o),o=(0,Pe.wg)(u,1e3)}function a(){1===i&&n.every(t=>t.isStopped())&&(i=2,function(t,e){const{isRage:n}=function(t,e){if(function(t){if(t.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let e=0;e<t.length-2;e+=1)if(t[e+3-1].event.timeStamp-t[e].event.timeStamp<=1e3)return!0;return!1}(t))return e.addFrustration("rage_click"),t.some(fo)&&e.addFrustration(yt),e.hasError&&e.addFrustration(gt),{isRage:!0};const n=t.some(t=>t.getUserActivity().selection);return t.forEach(t=>{t.hasError&&t.addFrustration(gt),fo(t)&&!n&&t.addFrustration(yt)}),{isRage:!1}}(t,e);n?(t.forEach(t=>t.discard()),e.stop((0,r.nx)()),e.validate(t.map(t=>t.event))):(e.discard(),t.forEach(t=>t.validate()))}(n,e),c=void 0)}function u(){(0,Pe.DJ)(o),0===i&&(i=1,a())}return s(t),{tryAppend(t){return 0===i&&(n.length>0&&(e=n[n.length-1].event,r=t.event,!(e.target===r.target&&(o=e,a=r,Math.sqrt(Math.pow(o.clientX-a.clientX,2)+Math.pow(o.clientY-a.clientY,2))<=100)&&e.timeStamp-r.timeStamp<=1e3))?(u(),!1):(s(t),!0));var e,r,o,a},stop(){u()}}}(t)}}function l(){c&&c.stop()}}function yo(t){if(t.composed&&rr(t.target)&&"function"==typeof t.composedPath){const e=t.composedPath();if(e.length>0&&e[0]instanceof Element)return e[0]}return t.target}function vo(t,e,n,o,s){const a=it(),c=(0,r.FR)(s.timeStamp),u=e.start(a,c,o,{isChildEvent:ho});t.notify(16,u);let d,l=0;const f=[],p=new i.cP;function m(t){0===l&&(l=1,d=t?e.stop(a,(0,r.jR)(t)):e.discard(a),p.notify())}return{event:s,stop:m,stopObservable:p,get hasError(){const t=d?.counts??e.getCounts(a);return!!t&&t.errorCount>0},get hasPageActivity(){return d&&"duration"in d},getUserActivity:n,addFrustration(t){f.push(t)},get startClocks(){return c},isStopped:()=>1===l||2===l,clone:()=>vo(t,e,n,o,s),validate(e){if(m(),1!==l)return;if(!d)return;const n={frustrationTypes:f,events:e??[s],event:s,...d,counts:d.counts};t.notify(0,n),l=2},discard(){m(),l=2}}}function bo(t){const e=function(t){return"events"in t}(t),n=tr((0,r.Zj)(t.duration));return{rawRumEvent:{type:dt.ACTION,date:t.startClocks.timeStamp,action:{id:t.id,target:{name:t.name},type:t.type,...void 0!==n&&{loading_time:n},...t.counts&&{error:{count:t.counts.errorCount},long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}},frustration:{type:t.frustrationTypes}},...e?{_dd:{action:{target:{selector:t.target?.selector||void 0,width:t.target?.width||void 0,height:t.target?.height||void 0,composed_path_selector:t.target?.composedPathSelector},position:t.position,name_source:t.nameSource}}}:{context:t.context}},duration:t.duration,startClocks:t.startClocks,domainContext:e?{events:t.events}:{handlingStack:t.handlingStack}}}const _o="csp_violation";function wo(t){return{startClocks:(0,r.M8)(),source:F.g.REPORT,handling:"unhandled",...t}}function So(t,e,n,r,o){return n?(0,P.Yn)({name:t,message:e,stack:[{func:"?",url:n,line:r??void 0,column:o??void 0}]}):void 0}var ko=n(7922);function xo(){const t=[];function e(e){let r;if(!e||e.didTimeout){const t=performance.now();r=()=>30-(performance.now()-t)}else r=e.timeRemaining.bind(e);for(;r()>0&&t.length;)t.shift()();t.length&&n()}function n(){(0,ko.BB)(e,{timeout:1e3})}return{push(e){1===t.push(e)&&n()},stop(){t.length=0}}}var Eo=n(7409);function Co(){if(lr(cr.NAVIGATION)){const t=performance.getEntriesByType(cr.NAVIGATION)[0];if(t&&function(t){return!(t.loadEventEnd>0&&t.domComplete<=0)}(t))return t}const t=function(){const t={},e=performance.timing;for(const n in e)if(At(e[n])){const o=n,i=e[o];t[o]=0===i?0:(0,r.d6)(i)}return t}(),e={entryType:cr.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:t.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...e,toJSON:void 0}),...t};return e}function Ao(t){return t.responseStart>=0&&t.responseStart<=(0,r.$S)()?t.responseStart:void 0}function To(t){const e=function(t){const e=t.querySelector("meta[name=dd-trace-id]"),n=t.querySelector("meta[name=dd-trace-time]");return Io(e?.content,n?.content)}(t)||function(t){const e=function(t){for(let e=0;e<t.childNodes.length;e+=1){const n=Ro(t.childNodes[e]);if(n)return n}if(t.body)for(let e=t.body.childNodes.length-1;e>=0;e-=1){const n=t.body.childNodes[e],r=Ro(n);if(r)return r;if(!er(n))break}}(t);if(e)return Io(at(e,"trace-id"),at(e,"trace-time"))}(t);if(e&&!(e.traceTime<=(0,r.uc)()-12e4))return e.traceId}function Io(t,e){const n=e&&Number(e);if(t&&n)return{traceId:t,traceTime:n}}function Ro(t){if(t&&function(t){return t.nodeType===Node.COMMENT_NODE}(t)){const e=/^\s*DATADOG;(.*?)\s*$/.exec(t.data);if(e)return e[1]}}function Oo(t,e,n){const i=e?function(t,e){if(t.traceSampled&&t.traceId&&t.spanId)return{_dd:{span_id:t.spanId.toString(),trace_id:t.traceId.toString(),rule_psr:e.rulePsr}}}(e,n):function(t,e){if("navigation"!==t.initiatorType)return;const n=(0,c.B)(To)(document);return n?{_dd:{trace_id:n,span_id:Bn().toString(),rule_psr:e.rulePsr}}:void 0}(t,n);if(!n.trackResources&&!i)return;const s=(0,r.FR)(t.startTime),a=function(t){const{duration:e,startTime:n,responseEnd:o}=t;return"navigation"===t.initiatorType||0===e&&n<o?(0,r.vk)(n,o):e}(t),u=function(t,e){const n=e.trackResourceHeaders;if(0===n.length||!t)return;const r=n.filter(e=>void 0===e.url||Re([e.url],t.url,!0));if(0===r.length)return;const o=r.filter(t=>void 0===t.location||"any"===t.location||"response"===t.location),i=r.filter(t=>void 0===t.location||"any"===t.location||"request"===t.location),s=o.length>0?function(t,e){if(t.type===Rn&&t.response)return Vo(t.response.headers,e);if("xhr"===t.type&&t.xhr){const n=t.xhr.getAllResponseHeaders();if(n)try{return Vo(new Headers(function(t){const e=[],n=t.trim().split(/\r\n/);for(const t of n){const n=t.indexOf(":");n>0&&e.push([t.substring(0,n).trim(),t.substring(n+1).trim()])}return e}(n)),e)}catch{}}}(t,o):void 0,a=i.length>0?function(t,e){if(t.type!==Rn)return;let n;return t.init?.headers?n=new Headers(t.init.headers):t.input instanceof Request&&(n=t.input.headers),n?Vo(n,e):void 0}(t,i):void 0;return s||a?{resource:{request:a?{headers:a}:void 0,response:s?{headers:s}:void 0}}:void 0}(e,n),d=(0,o.kg)({date:s.timeStamp,resource:{id:it(),duration:(0,r.Zj)(a),type:Nn(t),method:e?.method,status_code:e?e.status:(l=t.responseStatus,0===l?void 0:l),url:e?qn(e.url):t.name,protocol:Ln(t),delivery_type:$n(t),graphql:e&&No(e,n),render_blocking_status:t.renderBlockingStatus,...Un(t),...Dn(t)},type:dt.RESOURCE,_dd:{discarded:!n.trackResources}},i,function(t){const e=t.contentType;if(e)return{resource:{response:{headers:{"content-type":e}}}}}(t),u);var l;return{startClocks:s,duration:a,rawRumEvent:d,domainContext:Mo(t,e)}}function No(t,e){const n=Hn(t.url,e);if(n)return function(t,e){const n=function(t,e=!1){let n;if("POST"===t.method?n=function(t){if(!t||"string"!=typeof t)return;const e=(0,Dt.XU)(t);return e?{query:e.query,operationName:e.operationName,variables:e.variables?JSON.stringify(e.variables):void 0,operationType:e.operationType}:void 0}(t.requestBody):"GET"===t.method&&(n=function(t){const e=(0,d.c$)(t).searchParams,n=e.get("variables"),r=n&&void 0!==(0,Dt.XU)(n)?n:void 0;return{query:e.get("query")||void 0,operationName:e.get("operationName")||void 0,variables:r,operationType:e.get("operationType")||void 0}}(t.url)),n)return function(t,e){let n,r,o;if(t.query){const o=t.query.trim();i=o,n=i.match(/^\s*(query|mutation|subscription)\b/i)?.[1],e&&(r=ct(o,32768,"..."))}var i;if(!n){const e=t.operationType;"query"!==e&&"mutation"!==e&&"subscription"!==e||(n=e)}return t.variables&&(o=t.variables),{operationType:n,operationName:t.operationName,variables:o,payload:r}}(n,e)}(t,e.trackPayload);if(n){if(e.trackResponseErrors&&t.responseBody){const e=function(t){const e=(0,Dt.XU)(t);if(!e||"object"!=typeof e)return;const n=e;return(0,Tt.EI)(n.errors)?n.errors.map(t=>({message:t.message,path:t.path,locations:t.locations,code:t.extensions?.code})):void 0}(t.responseBody);e&&(n.error_count=e.length,n.errors=e)}return n}}(t,n)}function Mo(t,e){return{performanceEntry:t,isManual:!1,isAborted:!!e&&e.isAborted,isWebSocket:!1,handlingStack:e?.handlingStack,requestInit:e?.init,requestInput:e?.input,response:e?.response,error:e?.error,xhr:e?.xhr}}const Po=/(token|cookie|secret|authorization|(api|secret|access|app).?key|(client|connecting|real).?ip|forwarded)/,Do=t=>le.includes(t);function Vo(t,e){const n={};let r=0,o=!1;return t.forEach((t,i)=>{if(r>=100)return void(o||(T.V.warn("Maximum number of headers (100) has been reached. Further headers are dropped."),o=!0));const s=i.toLowerCase();if(Po.test(s))return;const a=e.find(t=>Re([t.name??Do],s));if(!a)return;const{extractor:c}=a,u=c?Gt(t,c):t;void 0!==u&&(u.length>128&&T.V.warn(`Header "${s}" value was truncated from ${u.length} to 128 characters.`),n[s]=ct(u,128),r++)}),r>0?n:void 0}function Lo(){try{return(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch{return}}function $o(t,e=window){if("hidden"===document.visibilityState)return{timeStamp:0,stop:m.l};if(lr(cr.VISIBILITY_STATE)){const e=performance.getEntriesByType(cr.VISIBILITY_STATE).filter(t=>"hidden"===t.name).find(e=>e.startTime>=t.relative);if(e)return{timeStamp:e.startTime,stop:m.l}}let n=1/0;const{stop:r}=(0,b.lQ)(e,["pagehide","visibilitychange"],t=>{"pagehide"!==t.type&&"hidden"!==document.visibilityState||(n=t.timeStamp,r())},{capture:!0});return{get timeStamp(){return n},stop:r}}function Uo(t,e,n,r){const o={},{stop:i}=(d=t=>{n(t.loadEvent),o.navigationTimings=t,r()},function(t){let e;const{stop:n}=(0,Eo.H)("complete",()=>{e=(0,Pe.wg)(()=>t())});return{stop(){n(),(0,Pe.DJ)(e)}}}(()=>{const t=(0,c.B)(Co)();(function(t){return t.loadEventEnd<=0})(t)||d(function(t){return{domComplete:t.domComplete,domContentLoaded:t.domContentLoadedEventEnd,domInteractive:t.domInteractive,loadEvent:t.loadEventEnd,firstByte:Ao(t)}}(t))})),s=$o(e),{stop:a}=function(t){return{stop:ur({type:cr.PAINT,buffered:!0}).subscribe(e=>{const n=e.find(e=>"first-contentful-paint"===e.name&&e.startTime<t.timeStamp&&e.startTime<6e5);var i;n&&(i=n.startTime,o.firstContentfulPaint=i,r())}).unsubscribe}}(s),{stop:u}=function(t,e,n){let i=1/0;const{stop:s}=(0,b.lQ)(n,["pointerdown","keydown"],t=>{i=t.timeStamp},{capture:!0,once:!0});let a=0;const c=ur({type:cr.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(n=>{const s=(0,Ve.Uk)(n,t=>t.entryType===cr.LARGEST_CONTENTFUL_PAINT&&t.startTime<i&&t.startTime<e.timeStamp&&t.startTime<6e5&&t.size>a);if(s){let e;s.element&&(e=Sr(s.element,t.actionNameAttribute));const n=""===(u=s).url?void 0:u.url,i=s.startTime,d=function(t,e){const n=Ao(Co());if(void 0===n)return;const r=t?function(t,e){const n=function(){if(lr(cr.RESOURCE))return performance.getEntriesByType(cr.RESOURCE)}();if(n)return(0,Ve.Uk)(n,n=>n.name===t&&n.startTime<=e)}(t,e):void 0,o=r?Math.max(n,r.requestStart||r.startTime):n,i=Math.min(e,Math.max(o,r?.responseEnd||0));return{loadDelay:o-n,loadTime:i-o,renderDelay:e-i}}(n,i);c={value:i,targetSelector:e,resourceUrl:n,subParts:d},o.largestContentfulPaint=c,r(),a=s.size}var c,u});return{stop(){s(),c.unsubscribe()}}}(t,s,window);var d;return{stop(){i(),a(),u(),s.stop()},initialViewMetrics:o}}const zo=(t,e)=>t*e,jo=t=>zo(t.previousRect.width,t.previousRect.height)+zo(t.currentRect.width,t.currentRect.height)-((t,e)=>{const n=Math.max(t.left,e.left),r=Math.max(t.top,e.top),o=Math.min(t.right,e.right),i=Math.min(t.bottom,e.bottom);return n>=o||r>=i?0:zo(o-n,i-r)})(t.previousRect,t.currentRect);function qo(t){let e;for(const n of t)if(n.node&&nr(n.node)){const t=jo(n);(!e||jo(e)<t)&&(e=n)}return e}function Bo({x:t,y:e,width:n,height:r}){return{x:t,y:e,width:n,height:r}}let Fo,Go=0,Wo=1/0,Jo=0;const Ho=()=>Fo?Go:window.performance.interactionCount||0;function Ko(t){return Math.min(t,6e4)}function Qo(){let t;const e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function Zo(){let t;const e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}let Yo;function Xo(){return Yo||(Yo=new i.cP(t=>{const{throttled:e}=(0,m.n)(()=>{t.notify(ti())},200);return(0,b.q2)(window,"resize",e,{capture:!0,passive:!0}).stop})),Yo}function ti(){const t=window.visualViewport;return t?{width:Number(t.width*t.scale),height:Number(t.height*t.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}function ei(t){const e=t.indexOf("?");return e<0?t:t.slice(0,e)}function ni({cumulativeLayoutShift:t,interactionToNextPaint:e},{firstContentfulPaint:n,largestContentfulPaint:o}){return{cls:t&&{score:t.value,timestamp:(0,r.Zj)(t.time),target_selector:t.targetSelector,previous_rect:t.previousRect,current_rect:t.currentRect},fcp:n&&{timestamp:(0,r.Zj)(n)},inp:e&&{duration:(0,r.Zj)(e.value),timestamp:(0,r.Zj)(e.time),target_selector:e.targetSelector,sub_parts:e.subParts?{input_delay:(0,r.Zj)(e.subParts.inputDelay),processing_duration:(0,r.Zj)(e.subParts.processingDuration),presentation_delay:(0,r.Zj)(e.subParts.presentationDelay)}:void 0},lcp:o&&{timestamp:(0,r.Zj)(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl,sub_parts:o.subParts?{load_delay:(0,r.Zj)(o.subParts.loadDelay),load_time:(0,r.Zj)(o.subParts.loadTime),render_delay:(0,r.Zj)(o.subParts.renderDelay)}:void 0}}}var ri=n(6625);function oi(t,e){if(t===e)return!0;if(null===t||"object"!=typeof t||null===e||"object"!=typeof e)return t===e;if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&t.every((t,n)=>oi(t,e[n]));if(Array.isArray(t)||Array.isArray(e))return!1;const n=t,r=e,o=Object.keys(n),i=Object.keys(r);return o.length===i.length&&o.every(t=>i.includes(t)&&oi(n[t],r[t]))}function ii(t,e,n){const r={},o=n?.replaceKeys??new Set,i=n?.appendKeys??new Set,s=n?.ignoreKeys??new Set;for(const n of Object.keys(t)){if(s.has(n))continue;const a=t[n],c=e[n];if(!o.has(n)&&(0,A.OE)(a)&&(0,A.OE)(c)){const t=ii(a,c,{replaceKeys:si(o,n),appendKeys:si(i,n),ignoreKeys:si(s,n)});t&&(r[n]=t)}else i.has(n)&&Array.isArray(a)&&Array.isArray(c)?a.length>c.length&&(r[n]=a.slice(c.length)):oi(a,c)||(r[n]=a)}for(const n of Object.keys(e))n in t||(r[n]=null);return Object.keys(r).length>0?r:void 0}function si(t,e){const n=new Set;for(const r of t)r.startsWith(e+".")&&n.add(r.slice(e.length+1));return n}function ai(t,e){const n=ii(t,e,{replaceKeys:new Set(["view.custom_timings","context","connectivity","usr","device","privacy"]),appendKeys:new Set(["_dd.page_states"]),ignoreKeys:new Set(["date","type","application","session","view.id","view.url","_dd.document_version","_dd.format_version"])});if(n)return(0,o.kg)(n,{type:dt.VIEW_UPDATE,date:t.date,application:t.application,session:t.session,view:{id:t.view.id,url:t.view.url},_dd:{document_version:t._dd.document_version,format_version:t._dd.format_version}})}const ci=Le.AQ;function ui(){return(0,c.B)(u.J.location)}function di(t){return Object.prototype.hasOwnProperty.call(history,t)?history:History.prototype}const li=Le.AQ;let fi,pi;function mi(){0!==fi.batchCount&&((0,E.Gk)("Customer data measures",fi),gi())}function hi(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function gi(){fi={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0}}}const yi=Le.AQ;function vi(t,e,n){if(0!==t.length)return t.slice(-n).reverse().map(({state:t,startTime:n})=>({state:t,start:(0,r.Zj)((0,r.vk)(e,n))}))}function bi(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}function _i(t){const{startClocks:e,type:n,name:o,description:i,context:s,handlingStack:a}=t,c={id:(t.type===vt.DURATION?t.id:void 0)??it(),type:n,name:o,description:i,...n===vt.DURATION?{duration:(0,r.Zj)(t.duration)}:{step_type:t.stepType,operation_key:t.operationKey,failure_reason:t.failureReason}};return{rawRumEvent:{date:e.timeStamp,vital:c,type:dt.VITAL,context:s},startClocks:e,duration:n===vt.DURATION?t.duration:void 0,domainContext:a?{handlingStack:a}:{}}}function wi(t,e){let n=Lt(t);const r=(0,Pe.yb)(()=>{const r=Lt(t);r!==n&&(n=r,e(r))},1e3);return()=>{(0,Pe.vG)(r)}}const Si="datadog-ci-visibility-test-execution-id";function ki(t,e){const n=it(),o=(0,r.Zj)(t.duration),i={date:e.timeStamp,type:dt.LONG_TASK,_dd:{discarded:!1}};if(t.entryType===cr.LONG_TASK)return{...i,long_task:{id:n,entry_type:lt.LONG_TASK,duration:o}};const s=t.scripts.map(t=>t.sourceURL).filter(t=>!!t),a=(0,D.Jv)(s);return{...i,_dd:{discarded:!1,debug_ids:a},long_task:{id:n,entry_type:lt.LONG_ANIMATION_FRAME,duration:o,blocking_duration:(0,r.Zj)(t.blockingDuration),first_ui_event_timestamp:(0,r.Zj)(t.firstUIEventTimestamp),render_start:(0,r.Zj)(t.renderStart),style_and_layout_start:(0,r.Zj)(t.styleAndLayoutStart),start_time:(0,r.Zj)(t.startTime),scripts:t.scripts.map(t=>({duration:(0,r.Zj)(t.duration),pause_duration:(0,r.Zj)(t.pauseDuration),forced_style_and_layout_duration:(0,r.Zj)(t.forcedStyleAndLayoutDuration),start_time:(0,r.Zj)(t.startTime),execution_start:(0,r.Zj)(t.executionStart),source_url:t.sourceURL,source_function_name:t.sourceFunctionName,source_char_position:t.sourceCharPosition,invoker:t.invoker,invoker_type:t.invokerType,window_attribution:t.windowAttribution}))}}}function xi(t,e,n=3e3){let r=0,o=!1;return{isLimitReached(){if(0===r&&(0,Pe.wg)(()=>{r=0},6e4),r+=1,r<=n||o)return o=!1,!1;if(r===n+1){o=!0;try{e(`Reached max number of ${t}s by minute: ${n}`)}finally{o=!1}}return!0}}}var Ei=n(98);function Ci(t,e,n){const r=(0,o.Go)(t),i=n(r);return(0,Ve.WP)(e).forEach(([e,n])=>Ai(t,r,e.split(/\.|(?=\[\])/),n)),i}function Ai(t,e,n,r){const[o,...i]=n;if("[]"!==o){if(Ti(t)&&Ti(e))return i.length>0?Ai(t[o],e[o],i,r):void function(t,e,n,r){if(t[e]===n)return;const o=(0,A.Pw)(n);o===r?t[e]=R(n):"object"!==r||"undefined"!==o&&"null"!==o?"array"!==r||"undefined"!==o&&"null"!==o||(t[e]=[]):t[e]={}}(t,o,e[o],r)}else Array.isArray(t)&&Array.isArray(e)&&t.forEach((t,n)=>Ai(t,e[n],i,r))}function Ti(t){return"object"===(0,A.Pw)(t)}const Ii={"view.name":"string","view.url":"string","view.referrer":"string",context:"object",service:"string",version:"string"},Ri={[dt.VIEW]:{...Ii,"view.performance.lcp.resource_url":"string"},[dt.ERROR]:{...Ii,"error.message":"string","error.stack":"string","error.handling_stack":"string","error.resource.url":"string","error.fingerprint":"string","_dd.debug_ids":"array"},[dt.RESOURCE]:{...Ii,"resource.url":"string","resource.graphql.variables":"string","resource.request.headers":"object","resource.response.headers":"object","resource.websocket.close_reason":"string","resource.websocket.protocol":"string"},[dt.ACTION]:{...Ii,"action.target.name":"string"},[dt.LONG_TASK]:{...Ii,"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string","_dd.debug_ids":"array"},[dt.VITAL]:Ii};function Oi(t,e){return(0,kt.d0)()?(0,kt.Ww)("records")?1:0:(0,De.$5)(t.id,(0,De.it)(e.sessionSampleRate,e.sessionReplaySampleRate))?1:t.isReplayForced?2:0}var Ni=n(64);const Mi=[dt.ACTION,dt.ERROR,dt.LONG_TASK,dt.RESOURCE,dt.VITAL];function Pi(t,e,n,s,p,h,g,y,_,w){const k=[],x=new Cn;x.subscribe(14,t=>(0,_n.b)("rum",t)),e.expireObservable.subscribe(()=>x.notify(10,{endClocks:(0,r.M8)()})),e.renewObservable.subscribe(()=>x.notify(11));const A=t=>{x.notify(15,{error:{message:t,source:F.g.AGENT,startClocks:(0,r.M8)()}}),(0,E.A2)("Error reported to customer",{"error.message":t})};if((0,kt.d0)()){!function(t){const e=(0,kt.Y9)();t.subscribe(14,t=>{e.send("rum",t)})}(x);const t=(0,wn._T)().subscribe(t=>{x.notify(12,t.reason)});k.push(()=>t.unsubscribe())}else{const n=function(t,e,n,r,o){const i=[(0,Ft.ns)(t,"rum")],s=(0,Ft.np)(t,"rum");s&&i.push(s);const a=(0,ri.X)({encoder:o(2),endpoints:i,reportError:n});r.subscribe(()=>a.forceFlush("session_expire"));const{dispatch:c,stop:u}=function(t,e){let n,r,o=!1,i=0;const{unsubscribe:s}=t.flushObservable.subscribe(()=>{o=!1,r=n});return{dispatch(s){if(s.type!==dt.VIEW)return void t.add(s);if(!e)return void t.upsert(s,s.view.id);const a=s.view.id;if(!s.view.is_active)return a===n?.view.id&&(n=void 0,r=void 0,o=!1,i=0),void t.upsert(s,a);if(a!==n?.view.id)return i=0,t.upsert(s,a),n=s,void(o=!t.isEmpty);if(n=s,o)t.upsert(s,a);else{if(i+=1,i>=100)return i=0,t.upsert(s,a),void(o=!t.isEmpty);if(r){const e=ai(s,r);e&&((0,_n.b)("rum",e),t.upsert(e,a))}}},stop:s}}(a,t.betaEnableViewUpdates);e.subscribe(14,c);const d=a.stop.bind(a);return a.stop=()=>{u(),d()},a}(t,x,A,e.expireObservable,h),r=n.prepareUrgentFlushObservable.subscribe(t=>{x.notify(12,t)});k.push(()=>r.unsubscribe()),k.push(()=>n.stop()),function(t,e,n){t.metricsEnabled&&(gi(),pi=!1,e.subscribe(14,()=>{pi=!0}),n.subscribe(({bytesCount:t,messagesCount:e})=>{pi&&(pi=!1,fi.batchCount+=1,hi(fi.batchBytesCount,t),hi(fi.batchMessagesCount,e))}),(0,Pe.yb)(mi,1e4))}(y,x,n.flushObservable)}const{stop:I,...O}=function(t,e,n,s,p,h,g,y,_){const w=[],k=function(){const t=En();return new i.cP(e=>{const n=new t((0,f.dm)(t=>e.notify(t)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}(),x=function(){let t=(0,Dt.yG)(ui());return new i.cP(e=>{const{stop:n}=function(t){const{stop:e}=(0,l.H7)(di("pushState"),"pushState",({onPostCall:e})=>{e(t)}),{stop:n}=(0,l.H7)(di("replaceState"),"replaceState",({onPostCall:e})=>{e(t)}),{stop:r}=(0,b.q2)(window,"popstate",t);return{stop(){e(),n(),r()}}}(i),{stop:r}=(o=i,(0,b.q2)(window,"hashchange",o));var o;function i(){if(t.href===ui().href)return;const n=(0,Dt.yG)(ui());e.notify({newLocation:n,oldLocation:t}),t=n}return()=>{n(),r()}})}(),{observable:E,stop:A}=function(){const t=new i.cP,{stop:e}=(0,l.H7)(window,"open",()=>t.notify());return{observable:t,stop:e}}();w.push(A);const{assemble:I}=e;!function(t,e,n){t.register(({eventType:t})=>{const o=e.source;return{type:t,_dd:{format_version:2,drift:(0,r._O)(),configuration:{session_sample_rate:Ct(e.sessionSampleRate,3),session_replay_sample_rate:Ct(e.sessionReplaySampleRate,3),profiling_sample_rate:Ct(e.profilingSampleRate,3),trace_sample_rate:Ct(e.traceSampleRate,3)},browser_sdk_version:(0,kt.d0)()?"7.11.0":void 0,sdk_name:n},application:{id:e.applicationId},date:(0,r.nx)(),source:o}})}(I,n,y);const O=function(t,e=500){const n=(0,Me.qj)({expireDelay:yi,maxEntries:4e3});let o;lr(cr.VISIBILITY_STATE)&&performance.getEntriesByType(cr.VISIBILITY_STATE).forEach(t=>{s("hidden"===t.name?"hidden":"active",t.startTime)}),s(bi(),(0,r.$S)());const{stop:i}=(0,b.lQ)(window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],t=>{s(function(t){return"freeze"===t.type?"frozen":"pagehide"===t.type?t.persisted?"frozen":"terminated":bi()}(t),t.timeStamp)},{capture:!0});function s(t,e=(0,r.$S)()){t!==o&&(o=t,n.closeActive(e),n.add({state:o,startTime:e},e))}function a(t,e,r){return n.findAll(e,r).some(e=>e.state===t)}return t.register(({startTime:t,duration:r=0,eventType:o})=>o===dt.VIEW?{type:o,_dd:{page_states:vi(n.findAll(t,r),t,e)}}:o===dt.ACTION||o===dt.ERROR?{type:o,view:{in_foreground:a("active",t,0)}}:Ae.$O),{wasInPageStateDuringPeriod:a,addPageState:s,stop(){i(),n.stop()}}}(I);w.push(()=>O.stop());const N=function(t){const e=(0,Me.qj)({expireDelay:An});return t.subscribe(1,t=>{e.add(function(t){return{service:t.service,version:t.version,context:t.context,id:t.id,name:t.name,startClocks:t.startClocks}}(t),t.startClocks.relative)}),t.subscribe(6,({endClocks:t})=>{e.closeActive(t.relative)}),t.subscribe(3,t=>{const n=e.find(t.startClocks.relative);n&&(t.name&&(n.name=t.name),t.context&&(n.context=t.context),n.sessionIsActive=t.sessionIsActive)}),t.subscribe(11,()=>{e.reset()}),{findView(t,n){return e.find(t,n)},stop(){e.stop()}}}(t);w.push(()=>N.stop());const M=function(t,e,n){const o=(0,Me.qj)({expireDelay:ci});let i;t.subscribe(1,({startClocks:t,url:e})=>{const n=(0,c.B)(u.J.location).href,r=void 0!==e?(0,d.c$)(e,n).href:n;o.add(a({url:r,referrer:i||document.referrer}),t.relative),i=r}),t.subscribe(6,({endClocks:t})=>{o.closeActive(t.relative)});const s=n.subscribe(({newLocation:t})=>{const e=o.find();if(e){const n=(0,r.$S)();o.closeActive(n),o.add(a({url:t.href,referrer:e.referrer}),n)}});function a({url:t,referrer:e}){return{url:t,referrer:e}}return e.register(({startTime:t,eventType:e})=>{const n=o.find(t);return n?{type:e,view:{url:n.url,referrer:n.referrer}}:Ae.ug}),{findUrl(t){return o.find(t)},stop(){s.unsubscribe(),o.stop()}}}(t,I,x);w.push(()=>M.stop());const P=function(t,e,n){const r=(0,Me.qj)({expireDelay:li});return t.subscribe(1,({startClocks:t})=>{r.add({},t.relative)}),t.subscribe(6,({endClocks:t})=>{r.closeActive(t.relative)}),e.register(({startTime:t,eventType:e})=>{if(!n.trackFeatureFlagsForEvents.concat([dt.VIEW,dt.ERROR]).includes(e))return Ae.$O;const o=r.find(t);return!o||(0,Dt.RI)(o)?Ae.$O:{type:e,feature_flags:o}}),{addFeatureFlagEvaluation(t,e){const n=r.find();n&&(n[t]=e)}}}(t,I,n);(function(t,e,n,r,o){t.register(({eventType:t,startTime:i})=>{const s=n.findTrackedSession(i),a=o.findView(i);if(!s||!a)return Ae.ug;let c,u,d;return t===dt.VIEW?(c=!!r.getReplayStats(a.id)||void 0,u=1===Oi(s,e),d=!!a.sessionIsActive&&void 0):c=!!r.isRecording()||void 0,{type:t,session:{id:s.id,type:"user",has_replay:c,sampled_for_replay:u,is_active:d}}})})(I,n,s,p,N),function(t){t.register(({eventType:t})=>({type:t,connectivity:(0,Ni.q)()}))}(I),function(t){const e=(kn||(kn=function(){try{const t=sessionStorage.getItem(Sn);if(t)return t;const e=it();return sessionStorage.setItem(Sn,e),e}catch{return}}()??it()),kn);t.register(()=>({tab:{id:e}}))}(I);const V=function(t,e){const n=Ce();return e.storeContextsAcrossPages&&Se(n,"rum",2),t.register(()=>({context:n.getContext()})),n}(I,n),L=function(t,e,n){const r=Te();return e.storeContextsAcrossPages&&Se(r,"rum",1),t.register(({eventType:t,startTime:o})=>{const i=r.getContext(),s=n.findTrackedSession(o);return s?.anonymousId&&!i.anonymous_id&&e.trackAnonymousUser&&(i.anonymous_id=s.anonymousId),(0,Dt.RI)(i)?Ae.$O:{type:t,usr:i}}),r}(I,n,s),$=function(t,e){const n=Ie();return e.storeContextsAcrossPages&&Se(n,"rum",4),t.register(()=>{const t=n.getContext();return(0,Dt.RI)(t)||!t.id?Ae.$O:{account:t}}),n}(I,n),U=function(t,e,n,o,i){const{unsubscribe:s}=t.subscribe(0,e=>{t.notify(13,bo(e))}),a=m.l;let c;i.trackUserInteractions&&(c=go(t,n,o,i));const u=function(t,e){const n=Qr(t);return{addAction(t){e({id:it(),frustrationTypes:[],...t})},startAction(e,o={},i=(0,r.M8)()){const s=o.actionKey??e,a=n.start(s,i,{name:e,...o},{isChildEvent:ho});t.notify(16,a)},stopAction(t,o={},i=(0,r.M8)()){const s=o.actionKey??t,a=n.stop(s,i,o);if(!a)return;const c=[];a.counts&&a.counts.errorCount>0&&c.push(gt);const u={...a,type:a.type||ht,frustrationTypes:c};e(u)},findActionId:n.findId,stop:n.stopAll}}(t,e=>{t.notify(13,bo(e))}),d={findActionId(t){const e=u.findActionId(t),n=c?.findActionId(t)??[];return e.concat(n)}};return e.assemble.register(({startTime:t,eventType:e})=>{if(e!==dt.ERROR&&e!==dt.RESOURCE&&e!==dt.LONG_TASK)return Ae.$O;const n=e===dt.LONG_TASK?(0,r.Gw)(t,1):t,o=d.findActionId(n);return o.length?{type:e,action:{id:o}}:Ae.$O}),e.assembleTelemetry.register(({startTime:t})=>({action:{id:d.findActionId(t)}})),{addAction:u.addAction,startAction:u.startAction,stopAction:u.stopAction,actionContexts:d,stop(){s(),a(),u.stop(),c?.stop()}}}(t,e,k,E,n);w.push(U.stop);const j=function(t){return{addEvent(e,n,o,i){Mi.includes(n.type)&&t.notify(13,{startClocks:(0,r.FR)(e),rawRumEvent:n,domainContext:o,duration:i})}}}(t),q=function(t){let e;const n=requestAnimationFrame((0,f.dm)(()=>{e=ti()})),r=Xo().subscribe(t=>{e=t}).unsubscribe;return t.register(({eventType:t})=>({type:t,display:e?{viewport:e}:void 0})),{stop(){r(),n&&cancelAnimationFrame(n)}}}(I);w.push(q.stop);const B=function(t,e=function(t){const e=Xe()?(t,e)=>(0,b.q2)(u.J.cookieStore,"change",n=>{const r=n.changed.find(e=>e.name===t)||n.deleted.find(e=>e.name===t);r&&e(r.value)}).stop:wi;return new i.cP(n=>e(t,t=>n.notify(t)))}(Si)){let n=jt(Si)||function(){const t=window.Cypress;if(t)try{return t.env("traceId")}catch{return void T.V.warn("Failed to read Cypress test execution id via Cypress.env(). Upgrade dd-trace-js to >= 5.88.0 to keep RUM ↔ test correlation working.")}}();const r=e.subscribe(t=>{n=t});return t.register(({eventType:t})=>"string"!=typeof n?Ae.$O:{type:t,session:{type:"ci_test"},ci_test:{test_execution_id:n}}),{stop(){r.unsubscribe()}}}(I);w.push(B.stop),function(t){t.register(({eventType:t})=>bn()?{type:t,session:{type:"synthetics"},synthetics:{...bn(),injected:vn()}}:Ae.$O)}(I),function(t,e,n,r,i){const s={[dt.ERROR]:xi(dt.ERROR,r,i),[dt.ACTION]:xi(dt.ACTION,r,i),[dt.VITAL]:xi(dt.VITAL,r,i)};e.subscribe(13,({startClocks:r,duration:i,rawRumEvent:a,domainContext:c})=>{const u=n.trigger({eventType:a.type,rawRumEvent:a,domainContext:c,startTime:r.relative,duration:i});if(u===Ae.ug)return;const d=(0,o.kg)(u,a,{ddtags:(0,Ei.m5)(t).join(",")});(function(t,e,n,r){if(e){const r=Ci(t,Ri[t.type],t=>e(t,n));if(!1===r&&t.type!==dt.VIEW)return!1;!1===r&&T.V.warn("Can't dismiss view events using beforeSend!")}const o=r[t.type]?.isLimitReached();return!o})(d,t.beforeSend,c,s)&&((0,Dt.RI)(d.context)&&delete d.context,e.notify(14,d))})}(n,t,I,_);const{addTiming:G,setLoadingTime:W,startView:J,setViewName:H,setViewContext:K,setViewContextProperty:Q,getViewContext:Z,stop:Y}=function(t,e,n,o,s,a,u,d,l){return t.subscribe(4,e=>t.notify(13,function(t,e,n){const o=n.getReplayStats(t.id),i=t.commonViewMetrics?.cumulativeLayoutShift?.devicePixelRatio,s={_dd:{document_version:t.documentVersion,replay_stats:o,cls:i?{device_pixel_ratio:i}:void 0,configuration:{start_session_replay_recording_manually:e.startSessionReplayRecordingManually,remote_configuration_id:e.remoteConfigurationId}},date:t.startClocks.timeStamp,type:dt.VIEW,view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:t.commonViewMetrics.cumulativeLayoutShift?.value,cumulative_layout_shift_time:(0,r.Zj)(t.commonViewMetrics.cumulativeLayoutShift?.time),cumulative_layout_shift_target_selector:t.commonViewMetrics.cumulativeLayoutShift?.targetSelector,first_byte:(0,r.Zj)(t.initialViewMetrics.navigationTimings?.firstByte),dom_complete:(0,r.Zj)(t.initialViewMetrics.navigationTimings?.domComplete),dom_content_loaded:(0,r.Zj)(t.initialViewMetrics.navigationTimings?.domContentLoaded),dom_interactive:(0,r.Zj)(t.initialViewMetrics.navigationTimings?.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:(0,r.Zj)(t.initialViewMetrics.firstContentfulPaint),interaction_to_next_paint:(0,r.Zj)(t.commonViewMetrics.interactionToNextPaint?.value),interaction_to_next_paint_time:(0,r.Zj)(t.commonViewMetrics.interactionToNextPaint?.time),interaction_to_next_paint_target_selector:t.commonViewMetrics.interactionToNextPaint?.targetSelector,is_active:t.isActive,name:t.name,largest_contentful_paint:(0,r.Zj)(t.initialViewMetrics.largestContentfulPaint?.value),largest_contentful_paint_target_selector:t.initialViewMetrics.largestContentfulPaint?.targetSelector,load_event:(0,r.Zj)(t.initialViewMetrics.navigationTimings?.loadEvent),loading_time:tr((0,r.Zj)(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},performance:ni(t.commonViewMetrics,t.initialViewMetrics),resource:{count:t.eventCounts.resourceCount},time_spent:(0,r.Zj)(t.duration)},display:t.commonViewMetrics.scroll?{scroll:{max_depth:t.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:t.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:t.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:(0,r.Zj)(t.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:e.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:Lo()}};return(0,Dt.RI)(t.customTimings)||(s.view.custom_timings=(0,Dt.LG)(t.customTimings,r.Zj)),{rawRumEvent:s,startClocks:t.startClocks,duration:t.duration,domainContext:{location:t.location,handlingStack:t.handlingStack}}}(e,n,u))),e.assemble.register(({startTime:t,eventType:e})=>{const n=d.findView(t);return n?{type:e,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:Ae.ug}),e.assembleTelemetry.register(({startTime:t})=>({view:{id:d.findView(t)?.id}})),function(t,e,n,o,s,a,u){const d=new Set;let l,p,h=g(ft,(0,r.Oc)(),u);function g(s,a,u){const l=function(t,e,n,o,s,a=(0,r.M8)(),u){const d=it(),l=new i.cP,p={};let h,g=0;const y=(0,Dt.yG)((0,c.B)(window.location)),v=Ee();let _=!0,w=u?.name;const S=u?.service||o.service,k=u?.version||o.version,x=u?.context,E=u?.handlingStack;x&&v.setContext(x);const C={id:d,name:w,startClocks:a,service:S,version:k,context:x,url:u?.url};t.notify(1,C),t.notify(2,C);const{throttled:A,cancel:I}=(0,m.n)(F,3e3,{leading:!1}),{setLoadEvent:R,setViewEnd:O,stop:N,stopINPTracking:M,getCommonViewMetrics:P,setLoadingTime:D}=function(t,e,n,o,s,a,c){const u={};let d=!1,l=!1;const{stop:p,setLoadEvent:h}=function(t,e,n,o,i,a){let c=i===ft,l=!0;const f=[],p=$o(a);function m(){if(!l&&!c&&f.length>0){const e=Math.max(...f);e<p.timeStamp-a.relative&&(t=e,d||(u.loadingTime=t,s()))}var t}const{stop:h}=pr(t,e,n,o,t=>{l&&(l=!1,t.hadActivity&&f.push((0,r.vk)(a.timeStamp,t.end)),m())});return{stop(){h(),p.stop()},setLoadEvent(t){c&&(c=!1,f.push(t),m())}}}(t,e,n,o,a,c),{stop:g}=function(t,e,n=function(t=1e3){return new i.cP(e=>{const n=(0,m.n)(function(){e.notify(function(){const t=Zo(),{height:e}=ti();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(e+t),scrollTop:t}}())},t,{leading:!1,trailing:!0}),r=document.scrollingElement||document.documentElement,o=new ResizeObserver((0,f.dm)(n.throttled));r&&o.observe(r);const i=(0,b.q2)(window,"scroll",n.throttled,{passive:!0});return()=>{n.cancel(),o.disconnect(),i.stop()}})}()){let o=0,s=0,a=0;const c=n.subscribe(({scrollDepth:n,scrollTop:i,scrollHeight:c})=>{let u=!1;if(n>o&&(o=n,u=!0),c>s){s=c;const e=(0,r.$S)();a=(0,r.vk)(t.relative,e),u=!0}u&&e({maxDepth:Math.min(o,s),maxDepthScrollTop:i,maxScrollHeight:s,maxScrollHeightTime:a})});return{stop(){return c.unsubscribe()}}}(c,t=>{u.scroll=t}),{stop:y}=function(t,e,n){if(!lr(cr.LAYOUT_SHIFT)||!("WeakRef"in window))return{stop:m.l};let o,i=0;n({value:0});const s=function(){let t,e,n=0,r=0;return{update(o){let i;return void 0===t||o.startTime-e>=1e3||o.startTime-t>=5e3?(t=e=o.startTime,r=n=o.value,i=!0):(n+=o.value,e=o.startTime,i=o.value>r,i&&(r=o.value)),{cumulatedValue:n,isMaxValue:i}}}}(),a=ur({type:cr.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{for(const c of a){if(c.hadRecentInput||c.startTime<e)continue;const{cumulatedValue:a,isMaxValue:u}=s.update(c);if(u){const t=qo(c.sources);o={target:t?.node?new WeakRef(t.node):void 0,time:(0,r.vk)(e,c.startTime),previousRect:t?.previousRect,currentRect:t?.currentRect,devicePixelRatio:window.devicePixelRatio}}if(a>i){i=a;const e=o?.target?.deref();n({value:Ct(i,4),targetSelector:e&&Sr(e,t.actionNameAttribute),time:o?.time,previousRect:o?.previousRect?Bo(o.previousRect):void 0,currentRect:o?.currentRect?Bo(o.currentRect):void 0,devicePixelRatio:o?.devicePixelRatio})}}});return{stop(){a.unsubscribe()}}}(o,c.relative,t=>{u.cumulativeLayoutShift=t,s()}),{stop:v,getInteractionToNextPaint:_,setViewEnd:w}=function(t,e,n){if(!(lr(cr.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint(){},setViewEnd:m.l,stop:m.l};let o,i=1/0;const{getViewInteractionCount:s,stopViewInteractionCount:a}=function(t){"interactionCount"in performance||Fo||(Fo=new window.PerformanceObserver((0,f.dm)(t=>{t.getEntries().forEach(t=>{const e=t;e.interactionId&&(Wo=Math.min(Wo,e.interactionId),Jo=Math.max(Jo,e.interactionId),Go=(Jo-Wo)/7+1)})})),Fo.observe({type:"event",buffered:!0,durationThreshold:0}));const e=t===ft?0:Ho();let n={stopped:!1};function r(){return Ho()-e}return{getViewInteractionCount(){return n.stopped?n.interactionCount:r()},stopViewInteractionCount(){n={stopped:!0,interactionCount:r()}}}}(n),c=function(t){const e=[];function n(){e.sort((t,e)=>e.duration-t.duration).splice(10)}return{process(t){const r=e.findIndex(e=>t.interactionId===e.interactionId),o=e[e.length-1];-1!==r?t.duration>e[r].duration&&(e[r]=t,n()):(e.length<10||t.duration>o.duration)&&(e.push(t),n())},estimateP98Interaction(){const n=Math.min(e.length-1,Math.floor(t()/50));return e[n]},isTracked:t=>e.some(e=>e.interactionId===t)}}(s),u=function(t){const e=new Map;function n(t,e){t.startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd)}return{process(t){if(void 0===t.interactionId||!t.processingStart||!t.processingEnd)return;const r=t.startTime+t.duration,o=e.get(t.interactionId);if(o)n(o,t);else{for(const[,o]of e.entries())if(Math.abs(r-o.referenceRenderTime)<=8)return n(o,t),void e.set(t.interactionId,o);e.set(t.interactionId,{startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,referenceRenderTime:r})}},pruneUntracked(){for(const[n]of e)t.isTracked(n)||e.delete(n)},computeSubParts(t,n){if(!t.processingStart||!t.processingEnd||void 0===t.interactionId)return;const o=e.get(t.interactionId);if(!o)return;const i=Math.max(o.startTime+n,o.processingStart),s=Math.min(o.processingEnd,i);return{inputDelay:(0,r.vk)(o.startTime,o.processingStart),processingDuration:(0,r.vk)(o.processingStart,s),presentationDelay:(0,r.vk)(s,i)}},stop(){e.clear()}}}(c),d=ur({type:cr.FIRST_INPUT,buffered:!0}).subscribe(p),l=ur({type:cr.EVENT,durationThreshold:40,buffered:!0}).subscribe(p);function p(n){for(const t of n)t.interactionId&&t.startTime>=e&&t.startTime<=i&&(c.process(t),u.process(t));u.pruneUntracked();const s=c.estimateP98Interaction();s&&function(n){const i=(0,r.vk)(e,n.startTime);if(n.duration!==o?.duration||i!==o.startTime){let e=function(t){const e=po.get(t);return po.delete(t),e}(n.startTime);!e&&n.target&&nr(n.target)&&(e=Sr(n.target,t.actionNameAttribute)),o={duration:n.duration,startTime:i,targetSelector:e}}o.subParts=u.computeSubParts(n,Ko(o.duration))}(s)}return{getInteractionToNextPaint(){return o?{value:Ko(o.duration),targetSelector:o.targetSelector,time:o.startTime,subParts:o.subParts}:s()?{value:0}:void 0},setViewEnd(t){i=t,a()},stop(){l.unsubscribe(),d.unsubscribe(),u.stop()}}}(o,c.relative,a);return{stop(){p(),y(),g()},stopINPTracking:v,setLoadEvent:h,setViewEnd(t){l=!0,w(t)},getCommonViewMetrics:()=>(u.interactionToNextPaint=_(),u),setLoadingTime(t){if(l)return;const e=(0,r.vk)(c.timeStamp,t??(0,r.nx)());d||p(),d=!0,u.loadingTime=e,s()}}}(t,e,n,o,B,s,a),{stop:V,initialViewMetrics:L}=s===ft?Uo(o,a,R,B):{stop:m.l,initialViewMetrics:{}};s===mt&&function(t,e,n){var o,i;o=t.relative,i=t=>{e.firstContentfulPaint=t,e.largestContentfulPaint={value:t},n()},requestAnimationFrame(()=>{requestAnimationFrame(()=>{i((0,r.vk)(o,(0,r.$S)()))})})}(a,L,B);const{stop:$,eventCounts:U}=function(t,e,n){const{stop:r,eventCounts:o}=Kr({lifeCycle:t,isChildEvent:t=>t.view.id===e,onChange:n});return{stop:r,eventCounts:o}}(t,d,B),z=(0,Pe.yb)(F,3e5),j=t.subscribe(12,t=>{t===wn.y5.UNLOADING&&F()});function q(){t.notify(3,{id:d,name:w,context:v.getContext(),startClocks:a,sessionIsActive:_})}function B(){q(),A()}function F(){I(),q(),g+=1;const e=void 0===h?(0,r.nx)():h.timeStamp;t.notify(4,{customTimings:p,documentVersion:g,id:d,name:w,service:S,version:k,context:v.getContext(),loadingType:s,location:y,handlingStack:E,startClocks:a,commonViewMetrics:P(),initialViewMetrics:L,duration:(0,r.vk)(a.timeStamp,e),isActive:void 0===h,sessionIsActive:_,eventCounts:U})}return F(),v.changeObservable.subscribe(B),{get name(){return w},service:S,version:k,contextManager:v,stopObservable:l,end(e={}){h||(h=e.endClocks??(0,r.M8)(),_=e.sessionIsActive??!0,t.notify(5,{endClocks:h}),t.notify(6,{endClocks:h}),(0,Pe.vG)(z),O(h.relative),N(),j.unsubscribe(),F(),(0,Pe.wg)(()=>{this.stop()},3e5))},stop(){V(),$(),M(),l.notify()},addTiming(t,e){if(h)return;const n=(0,r.A3)(e)?e:(0,r.vk)(a.timeStamp,e);p[function(t){const e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return e!==t&&T.V.warn(`Invalid timing name: ${t}, sanitized to: ${e}`),e}(t)]=n,B()},setLoadingTime:D,setViewName(t){w=t,F()}}}(t,e,n,o,s,a,u);return d.add(l),l.stopObservable.subscribe(()=>{d.delete(l)}),l}return t.subscribe(11,()=>{h=g("session_renewal",void 0,{name:h.name,service:h.service,version:h.version,context:h.contextManager.getContext()})}),t.subscribe(10,({endClocks:t})=>{h.end({sessionIsActive:!1,endClocks:t})}),a&&(p=function(t){return t.subscribe(({oldLocation:t,newLocation:e})=>{var n,r;r=e,((n=t).pathname!==r.pathname||!function(t){const e=t.substring(1);return""!==e&&!!document.getElementById(e)}(r.hash)&&ei(r.hash)!==ei(n.hash))&&(h.end(),h=g(pt))})}(s),l=function(){const{stop:t}=(0,b.q2)(window,"pageshow",t=>{t.persisted&&(t=>{h.end();const e=(0,r.FR)(t.timeStamp);h=g(mt,e,void 0)})(t)},{capture:!0});return t}()),{addTiming(t,e=(0,r.nx)()){h.addTiming(t,e)},setLoadingTime(t){return h.setLoadingTime(t)},startView(t,e){h.end({endClocks:e}),h=g(pt,e,t)},setViewContext(t){h.contextManager.setContext(t)},setViewContextProperty(t,e){h.contextManager.setContextProperty(t,e)},setViewName(t){h.setViewName(t)},getViewContext(){return h.contextManager.getContext()},stop(){p&&p.unsubscribe(),l&&l(),h.end(),d.forEach(t=>t.stop())}}}(t,o,s,n,a,!n.trackViewsManually,l)}(t,e,n,k,E,x,p,N,h);(function(t){t.register(({domainContext:t,rawRumEvent:e})=>{const n=function(t,e){if("long_task"===e.type&&"long-animation-frame"===e.long_task.entry_type)return e.long_task.scripts[0]?.source_url;let n;"handlingStack"in t&&(n=t.handlingStack),"error"===e.type&&e.error.stack&&(n=e.error.stack);const r=(0,C.T)({stack:n});return r.stack[0]?.url}(t,e);if(!n)return Ae.$O;const r=(0,D.yN)(n);return r?{type:e.type,service:r.service,version:r.version}:Ae.$O})})(I),w.push(Y);const X=function(t,e){const n=(0,c.B)(xo)(),o=function(t){const e=new Set,n=t.subscribe(8,t=>{e.add(t),e.size>1e3&&e.delete(e.values().next().value)});return{getMatchingRequest(t){let n,r=1/0;for(const o of e){const e=t.startTime-o.startClocks.relative;0<=e&&e<r&&o.url===t.name&&(r=Math.abs(e),n=o)}return n&&e.delete(n),n},stop(){n.unsubscribe()}}}(t);t.subscribe(9,n=>{const o=function(t,e){const n=(0,r.vk)(t.startClocks.timeStamp,t.endClocks.timeStamp),o={date:t.startClocks.timeStamp,type:dt.RESOURCE,resource:{id:it(),type:"websocket",url:t.url,duration:(0,r.Zj)(n),websocket:{connection_id:t.connectionId,handshake_succeeded:t.handshakeSucceeded,start_time:t.startClocks.timeStamp,end_time:t.endClocks.timeStamp,start_view_id:t.startViewId,end_view_id:t.endViewId,tracking_end_reason:t.trackingEndReason,close_code:t.closeCode,close_reason:t.closeReason,was_clean:t.wasClean,messages_in:t.messagesIn,messages_out:t.messagesOut,time_to_first_message_in:(0,r.Zj)(t.firstMessageInOffset),time_to_first_message_out:(0,r.Zj)(t.firstMessageOutOffset),last_message_in_at:t.lastMessageInAt,longest_inbound_silence:(0,r.Zj)(t.longestInboundSilence),inbound_idle_duration_before_close:(0,r.Zj)(t.inboundIdleDurationBeforeClose),buffered_amount_max:t.bufferedAmountMax,protocol:t.protocol,setup_duration:(0,r.Zj)(t.setupDuration)}},_dd:{discarded:!e.trackResources}};return{startClocks:t.startClocks,duration:n,rawRumEvent:o,domainContext:{isWebSocket:!0,isManual:!1,webSocket:t.webSocket}}}(n,e);o&&t.notify(13,o)});const i=ur({type:cr.RESOURCE,buffered:!0}).subscribe(n=>{for(const r of n)Pn(r)?(0,Pe.wg)(()=>{const n=Oo(r,o.getMatchingRequest(r),e);n&&t.notify(13,n)},50):a(()=>Oo(r,void 0,e))}),{stop:s}=(0,Eo.H)("interactive",()=>{a(()=>Oo(Co(),void 0,e))});function a(e){n.push(()=>{const n=e();n&&t.notify(13,n)})}const u=Qr(t),d=function(t,e){return{startResource(t,n={},o=(0,r.M8)()){const i=n.resourceKey??t;e.start(i,o,{url:t,...n})},stopResource(n,o={},i=(0,r.M8)()){const s=o.resourceKey??n,a=e.stop(s,i,{context:o.context,type:o.type});if(!a)return;const c=(0,r.vk)(a.startClocks.relative,i.relative),u={date:a.startClocks.timeStamp,type:dt.RESOURCE,resource:{id:a.id,type:a.type||In,url:qn(a.url),duration:(0,r.Zj)(c),method:a.method,status_code:o.statusCode,size:o.size},_dd:{},context:a.context};t.notify(13,{rawRumEvent:u,startClocks:a.startClocks,duration:c,domainContext:{isManual:!0}})}}}(t,u);return{startResource:d.startResource,stopResource:d.stopResource,stop(){s(),n.stop(),i.unsubscribe(),u.stopAll()}}}(t,n);w.push(X.stop);const{stop:tt}=function(t,e){const n=ur({type:lr(cr.LONG_ANIMATION_FRAME)?cr.LONG_ANIMATION_FRAME:cr.LONG_TASK,buffered:!0}).subscribe(n=>{for(const o of n){if(!e.trackLongTasks)break;const n=(0,r.FR)(o.startTime),i=ki(o,n);t.notify(13,{rawRumEvent:i,startClocks:n,duration:o.duration,domainContext:{performanceEntry:o}})}});return{stop(){return n.unsubscribe()}}}(t,n);w.push(tt);const{addError:et}=function(t,e){const n=new i.cP;return e.subscribe(({data:t,type:e})=>{0===e?n.notify(t):3===e&&t.api===a.bP.error&&n.notify(t.error)}),function(t){(function(t){const e=[];t.includes(_o)&&e.push(new i.cP(t=>{if(!(0,b.BX)(document,"securitypolicyviolation"))return;const{stop:e}=(0,b.q2)(document,"securitypolicyviolation",e=>{t.notify(function(t){const e=`'${t.blockedURI}' blocked by '${t.effectiveDirective}' directive`;return wo({type:t.effectiveDirective,message:`${_o}: ${e}`,originalError:t,csp:{disposition:t.disposition},stack:So(t.effectiveDirective,t.originalPolicy?`${e} of the policy "${ct(t.originalPolicy,100,"...")}"`:"no policy",t.sourceFile,t.lineNumber,t.columnNumber),debugIds:t.sourceFile?(0,D.Jv)([t.sourceFile]):void 0})}(e))});return e}));const n=t.filter(t=>t!==_o);return n.length&&e.push(function(t){return new i.cP(e=>{if(!window.ReportingObserver)return;const n=(0,f.dm)((t,n)=>t.forEach(t=>e.notify(function(t){const{type:e,body:n}=t;return wo({type:n.id,message:`${e}: ${n.message}`,originalError:t,stack:So(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber),debugIds:n.sourceFile?(0,D.Jv)([n.sourceFile]):void 0})}(t)))),r=new window.ReportingObserver(n,{types:t,buffered:!0});return r.observe(),()=>{r.disconnect()}})}(n)),(0,i.Fx)(...e)})([_o,"intervention"]).subscribe(e=>t.notify(e))}(n),n.subscribe(e=>t.notify(15,{error:e})),function(t){return t.subscribe(15,({error:e})=>{t.notify(13,function(t){const e={date:t.startClocks.timeStamp,error:{id:it(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,component_stack:t.componentStack,type:t.type,handling:t.handling,causes:t.causes,source_type:"browser",fingerprint:t.fingerprint,csp:t.csp},_dd:{debug_ids:t.debugIds},type:dt.ERROR,context:t.context},n={error:t.originalError,handlingStack:t.handlingStack};return{rawRumEvent:e,startClocks:t.startClocks,domainContext:n}}(e))}),{addError({error:e,handlingStack:n,componentStack:r,startClocks:i,context:s}){const a=z({originalError:e,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:"Provided",source:F.g.CUSTOM,handling:"handled"});a.context=(0,o.kg)(a.context,s),t.notify(15,{error:a})}}}(t)}(t,g);!function(t,e,n,o,i,s){const a=function(t,e,n,r){return{clearTracingIfNeeded:Wn,traceFetch:o=>Jn(t,o,e,n,r,t=>{if(o.input instanceof Request&&!o.init?.headers)o.input=new Request(o.input),Object.keys(t).forEach(e=>{o.input.headers.append(e,t[e])});else{o.init=(0,Dt.yG)(o.init);const e=[];o.init.headers instanceof Headers?o.init.headers.forEach((t,n)=>{e.push([n,t])}):Array.isArray(o.init.headers)?o.init.headers.forEach(t=>{e.push(t)}):o.init.headers&&Object.keys(o.init.headers).forEach(t=>{e.push([t,o.init.headers[t]])}),o.init.headers=e.concat((0,Ve.WP)(t))}}),traceXhr:(o,i)=>Jn(t,o,e,n,r,t=>{try{Object.keys(t).forEach(e=>{i.setRequestHeader(e,t[e])})}catch{}})}}(e,n,o,i);!function(t,e,n){const r=[];r.push(S().subscribe(t=>{"start"===t.state&&zn(t.url)&&(e.traceXhr(t,t.xhr),Zn(t))})),r.push(n.subscribe(({data:n,type:r})=>{if(2!==r)return;const o=n;if(zn(o.url))switch(o.state){case"start":Zn(o),t.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"complete":e.clearTracingIfNeeded(o),t.notify(8,{...o,type:"xhr",isAbortedOnStart:!1})}}))}(t,a,s),function(t,e,n,o){const i=[];i.push(v({responseBodyAction(t){return Hn(t.url,e)?.trackResponseErrors?1:0}}).subscribe(t=>{"start"===t.state&&zn(t.url)&&(n.traceFetch(t),Zn(t))})),i.push(o.subscribe(({data:e,type:o})=>{if(1!==o)return;const i=e;if(zn(i.url))switch(i.state){case"start":Zn(i),t.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":n.clearTracingIfNeeded(i),t.notify(8,{...i,duration:(0,r.vk)(i.startClocks.timeStamp,(0,r.nx)()),type:Rn,requestBody:i.init?.body})}}))}(t,e,a,s)}(t,n,s,L,$,g);const nt=function(t,e){const n=Qr(t);function o(n){(function(t){return!e.wasInPageStateDuringPeriod("frozen",t.startClocks.relative,t.duration)})(n)&&t.notify(13,_i(n))}return{addOperationStepVital(e,n,o,i){const{operationKey:s,context:a,description:c,handlingStack:u}=o||{},d={name:e,type:vt.OPERATION_STEP,operationKey:s,failureReason:i,stepType:n,startClocks:(0,r.M8)(),context:R(a),description:c,handlingStack:u};t.notify(13,_i(d))},addDurationVital:o,startDurationVital(e,o={},i=(0,r.M8)()){const{id:s}=n.start(o.vitalKey??e,i,{name:e,...o});t.notify(17,{id:s,name:e,startClocks:i,...o})},stopDurationVital(t,e={},i=(0,r.M8)()){const s=n.stop(e.vitalKey??t,i,e);s&&o({type:vt.DURATION,...s})}}}(t,O);if(n.trackResources&&(n.betaTrackWebSockets||(0,xt.sr)(xt.R9.TRACK_WEBSOCKETS))){const e=function(t,e,n){const o=function(t,e,n,o){const i=new Map;function s(e,i,s){const a=function(t,e,n,o){const i=e.at,s="session_end"===n?o.findView(i.relative,{returnInactive:!0})?.id:o.findView(i.relative)?.id,a=void 0!==t.lastMessageInAt?(0,r.vk)(t.lastMessageInAt,i.timeStamp):void 0,{openClocks:c,...u}=t;return{...u,endClocks:i,endViewId:s,inboundIdleDurationBeforeClose:a,trackingEndReason:n,handshakeSucceeded:void 0!==c,setupDuration:t.setupDuration??(0,r.vk)(t.startClocks.timeStamp,i.timeStamp),closeCode:e.code,closeReason:e.reason,wasClean:e.wasClean}}(e,i,s,n);t.notify(9,a),o({id:it(),name:"websocket-closed",type:vt.DURATION,startClocks:a.endClocks,duration:0,context:R({url:a.url,connection_id:a.connectionId})})}const a=e.subscribe(t=>{switch(t.state){case"connecting":{const e=it(),r=n.findView(t.startClocks.relative)?.id,s=function(t){const e=(0,d.c$)(t);return e.search="",e.href}(t.url),a={webSocket:t.instance,connectionId:e,url:s,startClocks:t.startClocks,startViewId:r,messagesIn:{count:0,size:0},messagesOut:{count:0,size:0},longestInboundSilence:0,bufferedAmountMax:0};return i.set(t.instance,a),void o({id:it(),name:"websocket-connecting",type:vt.DURATION,startClocks:t.startClocks,duration:0,context:R({url:s,connection_id:e})})}case"open":{const e=i.get(t.instance);if(!e)return;return e.openClocks=t.openClocks,e.protocol=t.protocol,void(e.setupDuration=(0,r.vk)(e.startClocks.timeStamp,t.openClocks.timeStamp))}case"message-in":{const e=i.get(t.instance);if(!e)return;return e.messagesIn.count+=1,e.messagesIn.size+=t.size,void Xn(e,t.at,"in")}case"message-out":{const e=i.get(t.instance);if(!e)return;return t.bufferedAmountPreSend>e.bufferedAmountMax&&(e.bufferedAmountMax=t.bufferedAmountPreSend),e.messagesOut.count+=1,e.messagesOut.size+=t.size,void Xn(e,t.at,"out")}case"closed":{const e=i.get(t.instance);if(!e)return;return i.delete(t.instance),void s(e,t,"close_event")}}});return{flushOpenConnections(t,e=(0,r.M8)()){i.forEach(n=>{s(n,{at:e},t)}),i.clear()},stop(){a.unsubscribe(),i.clear()}}}(t,(Kn||(Kn=new i.cP(t=>{if(!function(t){return"function"==typeof t.WebSocket}(u.J))return;const{stop:e}=(0,l.my)(u.J,"WebSocket",({parameters:e,onPostCall:n})=>{const o=Array.isArray(e[1])?[].concat(e[1]):e[1],i=(0,r.M8)();n(e=>{t.notify({state:"connecting",instance:e,url:e.url,protocols:o,startClocks:i}),function(t,e){const{stop:n}=(0,b.q2)(t,"open",()=>{e.notify({state:"open",instance:t,openClocks:(0,r.M8)(),protocol:t.protocol||""}),n()}),{stop:o}=(0,b.q2)(t,"message",n=>{e.notify({state:"message-in",instance:t,size:Yn(n.data),at:(0,r.M8)()})}),{stop:i}=(0,b.q2)(t,"close",n=>{e.notify({state:"closed",instance:t,code:n.code,reason:n.reason,wasClean:n.wasClean,at:(0,r.M8)()}),o(),i()})}(e,t)})}),{stop:n}=(0,l.H7)(u.J.WebSocket.prototype,"send",({target:e,parameters:[n],onPostCall:o})=>{const i=Yn(n),s=e.bufferedAmount;o(()=>{t.notify({state:"message-out",instance:e,size:i,bufferedAmountPreSend:s,at:(0,r.M8)()})})});return()=>{e(),n()}})),Kn),e,n),s=t.subscribe(10,({endClocks:t})=>{o.flushOpenConnections("session_end",t)});return{stop(){s.unsubscribe(),o.flushOpenConnections("session_end"),o.stop()}}}(t,N,nt.addDurationVital);w.push(e.stop)}const rt=function(t,e,n,r,o){return{get(i){const s=n.findView(i),a=o.findUrl(i),c=e.findTrackedSession(i);if(c&&s&&a){const e=r.findActionId(i);return{application_id:t,session_id:c.id,user_action:e?{id:e}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}(n.applicationId,s,N,U.actionContexts,M);return{addAction:U.addAction,startAction:U.startAction,stopAction:U.stopAction,startResource:X.startResource,stopResource:X.stopResource,addEvent:j.addEvent,addError:et,addTiming:G,setLoadingTime:W,addFeatureFlagEvaluation:P.addFeatureFlagEvaluation,startView:J,setViewContext:K,setViewContextProperty:Q,getViewContext:Z,setViewName:H,viewHistory:N,sessionManager:s,stopSession:()=>s.expire(),getInternalContext:rt.get,startDurationVital:nt.startDurationVital,stopDurationVital:nt.stopDurationVital,addDurationVital:nt.addDurationVital,addOperationStepVital:nt.addOperationStepVital,globalContext:V,userContext:L,accountContext:$,stop:()=>w.forEach(t=>t())}}(x,_,t,e,n,p,g,w,A);return k.push(I),g.unbuffer(),k.push(()=>s.stop()),{...O,lifeCycle:x,sessionManager:e,stopSession:()=>e.expire(),telemetry:y,stop(){k.forEach(t=>t())},hooks:_}}function Di(t,e,n={}){const d=function(t){const e=new i.cP;function n(){return t===s.GRANTED}return{tryToInit(e){t||(t=e)},onGrantedOnce(t){if(n())t();else{const r=e.subscribe(()=>{n()&&(t(),r.unsubscribe())})}},update(n){t=n,e.notify()},isGranted:n,observable:e}}(),l=function(){const t=new i.dX(500,t=>{(0,E.A2)("Early data collection dropped data on unbuffer",{count:t})}),e=[];function n(n,r){e.push(r.subscribe(e=>{t.notify({type:n,data:e})}))}return n(0,(0,c.B)(G)()),n(1,v()),n(2,S()),n(3,function(t){const e=t.map(t=>(W[t]||(W[t]=function(t){return new i.cP(e=>{const n=a.JZ[t];return a.JZ[t]=(...o)=>{n.apply(console,o);const i=(0,P.uC)("console error");(0,f.um)(()=>{e.notify(function(t,e,n){const o=t.map(t=>function(t){return"string"==typeof t?R(t):(0,V.b)(t)?(0,P.NR)((0,C.T)(t)):(0,I.s)(R(t),void 0,2)}(t)).join(" ");if(e===a.bP.error){const i=z({originalError:t.find(V.b),handlingStack:n,startClocks:(0,r.M8)(),source:F.g.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return i.message=o,{api:e,message:o,handlingStack:n,error:i}}return{api:e,message:o,error:void 0,handlingStack:n}}(o,t,i))})},()=>{a.JZ[t]=n}})}(t)),W[t]));return(0,i.Fx)(...e)}(Object.values(a.bP))),{observable:t,stop(){return e.forEach(t=>t.unsubscribe())}}}();let p=function({ignoreInitIfSyntheticsWillInjectRum:t=!0,startDeflateWorker:e,sdkName:n},o,s){const a=new i.dX(500,t=>{(0,E.A2)("preStartRum buffer data lost",{count:t})}),d=Ce();Q(d,Y,a);const l=Te();Q(l,Z,a);const p=Ie();let h,g,y,v,_,w;Q(p,X,a);const S={assemble:(0,Ae.ab)(),assembleTelemetry:(0,Ae.ab)()},k=o.observable.subscribe(I),x={};let C=!1;function I(){if(C||!y||!v||!_||!w)return;let t;if(k.unsubscribe(),v.trackViewsManually){if(!h)return;t=h.options}const e=v.trackViewsManually?h?.callback:void 0,n=s(v,_,g,t,w,S);C=!0,a.subscribe(t=>{t!==e&&t(n)}),a.unbuffer()}function O(t,s){const a=(0,kt.d0)();if(a&&(t=function(t){return{...t,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:t.defaultPrivacyLevel??(0,kt.Y9)()?.getPrivacyLevel()}}(t)),y=t,v)return void ut("DD_RUM",t);const d=function(t,e){const n=function(t,e,n){if(t&&"object"==typeof t)return Rt(e,t,n);n.error("Configuration must be an object")}(t,fe,T.V);if(!n)return;const r=n.allowedTracingUrls.map(he).filter(Boolean);if(r.length>0&&!n.service)return void T.V.error("Service needs to be configured when tracing is enabled");const o=(0,xt.sr)(xt.R9.SESSION_REPLAY_RECORD_CANVAS)?n.sessionReplayCanvasRecording:void 0;return{...n,sessionReplayCanvasRecording:o,betaEnableViewUpdates:pe(n.betaEnableViewUpdates,n.proxy,e),allowedTracingUrls:r,beforeSend:n.beforeSend?(0,Et.y)(n.beforeSend,"beforeSend threw an error:"):void 0,rulePsr:At(t.traceSampleRate)?t.traceSampleRate/100:void 0,trackResourceHeaders:ve(t),allowedGraphQlUrls:ge(t),remoteConfigurationId:ue(t)}}(t,n);d&&function(t,e){const n=(0,c.B)(u.J.location),r=n?n.origin:"",o=t.allowedTrackingOrigins;if(!o)return!function(t,e=""){return!Ne(t)&&Ne(e.split("\n").filter(t=>{const e=t.trim();return e.length&&/^at\s+|@/.test(e)})[1]||"")}(r,e)||(T.V.error("Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided."),!1);const i=Re(o,r);return i||T.V.error("SDK initialized on a non-allowed domain."),i}(d,s??"")&&(d.compressIntakeRequests&&!a&&e&&(g=e(d,"Datadog RUM",m.l),!g)||(v=d,o.tryToInit(d.trackingConsent),o.onGrantedOnce(()=>{const{assembleTelemetry:e}=S;if(function(t,e){t.register(()=>e.isGranted()?Ae.$O:Ae.ug)}(e,o),w=(0,c.B)(E.a5)("browser-rum-sdk",d,e,n),u.W)return void T.V.warn("The RUM SDK is not supported in a web or service worker environment.");const s=(0,kt.d0)()?function(){let t={id:it(),isReplayForced:!1,anonymousId:void 0,createdAt:(0,r.nx)()};return Promise.resolve({findSession:()=>t,findTrackedSession:()=>t,renewObservable:new i.cP,expireObservable:new i.cP,expire:m.l,updateSessionState(e){t={...t,...e}}})}():(0,c.B)(fn)(d,o);s.then(r=>{r&&(_=r,function(t,e,n){t.register(({startTime:t})=>{const r=e.findTrackedSession(t);return r?{session:{id:r.id},anonymous_id:r.anonymousId,...n}:Ae.$O})}(e,_,{application:{id:d.applicationId}}),(0,E.Rr)(function(t,e){const n={session_sample_rate:(r=t).sessionSampleRate,telemetry_sample_rate:r.telemetrySampleRate,telemetry_configuration_sample_rate:r.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:r.telemetryUsageSampleRate,use_before_send:!!r.beforeSend,use_partitioned_cross_site_session_cookie:r.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:r.useSecureSessionCookie,use_proxy:!!r.proxy,silent_multiple_init:r.silentMultipleInit,track_session_across_subdomains:r.trackSessionAcrossSubdomains,track_anonymous_user:r.trackAnonymousUser,session_persistence:Array.isArray(r.sessionPersistence)?r.sessionPersistence[0]:r.sessionPersistence,store_contexts_across_pages:!!r.storeContextsAcrossPages,allow_untrusted_events:!!r.allowUntrustedEvents,tracking_consent:r.trackingConsent,use_allowed_tracking_origins:Array.isArray(r.allowedTrackingOrigins),source:r.source,sdk_version:r.sdkVersion,variant:r.variant};var r,o,i;return{session_replay_sample_rate:t.sessionReplaySampleRate,start_session_replay_recording_manually:t.startSessionReplayRecordingManually,trace_sample_rate:t.traceSampleRate,trace_context_injection:t.traceContextInjection,propagate_trace_baggage:t.propagateTraceBaggage,action_name_attribute:t.actionNameAttribute,use_allowed_tracing_urls:(0,Tt.EI)(t.allowedTracingUrls),use_allowed_graph_ql_urls:(0,Tt.EI)(t.allowedGraphQlUrls),use_track_graph_ql_payload:(i=t.allowedGraphQlUrls,(0,Tt.EI)(i)&&i.some(t=>(0,A.OE)(t)&&t.trackPayload)),use_track_graph_ql_response_errors:be(t.allowedGraphQlUrls),selected_tracing_propagators:me(t),default_privacy_level:t.defaultPrivacyLevel,enable_privacy_for_action_name:t.enablePrivacyForActionName,use_excluded_activity_urls:(0,Tt.EI)(t.excludedActivityUrls),use_worker_url:!!t.workerUrl,compress_intake_requests:t.compressIntakeRequests,track_views_manually:t.trackViewsManually,track_user_interactions:t.trackUserInteractions,track_resources:t.trackResources,track_long_task:t.trackLongTasks,plugins:t.plugins?.map(t=>({name:t.name,...t.getConfigurationTelemetry?.()})),track_feature_flags_for_events:t.trackFeatureFlagsForEvents,remote_configuration_id:ue(t),profiling_sample_rate:t.profilingSampleRate,use_remote_configuration_proxy:!!t.remoteConfigurationProxy,track_resource_headers:(o=t.trackResourceHeaders,!0===o?"default_headers":Array.isArray(o)?"custom":void 0),beta_enable_view_updates:pe(t.betaEnableViewUpdates,t.proxy,e),beta_track_web_sockets:t.betaTrackWebSockets,...n}}(t,n)),I())}).catch(f.Dx)})))}const N={init(e,n,o){if(e){if((0,xt.Aq)(e.enableExperimentalFeatures),(0,b.fK)(e.allowUntrustedEvents),y=e,!t||!vn())if(_e(e.plugins,"onInit",{initConfiguration:e,publicApi:n}),ue(e)){const t={user:l,context:d};if(e.remoteConfigurationId||e.remoteConfiguration?.sync)(async function(t,e){let n;const r=se(),o=await ce(t);return o.ok?(r.increment("fetch","success"),n=ie(t,o.value,e,r)):(r.increment("fetch","failure"),T.V.error(o.error)),(0,E.Gk)("remote configuration metrics",{metrics:r.get()}),n})(e,t).then(t=>{t&&O(t,o)}).catch(f.Dx);else{const n=function(t,e){const n=function({remoteConfigurationId:t}){const e=function(t){return"dd_rc_"+t}(t);return{read(){let t;try{t=localStorage.getItem(e)}catch{return{status:"error"}}if(null===t)return{status:"miss"};const n=(0,Dt.XU)(t);return void 0===n?(this.remove(),{status:"error"}):function(t){if("object"!=typeof t||null===t)return!1;const e="version"in t&&2===t.version,n="config"in t&&"object"==typeof t.config&&null!==t.config;return e&&n}(n)?{status:"hit",config:n.config}:(this.remove(),{status:"error"})},remove(){try{localStorage.removeItem(e)}catch{}},write(t){const n={version:2,config:t,fetchedAt:(0,r.nx)()};try{localStorage.setItem(e,JSON.stringify(n))}catch{}}}}({remoteConfigurationId:ue(t)}),o=se(),i=n.read();return o.increment("cache",re[i.status]),function(t,e,n){ce(t).then(t=>{t.ok?(n.increment("fetch","success"),e.write(t.value)):(n.increment("fetch","failure"),T.V.error(t.error))}).catch(f.Dx).finally(()=>{(0,E.Gk)("remote configuration metrics",{metrics:n.get()})})}(t,n,o),"hit"===i.status?ie(t,i.config,e,o):t.remoteConfiguration?.required?void 0:t}(e,t);n&&O(n,o)}}else O(e,o)}else T.V.error("Missing configuration")},get initConfiguration(){return y},getInternalContext:m.l,stopSession:m.l,addTiming(t,e=(0,r.nx)()){a.notify(n=>n.addTiming(t,e))},setLoadingTime(t){a.notify(e=>e.setLoadingTime(t))},startView(t,e=(0,r.M8)()){const n=n=>{n.startView(t,e)};a.notify(n),h||(h={options:t,callback:n},I())},setViewName(t){a.notify(e=>e.setViewName(t))},setViewContext(t){a.notify(e=>e.setViewContext(t))},setViewContextProperty(t,e){a.notify(n=>n.setViewContextProperty(t,e))},getViewContext(){return x},globalContext:d,userContext:l,accountContext:p,addAction(t){a.notify(e=>e.addAction(t))},startAction(t,e){const n=(0,r.M8)();a.notify(r=>r.startAction(t,e,n))},stopAction(t,e){const n=(0,r.M8)();a.notify(r=>r.stopAction(t,e,n))},startResource(t,e){const n=(0,r.M8)();a.notify(r=>r.startResource(t,e,n))},stopResource(t,e){const n=(0,r.M8)();a.notify(r=>r.stopResource(t,e,n))},addError(t){a.notify(e=>e.addError(t))},addFeatureFlagEvaluation(t,e){a.notify(n=>n.addFeatureFlagEvaluation(t,e))},startDurationVital(t,e){const n=(0,r.M8)();a.notify(r=>r.startDurationVital(t,e,n))},stopDurationVital(t,e){const n=(0,r.M8)();a.notify(r=>r.stopDurationVital(t,e,n))},addDurationVital(t){a.notify(e=>e.addDurationVital(t))},addOperationStepVital(t,e,n,r){a.notify(o=>o.addOperationStepVital(R(t),e,R(n),R(r)))}};return N}(n,d,(r,o,i,s,a,u)=>{const d=i&&n.createDeflateEncoder?t=>n.createDeflateEncoder(i,t):J.N,f=(0,c.B)(Pi)(r,o,t,e,s,d,l.observable,a,u,n.sdkName);return t.onRumStart(f.lifeCycle,r,o,f.viewHistory,i,f.telemetry),e.onRumStart(f.lifeCycle,f.hooks,r,o,f.viewHistory,d),p=function(t,e){return{...t,init(t){ut("DD_RUM",t)},getInternalContext:e.getInternalContext,stopSession:e.stopSession,getViewContext:e.getViewContext,globalContext:e.globalContext,userContext:e.userContext,accountContext:e.accountContext}}(p,f),_e(r.plugins,"onRumStart",{addEvent:f.addEvent,addError:f.addError}),f});const h=()=>p,g=(t,e)=>{const n=(0,P.uC)("vital");(0,f.um)(()=>{(0,E.Q6)({feature:"add-operation-step-vital",action_type:"start"}),p.addOperationStepVital(t,"start",{...e,handlingStack:n})})},y=(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"add-operation-step-vital",action_type:"succeed"}),p.addOperationStepVital(t,"end",e)}),_=(0,f.dm)((t,e,n)=>{(0,E.Q6)({feature:"add-operation-step-vital",action_type:"fail"}),p.addOperationStepVital(t,"end",n,e)}),w=(0,H.m)({init(t){const e=Error().stack;(0,f.um)(()=>p.init(t,w,e))},setTrackingConsent:(0,f.dm)(t=>{d.update(t),(0,E.Q6)({feature:"set-tracking-consent",tracking_consent:t})}),setViewName:(0,f.dm)(t=>{p.setViewName(Vi(t,"view name")),(0,E.Q6)({feature:"set-view-name"})}),setViewContext:(0,f.dm)(t=>{p.setViewContext(t),(0,E.Q6)({feature:"set-view-context"})}),setViewContextProperty:(0,f.dm)((t,e)=>{p.setViewContextProperty(t,e),(0,E.Q6)({feature:"set-view-context-property"})}),getViewContext:(0,f.dm)(()=>((0,E.Q6)({feature:"set-view-context-property"}),p.getViewContext())),getInternalContext:(0,f.dm)(t=>p.getInternalContext(t)),getInitConfiguration:(0,f.dm)(()=>(0,o.Go)(p.initConfiguration)),addAction(t,e){const n=(0,P.uC)("action");(0,f.um)(()=>{p.addAction({name:R(t),context:R(e),startClocks:(0,r.M8)(),type:ht,handlingStack:n}),(0,E.Q6)({feature:"add-action"})})},startAction:(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"start-action"}),p.startAction(R(t),{type:R(e?.type),context:R(e?.context),actionKey:e?.actionKey})}),stopAction:(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"stop-action"}),p.stopAction(R(t),{type:R(e?.type),context:R(e?.context),actionKey:e?.actionKey})}),startResource:(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"start-resource"}),p.startResource(R(t),{type:R(e?.type),method:R(e?.method),context:R(e?.context),resourceKey:e?.resourceKey})}),stopResource:(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"stop-resource"}),p.stopResource(R(t),{type:R(e?.type),statusCode:e?.statusCode,size:e?.size,context:R(e?.context),resourceKey:e?.resourceKey})}),addError(t,e){const n=(0,P.uC)("error");(0,f.um)(()=>{p.addError({error:t,handlingStack:n,context:R(e),startClocks:(0,r.M8)()}),(0,E.Q6)({feature:"add-error"})})},addTiming:(0,f.dm)((t,e)=>{p.addTiming(R(t),e)}),setViewLoadingTime:(0,f.dm)(()=>{const t=(0,r.nx)();p.setLoadingTime(t),(0,E.Q6)({feature:"addViewLoadingTime"})}),setGlobalContext:K(h,Y,et,"set-global-context"),getGlobalContext:K(h,Y,tt,"get-global-context"),setGlobalContextProperty:K(h,Y,nt,"set-global-context-property"),removeGlobalContextProperty:K(h,Y,rt,"remove-global-context-property"),clearGlobalContext:K(h,Y,ot,"clear-global-context"),setUser:K(h,Z,et,"set-user"),getUser:K(h,Z,tt,"get-user"),setUserProperty:K(h,Z,nt,"set-user-property"),removeUserProperty:K(h,Z,rt,"remove-user-property"),clearUser:K(h,Z,ot,"clear-user"),setAccount:K(h,X,et,"set-account"),getAccount:K(h,X,tt,"get-account"),setAccountProperty:K(h,X,nt,"set-account-property"),removeAccountProperty:K(h,X,rt,"remove-account-property"),clearAccount:K(h,X,ot,"clear-account"),startView(t){const e=(0,P.uC)("view");(0,f.um)(()=>{const n="object"==typeof t?t:{name:t};p.startView({...n,name:Vi(n.name,"view name"),service:Vi(n.service,"view service"),version:Vi(n.version,"view version"),handlingStack:e}),(0,E.Q6)({feature:"start-view"})})},stopSession:(0,f.dm)(()=>{p.stopSession(),(0,E.Q6)({feature:"stop-session"})}),addFeatureFlagEvaluation:(0,f.dm)((t,e)=>{p.addFeatureFlagEvaluation(R(t),R(e)),(0,E.Q6)({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:(0,f.dm)(()=>t.getSessionReplayLink()),startSessionReplayRecording:(0,f.dm)(e=>{t.start(e),(0,E.Q6)({feature:"start-session-replay-recording",force:e?.force})}),stopSessionReplayRecording:(0,f.dm)(()=>t.stop()),addDurationVital(t,e){const n=(0,P.uC)("vital");(0,f.um)(()=>{(0,E.Q6)({feature:"add-duration-vital"}),p.addDurationVital({id:it(),name:R(t),type:vt.DURATION,startClocks:(0,r.jR)(e.startTime),duration:e.duration,context:R(e?.context),description:R(e?.description),handlingStack:n})})},startDurationVital(t,e){const n=(0,P.uC)("vital");(0,f.um)(()=>{(0,E.Q6)({feature:"start-duration-vital"}),p.startDurationVital(R(t),{vitalKey:e?.vitalKey,context:R(e?.context),description:R(e?.description),handlingStack:n})})},stopDurationVital:(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"stop-duration-vital"}),p.stopDurationVital(R(t),{vitalKey:e?.vitalKey,context:R(e?.context),description:R(e?.description)})}),startOperation:g,succeedOperation:y,failOperation:_,startFeatureOperation:g,succeedFeatureOperation:y,failFeatureOperation:_,DEFAULT_TRACKED_RESOURCE_HEADERS:le});return w}function Vi(t,e){if(void 0!==t){if("string"==typeof t)return R(t);T.V.warn(`Invalid ${e} provided (expected a string, got ${typeof t}). Ignoring.`)}}function Li(t,{session:e,viewContext:n,errorType:r}){const o=e?e.id:"no-session-id",i=[];void 0!==r&&i.push("error-type="+r),n&&(i.push("seed="+n.id),i.push("from="+n.startClocks.timeStamp));const s=function(t){const e=t.site,n=t.subdomain||function(t){switch(t.site){case bt.NW:case bt.dV:return"app";case bt.Bb:return"dd";default:return}}(t);return`https://${n?n+".":""}${e}`}(t);return`${s}${"/rum/replay/sessions/"+o}?${i.join("&")}`}var $i=n(1776);function Ui(t,e,n,o){const i=(0,$i.sA)([(0,Ft.ns)(t,"profile")],t=>{e.notify(15,{error:{message:t,source:F.g.AGENT,startClocks:(0,r.M8)()}}),(0,E.A2)("Error reported to customer",{"error.message":t})}),s=n(o);return{async send({event:t,...e}){const n=new FormData,r=(0,I.s)(t);if(!r)throw Error("Failed to serialize event");n.append("event",new Blob([r],{type:"application/json"}),"event.json");let o=r.length;for(const[t,r]of(0,Ve.WP)(e)){const e=(0,I.s)(r);if(!e)throw Error("Failed to serialize attachment");const i=await zi(s,e);o+=i.outputBytesCount,n.append(t,new Blob([i.output]),t)}i.send({data:n,bytesCount:o})}}}function zi(t,e){return new Promise(n=>{t.write(e),t.finish(t=>{n(t)})})}},7163(t,e,n){n.d(e,{BJ:()=>I,CB:()=>A,g1:()=>kt});var r=n(4512),o=n(8333),i=n(979),s=n(9164);function a(t,e){const n=t.tagName,o=t.value;if((0,r.Ie)(t,e)){const e=t.type;if("INPUT"===n&&("button"===e||"submit"===e||"reset"===e))return o;if(!o||"OPTION"===n)return;return r.o}return"OPTION"===n||"SELECT"===n?t.value:"INPUT"===n||"TEXTAREA"===n?o:void 0}const c=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,u=/^[A-Za-z]+:|^\/\//,d=/^["']?data:.*,/i;function l(t){return t.tagName.toLowerCase()}function f(t,e){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${e}' style='background-color:silver'%3E%3C/svg%3E`}function p(t,e){return{role:t,string:e}}function m(t,e,n){return[p(i._o.AttributeName,e),p(v(t,e),n)]}function h(t,e,n){const r=p(i._o.AttributeName,e);return null===n?[r]:[r,p(v(t,e),n)]}const g=new Set(["input","option","select","textarea"]),y=new Set(["action","background","cite","data","formaction","href","longdesc","manifest","ping","poster","src","srcset","xlink:href"]);function v(t,e){switch(e){case"value":return g.has(t)?i._o.FormInput:i._o.AttributeValue;case"style":return i._o.Css;default:return y.has(e)?i._o.Url:i._o.AttributeValue}}function b(t){const e={},n=new Map,r=[];let o=0,s=!1;const a=e=>{const r=t.get(e);if(void 0!==r)return r;s=!0;let i=n.get(e.role);i||(i={role:e.role,strings:new Map,references:0},n.set(e.role,i)),i.references++;const a=i.strings.get(e.string);if(a)return a;const c={literal:e,id:void 0};return i.strings.set(e.string,c),o++,c},c=t=>{for(let e=0,n=t.length;e<n;e++){const n=t[e];"string"==typeof n?t[e]=a(p(i._o.Default,n)):Array.isArray(n)?c(n):S(n)&&(t[e]=a(n))}};return{add(t,n){t in e||(e[t]=[t]),Array.isArray(n)&&(s=!1,c(n),s&&r.push(n)),e[t].push(n)},flushInto(o){const s=(()=>{if(0===n.size)return;const e=[i.JQ.AddRoleAnnotatedStrings];for(const r of Array.from(n.values()).sort(w)){const n=[r.role];for(const e of r.strings.values())e.id=t.getOrInsert(e.literal),n.push(e.literal.string);e.push(n)}return e})();s&&o.push(s);for(const t of r)_(t);[i.JQ.AddNode,i.JQ.RemoveNode,i.JQ.Attribute,i.JQ.Text,i.JQ.InputValue,i.JQ.InputSelection,i.JQ.Size,i.JQ.ScrollPosition,i.JQ.AddStyleSheet,i.JQ.AttachedStyleSheets,i.JQ.MediaPlaybackState,i.JQ.VisualViewport].forEach(t=>{const n=e[t];n&&o.push(n)})},get pendingStringCount(){return o}}}function _(t){for(let e=0,n=t.length;e<n;e++){const n=t[e];Array.isArray(n)?_(n):k(n)&&(t[e]=n.id)}}function w(t,e){return e.references-t.references}function S(t){return"object"==typeof t&&null!==t&&"string"in t}function k(t){return"object"==typeof t&&null!==t&&"literal"in t}function x(t){return function(t,e){let n=t(),r=e;const o=t=>n.get(t);return{clear(){r!==e&&(n=t(),r=e)},delete(t){n.delete(t)},get:o,getOrInsert(t){let e=o(t);return void 0===e&&(e=r++,n.set(t,e)),e},get nextId(){return r},get size(){return r-e}}}(()=>new WeakMap,t)}function E(){return{[i._o.Default]:C(),[i._o.NodeName]:C(),[i._o.AttributeName]:C(),[i._o.AttributeValue]:C(),[i._o.TextContent]:C(),[i._o.FormInput]:C(),[i._o.Css]:C(),[i._o.Url]:C()}}function C(){return Object.create(null)}function A(){return{cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}}}function T(t,e,n){t[e].count+=1,t[e].max=Math.max(t[e].max,n),t[e].sum+=n}function I(t,e){for(const n of["cssText","serializationDuration"])t[n].count+=e[n].count,t[n].max=Math.max(t[n].max,e[n].max),t[n].sum+=e[n].sum}function R(t,e,n,r,s,a){const c=function(t){let e=[],n=b(t);const r=()=>{n.flushInto(e),n=b(t)};return{add(o,s){n.add(o,s),t.size+n.pendingStringCount>=Number(1e6)&&(r(),e.push([i.JQ.ClearStrings]),t.clear())},flush(){r();const t=e;return e=[],t}}}(r.stringIds),u={cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}},d={addMetric(t,e){T(u,t,e)},addNode(...t){c.add(i.JQ.AddNode,t)},addStyleSheet(t,e,n){n?c.add(i.JQ.AddStyleSheet,[t,e||[],n]):e?c.add(i.JQ.AddStyleSheet,[t,e]):c.add(i.JQ.AddStyleSheet,[t])},attachStyleSheets(t,e){const n=[t];for(const t of e)n.push(t);c.add(i.JQ.AttachedStyleSheets,n)},removeNode(t){c.add(i.JQ.RemoveNode,t)},setAttributes(t){c.add(i.JQ.Attribute,t)},setInputSelection(t,e){const n=[t];for(const t of e)n.push(t);c.add(i.JQ.InputSelection,n)},setInputValue(t,e){c.add(i.JQ.InputValue,[t,e])},setMediaPlaybackState(t,e){c.add(i.JQ.MediaPlaybackState,[t,e])},setScrollPosition(t,e,n){c.add(i.JQ.ScrollPosition,[t,e,n])},setSize(t,e,n){c.add(i.JQ.Size,[t,e,n])},setText(t,e){c.add(i.JQ.Text,[t,e])},kind:t,scope:r},l=(0,o.nx)();a(d),T(u,"serializationDuration",(0,o.vk)(l,(0,o.nx)()));const f=c.flush();f.length>0&&e(0===t||1===t?{data:f,format:i.KN.Change,type:i.ee.FullSnapshot,timestamp:s}:{data:f,type:i.ee.Change,timestamp:s}),n(u)}const O=["width","height"];function N(t){return(0,r.nS)(t)&&"CANVAS"===t.tagName}function M(t){return O.includes(t.toLowerCase())}let P;function D(t,e,n,o){if(e===r.$m.HIDDEN)return null;const i=t.getAttribute(n),s=t.tagName;if((0,r.ap)(s,n,i,e,o)){if("IMG"===s){const e=t;if(e.naturalWidth>0)return f(e.naturalWidth,e.naturalHeight);const{width:n,height:o}=t.getBoundingClientRect();return n>0||o>0?f(n,o):r.eT}return"SOURCE"===s?r.eT:r.o}return i?(0,r.ei)(i,1e6):i}function V(t,e,n,r,o,i){const s=D(e,o,r,i.scope.configuration);null!==s&&t.push(m(n,r,s))}function L(t){if(!t)return null;let e;try{e=t.rules||t.cssRules}catch{}return e?(n=Array.from(e,1===(P??(P=function(t=window){const e=t.navigator.userAgent;return t.chrome||/HeadlessChrome/.test(e)?0:0===t.navigator.vendor?.indexOf("Apple")||/safari/i.test(e)&&!/chrome|android/i.test(e)?1:2}()))?$:U).join(""),r=t.href,n.replace(c,(t,e,n,o,i,a)=>{const c=n||i||a;if(!r||!c||u.test(c)||d.test(c))return t;const l=e||o||"";return`url(${l}${function(t,e){try{return(0,s.c$)(t,e).href}catch{return t}}(c,r)}${l})`})):null;var n,r}function $(t){if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")){const e=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return t.cssText.replace(e,"$1\\$2")}return U(t)}function U(t){return function(t){return"styleSheet"in t}(t)&&L(t.styleSheet)||t.cssText}function z(t,e,n,o){if("STYLE"===e.parentNode?.nodeName)return;if(n===r.$m.HIDDEN||n===r.$m.IGNORE)return;let s;const c=(0,r.dT)(e);if(s=c?(0,r.jR)(c,n):n,s!==r.$m.HIDDEN){if(s!==r.$m.IGNORE){switch(e.nodeType){case e.CDATA_SECTION_NODE:!function(t,e,n){const{insertionPoint:r}=t.advance(e);n.addNode(r,p(i._o.NodeName,"#cdata-section"))}(t,e,o);break;case e.DOCUMENT_NODE:!function(t,e,n){const{nodeId:o,insertionPoint:s}=t.advance(e);n.addNode(s,p(i._o.NodeName,"#document")),n.setScrollPosition(o,(0,r.Gn)(),(0,r.zL)()),j(e.adoptedStyleSheets,o,n)}(t,e,o);break;case e.DOCUMENT_FRAGMENT_NODE:!function(t,e,n){const{nodeId:o,insertionPoint:s}=t.advance(e);(0,r.p_)(e)?(n.addNode(s,p(i._o.NodeName,"#shadow-root")),n.scope.shadowRootsController.addShadowRoot(e,n.scope),j(e.adoptedStyleSheets,o,n)):n.addNode(s,p(i._o.NodeName,"#document-fragment"))}(t,e,o);break;case e.DOCUMENT_TYPE_NODE:!function(t,e,n){const{insertionPoint:r}=t.advance(e);n.addNode(r,p(i._o.NodeName,"#doctype"),p(i._o.AttributeValue,e.name),p(i._o.AttributeValue,e.publicId),p(i._o.Url,e.systemId))}(t,e,o);break;case e.ELEMENT_NODE:!function(t,e,n,o){const{nodeId:s,insertionPoint:c}=t.advance(e),u=function(t,e,n){if(e===r.$m.HIDDEN)return[];const o=[],i=l(t);for(let r=0;r<t.attributes.length;r+=1){const s=t.attributes.item(r).name;"value"!==s&&"selected"!==s&&"checked"!==s&&V(o,t,i,s,e,n)}if(!t.value||"textarea"!==i&&"select"!==i&&"option"!==i&&"input"!==i)t.hasAttribute("value")&&V(o,t,i,"value",e,n);else{const n=a(t,e);void 0!==n&&o.push(m(i,"value",n))}"option"===i?t.selected&&!(0,r.Ie)(t,e)&&o.push(m(i,"selected","")):t.hasAttribute("selected")&&V(o,t,i,"selected",e,n);const s=t;return"input"!==i||"radio"!==s.type&&"checkbox"!==s.type?t.hasAttribute("checked")&&V(o,t,i,"checked",e,n):s.checked&&!(0,r.Ie)(t,e)&&o.push(m(i,"checked","")),o}(e,n,o);o.addNode(c,q(e),...u),N(e)&&o.scope.canvasManager.markCanvasDirty(e);const{_cssText:d,rr_mediaState:f,rr_scrollLeft:h,rr_scrollTop:g}=function(t,e,n){if(e===r.$m.HIDDEN)return{};const o={},i=t.ownerDocument,s=l(t);if("link"===s){const e=Array.from(i.styleSheets).find(e=>e.href===t.href),r=L(e);r&&e&&(n.addMetric("cssText",r.length),o._cssText=r)}if("style"===s&&t.sheet){const e=L(t.sheet);e&&(n.addMetric("cssText",e.length),o._cssText=e)}if("audio"===s||"video"===s){const e=t;o.rr_mediaState=e.paused?"paused":"played"}let a,c;switch(n.kind){case 0:a=Math.round(t.scrollTop),c=Math.round(t.scrollLeft),(a||c)&&n.scope.elementsScrollPositions.set(t,{scrollTop:a,scrollLeft:c});break;case 1:n.scope.elementsScrollPositions.has(t)&&({scrollTop:a,scrollLeft:c}=n.scope.elementsScrollPositions.get(t))}return c&&(o.rr_scrollLeft=c),a&&(o.rr_scrollTop=a),o}(e,n,o),y=e;if(void 0!==d&&y.sheet){const t=o.scope.styleSheetIds.getOrInsert(y.sheet);o.addStyleSheet(p(i._o.Css,d)),o.attachStyleSheets(s,[t])}"played"===f?o.setMediaPlaybackState(s,i.xQ.Play):"paused"===f&&o.setMediaPlaybackState(s,i.xQ.Pause),void 0===h&&void 0===g||o.setScrollPosition(s,h||0,g||0)}(t,e,s,o);break;case e.TEXT_NODE:!function(t,e,n,o){const{insertionPoint:s}=t.advance(e),a=(0,r.rf)(e,n);o.addNode(s,p(i._o.NodeName,"#text"),p(i._o.TextContent,a))}(t,e,s,o);break;default:return}switch(e.nodeType){case e.CDATA_SECTION_NODE:case e.DOCUMENT_TYPE_NODE:case e.TEXT_NODE:return}t.descend(),(0,r.wI)(e,e=>{z(t,e,s,o)}),t.ascend()}}else!function(t,e,n){if(!(0,r.nS)(e))return;const{nodeId:o,insertionPoint:i}=t.advance(e);n.addNode(i,q(e),m(l(e),r.NT,r.Wd));const{width:s,height:a}=e.getBoundingClientRect();n.setSize(o,s,a)}(t,e,o)}function j(t,e,n){t&&0!==t.length&&n.attachStyleSheets(e,t.map(t=>function(t,e){const n=Array.from(t.cssRules||t.rules,t=>p(i._o.Css,t.cssText)),r=t.media.length>0?Array.from(t.media).map(t=>p(i._o.Css,t)):void 0;return e.addMetric("cssText",n.reduce((t,e)=>t+e.string.length,0)),e.addStyleSheet(n,r,t.disabled),e.scope.styleSheetIds.getOrInsert(t)}(t,n)))}function q(t){const e=t.nodeName;return function(t){return"http://www.w3.org/2000/svg"===t.namespaceURI}(t)?p(i._o.NodeName,"svg>"+e):p(i._o.NodeName,e)}function B(t,e,n){return F(t,e,n)}function F(t,e,n){let r={container:void 0,parentId:t,previousSiblingId:void 0,nextSiblingId:e};return{advance(t){const e=n.getOrInsert(t),o=(t=>r.previousSiblingId===t-1?0:void 0!==r.nextSiblingId?r.nextSiblingId-t:void 0!==r.parentId?t-r.parentId:null)(e);return r.previousSiblingId=e,{nodeId:e,insertionPoint:o}},ascend(){r.container&&(r=r.container)},descend(){void 0!==r.previousSiblingId&&(r={container:r,parentId:r.previousSiblingId,previousSiblingId:void 0,nextSiblingId:void 0})}}}function G(t,e){let n=t.nextSibling;for(;n;){const t=e.get(n);if(void 0!==t)return t;n=n.nextSibling}}function W(t,e){e(t),(0,r.wI)(t,t=>W(t,e))}const J=t=>({scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width});function H(t,e,n,o,s){const{width:a,height:c}=(0,r.pB)();n({data:{height:c,href:window.location.href,width:a},type:i.ee.Meta,timestamp:t}),n({data:{has_focus:document.hasFocus()},type:i.ee.Focus,timestamp:t}),function(t,e,n,r,o,i){i.resetIds(),R(e,r,o,i,t,t=>{z(F(void 0,void 0,i.nodeIds),n,i.configuration.defaultPrivacyLevel,t)})}(t,e,document,n,o,s),window.visualViewport&&n({data:J(window.visualViewport),type:i.ee.VisualViewport,timestamp:t})}var K=n(350),Q=n(728),Z=n(2729),Y=n(3236);function X(t){return!!t.changedTouches}function tt(t){return!0===t.composed&&(0,r.XS)(t.target)?t.composedPath()[0]:t.target}function et(t,e,n=(0,o.nx)()){return{data:{source:t,...e},type:i.ee.IncrementalSnapshot,timestamp:n}}function nt(t,e){const{throttled:n,cancel:r}=(0,Z.n)(n=>{const r=tt(n),o=e.nodeIds.get(r);if(void 0===o)return;const s=rt(n);if(!s)return;const a={id:o,timeOffset:0,x:s.x,y:s.y};t(et(X(n)?i.Cj.TouchMove:i.Cj.MouseMove,{positions:[a]}))},50,{trailing:!1}),{stop:o}=(0,Y.lQ)(document,["mousemove","touchmove"],n,{capture:!0,passive:!0});return{stop(){o(),r()}}}function rt(t){let{clientX:e,clientY:n}=X(t)?t.changedTouches[0]:t;if(window.visualViewport){const{visualViewportX:t,visualViewportY:r}=((t,e)=>{const n=window.visualViewport,r={layoutViewportX:t,layoutViewportY:e,visualViewportX:t,visualViewportY:e};return n?(function(t){return Math.abs(t.pageTop-t.offsetTop-window.scrollY)>25||Math.abs(t.pageLeft-t.offsetLeft-window.scrollX)>25}(n)?(r.layoutViewportX=Math.round(t+n.offsetLeft),r.layoutViewportY=Math.round(e+n.offsetTop)):(r.visualViewportX=Math.round(t-n.offsetLeft),r.visualViewportY=Math.round(e-n.offsetTop)),r):r})(e,n);e=t,n=r}if(Number.isFinite(e)&&Number.isFinite(n))return{x:e,y:n}}const ot={pointerup:i.GE.MouseUp,mousedown:i.GE.MouseDown,click:i.GE.Click,contextmenu:i.GE.ContextMenu,dblclick:i.GE.DblClick,focus:i.GE.Focus,blur:i.GE.Blur,touchstart:i.GE.TouchStart,touchend:i.GE.TouchEnd};function it(t,e){return(0,Y.lQ)(document,Object.keys(ot),n=>{const o=tt(n),s=e.nodeIds.get(o);if(void 0===s||(0,r.PJ)(o,e.configuration.defaultPrivacyLevel)===r.$m.HIDDEN)return;const a=ot[n.type];let c;if(a!==i.GE.Blur&&a!==i.GE.Focus){const t=rt(n);if(!t)return;c={id:s,type:a,x:t.x,y:t.y}}else c={id:s,type:a};t({id:e.eventIds.getOrInsert(n),...et(i.Cj.MouseInteraction,c)})},{capture:!0,passive:!0})}function st(t,e,n){const{throttled:o,cancel:s}=(0,Z.n)(t=>{const o=tt(t);if(!o)return;const s=n.nodeIds.get(o);if(void 0===s||(0,r.PJ)(o,n.configuration.defaultPrivacyLevel)===r.$m.HIDDEN)return;const a=o===document?{scrollTop:(0,r.zL)(),scrollLeft:(0,r.Gn)()}:{scrollTop:Math.round(o.scrollTop),scrollLeft:Math.round(o.scrollLeft)};n.elementsScrollPositions.set(o,a),e(et(i.Cj.Scroll,{id:s,x:a.scrollLeft,y:a.scrollTop}))},100),{stop:a}=(0,Y.q2)(t,"scroll",o,{capture:!0,passive:!0});return{stop(){a(),s()}}}function at(t){const e=(0,r.g1)().subscribe(e=>{t(et(i.Cj.ViewportResize,e))});return{stop(){e.unsubscribe()}}}function ct(t){const e=window.visualViewport;if(!e)return{stop:Z.l};const{throttled:n,cancel:r}=(0,Z.n)(()=>{t({data:J(e),type:i.ee.VisualViewport,timestamp:(0,o.nx)()})},200,{trailing:!1}),{stop:s}=(0,Y.lQ)(e,["resize","scroll"],n,{capture:!0,passive:!0});return{stop(){s(),r()}}}function ut(t,e){return(0,Y.lQ)(document,["play","pause"],n=>{const o=tt(n);if(!o)return;const s=e.nodeIds.get(o);void 0!==s&&(0,r.PJ)(o,e.configuration.defaultPrivacyLevel)!==r.$m.HIDDEN&&t(et(i.Cj.MediaInteraction,{id:s,type:"play"===n.type?i.xQ.Play:i.xQ.Pause}))},{capture:!0,passive:!0})}var dt=n(3444);function lt(t,e){function n(t,n){if(!t?.ownerNode)return;const r=e.nodeIds.get(t.ownerNode);void 0!==r&&n(r)}const r=[(0,dt.H7)(CSSStyleSheet.prototype,"insertRule",({target:e,parameters:[r,o]})=>{n(e,e=>t(et(i.Cj.StyleSheetRule,{id:e,adds:[{rule:r,index:o}]})))}),(0,dt.H7)(CSSStyleSheet.prototype,"deleteRule",({target:e,parameters:[r]})=>{n(e,e=>t(et(i.Cj.StyleSheetRule,{id:e,removes:[{index:r}]})))})];function o(e){r.push((0,dt.H7)(e.prototype,"insertRule",({target:e,parameters:[r,o]})=>{n(e.parentStyleSheet,n=>{const s=ft(e);s&&(s.push(o||0),t(et(i.Cj.StyleSheetRule,{id:n,adds:[{rule:r,index:s}]})))})}),(0,dt.H7)(e.prototype,"deleteRule",({target:e,parameters:[r]})=>{n(e.parentStyleSheet,n=>{const o=ft(e);o&&(o.push(r),t(et(i.Cj.StyleSheetRule,{id:n,removes:[{index:o}]})))})}))}return"undefined"!=typeof CSSGroupingRule?o(CSSGroupingRule):(o(CSSMediaRule),o(CSSSupportsRule)),{stop(){r.forEach(t=>t.stop())}}}function ft(t){const e=[];let n=t;for(;n.parentRule;){const t=Array.from(n.parentRule.cssRules).indexOf(n);e.unshift(t),n=n.parentRule}if(!n.parentStyleSheet)return;const r=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return e.unshift(r),e}function pt(t){return(0,Y.lQ)(window,["focus","blur"],()=>{t({data:{has_focus:document.hasFocus()},type:i.ee.Focus,timestamp:(0,o.nx)()})})}function mt(t,e,n){const r=t.subscribe(5,()=>{n(),e({timestamp:(0,o.nx)(),type:i.ee.ViewEnd})});return{stop(){r.unsubscribe()}}}const ht={type:1,selection:i.WW.Deselected};function gt(t,e,n,s){const c=s.configuration.defaultPrivacyLevel,u=new WeakMap,d=t.nodeType!==t.DOCUMENT_NODE,l=(d?t.ownerDocument:t).defaultView;if(!l)return{stop:Z.l};const{stop:f}=(0,Y.lQ)(t,d?["change"]:["input","change"],t=>{const e=tt(t);(e instanceof l.HTMLInputElement||e instanceof l.HTMLTextAreaElement||e instanceof l.HTMLSelectElement)&&h(e)},{capture:!0,passive:!0});let m;if(d)m=Z.l;else{const t=[(0,dt.tv)(l.HTMLInputElement.prototype,"value",h),(0,dt.tv)(l.HTMLInputElement.prototype,"checked",h),(0,dt.tv)(l.HTMLSelectElement.prototype,"value",h),(0,dt.tv)(l.HTMLTextAreaElement.prototype,"value",h),(0,dt.tv)(l.HTMLSelectElement.prototype,"selectedIndex",h)];m=()=>{t.forEach(t=>t.stop())}}return{stop(){m(),f()}};function h(t){const d=(0,r.PJ)(t,c);if(d===r.$m.HIDDEN)return;const l=t.type;let f,m=t;if("radio"===l||"checkbox"===l){if((0,r.Ie)(t,d))return;f={type:1,selection:(h=t,h.checked?i.WW.Selected:i.WW.Deselected)}}else if(yt(t)){if((0,r.Ie)(t,d))return;const e=t.options[t.selectedIndex];if(!e)return;m=e,f={type:1,selection:i.WW.Selected}}else{const e=a(t,d);if(void 0===e)return;f={type:0,value:e}}var h;const y=g(m,f),v=[];if("radio"===l&&t.checked&&(b=t).name&&b.ownerDocument.querySelectorAll(`input[type="radio"][name="${CSS.escape(b.name)}"]`).forEach(t=>{t!==b&&(t=>{const e=g(t,ht);void 0!==e&&v.push(e)})(t)}),yt(t))for(let e=0;e<t.options.length;e++){const n=t.options[e];n!==m&&u.delete(n)}var b;void 0===y&&0===v.length||R(2,e,n,s,(0,o.nx)(),t=>{void 0!==y&&(0===f.type?t.setInputValue(y,p(i._o.FormInput,f.value)):t.setInputSelection(f.selection,[y])),v.length>0&&t.setInputSelection(i.WW.Deselected,v)})}function g(t,e){const n=s.nodeIds.get(t);if(void 0===n)return;const r=u.get(t);return r&&(i=e,0===(o=r).type?0===i.type&&o.value===i.value:1===i.type&&o.selection===i.selection)?void 0:(u.set(t,e),n);var o,i}}function yt(t){return"SELECT"===t.tagName}var vt=n(6447),bt=n(7922);function _t(t,e,n,s){const c=(0,r.W3)();if(!c)return{stop:Z.l,flush:Z.l};const u=function(){let t=Z.l,c=[];function u(){var u;t(),u=c,function(t,e,n,o,s){R(2,n,o,s,t,t=>function(t,e){const n=new Set,o=new Map,s=new Map,c=new Set;for(const e of t)switch(e.type){case"attributes":{const t=e.target;let n=o.get(t);n||(n=new Map,o.set(t,n));const r=e.attributeName;n.has(r)||n.set(r,e.oldValue);break}case"characterData":s.has(e.target)||s.set(e.target,e.oldValue);break;case"childList":for(let t=0;t<e.addedNodes.length;t++)n.add(e.addedNodes[t]);for(let t=0;t<e.removedNodes.length;t++)c.add(e.removedNodes[t])}const u=e.scope.nodeIds.nextId,d=new Map;(function(t,e){const n=e.scope.nodeIds;for(const o of t){const t=n.get(o);void 0!==t&&(W(o,t=>{N(t)&&e.scope.canvasManager.markCanvasClean(t),(0,r.XS)(t)&&e.scope.shadowRootsController.removeShadowRoot(t.shadowRoot),n.delete(t)}),e.removeNode(t))}})(c,e),function(t,e,n){const o=n.scope.nodeIds;for(const i of t){if(!i.isConnected)continue;if(void 0!==o.get(i))continue;const t=(0,r.$4)(i);if(!t)continue;const s=o.get(t);if(void 0===s)continue;const a=(0,r.PJ)(t,n.scope.configuration.defaultPrivacyLevel,e);z(B(s,G(i,o),o),i,a,n)}}(n,d,e),function(t,e,n,o){const s=o.scope.nodeIds;for(const[a,c]of t){if(a.textContent===c)continue;if(!a.isConnected)continue;const t=s.get(a);if(void 0===t)continue;if(t>=e)continue;const u=(0,r.$4)(a);if(!u)continue;const d=(0,r.PJ)(u,o.scope.configuration.defaultPrivacyLevel,n);if(d===r.$m.HIDDEN||d===r.$m.IGNORE)continue;const l=(0,r.rf)(a,d);o.setText(t,p(i._o.TextContent,l))}}(s,u,d,e),function(t,e,n,o){const i=o.scope.nodeIds;for(const[s,c]of t){if(!s.isConnected)continue;const t=i.get(s);if(void 0===t)continue;if(t>=e)continue;const u=(0,r.PJ)(s,o.scope.configuration.defaultPrivacyLevel,n);if(u===r.$m.HIDDEN||u===r.$m.IGNORE)continue;const d=l(s),f=[t];for(const[t,e]of c){if(s.getAttribute(t)===e)continue;if(N(s)&&M(t)&&o.scope.canvasManager.markCanvasDirty(s),"value"===t){const e=a(s,u);void 0!==e&&f.push(m(d,t,e));continue}const n=D(s,u,t,o.scope.configuration);f.push(h(d,t,n))}f.length>1&&o.setAttributes(f)}}(o,u,d,e)}(e,t))}((0,o.nx)(),u.concat(d.takeRecords()),e,n,s),c=[]}const{throttled:f,cancel:g}=(0,Z.n)(u,16,{leading:!1});return{addMutations(e){0===c.length&&(t=(0,bt.BB)(f,{timeout:100}));for(const t of e)c.push(t)},flush:u,stop(){t(),g()}}}(),d=new c((0,vt.dm)(u.addMutations));return d.observe(t,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop(){d.disconnect(),u.stop()},flush(){u.flush()}}}const wt=["clearRect","fillRect","strokeRect","fill","stroke","fillText","strokeText","drawImage","putImageData","drawFocusIfNeeded","reset"];function St(t){if(!t.configuration.sessionReplayCanvasRecording?.enable||0===t.configuration.sessionReplayCanvasRecording.maxFramesPerSecond||"undefined"==typeof CanvasRenderingContext2D)return{stop:Z.l};const e=[];return wt.forEach(n=>{e.push((0,dt.H7)(CanvasRenderingContext2D.prototype,n,({target:e,onPostCall:n})=>{n(()=>{void 0!==t.nodeIds.get(e.canvas)&&t.canvasManager.markCanvasDirty(e.canvas)})}))}),{stop:()=>e.forEach(t=>t.stop())}}function kt(t){const{emitRecord:e,emitStats:n,configuration:r,lifeCycle:i}=t;if(!e||!n)throw Error("emit functions are required");const s=n=>{e(n),(0,K.b)("record",{record:n});const r=t.viewHistory.findView();Q.$1(r.id)},a=function(){const t=new Set;return{clearDirtyCanvases(){return t.clear()},getDirtyCanvases(){const e=[];return t.forEach(n=>{n.isConnected?e.push(n):t.delete(n)}),e},isCanvasDirty(e){return t.has(e)},markCanvasClean(e){return t.delete(e)},markCanvasDirty(e){e.isConnected&&t.add(e)}}}(),c=((t,e)=>{const n=new Map;return{addShadowRoot(r,o){if(n.has(r))return;const i=_t(r,t,e,o),s=gt(r,t,e,o),a=st(r,t,o);n.set(r,{flush(){return i.flush()},stop(){i.stop(),s.stop(),a.stop()}})},removeShadowRoot(t){const e=n.get(t);e&&(e.stop(),n.delete(t))},stop(){n.forEach(({stop:t})=>t())},flush(){n.forEach(({flush:t})=>t())}}})(s,n),u=function(t,e,n,r){const o=x(1),i=x(0),s=function(){let t=0,e=E();const n=t=>e[t.role][t.string];return{clear(){0!==t&&(e=E(),t=0)},get:n,getOrInsert(r){let o=n(r);return void 0===o&&(o=t++,e[r.role][r.string]=o),o},get size(){return t-0}}}(),a=x(0),c={resetIds(){c.eventIds.clear(),c.nodeIds.clear(),c.stringIds.clear(),c.styleSheetIds.clear()},canvasManager:t,configuration:e,elementsScrollPositions:n,eventIds:o,nodeIds:i,shadowRootsController:r,stringIds:s,styleSheetIds:a};return c}(a,r,function(){const t=new WeakMap;return{set(e,n){(e!==document||document.scrollingElement)&&t.set(e===document?document.scrollingElement:e,n)},get:e=>t.get(e),has:e=>t.has(e)}}(),c),{stop:d}=function(t,e,n,r,i){H((0,o.nx)(),0,e,n,i);const{unsubscribe:s}=t.subscribe(2,t=>{r(),H(t.startClocks.timeStamp,1,e,n,i)});return{stop:s}}(i,s,n,l,u);function l(){c.flush(),f.flush()}const f=_t(document,s,n,u),p=[f,nt(s,u),it(s,u),st(document,s,u),at(s),gt(document,s,n,u),ut(s,u),lt(s,u),pt(s),ct(s),mt(i,s,l),St(u)];return{stop(){c.stop(),p.forEach(t=>t.stop()),d()},flushMutations:l,shadowRootsController:c}}},728(t,e,n){let r;function o(t){return u(t).segments_count}function i(t){u(t).segments_count+=1}function s(t){u(t).records_count+=1}function a(t,e){u(t).segments_total_raw_size+=e}function c(t){return r?.get(t)}function u(t){let e;return r||(r=new Map),r.has(t)?e=r.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},r.set(t,e),r.size>1e3&&function(){if(!r)return;const t=r.keys().next().value;t&&r.delete(t)}()),e}n.d(e,{$1:()=>s,H5:()=>i,K_:()=>o,L7:()=>a,lv:()=>c})},979(t,e,n){n.d(e,["Cj",0,{Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},"GE",0,{MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},"JQ",0,{AddString:0,AddNode:1,RemoveNode:2,Attribute:3,Text:4,Size:5,ScrollPosition:6,AddStyleSheet:7,AttachedStyleSheets:8,MediaPlaybackState:9,VisualViewport:10,AddRoleAnnotatedStrings:11,InputValue:12,InputSelection:13,ClearStrings:14},"KN",0,{V1:0,Change:1},"WW",0,{Selected:0,Deselected:1,Indeterminate:2},"_o",0,{Default:0,NodeName:1,AttributeName:2,AttributeValue:3,TextContent:4,FormInput:5,Css:6,Url:7},"ee",0,{FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9,Change:12},"xQ",0,{Play:0,Pause:1}])},5119(t,e,n){n.d(e,{ab:()=>o});var r=n(7472);function o(){let t=[];return{register(e){return t.push(e),{unregister(){t=t.filter(t=>t!==e)}}},trigger(e){const n=[];for(const r of t){const t=r(e);if(t===i)return i;t!==s&&n.push(t)}return(0,r.kg)(...n)}}}const i="DISCARDED",s="SKIPPED";n.d(e,["$O",0,s,"ug",0,i])},8333(t,e,n){n.d(e,{$S:()=>u,A3:()=>h,FR:()=>f,Gw:()=>c,M8:()=>d,Oc:()=>l,Zj:()=>a,_O:()=>g,d6:()=>m,jR:()=>p,nx:()=>i,uc:()=>v,vk:()=>s,x3:()=>o});const r=31536e6;function o(){return(new Date).getTime()}function i(){return o()}function s(t,e){return e-t}function a(t){return"number"!=typeof t?t:Math.round(1e6*t)}function c(t,e){return t+e}function u(){return performance.now()}function d(){return{relative:u(),timeStamp:i()}}function l(){return{relative:0,timeStamp:v()}}function f(t){return{relative:t,timeStamp:b(t)}}function p(t){return{relative:m(t),timeStamp:t}}function m(t){return t-v()}function h(t){return t<r}function g(){return Math.round(o()-c(v(),performance.now()))}let y;function v(){return void 0===y&&(y=performance.timing?.navigationStart??performance.timeOrigin),y}function b(t){const e=o()-performance.now();return e>v()?Math.round(c(e,t)):function(t){return Math.round(c(v(),t))}(t)}n.d(e,["$H",0,r,"MA",0,36e5])},5387(t,e,n){n.d(e,{Hg:()=>c,np:()=>a,ns:()=>s});var r=n(8333),o=n(9164),i=n(8383);function s(t,e,n){return{build(r,o){return c({proxy:t.proxy,site:t.site,path:"/api/v2/"+e,parameters:u(t,e,r,o,n)})},trackType:e}}function a({replica:t,proxy:e,source:n},r){if(t)return s({clientToken:t.clientToken,proxy:e,source:n,site:i.NW},r,"rum"===r?["application.id="+t.applicationId]:void 0)}function c({proxy:t,site:e=i.NW,path:n,parameters:r="",subdomain:s}){let a=n;if(r&&(a+="?"+r),"string"==typeof t){let e=`${(0,o.l2)(t)}?ddforward=${encodeURIComponent(a)}`;return s&&(e+="&ddforwardSubdomain="+s),e}if("function"==typeof t)return t({path:n,parameters:r,subdomain:s});const c=e.split("."),u=c.pop();let d=`browser-intake-${c.join("-")}.${u}`;return s&&(d=`${s}.${d}`),`https://${d}${a}`}function u({clientToken:t,source:e="browser"},n,o,{retry:i,encoding:s},a=[]){const c=["ddsource="+e,"dd-api-key="+t,"dd-evp-origin-version="+encodeURIComponent("7.11.0"),"dd-evp-origin=browser","dd-request-id="+d()].concat(a);return s&&c.push("dd-evp-encoding="+s),"rum"===n&&(c.push("batch_time="+(0,r.nx)(),"_dd.api="+o),i&&c.push("_dd.retry_count="+i.count,"_dd.retry_after="+i.lastFailureStatus)),c.join("&")}function d(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,d)}},8383(t,e,n){n.d(e,{wo:()=>o});const r=["ddsource","dd-api-key","dd-request-id"];function o(t){return r.every(e=>t.includes(e))}n.d(e,["Bb",0,"datad0g.com","KG",0,"us2.ddog-gov.com","NW",0,"datadoghq.com","R8",0,"ddog-gov.com","dV",0,"datadoghq.eu"])},8789(t,e,n){n.d(e,{N:()=>i,p:()=>o});let r=!1;function o(t){r=t}function i(){return r}},1864(t,e,n){n.d(e,{XH:()=>i});const r=console,o={log:r.log,debug:r.debug,info:r.info,warn:r.warn,error:r.error};function i(t){return{debug:o.debug.bind(r,t),log:o.log.bind(r,t),info:o.info.bind(r,t),warn:o.warn.bind(r,t),error:o.error.bind(r,t)}}n.d(e,["JZ",0,r,"bP",0,{log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},"fH",0,"https://docs.datadoghq.com","xG",0,"More details:"])},2128(t,e,n){const r=globalThis,o="WorkerGlobalScope"in r;n.d(e,["J",0,r,"W",0,o])},7472(t,e,n){n.d(e,{Go:()=>s,kg:()=>a});var r=n(8307);function o(t,e){return i(t,e,function(){const t=new WeakSet;return{hasAlreadyBeenSeen(e){const n=t.has(e);return n||t.add(e),n}}}())}function i(t,e,n){if(void 0===e)return t;if("object"!=typeof e||null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return RegExp(e.source,e.flags);if(n.hasAlreadyBeenSeen(e))return;if(Array.isArray(e)){const r=Array.isArray(t)?t:[];for(let t=0;t<e.length;++t)r[t]=i(r[t],e[t],n);return r}const o="object"===(0,r.Pw)(t)?t:{};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&"__proto__"!==t&&(o[t]=i(o[t],e[t],n));return o}function s(t){return o(void 0,t)}function a(...t){let e;for(const n of t)null!=n&&(e=o(e,n));return e}},8307(t,e,n){function r(t){return null===t?"null":Array.isArray(t)?"array":typeof t}function o(t){return"object"===r(t)}function i(t){return"number"==typeof t&&t>=0&&t<=100}function s(t){return"string"==typeof t||t instanceof RegExp||"function"==typeof t}n.d(e,{OE:()=>o,Pw:()=>r,Vl:()=>s,fp:()=>i})},9164(t,e,n){n.d(e,{AY:()=>i,L2:()=>s,c$:()=>a,l2:()=>o});var r=n(2128);function o(t){return a(t,r.J.document?.baseURI??r.J.location?.href).href}function i(t){try{return!!a(t)}catch{return!1}}function s(t){const e=a(t).pathname;return"/"===e[0]?e:"/"+e}function a(t,e){const n=function(){if(!c){let t=!1;try{t="http://a/b"===new r.J.URL("b","http://a").href}catch{}c=t?r.J.URL:function(){if(!u){let t,e;try{t=document.createElement("iframe"),t.style.display="none",document.body.appendChild(t),e=t.contentWindow??r.J}catch{e=r.J}u={URL:e.URL},t?.remove()}return u}().URL}return c}();try{return void 0!==e?new n(t,e):new n(t)}catch(t){throw Error("Failed to construct URL: "+t)}}let c,u}};const e={};function n(r){const o=e[r];if(void 0!==o)return o.exports;const i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.m=t,n.d=(t,e)=>{if(Array.isArray(e))for(var r=0;r<e.length;){var o=e[r++],i=e[r++];n.o(t,o)?0===i&&r++:Object.defineProperty(t,o,0===i?{enumerable:!0,value:e[r++]}:{enumerable:!0,get:i})}else for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.f={},n.e=t=>Promise.all(Object.keys(n.f).reduce((e,r)=>(n.f[r](t,e),e),[])),n.u=t=>"chunks/"+t+"-"+{datadogRecorder:"45abbe958d6aa05af20d",datadogProfiler:"7cb985d2515d29fe6c9e"}[t]+"-datadog-rum-shopify.js",n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{const t={main:0},e=e=>{let{__webpack_esm_ids__:r,__webpack_esm_modules__:o,__webpack_esm_runtime__:i}=e;var s,a,c=0;for(s in o)n.o(o,s)&&(n.m[s]=o[s]);for(i&&i(n);c<r.length;c++)a=r[c],n.o(t,a)&&t[a]&&t[a][0](),t[r[c]]=0};n.f.j=(r,o)=>{let i=n.o(t,r)?t[r]:void 0;if(0!==i)if(i)o.push(i[1]);else{let s=import("./"+n.u(r)).then(e,e=>{throw 0!==t[r]&&(t[r]=void 0),e});s=Promise.race([s,new Promise(e=>i=t[r]=[e])]),o.push(i[1]=s)}}})();var r=n(2128),o=n(5021),i=n(4512),s=(n(7163),n(9305)),a=n(2729),c=n(728),u=n(3236),d=n(2223),l=n(4490),f=n(9671),p=n(5648),m=n(7003),h=n(1864);function g({configuredUrl:t,error:e,source:n,scriptType:r}){if(p.V.error(`${n} failed to start: an error occurred while initializing the ${r}:`,e),e instanceof Event||e instanceof Error&&((o=e.message).includes("Content Security Policy")||o.includes("requires 'TrustedScriptURL'"))){let e;e=t?`Please make sure the ${r} URL ${t} is correct and CSP is correctly configured.`:"Please make sure CSP is correctly configured.",p.V.error(`${e} See documentation at ${h.fH}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else"worker"===r&&(0,m.VJ)(e);var o}function y(t){return new Worker(t.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t?.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},D=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},M=!1,j=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},C=j,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),O=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},T={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=C,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=T[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?j(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=O(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t?.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){M||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),M=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t?.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra?.length&&(Z(r,255&r.gzhead.extra.length),Z(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):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=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)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=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)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t?.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(T[n]);if(t.header&&(e=this.strm,a=t.header,e?.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t?.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(T[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch{t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"7.11.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=(new TextEncoder).encode(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let v={status:0};function b(){return v.status}function _(t,e,n,r){1===v.status||0===v.status?(g({configuredUrl:t.workerUrl,error:n,source:e,scriptType:"worker"}),1===v.status&&v.initializationFailureCallbacks.forEach(t=>t()),v={status:2}):(0,m.VJ)(n,{worker_version:3===v.status&&v.version,stream_id:r})}var w=n(1996),S=n(7409),k=n(6447),x=n(8333);async function E(){try{return await(0,l.B)(C)()}catch(t){g({error:t,source:"Recorder",scriptType:"module"})}}async function C(){return(await n.e("datadogRecorder").then(n.bind(n,5543))).startRecording}async function A(t,e,n){try{return await n}finally{t.notify(e)}}var T=n(4215);function I(){return void 0!==r.J.Profiler}var R=n(5119);async function O(){try{return await(0,l.B)(N)()}catch(t){g({error:t,source:"Profiler",scriptType:"module"})}}async function N(){return(await n.e("datadogProfiler").then(n.bind(n,7492))).createRumProfiler}const M=/\/(([a-z]{2}(-[a-z0-9]+)?)\/)?(checkouts?)(\/|$)/i;function P(t,e){e&&(e.subscribe("page_viewed",e=>{const n=e.context?.document?.location?.href;n&&M.test(n)&&t.startView({url:n})}),e.subscribe("clicked",e=>{const n=e.data?.element,r=n?.id??"element-without-id";t.startAction(r,{type:"click"}),t.stopAction(r,{type:"click"})}),e.subscribe("ui_extension_errored",e=>{const n=e.data?.error,r=Error(n?.message);r.stack=n?.trace,t.addError(r,{extensionName:n?.extensionName,extensionTarget:n?.extensionTarget,extensionErrorType:n?.type,appId:n?.appId,appName:n?.appName,appVersion:n?.appVersion})}))}function D(){V(r.J,"cookieStore"),V(navigator,"locks"),Object.defineProperty(document,"hasFocus",{value:()=>!0,configurable:!0,writable:!0})}function V(t,e){Object.defineProperty(t,e,{value:void 0,configurable:!0,writable:!0})}const L=r.J,$=function(t){const e=t.init.bind(t);return t.init=function(n){if("shopifyAnalytics"in n&&n.shopifyAnalytics){const{shopifyAnalytics:r,...o}=n;return(0,l.B)(D)(),(0,l.B)(P)(t,r),e({...o,trackViewsManually:!0,sessionReplaySampleRate:0,profilingSampleRate:0,trackUserInteractions:!1,trackResources:!1,trackLongTasks:!1,sessionPersistence:"cookie"})}return e(n)},t}((0,i.AB)(function(){if((0,s.d0)()&&!(0,s.Ww)("records"))return{start:a.l,stop:a.l,getReplayStats(){},onRumStart:a.l,isRecording:()=>!1,getSessionReplayLink(){}};let{strategy:t,shouldStartImmediately:e}=function(){let t=0;return{strategy:{start(){t=1},stop(){t=2},isRecording(){return!1},getSessionReplayLink:a.l},shouldStartImmediately:e=>1===t||0===t&&!e.startSessionReplayRecordingManually}}();return{start:e=>t.start(e),stop:()=>t.stop(),getSessionReplayLink:()=>t.getSessionReplayLink(),onRumStart(n,r,o,s,c,h){let g;t=function(t,e,n,r,o,s){let c,u=0;e.subscribe(10,()=>{2!==u&&3!==u||(p(),u=1)}),e.subscribe(11,()=>{1===u&&f()});const d=new w.cP;!function(t,e){if(!t.metricsEnabled)return{stop:a.l};let n,r,o;const{unsubscribe:i}=e.subscribe(t=>{switch(t.type){case"start":n={forced:t.forced,timestamp:(0,x.nx)()},r=void 0,o=void 0;break;case"document-ready":n&&(r=(0,x.vk)(n.timestamp,(0,x.nx)()));break;case"recorder-settled":n&&(o=(0,x.vk)(n.timestamp,(0,x.nx)()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":i(),n&&(0,m.Gk)("Recorder init metrics",{metrics:(e=n.forced,s=o,a=(0,x.vk)(n.timestamp,(0,x.nx)()),c=t.type,u=r,{forced:e,loadRecorderModuleDuration:s,recorderInitDuration:a,result:c,waitForDocReadyDuration:u})})}var e,s,a,c,u})}(s,d);const l=async i=>{d.notify({type:"start",forced:i});const[a]=await Promise.all([A(d,{type:"recorder-settled"},E()),A(d,{type:"document-ready"},(0,S.N)("interactive"))]);if(2!==u)return void d.notify({type:"aborted"});if(!a)return u=0,void d.notify({type:"recorder-load-failed"});const l=o();if(!l)return u=0,void d.notify({type:"deflate-encoder-load-failed"});({stop:c}=a(e,t,n,r,l,s)),u=3,d.notify({type:"succeeded"})};function f(e){const r=n.findTrackedSession(),o=r?(0,i.K$)(r,t):void 0;if(!function(t,e){return void 0!==t&&(0!==t||e?.force)}(o,e))return void(u=1);if(function(t){return 2===t||3===t}(u))return;u=2;const s=function(t,e){return e&&e.force&&0===t}(o,e)||!1;l(s).catch(k.Dx),s&&n.updateSessionState({forcedReplay:"1"})}function p(){3===u&&c?.(),u=0}return{start:f,stop:p,getSessionReplayLink:()=>function(t,e,n,r){const o=e.findTrackedSession(),s=function(t,e,n){return e?0===(0,i.K$)(e,t)?"incorrect-session-plan":n?void 0:"replay-not-started":"rum-not-tracked"}(t,o,r),a=n.findView();return(0,i.dx)(t,{viewContext:a,errorType:s,session:o})}(t,n,r,0!==u),isRecording(){return 3===u}}}(r,n,o,s,function(){return g||(c??(c=function(e){switch(0===v.status&&function(t,e){try{const n=(0,l.B)(y)(t),{stop:r}=(0,u.q2)(n,"error",n=>{_(t,e,n)}),{stop:o}=(0,u.q2)(n,"message",({data:n})=>{var r;"errored"===n.type?_(t,e,n.error,n.streamId):"initialized"===n.type&&(r=n.version,1===v.status&&(v={status:3,worker:v.worker,stop:v.stop,version:r}))});n.postMessage({action:"init"}),(0,f.wg)(()=>function(t){1===v.status&&(p.V.error(t+" failed to start: a timeout occurred while initializing the Worker"),v.initializationFailureCallbacks.forEach(t=>t()),v={status:2})}(e),3e4),v={status:1,worker:n,stop(){r(),o()},initializationFailureCallbacks:[]}}catch(n){_(t,e,n)}}(e,"Datadog Session Replay"),v.status){case 1:return v.initializationFailureCallbacks.push(()=>t.stop()),v.worker;case 3:return v.worker}}(r)),c&&(g=function(t){let e,n=0,r=[],o=!0,i=0;const s=[],{stop:a}=(0,u.q2)(t,"message",({data:t})=>{if("wrote"!==t.type||1!==t.streamId)return;const o=s[0];o&&(o.id===t.id?(s.shift(),n+=t.additionalBytesCount,r.push(t.result),e=t.trailer,o.writeCallback?o.writeCallback(t.result.byteLength):o.finishCallback&&o.finishCallback()):o.id<t.id&&a())});function c(){const t=0===r.length?new Uint8Array(0):(0,d.wh)(r.concat(e)),o={rawBytesCount:n,output:t,outputBytesCount:t.byteLength,encoding:"deflate"};return n=0,r=[],o}function l(){o||(t.postMessage({action:"reset",streamId:1}),o=!0)}return{isAsync:!0,get isEmpty(){return o},write(e,n){t.postMessage({action:"write",id:i,data:e,streamId:1}),s.push({id:i,writeCallback:n,data:e}),o=!1,i+=1},finish(t){l(),s.length?(s.forEach(t=>{delete t.writeCallback}),s[s.length-1].finishCallback=()=>t(c())):t(c())},finishSync(){l();const t=s.map(t=>t.data).join("");return s.length=0,{...c(),pendingData:t}},estimateEncodedBytesCount:t=>t.length/8,stop(){a()}}}(c))),g},h),e(r)&&t.start()},isRecording:()=>3===b()&&t.isRecording(),getReplayStats:t=>3===b()?(0,c.lv)(t):void 0}}(),function(){let t;return{onRumStart(e,n,r,o,a,c){const u=o.findTrackedSession();if(!u)return;if(!function(t,e){return(0,s.d0)()?(0,s.Ww)("profiles"):(0,T.$5)(e.id,(0,T.it)(t.sessionSampleRate,t.profilingSampleRate))}(r,u))return;const d=function(t){let e={status:"starting"};return t.assemble.register(({eventType:t})=>t!==i.bb.VIEW&&t!==i.bb.LONG_TASK&&t!==i.bb.ACTION&&t!==i.bb.VITAL?R.$O:{type:t,_dd:{profiling:e}}),{get(){return e},set(t){e=t}}}(n);(0,l.B)(I)()?(0,l.B)(O)().then(n=>{n?(t=n(r,e,o,d,c,a,void 0),t.start()):d.set({status:"error",error_reason:"failed-to-lazy-load"})}).catch(k.Dx):d.set({status:"error",error_reason:"not-supported-by-browser"})},stop(){t?.stop()}}}(),{sdkName:"rum-shopify"}));(0,o.Z)(L,"DD_RUM",$)})();
1
+ (()=>{var t={5021(t,e,n){n.d(e,{Z:()=>a,m:()=>s});var r=n(8789),o=n(4993),i=n(5648);function s(t){const e={version:"7.12.0",onReady(t){t()},...t};return Object.defineProperty(e,"_setDebug",{get(){return r.p},enumerable:!1}),e}function a(t,e,n){const r=t[e];r&&!r.q&&r.version&&i.V.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),t[e]=n,r?.q&&r.q.forEach(t=>(0,o.y)(t,"onReady callback threw an error:")())}},3236(t,e,n){n.d(e,{BX:()=>c,fK:()=>d,lQ:()=>a,q2:()=>s});var r=n(6447),o=n(4467),i=n(2729);function s(t,e,n,r){return a(t,[e],n,r)}function a(t,e,n,{once:i,capture:s,passive:a}={}){const c=(0,r.dm)(t=>{(t.isTrusted||t.__ddIsTrusted||!1!==u)&&(i&&p(),n(t))}),d=a?{capture:s,passive:a}:s,l=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,f=(0,o.W)(l,"addEventListener");function p(){const n=(0,o.W)(l,"removeEventListener");e.forEach(e=>n.call(t,e,c,d))}return e.forEach(e=>f.call(t,e,c,d)),{stop:p}}function c(t,e){if(!t)return!1;try{return s(t,e,i.l).stop(),!0}catch{return!1}}let u;function d(t){!0!==u&&(u=t??!1)}},465(t,e,n){n.d(e,{h:()=>i});var r=n(2128),o=n(4467);function i(t,e){return(0,o.W)(r.J,"fetch")(t,e)}},6448(t,e,n){n.d(e,{Kp:()=>u,_T:()=>c});var r=n(2128),o=n(1996),i=n(8424),s=n(3236);const a={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function c(){return new o.cP(t=>{const e=r.J.window;if(!e)return;const{stop:n}=(0,s.lQ)(e,["visibilitychange","freeze"],e=>{"visibilitychange"===e.type&&"hidden"===document.visibilityState?t.notify({reason:a.HIDDEN}):"freeze"===e.type&&t.notify({reason:a.FROZEN})},{capture:!0}),o=(0,s.q2)(e,"beforeunload",()=>{t.notify({reason:a.UNLOADING})}).stop;return()=>{n(),o()}})}function u(t){return(0,i.KQ)(a).includes(t)}n.d(e,["y5",0,a])},7409(t,e,n){n.d(e,{H:()=>i,N:()=>s});var r=n(2729),o=n(3236);function i(t,e){if(document.readyState===t||"complete"===document.readyState)return e(),{stop:r.l};const n="complete"===t?"load":"DOMContentLoaded";return(0,o.q2)(window,n,e,{once:!0})}function s(t){return new Promise(e=>{i(t,e)})}},64(t,e,n){n.d(e,{q:()=>o});var r=n(2128);function o(){const{navigator:t}=r.J;return{status:t?.onLine?"connected":"not_connected",interfaces:t?.connection?.type?[t.connection.type]:void 0,effective_type:t?.connection?.effectiveType}}},4023(t,e,n){n.d(e,["g",0,{AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"}])},1468(t,e,n){function r(t){try{return t instanceof Error||"[object Error]"===Object.prototype.toString.call(t)}catch{return!1}}n.d(e,{b:()=>r}),n.d(e,["e",0,"No stack, consider using an instance of Error"])},4215(t,e,n){function r(t,e){return t*e/100}n.d(e,{$5:()=>i,it:()=>r});const o=new Map;function i(t,e){if(100===e)return!0;if(0===e)return!1;const n=o.get(e);if(t===n?.sessionId)return n.decision;const r=function(t,e){const n=1n<<64n;return Number(1111111111111111111n*t%n)<=e/100*Number(n)}(BigInt("0x"+t.split("-")[4]),e);return o.set(e,{sessionId:t,decision:r}),r}},603(t,e,n){var r=n(8333);const o=4*r.MA,i=r.$H;n.d(e,["AQ",0,o,"HB",0,9e5,"Q_",0,{COOKIE:"cookie",MEMORY:"memory",LOCAL_STORAGE:"local-storage"},"_P",0,i])},8032(t,e,n){n.d(e,{Jv:()=>d,yN:()=>l});var r=n(2128),o=n(7286),i=n(7003);const s=new Map,a=new Set;let c=!1;function u(){const t=r.J.window?.DD_SOURCE_CODE_CONTEXT;if(!t)return;let e=!1,n=!1,u=!1;for(const[r,i]of Object.entries(t)){if(e=e||void 0!==i.ddDebugId,n=n||void 0!==i.service,u=u||void 0!==i.version,a.has(r))continue;a.add(r);const t=(0,o.T)({stack:r}).stack[0]?.url;t&&!s.has(t)&&s.set(t,i)}c||(c=!0,(0,i.Q6)({feature:"source-code-context",use_debug_id:e,use_service:n,use_version:u}))}function d(t){u();const e=new Set,n=[];for(const r of t){if(e.has(r))continue;e.add(r);const t=s.get(r)?.ddDebugId;void 0!==t&&n.push({url:r,id:t})}return n.length?n:void 0}function l(t){return u(),s.get(t)}},98(t,e,n){n.d(e,{m5:()=>i});var r=n(1864),o=n(5648);function i(t){const{env:e,service:n,version:r,datacenter:o,sdkVersion:i,variant:a}=t,c=[s("sdk_version",i??"7.12.0")];return e&&c.push(s("env",e)),n&&c.push(s("service",n)),r&&c.push(s("version",r)),o&&c.push(s("datacenter",o)),a&&c.push(s("variant",a)),c}function s(t,e){const n=e?`${t}:${e}`:t;return(n.length>200||function(t){return RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(t)}(n))&&o.V.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${r.xG} ${r.fH}/getting_started/tagging/#defining-tags`),function(t){return t.replace(/,/g,"_")}(n)}},7003(t,e,n){n.d(e,{Rr:()=>D,A2:()=>M,VJ:()=>P,Gk:()=>V,Q6:()=>L,a5:()=>N});var r=n(8333),o=n(7472),i=n(2128),s=n(8789),a=n(5119);function c(t){return 0!==t&&100*Math.random()<=t}var u=n(8383),d=n(5387),l=n(1468),f=n(4021),p=n(8925),m=n(98),h=n(1996),g=n(6447),y=n(5648),v=n(350),b=n(3487),_=n(7286),w=n(64),S=n(9305),k=n(6625),x=n(2729);const E="log",C="configuration",A="usage",T=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],I=[u.R8,u.KG];let R;function O(){return R||(R=new h.dX(100)),R}function N(t,e,n,s){const l=new h.cP,{enabled:f,metricsEnabled:y}=function(t,e,n,s,u,d=1,l=15){const f={},h=!I.includes(e.site)&&c(e.telemetrySampleRate),y={[E]:h,[C]:h&&c(e.telemetryConfigurationSampleRate),[A]:h&&c(e.telemetryUsageSampleRate),metric:h&&c(d)},_={is_local_file:"file:"===i.J.location?.protocol,is_worker:i.W},S=O();return S.subscribe(({rawEvent:i,metricName:c})=>{if(c&&!y.metric||!y[i.type])return;const d=c||i.status||i.type;let h=f[d];if(h||(h=f[d]=new Set),h.size>=l)return;const g=(0,b.s)(i);if(h.has(g))return;const S=n.trigger({startTime:(0,r.M8)().relative});if(S===a.ug)return;const k=function(t,n,i,s){const a={type:"telemetry",date:(0,r.M8)().timeStamp,service:n,version:"7.12.0",source:"browser",_dd:{format_version:2},telemetry:(0,o.kg)(i,{runtime_env:s,connectivity:(0,w.q)(),sdk_setup:"cdn",sdk_name:u}),ddtags:(0,m.m5)(e).join(","),experimental_features:Array.from((0,p.q7)())};return(0,o.kg)(a,t)}(S,t,i,_);s.notify(k),(0,v.b)("telemetry",k),h.add(g)}),S.unbuffer(),(0,g.Bd)(P),{enabled:h,metricsEnabled:y.metric}}(t,e,n,l,s),{stop:_}=function(t,e){const n=[];if((0,S.d0)()){const t=(0,S.Y9)(),r=e.subscribe(e=>t.send("internal_telemetry",e));n.push(r.unsubscribe)}else{const r=[(0,d.ns)(t,"rum")],o=(0,d.np)(t,"rum");o&&function(t){return t.site===u.Bb}(t)&&r.push(o);const i=(0,k.X)({endpoints:r,reportError:x.l});n.push(i.stop);const s=e.subscribe(i.add);n.push(s.unsubscribe)}return{stop:()=>n.forEach(t=>t())}}(e,l);return{stop:_,enabled:f,metricsEnabled:y}}function M(t,e){(0,s.N)()&&y.V.debug("[Telemetry]",t,e),O().notify({rawEvent:{type:E,message:t,status:"debug",...e}})}function P(t,e){O().notify({rawEvent:{type:E,status:"error",...$(t),...e}})}function D(t){O().notify({rawEvent:{type:C,configuration:t}})}function V(t,e){O().notify({rawEvent:{type:E,message:t,status:"debug",...e},metricName:t})}function L(t){O().notify({rawEvent:{type:A,usage:t}})}function $(t){if((0,l.b)(t)){const e=(0,_.T)(t);return{error:{kind:e.name,stack:(0,f.Yn)(U(e))},message:e.message}}return{error:{stack:l.e},message:"Uncaught "+(0,b.s)(t)}}function U(t){return t.stack=t.stack.filter(t=>!t.url||T.some(e=>t.url.startsWith(e))),t}},4993(t,e,n){n.d(e,{y:()=>o});var r=n(5648);function o(t,e){return(...n)=>{try{return t(...n)}catch(t){r.V.error(e,t)}}}},5648(t,e,n){var r=n(1864);const o=(0,r.XH)("Datadog Browser SDK:"),i=r.fH+"/real_user_monitoring/browser/troubleshooting";n.d(e,["V",0,o,"X",0,i])},7522(t,e,n){n.d(e,{N:()=>o});var r=n(2223);function o(){let t="",e=0;return{isAsync:!1,get isEmpty(){return!t},write(n,o){const i=(0,r.WW)(n);e+=i,t+=n,o&&o(i)},finish(t){t(this.finishSync())},finishSync(){const n={output:t,outputBytesCount:e,rawBytesCount:e,pendingData:""};return t="",e=0,n},estimateEncodedBytesCount(t){return t.length}}}},8925(t,e,n){n.d(e,{Aq:()=>s,R9:()=>r,q7:()=>c,sr:()=>a});var r,o=n(9056);!function(t){t.SESSION_REPLAY_RECORD_CANVAS="session_replay_record_canvas",t.TRACK_INTAKE_REQUESTS="track_intake_requests",t.TRACK_WEBSOCKETS="track_websockets"}(r||(r={}));const i=new Set;function s(t){Array.isArray(t)&&t.filter(t=>(0,o.Rj)(r,t)).forEach(t=>{i.add(t)})}function a(t){return i.has(t)}function c(){return i}},4467(t,e,n){n.d(e,{W:()=>o});var r=n(2128);function o(t,e){const n=r.J;let o;return n.Zone&&"function"==typeof n.Zone.__symbol__&&(o=t[n.Zone.__symbol__(e)]),o||(o=t[e]),o}},3444(t,e,n){n.d(e,{H7:()=>a,my:()=>c,tv:()=>l});var r=n(9671),o=n(6447),i=n(2729),s=n(4021);function a(t,e,n,{computeHandlingStack:r}={}){let o=t[e];if("function"!=typeof o){if(!(e in t)||"string"!=typeof e||!e.startsWith("on"))return{stop:i.l};o=i.l}let a=!1;const{stop:c}=u(t,e,o,function(){if(a)return o.apply(this,arguments);const t=Array.from(arguments);return d(n,{target:this,parameters:t,handlingStack:r?(0,s.uC)("instrumented method"):void 0},()=>o.apply(this,t))});return{stop(){a=!0,c()}}}function c(t,e,n,{computeHandlingStack:r}={}){const o=t[e];if("function"!=typeof o)return{stop:i.l};let a=!1;const c=function(){if(!new.target)return Reflect.apply(o,this,Array.from(arguments));const t=new.target===c?o:new.target;if(a)return Reflect.construct(o,arguments,t);const e=Array.from(arguments);return d(n,{parameters:e,handlingStack:r?(0,s.uC)("instrumented constructor"):void 0},()=>Reflect.construct(o,e,t))},l=function(t,e){for(const n of[].concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)))Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n));const{stop:n}=u(e.prototype,"constructor",e.prototype.constructor,t);return n}(c,o),{stop:f}=u(t,e,o,c);return{stop(){a=!0,l(),f()}}}function u(t,e,n,r){return t[e]=r,{stop(){t[e]===r&&(t[e]=n)}}}function d(t,e,n){let r;(0,o.um)(t,null,[{...e,onPostCall(t){r=t}}]);const i=n();return r&&(0,o.um)(r,null,[i]),i}function l(t,e,n){const o=Object.getOwnPropertyDescriptor(t,e);if(!o?.set||!o.configurable)return{stop:i.l};const s=i.l;let a=(t,e)=>{(0,r.wg)(()=>{a!==s&&n(t,e)},0)};const c=function(t){o.set.call(this,t),a(this,t)};return Object.defineProperty(t,e,{set:c}),{stop(){Object.getOwnPropertyDescriptor(t,e)?.set===c&&Object.defineProperty(t,e,o),a=s}}}},4490(t,e,n){function r(t){return t}n.d(e,{B:()=>r}),new Map},6447(t,e,n){n.d(e,{um:()=>c,dm:()=>a,Dx:()=>u,Bd:()=>d});var r=n(8789),o=n(5648);let i;const{monitored:s,monitor:a,callMonitored:c,monitorError:u}=function(t,e){function n(t){return function(...e){return o(t,this,e)}}function o(t,e,n){try{return t.apply(e,n)}catch(t){i(t)}}function i(n){const o=e=>{(0,r.N)()&&t.error("[MONITOR]",e)};o(n);try{e(n)}catch(n){o(n)}}return{monitored(t,e,r){r.value=n(r.value)},monitor:n,callMonitored:o,monitorError:i}}(o.V,t=>i?.(t));function d(t){i=t}},1996(t,e,n){n.d(e,{dX:()=>c,cP:()=>s,Fx:()=>a});var r=n(2128),o=n(6447);function i(t){const e=r.J.queueMicrotask;"function"==typeof e?e((0,o.dm)(t)):Promise.resolve().then((0,o.dm)(t))}class s{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach(e=>e(t))}addObserver(t){this.observers.push(t),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(t){this.observers=this.observers.filter(e=>t!==e),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function a(...t){return new s(e=>{const n=t.map(t=>t.subscribe(t=>e.notify(t)));return()=>n.forEach(t=>t.unsubscribe())})}class c extends s{constructor(t,e){super(),this.maxBufferSize=t,this.onDrop=e,this.buffer=[],this.droppedCount=0}notify(t){this.buffer.push(t),this.buffer.length>this.maxBufferSize&&(this.buffer.shift(),this.droppedCount++),super.notify(t)}subscribe(t){let e=!1;const n={unsubscribe:()=>{e=!0,this.removeObserver(t)}};return i(()=>{for(const n of this.buffer){if(e)return;t(n)}e||this.addObserver(t)}),n}unbuffer(){i(()=>{this.droppedCount>0&&this.onDrop&&this.onDrop(this.droppedCount),this.maxBufferSize=this.buffer.length=0})}}},7922(t,e,n){n.d(e,{BB:()=>s});var r=n(8333),o=n(9671),i=n(6447);function s(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback((0,i.dm)(t),e);return()=>window.cancelIdleCallback(n)}return function(t){const e=(0,r.x3)(),n=(0,o.wg)(()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,50-((0,r.x3)()-e))})},0);return()=>(0,o.DJ)(n)}(t)}},350(t,e,n){n.d(e,{b:()=>o});var r=n(2128);function o(t,e){const n=r.J.__ddBrowserSdkExtensionCallback;n&&n({type:t,payload:e})}},3487(t,e,n){n.d(e,{M:()=>i,s:()=>o});var r=n(2729);function o(t,e,n){if("object"!=typeof t||null===t)return JSON.stringify(t);const r=i(Object.prototype),o=i(Array.prototype),s=i(Object.getPrototypeOf(t)),a=i(t);try{return JSON.stringify(t,e,n)}catch{return"<error: unable to serialize object>"}finally{r(),o(),s(),a()}}function i(t){const e=t,n=e.toJSON;return n?(delete e.toJSON,()=>{e.toJSON=n}):r.l}},7286(t,e,n){n.d(e,{T:()=>i,h:()=>h});var r=n(8307);const o="?";function i(t){const e=[];let n=m(t,"stack");const r=t+"";if(n?.startsWith(r)&&(n=n.slice(r.length)),n&&n.split("\n").forEach(t=>{const n=function(t){const e=c.exec(t);if(!e)return;const n=0===e[2]?.indexOf("native"),r=0===e[2]?.indexOf("eval"),i=u.exec(e[2]);return r&&i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3]),{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||o,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}(t)||function(t){const e=d.exec(t);if(e)return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||o,line:e[3]?+e[3]:void 0,url:e[2]}}(t)||function(t){const e=l.exec(t);if(e)return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||o,line:+e[3],url:e[2]}}(t)||function(t){const e=f.exec(t);if(!e)return;const n=e[3]&&e[3].indexOf(" > eval")>-1,r=p.exec(e[3]);return n&&r&&(e[3]=r[1],e[4]=r[2],e[5]=void 0),{args:e[2]?e[2].split(","):[],column:e[5]?+e[5]:void 0,func:e[1]||o,line:e[4]?+e[4]:void 0,url:e[3]}}(t);n&&(!n.func&&n.line&&(n.func=o),e.push(n))}),e.length>0&&function(){if(void 0!==v)return v;const[t,e]=[class extends Error{constructor(){super(),this.name="Error"}},Error].map(t=>new t);return v=y(Object.getPrototypeOf(t))&&e.stack!==t.stack,v}()&&t instanceof Error){const n=[];let r=t;for(;(r=Object.getPrototypeOf(r))&&y(r);){const t=r.constructor?.name||o;n.push(t)}for(let t=n.length-1;t>=0&&e[0]?.func===n[t];t--)e.shift()}return{message:m(t,"message"),name:m(t,"name"),stack:e}}const s="((?:blob|native|eval|<anonymous>|[a-zA-Z][a-zA-Z0-9+.-]*:\\/\\/|\\w+\\.|\\/).*?)",a="(?::(\\d+))",c=RegExp(`^\\s*at (.*?) ?\\(${s}${a}?${a}?\\)?\\s*$`,"i"),u=RegExp(`\\((\\S*)${a}${a}\\)`),d=RegExp(`^\\s*at\\s*(?:(.*)?(?: @))?\\s*${s}${a}?${a}??\\s*$`,"i"),l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,p=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function m(t,e){return(0,r.OE)(t)&&"string"==typeof t[e]?t[e]:void 0}function h(t,e,n,r){if(void 0===e)return;const{name:o,message:i}=function(t){let e,n;return"[object String]"==={}.toString.call(t)&&([,e,n]=g.exec(t)),{name:e,message:n}}(t);return{name:o,message:i,stack:[{url:e,column:r,line:n}]}}const g=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function y(t){return(t.constructor+"").startsWith("class ")}let v},4021(t,e,n){n.d(e,{NR:()=>a,Yn:()=>s,uC:()=>i});var r=n(6447),o=n(7286);function i(t){const e=Error(t);let n;return e.name="HandlingStack",(0,r.um)(()=>{const t=(0,o.T)(e);t.stack=t.stack.slice(2),n=s(t)}),n}function s(t){let e=a(t);return t.stack.forEach(t=>{const n="?"===t.func?"<anonymous>":t.func,r=t.args&&t.args.length>0?`(${t.args.join(", ")})`:"",o=t.line?":"+t.line:"",i=t.line&&t.column?":"+t.column:"";e+=`\n at ${n}${r} @ ${t.url}${o}${i}`}),e}function a(t){return`${t.name||"Error"}: ${t.message}`}},2423(t,e,n){n.d(e,{Qg:()=>o,yU:()=>i});var r=n(9671);function o(t){return!!t&&"function"==typeof t.then}function i(t,e=3e3){let n;const o=new Promise((t,o)=>{n=(0,r.wg)(()=>o(Error("Timeout")),e)});return Promise.race([t,o]).finally(()=>(0,r.DJ)(n))}},9671(t,e,n){n.d(e,{DJ:()=>a,vG:()=>u,wg:()=>s,yb:()=>c});var r=n(2128),o=n(4467),i=n(6447);function s(t,e){return(0,o.W)(r.J,"setTimeout")((0,i.dm)(t),e)}function a(t){(0,o.W)(r.J,"clearTimeout")(t)}function c(t,e){return(0,o.W)(r.J,"setInterval")((0,i.dm)(t),e)}function u(t){(0,o.W)(r.J,"clearInterval")(t)}},6672(t,e,n){function r(t,e){const n=t.indexOf(e);n>=0&&t.splice(n,1)}function o(t){return Array.isArray(t)&&t.length>0}n.d(e,{Ai:()=>r,EI:()=>o})},2223(t,e,n){n.d(e,{WW:()=>o,wh:()=>i});const r=/[^\u0000-\u007F]/;function o(t){return r.test(t)?(new TextEncoder).encode(t).length:t.length}function i(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}n.d(e,["iH",0,1048576])},2729(t,e,n){n.d(e,{l:()=>i,n:()=>o});var r=n(9671);function o(t,e,n){const o=void 0===n?.leading||n.leading,i=void 0===n?.trailing||n.trailing;let s,a,c=!1;return{throttled(...n){c?s=n:(o?t(...n):s=n,c=!0,a=(0,r.wg)(()=>{i&&s&&t(...s),c=!1,s=void 0},e))},cancel(){(0,r.DJ)(a),c=!1,s=void 0}}}function i(){}},9056(t,e,n){n.d(e,{LG:()=>c,RI:()=>a,Rj:()=>s,XU:()=>o,yG:()=>i});const r=(t,e)=>"__proto__"===t?void 0:e;function o(t){try{return JSON.parse(t,r)}catch{}}function i(t){return{...t}}function s(t,e){return Object.keys(t).some(n=>t[n]===e)}function a(t){return 0===Object.keys(t).length}function c(t,e){const n={};for(const r of Object.keys(t))n[r]=e(t[r]);return n}},8424(t,e,n){function r(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(e(r,n,t))return r}}function o(t){return Object.values(t)}function i(t){return Object.entries(t)}n.d(e,{KQ:()=>o,Uk:()=>r,WP:()=>i})},3472(t,e,n){function r(t){return t>=500}function o(t){try{return t.clone()}catch{return}}n.d(e,{G:()=>r,i:()=>o})},2511(t,e,n){n.d(e,{qj:()=>u});var r=n(8333),o=n(9671),i=n(6672);const s=1/0;let a;const c=new Set;function u({expireDelay:t,maxEntries:e}){let n=[];const u=()=>{if(!t)return;const e=(0,r.$S)()-t;for(;n.length>0&&n[n.length-1].endTime<e;)n.pop()};return t&&(a||(a=(0,o.yb)(()=>{c.forEach(t=>t())},6e4)),c.add(u)),{add(t,r){const o={value:t,startTime:r,endTime:s,remove(){(0,i.Ai)(n,o)},close(t){o.endTime=t}};return e&&n.length>=e&&n.pop(),n.unshift(o),o},find(t=1/0,e={returnInactive:!1}){for(const r of n)if(r.startTime<=t){if(e.returnInactive||t<=r.endTime)return r.value;break}},closeActive(t){const e=n[0];e?.endTime===s&&e.close(t)},findAll(t=1/0,e=0){const o=(0,r.Gw)(t,e);return n.filter(e=>e.startTime<=o&&t<=e.endTime).map(t=>t.value)},findAllEntries(t=1/0,e=0){const o=(0,r.Gw)(t,e);return n.filter(e=>e.startTime<=o&&t<=e.endTime)},getEntries:t=>n.filter(e=>e.startTime===t),reset(){n=[]},stop(){c.delete(u),0===c.size&&a&&((0,o.vG)(a),a=void 0)}}}},6625(t,e,n){n.d(e,{X:()=>y});var r=n(1864),o=n(5648),i=n(8424),s=n(6448),a=n(3487),c=n(7522),u=n(2223),d=n(4490),l=n(1776),f=n(2128),p=n(1996),m=n(9671);const h=f.W?1:50;function g({pageMayExitObservable:t}){let e;const n=new p.cP,r=t.subscribe(t=>{e=t.reason;try{n.notify(t.reason)}finally{e=void 0}c(t.reason)}),o=new p.cP(()=>()=>{r.unsubscribe()});let i,s=0,a=0;function c(t){if(0===a)return;const e=a,n=s;a=0,s=0,(0,m.DJ)(i),i=void 0,o.notify({reason:t,messagesCount:e,bytesCount:n})}return{flushObservable:o,prepareUrgentFlushObservable:n,forceFlush:c,get messagesCount(){return a},notifyBeforeAddMessage(t){s+t>=l.AK&&c(e??"bytes_limit"),a+=1,s+=t,void 0===i&&(i=(0,m.wg)(()=>{c("duration_limit")},3e4))},notifyAfterAddMessage(t=0){s+=t,a>=h?c(e??"messages_limit"):s>=l.AK&&c(e??"bytes_limit")}}}function y({encoder:t=(0,c.N)(),endpoints:e,reportError:n}){const f=(0,d.B)(l.sA)(e,n),p=(0,d.B)(s._T)(),m=(0,d.B)(g)({pageMayExitObservable:p});let h={};const y=m.flushObservable.subscribe(e=>function(e){const n=(0,i.KQ)(h).join("\n");h={};const r=(0,s.Kp)(e.reason),o=r?f.sendOnExit:f.send;if(r&&t.isAsync){const e=t.finishSync();e.outputBytesCount&&o(v(e));const r=[e.pendingData,n].filter(Boolean).join("\n");r&&o({data:r,bytesCount:(0,u.WW)(r)})}else n&&t.write(t.isEmpty?n:"\n"+n),t.finish(t=>{o(v(t))})}(e));function b(e,n){const i=(0,a.s)(e),s=t.estimateEncodedBytesCount(i);s>=262144?o.V.warn(`Discarded a message whose size was bigger than the maximum allowed size 256KiB. ${r.xG} ${o.X}/#technical-limitations`):function(e,n,r){if(void 0!==r){let o;void 0!==h[r]?o=n-t.estimateEncodedBytesCount(h[r]):(m.notifyBeforeAddMessage(n),o=0),h[r]=e,m.notifyAfterAddMessage(o)}else m.notifyBeforeAddMessage(n),t.write(t.isEmpty?e:"\n"+e,t=>{m.notifyAfterAddMessage(t-n)})}(i,s,n)}return{get isEmpty(){return 0===m.messagesCount},add:b,upsert:b,prepareUrgentFlushObservable:m.prepareUrgentFlushObservable,forceFlush:m.forceFlush,flushObservable:m.flushObservable,stop:y.unsubscribe}}function v(t){let e;return e="string"==typeof t.output?t.output:new Blob([t.output],{type:"text/plain"}),{data:e,bytesCount:t.outputBytesCount,encoding:t.encoding}}},9305(t,e,n){n.d(e,{Ww:()=>s,Y9:()=>i,d0:()=>a});var r=n(2128),o=n(5648);function i(){const t=r.J.DatadogEventBridge;if(t)return{getCapabilities(){return JSON.parse(t.getCapabilities?.()||"[]")},getPrivacyLevel(){return t.getPrivacyLevel?.()},getIsTraceSampled(){return JSON.parse(t.getIsTraceSampled?.()||"null")},getAllowedWebViewHosts(){return JSON.parse(t.getAllowedWebViewHosts())},send(e,n,r){const o=r?{id:r}:void 0;t.send(JSON.stringify({eventType:e,event:n,view:o}))}}}function s(t){const e=i();return!!e&&e.getCapabilities().includes(t)}function a(t=r.J.location?.hostname){const e=i();return e?.getAllowedWebViewHosts().some(e=>function(t,e){if(!e.includes("*"))return t===e||t.endsWith("."+e);const n=e.split("*");if(2!==n.length)return o.V.error(`Invalid WebView host pattern "${e}": only one wildcard (*) is supported.`),!1;const[r,i]=n;return t.length>r.length+i.length&&t.startsWith(r)&&t.endsWith(i)}(t,e))??!1}},1776(t,e,n){n.d(e,{AK:()=>h,sA:()=>g});var r=n(465),o=n(6447),i=n(1996),s=n(9671),a=n(2223),c=n(3472);const u=20*a.iH;function d(t,e,n,r,o,i){0===e.transportStatus&&0===e.queuedPayloads.size()&&e.bandwidthMonitor.canHandle(t)?f(t,e,n,i,{onSuccess:()=>p(0,e,n,r,o,i),onFailure(){e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t}),l(e,n,r,o,i)}}):e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t})}function l(t,e,n,r,o){2===t.transportStatus&&(0,s.wg)(()=>{f(t.queuedPayloads.first(),t,e,o,{onSuccess(){t.queuedPayloads.dequeue(),t.currentBackoffTime=1e3,p(1,t,e,n,r,o)},onFailure(){t.currentBackoffTime=Math.min(6e4,2*t.currentBackoffTime),l(t,e,n,r,o)}})},t.currentBackoffTime)}function f(t,e,n,r,{onSuccess:o,onFailure:i}){e.bandwidthMonitor.add(t),n(t,n=>{e.bandwidthMonitor.remove(t),function(t){return"opaque"!==t.type&&(0===t.status&&!navigator.onLine||408===t.status||429===t.status||(0,c.G)(t.status))}(n)?(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:"failure",bandwidth:e.bandwidthMonitor.stats(),payload:t}),i()):(e.transportStatus=0,r.notify({type:"success",bandwidth:e.bandwidthMonitor.stats(),payload:t}),o())})}function p(t,e,n,r,o,i){0===t&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(o(`Reached max ${r} events size queued for upload: ${u/a.iH}MiB`),e.queueFullReported=!0);const s=e.queuedPayloads;for(e.queuedPayloads=m();s.size()>0;)d(s.dequeue(),e,n,r,o,i)}function m(){const t=[];return{bytesCount:0,enqueue(e){return!this.isFull()&&(t.push(e),this.bytesCount+=e.bytesCount,!0)},first(){return t[0]},dequeue(){const e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size(){return t.length},isFull(){return this.bytesCount>=u}}}const h=16384;function g(t,e,n=h){const r=new i.cP,o={transportStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle(t){return 0===this.ongoingRequestCount||this.ongoingByteCount+t.bytesCount<=81920&&this.ongoingRequestCount<32},add(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}},queuedPayloads:m(),queueFullReported:!1};return{observable:r,send(n){for(const i of t)d(n,o,(t,e)=>{b(i,t,e)},i.trackType,e,r)},sendOnExit(e){for(const r of t)y(r,n,e)}}}function y(t,e,n){if(n.bytesCount<e)try{const e=t.build("beacon",n);if(navigator.sendBeacon(e,n.data))return}catch(t){!function(t){v||(v=!0,(0,o.Dx)(t))}(t)}b(t,n)}let v=!1;function b(t,e,n){const i=t.build("fetch",e);(0,r.h)(i,{method:"POST",body:e.data,mode:"cors"}).then((0,o.dm)(t=>n?.({status:t.status,type:t.type}))).catch((0,o.dm)(()=>n?.({status:0})))}},4512(t,e,n){n.d(e,{eT:()=>Lr,o:()=>"***",$m:()=>Dr,NT:()=>Vr,Wd:()=>"hidden",bb:()=>dt,K:()=>lt,do:()=>cr,DL:()=>vt,K$:()=>Oi,wP:()=>Ui,wI:()=>ir,W3:()=>En,PJ:()=>zr,dT:()=>qr,$4:()=>sr,Gn:()=>Qo,zL:()=>Zo,dx:()=>Li,rf:()=>Jr,pB:()=>ti,g1:()=>Xo,nS:()=>nr,XS:()=>rr,p_:()=>or,AB:()=>Di,jR:()=>jr,ei:()=>qn,ap:()=>Fr,Ie:()=>Br});var r=n(8333),o=n(7472),i=n(1996);const s={GRANTED:"granted",NOT_GRANTED:"not-granted"};var a=n(1864),c=n(4490),u=n(2128),d=n(9164),l=n(3444),f=n(6447),p=n(2223),m=n(2729),h=n(3472);let g;const y=[];function v({responseBodyAction:t}={}){return t&&y.push(t),g||(g=new i.cP(t=>{if(!u.J.fetch)return;const{stop:e}=(0,l.H7)(u.J,"fetch",e=>function({parameters:t,onPostCall:e,handlingStack:n},o){const[i,s]=t;let a=s?.method;void 0===a&&i instanceof Request&&(a=i.method);const c=void 0!==a?(a+"").toUpperCase():"GET",u=i instanceof Request?i.url:(0,d.l2)(i+""),l={state:"start",init:s,input:i,method:c,startClocks:(0,r.M8)(),url:u,handlingStack:n,isAbortedOnStart:i instanceof Request&&i.signal?.aborted||s?.signal?.aborted||!1};o.notify(l),t[0]=l.input,t[1]=l.init,e(t=>{(async function(t,e,n){const r=n;let o;try{o=await e}catch(e){return void t.notify({...r,state:"resolve",status:0,isAborted:r.init?.signal?.aborted||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,error:e})}if(r.response=o,r.status=o.status,r.responseType=o.type,r.isAborted=!1,1===y.reduce((t,e)=>Math.max(t,e(r)),0)){const t=(0,h.i)(o);if(t?.body)try{const e=await async function(t){const e=t.getReader(),n=[];for(;;){const t=await e.read();if(t.done)break;n.push(t.value)}return e.cancel().catch(m.l),(0,p.wh)(n)}(t.body);r.responseBody=(new TextDecoder).decode(e)}catch{}}t.notify({...r,state:"resolve"})})(o,t,l).catch(f.Dx)})}(e,t),{computeHandlingStack:!0});return e})),g}var b=n(3236);let _;const w=new WeakMap;function S(){return _||(_="XMLHttpRequest"in u.J?new i.cP(t=>{const{stop:e}=(0,l.H7)(XMLHttpRequest.prototype,"open",k),{stop:n}=(0,l.H7)(XMLHttpRequest.prototype,"send",e=>{!function({target:t,parameters:[e],handlingStack:n},o){const i=w.get(t);if(!i)return;const s=i;s.state="start",s.startClocks=(0,r.M8)(),s.isAborted=!1,s.xhr=t,s.handlingStack=n,s.requestBody=e;let a=!1;const{stop:c}=(0,l.H7)(t,"onreadystatechange",()=>{t.readyState===XMLHttpRequest.DONE&&u()}),u=()=>{if(d(),c(),a)return;a=!0;const e=i;e.duration=(0,r.vk)(s.startClocks.timeStamp,(0,r.nx)()),e.status=t.status,"string"==typeof t.response&&(e.responseBody=t.response),o.notify({...e,state:"complete"})},{stop:d}=(0,b.q2)(t,"loadend",u);o.notify(s)}(e,t)},{computeHandlingStack:!0}),{stop:o}=(0,l.H7)(XMLHttpRequest.prototype,"abort",x);return()=>{e(),n(),o()}}):new i.cP),_}function k({target:t,parameters:[e,n]}){w.set(t,{state:"open",method:(e+"").toUpperCase(),url:(0,d.l2)(n+"")})}function x({target:t}){const e=w.get(t);e&&(e.isAborted=!0)}var E=n(7003),C=n(7286),A=n(8307),T=n(5648),I=n(3487);function R(t,e=225280){const n=(0,I.M)(Object.prototype),r=(0,I.M)(Array.prototype);try{const n=[],r=new WeakMap,o=O(t,"$",void 0,n,r),i=JSON.stringify(o);let s=i?i.length:0;if(s>e)return void M(e,"discarded",t);for(;n.length>0&&s<e;){const o=n.shift();let i=0;if(Array.isArray(o.source))for(let a=0;a<o.source.length;a++){const c=O(o.source[a],o.path,a,n,r);if(s+=void 0!==c?JSON.stringify(c).length:4,s+=i,i=1,s>e){M(e,"truncated",t);break}o.target[a]=c}else for(const a in o.source)if(Object.prototype.hasOwnProperty.call(o.source,a)){const c=O(o.source[a],o.path,a,n,r);if(void 0!==c&&(s+=JSON.stringify(c).length+i+a.length+3,i=1),s>e){M(e,"truncated",t);break}o.target[a]=c}}return o}finally{n(),r()}}function O(t,e,n,r,o){const i=function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)return t;const e=t;if("function"==typeof e.toJSON)try{return e.toJSON()}catch{}return t}(t);if(!i||"object"!=typeof i)return"bigint"==typeof(s=i)?"[BigInt] "+s.toString():"function"==typeof s?"[Function] "+(s.name||"unknown"):"symbol"==typeof s?"[Symbol] "+(s.description||s.toString()):s;var s;const a=N(i);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;const c=t;if(o.has(c))return`[Reference seen at ${o.get(c)}]`;const u=void 0!==n?`${e}.${n}`:e,d=Array.isArray(i)?[]:{};return o.set(c,u),r.push({source:i,target:d,path:u}),d}function N(t){try{if(t instanceof Event)return{type:(e=t).type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?N(e.currentTarget):null,target:e.target?N(e.target):null};if(t instanceof RegExp)return"[RegExp] "+t.toString();const n=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(n?.[1])return`[${n[1]}]`}catch{}var e;return"[Unserializable]"}function M(t,e,n){T.V.warn(`The data provided has been ${e} as it is over the limit of ${t} characters:`,n)}var P=n(4021),D=n(8032),V=n(1468);function L({originalError:t,stackTrace:e,source:n,useFallbackStack:r=!0,nonErrorPrefix:o}){const i=(0,V.b)(t);return{source:n,type:e?e.name:void 0,message:j(e,i,o,t),stack:e?(0,P.Yn)(e):r?V.e:void 0}}function $(t){return t?.stack.map(t=>t.url).filter(t=>!!t)??[]}function U(t,e){const n=e.flatMap(({stackTrace:t})=>$(t));return(0,D.Jv)($(t).concat(n))}function z({stackTrace:t,originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:i,useFallbackStack:s=!0,source:a,handling:c}){const u=t??((0,V.b)(e)?(0,C.T)(e):void 0),d=(0,V.b)(e)?function(t){const e=[];let n=t.cause;for(;null!=n&&e.length<10;){const t=(0,V.b)(n),r=t?(0,C.T)(n):void 0;e.push({originalError:n,stackTrace:r}),n=t?n.cause:void 0}return e}(e):[],l=L({originalError:e,stackTrace:u,source:a,useFallbackStack:s,nonErrorPrefix:i}),f=d.map(({originalError:t,stackTrace:e})=>L({originalError:t,stackTrace:e,source:a,useFallbackStack:!1}));return{startClocks:o,handling:c,handlingStack:n,componentStack:r,originalError:e,...l,debugIds:U(u,d),causes:f.length?f:void 0,fingerprint:q(e),context:B(e)}}function j(t,e,n,r){return t?.message&&t?.name?t.message:e?"Empty message":n?`${n} ${(0,I.s)(R(r))}`:(0,I.s)(R(r))}function q(t){return(0,V.b)(t)&&"dd_fingerprint"in t?t.dd_fingerprint+"":void 0}function B(t){if((0,A.OE)(t))return t.dd_context}var F=n(4023);function G(){return new i.cP(t=>{const e=(e,n)=>{const o=z({stackTrace:n,originalError:e,startClocks:(0,r.M8)(),nonErrorPrefix:"Uncaught",source:F.g.SOURCE,handling:"unhandled"});t.notify(o)},{stop:n}=(o=e,(0,l.H7)(u.J,"onerror",({parameters:[t,e,n,r,i]})=>{let s;(0,V.b)(i)||(s=(0,C.h)(t,e,n,r)),o(i??t,s)}));var o;const{stop:i}=function(t){return(0,b.BX)(u.J.window,"unhandledrejection")?(0,l.H7)(u.J,"onunhandledrejection",({parameters:[e]})=>{t(e.reason||"Empty reason")}):{stop:m.l}}(e);return()=>{n(),i()}})}let W={};var J=n(7522),H=n(5021);function K(t,e,n,r){return(0,f.dm)((...o)=>(r&&(0,E.Q6)({feature:r}),t()[e][n](...o)))}function Q(t,e,n){t.changeObservable.subscribe(()=>{const r=t.getContext();n.notify(t=>t[e].setContext(r))})}const Z="userContext",Y="globalContext",X="accountContext",tt="getContext",et="setContext",nt="setContextProperty",rt="removeContextProperty",ot="clearContext";function it(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,it)}const st=/(\S+?)\s*=\s*(.*?)(?:;|$)/g;function at(t,e){for(st.lastIndex=0;;){const n=st.exec(t);if(!n)break;if(n[1]===e)return n[2]}}function ct(t,e,n=""){const r=t.charCodeAt(e-1),o=r>=55296&&r<=56319?e+1:e;return t.length<=o?t:`${t.slice(0,o)}${n}`}function ut(t,e){e.silentMultipleInit||T.V.error(t+" is already initialized.")}const dt={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",VIEW_UPDATE:"view_update",RESOURCE:"resource",VITAL:"vital"},lt={LONG_TASK:"long-task",LONG_ANIMATION_FRAME:"long-animation-frame"},ft="initial_load",pt="route_change",mt="bf_cache",ht="custom",gt="error_click",yt="dead_click",vt={DURATION:"duration",OPERATION_STEP:"operation_step"};var bt=n(8383);const _t={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},wt={ALL:"all",SAMPLED:"sampled"},St={clientToken:{type:"string",required:!0},service:{type:"string"},env:{type:"string"},version:{type:"string"},site:{type:"site",default:bt.NW},proxy:{type:"union",variants:[{type:"string"},{type:"function",signature:void 0}]},sessionSampleRate:{type:"percentage",default:100},telemetrySampleRate:{type:"percentage",default:20},telemetryConfigurationSampleRate:{type:"percentage",default:5},telemetryUsageSampleRate:{type:"percentage",default:5},silentMultipleInit:{type:"boolean",default:!1,strict:!1},storeContextsAcrossPages:{type:"boolean",default:!1,strict:!1},trackAnonymousUser:{type:"boolean",default:!0,strict:!1},useSecureSessionCookie:{type:"boolean",default:!1,strict:!1},usePartitionedCrossSiteSessionCookie:{type:"boolean",default:!1,strict:!1},trackSessionAcrossSubdomains:{type:"boolean",default:!1,strict:!1},allowedTrackingOrigins:{type:"match-option",multiple:!0,strict:!1},trackingConsent:{type:"enum",values:s,default:s.GRANTED},beforeSend:{type:"function",signature:void 0},source:{type:"enum",values:["browser","flutter","unity"],default:"browser",strict:!1},sessionPersistence:{type:"enum",values:["cookie","local-storage","memory"],multiple:!0,strict:!1},replica:{type:"schema",schema:{clientToken:{type:"string",required:!0},applicationId:{type:"string"}}},datacenter:{type:"string"},sdkVersion:{type:"string"},variant:{type:"string"}};var kt=n(9305),xt=n(8925),Et=n(4993);function Ct(t,e){return+t.toFixed(e)}function At(t){return"number"==typeof t}var Tt=n(6672);function It(t,e){switch(e.type){case"string":return`"${t}" must be a non-empty string`;case"number":return void 0!==e.min&&void 0!==e.max?`"${t}" must be a number between ${e.min} and ${e.max}`:void 0!==e.min?`"${t}" must be a number greater than or equal to ${e.min}`:void 0!==e.max?`"${t}" must be a number less than or equal to ${e.max}`:`"${t}" must be a finite number`;case"percentage":return`"${t}" must be a number between 0 and 100`;case"boolean":return`"${t}" must be a boolean`;case"site":return`"${t}" must be a valid Datadog site. ${a.xG} ${a.fH}/getting_started/site/.`;case"match-option":return`"${t}" must be a string, RegExp, or function`;case"enum":return`"${t}" must be one of: "${Pt(e.values).join('", "')}"`;case"union":return`"${t}" does not match any expected type`;case"schema":return`"${t}" is not a valid object`;case"function":return`"${t}" must be a function`}}function Rt(t,e,n){const r={};for(const[i,s]of Object.entries(t)){const t=e[i],a=s.multiple?Ot(s,t,n):Mt(s,t,n);if(void 0===a){if(null!=t&&""!==t){if(n.error(It(i,s)),s.required||!1!==s.strict)return}else if(s.required)return void n.error(`"${i}" is required`);r[i]="default"in s?(0,o.Go)(s.default):void 0}else r[i]=a}return r}function Ot(t,e,n){if(null==e)return;if("enum"===t.type&&t.allowAll&&"all"===e)return Pt(t.values).slice();const r=Array.isArray(e)?e:[e],o=[];for(const e of r){const r=Mt(t,e,n);if(void 0===r){if(!1!==t.strict)return}else o.push(r)}return!1===t.strict&&0===o.length&&r.length>0?void 0:o}const Nt=/(datadog|ddog|datad0g|dd0g)/;function Mt(t,e,n){if("schema"===t.type){if("object"!=typeof e||null===e)return;return Rt(t.schema,e,n)}if("union"!==t.type){if(null!=e)switch(t.type){case"function":return"function"==typeof e?e:void 0;case"string":return"string"==typeof e&&e.length>0?e:void 0;case"number":return"number"==typeof e&&Number.isFinite(e)&&(void 0===t.min||e>=t.min)&&(void 0===t.max||e<=t.max)?e:void 0;case"percentage":return(0,A.fp)(e)?e:void 0;case"boolean":return"boolean"==typeof e?e:!1===t.strict?!!e:void 0;case"site":if("string"!=typeof e||!Nt.test(e))return;return e;case"match-option":return(0,A.Vl)(e)?e:void 0;case"enum":return"string"==typeof e&&Pt(t.values).includes(e)?e:void 0}}else{if(null==e)return;for(const r of t.variants){const t=Mt(r,e,n);if(void 0!==t)return t}}}function Pt(t){return Array.isArray(t)?t:Object.values(t)}var Dt=n(9056);function Vt(t,e,n=0,r){const o=new Date;o.setTime(o.getTime()+n);const i="expires="+o.toUTCString(),s=r?.crossSite?"none":"strict",a=r?.domain?";domain="+r.domain:"",c=r?.secure?";secure":"",u=r?.partitioned?";partitioned":"";document.cookie=`${t}=${e};${i};path=/;samesite=${s}${a}${c}${u}`}function Lt(t){const e=at(document.cookie,t);if(""!==e)return e}function $t(t){return function(t){const e=new Map;for(st.lastIndex=0;;){const n=st.exec(t);if(!n)break;{const t=n[1],r=n[2];e.has(t)?e.get(t).push(r):e.set(t,[r])}}return e}(document.cookie).get(t)||[]}let Ut,zt;function jt(t){return Ut||(Ut=function(t){const e=new Map;for(st.lastIndex=0;;){const n=st.exec(t);if(!n)break;e.set(n[1],n[2])}return e}(document.cookie)),Ut.get(t)}function qt(t,e){Vt(t,"",0,e)}var Bt=n(465),Ft=n(5387);function Gt(t,e){e.lastIndex=0;const n=e.exec(t);if(!n)return;const[r,o]=n;return o||r}const Wt=/[a-zA-Z_$]/,Jt=/[a-zA-Z0-9_$]/,Ht=/[0-9]/,Kt=/[a-fA-F0-9]/,Qt={0:()=>!1,1:()=>!1,2:t=>Wt.test(t),3:t=>Jt.test(t),4:t=>"."===t,5:t=>"["===t,6:t=>"]"===t,7:t=>Ht.test(t),8:t=>"'\"".includes(t),9:(t,e)=>t===e.quote,10:()=>!0,11:t=>"\\"===t,12:(t,e)=>void 0===e.escapeSequence?(e.quote+"/\\bfnrtu").includes(t):!!(e.escapeSequence.startsWith("u")&&e.escapeSequence.length<5)&&Kt.test(t)},Zt={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},Yt=[2,3,7,10],Xt=[4,5,6];function te(t){return"\"'/\\bfnrt".includes(t)||t.startsWith("u")&&5===t.length}const ee={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function ne(t){return t.startsWith("u")?String.fromCharCode(parseInt(t.slice(1),16)):ee[t]}const re={hit:"success",miss:"missing",error:"failure"},oe=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","telemetrySampleRate","trackAnonymousUser","trackUserInteractions","trackResources","trackLongTasks","traceContextInjection","actionNameAttribute","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];function ie(t,e,n,r){const o={...t};if(e.rum){const t=e.rum;oe.forEach(e=>{e in t&&(o[e]=i(t[e]))}),Object.keys(n).forEach(e=>{var r;void 0!==t[e]&&(r=n[e],t[e].forEach(({key:t,value:e})=>{r.setContextProperty(t,i(e))}))})}return void 0!==e.profiling?.sampleRate&&(o.profilingSampleRate=e.profiling.sampleRate),o;function i(t){if(Array.isArray(t))return t.map(i);if((0,A.OE)(t)){if("rcSerializedType"in t){const e=t.rcSerializedType;switch(e){case"string":return t.value;case"regex":return ae(t.value);case"dynamic":return function(t){const e=t.strategy;let n;switch(e){case"cookie":n=function({name:t}){const e=Lt(t);return r.increment("cookie",void 0!==e?"success":"missing"),e}(t);break;case"dom":n=function({selector:t,attribute:e}){let n;try{n=document.querySelector(t)}catch{return T.V.error(`Invalid selector in the remote configuration: '${t}'`),void r.increment("dom","failure")}if(!n)return void r.increment("dom","missing");if(function(t,e){return"password"===t.getAttribute("type")&&"value"===e}(n,e))return T.V.error(`Forbidden element selected by the remote configuration: '${t}'`),void r.increment("dom","failure");const o=void 0!==e?n.getAttribute(e):n.textContent;if(null!==o)return r.increment("dom","success"),o;r.increment("dom","missing")}(t);break;case"js":n=function({path:t}){let e=window;const n=function(t){const e=[];let n,r=0;const o={quote:void 0,escapeSequence:void 0};let i="";for(const s of t){if(n=Zt[r].find(t=>Qt[t](s,o)),!n)return[];if(void 0!==o.escapeSequence&&12!==n){if(!te(o.escapeSequence))return[];i+=ne(o.escapeSequence),o.escapeSequence=void 0}Yt.includes(n)?i+=s:Xt.includes(n)&&""!==i?(e.push(i),i=""):12===n?o.escapeSequence=o.escapeSequence?`${o.escapeSequence}${s}`:s:8===n?o.quote=s:9===n&&(o.quote=void 0),r=n}return Zt[r].includes(1)?(""!==i&&e.push(i),e):[]}(t);if(0===n.length)return T.V.error(`Invalid JSON path in the remote configuration: '${t}'`),void r.increment("js","failure");for(const o of n){if(!(o in e))return void r.increment("js","missing");try{e=e[o]}catch(e){return T.V.error(`Error accessing: '${t}'`,e),void r.increment("js","failure")}}return r.increment("js","success"),e}(t);break;case"localStorage":n=function({key:t}){let e;try{e=localStorage.getItem(t)}catch{return void r.increment("localStorage","failure")}return r.increment("localStorage",null!==e?"success":"missing"),e??void 0}(t);break;default:return void T.V.error(`Unsupported remote configuration: "strategy": "${e}"`)}const o=t.extractor;return void 0!==o&&"string"==typeof n?function(t,e){const n=ae(t.value);if(void 0!==n)return Gt(e,n)}(o,n):n}(t);default:return void T.V.error(`Unsupported remote configuration: "rcSerializedType": "${e}"`)}}return(0,Dt.LG)(t,i)}return t}}function se(){const t={fetch:{}};return{get:()=>t,increment(e,n){t[e]||(t[e]={}),t[e][n]||(t[e][n]=0),t[e][n]=t[e][n]+1}}}function ae(t){try{return RegExp(t)}catch{T.V.error(`Invalid regex in the remote configuration: '${t}'`)}}async function ce(t){let e;try{e=await(0,Bt.h)(function(t){if(t.remoteConfigurationProxy)return t.remoteConfigurationProxy;const e=ue(t);return(0,Ft.Hg)({site:t.site,path:`/v1/${encodeURIComponent(e)}.json`,subdomain:"sdk-configuration"})}(t))}catch{e=void 0}if(!e?.ok)return{ok:!1,error:Error("Error fetching the remote configuration.")};const n=await e.json();return n.rum||n.profiling?{ok:!0,value:n}:{ok:!1,error:Error("No remote configuration for RUM.")}}function ue(t){return t.remoteConfiguration?.id??t.remoteConfigurationId}const de=["tracecontext","datadog"],le=["cache-control","etag","age","expires","content-type","content-encoding","vary","content-length","server-timing","x-cache","cf-cache-status","x-vercel-cache"],fe={...St,applicationId:{type:"string",required:!0},actionNameAttribute:{type:"string"},workerUrl:{type:"string"},subdomain:{type:"string"},sessionReplaySampleRate:{type:"percentage",default:0},traceSampleRate:{type:"percentage",default:100},profilingSampleRate:{type:"percentage",default:0},compressIntakeRequests:{type:"boolean",default:!1},trackUserInteractions:{type:"boolean",default:!0,strict:!1},trackResources:{type:"boolean",default:!0,strict:!1},trackLongTasks:{type:"boolean",default:!0,strict:!1},trackViewsManually:{type:"boolean",default:!1,strict:!1},betaEnableViewUpdates:{type:"boolean"},betaTrackWebSockets:{type:"boolean",default:!1,strict:!1},enablePrivacyForActionName:{type:"boolean",default:!0},propagateTraceBaggage:{type:"boolean",default:!0},startSessionReplayRecordingManually:{type:"boolean",default:!1,strict:!1},sessionReplayCanvasRecording:{type:"schema",schema:{enable:{type:"boolean",required:!0},maxFramesPerSecond:{type:"number",min:0,max:5,default:1}}},defaultPrivacyLevel:{type:"enum",values:_t,default:_t.MASK_USER_INPUT,strict:!1},traceContextInjection:{type:"enum",values:wt,default:wt.SAMPLED,strict:!1},excludedActivityUrls:{type:"match-option",multiple:!0,default:[]},allowedTracingUrls:{type:"union",multiple:!0,strict:!1,default:[],variants:[{type:"match-option"},{type:"schema",schema:{match:{type:"match-option",required:!0},propagatorTypes:{type:"enum",values:["datadog","b3","b3multi","tracecontext"],multiple:!0,strict:!1,default:de}}}]},plugins:{type:"schema",multiple:!0,strict:!1,default:[],schema:{name:{type:"string",required:!0},getConfigurationTelemetry:{type:"function",strict:!1,signature:void 0},onInit:{type:"function",strict:!1,signature:void 0},onRumStart:{type:"function",strict:!1,signature:void 0}}},trackFeatureFlagsForEvents:{type:"enum",values:["vital","action","long_task","resource"],multiple:!0,strict:!1,default:[]}};function pe(t,e,n){return!(0,kt.d0)()&&(t??(!e&&"rum-salesforce"!==n))}function me(t){const e=new Set;return(0,Tt.EI)(t.allowedTracingUrls)&&t.allowedTracingUrls.forEach(t=>{he(t)?.propagatorTypes.forEach(t=>e.add(t))}),Array.from(e)}function he(t){return(0,A.Vl)(t)?{match:t,propagatorTypes:de}:(0,A.OE)(t)&&(0,A.Vl)(t.match)&&(null===t.propagatorTypes||void 0===t.propagatorTypes||Array.isArray(t.propagatorTypes))?{match:t.match,propagatorTypes:t.propagatorTypes||de}:void 0}function ge(t){if(!t.allowedGraphQlUrls)return[];if(!Array.isArray(t.allowedGraphQlUrls))return T.V.warn("allowedGraphQlUrls should be an array"),[];const e=[];return t.allowedGraphQlUrls.forEach(t=>{(0,A.Vl)(t)?e.push({match:t,trackPayload:!1,trackResponseErrors:!1}):(0,A.OE)(t)&&(0,A.Vl)(t.match)&&e.push({match:t.match,trackPayload:!!t.trackPayload,trackResponseErrors:!!t.trackResponseErrors})}),e}const ye=["request","response","any"];function ve(t){const e=t.trackResourceHeaders;if(void 0===e||!1===e)return[];if(!0===e)return le.map(t=>({name:t}));if(!Array.isArray(e))return T.V.warn("trackResourceHeaders should be true or an array of MatchHeader"),[];if(0===e.length)return T.V.warn("trackResourceHeaders is an empty array, no headers will be captured"),[];const n=[];return e.forEach((t,e)=>{if(!(0,A.OE)(t))return void T.V.warn(`trackResourceHeaders[${e}] should be a MatchHeader object`);if(void 0!==t.name&&!(0,A.Vl)(t.name))return void T.V.warn(`trackResourceHeaders[${e}].name should be a MatchOption`);if(void 0!==t.url&&!(0,A.Vl)(t.url))return void T.V.warn(`trackResourceHeaders[${e}].url should be a MatchOption`);if(void 0!==t.extractor&&!(t.extractor instanceof RegExp))return void T.V.warn(`trackResourceHeaders[${e}].extractor should be a RegExp`);if(void 0!==t.location&&("string"!=typeof t.location||!ye.includes(t.location)))return void T.V.warn(`trackResourceHeaders[${e}].location should be 'request', 'response', or 'any'`);const{name:r,...o}=t;n.push({...o,...void 0!==r?{name:"string"==typeof r?r.toLowerCase():r}:{}})}),n}function be(t){return(0,Tt.EI)(t)&&t.some(t=>(0,A.OE)(t)&&t.trackResponseErrors)}var _e=n(2423);const we=[];function Se(t,e,n){if("undefined"==typeof window||"undefined"==typeof localStorage)return;const r=function(t,e){return`_dd_c_${t}_${e}`}(e,n);we.push((0,b.q2)(window,"storage",({key:e})=>{r===e&&t.setContext(s())})),t.changeObservable.subscribe(function(){localStorage.setItem(r,JSON.stringify(t.getContext()))});const i=(0,o.kg)(s(),t.getContext());function s(){const t=localStorage.getItem(r);return t?(0,Dt.XU)(t)??{}:{}}(0,Dt.RI)(i)||t.setContext(i)}function ke(t,e,n){const r={...t};for(const[t,{required:o,type:i}]of Object.entries(e))"string"!==i||xe(r[t])||(r[t]=r[t]+""),o&&xe(r[t])&&T.V.warn(`The property ${t} of ${n} is required; context will not be sent to the intake.`);return r}function xe(t){return null==t||""===t}function Ee(t="",{propertiesConfig:e={}}={}){let n={};const r=new i.cP,s={getContext:()=>(0,o.Go)(n),setContext(o){!function(t){const e="object"===(0,A.Pw)(t);return e||T.V.error("Unsupported context:",t),e}(o)?s.clearContext():n=R(ke(o,e,t)),r.notify()},setContextProperty(o,i){n=R(ke({...n,[o]:i},e,t)),r.notify()},removeContextProperty(o){delete n[o],ke(n,e,t),r.notify()},clearContext(){n={},r.notify()},changeObservable:r};return s}function Ce(){return Ee("global context")}var Ae=n(5119);function Te(){return Ee("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function Ie(){return Ee("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function Re(t,e,n=!1){return t.some(t=>{try{if("function"==typeof t)return t(e);if(t instanceof RegExp)return t.lastIndex=0,t.test(e);if("string"==typeof t)return n?e.startsWith(t):t===e}catch(t){T.V.error(t)}return!1})}const Oe=["chrome-extension://","moz-extension://"];function Ne(t){return Oe.some(e=>t.includes(e))}var Me=n(2511),Pe=n(9671),De=n(4215),Ve=n(8424),Le=n(603);const $e=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function Ue(t){return t.created?Number(t.created):void 0}function ze(t){const e=t.expire&&Number(t.expire),n=Ue(t);if(e&&n)return Math.min(e,n+Le.AQ)}function je(t,e){const n={isExpired:"1"};return e.trackAnonymousUser&&t?.anonymousId&&(n.anonymousId=t?.anonymousId),n}function qe(t){return(0,Dt.RI)(t)}function Be(t){return void 0!==t.isExpired||!function(t){const e=ze(t);return!!e&&(0,r.x3)()<e}(t)}function Fe(t){t.expire=(0,r.x3)()+Le.HB+""}function Ge(t){return(0,Ve.WP)(t).map(([t,e])=>"anonymousId"===t?"aid="+e:`${t}=${e}`).join("&")}function We(t){const e={};return function(t){return!!t&&(-1!==t.indexOf("&")||$e.test(t))}(t)&&t.split("&").forEach(t=>{const n=$e.exec(t);if(null!==n){const[,t,r]=n;"aid"===t?e.anonymousId=r:e[t]=r}}),e}function Je(t,e){return qe(t)?(e.trackAnonymousUser&&(t.anonymousId=it()),je(t,e)):t}function He(t,e){if(qe(t))return t;let n=t;return Be(t)&&(n=je(t,e)),n.id||(n.id=it(),n.created=(0,r.x3)()+""),e.trackAnonymousUser&&!n.anonymousId&&(n.anonymousId=it()),delete n.isExpired,Fe(n),n}const Ke="dd_cookie_test_";async function Qe(t,e){const n=`${Ke}${it()}`,r="test",o=t(n,e);try{return await o.getAllAndSet(()=>({value:r,expireDelay:6e4})),(await o.getAll()).includes(r)}catch(t){return T.V.error(t),!1}finally{try{await o.delete()}catch{}}}function Ze(t,e){const n=(0,c.B)(u.J.cookieStore),o=new i.cP(()=>(0,b.q2)(n,"change",e=>{(e.changed.some(e=>e.name===t)||e.deleted.some(e=>e.name===t))&&o.notify()}).stop);return{async getAll(){return(await n.getAll(t)).map(t=>t.value)},delete(){return n.delete({name:t,domain:e.domain,path:"/",partitioned:e.partitioned})},async getAllAndSet(o){const i=await n.getAll(t),s=i.map(t=>t.value),{value:a,expireDelay:c}=o(s);try{await n.set({name:t,value:a,expires:(0,r.x3)()+c,path:"/",sameSite:e.crossSite?"none":"strict",domain:e.domain,secure:e.secure,partitioned:e.partitioned})}catch(n){if(!t.startsWith(Ke)){const r=$t(t);(0,E.A2)("Failed to set cookie using Cookie Store API",{"error.message":n.message,newValue:a,cookieOptions:{...e},cookies:i.map(t=>({...t})),cookieCount:i.length,documentCookies:r})}}},observable:o}}function Ye(t,e){let n=$t(t);const r=new i.cP(()=>{const e=(0,Pe.yb)(()=>{o($t(t))},1e3);return()=>{(0,Pe.vG)(e)}});function o(t){t+""!=n+""&&(n=t,r.notify())}return{getAll(){return Promise.resolve($t(t))},async getAllAndSet(n){const r=$t(t),{value:i,expireDelay:s}=n(r);Vt(t,i,s,e),await Promise.resolve(),o([i])},async delete(){qt(t,e),await Promise.resolve(),o([])},observable:r}}function Xe(){const t=(0,c.B)(u.J.cookieStore);return!(!t||!(0,b.BX)(t,"change"))}const tn="_dd_s_v2";let en;function nn(t,e){return 1===t?Ze(tn,e):Ye(tn,e)}function rn(t,e){let n;for(const r of t.slice().reverse())if(n=We(r),n.c===e)break;return delete n?.c,n??{}}function on(t){let e=0;return e|=0,e|=(t.domain?t.domain.split(".").length-1:0)<<1,e|=t.crossSite?1:0,e.toString(16)}const sn="_DD_SESSION";async function an(t){const e=void 0!==(n=t.sessionPersistence)?n:u.W?[Le.Q_.MEMORY]:[Le.Q_.COOKIE];var n;for(const n of e){const e=await cn(n,t);if(void 0!==e)return e}}function cn(t,e){switch(t){case Le.Q_.COOKIE:return async function(t){const e=function(t){const e={};if(e.secure=t.useSecureSessionCookie||t.usePartitionedCrossSiteSessionCookie,e.crossSite=t.usePartitionedCrossSiteSessionCookie,e.partitioned=t.usePartitionedCrossSiteSessionCookie,t.trackSessionAcrossSubdomains){const t=function(t=u.J.location?.hostname??"",e=("undefined"!=typeof document?document.referrer:"")){if("undefined"!=typeof document){if(void 0===zt){const n=function(t,e){try{return t||(0,d.c$)(e).hostname}catch{}}(t,e);if(n){const t="dd_site_test_"+it(),e="test",r=n.split(".");let o=r.pop();for(;r.length&&!Lt(t);)o=`${r.pop()}.${o}`,Vt(t,e,1e3,{domain:o});qt(t,{domain:o}),zt=o}}return zt}}();if(!t)return;e.domain=t}return e}(t);if(e)return Xe()&&await Qe(Ze,e)?{type:Le.Q_.COOKIE,cookieOptions:e,cookieApi:1}:await Qe(Ye,e)?{type:Le.Q_.COOKIE,cookieOptions:e,cookieApi:0}:void 0}(e);case Le.Q_.LOCAL_STORAGE:return function(){try{const t=it(),e="_dd_test_"+t;localStorage.setItem(e,t);const n=localStorage.getItem(e);return localStorage.removeItem(e),t===n?{type:Le.Q_.LOCAL_STORAGE}:void 0}catch{return}}();case Le.Q_.MEMORY:return{type:Le.Q_.MEMORY};default:return void T.V.error(`Invalid session persistence '${t+""}'`)}}function un(t,e){switch(t.type){case Le.Q_.COOKIE:return function(t,e){const{cookieOptions:n,cookieApi:r}=t,o=new i.cP,s=!!e.trackAnonymousUser,a=on(n),u=(0,c.B)(nn)(r,n);let d=!0;function l(t){return u.getAllAndSet(e=>{let r=rn(e,a);d&&(0,Dt.RI)(r)&&(r=rn($t("_dd_s"),a)),d=!1;const o=function(t,e){return Ge((0,Dt.RI)(t)?t:{...t,c:on(e)})}(t(r),n);return{value:o,expireDelay:s?Le._P:Le.AQ}})}return u.observable.subscribe(()=>{u.getAll().then(t=>{o.notify(rn(t,a))}).catch(t=>(0,f.Dx)(Error("Error while reading session cookies on change: "+t)))}),{async setSessionState(t,e){"undefined"!=typeof navigator&&navigator.locks?await navigator.locks.request(tn,()=>l(t)).catch(t=>{if(!function(t){return t instanceof Error&&("AbortError"===t.name||t.message.includes("no longer runnable"))}(t))throw t}):(en=(en??Promise.resolve()).then(()=>l(t)),await en)},sessionObservable:o}}(t,e);case Le.Q_.LOCAL_STORAGE:return function(){const t=new i.cP(t=>(0,b.q2)(window,"storage",e=>{e.key===tn&&e.storageArea===localStorage&&t.notify(We(e.newValue))}).stop);let e=!0;return{async setSessionState(n,r){let o=We(localStorage.getItem(tn));e&&qe(o)&&(o=We(localStorage.getItem("_dd_s"))),e=!1;const i=n(o);localStorage.setItem(tn,Ge(i)),await Promise.resolve(),t.notify(i)},sessionObservable:t}}();case Le.Q_.MEMORY:return function(){const t=u.J;t[sn]||(t[sn]={});const e=t[sn],n=new i.cP,r=e.onChange;return e.onChange=t=>{r?.(t),n.notify(t)},{async setSessionState(t,n){const r=e.state??{},o=(0,Dt.yG)(t(r));e.state=o,await Promise.resolve(),e.onChange?.(o)},sessionObservable:n}}()}}const dn=12*r.MA;let ln=[];async function fn(t,e){const n=(0,r.$S)(),o=new i.cP,s=new i.cP,a=await(0,c.B)(an)(t);if(!a)return void T.V.warn("No storage available for session. We will not send any data.");const d=(0,c.B)(un)(a,t),l=(0,Me.qj)({maxEntries:1e3});ln.push(()=>l.stop());let p=!1;const{throttled:h,cancel:g}=(0,m.n)(()=>{p=!1,d.setSessionState(e=>He(e,t),"expandOrRenewOnActivity").catch(f.Dx)},1e3);let y;ln.push(g),ln.push(()=>(0,Pe.DJ)(y));let v=!1;ln.push(()=>{v=!0});let _=await w().catch(t=>(0,f.Dx)(Error("Error while resolving initial session state: "+t)));if(_&&!v){for(;!e.isGranted();){if(x(),await new Promise(t=>e.onGrantedOnce(t)),v)return;if(_=await w().catch(f.Dx),!_||v)return}return l.add(C(_),(0,r.Oc)().relative),S(_),function(){const t=d.sessionObservable.subscribe(t=>{S(t),k(t)});ln.push(()=>t.unsubscribe())}(),e.observable.subscribe(()=>{e.isGranted()?(p=!1,d.setSessionState(e=>He(e,t),"expandOrRenewOnConsent").catch(f.Dx)):x()}),u.W||(function(){const{stop:t}=(0,b.lQ)(window,["click","touchstart","keydown","scroll"],()=>{e.isGranted()&&h()},{capture:!0,passive:!0});ln.push(t)}(),function(){const t=()=>{"visible"===document.visibilityState&&(p||d.setSessionState(t=>function(t){return Be(t)||qe(t)||!t.id||Fe(t),t}(t),"expandOnVisibility").catch(f.Dx))},{stop:e}=(0,b.q2)(document,"visibilitychange",t);ln.push(e);const n=(0,Pe.yb)(t,6e4);ln.push(()=>{(0,Pe.vG)(n)})}(),function(){const{stop:e}=(0,b.q2)(window,"resume",()=>{d.setSessionState(e=>Je(e,t),"initializeOnResume").catch(f.Dx)},{capture:!0});ln.push(e)}()),(0,E.Gk)("Session manager init metrics",{metrics:{duration:(0,r.vk)(n,(0,r.$S)())}}),{findSession(t,e){return l.find(t,e)},findTrackedSession(e,{returnInactive:n=!1,maxAge:o=dn}={}){const i=l.find(e,{returnInactive:n});if(i&&"invalid"!==i.id&&(0,De.$5)(i.id,t.sessionSampleRate)&&!((0,r.x3)()-i.createdAt>o))return i},renewObservable:o,expireObservable:s,expire:x,updateSessionState(t){d.setSessionState(e=>({...e,...t}),"updateState").catch(f.Dx)}}}async function w(){let e={};return await d.setSessionState(n=>{const r=Je(n,t);return e=He(r,t),e},"initialize"),e}function S(n){(0,Pe.DJ)(y);const o=ze(n);if(o){const n=o-(0,r.x3)();y=(0,Pe.wg)(()=>{d.setSessionState(n=>Be(n)?(e.isGranted()||delete n.anonymousId,je(n,t)):n,"expireOnTimeout").catch(f.Dx)},n)}}function k(t){const e=l.find(),n=void 0!==e?.id,i=void 0!==t.id,a=n&&i&&e.id!==t.id;if(!n||i&&!a||(p=!0,s.notify(),l.closeActive((0,r.$S)())),!i||n&&!a)n&&i&&!a&&(e.isReplayForced=!!t.forcedReplay);else{if(p)return;l.add(C(t),(0,r.$S)()),o.notify()}}function x(){g();const n=je(l.find(),t);e.isGranted()||delete n.anonymousId,k(n),d.setSessionState(n=>(e.isGranted()||delete n.anonymousId,je(n,t)),"expire").catch(f.Dx)}function C(t){const e=Ue(t)??(0,r.nx)();return t.id?{id:t.id,isReplayForced:!!t.forcedReplay,anonymousId:t.anonymousId,createdAt:e}:{id:"invalid",isReplayForced:!1,anonymousId:void 0,createdAt:e}}}const pn="datadog-synthetics-",mn=pn+"public-id",hn=pn+"result-id",gn=pn+"injects-rum",yn=pn+"rum-context";function vn(){return!(u.W||!u.J._DATADOG_SYNTHETICS_INJECTS_RUM&&!jt(gn))}function bn(){const t=function(){const t=u.J._DATADOG_SYNTHETICS_RUM_CONTEXT;if(t)return t;const e=jt(yn);return e?(0,Dt.XU)(decodeURIComponent(e)):{test_id:window._DATADOG_SYNTHETICS_PUBLIC_ID||jt(mn),result_id:window._DATADOG_SYNTHETICS_RESULT_ID||jt(hn)}}();return"object"==typeof(e=t)&&null!==e&&"string"==typeof e.test_id&&"string"==typeof e.result_id?t:void 0;var e}var _n=n(350),wn=n(6448);const Sn="_dd_tab_id";let kn;var xn=n(4467);function En(){let t;const e=window;if(e.Zone&&(t=(0,xn.W)(e,"MutationObserver"),e.MutationObserver&&t===e.MutationObserver)){const n=new e.MutationObserver(m.l),r=(0,xn.W)(n,"originalInstance");t=r?.constructor}return t||(t=e.MutationObserver),t}const Cn=class{constructor(){this.callbacks={}}notify(t,e){const n=this.callbacks[t];n&&n.forEach(t=>t(e))}subscribe(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(t=>e!==t)}}}},An=Le.AQ,Tn="fetch",In="other",Rn=Tn,On=[["document",t=>"navigation"===t],["xhr",t=>"xmlhttprequest"===t],[Tn,t=>"fetch"===t],["beacon",t=>"beacon"===t],["css",(t,e)=>/\.css$/i.test(e)],["js",(t,e)=>/\.js$/i.test(e)],["image",(t,e)=>["image","img","icon"].includes(t)||null!==/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(e)],["font",(t,e)=>null!==/\.(woff|eot|woff2|ttf)$/i.exec(e)],["media",(t,e)=>["audio","video"].includes(t)||null!==/\.(mp3|mp4)$/i.exec(e)]];function Nn(t){const e=t.name;if(!(0,d.AY)(e))return In;const n=(0,d.L2)(e);for(const[e,r]of On)if(r(t.initiatorType,n))return e;return In}function Mn(...t){for(let e=1;e<t.length;e+=1)if(t[e-1]>t[e])return!1;return!0}function Pn(t){return"xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType}function Dn(t){if(!function(t){const e=Mn(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd),n=!function(t){return t.redirectEnd>t.startTime}(t)||Mn(t.startTime,t.redirectStart,t.redirectEnd,t.fetchStart);return e&&n}(t))return;const{startTime:e,fetchStart:n,workerStart:r,redirectStart:o,redirectEnd:i,domainLookupStart:s,domainLookupEnd:a,connectStart:c,secureConnectionStart:u,connectEnd:d,requestStart:l,responseStart:f,responseEnd:p}=t,m={download:Vn(e,f,p),first_byte:Vn(e,l,f)};return 0<r&&r<n&&(m.worker=Vn(e,r,n)),n<d&&(m.connect=Vn(e,c,d),c<=u&&u<=d&&(m.ssl=Vn(e,u,d))),n<a&&(m.dns=Vn(e,s,a)),e<i&&(m.redirect=Vn(e,o,i)),m}function Vn(t,e,n){if(t<=e&&e<=n)return{duration:(0,r.Zj)((0,r.vk)(e,n)),start:(0,r.Zj)((0,r.vk)(t,e))}}function Ln(t){return""===t.nextHopProtocol?void 0:t.nextHopProtocol}function $n(t){return""===t.deliveryType?"other":t.deliveryType}function Un(t){if(t.startTime<t.responseStart){const{encodedBodySize:e,decodedBodySize:n,transferSize:r}=t;return{size:n,encoded_body_size:e,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function zn(t){return t&&(!(0,bt.wo)(t)||(0,xt.sr)(xt.R9.TRACK_INTAKE_REQUESTS))}const jn=/data:(.+)?(;base64)?,/g;function qn(t,e=24e3){if(t.length<=e||!t.startsWith("data:"))return t;const n=t.substring(0,100).match(jn);return n?n[0]+"[...]":t}function Bn(){return Fn(63)}function Fn(t){const e=crypto.getRandomValues(new Uint32Array(2));let n=BigInt(e[0])+(BigInt(e[1])<<32n);return 63===t&&(n&=0x7fffffffffffffffn),n}function Gn(t){return t.toString(16).padStart(16,"0")}function Wn(t){0!==t.status||t.isAborted||(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function Jn(t,e,n,r,o,i){const s=n.findTrackedSession();if(!s)return;const a=t.allowedTracingUrls.find(t=>Re([t.match],e.url,!0));if(!a)return;const c=(0,De.$5)(s.id,(0,De.it)(t.sessionSampleRate,t.traceSampleRate)),u=(0,kt.d0)()?(0,kt.Y9)()?.getIsTraceSampled()??c:c;(u||t.traceContextInjection===wt.ALL)&&(e.traceSampled=u,e.traceId=Fn(64),e.spanId=Bn(),i(function(t,e,n,r,o,i,s,a){const c={};if(o.forEach(r=>{switch(r){case"datadog":Object.assign(c,{"x-datadog-origin":"rum","x-datadog-parent-id":e.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":t.toString()});break;case"tracecontext":Object.assign(c,{traceparent:`00-0000000000000000${Gn(t)}-${Gn(e)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break;case"b3":Object.assign(c,{b3:`${Gn(t)}-${Gn(e)}-${n?"1":"0"}`});break;case"b3multi":Object.assign(c,{"X-B3-TraceId":Gn(t),"X-B3-SpanId":Gn(e),"X-B3-Sampled":n?"1":"0"})}}),a.propagateTraceBaggage){const t={"session.id":r},e=i.getContext().id;"string"==typeof e&&(t["user.id"]=e);const n=s.getContext().id;"string"==typeof n&&(t["account.id"]=n);const o=Object.entries(t).map(([t,e])=>`${t}=${encodeURIComponent(e)}`).join(",");o&&(c.baggage=o)}return c}(e.traceId,e.spanId,e.traceSampled,s.id,a.propagatorTypes,r,o,t)))}function Hn(t,e){return e.allowedGraphQlUrls.find(e=>Re([e.match],t))}let Kn,Qn=1;function Zn(t){t.requestIndex||(t.requestIndex=Qn++)}function Yn(t){return"string"==typeof t?(0,p.WW)(t):t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:"undefined"!=typeof Blob&&t instanceof Blob?t.size:0}function Xn(t,e,n){if(void 0===t.openClocks)return;const o=(0,r.vk)(t.openClocks.timeStamp,e.timeStamp);if("in"===n&&void 0===t.firstMessageInOffset?t.firstMessageInOffset=o:"out"===n&&void 0===t.firstMessageOutOffset&&(t.firstMessageOutOffset=o),"in"===n){if(void 0!==t.lastMessageInAt){const n=(0,r.vk)(t.lastMessageInAt,e.timeStamp);n>t.longestInboundSilence&&(t.longestInboundSilence=n)}t.lastMessageInAt=e.timeStamp}}function tr(t){return At(t)&&t<0?void 0:t}function er(t){return t.nodeType===Node.TEXT_NODE}function nr(t){return t.nodeType===Node.ELEMENT_NODE}function rr(t){return nr(t)&&!!t.shadowRoot}function or(t){const e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&nr(e.host)}function ir(t,e){let n=t.firstChild;for(;n;)e(n),n=n.nextSibling;rr(t)&&e(t.shadowRoot)}function sr(t){return or(t)?t.host:t.parentNode}function ar(t){if(t.parentElement)return t.parentElement;const e=t.parentNode;return e&&or(e)?e.host:null}var cr;function ur(t){return new i.cP(e=>{const n=t=>{const n=function(t){return t.filter(t=>!function(t){return!(t.entryType!==cr.RESOURCE||zn(t.name)&&function(t){return t.duration>=0}(t))}(t))}(t);n.length>0&&e.notify(n)};let r,o=!0;const i=new PerformanceObserver((0,f.dm)(t=>{o?r=(0,Pe.wg)(()=>n(t.getEntries())):n(t.getEntries())}));return i.observe(t),o=!1,!dr&&void 0!==window.performance&&"getEntries"in performance&&"addEventListener"in performance&&(dr=(0,b.q2)(performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{i.disconnect(),(0,Pe.DJ)(r)}})}let dr;function lr(t){return PerformanceObserver.supportedEntryTypes.includes(t)}!function(t){t.EVENT="event",t.FIRST_INPUT="first-input",t.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",t.LAYOUT_SHIFT="layout-shift",t.LONG_TASK="longtask",t.LONG_ANIMATION_FRAME="long-animation-frame",t.NAVIGATION="navigation",t.PAINT="paint",t.RESOURCE="resource",t.VISIBILITY_STATE="visibility-state"}(cr||(cr={}));const fr="data-dd-excluded-activity-mutations";function pr(t,e,n,o,i,s){const a=(0,c.B)(mr)(t,e,n,o);let u,d=!1;const l=(0,Pe.wg)((0,f.dm)(()=>g({hadActivity:!1})),100),p=void 0!==s?(0,Pe.wg)((0,f.dm)(()=>g({hadActivity:!0,end:(0,r.nx)()})),s):void 0,m=a.subscribe(({isBusy:t})=>{(0,Pe.DJ)(l),(0,Pe.DJ)(u);const e=(0,r.nx)();t||(u=(0,Pe.wg)((0,f.dm)(()=>g({hadActivity:!0,end:e})),100))}),h=()=>{d=!0,(0,Pe.DJ)(l),(0,Pe.DJ)(u),(0,Pe.DJ)(p),m.unsubscribe()};function g(t){d||(h(),i(t))}return{stop:h}}function mr(t,e,n,r){return new i.cP(o=>{const i=[];let s,a=0;return i.push(e.subscribe(t=>{t.every(gr)||c()}),n.subscribe(c),ur({type:cr.RESOURCE}).subscribe(t=>{t.some(t=>!hr(r,t.name))&&c()}),t.subscribe(7,t=>{hr(r,t.url)||(void 0===s&&(s=t.requestIndex),a+=1,c())}),t.subscribe(8,t=>{hr(r,t.url)||void 0===s||t.requestIndex<s||(a-=1,c())})),()=>{i.forEach(t=>t.unsubscribe())};function c(){o.notify({isBusy:a>0})}})}function hr(t,e){return Re(t.excludedActivityUrls,e)}function gr(t){const e="characterData"===t.type?t.target.parentElement:t.target;return!!(e&&nr(e)&&e.matches(`[${fr}], [${fr}] *`))}const yr="data-dd-action-name",vr="Masked Element",br=[yr,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],_r=[Ar,Er],wr=[Ar,function(t){if("BODY"===t.tagName)return;const e=t.classList;for(let n=0;n<e.length;n+=1){const r=e[n];if(!xr(r))return`${CSS.escape(t.tagName)}.${CSS.escape(r)}`}},Cr];function Sr(t,e){if(!t.isConnected)return;const n=function(t){const e=[];let n=t;for(;n;){const t=n.getRootNode();if(e.push({rootNode:t,target:n}),!or(t))break;n=t.host}return e.reverse()}(t),r=[];for(const{rootNode:t,target:o}of n){const n=kr(o,t,e);if(!n)return;r.push(n)}return r.join("::shadow ")}function kr(t,e,n){let r,o=t;for(;o&&"HTML"!==o.nodeName;){const t=Or(o,e,_r,Nr,n,r);if(t)return Pr(t,r);r=Pr(Or(o,e,wr,Mr,n,r)||Ir(o),r),o=o.parentElement}return r}function xr(t){return/[0-9]/.test(t)}function Er(t){if(t.id&&!xr(t.id))return"#"+CSS.escape(t.id)}function Cr(t){return CSS.escape(t.tagName)}function Ar(t,e){if(e){const t=n(e);if(t)return t}for(const t of br){const e=n(t);if(e)return e}function n(e){if(t.hasAttribute(e))return`${CSS.escape(t.tagName)}${Tr(e,t.getAttribute(e))}`}}function Tr(t,e){return`[${t}="${CSS.escape(e)}"]`}function Ir(t){const e=Rr(t);return`${CSS.escape(t.tagName)}:nth-of-type(${e})`}function Rr(t){let e=t.parentNode.firstElementChild,n=1;for(;e&&e!==t;)e.tagName===t.tagName&&(n+=1),e=e.nextElementSibling;return n}function Or(t,e,n,r,o,i){for(const s of n){const n=s(t,o);if(n&&r(t,e,n,i))return n}}function Nr(t,e,n,r){return 1===e.querySelectorAll(Pr(n,r)).length}function Mr(t,e,n,r){let o;if(void 0===r)o=t=>t.matches(n);else{const t=Pr(n+":scope",r);o=e=>null!==e.querySelector(t)}let i=t.previousElementSibling;for(;i;){if(o(i))return!1;i=i.previousElementSibling}for(i=t.nextElementSibling;i;){if(o(i))return!1;i=i.nextElementSibling}return!0}function Pr(t,e){return e?`${t}>${e}`:t}const Dr={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:_t.ALLOW,MASK:_t.MASK,MASK_USER_INPUT:_t.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:_t.MASK_UNLESS_ALLOWLISTED},Vr="data-dd-privacy",Lr="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",$r={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function Ur(t){return`[${Vr}="${t}"], .dd-privacy-${t}`}function zr(t,e,n){if(n?.has(t))return n.get(t);const r=sr(t),o=r?zr(r,e,n):e,i=jr(qr(t),o);return n&&n.set(t,i),i}function jr(t,e){switch(e){case Dr.HIDDEN:case Dr.IGNORE:return e}switch(t){case Dr.ALLOW:case Dr.MASK:case Dr.MASK_USER_INPUT:case Dr.MASK_UNLESS_ALLOWLISTED:case Dr.HIDDEN:case Dr.IGNORE:return t;default:return e}}function qr(t){if(nr(t)){if("BASE"===t.tagName)return Dr.ALLOW;if("INPUT"===t.tagName){const e=t;if("password"===e.type||"email"===e.type||"tel"===e.type)return Dr.MASK;if("hidden"===e.type)return Dr.MASK;const n=e.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return Dr.MASK}return t.matches(Ur(Dr.HIDDEN))?Dr.HIDDEN:t.matches(Ur(Dr.MASK))?Dr.MASK:t.matches(Ur(Dr.MASK_UNLESS_ALLOWLISTED))?Dr.MASK_UNLESS_ALLOWLISTED:t.matches(Ur(Dr.MASK_USER_INPUT))?Dr.MASK_USER_INPUT:t.matches(Ur(Dr.ALLOW))?Dr.ALLOW:function(t){if("SCRIPT"===t.nodeName)return!0;if("LINK"===t.nodeName){const t=e("rel");return/preload|prefetch/i.test(t)&&"script"===e("as")||"shortcut icon"===t||"icon"===t}if("META"===t.nodeName){const n=e("name"),r=e("rel"),o=e("property");return/^msapplication-tile(image|color)$/.test(n)||"application-name"===n||"icon"===r||"apple-touch-icon"===r||"shortcut icon"===r||"keywords"===n||"description"===n||/^(og|twitter|fb):/.test(o)||/^(og|twitter):/.test(n)||"pinterest"===n||"robots"===n||"googlebot"===n||"bingbot"===n||t.hasAttribute("http-equiv")||"author"===n||"generator"===n||"framework"===n||"publisher"===n||"progid"===n||/^article:/.test(o)||/^product:/.test(o)||"google-site-verification"===n||"yandex-verification"===n||"csrf-token"===n||"p:domain_verify"===n||"verify-v1"===n||"verification"===n||"shopify-checkout-api-token"===n}function e(e){return(t.getAttribute(e)||"").toLowerCase()}return!1}(t)?Dr.IGNORE:void 0}}function Br(t,e){switch(e){case Dr.MASK:case Dr.HIDDEN:case Dr.IGNORE:return!0;case Dr.MASK_UNLESS_ALLOWLISTED:return er(t)?!!Gr(t.parentNode)||!Hr(t.textContent||""):Gr(t);case Dr.MASK_USER_INPUT:return er(t)?Gr(t.parentNode):Gr(t);default:return!1}}function Fr(t,e,n,r,o){if(r!==Dr.MASK&&r!==Dr.MASK_UNLESS_ALLOWLISTED)return!1;if(e===Vr||br.includes(e)||e===o.actionNameAttribute)return!1;switch(e){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return"A"===t&&"href"===e||"IFRAME"===t&&"srcdoc"===e||!(!n||!e.startsWith("data-"))||!("IMG"!==t&&"SOURCE"!==t||"src"!==e&&"srcset"!==e)}function Gr(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;const e=t;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!$r[e.tagName]}function Wr(t){return t.replace(/\S/g,"x")}function Jr(t,e){const n=t.parentElement?.tagName;let r=t.textContent||"";const o=e;return"SCRIPT"===n||o===Dr.HIDDEN?r="***":Br(t,o)&&("DATALIST"===n||"SELECT"===n||"OPTGROUP"===n||(r="OPTION"===n?"***":Wr(r))),"HEAD"!==n||r.trim()?r:""}function Hr(t){return!t?.trim()||window.$DD_ALLOW?.has(t.toLocaleLowerCase())||!1}function Kr({lifeCycle:t,isChildEvent:e,onChange:n=m.l}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=t.subscribe(14,t=>{if("view"!==t.type&&"vital"!==t.type&&e(t))switch(t.type){case dt.ERROR:r.errorCount+=1,n();break;case dt.ACTION:r.actionCount+=1,t.action.frustration&&(r.frustrationCount+=t.action.frustration.type.length),n();break;case dt.LONG_TASK:r.longTaskCount+=1,n();break;case dt.RESOURCE:t._dd?.discarded||(r.resourceCount+=1,n())}});return{stop(){o.unsubscribe()},eventCounts:r}}function Qr(t){const e=(0,Me.qj)({expireDelay:3e5}),n=new Map;function i(t){n.delete(t.key),t.eventCounts?.stop()}function s(){n.forEach(t=>{i(t)}),e.reset()}const a=t.subscribe(11,s);return{start(r,o,s,a){const c=it(),u=e.add(c,o.relative),d=n.get(r);d&&i(d);const l={id:c,key:r,startClocks:o,data:s,historyEntry:u,eventCounts:a?.isChildEvent?Kr({lifeCycle:t,isChildEvent:a.isChildEvent(c)}):void 0};return n.set(r,l),l},stop(t,e,s){const a=n.get(t);if(!a)return;const c=s?(0,o.kg)(a.data,s):a.data;a.historyEntry.close(e.relative);const u=(0,r.vk)(a.startClocks.timeStamp,e.timeStamp),d=a.eventCounts?.eventCounts;return i(a),{...c,id:a.id,startClocks:a.startClocks,duration:u,counts:d}},discard(t){const e=n.get(t);if(!e)return;const r=e.eventCounts?.eventCounts;return i(e),e.historyEntry.remove(),{...e.data,id:e.id,startClocks:e.startClocks,counts:r}},getCounts:t=>n.get(t)?.eventCounts?.eventCounts,findId:t=>e.findAll(t),stopAll(){a.unsubscribe(),s(),e.stop()}}}const Zr=["HTML","BODY"],Yr=br.concat(["role","type","disabled","readonly","tabindex","draggable","target","rel","download","method","action","enctype","autocomplete"]);function Xr(t,e){const n=Cr(t),r=Er(t),o=function(t){return Array.from(t.classList).filter(t=>!xr(t)).sort().map(t=>"."+CSS.escape(t)).join("")}(t),i=function(t,e){const n=[],r=Array.from(t.attributes);for(const t of r)e.includes(t.name)&&n.push(Tr(t.name,t.value));return n.sort().join("")}(t,e),s=function(t){const e=Array.from(t.parentNode.children);if(e.length<=1)return"";const n=e.filter(e=>e.tagName===t.tagName),r=e.indexOf(t),o=Rr(t);return`:nth-child(${r+1})${n.length>1?`:nth-of-type(${o})`:""}`}(t);return`${n}${r||""}${i}${o}${s};`}function to(t,e){const n=function(t,e){let n=t;for(;n;){if(n.matches(e))return n;n=ar(n)}return null}(t,`[${e}]`);if(n)return io(oo(n.getAttribute(e).trim()))}const eo=[(t,e,n)=>{if("labels"in t&&t.labels&&t.labels.length>0)return ao(t.labels[0],e,n)},t=>{if("INPUT"===t.nodeName){const e=t,n=e.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return{name:e.value,nameSource:"text_content"}}},(t,e,n)=>{if("BUTTON"===t.nodeName||"LABEL"===t.nodeName||"button"===t.getAttribute("role"))return ao(t,e,n)},(t,e,n)=>so(t,"aria-label",e,n),(t,e,n)=>{const r=t.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(e=>function(t,e){const n=t.getRootNode();if(n instanceof ShadowRoot){const t=n.getElementById(e);if(t)return t}return t.ownerDocument?t.ownerDocument.getElementById(e):null}(t,e)).filter(t=>!!t).map(t=>co(t,e,n)).join(" "),nameSource:"text_content"}},(t,e,n)=>so(t,"alt",e,n),(t,e,n)=>so(t,"name",e,n),(t,e,n)=>so(t,"title",e,n),(t,e,n)=>so(t,"placeholder",e,n),(t,e,n)=>{if("options"in t&&t.options.length>0)return ao(t.options[0],e,n)}],no=[(t,e,n)=>ao(t,e,n)];function ro(t,e,n,r){let o=t,i=0;for(;i<=10&&o&&"BODY"!==o.nodeName&&"HTML"!==o.nodeName&&"HEAD"!==o.nodeName;){for(const t of e){const e=t(o,n,r);if(e){const{name:t,nameSource:n}=e,r=t?.trim();if(r)return{name:io(oo(r)),nameSource:n}}}if("FORM"===o.nodeName)break;o=ar(o),i+=1}}function oo(t){return t.replace(/\s+/g," ")}function io(t){return t.length>100?ct(t,100)+" [...]":t}function so(t,e,n,r){const{enablePrivacyForActionName:o,defaultPrivacyLevel:i}=n;let s=t.getAttribute(e);if(s&&o){const o=zr(t,i,r);Fr(t.tagName,e,s,o,n)&&(c=vr,s=Hr(a=s)?a:c||Wr(a))}else s||(s="");var a,c;return{name:s,nameSource:"standard_attribute"}}function ao(t,e,n){return{name:co(t,e,n)||"",nameSource:"text_content"}}function co(t,e,n){if(t.isContentEditable)return;const{enablePrivacyForActionName:r,actionNameAttribute:o,defaultPrivacyLevel:i}=e,s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,function(t){const e=zr(t,i,n);if(r&&e&&Br(t,e))return NodeFilter.FILTER_REJECT;if(nr(t)){if(t.hasAttribute(yr)||o&&t.hasAttribute(o))return NodeFilter.FILTER_REJECT;const e=getComputedStyle(t);if("visible"!==e.visibility||"none"===e.display||e.contentVisibility&&"visible"!==e.contentVisibility)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT});let a="";for(;s.nextNode();){const t=s.currentNode;nr(t)?("BR"===t.nodeName||"P"===t.nodeName||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(t).display))&&(a+=" "):a+=t.textContent||""}return a.replace(/\s+/g," ").trim()}function uo(){const t=window.getSelection();return!t||t.isCollapsed}function lo(t){return t.target instanceof Element&&!1!==t.isPrimary}function fo(t){if(t.hasPageActivity||t.getUserActivity().input||t.getUserActivity().scroll)return!1;let e=t.event.target;return"LABEL"===e.tagName&&e.hasAttribute("for")&&(e=document.getElementById(e.getAttribute("for"))),!e?.matches('input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *')}const po=new Map;function mo(t,e){po.set(t,e),po.forEach((t,e)=>{(0,r.vk)(e,(0,r.$S)())>1e4&&po.delete(e)})}function ho(t){return e=>e.action?.id?.includes(t)??!1}function go(t,e,n,o){const s=Qr(t),a=new i.cP;let c;t.subscribe(5,l),t.subscribe(12,l);const{stop:u}=function({onPointerDown:t,onPointerUp:e}){let n,r,o={selection:!1,input:!1,scroll:!1};const i=[(0,b.q2)(window,"pointerdown",e=>{lo(e)&&(n=uo(),o={selection:!1,input:!1,scroll:!1},r=t(e))},{capture:!0}),(0,b.q2)(window,"selectionchange",()=>{n&&uo()||(o.selection=!0)},{capture:!0}),(0,b.q2)(window,"scroll",()=>{o.scroll=!0},{capture:!0,passive:!0}),(0,b.q2)(window,"pointerup",t=>{if(lo(t)&&r){const n=o;e(r,t,()=>n),r=void 0}},{capture:!0}),(0,b.q2)(window,"input",()=>{o.input=!0},{capture:!0})];return{stop(){i.forEach(t=>t.stop())}}}({onPointerDown:r=>function(t,e,n,r,o){let i;if(i=t.enablePrivacyForActionName?zr(yo(r),t.defaultPrivacyLevel):Dr.ALLOW,i===Dr.HIDDEN)return;const s=function(t,e,n){const r=yo(t),o=r.getBoundingClientRect(),i=Sr(r,n.actionNameAttribute),s=function(t,e){const n=t.filter(t=>t instanceof Element&&!Zr.includes(t.tagName));if(0===n.length)return"";const r=e?[e].concat(Yr):Yr;let o="";for(const t of n)if(o+=Xr(t,r),o.length>=2048)return ct(o,2048);return o}(t.composedPath(),n.actionNameAttribute);i&&mo(t.timeStamp,i);const{name:a,nameSource:c}=function(t,e,n=Dr.ALLOW){const r=new Map,{actionNameAttribute:o}=e,i=to(t,yr)||o&&to(t,o);return i?{name:i,nameSource:"custom_attribute"}:n===Dr.MASK?{name:vr,nameSource:"mask_placeholder"}:ro(t,eo,e,r)||ro(t,no,e,r)||{name:"",nameSource:"blank"}}(r,n,e);return{type:"click",target:{width:Math.round(o.width),height:Math.round(o.height),selector:i,composedPathSelector:s||void 0},position:{x:Math.round(t.clientX-o.left),y:Math.round(t.clientY-o.top)},name:a,nameSource:c}}(r,i,t);let a=!1;return pr(e,n,o,t,t=>{a=t.hadActivity},100),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}(o,t,e,r,n),onPointerUp({clickActionBase:i,hadActivityOnPointerDown:c},u,l){!function(t,e,n,o,i,s,a,c,u,d,l){const f=vo(e,i,d,c,u);a(f);const p=c?.target?.selector;p&&mo(u.timeStamp,p);const{stop:m}=pr(e,n,o,t,t=>{t.hadActivity&&t.end<f.startClocks.timeStamp?f.discard():t.hadActivity?f.stop(t.end):l()?f.stop(f.startClocks.timeStamp):f.stop()},1e4),h=e.subscribe(5,({endClocks:t})=>{f.stop(t.timeStamp)}),g=e.subscribe(12,()=>{f.stop((0,r.nx)())}),y=s.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{g.unsubscribe(),h.unsubscribe(),m(),y.unsubscribe()})}(o,t,e,n,s,a,d,i,u,l,c)}});return{stop(){l(),a.notify(),u(),s.stopAll()},findActionId:s.findId};function d(t){if(!c?.tryAppend(t)){const e=t.clone();c=function(t){const n=[];let o,i=0;function s(t){t.stopObservable.subscribe(a),n.push(t),(0,Pe.DJ)(o),o=(0,Pe.wg)(u,1e3)}function a(){1===i&&n.every(t=>t.isStopped())&&(i=2,function(t,e){const{isRage:n}=function(t,e){if(function(t){if(t.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let e=0;e<t.length-2;e+=1)if(t[e+3-1].event.timeStamp-t[e].event.timeStamp<=1e3)return!0;return!1}(t))return e.addFrustration("rage_click"),t.some(fo)&&e.addFrustration(yt),e.hasError&&e.addFrustration(gt),{isRage:!0};const n=t.some(t=>t.getUserActivity().selection);return t.forEach(t=>{t.hasError&&t.addFrustration(gt),fo(t)&&!n&&t.addFrustration(yt)}),{isRage:!1}}(t,e);n?(t.forEach(t=>t.discard()),e.stop((0,r.nx)()),e.validate(t.map(t=>t.event))):(e.discard(),t.forEach(t=>t.validate()))}(n,e),c=void 0)}function u(){(0,Pe.DJ)(o),0===i&&(i=1,a())}return s(t),{tryAppend(t){return 0===i&&(n.length>0&&(e=n[n.length-1].event,r=t.event,!(e.target===r.target&&(o=e,a=r,Math.sqrt(Math.pow(o.clientX-a.clientX,2)+Math.pow(o.clientY-a.clientY,2))<=100)&&e.timeStamp-r.timeStamp<=1e3))?(u(),!1):(s(t),!0));var e,r,o,a},stop(){u()}}}(t)}}function l(){c&&c.stop()}}function yo(t){if(t.composed&&rr(t.target)&&"function"==typeof t.composedPath){const e=t.composedPath();if(e.length>0&&e[0]instanceof Element)return e[0]}return t.target}function vo(t,e,n,o,s){const a=it(),c=(0,r.FR)(s.timeStamp),u=e.start(a,c,o,{isChildEvent:ho});t.notify(16,u);let d,l=0;const f=[],p=new i.cP;function m(t){0===l&&(l=1,d=t?e.stop(a,(0,r.jR)(t)):e.discard(a),p.notify())}return{event:s,stop:m,stopObservable:p,get hasError(){const t=d?.counts??e.getCounts(a);return!!t&&t.errorCount>0},get hasPageActivity(){return d&&"duration"in d},getUserActivity:n,addFrustration(t){f.push(t)},get startClocks(){return c},isStopped:()=>1===l||2===l,clone:()=>vo(t,e,n,o,s),validate(e){if(m(),1!==l)return;if(!d)return;const n={frustrationTypes:f,events:e??[s],event:s,...d,counts:d.counts};t.notify(0,n),l=2},discard(){m(),l=2}}}function bo(t){const e=function(t){return"events"in t}(t),n=tr((0,r.Zj)(t.duration));return{rawRumEvent:{type:dt.ACTION,date:t.startClocks.timeStamp,action:{id:t.id,target:{name:t.name},type:t.type,...void 0!==n&&{loading_time:n},...t.counts&&{error:{count:t.counts.errorCount},long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}},frustration:{type:t.frustrationTypes}},...e?{_dd:{action:{target:{selector:t.target?.selector||void 0,width:t.target?.width||void 0,height:t.target?.height||void 0,composed_path_selector:t.target?.composedPathSelector},position:t.position,name_source:t.nameSource}}}:{context:t.context}},duration:t.duration,startClocks:t.startClocks,domainContext:e?{events:t.events}:{handlingStack:t.handlingStack}}}const _o="csp_violation";function wo(t){return{startClocks:(0,r.M8)(),source:F.g.REPORT,handling:"unhandled",...t}}function So(t,e,n,r,o){return n?(0,P.Yn)({name:t,message:e,stack:[{func:"?",url:n,line:r??void 0,column:o??void 0}]}):void 0}var ko=n(7922);function xo(){const t=[];function e(e){let r;if(!e||e.didTimeout){const t=performance.now();r=()=>30-(performance.now()-t)}else r=e.timeRemaining.bind(e);for(;r()>0&&t.length;)t.shift()();t.length&&n()}function n(){(0,ko.BB)(e,{timeout:1e3})}return{push(e){1===t.push(e)&&n()},stop(){t.length=0}}}var Eo=n(7409);function Co(){if(lr(cr.NAVIGATION)){const t=performance.getEntriesByType(cr.NAVIGATION)[0];if(t&&function(t){return!(t.loadEventEnd>0&&t.domComplete<=0)}(t))return t}const t=function(){const t={},e=performance.timing;for(const n in e)if(At(e[n])){const o=n,i=e[o];t[o]=0===i?0:(0,r.d6)(i)}return t}(),e={entryType:cr.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:t.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...e,toJSON:void 0}),...t};return e}function Ao(t){return t.responseStart>=0&&t.responseStart<=(0,r.$S)()?t.responseStart:void 0}function To(t){const e=function(t){const e=t.querySelector("meta[name=dd-trace-id]"),n=t.querySelector("meta[name=dd-trace-time]");return Io(e?.content,n?.content)}(t)||function(t){const e=function(t){for(let e=0;e<t.childNodes.length;e+=1){const n=Ro(t.childNodes[e]);if(n)return n}if(t.body)for(let e=t.body.childNodes.length-1;e>=0;e-=1){const n=t.body.childNodes[e],r=Ro(n);if(r)return r;if(!er(n))break}}(t);if(e)return Io(at(e,"trace-id"),at(e,"trace-time"))}(t);if(e&&!(e.traceTime<=(0,r.uc)()-12e4))return e.traceId}function Io(t,e){const n=e&&Number(e);if(t&&n)return{traceId:t,traceTime:n}}function Ro(t){if(t&&function(t){return t.nodeType===Node.COMMENT_NODE}(t)){const e=/^\s*DATADOG;(.*?)\s*$/.exec(t.data);if(e)return e[1]}}function Oo(t,e,n){const i=e?function(t,e){if(t.traceSampled&&t.traceId&&t.spanId)return{_dd:{span_id:t.spanId.toString(),trace_id:t.traceId.toString(),rule_psr:e.rulePsr}}}(e,n):function(t,e){if("navigation"!==t.initiatorType)return;const n=(0,c.B)(To)(document);return n?{_dd:{trace_id:n,span_id:Bn().toString(),rule_psr:e.rulePsr}}:void 0}(t,n);if(!n.trackResources&&!i)return;const s=(0,r.FR)(t.startTime),a=function(t){const{duration:e,startTime:n,responseEnd:o}=t;return"navigation"===t.initiatorType||0===e&&n<o?(0,r.vk)(n,o):e}(t),u=function(t,e){const n=e.trackResourceHeaders;if(0===n.length||!t)return;const r=n.filter(e=>void 0===e.url||Re([e.url],t.url,!0));if(0===r.length)return;const o=r.filter(t=>void 0===t.location||"any"===t.location||"response"===t.location),i=r.filter(t=>void 0===t.location||"any"===t.location||"request"===t.location),s=o.length>0?function(t,e){if(t.type===Rn&&t.response)return Vo(t.response.headers,e);if("xhr"===t.type&&t.xhr){const n=t.xhr.getAllResponseHeaders();if(n)try{return Vo(new Headers(function(t){const e=[],n=t.trim().split(/\r\n/);for(const t of n){const n=t.indexOf(":");n>0&&e.push([t.substring(0,n).trim(),t.substring(n+1).trim()])}return e}(n)),e)}catch{}}}(t,o):void 0,a=i.length>0?function(t,e){if(t.type!==Rn)return;let n;return t.init?.headers?n=new Headers(t.init.headers):t.input instanceof Request&&(n=t.input.headers),n?Vo(n,e):void 0}(t,i):void 0;return s||a?{resource:{request:a?{headers:a}:void 0,response:s?{headers:s}:void 0}}:void 0}(e,n),d=(0,o.kg)({date:s.timeStamp,resource:{id:it(),duration:(0,r.Zj)(a),type:Nn(t),method:e?.method,status_code:e?e.status:(l=t.responseStatus,0===l?void 0:l),url:e?qn(e.url):t.name,protocol:Ln(t),delivery_type:$n(t),graphql:e&&No(e,n),render_blocking_status:t.renderBlockingStatus,...Un(t),...Dn(t)},type:dt.RESOURCE,_dd:{discarded:!n.trackResources}},i,function(t){const e=t.contentType;if(e)return{resource:{response:{headers:{"content-type":e}}}}}(t),u);var l;return{startClocks:s,duration:a,rawRumEvent:d,domainContext:Mo(t,e)}}function No(t,e){const n=Hn(t.url,e);if(n)return function(t,e){const n=function(t,e=!1){let n;if("POST"===t.method?n=function(t){if(!t||"string"!=typeof t)return;const e=(0,Dt.XU)(t);return e?{query:e.query,operationName:e.operationName,variables:e.variables?JSON.stringify(e.variables):void 0,operationType:e.operationType}:void 0}(t.requestBody):"GET"===t.method&&(n=function(t){const e=(0,d.c$)(t).searchParams,n=e.get("variables"),r=n&&void 0!==(0,Dt.XU)(n)?n:void 0;return{query:e.get("query")||void 0,operationName:e.get("operationName")||void 0,variables:r,operationType:e.get("operationType")||void 0}}(t.url)),n)return function(t,e){let n,r,o;if(t.query){const o=t.query.trim();i=o,n=i.match(/^\s*(query|mutation|subscription)\b/i)?.[1],e&&(r=ct(o,32768,"..."))}var i;if(!n){const e=t.operationType;"query"!==e&&"mutation"!==e&&"subscription"!==e||(n=e)}return t.variables&&(o=t.variables),{operationType:n,operationName:t.operationName,variables:o,payload:r}}(n,e)}(t,e.trackPayload);if(n){if(e.trackResponseErrors&&t.responseBody){const e=function(t){const e=(0,Dt.XU)(t);if(!e||"object"!=typeof e)return;const n=e;return(0,Tt.EI)(n.errors)?n.errors.map(t=>({message:t.message,path:t.path,locations:t.locations,code:t.extensions?.code})):void 0}(t.responseBody);e&&(n.error_count=e.length,n.errors=e)}return n}}(t,n)}function Mo(t,e){return{performanceEntry:t,isManual:!1,isAborted:!!e&&e.isAborted,isWebSocket:!1,handlingStack:e?.handlingStack,requestInit:e?.init,requestInput:e?.input,response:e?.response,error:e?.error,xhr:e?.xhr}}const Po=/(token|cookie|secret|authorization|(api|secret|access|app).?key|(client|connecting|real).?ip|forwarded)/,Do=t=>le.includes(t);function Vo(t,e){const n={};let r=0,o=!1;return t.forEach((t,i)=>{if(r>=100)return void(o||(T.V.warn("Maximum number of headers (100) has been reached. Further headers are dropped."),o=!0));const s=i.toLowerCase();if(Po.test(s))return;const a=e.find(t=>Re([t.name??Do],s));if(!a)return;const{extractor:c}=a,u=c?Gt(t,c):t;void 0!==u&&(u.length>128&&T.V.warn(`Header "${s}" value was truncated from ${u.length} to 128 characters.`),n[s]=ct(u,128),r++)}),r>0?n:void 0}function Lo(){try{return(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch{return}}function $o(t,e=window){if("hidden"===document.visibilityState)return{timeStamp:0,stop:m.l};if(lr(cr.VISIBILITY_STATE)){const e=performance.getEntriesByType(cr.VISIBILITY_STATE).filter(t=>"hidden"===t.name).find(e=>e.startTime>=t.relative);if(e)return{timeStamp:e.startTime,stop:m.l}}let n=1/0;const{stop:r}=(0,b.lQ)(e,["pagehide","visibilitychange"],t=>{"pagehide"!==t.type&&"hidden"!==document.visibilityState||(n=t.timeStamp,r())},{capture:!0});return{get timeStamp(){return n},stop:r}}function Uo(t,e,n,r){const o={},{stop:i}=(d=t=>{n(t.loadEvent),o.navigationTimings=t,r()},function(t){let e;const{stop:n}=(0,Eo.H)("complete",()=>{e=(0,Pe.wg)(()=>t())});return{stop(){n(),(0,Pe.DJ)(e)}}}(()=>{const t=(0,c.B)(Co)();(function(t){return t.loadEventEnd<=0})(t)||d(function(t){return{domComplete:t.domComplete,domContentLoaded:t.domContentLoadedEventEnd,domInteractive:t.domInteractive,loadEvent:t.loadEventEnd,firstByte:Ao(t)}}(t))})),s=$o(e),{stop:a}=function(t){return{stop:ur({type:cr.PAINT,buffered:!0}).subscribe(e=>{const n=e.find(e=>"first-contentful-paint"===e.name&&e.startTime<t.timeStamp&&e.startTime<6e5);var i;n&&(i=n.startTime,o.firstContentfulPaint=i,r())}).unsubscribe}}(s),{stop:u}=function(t,e,n){let i=1/0;const{stop:s}=(0,b.lQ)(n,["pointerdown","keydown"],t=>{i=t.timeStamp},{capture:!0,once:!0});let a=0;const c=ur({type:cr.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(n=>{const s=(0,Ve.Uk)(n,t=>t.entryType===cr.LARGEST_CONTENTFUL_PAINT&&t.startTime<i&&t.startTime<e.timeStamp&&t.startTime<6e5&&t.size>a);if(s){let e;s.element&&(e=Sr(s.element,t.actionNameAttribute));const n=""===(u=s).url?void 0:u.url,i=s.startTime,d=function(t,e){const n=Ao(Co());if(void 0===n)return;const r=t?function(t,e){const n=function(){if(lr(cr.RESOURCE))return performance.getEntriesByType(cr.RESOURCE)}();if(n)return(0,Ve.Uk)(n,n=>n.name===t&&n.startTime<=e)}(t,e):void 0,o=r?Math.max(n,r.requestStart||r.startTime):n,i=Math.min(e,Math.max(o,r?.responseEnd||0));return{loadDelay:o-n,loadTime:i-o,renderDelay:e-i}}(n,i);c={value:i,targetSelector:e,resourceUrl:n,subParts:d},o.largestContentfulPaint=c,r(),a=s.size}var c,u});return{stop(){s(),c.unsubscribe()}}}(t,s,window);var d;return{stop(){i(),a(),u(),s.stop()},initialViewMetrics:o}}const zo=(t,e)=>t*e,jo=t=>zo(t.previousRect.width,t.previousRect.height)+zo(t.currentRect.width,t.currentRect.height)-((t,e)=>{const n=Math.max(t.left,e.left),r=Math.max(t.top,e.top),o=Math.min(t.right,e.right),i=Math.min(t.bottom,e.bottom);return n>=o||r>=i?0:zo(o-n,i-r)})(t.previousRect,t.currentRect);function qo(t){let e;for(const n of t)if(n.node&&nr(n.node)){const t=jo(n);(!e||jo(e)<t)&&(e=n)}return e}function Bo({x:t,y:e,width:n,height:r}){return{x:t,y:e,width:n,height:r}}let Fo,Go=0,Wo=1/0,Jo=0;const Ho=()=>Fo?Go:window.performance.interactionCount||0;function Ko(t){return Math.min(t,6e4)}function Qo(){let t;const e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function Zo(){let t;const e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}let Yo;function Xo(){return Yo||(Yo=new i.cP(t=>{const{throttled:e}=(0,m.n)(()=>{t.notify(ti())},200);return(0,b.q2)(window,"resize",e,{capture:!0,passive:!0}).stop})),Yo}function ti(){const t=window.visualViewport;return t?{width:Number(t.width*t.scale),height:Number(t.height*t.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}function ei(t){const e=t.indexOf("?");return e<0?t:t.slice(0,e)}function ni({cumulativeLayoutShift:t,interactionToNextPaint:e},{firstContentfulPaint:n,largestContentfulPaint:o}){return{cls:t&&{score:t.value,timestamp:(0,r.Zj)(t.time),target_selector:t.targetSelector,previous_rect:t.previousRect,current_rect:t.currentRect},fcp:n&&{timestamp:(0,r.Zj)(n)},inp:e&&{duration:(0,r.Zj)(e.value),timestamp:(0,r.Zj)(e.time),target_selector:e.targetSelector,sub_parts:e.subParts?{input_delay:(0,r.Zj)(e.subParts.inputDelay),processing_duration:(0,r.Zj)(e.subParts.processingDuration),presentation_delay:(0,r.Zj)(e.subParts.presentationDelay)}:void 0},lcp:o&&{timestamp:(0,r.Zj)(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl,sub_parts:o.subParts?{load_delay:(0,r.Zj)(o.subParts.loadDelay),load_time:(0,r.Zj)(o.subParts.loadTime),render_delay:(0,r.Zj)(o.subParts.renderDelay)}:void 0}}}var ri=n(6625);function oi(t,e){if(t===e)return!0;if(null===t||"object"!=typeof t||null===e||"object"!=typeof e)return t===e;if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&t.every((t,n)=>oi(t,e[n]));if(Array.isArray(t)||Array.isArray(e))return!1;const n=t,r=e,o=Object.keys(n),i=Object.keys(r);return o.length===i.length&&o.every(t=>i.includes(t)&&oi(n[t],r[t]))}function ii(t,e,n){const r={},o=n?.replaceKeys??new Set,i=n?.appendKeys??new Set,s=n?.ignoreKeys??new Set;for(const n of Object.keys(t)){if(s.has(n))continue;const a=t[n],c=e[n];if(!o.has(n)&&(0,A.OE)(a)&&(0,A.OE)(c)){const t=ii(a,c,{replaceKeys:si(o,n),appendKeys:si(i,n),ignoreKeys:si(s,n)});t&&(r[n]=t)}else i.has(n)&&Array.isArray(a)&&Array.isArray(c)?a.length>c.length&&(r[n]=a.slice(c.length)):oi(a,c)||(r[n]=a)}for(const n of Object.keys(e))n in t||(r[n]=null);return Object.keys(r).length>0?r:void 0}function si(t,e){const n=new Set;for(const r of t)r.startsWith(e+".")&&n.add(r.slice(e.length+1));return n}function ai(t,e){const n=ii(t,e,{replaceKeys:new Set(["view.custom_timings","context","connectivity","usr","device","privacy"]),appendKeys:new Set(["_dd.page_states"]),ignoreKeys:new Set(["date","type","application","session","view.id","view.url","_dd.document_version","_dd.format_version"])});if(n)return(0,o.kg)(n,{type:dt.VIEW_UPDATE,date:t.date,application:t.application,session:t.session,view:{id:t.view.id,url:t.view.url},_dd:{document_version:t._dd.document_version,format_version:t._dd.format_version}})}const ci=Le.AQ;function ui(){return(0,c.B)(u.J.location)}function di(t){return Object.prototype.hasOwnProperty.call(history,t)?history:History.prototype}const li=Le.AQ;let fi,pi;function mi(){0!==fi.batchCount&&((0,E.Gk)("Customer data measures",fi),gi())}function hi(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function gi(){fi={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0}}}const yi=Le.AQ;function vi(t,e,n){if(0!==t.length)return t.slice(-n).reverse().map(({state:t,startTime:n})=>({state:t,start:(0,r.Zj)((0,r.vk)(e,n))}))}function bi(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}function _i(t){const{startClocks:e,type:n,name:o,description:i,context:s,handlingStack:a}=t,c={id:(t.type===vt.DURATION?t.id:void 0)??it(),type:n,name:o,description:i,...n===vt.DURATION?{duration:(0,r.Zj)(t.duration)}:{step_type:t.stepType,operation_key:t.operationKey,failure_reason:t.failureReason}};return{rawRumEvent:{date:e.timeStamp,vital:c,type:dt.VITAL,context:s},startClocks:e,duration:n===vt.DURATION?t.duration:void 0,domainContext:a?{handlingStack:a}:{}}}function wi(t,e){let n=Lt(t);const r=(0,Pe.yb)(()=>{const r=Lt(t);r!==n&&(n=r,e(r))},1e3);return()=>{(0,Pe.vG)(r)}}const Si="datadog-ci-visibility-test-execution-id";function ki(t,e){const n=it(),o=(0,r.Zj)(t.duration),i={date:e.timeStamp,type:dt.LONG_TASK,_dd:{discarded:!1}};if(t.entryType===cr.LONG_TASK)return{...i,long_task:{id:n,entry_type:lt.LONG_TASK,duration:o}};const s=t.scripts.map(t=>t.sourceURL).filter(t=>!!t),a=(0,D.Jv)(s);return{...i,_dd:{discarded:!1,debug_ids:a},long_task:{id:n,entry_type:lt.LONG_ANIMATION_FRAME,duration:o,blocking_duration:(0,r.Zj)(t.blockingDuration),first_ui_event_timestamp:(0,r.Zj)(t.firstUIEventTimestamp),render_start:(0,r.Zj)(t.renderStart),style_and_layout_start:(0,r.Zj)(t.styleAndLayoutStart),start_time:(0,r.Zj)(t.startTime),scripts:t.scripts.map(t=>({duration:(0,r.Zj)(t.duration),pause_duration:(0,r.Zj)(t.pauseDuration),forced_style_and_layout_duration:(0,r.Zj)(t.forcedStyleAndLayoutDuration),start_time:(0,r.Zj)(t.startTime),execution_start:(0,r.Zj)(t.executionStart),source_url:t.sourceURL,source_function_name:t.sourceFunctionName,source_char_position:t.sourceCharPosition,invoker:t.invoker,invoker_type:t.invokerType,window_attribution:t.windowAttribution}))}}}function xi(t,e,n=3e3){let r=0,o=!1;return{isLimitReached(){if(0===r&&(0,Pe.wg)(()=>{r=0},6e4),r+=1,r<=n||o)return o=!1,!1;if(r===n+1){o=!0;try{e(`Reached max number of ${t}s by minute: ${n}`)}finally{o=!1}}return!0}}}var Ei=n(98);function Ci(t,e,n){const r=(0,o.Go)(t),i=n(r);return(0,Ve.WP)(e).forEach(([e,n])=>Ai(t,r,e.split(/\.|(?=\[\])/),n)),i}function Ai(t,e,n,r){const[o,...i]=n;if("[]"!==o){if(Ti(t)&&Ti(e))return i.length>0?Ai(t[o],e[o],i,r):void function(t,e,n,r){if(t[e]===n)return;const o=(0,A.Pw)(n);o===r?t[e]=R(n):"object"!==r||"undefined"!==o&&"null"!==o?"array"!==r||"undefined"!==o&&"null"!==o||(t[e]=[]):t[e]={}}(t,o,e[o],r)}else Array.isArray(t)&&Array.isArray(e)&&t.forEach((t,n)=>Ai(t,e[n],i,r))}function Ti(t){return"object"===(0,A.Pw)(t)}const Ii={"view.name":"string","view.url":"string","view.referrer":"string",context:"object",service:"string",version:"string"},Ri={[dt.VIEW]:{...Ii,"view.performance.lcp.resource_url":"string"},[dt.ERROR]:{...Ii,"error.message":"string","error.stack":"string","error.handling_stack":"string","error.resource.url":"string","error.fingerprint":"string","_dd.debug_ids":"array"},[dt.RESOURCE]:{...Ii,"resource.url":"string","resource.graphql.variables":"string","resource.request.headers":"object","resource.response.headers":"object","resource.websocket.close_reason":"string","resource.websocket.protocol":"string"},[dt.ACTION]:{...Ii,"action.target.name":"string"},[dt.LONG_TASK]:{...Ii,"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string","_dd.debug_ids":"array"},[dt.VITAL]:Ii};function Oi(t,e){return(0,kt.d0)()?(0,kt.Ww)("records")?1:0:(0,De.$5)(t.id,(0,De.it)(e.sessionSampleRate,e.sessionReplaySampleRate))?1:t.isReplayForced?2:0}var Ni=n(64);const Mi=[dt.ACTION,dt.ERROR,dt.LONG_TASK,dt.RESOURCE,dt.VITAL];function Pi(t,e,n,s,p,h,g,y,_,w){const k=[],x=new Cn;x.subscribe(14,t=>(0,_n.b)("rum",t)),e.expireObservable.subscribe(()=>x.notify(10,{endClocks:(0,r.M8)()})),e.renewObservable.subscribe(()=>x.notify(11));const A=t=>{x.notify(15,{error:{message:t,source:F.g.AGENT,startClocks:(0,r.M8)()}}),(0,E.A2)("Error reported to customer",{"error.message":t})};if((0,kt.d0)()){!function(t){const e=(0,kt.Y9)();t.subscribe(14,t=>{e.send("rum",t)})}(x);const t=(0,wn._T)().subscribe(t=>{x.notify(12,t.reason)});k.push(()=>t.unsubscribe())}else{const n=function(t,e,n,r,o){const i=[(0,Ft.ns)(t,"rum")],s=(0,Ft.np)(t,"rum");s&&i.push(s);const a=(0,ri.X)({encoder:o(2),endpoints:i,reportError:n});r.subscribe(()=>a.forceFlush("session_expire"));const{dispatch:c,stop:u}=function(t,e){let n,r,o=!1,i=0;const{unsubscribe:s}=t.flushObservable.subscribe(()=>{o=!1,r=n});return{dispatch(s){if(s.type!==dt.VIEW)return void t.add(s);if(!e)return void t.upsert(s,s.view.id);const a=s.view.id;if(!s.view.is_active)return a===n?.view.id&&(n=void 0,r=void 0,o=!1,i=0),void t.upsert(s,a);if(a!==n?.view.id)return i=0,t.upsert(s,a),n=s,void(o=!t.isEmpty);if(n=s,o)t.upsert(s,a);else{if(i+=1,i>=100)return i=0,t.upsert(s,a),void(o=!t.isEmpty);if(r){const e=ai(s,r);e&&((0,_n.b)("rum",e),t.upsert(e,a))}}},stop:s}}(a,t.betaEnableViewUpdates);e.subscribe(14,c);const d=a.stop.bind(a);return a.stop=()=>{u(),d()},a}(t,x,A,e.expireObservable,h),r=n.prepareUrgentFlushObservable.subscribe(t=>{x.notify(12,t)});k.push(()=>r.unsubscribe()),k.push(()=>n.stop()),function(t,e,n){t.metricsEnabled&&(gi(),pi=!1,e.subscribe(14,()=>{pi=!0}),n.subscribe(({bytesCount:t,messagesCount:e})=>{pi&&(pi=!1,fi.batchCount+=1,hi(fi.batchBytesCount,t),hi(fi.batchMessagesCount,e))}),(0,Pe.yb)(mi,1e4))}(y,x,n.flushObservable)}const{stop:I,...O}=function(t,e,n,s,p,h,g,y,_){const w=[],k=function(){const t=En();return new i.cP(e=>{const n=new t((0,f.dm)(t=>e.notify(t)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}(),x=function(){let t=(0,Dt.yG)(ui());return new i.cP(e=>{const{stop:n}=function(t){const{stop:e}=(0,l.H7)(di("pushState"),"pushState",({onPostCall:e})=>{e(t)}),{stop:n}=(0,l.H7)(di("replaceState"),"replaceState",({onPostCall:e})=>{e(t)}),{stop:r}=(0,b.q2)(window,"popstate",t);return{stop(){e(),n(),r()}}}(i),{stop:r}=(o=i,(0,b.q2)(window,"hashchange",o));var o;function i(){if(t.href===ui().href)return;const n=(0,Dt.yG)(ui());e.notify({newLocation:n,oldLocation:t}),t=n}return()=>{n(),r()}})}(),{observable:E,stop:A}=function(){const t=new i.cP,{stop:e}=(0,l.H7)(window,"open",()=>t.notify());return{observable:t,stop:e}}();w.push(A);const{assemble:I}=e;!function(t,e,n){t.register(({eventType:t})=>{const o=e.source;return{type:t,_dd:{format_version:2,drift:(0,r._O)(),configuration:{session_sample_rate:Ct(e.sessionSampleRate,3),session_replay_sample_rate:Ct(e.sessionReplaySampleRate,3),profiling_sample_rate:Ct(e.profilingSampleRate,3),trace_sample_rate:Ct(e.traceSampleRate,3)},browser_sdk_version:(0,kt.d0)()?"7.12.0":void 0,sdk_name:n},application:{id:e.applicationId},date:(0,r.nx)(),source:o}})}(I,n,y);const O=function(t,e=500){const n=(0,Me.qj)({expireDelay:yi,maxEntries:4e3});let o;lr(cr.VISIBILITY_STATE)&&performance.getEntriesByType(cr.VISIBILITY_STATE).forEach(t=>{s("hidden"===t.name?"hidden":"active",t.startTime)}),s(bi(),(0,r.$S)());const{stop:i}=(0,b.lQ)(window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],t=>{s(function(t){return"freeze"===t.type?"frozen":"pagehide"===t.type?t.persisted?"frozen":"terminated":bi()}(t),t.timeStamp)},{capture:!0});function s(t,e=(0,r.$S)()){t!==o&&(o=t,n.closeActive(e),n.add({state:o,startTime:e},e))}function a(t,e,r){return n.findAll(e,r).some(e=>e.state===t)}return t.register(({startTime:t,duration:r=0,eventType:o})=>o===dt.VIEW?{type:o,_dd:{page_states:vi(n.findAll(t,r),t,e)}}:o===dt.ACTION||o===dt.ERROR?{type:o,view:{in_foreground:a("active",t,0)}}:Ae.$O),{wasInPageStateDuringPeriod:a,addPageState:s,stop(){i(),n.stop()}}}(I);w.push(()=>O.stop());const N=function(t){const e=(0,Me.qj)({expireDelay:An});return t.subscribe(1,t=>{e.add(function(t){return{service:t.service,version:t.version,context:t.context,id:t.id,name:t.name,startClocks:t.startClocks}}(t),t.startClocks.relative)}),t.subscribe(6,({endClocks:t})=>{e.closeActive(t.relative)}),t.subscribe(3,t=>{const n=e.find(t.startClocks.relative);n&&(t.name&&(n.name=t.name),t.context&&(n.context=t.context),n.sessionIsActive=t.sessionIsActive)}),t.subscribe(11,()=>{e.reset()}),{findView(t,n){return e.find(t,n)},stop(){e.stop()}}}(t);w.push(()=>N.stop());const M=function(t,e,n){const o=(0,Me.qj)({expireDelay:ci});let i;t.subscribe(1,({startClocks:t,url:e})=>{const n=(0,c.B)(u.J.location).href,r=void 0!==e?(0,d.c$)(e,n).href:n;o.add(a({url:r,referrer:i||document.referrer}),t.relative),i=r}),t.subscribe(6,({endClocks:t})=>{o.closeActive(t.relative)});const s=n.subscribe(({newLocation:t})=>{const e=o.find();if(e){const n=(0,r.$S)();o.closeActive(n),o.add(a({url:t.href,referrer:e.referrer}),n)}});function a({url:t,referrer:e}){return{url:t,referrer:e}}return e.register(({startTime:t,eventType:e})=>{const n=o.find(t);return n?{type:e,view:{url:n.url,referrer:n.referrer}}:Ae.ug}),{findUrl(t){return o.find(t)},stop(){s.unsubscribe(),o.stop()}}}(t,I,x);w.push(()=>M.stop());const P=function(t,e,n){const r=(0,Me.qj)({expireDelay:li});return t.subscribe(1,({startClocks:t})=>{r.add({},t.relative)}),t.subscribe(6,({endClocks:t})=>{r.closeActive(t.relative)}),e.register(({startTime:t,eventType:e})=>{if(!n.trackFeatureFlagsForEvents.concat([dt.VIEW,dt.ERROR]).includes(e))return Ae.$O;const o=r.find(t);return!o||(0,Dt.RI)(o)?Ae.$O:{type:e,feature_flags:o}}),{addFeatureFlagEvaluation(t,e){const n=r.find();n&&(n[t]=e)}}}(t,I,n);(function(t,e,n,r,o){t.register(({eventType:t,startTime:i})=>{const s=n.findTrackedSession(i),a=o.findView(i);if(!s||!a)return Ae.ug;let c,u,d;return t===dt.VIEW?(c=!!r.getReplayStats(a.id)||void 0,u=1===Oi(s,e),d=!!a.sessionIsActive&&void 0):c=!!r.isRecording()||void 0,{type:t,session:{id:s.id,type:"user",has_replay:c,sampled_for_replay:u,is_active:d}}})})(I,n,s,p,N),function(t){t.register(({eventType:t})=>({type:t,connectivity:(0,Ni.q)()}))}(I),function(t){const e=(kn||(kn=function(){try{const t=sessionStorage.getItem(Sn);if(t)return t;const e=it();return sessionStorage.setItem(Sn,e),e}catch{return}}()??it()),kn);t.register(()=>({tab:{id:e}}))}(I);const V=function(t,e){const n=Ce();return e.storeContextsAcrossPages&&Se(n,"rum",2),t.register(()=>({context:n.getContext()})),n}(I,n),L=function(t,e,n){const r=Te();return e.storeContextsAcrossPages&&Se(r,"rum",1),t.register(({eventType:t,startTime:o})=>{const i=r.getContext(),s=n.findTrackedSession(o);return s?.anonymousId&&!i.anonymous_id&&e.trackAnonymousUser&&(i.anonymous_id=s.anonymousId),(0,Dt.RI)(i)?Ae.$O:{type:t,usr:i}}),r}(I,n,s),$=function(t,e){const n=Ie();return e.storeContextsAcrossPages&&Se(n,"rum",4),t.register(()=>{const t=n.getContext();return(0,Dt.RI)(t)||!t.id?Ae.$O:{account:t}}),n}(I,n),U=function(t,e,n,o,i){const{unsubscribe:s}=t.subscribe(0,e=>{t.notify(13,bo(e))}),a=m.l;let c;i.trackUserInteractions&&(c=go(t,n,o,i));const u=function(t,e){const n=Qr(t);return{addAction(t){e({id:it(),frustrationTypes:[],...t})},startAction(e,o={},i=(0,r.M8)()){const s=o.actionKey??e,a=n.start(s,i,{name:e,...o},{isChildEvent:ho});t.notify(16,a)},stopAction(t,o={},i=(0,r.M8)()){const s=o.actionKey??t,a=n.stop(s,i,o);if(!a)return;const c=[];a.counts&&a.counts.errorCount>0&&c.push(gt);const u={...a,type:a.type||ht,frustrationTypes:c};e(u)},findActionId:n.findId,stop:n.stopAll}}(t,e=>{t.notify(13,bo(e))}),d={findActionId(t){const e=u.findActionId(t),n=c?.findActionId(t)??[];return e.concat(n)}};return e.assemble.register(({startTime:t,eventType:e})=>{if(e!==dt.ERROR&&e!==dt.RESOURCE&&e!==dt.LONG_TASK)return Ae.$O;const n=e===dt.LONG_TASK?(0,r.Gw)(t,1):t,o=d.findActionId(n);return o.length?{type:e,action:{id:o}}:Ae.$O}),e.assembleTelemetry.register(({startTime:t})=>({action:{id:d.findActionId(t)}})),{addAction:u.addAction,startAction:u.startAction,stopAction:u.stopAction,actionContexts:d,stop(){s(),a(),u.stop(),c?.stop()}}}(t,e,k,E,n);w.push(U.stop);const j=function(t){return{addEvent(e,n,o,i){Mi.includes(n.type)&&t.notify(13,{startClocks:(0,r.FR)(e),rawRumEvent:n,domainContext:o,duration:i})}}}(t),q=function(t){let e;const n=requestAnimationFrame((0,f.dm)(()=>{e=ti()})),r=Xo().subscribe(t=>{e=t}).unsubscribe;return t.register(({eventType:t})=>({type:t,display:e?{viewport:e}:void 0})),{stop(){r(),n&&cancelAnimationFrame(n)}}}(I);w.push(q.stop);const B=function(t,e=function(t){const e=Xe()?(t,e)=>(0,b.q2)(u.J.cookieStore,"change",n=>{const r=n.changed.find(e=>e.name===t)||n.deleted.find(e=>e.name===t);r&&e(r.value)}).stop:wi;return new i.cP(n=>e(t,t=>n.notify(t)))}(Si)){let n=jt(Si)||function(){const t=window.Cypress;if(t)try{return t.env("traceId")}catch{return void T.V.warn("Failed to read Cypress test execution id via Cypress.env(). Upgrade dd-trace-js to >= 5.88.0 to keep RUM ↔ test correlation working.")}}();const r=e.subscribe(t=>{n=t});return t.register(({eventType:t})=>"string"!=typeof n?Ae.$O:{type:t,session:{type:"ci_test"},ci_test:{test_execution_id:n}}),{stop(){r.unsubscribe()}}}(I);w.push(B.stop),function(t){t.register(({eventType:t})=>bn()?{type:t,session:{type:"synthetics"},synthetics:{...bn(),injected:vn()}}:Ae.$O)}(I),function(t,e,n,r,i){const s={[dt.ERROR]:xi(dt.ERROR,r,i),[dt.ACTION]:xi(dt.ACTION,r,i),[dt.VITAL]:xi(dt.VITAL,r,i)};e.subscribe(13,({startClocks:r,duration:i,rawRumEvent:a,domainContext:c})=>{const u=n.trigger({eventType:a.type,rawRumEvent:a,domainContext:c,startTime:r.relative,duration:i});if(u===Ae.ug)return;const d=(0,o.kg)(u,a,{ddtags:(0,Ei.m5)(t).join(",")});(function(t,e,n,r){if(e){const r=Ci(t,Ri[t.type],t=>e(t,n));if(!1===r&&t.type!==dt.VIEW)return!1;!1===r&&T.V.warn("Can't dismiss view events using beforeSend!")}const o=r[t.type]?.isLimitReached();return!o})(d,t.beforeSend,c,s)&&((0,Dt.RI)(d.context)&&delete d.context,e.notify(14,d))})}(n,t,I,_);const{addTiming:G,setLoadingTime:W,startView:J,setViewName:H,setViewContext:K,setViewContextProperty:Q,getViewContext:Z,stop:Y}=function(t,e,n,o,s,a,u,d,l){return t.subscribe(4,e=>t.notify(13,function(t,e,n){const o=n.getReplayStats(t.id),i=t.commonViewMetrics?.cumulativeLayoutShift?.devicePixelRatio,s={_dd:{document_version:t.documentVersion,replay_stats:o,cls:i?{device_pixel_ratio:i}:void 0,configuration:{start_session_replay_recording_manually:e.startSessionReplayRecordingManually,remote_configuration_id:e.remoteConfigurationId}},date:t.startClocks.timeStamp,type:dt.VIEW,view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:t.commonViewMetrics.cumulativeLayoutShift?.value,cumulative_layout_shift_time:(0,r.Zj)(t.commonViewMetrics.cumulativeLayoutShift?.time),cumulative_layout_shift_target_selector:t.commonViewMetrics.cumulativeLayoutShift?.targetSelector,first_byte:(0,r.Zj)(t.initialViewMetrics.navigationTimings?.firstByte),dom_complete:(0,r.Zj)(t.initialViewMetrics.navigationTimings?.domComplete),dom_content_loaded:(0,r.Zj)(t.initialViewMetrics.navigationTimings?.domContentLoaded),dom_interactive:(0,r.Zj)(t.initialViewMetrics.navigationTimings?.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:(0,r.Zj)(t.initialViewMetrics.firstContentfulPaint),interaction_to_next_paint:(0,r.Zj)(t.commonViewMetrics.interactionToNextPaint?.value),interaction_to_next_paint_time:(0,r.Zj)(t.commonViewMetrics.interactionToNextPaint?.time),interaction_to_next_paint_target_selector:t.commonViewMetrics.interactionToNextPaint?.targetSelector,is_active:t.isActive,name:t.name,largest_contentful_paint:(0,r.Zj)(t.initialViewMetrics.largestContentfulPaint?.value),largest_contentful_paint_target_selector:t.initialViewMetrics.largestContentfulPaint?.targetSelector,load_event:(0,r.Zj)(t.initialViewMetrics.navigationTimings?.loadEvent),loading_time:tr((0,r.Zj)(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},performance:ni(t.commonViewMetrics,t.initialViewMetrics),resource:{count:t.eventCounts.resourceCount},time_spent:(0,r.Zj)(t.duration)},display:t.commonViewMetrics.scroll?{scroll:{max_depth:t.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:t.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:t.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:(0,r.Zj)(t.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:e.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:Lo()}};return(0,Dt.RI)(t.customTimings)||(s.view.custom_timings=(0,Dt.LG)(t.customTimings,r.Zj)),{rawRumEvent:s,startClocks:t.startClocks,duration:t.duration,domainContext:{location:t.location,handlingStack:t.handlingStack}}}(e,n,u))),e.assemble.register(({startTime:t,eventType:e})=>{const n=d.findView(t);return n?{type:e,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:Ae.ug}),e.assembleTelemetry.register(({startTime:t})=>({view:{id:d.findView(t)?.id}})),function(t,e,n,o,s,a,u){const d=new Set;let l,p,h=g(ft,(0,r.Oc)(),u);function g(s,a,u){const l=function(t,e,n,o,s,a=(0,r.M8)(),u){const d=it(),l=new i.cP,p={};let h,g=0;const y=(0,Dt.yG)((0,c.B)(window.location)),v=Ee();let _=!0,w=u?.name;const S=u?.service||o.service,k=u?.version||o.version,x=u?.context,E=u?.handlingStack;x&&v.setContext(x);const C={id:d,name:w,startClocks:a,service:S,version:k,context:x,url:u?.url};t.notify(1,C),t.notify(2,C);const{throttled:A,cancel:I}=(0,m.n)(F,3e3,{leading:!1}),{setLoadEvent:R,setViewEnd:O,stop:N,stopINPTracking:M,getCommonViewMetrics:P,setLoadingTime:D}=function(t,e,n,o,s,a,c){const u={};let d=!1,l=!1;const{stop:p,setLoadEvent:h}=function(t,e,n,o,i,a){let c=i===ft,l=!0;const f=[],p=$o(a);function m(){if(!l&&!c&&f.length>0){const e=Math.max(...f);e<p.timeStamp-a.relative&&(t=e,d||(u.loadingTime=t,s()))}var t}const{stop:h}=pr(t,e,n,o,t=>{l&&(l=!1,t.hadActivity&&f.push((0,r.vk)(a.timeStamp,t.end)),m())});return{stop(){h(),p.stop()},setLoadEvent(t){c&&(c=!1,f.push(t),m())}}}(t,e,n,o,a,c),{stop:g}=function(t,e,n=function(t=1e3){return new i.cP(e=>{const n=(0,m.n)(function(){e.notify(function(){const t=Zo(),{height:e}=ti();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(e+t),scrollTop:t}}())},t,{leading:!1,trailing:!0}),r=document.scrollingElement||document.documentElement,o=new ResizeObserver((0,f.dm)(n.throttled));r&&o.observe(r);const i=(0,b.q2)(window,"scroll",n.throttled,{passive:!0});return()=>{n.cancel(),o.disconnect(),i.stop()}})}()){let o=0,s=0,a=0;const c=n.subscribe(({scrollDepth:n,scrollTop:i,scrollHeight:c})=>{let u=!1;if(n>o&&(o=n,u=!0),c>s){s=c;const e=(0,r.$S)();a=(0,r.vk)(t.relative,e),u=!0}u&&e({maxDepth:Math.min(o,s),maxDepthScrollTop:i,maxScrollHeight:s,maxScrollHeightTime:a})});return{stop(){return c.unsubscribe()}}}(c,t=>{u.scroll=t}),{stop:y}=function(t,e,n){if(!lr(cr.LAYOUT_SHIFT)||!("WeakRef"in window))return{stop:m.l};let o,i=0;n({value:0});const s=function(){let t,e,n=0,r=0;return{update(o){let i;return void 0===t||o.startTime-e>=1e3||o.startTime-t>=5e3?(t=e=o.startTime,r=n=o.value,i=!0):(n+=o.value,e=o.startTime,i=o.value>r,i&&(r=o.value)),{cumulatedValue:n,isMaxValue:i}}}}(),a=ur({type:cr.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{for(const c of a){if(c.hadRecentInput||c.startTime<e)continue;const{cumulatedValue:a,isMaxValue:u}=s.update(c);if(u){const t=qo(c.sources);o={target:t?.node?new WeakRef(t.node):void 0,time:(0,r.vk)(e,c.startTime),previousRect:t?.previousRect,currentRect:t?.currentRect,devicePixelRatio:window.devicePixelRatio}}if(a>i){i=a;const e=o?.target?.deref();n({value:Ct(i,4),targetSelector:e&&Sr(e,t.actionNameAttribute),time:o?.time,previousRect:o?.previousRect?Bo(o.previousRect):void 0,currentRect:o?.currentRect?Bo(o.currentRect):void 0,devicePixelRatio:o?.devicePixelRatio})}}});return{stop(){a.unsubscribe()}}}(o,c.relative,t=>{u.cumulativeLayoutShift=t,s()}),{stop:v,getInteractionToNextPaint:_,setViewEnd:w}=function(t,e,n){if(!(lr(cr.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint(){},setViewEnd:m.l,stop:m.l};let o,i=1/0;const{getViewInteractionCount:s,stopViewInteractionCount:a}=function(t){"interactionCount"in performance||Fo||(Fo=new window.PerformanceObserver((0,f.dm)(t=>{t.getEntries().forEach(t=>{const e=t;e.interactionId&&(Wo=Math.min(Wo,e.interactionId),Jo=Math.max(Jo,e.interactionId),Go=(Jo-Wo)/7+1)})})),Fo.observe({type:"event",buffered:!0,durationThreshold:0}));const e=t===ft?0:Ho();let n={stopped:!1};function r(){return Ho()-e}return{getViewInteractionCount(){return n.stopped?n.interactionCount:r()},stopViewInteractionCount(){n={stopped:!0,interactionCount:r()}}}}(n),c=function(t){const e=[];function n(){e.sort((t,e)=>e.duration-t.duration).splice(10)}return{process(t){const r=e.findIndex(e=>t.interactionId===e.interactionId),o=e[e.length-1];-1!==r?t.duration>e[r].duration&&(e[r]=t,n()):(e.length<10||t.duration>o.duration)&&(e.push(t),n())},estimateP98Interaction(){const n=Math.min(e.length-1,Math.floor(t()/50));return e[n]},isTracked:t=>e.some(e=>e.interactionId===t)}}(s),u=function(t){const e=new Map;function n(t,e){t.startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd)}return{process(t){if(void 0===t.interactionId||!t.processingStart||!t.processingEnd)return;const r=t.startTime+t.duration,o=e.get(t.interactionId);if(o)n(o,t);else{for(const[,o]of e.entries())if(Math.abs(r-o.referenceRenderTime)<=8)return n(o,t),void e.set(t.interactionId,o);e.set(t.interactionId,{startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,referenceRenderTime:r})}},pruneUntracked(){for(const[n]of e)t.isTracked(n)||e.delete(n)},computeSubParts(t,n){if(!t.processingStart||!t.processingEnd||void 0===t.interactionId)return;const o=e.get(t.interactionId);if(!o)return;const i=Math.max(o.startTime+n,o.processingStart),s=Math.min(o.processingEnd,i);return{inputDelay:(0,r.vk)(o.startTime,o.processingStart),processingDuration:(0,r.vk)(o.processingStart,s),presentationDelay:(0,r.vk)(s,i)}},stop(){e.clear()}}}(c),d=ur({type:cr.FIRST_INPUT,buffered:!0}).subscribe(p),l=ur({type:cr.EVENT,durationThreshold:40,buffered:!0}).subscribe(p);function p(n){for(const t of n)t.interactionId&&t.startTime>=e&&t.startTime<=i&&(c.process(t),u.process(t));u.pruneUntracked();const s=c.estimateP98Interaction();s&&function(n){const i=(0,r.vk)(e,n.startTime);if(n.duration!==o?.duration||i!==o.startTime){let e=function(t){const e=po.get(t);return po.delete(t),e}(n.startTime);!e&&n.target&&nr(n.target)&&(e=Sr(n.target,t.actionNameAttribute)),o={duration:n.duration,startTime:i,targetSelector:e}}o.subParts=u.computeSubParts(n,Ko(o.duration))}(s)}return{getInteractionToNextPaint(){return o?{value:Ko(o.duration),targetSelector:o.targetSelector,time:o.startTime,subParts:o.subParts}:s()?{value:0}:void 0},setViewEnd(t){i=t,a()},stop(){l.unsubscribe(),d.unsubscribe(),u.stop()}}}(o,c.relative,a);return{stop(){p(),y(),g()},stopINPTracking:v,setLoadEvent:h,setViewEnd(t){l=!0,w(t)},getCommonViewMetrics:()=>(u.interactionToNextPaint=_(),u),setLoadingTime(t){if(l)return;const e=(0,r.vk)(c.timeStamp,t??(0,r.nx)());d||p(),d=!0,u.loadingTime=e,s()}}}(t,e,n,o,B,s,a),{stop:V,initialViewMetrics:L}=s===ft?Uo(o,a,R,B):{stop:m.l,initialViewMetrics:{}};s===mt&&function(t,e,n){var o,i;o=t.relative,i=t=>{e.firstContentfulPaint=t,e.largestContentfulPaint={value:t},n()},requestAnimationFrame(()=>{requestAnimationFrame(()=>{i((0,r.vk)(o,(0,r.$S)()))})})}(a,L,B);const{stop:$,eventCounts:U}=function(t,e,n){const{stop:r,eventCounts:o}=Kr({lifeCycle:t,isChildEvent:t=>t.view.id===e,onChange:n});return{stop:r,eventCounts:o}}(t,d,B),z=(0,Pe.yb)(F,3e5),j=t.subscribe(12,t=>{t===wn.y5.UNLOADING&&F()});function q(){t.notify(3,{id:d,name:w,context:v.getContext(),startClocks:a,sessionIsActive:_})}function B(){q(),A()}function F(){I(),q(),g+=1;const e=void 0===h?(0,r.nx)():h.timeStamp;t.notify(4,{customTimings:p,documentVersion:g,id:d,name:w,service:S,version:k,context:v.getContext(),loadingType:s,location:y,handlingStack:E,startClocks:a,commonViewMetrics:P(),initialViewMetrics:L,duration:(0,r.vk)(a.timeStamp,e),isActive:void 0===h,sessionIsActive:_,eventCounts:U})}return F(),v.changeObservable.subscribe(B),{get name(){return w},service:S,version:k,contextManager:v,stopObservable:l,end(e={}){h||(h=e.endClocks??(0,r.M8)(),_=e.sessionIsActive??!0,t.notify(5,{endClocks:h}),t.notify(6,{endClocks:h}),(0,Pe.vG)(z),O(h.relative),N(),j.unsubscribe(),F(),(0,Pe.wg)(()=>{this.stop()},3e5))},stop(){V(),$(),M(),l.notify()},addTiming(t,e){if(h)return;const n=(0,r.A3)(e)?e:(0,r.vk)(a.timeStamp,e);p[function(t){const e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return e!==t&&T.V.warn(`Invalid timing name: ${t}, sanitized to: ${e}`),e}(t)]=n,B()},setLoadingTime:D,setViewName(t){w=t,F()}}}(t,e,n,o,s,a,u);return d.add(l),l.stopObservable.subscribe(()=>{d.delete(l)}),l}return t.subscribe(11,()=>{h=g("session_renewal",void 0,{name:h.name,service:h.service,version:h.version,context:h.contextManager.getContext()})}),t.subscribe(10,({endClocks:t})=>{h.end({sessionIsActive:!1,endClocks:t})}),a&&(p=function(t){return t.subscribe(({oldLocation:t,newLocation:e})=>{var n,r;r=e,((n=t).pathname!==r.pathname||!function(t){const e=t.substring(1);return""!==e&&!!document.getElementById(e)}(r.hash)&&ei(r.hash)!==ei(n.hash))&&(h.end(),h=g(pt))})}(s),l=function(){const{stop:t}=(0,b.q2)(window,"pageshow",t=>{t.persisted&&(t=>{h.end();const e=(0,r.FR)(t.timeStamp);h=g(mt,e,void 0)})(t)},{capture:!0});return t}()),{addTiming(t,e=(0,r.nx)()){h.addTiming(t,e)},setLoadingTime(t){return h.setLoadingTime(t)},startView(t,e){h.end({endClocks:e}),h=g(pt,e,t)},setViewContext(t){h.contextManager.setContext(t)},setViewContextProperty(t,e){h.contextManager.setContextProperty(t,e)},setViewName(t){h.setViewName(t)},getViewContext(){return h.contextManager.getContext()},stop(){p&&p.unsubscribe(),l&&l(),h.end(),d.forEach(t=>t.stop())}}}(t,o,s,n,a,!n.trackViewsManually,l)}(t,e,n,k,E,x,p,N,h);(function(t){t.register(({domainContext:t,rawRumEvent:e})=>{const n=function(t,e){if("long_task"===e.type&&"long-animation-frame"===e.long_task.entry_type)return e.long_task.scripts[0]?.source_url;let n;"handlingStack"in t&&(n=t.handlingStack),"error"===e.type&&e.error.stack&&(n=e.error.stack);const r=(0,C.T)({stack:n});return r.stack[0]?.url}(t,e);if(!n)return Ae.$O;const r=(0,D.yN)(n);return r?{type:e.type,service:r.service,version:r.version}:Ae.$O})})(I),w.push(Y);const X=function(t,e){const n=(0,c.B)(xo)(),o=function(t){const e=new Set,n=t.subscribe(8,t=>{e.add(t),e.size>1e3&&e.delete(e.values().next().value)});return{getMatchingRequest(t){let n,r=1/0;for(const o of e){const e=t.startTime-o.startClocks.relative;0<=e&&e<r&&o.url===t.name&&(r=Math.abs(e),n=o)}return n&&e.delete(n),n},stop(){n.unsubscribe()}}}(t);t.subscribe(9,n=>{const o=function(t,e){const n=(0,r.vk)(t.startClocks.timeStamp,t.endClocks.timeStamp),o={date:t.startClocks.timeStamp,type:dt.RESOURCE,resource:{id:it(),type:"websocket",url:t.url,duration:(0,r.Zj)(n),websocket:{connection_id:t.connectionId,handshake_succeeded:t.handshakeSucceeded,start_time:t.startClocks.timeStamp,end_time:t.endClocks.timeStamp,start_view_id:t.startViewId,end_view_id:t.endViewId,tracking_end_reason:t.trackingEndReason,close_code:t.closeCode,close_reason:t.closeReason,was_clean:t.wasClean,messages_in:t.messagesIn,messages_out:t.messagesOut,time_to_first_message_in:(0,r.Zj)(t.firstMessageInOffset),time_to_first_message_out:(0,r.Zj)(t.firstMessageOutOffset),last_message_in_at:t.lastMessageInAt,longest_inbound_silence:(0,r.Zj)(t.longestInboundSilence),inbound_idle_duration_before_close:(0,r.Zj)(t.inboundIdleDurationBeforeClose),buffered_amount_max:t.bufferedAmountMax,protocol:t.protocol,setup_duration:(0,r.Zj)(t.setupDuration)}},_dd:{discarded:!e.trackResources}};return{startClocks:t.startClocks,duration:n,rawRumEvent:o,domainContext:{isWebSocket:!0,isManual:!1,webSocket:t.webSocket}}}(n,e);o&&t.notify(13,o)});const i=ur({type:cr.RESOURCE,buffered:!0}).subscribe(n=>{for(const r of n)Pn(r)?(0,Pe.wg)(()=>{const n=Oo(r,o.getMatchingRequest(r),e);n&&t.notify(13,n)},50):a(()=>Oo(r,void 0,e))}),{stop:s}=(0,Eo.H)("interactive",()=>{a(()=>Oo(Co(),void 0,e))});function a(e){n.push(()=>{const n=e();n&&t.notify(13,n)})}const u=Qr(t),d=function(t,e){return{startResource(t,n={},o=(0,r.M8)()){const i=n.resourceKey??t;e.start(i,o,{url:t,...n})},stopResource(n,o={},i=(0,r.M8)()){const s=o.resourceKey??n,a=e.stop(s,i,{context:o.context,type:o.type});if(!a)return;const c=(0,r.vk)(a.startClocks.relative,i.relative),u={date:a.startClocks.timeStamp,type:dt.RESOURCE,resource:{id:a.id,type:a.type||In,url:qn(a.url),duration:(0,r.Zj)(c),method:a.method,status_code:o.statusCode,size:o.size},_dd:{},context:a.context};t.notify(13,{rawRumEvent:u,startClocks:a.startClocks,duration:c,domainContext:{isManual:!0}})}}}(t,u);return{startResource:d.startResource,stopResource:d.stopResource,stop(){s(),n.stop(),i.unsubscribe(),u.stopAll()}}}(t,n);w.push(X.stop);const{stop:tt}=function(t,e){const n=ur({type:lr(cr.LONG_ANIMATION_FRAME)?cr.LONG_ANIMATION_FRAME:cr.LONG_TASK,buffered:!0}).subscribe(n=>{for(const o of n){if(!e.trackLongTasks)break;const n=(0,r.FR)(o.startTime),i=ki(o,n);t.notify(13,{rawRumEvent:i,startClocks:n,duration:o.duration,domainContext:{performanceEntry:o}})}});return{stop(){return n.unsubscribe()}}}(t,n);w.push(tt);const{addError:et}=function(t,e){const n=new i.cP;return e.subscribe(({data:t,type:e})=>{0===e?n.notify(t):3===e&&t.api===a.bP.error&&n.notify(t.error)}),function(t){(function(t){const e=[];t.includes(_o)&&e.push(new i.cP(t=>{if(!(0,b.BX)(document,"securitypolicyviolation"))return;const{stop:e}=(0,b.q2)(document,"securitypolicyviolation",e=>{t.notify(function(t){const e=`'${t.blockedURI}' blocked by '${t.effectiveDirective}' directive`;return wo({type:t.effectiveDirective,message:`${_o}: ${e}`,originalError:t,csp:{disposition:t.disposition},stack:So(t.effectiveDirective,t.originalPolicy?`${e} of the policy "${ct(t.originalPolicy,100,"...")}"`:"no policy",t.sourceFile,t.lineNumber,t.columnNumber),debugIds:t.sourceFile?(0,D.Jv)([t.sourceFile]):void 0})}(e))});return e}));const n=t.filter(t=>t!==_o);return n.length&&e.push(function(t){return new i.cP(e=>{if(!window.ReportingObserver)return;const n=(0,f.dm)((t,n)=>t.forEach(t=>e.notify(function(t){const{type:e,body:n}=t;return wo({type:n.id,message:`${e}: ${n.message}`,originalError:t,stack:So(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber),debugIds:n.sourceFile?(0,D.Jv)([n.sourceFile]):void 0})}(t)))),r=new window.ReportingObserver(n,{types:t,buffered:!0});return r.observe(),()=>{r.disconnect()}})}(n)),(0,i.Fx)(...e)})([_o,"intervention"]).subscribe(e=>t.notify(e))}(n),n.subscribe(e=>t.notify(15,{error:e})),function(t){return t.subscribe(15,({error:e})=>{t.notify(13,function(t){const e={date:t.startClocks.timeStamp,error:{id:it(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,component_stack:t.componentStack,type:t.type,handling:t.handling,causes:t.causes,source_type:"browser",fingerprint:t.fingerprint,csp:t.csp},_dd:{debug_ids:t.debugIds},type:dt.ERROR,context:t.context},n={error:t.originalError,handlingStack:t.handlingStack};return{rawRumEvent:e,startClocks:t.startClocks,domainContext:n}}(e))}),{addError({error:e,handlingStack:n,componentStack:r,startClocks:i,context:s}){const a=z({originalError:e,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:"Provided",source:F.g.CUSTOM,handling:"handled"});a.context=(0,o.kg)(a.context,s),t.notify(15,{error:a})}}}(t)}(t,g);!function(t,e,n,o,i,s){const a=function(t,e,n,r){return{clearTracingIfNeeded:Wn,traceFetch:o=>Jn(t,o,e,n,r,t=>{if(o.input instanceof Request&&!o.init?.headers)o.input=new Request(o.input),Object.keys(t).forEach(e=>{o.input.headers.append(e,t[e])});else{o.init=(0,Dt.yG)(o.init);const e=[];o.init.headers instanceof Headers?o.init.headers.forEach((t,n)=>{e.push([n,t])}):Array.isArray(o.init.headers)?o.init.headers.forEach(t=>{e.push(t)}):o.init.headers&&Object.keys(o.init.headers).forEach(t=>{e.push([t,o.init.headers[t]])}),o.init.headers=e.concat((0,Ve.WP)(t))}}),traceXhr:(o,i)=>Jn(t,o,e,n,r,t=>{try{Object.keys(t).forEach(e=>{i.setRequestHeader(e,t[e])})}catch{}})}}(e,n,o,i);!function(t,e,n){const r=[];r.push(S().subscribe(t=>{"start"===t.state&&zn(t.url)&&(e.traceXhr(t,t.xhr),Zn(t))})),r.push(n.subscribe(({data:n,type:r})=>{if(2!==r)return;const o=n;if(zn(o.url))switch(o.state){case"start":Zn(o),t.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"complete":e.clearTracingIfNeeded(o),t.notify(8,{...o,type:"xhr",isAbortedOnStart:!1})}}))}(t,a,s),function(t,e,n,o){const i=[];i.push(v({responseBodyAction(t){return Hn(t.url,e)?.trackResponseErrors?1:0}}).subscribe(t=>{"start"===t.state&&zn(t.url)&&(n.traceFetch(t),Zn(t))})),i.push(o.subscribe(({data:e,type:o})=>{if(1!==o)return;const i=e;if(zn(i.url))switch(i.state){case"start":Zn(i),t.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":n.clearTracingIfNeeded(i),t.notify(8,{...i,duration:(0,r.vk)(i.startClocks.timeStamp,(0,r.nx)()),type:Rn,requestBody:i.init?.body})}}))}(t,e,a,s)}(t,n,s,L,$,g);const nt=function(t,e){const n=Qr(t);function o(n){(function(t){return!e.wasInPageStateDuringPeriod("frozen",t.startClocks.relative,t.duration)})(n)&&t.notify(13,_i(n))}return{addOperationStepVital(e,n,o,i){const{operationKey:s,context:a,description:c,handlingStack:u}=o||{},d={name:e,type:vt.OPERATION_STEP,operationKey:s,failureReason:i,stepType:n,startClocks:(0,r.M8)(),context:R(a),description:c,handlingStack:u};t.notify(13,_i(d))},addDurationVital:o,startDurationVital(e,o={},i=(0,r.M8)()){const{id:s}=n.start(o.vitalKey??e,i,{name:e,...o});t.notify(17,{id:s,name:e,startClocks:i,...o})},stopDurationVital(t,e={},i=(0,r.M8)()){const s=n.stop(e.vitalKey??t,i,e);s&&o({type:vt.DURATION,...s})}}}(t,O);if(n.trackResources&&(n.betaTrackWebSockets||(0,xt.sr)(xt.R9.TRACK_WEBSOCKETS))){const e=function(t,e,n){const o=function(t,e,n,o){const i=new Map;function s(e,i,s){const a=function(t,e,n,o){const i=e.at,s="session_end"===n?o.findView(i.relative,{returnInactive:!0})?.id:o.findView(i.relative)?.id,a=void 0!==t.lastMessageInAt?(0,r.vk)(t.lastMessageInAt,i.timeStamp):void 0,{openClocks:c,...u}=t;return{...u,endClocks:i,endViewId:s,inboundIdleDurationBeforeClose:a,trackingEndReason:n,handshakeSucceeded:void 0!==c,setupDuration:t.setupDuration??(0,r.vk)(t.startClocks.timeStamp,i.timeStamp),closeCode:e.code,closeReason:e.reason,wasClean:e.wasClean}}(e,i,s,n);t.notify(9,a),o({id:it(),name:"websocket-closed",type:vt.DURATION,startClocks:a.endClocks,duration:0,context:R({url:a.url,connection_id:a.connectionId})})}const a=e.subscribe(t=>{switch(t.state){case"connecting":{const e=it(),r=n.findView(t.startClocks.relative)?.id,s=function(t){const e=(0,d.c$)(t);return e.search="",e.href}(t.url),a={webSocket:t.instance,connectionId:e,url:s,startClocks:t.startClocks,startViewId:r,messagesIn:{count:0,size:0},messagesOut:{count:0,size:0},longestInboundSilence:0,bufferedAmountMax:0};return i.set(t.instance,a),void o({id:it(),name:"websocket-connecting",type:vt.DURATION,startClocks:t.startClocks,duration:0,context:R({url:s,connection_id:e})})}case"open":{const e=i.get(t.instance);if(!e)return;return e.openClocks=t.openClocks,e.protocol=t.protocol,void(e.setupDuration=(0,r.vk)(e.startClocks.timeStamp,t.openClocks.timeStamp))}case"message-in":{const e=i.get(t.instance);if(!e)return;return e.messagesIn.count+=1,e.messagesIn.size+=t.size,void Xn(e,t.at,"in")}case"message-out":{const e=i.get(t.instance);if(!e)return;return t.bufferedAmountPreSend>e.bufferedAmountMax&&(e.bufferedAmountMax=t.bufferedAmountPreSend),e.messagesOut.count+=1,e.messagesOut.size+=t.size,void Xn(e,t.at,"out")}case"closed":{const e=i.get(t.instance);if(!e)return;return i.delete(t.instance),void s(e,t,"close_event")}}});return{flushOpenConnections(t,e=(0,r.M8)()){i.forEach(n=>{s(n,{at:e},t)}),i.clear()},stop(){a.unsubscribe(),i.clear()}}}(t,(Kn||(Kn=new i.cP(t=>{if(!function(t){return"function"==typeof t.WebSocket}(u.J))return;const{stop:e}=(0,l.my)(u.J,"WebSocket",({parameters:e,onPostCall:n})=>{const o=Array.isArray(e[1])?[].concat(e[1]):e[1],i=(0,r.M8)();n(e=>{t.notify({state:"connecting",instance:e,url:e.url,protocols:o,startClocks:i}),function(t,e){const{stop:n}=(0,b.q2)(t,"open",()=>{e.notify({state:"open",instance:t,openClocks:(0,r.M8)(),protocol:t.protocol||""}),n()}),{stop:o}=(0,b.q2)(t,"message",n=>{e.notify({state:"message-in",instance:t,size:Yn(n.data),at:(0,r.M8)()})}),{stop:i}=(0,b.q2)(t,"close",n=>{e.notify({state:"closed",instance:t,code:n.code,reason:n.reason,wasClean:n.wasClean,at:(0,r.M8)()}),o(),i()})}(e,t)})}),{stop:n}=(0,l.H7)(u.J.WebSocket.prototype,"send",({target:e,parameters:[n],onPostCall:o})=>{const i=Yn(n),s=e.bufferedAmount;o(()=>{t.notify({state:"message-out",instance:e,size:i,bufferedAmountPreSend:s,at:(0,r.M8)()})})});return()=>{e(),n()}})),Kn),e,n),s=t.subscribe(10,({endClocks:t})=>{o.flushOpenConnections("session_end",t)});return{stop(){s.unsubscribe(),o.flushOpenConnections("session_end"),o.stop()}}}(t,N,nt.addDurationVital);w.push(e.stop)}const rt=function(t,e,n,r,o){return{get(i){const s=n.findView(i),a=o.findUrl(i),c=e.findTrackedSession(i);if(c&&s&&a){const e=r.findActionId(i);return{application_id:t,session_id:c.id,user_action:e?{id:e}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}(n.applicationId,s,N,U.actionContexts,M);return{addAction:U.addAction,startAction:U.startAction,stopAction:U.stopAction,startResource:X.startResource,stopResource:X.stopResource,addEvent:j.addEvent,addError:et,addTiming:G,setLoadingTime:W,addFeatureFlagEvaluation:P.addFeatureFlagEvaluation,startView:J,setViewContext:K,setViewContextProperty:Q,getViewContext:Z,setViewName:H,viewHistory:N,sessionManager:s,stopSession:()=>s.expire(),getInternalContext:rt.get,startDurationVital:nt.startDurationVital,stopDurationVital:nt.stopDurationVital,addDurationVital:nt.addDurationVital,addOperationStepVital:nt.addOperationStepVital,globalContext:V,userContext:L,accountContext:$,stop:()=>w.forEach(t=>t())}}(x,_,t,e,n,p,g,w,A);return k.push(I),g.unbuffer(),k.push(()=>s.stop()),{...O,lifeCycle:x,sessionManager:e,stopSession:()=>e.expire(),telemetry:y,stop(){k.forEach(t=>t())},hooks:_}}function Di(t,e,n={}){const d=function(t){const e=new i.cP;function n(){return t===s.GRANTED}return{tryToInit(e){t||(t=e)},onGrantedOnce(t){if(n())t();else{const r=e.subscribe(()=>{n()&&(t(),r.unsubscribe())})}},update(n){t=n,e.notify()},isGranted:n,observable:e}}(),l=function(){const t=new i.dX(500,t=>{(0,E.A2)("Early data collection dropped data on unbuffer",{count:t})}),e=[];function n(n,r){e.push(r.subscribe(e=>{t.notify({type:n,data:e})}))}return n(0,(0,c.B)(G)()),n(1,v()),n(2,S()),n(3,function(t){const e=t.map(t=>(W[t]||(W[t]=function(t){return new i.cP(e=>{const n=a.JZ[t];return a.JZ[t]=(...o)=>{n.apply(console,o);const i=(0,P.uC)("console error");(0,f.um)(()=>{e.notify(function(t,e,n){const o=t.map(t=>function(t){return"string"==typeof t?R(t):(0,V.b)(t)?(0,P.NR)((0,C.T)(t)):(0,I.s)(R(t),void 0,2)}(t)).join(" ");if(e===a.bP.error){const i=z({originalError:t.find(V.b),handlingStack:n,startClocks:(0,r.M8)(),source:F.g.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return i.message=o,{api:e,message:o,handlingStack:n,error:i}}return{api:e,message:o,error:void 0,handlingStack:n}}(o,t,i))})},()=>{a.JZ[t]=n}})}(t)),W[t]));return(0,i.Fx)(...e)}(Object.values(a.bP))),{observable:t,stop(){return e.forEach(t=>t.unsubscribe())}}}();let p=function({ignoreInitIfSyntheticsWillInjectRum:t=!0,startDeflateWorker:e,sdkName:n},o,s){const a=new i.dX(500,t=>{(0,E.A2)("preStartRum buffer data lost",{count:t})}),d=Ce();Q(d,Y,a);const l=Te();Q(l,Z,a);const p=Ie();let h,g,y,v,_,w;Q(p,X,a);const S={assemble:(0,Ae.ab)(),assembleTelemetry:(0,Ae.ab)()},k=o.observable.subscribe(I),x={};let C=!1;function I(){if(C||!y||!v||!_||!w)return;let t;if(k.unsubscribe(),v.trackViewsManually){if(!h)return;t=h.options}const e=v.trackViewsManually?h?.callback:void 0,n=s(v,_,g,t,w,S);C=!0,a.subscribe(t=>{t!==e&&t(n)}),a.unbuffer()}function O(t,s){const a=(0,kt.d0)();if(a&&(t=function(t){return{...t,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:t.defaultPrivacyLevel??(0,kt.Y9)()?.getPrivacyLevel()}}(t)),y=t,v)return void ut("DD_RUM",t);const d=function(t,e){const n=function(t,e,n){if(t&&"object"==typeof t)return Rt(e,t,n);n.error("Configuration must be an object")}(t,fe,T.V);if(!n)return;const r=n.allowedTracingUrls.map(he).filter(Boolean);if(r.length>0&&!n.service)return void T.V.error("Service needs to be configured when tracing is enabled");const o=(0,xt.sr)(xt.R9.SESSION_REPLAY_RECORD_CANVAS)?n.sessionReplayCanvasRecording:void 0;return{...n,sessionReplayCanvasRecording:o,betaEnableViewUpdates:pe(n.betaEnableViewUpdates,n.proxy,e),allowedTracingUrls:r,beforeSend:n.beforeSend?(0,Et.y)(n.beforeSend,"beforeSend threw an error:"):void 0,rulePsr:At(t.traceSampleRate)?t.traceSampleRate/100:void 0,trackResourceHeaders:ve(t),allowedGraphQlUrls:ge(t),remoteConfigurationId:ue(t)}}(t,n);d&&function(t,e){const n=(0,c.B)(u.J.location),r=n?n.origin:"",o=t.allowedTrackingOrigins;if(!o)return!function(t,e=""){return!Ne(t)&&Ne(e.split("\n").filter(t=>{const e=t.trim();return e.length&&/^at\s+|@/.test(e)})[1]||"")}(r,e)||(T.V.error("Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided."),!1);const i=Re(o,r);return i||T.V.error("SDK initialized on a non-allowed domain."),i}(d,s??"")&&(d.compressIntakeRequests&&!a&&e&&(g=e(d,"Datadog RUM",m.l),!g)||(v=d,o.tryToInit(d.trackingConsent),o.onGrantedOnce(()=>{const{assembleTelemetry:e}=S;if(function(t,e){t.register(()=>e.isGranted()?Ae.$O:Ae.ug)}(e,o),w=(0,c.B)(E.a5)("browser-rum-sdk",d,e,n),u.W)return void T.V.warn("The RUM SDK is not supported in a web or service worker environment.");const s=(0,kt.d0)()?function(){let t={id:it(),isReplayForced:!1,anonymousId:void 0,createdAt:(0,r.nx)()};return Promise.resolve({findSession:()=>t,findTrackedSession:()=>t,renewObservable:new i.cP,expireObservable:new i.cP,expire:m.l,updateSessionState(e){t={...t,...e}}})}():(0,c.B)(fn)(d,o);s.then(r=>{r&&(_=r,function(t,e,n){t.register(({startTime:t})=>{const r=e.findTrackedSession(t);return r?{session:{id:r.id},anonymous_id:r.anonymousId,...n}:Ae.$O})}(e,_,{application:{id:d.applicationId}}),(0,E.Rr)(function(t,e){const n={session_sample_rate:(r=t).sessionSampleRate,telemetry_sample_rate:r.telemetrySampleRate,telemetry_configuration_sample_rate:r.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:r.telemetryUsageSampleRate,use_before_send:!!r.beforeSend,use_partitioned_cross_site_session_cookie:r.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:r.useSecureSessionCookie,use_proxy:!!r.proxy,silent_multiple_init:r.silentMultipleInit,track_session_across_subdomains:r.trackSessionAcrossSubdomains,track_anonymous_user:r.trackAnonymousUser,session_persistence:Array.isArray(r.sessionPersistence)?r.sessionPersistence[0]:r.sessionPersistence,store_contexts_across_pages:!!r.storeContextsAcrossPages,allow_untrusted_events:!!r.allowUntrustedEvents,tracking_consent:r.trackingConsent,use_allowed_tracking_origins:Array.isArray(r.allowedTrackingOrigins),source:r.source,sdk_version:r.sdkVersion,variant:r.variant};var r,o,i;return{session_replay_sample_rate:t.sessionReplaySampleRate,start_session_replay_recording_manually:t.startSessionReplayRecordingManually,trace_sample_rate:t.traceSampleRate,trace_context_injection:t.traceContextInjection,propagate_trace_baggage:t.propagateTraceBaggage,action_name_attribute:t.actionNameAttribute,use_allowed_tracing_urls:(0,Tt.EI)(t.allowedTracingUrls),use_allowed_graph_ql_urls:(0,Tt.EI)(t.allowedGraphQlUrls),use_track_graph_ql_payload:(i=t.allowedGraphQlUrls,(0,Tt.EI)(i)&&i.some(t=>(0,A.OE)(t)&&t.trackPayload)),use_track_graph_ql_response_errors:be(t.allowedGraphQlUrls),selected_tracing_propagators:me(t),default_privacy_level:t.defaultPrivacyLevel,enable_privacy_for_action_name:t.enablePrivacyForActionName,use_excluded_activity_urls:(0,Tt.EI)(t.excludedActivityUrls),use_worker_url:!!t.workerUrl,compress_intake_requests:t.compressIntakeRequests,track_views_manually:t.trackViewsManually,track_user_interactions:t.trackUserInteractions,track_resources:t.trackResources,track_long_task:t.trackLongTasks,plugins:t.plugins?.map(t=>({name:t.name,...t.getConfigurationTelemetry?.()})),track_feature_flags_for_events:t.trackFeatureFlagsForEvents,remote_configuration_id:ue(t),profiling_sample_rate:t.profilingSampleRate,use_remote_configuration_proxy:!!t.remoteConfigurationProxy,track_resource_headers:(o=t.trackResourceHeaders,!0===o?"default_headers":Array.isArray(o)?"custom":void 0),beta_enable_view_updates:pe(t.betaEnableViewUpdates,t.proxy,e),beta_track_web_sockets:t.betaTrackWebSockets,...n}}(t,n)),I())}).catch(f.Dx)})))}const N={init(e,n,o){if(!e)return void T.V.error("Missing configuration");if((0,xt.Aq)(e.enableExperimentalFeatures),(0,b.fK)(e.allowUntrustedEvents),y=e,t&&vn())return;const i=function(t,e){if(!t)return!0;const n=t.map(t=>t.onInit?.(e));return n.some(_e.Qg)?Promise.all(n).then(t=>!t.includes(!1)):!n.includes(!1)}(e.plugins,{initConfiguration:e,publicApi:n});function s(){if(ue(e)){const t={user:l,context:d};if(e.remoteConfigurationId||e.remoteConfiguration?.sync)(async function(t,e){let n;const r=se(),o=await ce(t);return o.ok?(r.increment("fetch","success"),n=ie(t,o.value,e,r)):(r.increment("fetch","failure"),T.V.error(o.error)),(0,E.Gk)("remote configuration metrics",{metrics:r.get()}),n})(e,t).then(t=>{t&&O(t,o)}).catch(f.Dx);else{const n=function(t,e){const n=function({remoteConfigurationId:t}){const e=function(t){return"dd_rc_"+t}(t);return{read(){let t;try{t=localStorage.getItem(e)}catch{return{status:"error"}}if(null===t)return{status:"miss"};const n=(0,Dt.XU)(t);return void 0===n?(this.remove(),{status:"error"}):function(t){if("object"!=typeof t||null===t)return!1;const e="version"in t&&2===t.version,n="config"in t&&"object"==typeof t.config&&null!==t.config;return e&&n}(n)?{status:"hit",config:n.config}:(this.remove(),{status:"error"})},remove(){try{localStorage.removeItem(e)}catch{}},write(t){const n={version:2,config:t,fetchedAt:(0,r.nx)()};try{localStorage.setItem(e,JSON.stringify(n))}catch{}}}}({remoteConfigurationId:ue(t)}),o=se(),i=n.read();return o.increment("cache",re[i.status]),function(t,e,n){ce(t).then(t=>{t.ok?(n.increment("fetch","success"),e.write(t.value)):(n.increment("fetch","failure"),T.V.error(t.error))}).catch(f.Dx).finally(()=>{(0,E.Gk)("remote configuration metrics",{metrics:n.get()})})}(t,n,o),"hit"===i.status?ie(t,i.config,e,o):t.remoteConfiguration?.required?void 0:t}(e,t);n&&O(n,o)}}else O(e,o)}"boolean"==typeof i?i&&s():i.then(t=>{t&&s()}).catch(f.Dx)},get initConfiguration(){return y},getInternalContext:m.l,stopSession:m.l,addTiming(t,e=(0,r.nx)()){a.notify(n=>n.addTiming(t,e))},setLoadingTime(t){a.notify(e=>e.setLoadingTime(t))},startView(t,e=(0,r.M8)()){const n=n=>{n.startView(t,e)};a.notify(n),h||(h={options:t,callback:n},I())},setViewName(t){a.notify(e=>e.setViewName(t))},setViewContext(t){a.notify(e=>e.setViewContext(t))},setViewContextProperty(t,e){a.notify(n=>n.setViewContextProperty(t,e))},getViewContext(){return x},globalContext:d,userContext:l,accountContext:p,addAction(t){a.notify(e=>e.addAction(t))},startAction(t,e){const n=(0,r.M8)();a.notify(r=>r.startAction(t,e,n))},stopAction(t,e){const n=(0,r.M8)();a.notify(r=>r.stopAction(t,e,n))},startResource(t,e){const n=(0,r.M8)();a.notify(r=>r.startResource(t,e,n))},stopResource(t,e){const n=(0,r.M8)();a.notify(r=>r.stopResource(t,e,n))},addError(t){a.notify(e=>e.addError(t))},addFeatureFlagEvaluation(t,e){a.notify(n=>n.addFeatureFlagEvaluation(t,e))},startDurationVital(t,e){const n=(0,r.M8)();a.notify(r=>r.startDurationVital(t,e,n))},stopDurationVital(t,e){const n=(0,r.M8)();a.notify(r=>r.stopDurationVital(t,e,n))},addDurationVital(t){a.notify(e=>e.addDurationVital(t))},addOperationStepVital(t,e,n,r){a.notify(o=>o.addOperationStepVital(R(t),e,R(n),R(r)))}};return N}(n,d,(r,o,i,s,a,u)=>{const d=i&&n.createDeflateEncoder?t=>n.createDeflateEncoder(i,t):J.N,f=(0,c.B)(Pi)(r,o,t,e,s,d,l.observable,a,u,n.sdkName);return t.onRumStart(f.lifeCycle,r,o,f.viewHistory,i,f.telemetry),e.onRumStart(f.lifeCycle,f.hooks,r,o,f.viewHistory,d),p=function(t,e){return{...t,init(t){ut("DD_RUM",t)},getInternalContext:e.getInternalContext,stopSession:e.stopSession,getViewContext:e.getViewContext,globalContext:e.globalContext,userContext:e.userContext,accountContext:e.accountContext}}(p,f),function(t,e){for(const n of t??[])n.onRumStart?.(e)}(r.plugins,{addEvent:f.addEvent,addError:f.addError}),f});const h=()=>p,g=(t,e)=>{const n=(0,P.uC)("vital");(0,f.um)(()=>{(0,E.Q6)({feature:"add-operation-step-vital",action_type:"start"}),p.addOperationStepVital(t,"start",{...e,handlingStack:n})})},y=(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"add-operation-step-vital",action_type:"succeed"}),p.addOperationStepVital(t,"end",e)}),_=(0,f.dm)((t,e,n)=>{(0,E.Q6)({feature:"add-operation-step-vital",action_type:"fail"}),p.addOperationStepVital(t,"end",n,e)}),w=(0,H.m)({init(t){const e=Error().stack;(0,f.um)(()=>p.init(t,w,e))},setTrackingConsent:(0,f.dm)(t=>{d.update(t),(0,E.Q6)({feature:"set-tracking-consent",tracking_consent:t})}),setViewName:(0,f.dm)(t=>{p.setViewName(Vi(t,"view name")),(0,E.Q6)({feature:"set-view-name"})}),setViewContext:(0,f.dm)(t=>{p.setViewContext(t),(0,E.Q6)({feature:"set-view-context"})}),setViewContextProperty:(0,f.dm)((t,e)=>{p.setViewContextProperty(t,e),(0,E.Q6)({feature:"set-view-context-property"})}),getViewContext:(0,f.dm)(()=>((0,E.Q6)({feature:"set-view-context-property"}),p.getViewContext())),getInternalContext:(0,f.dm)(t=>p.getInternalContext(t)),getInitConfiguration:(0,f.dm)(()=>(0,o.Go)(p.initConfiguration)),addAction(t,e){const n=(0,P.uC)("action");(0,f.um)(()=>{p.addAction({name:R(t),context:R(e),startClocks:(0,r.M8)(),type:ht,handlingStack:n}),(0,E.Q6)({feature:"add-action"})})},startAction:(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"start-action"}),p.startAction(R(t),{type:R(e?.type),context:R(e?.context),actionKey:e?.actionKey})}),stopAction:(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"stop-action"}),p.stopAction(R(t),{type:R(e?.type),context:R(e?.context),actionKey:e?.actionKey})}),startResource:(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"start-resource"}),p.startResource(R(t),{type:R(e?.type),method:R(e?.method),context:R(e?.context),resourceKey:e?.resourceKey})}),stopResource:(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"stop-resource"}),p.stopResource(R(t),{type:R(e?.type),statusCode:e?.statusCode,size:e?.size,context:R(e?.context),resourceKey:e?.resourceKey})}),addError(t,e){const n=(0,P.uC)("error");(0,f.um)(()=>{p.addError({error:t,handlingStack:n,context:R(e),startClocks:(0,r.M8)()}),(0,E.Q6)({feature:"add-error"})})},addTiming:(0,f.dm)((t,e)=>{p.addTiming(R(t),e)}),setViewLoadingTime:(0,f.dm)(()=>{const t=(0,r.nx)();p.setLoadingTime(t),(0,E.Q6)({feature:"addViewLoadingTime"})}),setGlobalContext:K(h,Y,et,"set-global-context"),getGlobalContext:K(h,Y,tt,"get-global-context"),setGlobalContextProperty:K(h,Y,nt,"set-global-context-property"),removeGlobalContextProperty:K(h,Y,rt,"remove-global-context-property"),clearGlobalContext:K(h,Y,ot,"clear-global-context"),setUser:K(h,Z,et,"set-user"),getUser:K(h,Z,tt,"get-user"),setUserProperty:K(h,Z,nt,"set-user-property"),removeUserProperty:K(h,Z,rt,"remove-user-property"),clearUser:K(h,Z,ot,"clear-user"),setAccount:K(h,X,et,"set-account"),getAccount:K(h,X,tt,"get-account"),setAccountProperty:K(h,X,nt,"set-account-property"),removeAccountProperty:K(h,X,rt,"remove-account-property"),clearAccount:K(h,X,ot,"clear-account"),startView(t){const e=(0,P.uC)("view");(0,f.um)(()=>{const n="object"==typeof t?t:{name:t};p.startView({...n,name:Vi(n.name,"view name"),service:Vi(n.service,"view service"),version:Vi(n.version,"view version"),handlingStack:e}),(0,E.Q6)({feature:"start-view"})})},stopSession:(0,f.dm)(()=>{p.stopSession(),(0,E.Q6)({feature:"stop-session"})}),addFeatureFlagEvaluation:(0,f.dm)((t,e)=>{p.addFeatureFlagEvaluation(R(t),R(e)),(0,E.Q6)({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:(0,f.dm)(()=>t.getSessionReplayLink()),startSessionReplayRecording:(0,f.dm)(e=>{t.start(e),(0,E.Q6)({feature:"start-session-replay-recording",force:e?.force})}),stopSessionReplayRecording:(0,f.dm)(()=>t.stop()),addDurationVital(t,e){const n=(0,P.uC)("vital");(0,f.um)(()=>{(0,E.Q6)({feature:"add-duration-vital"}),p.addDurationVital({id:it(),name:R(t),type:vt.DURATION,startClocks:(0,r.jR)(e.startTime),duration:e.duration,context:R(e?.context),description:R(e?.description),handlingStack:n})})},startDurationVital(t,e){const n=(0,P.uC)("vital");(0,f.um)(()=>{(0,E.Q6)({feature:"start-duration-vital"}),p.startDurationVital(R(t),{vitalKey:e?.vitalKey,context:R(e?.context),description:R(e?.description),handlingStack:n})})},stopDurationVital:(0,f.dm)((t,e)=>{(0,E.Q6)({feature:"stop-duration-vital"}),p.stopDurationVital(R(t),{vitalKey:e?.vitalKey,context:R(e?.context),description:R(e?.description)})}),startOperation:g,succeedOperation:y,failOperation:_,startFeatureOperation:g,succeedFeatureOperation:y,failFeatureOperation:_,DEFAULT_TRACKED_RESOURCE_HEADERS:le});return w}function Vi(t,e){if(void 0!==t){if("string"==typeof t)return R(t);T.V.warn(`Invalid ${e} provided (expected a string, got ${typeof t}). Ignoring.`)}}function Li(t,{session:e,viewContext:n,errorType:r}){const o=e?e.id:"no-session-id",i=[];void 0!==r&&i.push("error-type="+r),n&&(i.push("seed="+n.id),i.push("from="+n.startClocks.timeStamp));const s=function(t){const e=t.site,n=t.subdomain||function(t){switch(t.site){case bt.NW:case bt.dV:return"app";case bt.Bb:return"dd";default:return}}(t);return`https://${n?n+".":""}${e}`}(t);return`${s}${"/rum/replay/sessions/"+o}?${i.join("&")}`}var $i=n(1776);function Ui(t,e,n,o){const i=(0,$i.sA)([(0,Ft.ns)(t,"profile")],t=>{e.notify(15,{error:{message:t,source:F.g.AGENT,startClocks:(0,r.M8)()}}),(0,E.A2)("Error reported to customer",{"error.message":t})}),s=n(o);return{async send({event:t,...e}){const n=new FormData,r=(0,I.s)(t);if(!r)throw Error("Failed to serialize event");n.append("event",new Blob([r],{type:"application/json"}),"event.json");let o=r.length;for(const[t,r]of(0,Ve.WP)(e)){const e=(0,I.s)(r);if(!e)throw Error("Failed to serialize attachment");const i=await zi(s,e);o+=i.outputBytesCount,n.append(t,new Blob([i.output]),t)}i.send({data:n,bytesCount:o})}}}function zi(t,e){return new Promise(n=>{t.write(e),t.finish(t=>{n(t)})})}},7163(t,e,n){n.d(e,{BJ:()=>I,CB:()=>A,g1:()=>kt});var r=n(4512),o=n(8333),i=n(979),s=n(9164);function a(t,e){const n=t.tagName,o=t.value;if((0,r.Ie)(t,e)){const e=t.type;if("INPUT"===n&&("button"===e||"submit"===e||"reset"===e))return o;if(!o||"OPTION"===n)return;return r.o}return"OPTION"===n||"SELECT"===n?t.value:"INPUT"===n||"TEXTAREA"===n?o:void 0}const c=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,u=/^[A-Za-z]+:|^\/\//,d=/^["']?data:.*,/i;function l(t){return t.tagName.toLowerCase()}function f(t,e){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${e}' style='background-color:silver'%3E%3C/svg%3E`}function p(t,e){return{role:t,string:e}}function m(t,e,n){return[p(i._o.AttributeName,e),p(v(t,e),n)]}function h(t,e,n){const r=p(i._o.AttributeName,e);return null===n?[r]:[r,p(v(t,e),n)]}const g=new Set(["input","option","select","textarea"]),y=new Set(["action","background","cite","data","formaction","href","longdesc","manifest","ping","poster","src","srcset","xlink:href"]);function v(t,e){switch(e){case"value":return g.has(t)?i._o.FormInput:i._o.AttributeValue;case"style":return i._o.Css;default:return y.has(e)?i._o.Url:i._o.AttributeValue}}function b(t){const e={},n=new Map,r=[];let o=0,s=!1;const a=e=>{const r=t.get(e);if(void 0!==r)return r;s=!0;let i=n.get(e.role);i||(i={role:e.role,strings:new Map,references:0},n.set(e.role,i)),i.references++;const a=i.strings.get(e.string);if(a)return a;const c={literal:e,id:void 0};return i.strings.set(e.string,c),o++,c},c=t=>{for(let e=0,n=t.length;e<n;e++){const n=t[e];"string"==typeof n?t[e]=a(p(i._o.Default,n)):Array.isArray(n)?c(n):S(n)&&(t[e]=a(n))}};return{add(t,n){t in e||(e[t]=[t]),Array.isArray(n)&&(s=!1,c(n),s&&r.push(n)),e[t].push(n)},flushInto(o){const s=(()=>{if(0===n.size)return;const e=[i.JQ.AddRoleAnnotatedStrings];for(const r of Array.from(n.values()).sort(w)){const n=[r.role];for(const e of r.strings.values())e.id=t.getOrInsert(e.literal),n.push(e.literal.string);e.push(n)}return e})();s&&o.push(s);for(const t of r)_(t);[i.JQ.AddNode,i.JQ.RemoveNode,i.JQ.Attribute,i.JQ.Text,i.JQ.InputValue,i.JQ.InputSelection,i.JQ.Size,i.JQ.ScrollPosition,i.JQ.AddStyleSheet,i.JQ.AttachedStyleSheets,i.JQ.MediaPlaybackState,i.JQ.VisualViewport].forEach(t=>{const n=e[t];n&&o.push(n)})},get pendingStringCount(){return o}}}function _(t){for(let e=0,n=t.length;e<n;e++){const n=t[e];Array.isArray(n)?_(n):k(n)&&(t[e]=n.id)}}function w(t,e){return e.references-t.references}function S(t){return"object"==typeof t&&null!==t&&"string"in t}function k(t){return"object"==typeof t&&null!==t&&"literal"in t}function x(t){return function(t,e){let n=t(),r=e;const o=t=>n.get(t);return{clear(){r!==e&&(n=t(),r=e)},delete(t){n.delete(t)},get:o,getOrInsert(t){let e=o(t);return void 0===e&&(e=r++,n.set(t,e)),e},get nextId(){return r},get size(){return r-e}}}(()=>new WeakMap,t)}function E(){return{[i._o.Default]:C(),[i._o.NodeName]:C(),[i._o.AttributeName]:C(),[i._o.AttributeValue]:C(),[i._o.TextContent]:C(),[i._o.FormInput]:C(),[i._o.Css]:C(),[i._o.Url]:C()}}function C(){return Object.create(null)}function A(){return{cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}}}function T(t,e,n){t[e].count+=1,t[e].max=Math.max(t[e].max,n),t[e].sum+=n}function I(t,e){for(const n of["cssText","serializationDuration"])t[n].count+=e[n].count,t[n].max=Math.max(t[n].max,e[n].max),t[n].sum+=e[n].sum}function R(t,e,n,r,s,a){const c=function(t){let e=[],n=b(t);const r=()=>{n.flushInto(e),n=b(t)};return{add(o,s){n.add(o,s),t.size+n.pendingStringCount>=Number(1e6)&&(r(),e.push([i.JQ.ClearStrings]),t.clear())},flush(){r();const t=e;return e=[],t}}}(r.stringIds),u={cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}},d={addMetric(t,e){T(u,t,e)},addNode(...t){c.add(i.JQ.AddNode,t)},addStyleSheet(t,e,n){n?c.add(i.JQ.AddStyleSheet,[t,e||[],n]):e?c.add(i.JQ.AddStyleSheet,[t,e]):c.add(i.JQ.AddStyleSheet,[t])},attachStyleSheets(t,e){const n=[t];for(const t of e)n.push(t);c.add(i.JQ.AttachedStyleSheets,n)},removeNode(t){c.add(i.JQ.RemoveNode,t)},setAttributes(t){c.add(i.JQ.Attribute,t)},setInputSelection(t,e){const n=[t];for(const t of e)n.push(t);c.add(i.JQ.InputSelection,n)},setInputValue(t,e){c.add(i.JQ.InputValue,[t,e])},setMediaPlaybackState(t,e){c.add(i.JQ.MediaPlaybackState,[t,e])},setScrollPosition(t,e,n){c.add(i.JQ.ScrollPosition,[t,e,n])},setSize(t,e,n){c.add(i.JQ.Size,[t,e,n])},setText(t,e){c.add(i.JQ.Text,[t,e])},kind:t,scope:r},l=(0,o.nx)();a(d),T(u,"serializationDuration",(0,o.vk)(l,(0,o.nx)()));const f=c.flush();f.length>0&&e(0===t||1===t?{data:f,format:i.KN.Change,type:i.ee.FullSnapshot,timestamp:s}:{data:f,type:i.ee.Change,timestamp:s}),n(u)}const O=["width","height"];function N(t){return(0,r.nS)(t)&&"CANVAS"===t.tagName}function M(t){return O.includes(t.toLowerCase())}let P;function D(t,e,n,o){if(e===r.$m.HIDDEN)return null;const i=t.getAttribute(n),s=t.tagName;if((0,r.ap)(s,n,i,e,o)){if("IMG"===s){const e=t;if(e.naturalWidth>0)return f(e.naturalWidth,e.naturalHeight);const{width:n,height:o}=t.getBoundingClientRect();return n>0||o>0?f(n,o):r.eT}return"SOURCE"===s?r.eT:r.o}return i?(0,r.ei)(i,1e6):i}function V(t,e,n,r,o,i){const s=D(e,o,r,i.scope.configuration);null!==s&&t.push(m(n,r,s))}function L(t){if(!t)return null;let e;try{e=t.rules||t.cssRules}catch{}return e?(n=Array.from(e,1===(P??(P=function(t=window){const e=t.navigator.userAgent;return t.chrome||/HeadlessChrome/.test(e)?0:0===t.navigator.vendor?.indexOf("Apple")||/safari/i.test(e)&&!/chrome|android/i.test(e)?1:2}()))?$:U).join(""),r=t.href,n.replace(c,(t,e,n,o,i,a)=>{const c=n||i||a;if(!r||!c||u.test(c)||d.test(c))return t;const l=e||o||"";return`url(${l}${function(t,e){try{return(0,s.c$)(t,e).href}catch{return t}}(c,r)}${l})`})):null;var n,r}function $(t){if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")){const e=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return t.cssText.replace(e,"$1\\$2")}return U(t)}function U(t){return function(t){return"styleSheet"in t}(t)&&L(t.styleSheet)||t.cssText}function z(t,e,n,o){if("STYLE"===e.parentNode?.nodeName)return;if(n===r.$m.HIDDEN||n===r.$m.IGNORE)return;let s;const c=(0,r.dT)(e);if(s=c?(0,r.jR)(c,n):n,s!==r.$m.HIDDEN){if(s!==r.$m.IGNORE){switch(e.nodeType){case e.CDATA_SECTION_NODE:!function(t,e,n){const{insertionPoint:r}=t.advance(e);n.addNode(r,p(i._o.NodeName,"#cdata-section"))}(t,e,o);break;case e.DOCUMENT_NODE:!function(t,e,n){const{nodeId:o,insertionPoint:s}=t.advance(e);n.addNode(s,p(i._o.NodeName,"#document")),n.setScrollPosition(o,(0,r.Gn)(),(0,r.zL)()),j(e.adoptedStyleSheets,o,n)}(t,e,o);break;case e.DOCUMENT_FRAGMENT_NODE:!function(t,e,n){const{nodeId:o,insertionPoint:s}=t.advance(e);(0,r.p_)(e)?(n.addNode(s,p(i._o.NodeName,"#shadow-root")),n.scope.shadowRootsController.addShadowRoot(e,n.scope),j(e.adoptedStyleSheets,o,n)):n.addNode(s,p(i._o.NodeName,"#document-fragment"))}(t,e,o);break;case e.DOCUMENT_TYPE_NODE:!function(t,e,n){const{insertionPoint:r}=t.advance(e);n.addNode(r,p(i._o.NodeName,"#doctype"),p(i._o.AttributeValue,e.name),p(i._o.AttributeValue,e.publicId),p(i._o.Url,e.systemId))}(t,e,o);break;case e.ELEMENT_NODE:!function(t,e,n,o){const{nodeId:s,insertionPoint:c}=t.advance(e),u=function(t,e,n){if(e===r.$m.HIDDEN)return[];const o=[],i=l(t);for(let r=0;r<t.attributes.length;r+=1){const s=t.attributes.item(r).name;"value"!==s&&"selected"!==s&&"checked"!==s&&V(o,t,i,s,e,n)}if(!t.value||"textarea"!==i&&"select"!==i&&"option"!==i&&"input"!==i)t.hasAttribute("value")&&V(o,t,i,"value",e,n);else{const n=a(t,e);void 0!==n&&o.push(m(i,"value",n))}"option"===i?t.selected&&!(0,r.Ie)(t,e)&&o.push(m(i,"selected","")):t.hasAttribute("selected")&&V(o,t,i,"selected",e,n);const s=t;return"input"!==i||"radio"!==s.type&&"checkbox"!==s.type?t.hasAttribute("checked")&&V(o,t,i,"checked",e,n):s.checked&&!(0,r.Ie)(t,e)&&o.push(m(i,"checked","")),o}(e,n,o);o.addNode(c,q(e),...u),N(e)&&o.scope.canvasManager.markCanvasDirty(e);const{_cssText:d,rr_mediaState:f,rr_scrollLeft:h,rr_scrollTop:g}=function(t,e,n){if(e===r.$m.HIDDEN)return{};const o={},i=t.ownerDocument,s=l(t);if("link"===s){const e=Array.from(i.styleSheets).find(e=>e.href===t.href),r=L(e);r&&e&&(n.addMetric("cssText",r.length),o._cssText=r)}if("style"===s&&t.sheet){const e=L(t.sheet);e&&(n.addMetric("cssText",e.length),o._cssText=e)}if("audio"===s||"video"===s){const e=t;o.rr_mediaState=e.paused?"paused":"played"}let a,c;switch(n.kind){case 0:a=Math.round(t.scrollTop),c=Math.round(t.scrollLeft),(a||c)&&n.scope.elementsScrollPositions.set(t,{scrollTop:a,scrollLeft:c});break;case 1:n.scope.elementsScrollPositions.has(t)&&({scrollTop:a,scrollLeft:c}=n.scope.elementsScrollPositions.get(t))}return c&&(o.rr_scrollLeft=c),a&&(o.rr_scrollTop=a),o}(e,n,o),y=e;if(void 0!==d&&y.sheet){const t=o.scope.styleSheetIds.getOrInsert(y.sheet);o.addStyleSheet(p(i._o.Css,d)),o.attachStyleSheets(s,[t])}"played"===f?o.setMediaPlaybackState(s,i.xQ.Play):"paused"===f&&o.setMediaPlaybackState(s,i.xQ.Pause),void 0===h&&void 0===g||o.setScrollPosition(s,h||0,g||0)}(t,e,s,o);break;case e.TEXT_NODE:!function(t,e,n,o){const{insertionPoint:s}=t.advance(e),a=(0,r.rf)(e,n);o.addNode(s,p(i._o.NodeName,"#text"),p(i._o.TextContent,a))}(t,e,s,o);break;default:return}switch(e.nodeType){case e.CDATA_SECTION_NODE:case e.DOCUMENT_TYPE_NODE:case e.TEXT_NODE:return}t.descend(),(0,r.wI)(e,e=>{z(t,e,s,o)}),t.ascend()}}else!function(t,e,n){if(!(0,r.nS)(e))return;const{nodeId:o,insertionPoint:i}=t.advance(e);n.addNode(i,q(e),m(l(e),r.NT,r.Wd));const{width:s,height:a}=e.getBoundingClientRect();n.setSize(o,s,a)}(t,e,o)}function j(t,e,n){t&&0!==t.length&&n.attachStyleSheets(e,t.map(t=>function(t,e){const n=Array.from(t.cssRules||t.rules,t=>p(i._o.Css,t.cssText)),r=t.media.length>0?Array.from(t.media).map(t=>p(i._o.Css,t)):void 0;return e.addMetric("cssText",n.reduce((t,e)=>t+e.string.length,0)),e.addStyleSheet(n,r,t.disabled),e.scope.styleSheetIds.getOrInsert(t)}(t,n)))}function q(t){const e=t.nodeName;return function(t){return"http://www.w3.org/2000/svg"===t.namespaceURI}(t)?p(i._o.NodeName,"svg>"+e):p(i._o.NodeName,e)}function B(t,e,n){return F(t,e,n)}function F(t,e,n){let r={container:void 0,parentId:t,previousSiblingId:void 0,nextSiblingId:e};return{advance(t){const e=n.getOrInsert(t),o=(t=>r.previousSiblingId===t-1?0:void 0!==r.nextSiblingId?r.nextSiblingId-t:void 0!==r.parentId?t-r.parentId:null)(e);return r.previousSiblingId=e,{nodeId:e,insertionPoint:o}},ascend(){r.container&&(r=r.container)},descend(){void 0!==r.previousSiblingId&&(r={container:r,parentId:r.previousSiblingId,previousSiblingId:void 0,nextSiblingId:void 0})}}}function G(t,e){let n=t.nextSibling;for(;n;){const t=e.get(n);if(void 0!==t)return t;n=n.nextSibling}}function W(t,e){e(t),(0,r.wI)(t,t=>W(t,e))}const J=t=>({scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width});function H(t,e,n,o,s){const{width:a,height:c}=(0,r.pB)();n({data:{height:c,href:window.location.href,width:a},type:i.ee.Meta,timestamp:t}),n({data:{has_focus:document.hasFocus()},type:i.ee.Focus,timestamp:t}),function(t,e,n,r,o,i){i.resetIds(),R(e,r,o,i,t,t=>{z(F(void 0,void 0,i.nodeIds),n,i.configuration.defaultPrivacyLevel,t)})}(t,e,document,n,o,s),window.visualViewport&&n({data:J(window.visualViewport),type:i.ee.VisualViewport,timestamp:t})}var K=n(350),Q=n(728),Z=n(2729),Y=n(3236);function X(t){return!!t.changedTouches}function tt(t){return!0===t.composed&&(0,r.XS)(t.target)?t.composedPath()[0]:t.target}function et(t,e,n=(0,o.nx)()){return{data:{source:t,...e},type:i.ee.IncrementalSnapshot,timestamp:n}}function nt(t,e){const{throttled:n,cancel:r}=(0,Z.n)(n=>{const r=tt(n),o=e.nodeIds.get(r);if(void 0===o)return;const s=rt(n);if(!s)return;const a={id:o,timeOffset:0,x:s.x,y:s.y};t(et(X(n)?i.Cj.TouchMove:i.Cj.MouseMove,{positions:[a]}))},50,{trailing:!1}),{stop:o}=(0,Y.lQ)(document,["mousemove","touchmove"],n,{capture:!0,passive:!0});return{stop(){o(),r()}}}function rt(t){let{clientX:e,clientY:n}=X(t)?t.changedTouches[0]:t;if(window.visualViewport){const{visualViewportX:t,visualViewportY:r}=((t,e)=>{const n=window.visualViewport,r={layoutViewportX:t,layoutViewportY:e,visualViewportX:t,visualViewportY:e};return n?(function(t){return Math.abs(t.pageTop-t.offsetTop-window.scrollY)>25||Math.abs(t.pageLeft-t.offsetLeft-window.scrollX)>25}(n)?(r.layoutViewportX=Math.round(t+n.offsetLeft),r.layoutViewportY=Math.round(e+n.offsetTop)):(r.visualViewportX=Math.round(t-n.offsetLeft),r.visualViewportY=Math.round(e-n.offsetTop)),r):r})(e,n);e=t,n=r}if(Number.isFinite(e)&&Number.isFinite(n))return{x:e,y:n}}const ot={pointerup:i.GE.MouseUp,mousedown:i.GE.MouseDown,click:i.GE.Click,contextmenu:i.GE.ContextMenu,dblclick:i.GE.DblClick,focus:i.GE.Focus,blur:i.GE.Blur,touchstart:i.GE.TouchStart,touchend:i.GE.TouchEnd};function it(t,e){return(0,Y.lQ)(document,Object.keys(ot),n=>{const o=tt(n),s=e.nodeIds.get(o);if(void 0===s||(0,r.PJ)(o,e.configuration.defaultPrivacyLevel)===r.$m.HIDDEN)return;const a=ot[n.type];let c;if(a!==i.GE.Blur&&a!==i.GE.Focus){const t=rt(n);if(!t)return;c={id:s,type:a,x:t.x,y:t.y}}else c={id:s,type:a};t({id:e.eventIds.getOrInsert(n),...et(i.Cj.MouseInteraction,c)})},{capture:!0,passive:!0})}function st(t,e,n){const{throttled:o,cancel:s}=(0,Z.n)(t=>{const o=tt(t);if(!o)return;const s=n.nodeIds.get(o);if(void 0===s||(0,r.PJ)(o,n.configuration.defaultPrivacyLevel)===r.$m.HIDDEN)return;const a=o===document?{scrollTop:(0,r.zL)(),scrollLeft:(0,r.Gn)()}:{scrollTop:Math.round(o.scrollTop),scrollLeft:Math.round(o.scrollLeft)};n.elementsScrollPositions.set(o,a),e(et(i.Cj.Scroll,{id:s,x:a.scrollLeft,y:a.scrollTop}))},100),{stop:a}=(0,Y.q2)(t,"scroll",o,{capture:!0,passive:!0});return{stop(){a(),s()}}}function at(t){const e=(0,r.g1)().subscribe(e=>{t(et(i.Cj.ViewportResize,e))});return{stop(){e.unsubscribe()}}}function ct(t){const e=window.visualViewport;if(!e)return{stop:Z.l};const{throttled:n,cancel:r}=(0,Z.n)(()=>{t({data:J(e),type:i.ee.VisualViewport,timestamp:(0,o.nx)()})},200,{trailing:!1}),{stop:s}=(0,Y.lQ)(e,["resize","scroll"],n,{capture:!0,passive:!0});return{stop(){s(),r()}}}function ut(t,e){return(0,Y.lQ)(document,["play","pause"],n=>{const o=tt(n);if(!o)return;const s=e.nodeIds.get(o);void 0!==s&&(0,r.PJ)(o,e.configuration.defaultPrivacyLevel)!==r.$m.HIDDEN&&t(et(i.Cj.MediaInteraction,{id:s,type:"play"===n.type?i.xQ.Play:i.xQ.Pause}))},{capture:!0,passive:!0})}var dt=n(3444);function lt(t,e){function n(t,n){if(!t?.ownerNode)return;const r=e.nodeIds.get(t.ownerNode);void 0!==r&&n(r)}const r=[(0,dt.H7)(CSSStyleSheet.prototype,"insertRule",({target:e,parameters:[r,o]})=>{n(e,e=>t(et(i.Cj.StyleSheetRule,{id:e,adds:[{rule:r,index:o}]})))}),(0,dt.H7)(CSSStyleSheet.prototype,"deleteRule",({target:e,parameters:[r]})=>{n(e,e=>t(et(i.Cj.StyleSheetRule,{id:e,removes:[{index:r}]})))})];function o(e){r.push((0,dt.H7)(e.prototype,"insertRule",({target:e,parameters:[r,o]})=>{n(e.parentStyleSheet,n=>{const s=ft(e);s&&(s.push(o||0),t(et(i.Cj.StyleSheetRule,{id:n,adds:[{rule:r,index:s}]})))})}),(0,dt.H7)(e.prototype,"deleteRule",({target:e,parameters:[r]})=>{n(e.parentStyleSheet,n=>{const o=ft(e);o&&(o.push(r),t(et(i.Cj.StyleSheetRule,{id:n,removes:[{index:o}]})))})}))}return"undefined"!=typeof CSSGroupingRule?o(CSSGroupingRule):(o(CSSMediaRule),o(CSSSupportsRule)),{stop(){r.forEach(t=>t.stop())}}}function ft(t){const e=[];let n=t;for(;n.parentRule;){const t=Array.from(n.parentRule.cssRules).indexOf(n);e.unshift(t),n=n.parentRule}if(!n.parentStyleSheet)return;const r=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return e.unshift(r),e}function pt(t){return(0,Y.lQ)(window,["focus","blur"],()=>{t({data:{has_focus:document.hasFocus()},type:i.ee.Focus,timestamp:(0,o.nx)()})})}function mt(t,e,n){const r=t.subscribe(5,()=>{n(),e({timestamp:(0,o.nx)(),type:i.ee.ViewEnd})});return{stop(){r.unsubscribe()}}}const ht={type:1,selection:i.WW.Deselected};function gt(t,e,n,s){const c=s.configuration.defaultPrivacyLevel,u=new WeakMap,d=t.nodeType!==t.DOCUMENT_NODE,l=(d?t.ownerDocument:t).defaultView;if(!l)return{stop:Z.l};const{stop:f}=(0,Y.lQ)(t,d?["change"]:["input","change"],t=>{const e=tt(t);(e instanceof l.HTMLInputElement||e instanceof l.HTMLTextAreaElement||e instanceof l.HTMLSelectElement)&&h(e)},{capture:!0,passive:!0});let m;if(d)m=Z.l;else{const t=[(0,dt.tv)(l.HTMLInputElement.prototype,"value",h),(0,dt.tv)(l.HTMLInputElement.prototype,"checked",h),(0,dt.tv)(l.HTMLSelectElement.prototype,"value",h),(0,dt.tv)(l.HTMLTextAreaElement.prototype,"value",h),(0,dt.tv)(l.HTMLSelectElement.prototype,"selectedIndex",h)];m=()=>{t.forEach(t=>t.stop())}}return{stop(){m(),f()}};function h(t){const d=(0,r.PJ)(t,c);if(d===r.$m.HIDDEN)return;const l=t.type;let f,m=t;if("radio"===l||"checkbox"===l){if((0,r.Ie)(t,d))return;f={type:1,selection:(h=t,h.checked?i.WW.Selected:i.WW.Deselected)}}else if(yt(t)){if((0,r.Ie)(t,d))return;const e=t.options[t.selectedIndex];if(!e)return;m=e,f={type:1,selection:i.WW.Selected}}else{const e=a(t,d);if(void 0===e)return;f={type:0,value:e}}var h;const y=g(m,f),v=[];if("radio"===l&&t.checked&&(b=t).name&&b.ownerDocument.querySelectorAll(`input[type="radio"][name="${CSS.escape(b.name)}"]`).forEach(t=>{t!==b&&(t=>{const e=g(t,ht);void 0!==e&&v.push(e)})(t)}),yt(t))for(let e=0;e<t.options.length;e++){const n=t.options[e];n!==m&&u.delete(n)}var b;void 0===y&&0===v.length||R(2,e,n,s,(0,o.nx)(),t=>{void 0!==y&&(0===f.type?t.setInputValue(y,p(i._o.FormInput,f.value)):t.setInputSelection(f.selection,[y])),v.length>0&&t.setInputSelection(i.WW.Deselected,v)})}function g(t,e){const n=s.nodeIds.get(t);if(void 0===n)return;const r=u.get(t);return r&&(i=e,0===(o=r).type?0===i.type&&o.value===i.value:1===i.type&&o.selection===i.selection)?void 0:(u.set(t,e),n);var o,i}}function yt(t){return"SELECT"===t.tagName}var vt=n(6447),bt=n(7922);function _t(t,e,n,s){const c=(0,r.W3)();if(!c)return{stop:Z.l,flush:Z.l};const u=function(){let t=Z.l,c=[];function u(){var u;t(),u=c,function(t,e,n,o,s){R(2,n,o,s,t,t=>function(t,e){const n=new Set,o=new Map,s=new Map,c=new Set;for(const e of t)switch(e.type){case"attributes":{const t=e.target;let n=o.get(t);n||(n=new Map,o.set(t,n));const r=e.attributeName;n.has(r)||n.set(r,e.oldValue);break}case"characterData":s.has(e.target)||s.set(e.target,e.oldValue);break;case"childList":for(let t=0;t<e.addedNodes.length;t++)n.add(e.addedNodes[t]);for(let t=0;t<e.removedNodes.length;t++)c.add(e.removedNodes[t])}const u=e.scope.nodeIds.nextId,d=new Map;(function(t,e){const n=e.scope.nodeIds;for(const o of t){const t=n.get(o);void 0!==t&&(W(o,t=>{N(t)&&e.scope.canvasManager.markCanvasClean(t),(0,r.XS)(t)&&e.scope.shadowRootsController.removeShadowRoot(t.shadowRoot),n.delete(t)}),e.removeNode(t))}})(c,e),function(t,e,n){const o=n.scope.nodeIds;for(const i of t){if(!i.isConnected)continue;if(void 0!==o.get(i))continue;const t=(0,r.$4)(i);if(!t)continue;const s=o.get(t);if(void 0===s)continue;const a=(0,r.PJ)(t,n.scope.configuration.defaultPrivacyLevel,e);z(B(s,G(i,o),o),i,a,n)}}(n,d,e),function(t,e,n,o){const s=o.scope.nodeIds;for(const[a,c]of t){if(a.textContent===c)continue;if(!a.isConnected)continue;const t=s.get(a);if(void 0===t)continue;if(t>=e)continue;const u=(0,r.$4)(a);if(!u)continue;const d=(0,r.PJ)(u,o.scope.configuration.defaultPrivacyLevel,n);if(d===r.$m.HIDDEN||d===r.$m.IGNORE)continue;const l=(0,r.rf)(a,d);o.setText(t,p(i._o.TextContent,l))}}(s,u,d,e),function(t,e,n,o){const i=o.scope.nodeIds;for(const[s,c]of t){if(!s.isConnected)continue;const t=i.get(s);if(void 0===t)continue;if(t>=e)continue;const u=(0,r.PJ)(s,o.scope.configuration.defaultPrivacyLevel,n);if(u===r.$m.HIDDEN||u===r.$m.IGNORE)continue;const d=l(s),f=[t];for(const[t,e]of c){if(s.getAttribute(t)===e)continue;if(N(s)&&M(t)&&o.scope.canvasManager.markCanvasDirty(s),"value"===t){const e=a(s,u);void 0!==e&&f.push(m(d,t,e));continue}const n=D(s,u,t,o.scope.configuration);f.push(h(d,t,n))}f.length>1&&o.setAttributes(f)}}(o,u,d,e)}(e,t))}((0,o.nx)(),u.concat(d.takeRecords()),e,n,s),c=[]}const{throttled:f,cancel:g}=(0,Z.n)(u,16,{leading:!1});return{addMutations(e){0===c.length&&(t=(0,bt.BB)(f,{timeout:100}));for(const t of e)c.push(t)},flush:u,stop(){t(),g()}}}(),d=new c((0,vt.dm)(u.addMutations));return d.observe(t,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop(){d.disconnect(),u.stop()},flush(){u.flush()}}}const wt=["clearRect","fillRect","strokeRect","fill","stroke","fillText","strokeText","drawImage","putImageData","drawFocusIfNeeded","reset"];function St(t){if(!t.configuration.sessionReplayCanvasRecording?.enable||0===t.configuration.sessionReplayCanvasRecording.maxFramesPerSecond||"undefined"==typeof CanvasRenderingContext2D)return{stop:Z.l};const e=[];return wt.forEach(n=>{e.push((0,dt.H7)(CanvasRenderingContext2D.prototype,n,({target:e,onPostCall:n})=>{n(()=>{void 0!==t.nodeIds.get(e.canvas)&&t.canvasManager.markCanvasDirty(e.canvas)})}))}),{stop:()=>e.forEach(t=>t.stop())}}function kt(t){const{emitRecord:e,emitStats:n,configuration:r,lifeCycle:i}=t;if(!e||!n)throw Error("emit functions are required");const s=n=>{e(n),(0,K.b)("record",{record:n});const r=t.viewHistory.findView();Q.$1(r.id)},a=function(){const t=new Set;return{clearDirtyCanvases(){return t.clear()},getDirtyCanvases(){const e=[];return t.forEach(n=>{n.isConnected?e.push(n):t.delete(n)}),e},isCanvasDirty(e){return t.has(e)},markCanvasClean(e){return t.delete(e)},markCanvasDirty(e){e.isConnected&&t.add(e)}}}(),c=((t,e)=>{const n=new Map;return{addShadowRoot(r,o){if(n.has(r))return;const i=_t(r,t,e,o),s=gt(r,t,e,o),a=st(r,t,o);n.set(r,{flush(){return i.flush()},stop(){i.stop(),s.stop(),a.stop()}})},removeShadowRoot(t){const e=n.get(t);e&&(e.stop(),n.delete(t))},stop(){n.forEach(({stop:t})=>t())},flush(){n.forEach(({flush:t})=>t())}}})(s,n),u=function(t,e,n,r){const o=x(1),i=x(0),s=function(){let t=0,e=E();const n=t=>e[t.role][t.string];return{clear(){0!==t&&(e=E(),t=0)},get:n,getOrInsert(r){let o=n(r);return void 0===o&&(o=t++,e[r.role][r.string]=o),o},get size(){return t-0}}}(),a=x(0),c={resetIds(){c.eventIds.clear(),c.nodeIds.clear(),c.stringIds.clear(),c.styleSheetIds.clear()},canvasManager:t,configuration:e,elementsScrollPositions:n,eventIds:o,nodeIds:i,shadowRootsController:r,stringIds:s,styleSheetIds:a};return c}(a,r,function(){const t=new WeakMap;return{set(e,n){(e!==document||document.scrollingElement)&&t.set(e===document?document.scrollingElement:e,n)},get:e=>t.get(e),has:e=>t.has(e)}}(),c),{stop:d}=function(t,e,n,r,i){H((0,o.nx)(),0,e,n,i);const{unsubscribe:s}=t.subscribe(2,t=>{r(),H(t.startClocks.timeStamp,1,e,n,i)});return{stop:s}}(i,s,n,l,u);function l(){c.flush(),f.flush()}const f=_t(document,s,n,u),p=[f,nt(s,u),it(s,u),st(document,s,u),at(s),gt(document,s,n,u),ut(s,u),lt(s,u),pt(s),ct(s),mt(i,s,l),St(u)];return{stop(){c.stop(),p.forEach(t=>t.stop()),d()},flushMutations:l,shadowRootsController:c}}},728(t,e,n){let r;function o(t){return u(t).segments_count}function i(t){u(t).segments_count+=1}function s(t){u(t).records_count+=1}function a(t,e){u(t).segments_total_raw_size+=e}function c(t){return r?.get(t)}function u(t){let e;return r||(r=new Map),r.has(t)?e=r.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},r.set(t,e),r.size>1e3&&function(){if(!r)return;const t=r.keys().next().value;t&&r.delete(t)}()),e}n.d(e,{$1:()=>s,H5:()=>i,K_:()=>o,L7:()=>a,lv:()=>c})},979(t,e,n){n.d(e,["Cj",0,{Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},"GE",0,{MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},"JQ",0,{AddString:0,AddNode:1,RemoveNode:2,Attribute:3,Text:4,Size:5,ScrollPosition:6,AddStyleSheet:7,AttachedStyleSheets:8,MediaPlaybackState:9,VisualViewport:10,AddRoleAnnotatedStrings:11,InputValue:12,InputSelection:13,ClearStrings:14},"KN",0,{V1:0,Change:1},"WW",0,{Selected:0,Deselected:1,Indeterminate:2},"_o",0,{Default:0,NodeName:1,AttributeName:2,AttributeValue:3,TextContent:4,FormInput:5,Css:6,Url:7},"ee",0,{FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9,Change:12},"xQ",0,{Play:0,Pause:1}])},5119(t,e,n){n.d(e,{ab:()=>o});var r=n(7472);function o(){let t=[];return{register(e){return t.push(e),{unregister(){t=t.filter(t=>t!==e)}}},trigger(e){const n=[];for(const r of t){const t=r(e);if(t===i)return i;t!==s&&n.push(t)}return(0,r.kg)(...n)}}}const i="DISCARDED",s="SKIPPED";n.d(e,["$O",0,s,"ug",0,i])},8333(t,e,n){n.d(e,{$S:()=>u,A3:()=>h,FR:()=>f,Gw:()=>c,M8:()=>d,Oc:()=>l,Zj:()=>a,_O:()=>g,d6:()=>m,jR:()=>p,nx:()=>i,uc:()=>v,vk:()=>s,x3:()=>o});const r=31536e6;function o(){return(new Date).getTime()}function i(){return o()}function s(t,e){return e-t}function a(t){return"number"!=typeof t?t:Math.round(1e6*t)}function c(t,e){return t+e}function u(){return performance.now()}function d(){return{relative:u(),timeStamp:i()}}function l(){return{relative:0,timeStamp:v()}}function f(t){return{relative:t,timeStamp:b(t)}}function p(t){return{relative:m(t),timeStamp:t}}function m(t){return t-v()}function h(t){return t<r}function g(){return Math.round(o()-c(v(),performance.now()))}let y;function v(){return void 0===y&&(y=performance.timing?.navigationStart??performance.timeOrigin),y}function b(t){const e=o()-performance.now();return e>v()?Math.round(c(e,t)):function(t){return Math.round(c(v(),t))}(t)}n.d(e,["$H",0,r,"MA",0,36e5])},5387(t,e,n){n.d(e,{Hg:()=>c,np:()=>a,ns:()=>s});var r=n(8333),o=n(9164),i=n(8383);function s(t,e,n){return{build(r,o){return c({proxy:t.proxy,site:t.site,path:"/api/v2/"+e,parameters:u(t,e,r,o,n)})},trackType:e}}function a({replica:t,proxy:e,source:n},r){if(t)return s({clientToken:t.clientToken,proxy:e,source:n,site:i.NW},r,"rum"===r?["application.id="+t.applicationId]:void 0)}function c({proxy:t,site:e=i.NW,path:n,parameters:r="",subdomain:s}){let a=n;if(r&&(a+="?"+r),"string"==typeof t){let e=`${(0,o.l2)(t)}?ddforward=${encodeURIComponent(a)}`;return s&&(e+="&ddforwardSubdomain="+s),e}if("function"==typeof t)return t({path:n,parameters:r,subdomain:s});const c=e.split("."),u=c.pop();let d=`browser-intake-${c.join("-")}.${u}`;return s&&(d=`${s}.${d}`),`https://${d}${a}`}function u({clientToken:t,source:e="browser"},n,o,{retry:i,encoding:s},a=[]){const c=["ddsource="+e,"dd-api-key="+t,"dd-evp-origin-version="+encodeURIComponent("7.12.0"),"dd-evp-origin=browser","dd-request-id="+d()].concat(a);return s&&c.push("dd-evp-encoding="+s),"rum"===n&&(c.push("batch_time="+(0,r.nx)(),"_dd.api="+o),i&&c.push("_dd.retry_count="+i.count,"_dd.retry_after="+i.lastFailureStatus)),c.join("&")}function d(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,d)}},8383(t,e,n){n.d(e,{wo:()=>o});const r=["ddsource","dd-api-key","dd-request-id"];function o(t){return r.every(e=>t.includes(e))}n.d(e,["Bb",0,"datad0g.com","KG",0,"us2.ddog-gov.com","NW",0,"datadoghq.com","R8",0,"ddog-gov.com","dV",0,"datadoghq.eu"])},8789(t,e,n){n.d(e,{N:()=>i,p:()=>o});let r=!1;function o(t){r=t}function i(){return r}},1864(t,e,n){n.d(e,{XH:()=>i});const r=console,o={log:r.log,debug:r.debug,info:r.info,warn:r.warn,error:r.error};function i(t){return{debug:o.debug.bind(r,t),log:o.log.bind(r,t),info:o.info.bind(r,t),warn:o.warn.bind(r,t),error:o.error.bind(r,t)}}n.d(e,["JZ",0,r,"bP",0,{log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},"fH",0,"https://docs.datadoghq.com","xG",0,"More details:"])},2128(t,e,n){const r=globalThis,o="WorkerGlobalScope"in r;n.d(e,["J",0,r,"W",0,o])},7472(t,e,n){n.d(e,{Go:()=>s,kg:()=>a});var r=n(8307);function o(t,e){return i(t,e,function(){const t=new WeakSet;return{hasAlreadyBeenSeen(e){const n=t.has(e);return n||t.add(e),n}}}())}function i(t,e,n){if(void 0===e)return t;if("object"!=typeof e||null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return RegExp(e.source,e.flags);if(n.hasAlreadyBeenSeen(e))return;if(Array.isArray(e)){const r=Array.isArray(t)?t:[];for(let t=0;t<e.length;++t)r[t]=i(r[t],e[t],n);return r}const o="object"===(0,r.Pw)(t)?t:{};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&"__proto__"!==t&&(o[t]=i(o[t],e[t],n));return o}function s(t){return o(void 0,t)}function a(...t){let e;for(const n of t)null!=n&&(e=o(e,n));return e}},8307(t,e,n){function r(t){return null===t?"null":Array.isArray(t)?"array":typeof t}function o(t){return"object"===r(t)}function i(t){return"number"==typeof t&&t>=0&&t<=100}function s(t){return"string"==typeof t||t instanceof RegExp||"function"==typeof t}n.d(e,{OE:()=>o,Pw:()=>r,Vl:()=>s,fp:()=>i})},9164(t,e,n){n.d(e,{AY:()=>i,L2:()=>s,c$:()=>a,l2:()=>o});var r=n(2128);function o(t){return a(t,r.J.document?.baseURI??r.J.location?.href).href}function i(t){try{return!!a(t)}catch{return!1}}function s(t){const e=a(t).pathname;return"/"===e[0]?e:"/"+e}function a(t,e){const n=function(){if(!c){let t=!1;try{t="http://a/b"===new r.J.URL("b","http://a").href}catch{}c=t?r.J.URL:function(){if(!u){let t,e;try{t=document.createElement("iframe"),t.style.display="none",document.body.appendChild(t),e=t.contentWindow??r.J}catch{e=r.J}u={URL:e.URL},t?.remove()}return u}().URL}return c}();try{return void 0!==e?new n(t,e):new n(t)}catch(t){throw Error("Failed to construct URL: "+t)}}let c,u}};const e={};function n(r){const o=e[r];if(void 0!==o)return o.exports;const i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.m=t,n.d=(t,e)=>{if(Array.isArray(e))for(var r=0;r<e.length;){var o=e[r++],i=e[r++];n.o(t,o)?0===i&&r++:Object.defineProperty(t,o,0===i?{enumerable:!0,value:e[r++]}:{enumerable:!0,get:i})}else for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.f={},n.e=t=>Promise.all(Object.keys(n.f).reduce((e,r)=>(n.f[r](t,e),e),[])),n.u=t=>"chunks/"+t+"-"+{datadogRecorder:"45abbe958d6aa05af20d",datadogProfiler:"7cb985d2515d29fe6c9e"}[t]+"-datadog-rum-shopify.js",n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{const t={main:0},e=e=>{let{__webpack_esm_ids__:r,__webpack_esm_modules__:o,__webpack_esm_runtime__:i}=e;var s,a,c=0;for(s in o)n.o(o,s)&&(n.m[s]=o[s]);for(i&&i(n);c<r.length;c++)a=r[c],n.o(t,a)&&t[a]&&t[a][0](),t[r[c]]=0};n.f.j=(r,o)=>{let i=n.o(t,r)?t[r]:void 0;if(0!==i)if(i)o.push(i[1]);else{let s=import("./"+n.u(r)).then(e,e=>{throw 0!==t[r]&&(t[r]=void 0),e});s=Promise.race([s,new Promise(e=>i=t[r]=[e])]),o.push(i[1]=s)}}})();var r=n(2128),o=n(5021),i=n(4512),s=(n(7163),n(9305)),a=n(2729),c=n(728),u=n(3236),d=n(2223),l=n(4490),f=n(9671),p=n(5648),m=n(7003),h=n(1864);function g({configuredUrl:t,error:e,source:n,scriptType:r}){if(p.V.error(`${n} failed to start: an error occurred while initializing the ${r}:`,e),e instanceof Event||e instanceof Error&&((o=e.message).includes("Content Security Policy")||o.includes("requires 'TrustedScriptURL'"))){let e;e=t?`Please make sure the ${r} URL ${t} is correct and CSP is correctly configured.`:"Please make sure CSP is correctly configured.",p.V.error(`${e} See documentation at ${h.fH}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else"worker"===r&&(0,m.VJ)(e);var o}function y(t){return new Worker(t.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t?.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},D=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},M=!1,j=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},C=j,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),O=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},T={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=C,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=T[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?j(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=O(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t?.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){M||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),M=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t?.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra?.length&&(Z(r,255&r.gzhead.extra.length),Z(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):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=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)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=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)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t?.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(T[n]);if(t.header&&(e=this.strm,a=t.header,e?.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t?.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(T[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch{t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"7.12.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=(new TextEncoder).encode(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let v={status:0};function b(){return v.status}function _(t,e,n,r){1===v.status||0===v.status?(g({configuredUrl:t.workerUrl,error:n,source:e,scriptType:"worker"}),1===v.status&&v.initializationFailureCallbacks.forEach(t=>t()),v={status:2}):(0,m.VJ)(n,{worker_version:3===v.status&&v.version,stream_id:r})}var w=n(1996),S=n(7409),k=n(6447),x=n(8333);async function E(){try{return await(0,l.B)(C)()}catch(t){g({error:t,source:"Recorder",scriptType:"module"})}}async function C(){return(await n.e("datadogRecorder").then(n.bind(n,5543))).startRecording}async function A(t,e,n){try{return await n}finally{t.notify(e)}}var T=n(4215);function I(){return void 0!==r.J.Profiler}var R=n(5119);async function O(){try{return await(0,l.B)(N)()}catch(t){g({error:t,source:"Profiler",scriptType:"module"})}}async function N(){return(await n.e("datadogProfiler").then(n.bind(n,7492))).createRumProfiler}function M(){P(r.J,"cookieStore"),P(navigator,"locks"),Object.defineProperty(document,"hasFocus",{value:()=>!0,configurable:!0,writable:!0})}function P(t,e){Object.defineProperty(t,e,{value:void 0,configurable:!0,writable:!0})}var D=n(2423);function V(t){return t.context?.document?.location?.href}const L=/\/(([a-z]{2}(-[a-z0-9]+)?)\/)?(checkouts?)(\/|$)/i;function $(t){const e=V(t);return!(!e||!L.test(e))}function U(t,e){e&&(e.subscribe("page_viewed",e=>{$(e)&&t.startView({url:V(e)})}),e.subscribe("clicked",e=>{if(!$(e))return;const n=e.data?.element,r=n?.id??"element-without-id";t.startAction(r,{type:"click"}),t.stopAction(r,{type:"click"})}),e.subscribe("ui_extension_errored",e=>{if(!$(e))return;const n=e.data?.error,r=Error(n?.message);r.stack=n?.trace,t.addError(r,{extensionName:n?.extensionName,extensionTarget:n?.extensionTarget,extensionErrorType:n?.type,appId:n?.appId,appName:n?.appName,appVersion:n?.appVersion})}))}const z=r.J,j=(0,i.AB)(function(){if((0,s.d0)()&&!(0,s.Ww)("records"))return{start:a.l,stop:a.l,getReplayStats(){},onRumStart:a.l,isRecording:()=>!1,getSessionReplayLink(){}};let{strategy:t,shouldStartImmediately:e}=function(){let t=0;return{strategy:{start(){t=1},stop(){t=2},isRecording(){return!1},getSessionReplayLink:a.l},shouldStartImmediately:e=>1===t||0===t&&!e.startSessionReplayRecordingManually}}();return{start:e=>t.start(e),stop:()=>t.stop(),getSessionReplayLink:()=>t.getSessionReplayLink(),onRumStart(n,r,o,s,c,h){let g;t=function(t,e,n,r,o,s){let c,u=0;e.subscribe(10,()=>{2!==u&&3!==u||(p(),u=1)}),e.subscribe(11,()=>{1===u&&f()});const d=new w.cP;!function(t,e){if(!t.metricsEnabled)return{stop:a.l};let n,r,o;const{unsubscribe:i}=e.subscribe(t=>{switch(t.type){case"start":n={forced:t.forced,timestamp:(0,x.nx)()},r=void 0,o=void 0;break;case"document-ready":n&&(r=(0,x.vk)(n.timestamp,(0,x.nx)()));break;case"recorder-settled":n&&(o=(0,x.vk)(n.timestamp,(0,x.nx)()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":i(),n&&(0,m.Gk)("Recorder init metrics",{metrics:(e=n.forced,s=o,a=(0,x.vk)(n.timestamp,(0,x.nx)()),c=t.type,u=r,{forced:e,loadRecorderModuleDuration:s,recorderInitDuration:a,result:c,waitForDocReadyDuration:u})})}var e,s,a,c,u})}(s,d);const l=async i=>{d.notify({type:"start",forced:i});const[a]=await Promise.all([A(d,{type:"recorder-settled"},E()),A(d,{type:"document-ready"},(0,S.N)("interactive"))]);if(2!==u)return void d.notify({type:"aborted"});if(!a)return u=0,void d.notify({type:"recorder-load-failed"});const l=o();if(!l)return u=0,void d.notify({type:"deflate-encoder-load-failed"});({stop:c}=a(e,t,n,r,l,s)),u=3,d.notify({type:"succeeded"})};function f(e){const r=n.findTrackedSession(),o=r?(0,i.K$)(r,t):void 0;if(!function(t,e){return void 0!==t&&(0!==t||e?.force)}(o,e))return void(u=1);if(function(t){return 2===t||3===t}(u))return;u=2;const s=function(t,e){return e&&e.force&&0===t}(o,e)||!1;l(s).catch(k.Dx),s&&n.updateSessionState({forcedReplay:"1"})}function p(){3===u&&c?.(),u=0}return{start:f,stop:p,getSessionReplayLink:()=>function(t,e,n,r){const o=e.findTrackedSession(),s=function(t,e,n){return e?0===(0,i.K$)(e,t)?"incorrect-session-plan":n?void 0:"replay-not-started":"rum-not-tracked"}(t,o,r),a=n.findView();return(0,i.dx)(t,{viewContext:a,errorType:s,session:o})}(t,n,r,0!==u),isRecording(){return 3===u}}}(r,n,o,s,function(){return g||(c??(c=function(e){switch(0===v.status&&function(t,e){try{const n=(0,l.B)(y)(t),{stop:r}=(0,u.q2)(n,"error",n=>{_(t,e,n)}),{stop:o}=(0,u.q2)(n,"message",({data:n})=>{var r;"errored"===n.type?_(t,e,n.error,n.streamId):"initialized"===n.type&&(r=n.version,1===v.status&&(v={status:3,worker:v.worker,stop:v.stop,version:r}))});n.postMessage({action:"init"}),(0,f.wg)(()=>function(t){1===v.status&&(p.V.error(t+" failed to start: a timeout occurred while initializing the Worker"),v.initializationFailureCallbacks.forEach(t=>t()),v={status:2})}(e),3e4),v={status:1,worker:n,stop(){r(),o()},initializationFailureCallbacks:[]}}catch(n){_(t,e,n)}}(e,"Datadog Session Replay"),v.status){case 1:return v.initializationFailureCallbacks.push(()=>t.stop()),v.worker;case 3:return v.worker}}(r)),c&&(g=function(t){let e,n=0,r=[],o=!0,i=0;const s=[],{stop:a}=(0,u.q2)(t,"message",({data:t})=>{if("wrote"!==t.type||1!==t.streamId)return;const o=s[0];o&&(o.id===t.id?(s.shift(),n+=t.additionalBytesCount,r.push(t.result),e=t.trailer,o.writeCallback?o.writeCallback(t.result.byteLength):o.finishCallback&&o.finishCallback()):o.id<t.id&&a())});function c(){const t=0===r.length?new Uint8Array(0):(0,d.wh)(r.concat(e)),o={rawBytesCount:n,output:t,outputBytesCount:t.byteLength,encoding:"deflate"};return n=0,r=[],o}function l(){o||(t.postMessage({action:"reset",streamId:1}),o=!0)}return{isAsync:!0,get isEmpty(){return o},write(e,n){t.postMessage({action:"write",id:i,data:e,streamId:1}),s.push({id:i,writeCallback:n,data:e}),o=!1,i+=1},finish(t){l(),s.length?(s.forEach(t=>{delete t.writeCallback}),s[s.length-1].finishCallback=()=>t(c())):t(c())},finishSync(){l();const t=s.map(t=>t.data).join("");return s.length=0,{...c(),pendingData:t}},estimateEncodedBytesCount:t=>t.length/8,stop(){a()}}}(c))),g},h),e(r)&&t.start()},isRecording:()=>3===b()&&t.isRecording(),getReplayStats:t=>3===b()?(0,c.lv)(t):void 0}}(),function(){let t;return{onRumStart(e,n,r,o,a,c){const u=o.findTrackedSession();if(!u)return;if(!function(t,e){return(0,s.d0)()?(0,s.Ww)("profiles"):(0,T.$5)(e.id,(0,T.it)(t.sessionSampleRate,t.profilingSampleRate))}(r,u))return;const d=function(t){let e={status:"starting"};return t.assemble.register(({eventType:t})=>t!==i.bb.VIEW&&t!==i.bb.LONG_TASK&&t!==i.bb.ACTION&&t!==i.bb.VITAL?R.$O:{type:t,_dd:{profiling:e}}),{get(){return e},set(t){e=t}}}(n);(0,l.B)(I)()?(0,l.B)(O)().then(n=>{n?(t=n(r,e,o,d,c,a,void 0),t.start()):d.set({status:"error",error_reason:"failed-to-lazy-load"})}).catch(k.Dx):d.set({status:"error",error_reason:"not-supported-by-browser"})},stop(){t?.stop()}}}(),{sdkName:"rum-shopify"});j.shopifyPlugin=function(t){return{name:"shopify",async onInit({initConfiguration:e,publicApi:n}){const r=t.shopifyAnalytics;if(!r)return!1;const o=await function(t,{timeout:e=1e3}={}){return(0,D.yU)(new Promise(e=>{t.subscribe("page_viewed",t=>{e(t)})}),e)}(r);if(!$(o))return!1;(0,l.B)(M)(),(0,l.B)(U)(n,r),e.trackViewsManually=!0,e.sessionReplaySampleRate=0,e.profilingSampleRate=0,e.trackUserInteractions=!1,e.trackResources=!1,e.trackLongTasks=!1,e.sessionPersistence="cookie"}}},(0,o.Z)(z,"DD_RUM",j)})();