@volley/vwr-loader 1.5.0 → 1.6.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.
Files changed (151) hide show
  1. package/dist/cli.js +37 -3
  2. package/dist/cli.js.map +1 -1
  3. package/dist/main.js +11 -11
  4. package/dist/main.js.map +1 -1
  5. package/dist/{datadog.d.ts → vwr/src/datadog.d.ts} +7 -3
  6. package/dist/vwr/src/datadog.d.ts.map +1 -0
  7. package/dist/{datadog.js → vwr/src/datadog.js} +6 -5
  8. package/dist/vwr/src/datadog.js.map +1 -0
  9. package/dist/{envDefaults.d.ts → vwr/src/envDefaults.d.ts} +1 -0
  10. package/dist/vwr/src/envDefaults.d.ts.map +1 -0
  11. package/dist/{envDefaults.js → vwr/src/envDefaults.js} +26 -0
  12. package/dist/vwr/src/envDefaults.js.map +1 -0
  13. package/dist/vwr/src/logger.d.ts +15 -0
  14. package/dist/vwr/src/logger.d.ts.map +1 -0
  15. package/dist/{logger.js → vwr/src/logger.js} +30 -46
  16. package/dist/vwr/src/logger.js.map +1 -0
  17. package/dist/vwr/src/native/device-info/getDeviceId.d.ts +13 -0
  18. package/dist/vwr/src/native/device-info/getDeviceId.d.ts.map +1 -0
  19. package/dist/vwr/src/native/device-info/getDeviceId.js +137 -0
  20. package/dist/vwr/src/native/device-info/getDeviceId.js.map +1 -0
  21. package/dist/{vwrConfig.d.ts → vwr/src/vwrConfig.d.ts} +5 -0
  22. package/dist/vwr/src/vwrConfig.d.ts.map +1 -0
  23. package/dist/{vwrConfig.js → vwr/src/vwrConfig.js} +13 -5
  24. package/dist/vwr/src/vwrConfig.js.map +1 -0
  25. package/dist/vwr-loader/src/__mocks__/@datadog/browser-logs.d.ts.map +1 -0
  26. package/dist/vwr-loader/src/__mocks__/@datadog/browser-logs.js.map +1 -0
  27. package/dist/vwr-loader/src/__mocks__/@datadog/browser-rum.d.ts.map +1 -0
  28. package/dist/vwr-loader/src/__mocks__/@datadog/browser-rum.js.map +1 -0
  29. package/dist/vwr-loader/src/__mocks__/vwrModule.d.ts.map +1 -0
  30. package/dist/vwr-loader/src/__mocks__/vwrModule.js.map +1 -0
  31. package/dist/vwr-loader/src/amplitudeFlagFetcher.d.ts.map +1 -0
  32. package/dist/vwr-loader/src/amplitudeFlagFetcher.js.map +1 -0
  33. package/dist/vwr-loader/src/errors/InitializationError.d.ts.map +1 -0
  34. package/dist/vwr-loader/src/errors/InitializationError.js.map +1 -0
  35. package/dist/vwr-loader/src/errors/ensureError.d.ts.map +1 -0
  36. package/dist/vwr-loader/src/errors/ensureError.js.map +1 -0
  37. package/dist/vwr-loader/src/errors/index.d.ts.map +1 -0
  38. package/dist/vwr-loader/src/errors/index.js.map +1 -0
  39. package/dist/vwr-loader/src/exitHandler.d.ts.map +1 -0
  40. package/dist/{exitHandler.js → vwr-loader/src/exitHandler.js} +2 -3
  41. package/dist/vwr-loader/src/exitHandler.js.map +1 -0
  42. package/dist/vwr-loader/src/getEnvironment.d.ts.map +1 -0
  43. package/dist/vwr-loader/src/getEnvironment.js.map +1 -0
  44. package/dist/vwr-loader/src/getShellVersion.d.ts.map +1 -0
  45. package/dist/vwr-loader/src/getShellVersion.js.map +1 -0
  46. package/dist/vwr-loader/src/index.d.ts +8 -0
  47. package/dist/vwr-loader/src/index.d.ts.map +1 -0
  48. package/dist/vwr-loader/src/index.js +6 -0
  49. package/dist/vwr-loader/src/index.js.map +1 -0
  50. package/dist/vwr-loader/src/loadVwr.d.ts.map +1 -0
  51. package/dist/{loadVwr.js → vwr-loader/src/loadVwr.js} +9 -6
  52. package/dist/vwr-loader/src/loadVwr.js.map +1 -0
  53. package/dist/vwr-loader/src/logger.d.ts +4 -0
  54. package/dist/vwr-loader/src/logger.d.ts.map +1 -0
  55. package/dist/vwr-loader/src/logger.js +10 -0
  56. package/dist/vwr-loader/src/logger.js.map +1 -0
  57. package/dist/vwr-loader/src/main.d.ts +2 -0
  58. package/dist/vwr-loader/src/main.d.ts.map +1 -0
  59. package/dist/vwr-loader/src/main.js +96 -0
  60. package/dist/vwr-loader/src/main.js.map +1 -0
  61. package/dist/vwr-loader/src/polyfills.d.ts.map +1 -0
  62. package/dist/vwr-loader/src/polyfills.js.map +1 -0
  63. package/dist/{test-setup.d.ts.map → vwr-loader/src/test-setup.d.ts.map} +1 -1
  64. package/dist/vwr-loader/src/test-setup.js.map +1 -0
  65. package/package.json +10 -8
  66. package/src/exitHandler.test.ts +44 -0
  67. package/src/exitHandler.ts +4 -3
  68. package/src/getShellVersion.ts +2 -1
  69. package/src/index.ts +3 -3
  70. package/src/loadVwr.test.ts +10 -5
  71. package/src/loadVwr.ts +18 -12
  72. package/src/logger.ts +5 -115
  73. package/src/main.ts +3 -2
  74. package/src/vite-env.d.ts +1 -0
  75. package/dist/__mocks__/@datadog/browser-logs.d.ts.map +0 -1
  76. package/dist/__mocks__/@datadog/browser-logs.js.map +0 -1
  77. package/dist/__mocks__/@datadog/browser-rum.d.ts.map +0 -1
  78. package/dist/__mocks__/@datadog/browser-rum.js.map +0 -1
  79. package/dist/__mocks__/vwrModule.d.ts.map +0 -1
  80. package/dist/__mocks__/vwrModule.js.map +0 -1
  81. package/dist/amplitudeFlagFetcher.d.ts.map +0 -1
  82. package/dist/amplitudeFlagFetcher.js.map +0 -1
  83. package/dist/datadog.d.ts.map +0 -1
  84. package/dist/datadog.js.map +0 -1
  85. package/dist/envDefaults.d.ts.map +0 -1
  86. package/dist/envDefaults.js.map +0 -1
  87. package/dist/errors/InitializationError.d.ts.map +0 -1
  88. package/dist/errors/InitializationError.js.map +0 -1
  89. package/dist/errors/ensureError.d.ts.map +0 -1
  90. package/dist/errors/ensureError.js.map +0 -1
  91. package/dist/errors/index.d.ts.map +0 -1
  92. package/dist/errors/index.js.map +0 -1
  93. package/dist/exitHandler.d.ts.map +0 -1
  94. package/dist/exitHandler.js.map +0 -1
  95. package/dist/getDeviceId.d.ts +0 -26
  96. package/dist/getDeviceId.d.ts.map +0 -1
  97. package/dist/getDeviceId.js +0 -209
  98. package/dist/getDeviceId.js.map +0 -1
  99. package/dist/getEnvironment.d.ts.map +0 -1
  100. package/dist/getEnvironment.js.map +0 -1
  101. package/dist/getShellVersion.d.ts.map +0 -1
  102. package/dist/getShellVersion.js.map +0 -1
  103. package/dist/index.d.ts +0 -8
  104. package/dist/index.d.ts.map +0 -1
  105. package/dist/index.js +0 -6
  106. package/dist/index.js.map +0 -1
  107. package/dist/loadVwr.d.ts.map +0 -1
  108. package/dist/loadVwr.js.map +0 -1
  109. package/dist/logger.d.ts +0 -12
  110. package/dist/logger.d.ts.map +0 -1
  111. package/dist/logger.js.map +0 -1
  112. package/dist/polyfills.d.ts.map +0 -1
  113. package/dist/polyfills.js.map +0 -1
  114. package/dist/test-setup.js.map +0 -1
  115. package/dist/types.d.ts +0 -103
  116. package/dist/types.d.ts.map +0 -1
  117. package/dist/types.js +0 -5
  118. package/dist/types.js.map +0 -1
  119. package/dist/vwrConfig.d.ts.map +0 -1
  120. package/dist/vwrConfig.js.map +0 -1
  121. package/src/datadog.ts +0 -55
  122. package/src/envDefaults.ts +0 -94
  123. package/src/getDeviceId.test.ts +0 -298
  124. package/src/getDeviceId.ts +0 -224
  125. package/src/types.ts +0 -105
  126. package/src/vwrConfig.test.ts +0 -386
  127. package/src/vwrConfig.ts +0 -374
  128. /package/dist/{__mocks__ → vwr-loader/src/__mocks__}/@datadog/browser-logs.d.ts +0 -0
  129. /package/dist/{__mocks__ → vwr-loader/src/__mocks__}/@datadog/browser-logs.js +0 -0
  130. /package/dist/{__mocks__ → vwr-loader/src/__mocks__}/@datadog/browser-rum.d.ts +0 -0
  131. /package/dist/{__mocks__ → vwr-loader/src/__mocks__}/@datadog/browser-rum.js +0 -0
  132. /package/dist/{__mocks__ → vwr-loader/src/__mocks__}/vwrModule.d.ts +0 -0
  133. /package/dist/{__mocks__ → vwr-loader/src/__mocks__}/vwrModule.js +0 -0
  134. /package/dist/{amplitudeFlagFetcher.d.ts → vwr-loader/src/amplitudeFlagFetcher.d.ts} +0 -0
  135. /package/dist/{amplitudeFlagFetcher.js → vwr-loader/src/amplitudeFlagFetcher.js} +0 -0
  136. /package/dist/{errors → vwr-loader/src/errors}/InitializationError.d.ts +0 -0
  137. /package/dist/{errors → vwr-loader/src/errors}/InitializationError.js +0 -0
  138. /package/dist/{errors → vwr-loader/src/errors}/ensureError.d.ts +0 -0
  139. /package/dist/{errors → vwr-loader/src/errors}/ensureError.js +0 -0
  140. /package/dist/{errors → vwr-loader/src/errors}/index.d.ts +0 -0
  141. /package/dist/{errors → vwr-loader/src/errors}/index.js +0 -0
  142. /package/dist/{exitHandler.d.ts → vwr-loader/src/exitHandler.d.ts} +0 -0
  143. /package/dist/{getEnvironment.d.ts → vwr-loader/src/getEnvironment.d.ts} +0 -0
  144. /package/dist/{getEnvironment.js → vwr-loader/src/getEnvironment.js} +0 -0
  145. /package/dist/{getShellVersion.d.ts → vwr-loader/src/getShellVersion.d.ts} +0 -0
  146. /package/dist/{getShellVersion.js → vwr-loader/src/getShellVersion.js} +0 -0
  147. /package/dist/{loadVwr.d.ts → vwr-loader/src/loadVwr.d.ts} +0 -0
  148. /package/dist/{polyfills.d.ts → vwr-loader/src/polyfills.d.ts} +0 -0
  149. /package/dist/{polyfills.js → vwr-loader/src/polyfills.js} +0 -0
  150. /package/dist/{test-setup.d.ts → vwr-loader/src/test-setup.d.ts} +0 -0
  151. /package/dist/{test-setup.js → vwr-loader/src/test-setup.js} +0 -0
package/dist/main.js CHANGED
@@ -1,12 +1,12 @@
1
- var Hd=Object.defineProperty,Wd=Object.defineProperties;var qd=Object.getOwnPropertyDescriptors;var Ir=Object.getOwnPropertySymbols;var gs=Object.prototype.hasOwnProperty,ms=Object.prototype.propertyIsEnumerable;var hs=(e,t,r)=>t in e?Hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))gs.call(t,r)&&hs(e,r,t[r]);if(Ir)for(var r of Ir(t))ms.call(t,r)&&hs(e,r,t[r]);return e},W=(e,t)=>Wd(e,qd(t));var Or=(e,t)=>{var r={};for(var n in e)gs.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ir)for(var n of Ir(e))t.indexOf(n)<0&&ms.call(e,n)&&(r[n]=e[n]);return r};(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var z=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Ht=function(e){return e&&e.Math===Math&&e},K=Ht(typeof globalThis=="object"&&globalThis)||Ht(typeof window=="object"&&window)||Ht(typeof self=="object"&&self)||Ht(typeof z=="object"&&z)||Ht(typeof z=="object"&&z)||function(){return this}()||Function("return this")(),yi={},Y=function(e){try{return!!e()}catch(t){return!0}},Yd=Y,ke=!Yd(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Xd=Y,Ei=!Xd(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Jd=Ei,Ar=Function.prototype.call,ve=Jd?Ar.bind(Ar):function(){return Ar.apply(Ar,arguments)},pc={},vc={}.propertyIsEnumerable,hc=Object.getOwnPropertyDescriptor,Zd=hc&&!vc.call({1:2},1);pc.f=Zd?function(t){var r=hc(this,t);return!!r&&r.enumerable}:vc;var dn=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},gc=Ei,mc=Function.prototype,Ho=mc.call,Qd=gc&&mc.bind.bind(Ho,Ho),Z=gc?Qd:function(e){return function(){return Ho.apply(e,arguments)}},_c=Z,ef=_c({}.toString),tf=_c("".slice),lt=function(e){return tf(ef(e),8,-1)},rf=Z,nf=Y,of=lt,Yn=Object,sf=rf("".split),af=nf(function(){return!Yn("z").propertyIsEnumerable(0)})?function(e){return of(e)==="String"?sf(e,""):Yn(e)}:Yn,fn=function(e){return e==null},cf=fn,uf=TypeError,Mt=function(e){if(cf(e))throw new uf("Can't call method on "+e);return e},lf=af,df=Mt,pn=function(e){return lf(df(e))},Xn=typeof document=="object"&&document.all,X=typeof Xn=="undefined"&&Xn!==void 0?function(e){return typeof e=="function"||e===Xn}:function(e){return typeof e=="function"},ff=X,Se=function(e){return typeof e=="object"?e!==null:ff(e)},Jn=K,pf=X,vf=function(e){return pf(e)?e:void 0},vn=function(e,t){return arguments.length<2?vf(Jn[e]):Jn[e]&&Jn[e][t]},hf=Z,Si=hf({}.isPrototypeOf),gf=K,_s=gf.navigator,bs=_s&&_s.userAgent,bc=bs?String(bs):"",yc=K,Zn=bc,ys=yc.process,Es=yc.Deno,Ss=ys&&ys.versions||Es&&Es.version,Ts=Ss&&Ss.v8,he,Zr;Ts&&(he=Ts.split("."),Zr=he[0]>0&&he[0]<4?1:+(he[0]+he[1]));!Zr&&Zn&&(he=Zn.match(/Edge\/(\d+)/),(!he||he[1]>=74)&&(he=Zn.match(/Chrome\/(\d+)/),he&&(Zr=+he[1])));var Ec=Zr,ws=Ec,mf=Y,_f=K,bf=_f.String,Sc=!!Object.getOwnPropertySymbols&&!mf(function(){var e=Symbol("symbol detection");return!bf(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ws&&ws<41}),yf=Sc,Tc=yf&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ef=vn,Sf=X,Tf=Si,wf=Tc,If=Object,wc=wf?function(e){return typeof e=="symbol"}:function(e){var t=Ef("Symbol");return Sf(t)&&Tf(t.prototype,If(e))},Of=String,hn=function(e){try{return Of(e)}catch(t){return"Object"}},Af=X,Cf=hn,Rf=TypeError,Dt=function(e){if(Af(e))return e;throw new Rf(Cf(e)+" is not a function")},xf=Dt,Lf=fn,fr=function(e,t){var r=e[t];return Lf(r)?void 0:xf(r)},Qn=ve,eo=X,to=Se,kf=TypeError,Nf=function(e,t){var r,n;if(t==="string"&&eo(r=e.toString)&&!to(n=Qn(r,e))||eo(r=e.valueOf)&&!to(n=Qn(r,e))||t!=="string"&&eo(r=e.toString)&&!to(n=Qn(r,e)))return n;throw new kf("Can't convert object to primitive value")},Ic={exports:{}},Is=K,$f=Object.defineProperty,Ti=function(e,t){try{$f(Is,e,{value:t,configurable:!0,writable:!0})}catch(r){Is[e]=t}return t},Pf=K,Mf=Ti,Os="__core-js_shared__",As=Ic.exports=Pf[Os]||Mf(Os,{});(As.versions||(As.versions=[])).push({version:"3.47.0",mode:"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"});var wi=Ic.exports,Cs=wi,Ii=function(e,t){return Cs[e]||(Cs[e]=t||{})},Df=Mt,Uf=Object,Ut=function(e){return Uf(Df(e))},Ff=Z,Vf=Ut,jf=Ff({}.hasOwnProperty),Te=Object.hasOwn||function(t,r){return jf(Vf(t),r)},Bf=Z,Gf=0,zf=Math.random(),Kf=Bf(1.1.toString),Oc=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Kf(++Gf+zf,36)},Hf=K,Wf=Ii,Rs=Te,qf=Oc,Yf=Sc,Xf=Tc,yt=Hf.Symbol,ro=Wf("wks"),Jf=Xf?yt.for||yt:yt&&yt.withoutSetter||qf,ie=function(e){return Rs(ro,e)||(ro[e]=Yf&&Rs(yt,e)?yt[e]:Jf("Symbol."+e)),ro[e]},Zf=ve,xs=Se,Ls=wc,Qf=fr,ep=Nf,tp=ie,rp=TypeError,np=tp("toPrimitive"),op=function(e,t){if(!xs(e)||Ls(e))return e;var r=Qf(e,np),n;if(r){if(t===void 0&&(t="default"),n=Zf(r,e,t),!xs(n)||Ls(n))return n;throw new rp("Can't convert object to primitive value")}return t===void 0&&(t="number"),ep(e,t)},ip=op,sp=wc,Ac=function(e){var t=ip(e,"string");return sp(t)?t:t+""},ap=K,ks=Se,Wo=ap.document,cp=ks(Wo)&&ks(Wo.createElement),Cc=function(e){return cp?Wo.createElement(e):{}},up=ke,lp=Y,dp=Cc,Rc=!up&&!lp(function(){return Object.defineProperty(dp("div"),"a",{get:function(){return 7}}).a!==7}),fp=ke,pp=ve,vp=pc,hp=dn,gp=pn,mp=Ac,_p=Te,bp=Rc,Ns=Object.getOwnPropertyDescriptor;yi.f=fp?Ns:function(t,r){if(t=gp(t),r=mp(r),bp)try{return Ns(t,r)}catch(n){}if(_p(t,r))return hp(!pp(vp.f,t,r),t[r])};var He={},yp=ke,Ep=Y,xc=yp&&Ep(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Sp=Se,Tp=String,wp=TypeError,_e=function(e){if(Sp(e))return e;throw new wp(Tp(e)+" is not an object")},Ip=ke,Op=Rc,Ap=xc,Cr=_e,$s=Ac,Cp=TypeError,no=Object.defineProperty,Rp=Object.getOwnPropertyDescriptor,oo="enumerable",io="configurable",so="writable";He.f=Ip?Ap?function(t,r,n){if(Cr(t),r=$s(r),Cr(n),typeof t=="function"&&r==="prototype"&&"value"in n&&so in n&&!n[so]){var o=Rp(t,r);o&&o[so]&&(t[r]=n.value,n={configurable:io in n?n[io]:o[io],enumerable:oo in n?n[oo]:o[oo],writable:!1})}return no(t,r,n)}:no:function(t,r,n){if(Cr(t),r=$s(r),Cr(n),Op)try{return no(t,r,n)}catch(o){}if("get"in n||"set"in n)throw new Cp("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var xp=ke,Lp=He,kp=dn,Lc=xp?function(e,t,r){return Lp.f(e,t,kp(1,r))}:function(e,t,r){return e[t]=r,e},kc={exports:{}},qo=ke,Np=Te,Nc=Function.prototype,$p=qo&&Object.getOwnPropertyDescriptor,Pp=Np(Nc,"name"),Mp=Pp&&(!qo||qo&&$p(Nc,"name").configurable),Dp={CONFIGURABLE:Mp},Up=Z,Fp=X,Yo=wi,Vp=Up(Function.toString);Fp(Yo.inspectSource)||(Yo.inspectSource=function(e){return Vp(e)});var Oi=Yo.inspectSource,jp=K,Bp=X,Ps=jp.WeakMap,Gp=Bp(Ps)&&/native code/.test(String(Ps)),zp=Ii,Kp=Oc,Ms=zp("keys"),Ai=function(e){return Ms[e]||(Ms[e]=Kp(e))},Ci={},Hp=Gp,$c=K,Wp=Se,qp=Lc,ao=Te,co=wi,Yp=Ai,Xp=Ci,Ds="Object already initialized",Xo=$c.TypeError,Jp=$c.WeakMap,Qr,or,en,Zp=function(e){return en(e)?or(e):Qr(e,{})},Qp=function(e){return function(t){var r;if(!Wp(t)||(r=or(t)).type!==e)throw new Xo("Incompatible receiver, "+e+" required");return r}};if(Hp||co.state){var be=co.state||(co.state=new Jp);be.get=be.get,be.has=be.has,be.set=be.set,Qr=function(e,t){if(be.has(e))throw new Xo(Ds);return t.facade=e,be.set(e,t),t},or=function(e){return be.get(e)||{}},en=function(e){return be.has(e)}}else{var ht=Yp("state");Xp[ht]=!0,Qr=function(e,t){if(ao(e,ht))throw new Xo(Ds);return t.facade=e,qp(e,ht,t),t},or=function(e){return ao(e,ht)?e[ht]:{}},en=function(e){return ao(e,ht)}}var Ri={set:Qr,get:or,has:en,enforce:Zp,getterFor:Qp},xi=Z,ev=Y,tv=X,Rr=Te,Jo=ke,rv=Dp.CONFIGURABLE,nv=Oi,Pc=Ri,ov=Pc.enforce,iv=Pc.get,Us=String,Br=Object.defineProperty,sv=xi("".slice),av=xi("".replace),cv=xi([].join),uv=Jo&&!ev(function(){return Br(function(){},"length",{value:8}).length!==8}),lv=String(String).split("String"),dv=kc.exports=function(e,t,r){sv(Us(t),0,7)==="Symbol("&&(t="["+av(Us(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Rr(e,"name")||rv&&e.name!==t)&&(Jo?Br(e,"name",{value:t,configurable:!0}):e.name=t),uv&&r&&Rr(r,"arity")&&e.length!==r.arity&&Br(e,"length",{value:r.arity});try{r&&Rr(r,"constructor")&&r.constructor?Jo&&Br(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(o){}var n=ov(e);return Rr(n,"source")||(n.source=cv(lv,typeof t=="string"?t:"")),e};Function.prototype.toString=dv(function(){return tv(this)&&iv(this).source||nv(this)},"toString");var fv=kc.exports,pv=X,vv=He,hv=fv,gv=Ti,Li=function(e,t,r,n){n||(n={});var o=n.enumerable,i=n.name!==void 0?n.name:t;if(pv(r)&&hv(r,i,n),n.global)o?e[t]=r:gv(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(s){}o?e[t]=r:vv.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Mc={},mv=Math.ceil,_v=Math.floor,bv=Math.trunc||function(t){var r=+t;return(r>0?_v:mv)(r)},yv=bv,Ft=function(e){var t=+e;return t!==t||t===0?0:yv(t)},Ev=Ft,Sv=Math.max,Tv=Math.min,wv=function(e,t){var r=Ev(e);return r<0?Sv(r+t,0):Tv(r,t)},Iv=Ft,Ov=Math.min,Dc=function(e){var t=Iv(e);return t>0?Ov(t,9007199254740991):0},Av=Dc,Vt=function(e){return Av(e.length)},Cv=pn,Rv=wv,xv=Vt,Lv=function(e){return function(t,r,n){var o=Cv(t),i=xv(o);if(i===0)return!e&&-1;var s=Rv(n,i),a;if(e&&r!==r){for(;i>s;)if(a=o[s++],a!==a)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},kv={indexOf:Lv(!1)},Nv=Z,uo=Te,$v=pn,Pv=kv.indexOf,Mv=Ci,Fs=Nv([].push),Uc=function(e,t){var r=$v(e),n=0,o=[],i;for(i in r)!uo(Mv,i)&&uo(r,i)&&Fs(o,i);for(;t.length>n;)uo(r,i=t[n++])&&(~Pv(o,i)||Fs(o,i));return o},ki=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Dv=Uc,Uv=ki,Fv=Uv.concat("length","prototype");Mc.f=Object.getOwnPropertyNames||function(t){return Dv(t,Fv)};var Fc={};Fc.f=Object.getOwnPropertySymbols;var Vv=vn,jv=Z,Bv=Mc,Gv=Fc,zv=_e,Kv=jv([].concat),Hv=Vv("Reflect","ownKeys")||function(t){var r=Bv.f(zv(t)),n=Gv.f;return n?Kv(r,n(t)):r},Vs=Te,Wv=Hv,qv=yi,Yv=He,Xv=function(e,t,r){for(var n=Wv(t),o=Yv.f,i=qv.f,s=0;s<n.length;s++){var a=n[s];!Vs(e,a)&&!(r&&Vs(r,a))&&o(e,a,i(t,a))}},Jv=Y,Zv=X,Qv=/#|\.prototype\./,pr=function(e,t){var r=th[eh(e)];return r===nh?!0:r===rh?!1:Zv(t)?Jv(t):!!t},eh=pr.normalize=function(e){return String(e).replace(Qv,".").toLowerCase()},th=pr.data={},rh=pr.NATIVE="N",nh=pr.POLYFILL="P",Vc=pr,xr=K,oh=yi.f,ih=Lc,sh=Li,ah=Ti,ch=Xv,uh=Vc,Ne=function(e,t){var r=e.target,n=e.global,o=e.stat,i,s,a,u,c,l;if(n?s=xr:o?s=xr[r]||ah(r,{}):s=xr[r]&&xr[r].prototype,s)for(a in t){if(c=t[a],e.dontCallGetSet?(l=oh(s,a),u=l&&l.value):u=s[a],i=uh(n?a:r+(o?".":"#")+a,e.forced),!i&&u!==void 0){if(typeof c==typeof u)continue;ch(c,u)}(e.sham||u&&u.sham)&&ih(c,"sham",!0),sh(s,a,c,e)}},lh=Ne,lo=K;lh({global:!0,forced:lo.globalThis!==lo},{globalThis:lo});var dh=lt,jc=Array.isArray||function(t){return dh(t)==="Array"},fh=TypeError,ph=9007199254740991,vh=function(e){if(e>ph)throw fh("Maximum allowed index exceeded");return e},hh=lt,gh=Z,Bc=function(e){if(hh(e)==="Function")return gh(e)},js=Bc,mh=Dt,_h=Ei,bh=js(js.bind),Gc=function(e,t){return mh(e),t===void 0?e:_h?bh(e,t):function(){return e.apply(t,arguments)}},yh=jc,Eh=Vt,Sh=vh,Th=Gc,zc=function(e,t,r,n,o,i,s,a){for(var u=o,c=0,l=s?Th(s,a):!1,d,f;c<n;)c in r&&(d=l?l(r[c],c,t):r[c],i>0&&yh(d)?(f=Eh(d),u=zc(e,t,d,f,u,i-1)-1):(Sh(u+1),e[u]=d),u++),c++;return u},Kc=zc,wh=ie,Ih=wh("toStringTag"),Hc={};Hc[Ih]="z";var Oh=String(Hc)==="[object z]",Ah=Oh,Ch=X,Gr=lt,Rh=ie,xh=Rh("toStringTag"),Lh=Object,kh=Gr(function(){return arguments}())==="Arguments",Nh=function(e,t){try{return e[t]}catch(r){}},Ni=Ah?Gr:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=Nh(t=Lh(e),xh))=="string"?r:kh?Gr(t):(n=Gr(t))==="Object"&&Ch(t.callee)?"Arguments":n},$h=Z,Ph=Y,Wc=X,Mh=Ni,Dh=vn,Uh=Oi,qc=function(){},Yc=Dh("Reflect","construct"),$i=/^\s*(?:class|function)\b/,Fh=$h($i.exec),Vh=!$i.test(qc),Wt=function(t){if(!Wc(t))return!1;try{return Yc(qc,[],t),!0}catch(r){return!1}},Xc=function(t){if(!Wc(t))return!1;switch(Mh(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Vh||!!Fh($i,Uh(t))}catch(r){return!0}};Xc.sham=!0;var Jc=!Yc||Ph(function(){var e;return Wt(Wt.call)||!Wt(Object)||!Wt(function(){e=!0})||e})?Xc:Wt,Bs=jc,jh=Jc,Bh=Se,Gh=ie,zh=Gh("species"),Gs=Array,Kh=function(e){var t;return Bs(e)&&(t=e.constructor,jh(t)&&(t===Gs||Bs(t.prototype))?t=void 0:Bh(t)&&(t=t[zh],t===null&&(t=void 0))),t===void 0?Gs:t},Hh=Kh,Zc=function(e,t){return new(Hh(e))(t===0?0:t)},Wh=Ne,qh=Kc,Yh=Ut,Xh=Vt,Jh=Ft,Zh=Zc;Wh({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,r=Yh(this),n=Xh(r),o=Zh(r,0);return o.length=qh(o,r,r,n,0,t===void 0?1:Jh(t)),o}});var Qh=Ne,eg=Kc,tg=Dt,rg=Ut,ng=Vt,og=Zc;Qh({target:"Array",proto:!0},{flatMap:function(t){var r=rg(this),n=ng(r),o;return tg(t),o=og(r,0),o.length=eg(o,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),o}});var Pi={},ig=ie,sg=Pi,ag=ig("iterator"),cg=Array.prototype,ug=function(e){return e!==void 0&&(sg.Array===e||cg[ag]===e)},lg=Ni,zs=fr,dg=fn,fg=Pi,pg=ie,vg=pg("iterator"),Qc=function(e){if(!dg(e))return zs(e,vg)||zs(e,"@@iterator")||fg[lg(e)]},hg=ve,gg=Dt,mg=_e,_g=hn,bg=Qc,yg=TypeError,Eg=function(e,t){var r=arguments.length<2?bg(e):t;if(gg(r))return mg(hg(r,e));throw new yg(_g(e)+" is not iterable")},Sg=ve,Ks=_e,Tg=fr,wg=function(e,t,r){var n,o;Ks(e);try{if(n=Tg(e,"return"),!n){if(t==="throw")throw r;return r}n=Sg(n,e)}catch(i){o=!0,n=i}if(t==="throw")throw r;if(o)throw n;return Ks(n),r},Ig=Gc,Og=ve,Ag=_e,Cg=hn,Rg=ug,xg=Vt,Hs=Si,Lg=Eg,kg=Qc,Ws=wg,Ng=TypeError,zr=function(e,t){this.stopped=e,this.result=t},qs=zr.prototype,eu=function(e,t,r){var n=r&&r.that,o=!!(r&&r.AS_ENTRIES),i=!!(r&&r.IS_RECORD),s=!!(r&&r.IS_ITERATOR),a=!!(r&&r.INTERRUPTED),u=Ig(t,n),c,l,d,f,p,v,h,m=function(S){return c&&Ws(c,"normal"),new zr(!0,S)},E=function(S){return o?(Ag(S),a?u(S[0],S[1],m):u(S[0],S[1])):a?u(S,m):u(S)};if(i)c=e.iterator;else if(s)c=e;else{if(l=kg(e),!l)throw new Ng(Cg(e)+" is not iterable");if(Rg(l)){for(d=0,f=xg(e);f>d;d++)if(p=E(e[d]),p&&Hs(qs,p))return p;return new zr(!1)}c=Lg(e,l)}for(v=i?e.next:c.next;!(h=Og(v,c)).done;){try{p=E(h.value)}catch(S){Ws(c,"throw",S)}if(typeof p=="object"&&p&&Hs(qs,p))return p}return new zr(!1)},$g=ke,Pg=He,Mg=dn,Dg=function(e,t,r){$g?Pg.f(e,t,Mg(0,r)):e[t]=r},Ug=Ne,Fg=eu,Vg=Dg;Ug({target:"Object",stat:!0},{fromEntries:function(t){var r={};return Fg(t,function(n,o){Vg(r,n,o)},{AS_ENTRIES:!0}),r}});var tu={},jg=Uc,Bg=ki,Gg=Object.keys||function(t){return jg(t,Bg)},zg=ke,Kg=xc,Hg=He,Wg=_e,qg=pn,Yg=Gg;tu.f=zg&&!Kg?Object.defineProperties:function(t,r){Wg(t);for(var n=qg(r),o=Yg(r),i=o.length,s=0,a;i>s;)Hg.f(t,a=o[s++],n[a]);return t};var Xg=vn,Jg=Xg("document","documentElement"),Zg=_e,Qg=tu,Ys=ki,em=Ci,tm=Jg,rm=Cc,nm=Ai,Xs=">",Js="<",Zo="prototype",Qo="script",ru=nm("IE_PROTO"),fo=function(){},nu=function(e){return Js+Qo+Xs+e+Js+"/"+Qo+Xs},Zs=function(e){e.write(nu("")),e.close();var t=e.parentWindow.Object;return e=null,t},om=function(){var e=rm("iframe"),t="java"+Qo+":",r;return e.style.display="none",tm.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(nu("document.F=Object")),r.close(),r.F},Lr,Kr=function(){try{Lr=new ActiveXObject("htmlfile")}catch(t){}Kr=typeof document!="undefined"?document.domain&&Lr?Zs(Lr):om():Zs(Lr);for(var e=Ys.length;e--;)delete Kr[Zo][Ys[e]];return Kr()};em[ru]=!0;var Mi=Object.create||function(t,r){var n;return t!==null?(fo[Zo]=Zg(t),n=new fo,fo[Zo]=null,n[ru]=t):n=Kr(),r===void 0?n:Qg.f(n,r)},im=Y,sm=!im(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),am=Te,cm=X,um=Ut,lm=Ai,dm=sm,Qs=lm("IE_PROTO"),ei=Object,fm=ei.prototype,pm=dm?ei.getPrototypeOf:function(e){var t=um(e);if(am(t,Qs))return t[Qs];var r=t.constructor;return cm(r)&&t instanceof r?r.prototype:t instanceof ei?fm:null},vm=Y,hm=X,gm=Se,ea=pm,mm=Li,_m=ie,ti=_m("iterator"),ct,po,vo;[].keys&&(vo=[].keys(),"next"in vo&&(po=ea(ea(vo)),po!==Object.prototype&&(ct=po)));var bm=!gm(ct)||vm(function(){var e={};return ct[ti].call(e)!==e});bm&&(ct={});hm(ct[ti])||mm(ct,ti,function(){return this});var ym={IteratorPrototype:ct},Em=He.f,Sm=Te,Tm=ie,ta=Tm("toStringTag"),wm=function(e,t,r){e&&!r&&(e=e.prototype),e&&!Sm(e,ta)&&Em(e,ta,{configurable:!0,value:t})},Im=ym.IteratorPrototype,Om=Mi,Am=dn,Cm=wm,Rm=Pi,xm=function(){return this},Lm=function(e,t,r,n){var o=t+" Iterator";return e.prototype=Om(Im,{next:Am(+!n,r)}),Cm(e,o,!1),Rm[o]=xm,e},km=function(e,t){return{value:e,done:t}},Nm=Ni,$m=String,vr=function(e){if(Nm(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return $m(e)},Pm=Se,Mm=lt,Dm=ie,Um=Dm("match"),ou=function(e){var t;return Pm(e)&&((t=e[Um])!==void 0?!!t:Mm(e)==="RegExp")},Fm=K,Vm=Y,ra=Fm.RegExp,jm=!Vm(function(){var e=!0;try{ra(".","d")}catch(u){e=!1}var t={},r="",n=e?"dgimsy":"gimsy",o=function(u,c){Object.defineProperty(t,u,{get:function(){return r+=c,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};e&&(i.hasIndices="d");for(var s in i)o(s,i[s]);var a=Object.getOwnPropertyDescriptor(ra.prototype,"flags").get.call(t);return a!==n||r!==n}),Bm={correct:jm},Gm=_e,iu=function(){var e=Gm(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},zm=ve,Km=Te,Hm=Si,na=Bm,Wm=iu,qm=RegExp.prototype,su=na.correct?function(e){return e.flags}:function(e){return!na.correct&&Hm(qm,e)&&!Km(e,"flags")?zm(Wm,e):e.flags},Ym=Jc,Xm=hn,Jm=TypeError,Zm=function(e){if(Ym(e))return e;throw new Jm(Xm(e)+" is not a constructor")},oa=_e,Qm=Zm,e_=fn,t_=ie,r_=t_("species"),n_=function(e,t){var r=oa(e).constructor,n;return r===void 0||e_(n=oa(r)[r_])?t:Qm(n)},Di=Z,o_=Ft,i_=vr,s_=Mt,a_=Di("".charAt),ia=Di("".charCodeAt),c_=Di("".slice),u_=function(e){return function(t,r){var n=i_(s_(t)),o=o_(r),i=n.length,s,a;return o<0||o>=i?e?"":void 0:(s=ia(n,o),s<55296||s>56319||o+1===i||(a=ia(n,o+1))<56320||a>57343?e?a_(n,o):s:e?c_(n,o,o+2):(s-55296<<10)+(a-56320)+65536)}},l_={charAt:u_(!0)},d_=l_.charAt,f_=function(e,t,r){return t+(r?d_(e,t).length:1)},Ui=Y,p_=K,Fi=p_.RegExp,au=Ui(function(){var e=Fi("a","y");return e.lastIndex=2,e.exec("abcd")!==null});au||Ui(function(){return!Fi("a","y").sticky});var v_=au||Ui(function(){var e=Fi("^r","gy");return e.lastIndex=2,e.exec("str")!==null}),h_={BROKEN_CARET:v_},g_=Y,m_=K,__=m_.RegExp,b_=g_(function(){var e=__(".","s");return!(e.dotAll&&e.test(`
2
- `)&&e.flags==="s")}),y_=Y,E_=K,S_=E_.RegExp,T_=y_(function(){var e=S_("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Et=ve,gn=Z,w_=vr,I_=iu,O_=h_,A_=Ii,C_=Mi,R_=Ri.get,x_=b_,L_=T_,k_=A_("native-string-replace",String.prototype.replace),tn=RegExp.prototype.exec,ri=tn,N_=gn("".charAt),$_=gn("".indexOf),P_=gn("".replace),ho=gn("".slice),ni=function(){var e=/a/,t=/b*/g;return Et(tn,e,"a"),Et(tn,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),cu=O_.BROKEN_CARET,oi=/()??/.exec("")[1]!==void 0,M_=ni||oi||cu||x_||L_;M_&&(ri=function(t){var r=this,n=R_(r),o=w_(t),i=n.raw,s,a,u,c,l,d,f;if(i)return i.lastIndex=r.lastIndex,s=Et(ri,i,o),r.lastIndex=i.lastIndex,s;var p=n.groups,v=cu&&r.sticky,h=Et(I_,r),m=r.source,E=0,S=o;if(v&&(h=P_(h,"y",""),$_(h,"g")===-1&&(h+="g"),S=ho(o,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&N_(o,r.lastIndex-1)!==`
3
- `)&&(m="(?: "+m+")",S=" "+S,E++),a=new RegExp("^(?:"+m+")",h)),oi&&(a=new RegExp("^"+m+"$(?!\\s)",h)),ni&&(u=r.lastIndex),c=Et(tn,v?a:r,S),v?c?(c.input=ho(c.input,E),c[0]=ho(c[0],E),c.index=r.lastIndex,r.lastIndex+=c[0].length):r.lastIndex=0:ni&&c&&(r.lastIndex=r.global?c.index+c[0].length:u),oi&&c&&c.length>1&&Et(k_,c[0],a,function(){for(l=1;l<arguments.length-2;l++)arguments[l]===void 0&&(c[l]=void 0)}),c&&p)for(c.groups=d=C_(null),l=0;l<p.length;l++)f=p[l],d[f[0]]=c[f[1]];return c});var D_=ri,sa=ve,U_=_e,F_=X,V_=lt,j_=D_,B_=TypeError,G_=function(e,t){var r=e.exec;if(F_(r)){var n=sa(r,e,t);return n!==null&&U_(n),n}if(V_(e)==="RegExp")return sa(j_,e,t);throw new B_("RegExp#exec called on incompatible receiver")},z_=Ne,K_=ve,uu=Bc,H_=Lm,kr=km,aa=Mt,lu=Dc,ir=vr,W_=_e,q_=Se,Y_=ou,du=su,X_=fr,J_=Li,Z_=Y,Q_=ie,eb=n_,tb=f_,rb=G_,fu=Ri,rn=Q_("matchAll"),pu="RegExp String",vu=pu+" Iterator",nb=fu.set,ob=fu.getterFor(vu),ca=RegExp.prototype,ib=TypeError,ii=uu("".indexOf),nn=uu("".matchAll),go=!!nn&&!Z_(function(){nn("a",/./)}),sb=H_(function(t,r,n,o){nb(this,{type:vu,regexp:t,string:r,global:n,unicode:o,done:!1})},pu,function(){var t=ob(this);if(t.done)return kr(void 0,!0);var r=t.regexp,n=t.string,o=rb(r,n);return o===null?(t.done=!0,kr(void 0,!0)):t.global?(ir(o[0])===""&&(r.lastIndex=tb(n,lu(r.lastIndex),t.unicode)),kr(o,!1)):(t.done=!0,kr(o,!1))}),ab=function(e){var t=W_(this),r=ir(e),n=eb(t,RegExp),o=ir(du(t)),i,s,a;return i=new n(n===RegExp?t.source:t,o),s=!!~ii(o,"g"),a=!!~ii(o,"u"),i.lastIndex=lu(t.lastIndex),new sb(i,r,s,a)};z_({target:"String",proto:!0,forced:go},{matchAll:function(t){var r=aa(this),n,o,i,s;if(q_(t)){if(Y_(t)&&(n=ir(aa(du(t))),!~ii(n,"g")))throw new ib("`.matchAll` does not allow non-global regexes");if(go)return nn(r,t);if(i=X_(t,rn),i)return K_(i,t,r)}else if(go)return nn(r,t);return o=ir(r),s=new RegExp(t,"g"),s[rn](o)}});rn in ca||J_(ca,rn,ab);var hu={},ua=Dt,cb=TypeError,ub=function(e){var t,r;this.promise=new e(function(n,o){if(t!==void 0||r!==void 0)throw new cb("Bad Promise constructor");t=n,r=o}),this.resolve=ua(t),this.reject=ua(r)};hu.f=function(e){return new ub(e)};var lb=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},db=K,gu=db.Promise,fb=ie,mu=fb("iterator"),_u=!1;try{var pb=0,la={next:function(){return{done:!!pb++}},return:function(){_u=!0}};la[mu]=function(){return this},Array.from(la,function(){throw 2})}catch(e){}var vb=function(e,t){try{if(!t&&!_u)return!1}catch(o){return!1}var r=!1;try{var n={};n[mu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(o){}return r},qt=K,hb=bc,gb=lt,Nr=function(e){return hb.slice(0,e.length)===e},mb=function(){return Nr("Bun/")?"BUN":Nr("Cloudflare-Workers")?"CLOUDFLARE":Nr("Deno/")?"DENO":Nr("Node.js/")?"NODE":qt.Bun&&typeof Bun.version=="string"?"BUN":qt.Deno&&typeof Deno.version=="object"?"DENO":gb(qt.process)==="process"?"NODE":qt.window&&qt.document?"BROWSER":"REST"}(),_b=K,tr=gu,bb=X,yb=Vc,Eb=Oi,Sb=ie,da=mb,mo=Ec;tr&&tr.prototype;var Tb=Sb("species"),fa=!1,wb=bb(_b.PromiseRejectionEvent),Ib=yb("Promise",function(){var e=Eb(tr),t=e!==String(tr);if(!t&&mo===66)return!0;if(!mo||mo<51||!/native code/.test(e)){var r=new tr(function(i){i(1)}),n=function(i){i(function(){},function(){})},o=r.constructor={};if(o[Tb]=n,fa=r.then(function(){})instanceof n,!fa)return!0}return!t&&(da==="BROWSER"||da==="DENO")&&!wb}),Ob={CONSTRUCTOR:Ib},Ab=gu,Cb=vb,Rb=Ob.CONSTRUCTOR,xb=Rb||!Cb(function(e){Ab.all(e).then(void 0,function(){})}),Lb=Ne,kb=ve,Nb=Dt,$b=hu,Pb=lb,Mb=eu,Db=xb;Lb({target:"Promise",stat:!0,forced:Db},{allSettled:function(t){var r=this,n=$b.f(r),o=n.resolve,i=n.reject,s=Pb(function(){var a=Nb(r.resolve),u=[],c=0,l=1;Mb(t,function(d){var f=c++,p=!1;l++,kb(a,r,d).then(function(v){p||(p=!0,u[f]={status:"fulfilled",value:v},--l||o(u))},function(v){p||(p=!0,u[f]={status:"rejected",reason:v},--l||o(u))})}),--l||o(u)});return s.error&&i(s.value),n.promise}});var Vi=Z,Ub=Ut,Fb=Math.floor,_o=Vi("".charAt),Vb=Vi("".replace),bo=Vi("".slice),jb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Bb=/\$([$&'`]|\d{1,2})/g,Gb=function(e,t,r,n,o,i){var s=r+e.length,a=n.length,u=Bb;return o!==void 0&&(o=Ub(o),u=jb),Vb(i,u,function(c,l){var d;switch(_o(l,0)){case"$":return"$";case"&":return e;case"`":return bo(t,0,r);case"'":return bo(t,s);case"<":d=o[bo(l,1,-1)];break;default:var f=+l;if(f===0)return c;if(f>a){var p=Fb(f/10);return p===0?c:p<=a?n[p-1]===void 0?_o(l,1):n[p-1]+_o(l,1):c}d=n[f-1]}return d===void 0?"":d})},zb=Ne,Kb=ve,ji=Z,pa=Mt,Hb=X,Wb=Se,qb=ou,Yt=vr,Yb=fr,Xb=su,Jb=Gb,Zb=ie,Qb=Zb("replace"),ey=TypeError,yo=ji("".indexOf);ji("".replace);var va=ji("".slice),ty=Math.max;zb({target:"String",proto:!0},{replaceAll:function(t,r){var n=pa(this),o,i,s,a,u,c,l,d,f,p,v=0,h="";if(Wb(t)){if(o=qb(t),o&&(i=Yt(pa(Xb(t))),!~yo(i,"g")))throw new ey("`.replaceAll` does not allow non-global regexes");if(s=Yb(t,Qb),s)return Kb(s,t,n,r)}for(a=Yt(n),u=Yt(t),c=Hb(r),c||(r=Yt(r)),l=u.length,d=ty(1,l),f=yo(a,u);f!==-1;)p=c?Yt(r(u,f,a)):Jb(u,a,f,[],void 0,r),h+=va(a,v,f)+p,v=f+l,f=f+d>a.length?-1:yo(a,u,f+d);return v<a.length&&(h+=va(a,v)),h}});var ry=ie,ny=Mi,oy=He.f,si=ry("unscopables"),ai=Array.prototype;ai[si]===void 0&&oy(ai,si,{configurable:!0,value:ny(null)});var iy=function(e){ai[si][e]=!0},sy=Ne,ay=Ut,cy=Vt,uy=Ft,ly=iy;sy({target:"Array",proto:!0},{at:function(t){var r=ay(this),n=cy(r),o=uy(t),i=o>=0?o:n+o;return i<0||i>=n?void 0:r[i]}});ly("at");var dy=Ne,fy=Z,py=Mt,vy=Ft,hy=vr,gy=Y,my=fy("".charAt),_y=gy(function(){return"𠮷".at(-2)!=="\uD842"});dy({target:"String",proto:!0,forced:_y},{at:function(t){var r=hy(py(this)),n=r.length,o=vy(t),i=o>=0?o:n+o;return i<0||i>=n?void 0:my(r,i)}});(function(e,t){(function(r,n){n()})(z,function(){function r(o){var i=!0,s=!1,a=null,u={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(g){return!!(g&&g!==document&&g.nodeName!=="HTML"&&g.nodeName!=="BODY"&&"classList"in g&&"contains"in g.classList)}function l(g){var b=g.type,C=g.tagName;return!!(C==="INPUT"&&u[b]&&!g.readOnly||C==="TEXTAREA"&&!g.readOnly||g.isContentEditable)}function d(g){g.classList.contains("focus-visible")||(g.classList.add("focus-visible"),g.setAttribute("data-focus-visible-added",""))}function f(g){g.hasAttribute("data-focus-visible-added")&&(g.classList.remove("focus-visible"),g.removeAttribute("data-focus-visible-added"))}function p(g){g.metaKey||g.altKey||g.ctrlKey||(c(o.activeElement)&&d(o.activeElement),i=!0)}function v(g){i=!1}function h(g){c(g.target)&&(i||l(g.target))&&d(g.target)}function m(g){c(g.target)&&(g.target.classList.contains("focus-visible")||g.target.hasAttribute("data-focus-visible-added"))&&(s=!0,window.clearTimeout(a),a=window.setTimeout(function(){s=!1},100),f(g.target))}function E(g){document.visibilityState==="hidden"&&(s&&(i=!0),S())}function S(){document.addEventListener("mousemove",_),document.addEventListener("mousedown",_),document.addEventListener("mouseup",_),document.addEventListener("pointermove",_),document.addEventListener("pointerdown",_),document.addEventListener("pointerup",_),document.addEventListener("touchmove",_),document.addEventListener("touchstart",_),document.addEventListener("touchend",_)}function D(){document.removeEventListener("mousemove",_),document.removeEventListener("mousedown",_),document.removeEventListener("mouseup",_),document.removeEventListener("pointermove",_),document.removeEventListener("pointerdown",_),document.removeEventListener("pointerup",_),document.removeEventListener("touchmove",_),document.removeEventListener("touchstart",_),document.removeEventListener("touchend",_)}function _(g){g.target.nodeName&&g.target.nodeName.toLowerCase()==="html"||(i=!1,D())}document.addEventListener("keydown",p,!0),document.addEventListener("mousedown",v,!0),document.addEventListener("pointerdown",v,!0),document.addEventListener("touchstart",v,!0),document.addEventListener("visibilitychange",E,!0),S(),o.addEventListener("focus",h,!0),o.addEventListener("blur",m,!0),o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&o.host?o.host.setAttribute("data-js-focus-visible",""):o.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=r;var n;try{n=new CustomEvent("focus-visible-polyfill-ready")}catch(o){n=document.createEvent("CustomEvent"),n.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(n)}typeof document!="undefined"&&r(document)})})();const F={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},ye=console,rt={};Object.keys(F).forEach(e=>{rt[e]=ye[e]});const Xt="Datadog Browser SDK:",w={debug:rt.debug.bind(ye,Xt),log:rt.log.bind(ye,Xt),info:rt.info.bind(ye,Xt),warn:rt.warn.bind(ye,Xt),error:rt.error.bind(ye,Xt)},mn="https://docs.datadoghq.com",by=`${mn}/real_user_monitoring/browser/troubleshooting`,Bi="More details:";function bu(e,t){return(...r)=>{try{return e(...r)}catch(n){w.error(t,n)}}}function Ue(e){return e!==0&&Math.random()*100<=e}function St(e,t){return+e.toFixed(t)}function yy(e){return hr(e)&&e>=0&&e<=100}function hr(e){return typeof e=="number"}function sr(e){return y({},e)}function on(e,t){return Object.keys(e).some(r=>e[r]===t)}function We(e){return Object.keys(e).length===0}function yu(e,t){const r={};for(const n of Object.keys(e))r[n]=t(e[n]);return r}function ue(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!="object"&&(typeof self=="object"?e=self:typeof window=="object"?e=window:e={}),e}const ge=ue(),dt="WorkerGlobalScope"in ge;function Be(e,t){const r=ue();let n;return r.Zone&&typeof r.Zone.__symbol__=="function"&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}let sn,Eu=!1;function Ey(e){sn=e}function Sy(e){Eu=e}function Ty(e,t,r){const n=r.value;r.value=function(...o){return(sn?T(n):n).apply(this,o)}}function T(e){return function(...t){return Oe(e,this,t)}}function Oe(e,t,r){try{return e.apply(t,r)}catch(n){Ge(n)}}function Ge(e){if(ci(e),sn)try{sn(e)}catch(t){ci(t)}}function ci(...e){Eu&&w.error("[MONITOR]",...e)}function J(e,t){return Be(ue(),"setTimeout")(T(e),t)}function de(e){Be(ue(),"clearTimeout")(e)}function jt(e,t){return Be(ue(),"setInterval")(T(e),t)}function _n(e){Be(ue(),"clearInterval")(e)}function ha(e){var t;const r=(t=ge.queueMicrotask)===null||t===void 0?void 0:t.bind(ge);typeof r=="function"?r(T(e)):Promise.resolve().then(T(e))}class x{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach(r=>r(t))}addObserver(t){this.observers.push(t),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(t){this.observers=this.observers.filter(r=>t!==r),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function Su(...e){return new x(t=>{const r=e.map(n=>n.subscribe(o=>t.notify(o)));return()=>r.forEach(n=>n.unsubscribe())})}class Tu extends x{constructor(t){super(),this.maxBufferSize=t,this.buffer=[]}notify(t){this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(t)}subscribe(t){let r=!1;const n={unsubscribe:()=>{r=!0,this.removeObserver(t)}};return ha(()=>{for(const o of this.buffer){if(r)return;t(o)}r||this.addObserver(t)}),n}unbuffer(){ha(()=>{this.maxBufferSize=this.buffer.length=0})}}const Q=1e3,se=60*Q,wu=60*se,wy=24*wu,Iu=365*wy;function bn(e){return{relative:e,timeStamp:Oy(e)}}function Iy(e){return{relative:yn(e),timeStamp:e}}function Oy(e){const t=re()-performance.now();return t>gr()?Math.round(qe(t,e)):Cy(e)}function Ay(){return Math.round(re()-qe(gr(),performance.now()))}function O(e){return hr(e)?St(e*1e6,0):e}function re(){return new Date().getTime()}function j(){return re()}function ce(){return performance.now()}function H(){return{relative:ce(),timeStamp:j()}}function Ou(){return{relative:0,timeStamp:gr()}}function B(e,t){return t-e}function qe(e,t){return e+t}function yn(e){return e-gr()}function Cy(e){return Math.round(qe(gr(),e))}function Ry(e){return e<Iu}let Eo;function gr(){var e,t;return Eo===void 0&&(Eo=(t=(e=performance.timing)===null||e===void 0?void 0:e.navigationStart)!==null&&t!==void 0?t:performance.timeOrigin),Eo}function En(e,t,r){const n=r&&r.leading!==void 0?r.leading:!0,o=r&&r.trailing!==void 0?r.trailing:!0;let i=!1,s,a;return{throttled:(...u)=>{if(i){s=u;return}n?e(...u):s=u,i=!0,a=J(()=>{o&&s&&e(...s),i=!1,s=void 0},t)},cancel:()=>{de(a),i=!1,s=void 0}}}function k(){}function oe(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,oe)}const Rt=/([\w-]+)\s*=\s*([^;]+)/g;function ar(e,t){for(Rt.lastIndex=0;;){const r=Rt.exec(e);if(r){if(r[1]===t)return r[2]}else break}}function xy(e){const t=new Map;for(Rt.lastIndex=0;;){const r=Rt.exec(e);if(r){const n=r[1],o=r[2];t.has(n)?t.get(n).push(o):t.set(n,[o])}else break}return t}function Ly(e){const t=new Map;for(Rt.lastIndex=0;;){const r=Rt.exec(e);if(r)t.set(r[1],r[2]);else break}return t}function Sn(e,t,r=""){const n=e.charCodeAt(t-1),i=n>=55296&&n<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${r}`}function ky(){return Au()===0}function zC(){return Au()===1}let $r;function Au(){return $r!=null?$r:$r=Ny()}function Ny(e=window){var t;const r=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(r)?0:((t=e.navigator.vendor)===null||t===void 0?void 0:t.indexOf("Apple"))===0||/safari/i.test(r)&&!/chrome|android/i.test(r)?1:2}function Gi(e){return Tn(e,location.href).href}function $y(e){try{return!!Tn(e)}catch(t){return!1}}function Py(e){const t=Tn(e).pathname;return t[0]==="/"?t:`/${t}`}function Tn(e,t){const{URL:r}=My();try{return t!==void 0?new r(e,t):new r(e)}catch(n){throw new Error(`Failed to construct URL: ${String(n)}`)}}let So;function My(){if(!So){let e,t;try{e=document.createElement("iframe"),e.style.display="none",document.body.appendChild(e),t=e.contentWindow}catch(r){t=ge}So={URL:t.URL},e==null||e.remove()}return So}function wn(e,t,r=0,n){const o=new Date;o.setTime(o.getTime()+r);const i=`expires=${o.toUTCString()}`,s=n&&n.crossSite?"none":"strict",a=n&&n.domain?`;domain=${n.domain}`:"",u=n&&n.secure?";secure":"",c=n&&n.partitioned?";partitioned":"";document.cookie=`${e}=${t};${i};path=/;samesite=${s}${a}${u}${c}`}function In(e){return ar(document.cookie,e)}function Dy(e){return xy(document.cookie).get(e)||[]}let To;function Fe(e){return To||(To=Ly(document.cookie)),To.get(e)}function Cu(e,t){wn(e,"",0,t)}function Uy(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${oe()}`,r="test";wn(t,r,se,e);const n=In(t)===r;return Cu(t,e),n}catch(t){return w.error(t),!1}}let wo;function Ru(e=location.hostname,t=document.referrer){if(wo===void 0){const r=Fy(e,t);if(r){const n=`dd_site_test_${oe()}`,o="test",i=r.split(".");let s=i.pop();for(;i.length&&!In(n);)s=`${i.pop()}.${s}`,wn(n,o,Q,{domain:s});Cu(n,{domain:s}),wo=s}}return wo}function Fy(e,t){try{return e||Tn(t).hostname}catch(r){}}const Ae="_dd_s";function xu(e,t){for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(t(n,r,e))return n}}function an(e){return Object.values(e)}function zi(e){return Object.entries(e)}const Ye=4*wu,Lu=15*se,Vy=Iu,ku="0",xt={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},Nu=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Ki="&";function jy(e){return!!e&&(e.indexOf(Ki)!==-1||Nu.test(e))}const By="1";function nt(e,t){const r={isExpired:By};return t.trackAnonymousUser&&(e!=null&&e.anonymousId)&&(r.anonymousId=e==null?void 0:e.anonymousId),r}function Hr(e){return We(e)}function $u(e){return!Hr(e)}function rr(e){return e.isExpired!==void 0||!Gy(e)}function Gy(e){return(e.created===void 0||re()-Number(e.created)<Ye)&&(e.expire===void 0||re()<Number(e.expire))}function Pu(e){e.expire=String(re()+Lu)}function ui(e){return zi(e).map(([t,r])=>t==="anonymousId"?`aid=${r}`:`${t}=${r}`).join(Ki)}function On(e){const t={};return jy(e)&&e.split(Ki).forEach(r=>{const n=Nu.exec(r);if(n!==null){const[,o,i]=n;o==="aid"?t.anonymousId=i:t[o]=i}}),t}const zy="_dd",Ky="_dd_r",Hy="_dd_l",Wy="rum",qy="logs";function Yy(e){if(!Fe(Ae)){const r=Fe(zy),n=Fe(Ky),o=Fe(Hy),i={};r&&(i.id=r),o&&/^[01]$/.test(o)&&(i[qy]=o),n&&/^[012]$/.test(n)&&(i[Wy]=n),$u(i)&&(Pu(i),e.persistSession(i))}}const Xy=0;function ga(e){const t=Zy(e);return t&&Uy(t)?{type:xt.COOKIE,cookieOptions:t}:void 0}function Jy(e,t){const r={isLockEnabled:ky(),persistSession:n=>ma(t,e,n,Lu),retrieveSession:()=>Mu(t,e),expireSession:n=>ma(t,e,nt(n,e),Ye)};return Yy(r),r}function ma(e,t,r,n){let o=ui(r);t.betaEncodeCookieOptions&&(o=ui(y(y({},r),We(r)?{}:{c:Du(e)}))),wn(Ae,o,t.trackAnonymousUser?Vy:n,e)}function Mu(e,t){if(t.betaEncodeCookieOptions)return Qy(e);const r=In(Ae);return On(r)}function Zy(e){const t={};if(t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){const r=Ru();if(!r)return;t.domain=r}return t}function Du(e){const t=e.domain?e.domain.split(".").length-1:0;let r=0;return r|=Xy<<5,r|=t<<1,r|=e.crossSite?1:0,r.toString(16)}function Qy(e){const t=Dy(Ae),r=Du(e);let n;for(const o of t.reverse())if(n=On(o),n.c===r)break;return n==null||delete n.c,n!=null?n:{}}const eE="_dd_test_";function _a(){try{const e=oe(),t=`${eE}${e}`;localStorage.setItem(t,e);const r=localStorage.getItem(t);return localStorage.removeItem(t),e===r?{type:xt.LOCAL_STORAGE}:void 0}catch(e){return}}function tE(e){return{isLockEnabled:!1,persistSession:Uu,retrieveSession:Fu,expireSession:t=>rE(t,e)}}function Uu(e){localStorage.setItem(Ae,ui(e))}function Fu(){const e=localStorage.getItem(Ae);return On(e)}function rE(e,t){Uu(nt(e,t))}const nE=10,oE=100,iE=Q,Vu="--",ju=[];let Wr;function ot(e,t,r=0){var n;const{isLockEnabled:o,persistSession:i,expireSession:s}=t,a=f=>i(W(y({},f),{lock:c})),u=()=>{const v=t.retrieveSession(),{lock:f}=v;return{session:Or(v,["lock"]),lock:f&&!aE(f)?f:void 0}};if(Wr||(Wr=e),e!==Wr){ju.push(e);return}if(o&&r>=oE){ba(t);return}let c,l=u();if(o){if(l.lock){Pr(e,t,r);return}if(c=sE(),a(l.session),l=u(),l.lock!==c){Pr(e,t,r);return}}let d=e.process(l.session);if(o&&(l=u(),l.lock!==c)){Pr(e,t,r);return}if(d&&(rr(d)?s(d):(Pu(d),o?a(d):i(d))),o&&!(d&&rr(d))){if(l=u(),l.lock!==c){Pr(e,t,r);return}i(l.session),d=l.session}(n=e.after)===null||n===void 0||n.call(e,d||l.session),ba(t)}function Pr(e,t,r){J(()=>{ot(e,t,r+1)},nE)}function ba(e){Wr=void 0;const t=ju.shift();t&&ot(t,e)}function sE(){return oe()+Vu+j()}function aE(e){const[,t]=e.split(Vu);return!t||B(Number(t),j())>iE}const ya=Q;function cE(e){switch(e.sessionPersistence){case xt.COOKIE:return ga(e);case xt.LOCAL_STORAGE:return _a();case void 0:{let t=ga(e);return!t&&e.allowFallbackToLocalStorage&&(t=_a()),t}default:w.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}function uE(e,t){return e.type===xt.COOKIE?Jy(t,e.cookieOptions):tE(t)}function lE(e,t,r,n,o=uE(e,t)){const i=new x,s=new x,a=new x,u=jt(p,ya);let c;h();const{throttled:l,cancel:d}=En(()=>{ot({process:b=>{if(Hr(b))return;const C=v(b);return m(C),C},after:b=>{$u(b)&&!E()&&_(b),c=b}},o)},ya);function f(){ot({process:b=>E()?v(b):void 0},o)}function p(){const b=o.retrieveSession();rr(b)?ot({process:C=>rr(C)?nt(C,t):void 0,after:v},o):v(b)}function v(b){return rr(b)&&(b=nt(b,t)),E()&&(S(b)?D():(a.notify({previousState:c,newState:b}),c=b)),b}function h(){ot({process:b=>{if(Hr(b))return b.anonymousId=oe(),nt(b,t)},after:b=>{c=b}},o)}function m(b){if(Hr(b))return!1;const C=n(b[r]);b[r]=C,delete b.isExpired,C!==ku&&!b.id&&(b.id=oe(),b.created=String(re()))}function E(){return(c==null?void 0:c[r])!==void 0}function S(b){return c.id!==b.id||c[r]!==b[r]}function D(){c=nt(c,t),s.notify()}function _(b){c=b,i.notify()}function g(b){ot({process:C=>y(y({},C),b),after:v},o)}return{expandOrRenewSession:l,expandSession:f,getSession:()=>c,renewObservable:i,expireObservable:s,sessionStateUpdateObservable:a,restartSession:h,expire:b=>{d(),b===!1&&c&&delete c.anonymousId,o.expireSession(c),v(nt(c,t))},stop:()=>{_n(u)},updateSessionState:g}}const li={GRANTED:"granted",NOT_GRANTED:"not-granted"};function Bu(e){const t=new x;return{tryToInit(r){e||(e=r)},update(r){e=r,t.notify()},isGranted(){return e===li.GRANTED},observable:t}}function ft(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function cr(e){const t=ft(e);return t==="string"||t==="function"||e instanceof RegExp}function An(e,t,r=!1){return e.some(n=>{try{if(typeof n=="function")return n(t);if(n instanceof RegExp)return n.test(t);if(typeof n=="string")return r?t.startsWith(n):n===t}catch(o){w.error(o)}return!1})}const dE=["chrome-extension://","moz-extension://"];function Ea(e){return dE.some(t=>e.includes(t))}function fE(e,t=""){if(Ea(e))return!1;const n=t.split(`
4
- `).filter(o=>{const i=o.trim();return i.length&&/^at\s+|@/.test(i)})[1]||"";return Ea(n)}const pE="Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.",vE="SDK initialized on a non-allowed domain.";function hE(e,t,r=typeof location!="undefined"?location.origin:""){const n=e.allowedTrackingOrigins;if(!n)return fE(r,t)?(w.error(pE),!1):!0;const o=An(n,r);return o||w.error(vE),o}const Gu="datad0g.com",gE="dd0g-gov.com",st="datadoghq.com",mE="datadoghq.eu",_E="ddog-gov.com",bE="pci.browser-intake-datadoghq.com",yE=["ddsource","dd-api-key","dd-request-id"];function De(e,t,r){const n=EE(e,t);return{build(o,i){const s=SE(e,t,o,i,r);return n(s)},trackType:t}}function EE(e,t){const r=`/api/v2/${t}`,n=e.proxy;if(typeof n=="string"){const i=Gi(n);return s=>`${i}?ddforward=${encodeURIComponent(`${r}?${s}`)}`}if(typeof n=="function")return i=>n({path:r,parameters:i});const o=zu(t,e);return i=>`https://${o}${r}?${i}`}function zu(e,t){const{site:r=st,internalAnalyticsSubdomain:n}=t;if(e==="logs"&&t.usePciIntake&&r===st)return bE;if(n&&r===st)return`${n}.${st}`;if(r===gE)return`http-intake.logs.${r}`;const o=r.split("."),i=o.pop();return`browser-intake-${o.join("-")}.${i}`}function SE({clientToken:e,internalAnalyticsSubdomain:t,source:r="browser"},n,o,{retry:i,encoding:s},a=[]){const u=[`ddsource=${r}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.25.2")}`,"dd-evp-origin=browser",`dd-request-id=${oe()}`].concat(a);return s&&u.push(`dd-evp-encoding=${s}`),n==="rum"&&(u.push(`batch_time=${j()}`,`_dd.api=${o}`),i&&u.push(`_dd.retry_count=${i.count}`,`_dd.retry_after=${i.lastFailureStatus}`)),t&&u.reverse(),u.join("&")}function TE(e){const t=e.site||st,r=wE(e.source),n=IE(W(y({},e),{site:t,source:r})),o=OE(W(y({},e),{site:t,source:r}));return y({replica:o,site:t,source:r},n)}function wE(e){return e==="flutter"||e==="unity"?e:"browser"}function IE(e){return{logsEndpointBuilder:De(e,"logs"),rumEndpointBuilder:De(e,"rum"),profilingEndpointBuilder:De(e,"profile"),sessionReplayEndpointBuilder:De(e,"replay"),exposuresEndpointBuilder:De(e,"exposures"),flagEvaluationEndpointBuilder:De(e,"flagevaluation")}}function OE(e){if(!e.replica)return;const t=W(y({},e),{site:st,clientToken:e.replica.clientToken});return{logsEndpointBuilder:De(t,"logs"),rumEndpointBuilder:De(t,"rum",[`application.id=${e.replica.applicationId}`])}}function Ku(e){return yE.every(t=>e.includes(t))}const Tt={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},di={ALL:"all",SAMPLED:"sampled"};function Io(e,t){return e!=null&&typeof e!="string"?(w.error(`${t} must be defined as a string`),!1):!0}function AE(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(w.error(`Site should be a valid Datadog site. ${Bi} ${mn}/getting_started/site/.`),!1):!0}function wt(e,t){return e!==void 0&&!yy(e)?(w.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function Hu(e,t){var r,n,o,i,s,a,u,c,l,d;if(!e||!e.clientToken){w.error("Client Token is not configured, we will not send any data.");return}if(e.allowedTrackingOrigins!==void 0&&!Array.isArray(e.allowedTrackingOrigins)){w.error("Allowed Tracking Origins must be an array");return}if(!(!AE(e.site)||!wt(e.sessionSampleRate,"Session")||!wt(e.telemetrySampleRate,"Telemetry")||!wt(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!wt(e.telemetryUsageSampleRate,"Telemetry Usage")||!Io(e.version,"Version")||!Io(e.env,"Env")||!Io(e.service,"Service")||!hE(e,t!=null?t:""))){if(e.trackingConsent!==void 0&&!on(li,e.trackingConsent)){w.error('Tracking Consent should be either "granted" or "not-granted"');return}return y({beforeSend:e.beforeSend&&bu(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:dt?void 0:cE(e),sessionSampleRate:(r=e.sessionSampleRate)!==null&&r!==void 0?r:100,telemetrySampleRate:(n=e.telemetrySampleRate)!==null&&n!==void 0?n:20,telemetryConfigurationSampleRate:(o=e.telemetryConfigurationSampleRate)!==null&&o!==void 0?o:5,telemetryUsageSampleRate:(i=e.telemetryUsageSampleRate)!==null&&i!==void 0?i:5,service:(s=e.service)!==null&&s!==void 0?s:void 0,env:(a=e.env)!==null&&a!==void 0?a:void 0,version:(u=e.version)!==null&&u!==void 0?u:void 0,datacenter:(c=e.datacenter)!==null&&c!==void 0?c:void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:(l=e.trackingConsent)!==null&&l!==void 0?l:li.GRANTED,trackAnonymousUser:(d=e.trackAnonymousUser)!==null&&d!==void 0?d:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,betaEncodeCookieOptions:!!e.betaEncodeCookieOptions,variant:e.variant,sdkVersion:e.sdkVersion},TE(e))}}function Wu(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),beta_encode_cookie_options:e.betaEncodeCookieOptions,source:e.source,sdk_version:e.sdkVersion,variant:e.variant}}var ze;(function(e){e.TRACK_INTAKE_REQUESTS="track_intake_requests",e.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",e.FEATURE_OPERATION_VITAL="feature_operation_vital",e.SHORT_SESSION_INVESTIGATION="short_session_investigation",e.AVOID_FETCH_KEEPALIVE="avoid_fetch_keepalive"})(ze||(ze={}));const Hi=new Set;function qu(e){Array.isArray(e)&&CE(e.filter(t=>on(ze,t)))}function CE(e){e.forEach(t=>{Hi.add(t)})}function mr(e){return Hi.has(e)}function RE(){return Hi}const Lt="?";function _r(e){var t,r;const n=[];let o=Oo(e,"stack");const i=String(e);if(o&&o.startsWith(i)&&(o=o.slice(i.length)),o&&o.split(`
5
- `).forEach(s=>{const a=kE(s)||$E(s)||ME(s)||FE(s);a&&(!a.func&&a.line&&(a.func=Lt),n.push(a))}),n.length>0&&GE()&&e instanceof Error){const s=[];let a=e;for(;(a=Object.getPrototypeOf(a))&&Xu(a);){const u=((t=a.constructor)===null||t===void 0?void 0:t.name)||Lt;s.push(u)}for(let u=s.length-1;u>=0&&((r=n[0])===null||r===void 0?void 0:r.func)===s[u];u--)n.shift()}return{message:Oo(e,"message"),name:Oo(e,"name"),stack:n}}const Yu="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",kt="(?::(\\d+))",xE=new RegExp(`^\\s*at (.*?) ?\\(${Yu}${kt}?${kt}?\\)?\\s*$`,"i"),LE=new RegExp(`\\((\\S*)${kt}${kt}\\)`);function kE(e){const t=xE.exec(e);if(!t)return;const r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,o=LE.exec(t[2]);return n&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{args:r?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||Lt,line:t[3]?+t[3]:void 0,url:r?void 0:t[2]}}const NE=new RegExp(`^\\s*at ?${Yu}${kt}?${kt}??\\s*$`,"i");function $E(e){const t=NE.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:Lt,line:t[2]?+t[2]:void 0,url:t[1]}}const PE=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function ME(e){const t=PE.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Lt,line:+t[3],url:t[2]}}const DE=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,UE=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function FE(e){const t=DE.exec(e);if(!t)return;const r=t[3]&&t[3].indexOf(" > eval")>-1,n=UE.exec(t[3]);return r&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||Lt,line:t[4]?+t[4]:void 0,url:t[3]}}function Oo(e,t){if(typeof e!="object"||!e||!(t in e))return;const r=e[t];return typeof r=="string"?r:void 0}function VE(e,t,r,n){if(t===void 0)return;const{name:o,message:i}=BE(e);return{name:o,message:i,stack:[{url:t,column:n,line:r}]}}const jE=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function BE(e){let t,r;return{}.toString.call(e)==="[object String]"&&([,t,r]=jE.exec(e)),{name:t,message:r}}function Xu(e){return String(e.constructor).startsWith("class ")}let Mr;function GE(){if(Mr!==void 0)return Mr;class e extends Error{constructor(){super(),this.name="Error"}}const[t,r]=[e,Error].map(n=>new n);return Mr=Xu(Object.getPrototypeOf(t))&&r.stack!==t.stack,Mr}function Nt(e){const r=new Error(e);r.name="HandlingStack";let n;return Oe(()=>{const o=_r(r);o.stack=o.stack.slice(2),n=br(o)}),n}function br(e){let t=Ju(e);return e.stack.forEach(r=>{const n=r.func==="?"?"<anonymous>":r.func,o=r.args&&r.args.length>0?`(${r.args.join(", ")})`:"",i=r.line?`:${r.line}`:"",s=r.line&&r.column?`:${r.column}`:"";t+=`
6
- at ${n}${o} @ ${r.url}${i}${s}`}),t}function Ju(e){return`${e.name||"Error"}: ${e.message}`}function Ee(e,t,r,{computeHandlingStack:n}={}){let o=e[t];if(typeof o!="function")if(t in e&&typeof t=="string"&&t.startsWith("on"))o=k;else return{stop:k};let i=!1;const s=function(){if(i)return o.apply(this,arguments);const a=Array.from(arguments);let u;Oe(r,null,[{target:this,parameters:a,onPostCall:l=>{u=l},handlingStack:n?Nt("instrumented method"):void 0}]);const c=o.apply(this,a);return u&&Oe(u,null,[c]),c};return e[t]=s,{stop:()=>{i=!0,e[t]===s&&(e[t]=o)}}}function KC(e,t,r){const n=Object.getOwnPropertyDescriptor(e,t);if(!n||!n.set||!n.configurable)return{stop:k};const o=k;let i=(a,u)=>{J(()=>{i!==o&&r(a,u)},0)};const s=function(a){n.set.call(this,a),i(this,a)};return Object.defineProperty(e,t,{set:s}),{stop:()=>{var a;((a=Object.getOwnPropertyDescriptor(e,t))===null||a===void 0?void 0:a.set)===s&&Object.defineProperty(e,t,n),i=o}}}const Xe=1024,Zu=1024*Xe,zE=/[^\u0000-\u007F]/;function Qu(e){return zE.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function el(e){if(e.length===1)return e[0];const t=e.reduce((o,i)=>o+i.length,0),r=new Uint8Array(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return r}function $t(e,t,r){if(typeof e!="object"||e===null)return JSON.stringify(e);const n=It(Object.prototype),o=It(Array.prototype),i=It(Object.getPrototypeOf(e)),s=It(e);try{return JSON.stringify(e,t,r)}catch(a){return"<error: unable to serialize object>"}finally{n(),o(),i(),s()}}function It(e){const t=e,r=t.toJSON;return r?(delete t.toJSON,()=>{t.toJSON=r}):k}const KE=220*Xe,HE="$",WE=3;function $(e,t=KE){const r=It(Object.prototype),n=It(Array.prototype),o=[],i=new WeakMap,s=Ao(e,HE,void 0,o,i),a=JSON.stringify(s);let u=a?a.length:0;if(u>t){Co(t,"discarded",e);return}for(;o.length>0&&u<t;){const c=o.shift();let l=0;if(Array.isArray(c.source))for(let d=0;d<c.source.length;d++){const f=Ao(c.source[d],c.path,d,o,i);if(f!==void 0?u+=JSON.stringify(f).length:u+=4,u+=l,l=1,u>t){Co(t,"truncated",e);break}c.target[d]=f}else for(const d in c.source)if(Object.prototype.hasOwnProperty.call(c.source,d)){const f=Ao(c.source[d],c.path,d,o,i);if(f!==void 0&&(u+=JSON.stringify(f).length+l+d.length+WE,l=1),u>t){Co(t,"truncated",e);break}c.target[d]=f}}return r(),n(),s}function Ao(e,t,r,n,o){const i=XE(e);if(!i||typeof i!="object")return qE(i);const s=fi(i);if(s!=="[Object]"&&s!=="[Array]"&&s!=="[Error]")return s;const a=e;if(o.has(a))return`[Reference seen at ${o.get(a)}]`;const u=r!==void 0?`${t}.${r}`:t,c=Array.isArray(i)?[]:{};return o.set(a,u),n.push({source:i,target:c,path:u}),c}function qE(e){return typeof e=="bigint"?`[BigInt] ${e.toString()}`:typeof e=="function"?`[Function] ${e.name||"unknown"}`:typeof e=="symbol"?`[Symbol] ${e.description||e.toString()}`:e}function fi(e){try{if(e instanceof Event)return YE(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;const r=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(r&&r[1])return`[${r[1]}]`}catch(t){}return"[Unserializable]"}function YE(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?fi(e.currentTarget):null,target:e.target?fi(e.target):null}}function XE(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch(r){}return e}function Co(e,t,r){w.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,r)}const tl="No stack, consider using an instance of Error";function rl({originalError:e,stackTrace:t,source:r,useFallbackStack:n=!0,nonErrorPrefix:o}){const i=Je(e);return!t&&i&&(t=_r(e)),{source:r,type:t?t.name:void 0,message:JE(t,i,o,e),stack:t?br(t):n?tl:void 0}}function Cn({stackTrace:e,originalError:t,handlingStack:r,componentStack:n,startClocks:o,nonErrorPrefix:i,useFallbackStack:s=!0,source:a,handling:u}){const c=rl({originalError:t,stackTrace:e,source:a,useFallbackStack:s,nonErrorPrefix:i});return W(y({startClocks:o,handling:u,handlingStack:r,componentStack:n,originalError:t},c),{causes:Je(t)?tS(t,a):void 0,fingerprint:ZE(t),context:QE(t)})}function JE(e,t,r,n){return e!=null&&e.message&&(e!=null&&e.name)?e.message:t?"Empty message":r?`${r} ${$t($(n))}`:$t($(n))}function ZE(e){return Je(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function QE(e){if(e!==null&&typeof e=="object"&&"dd_context"in e)return e.dd_context}function eS(e){var t;return(t=/@ (.+)/.exec(e))===null||t===void 0?void 0:t[1]}function Je(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function tS(e,t){const r=[];let n=e.cause;for(;n!=null&&r.length<10;){const o=rl({originalError:n,source:t,useFallbackStack:!1});r.push(o),n=Je(n)?n.cause:void 0}return r.length?r:void 0}const ae={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function rS(){return new x(e=>{const t=(o,i)=>{const s=Cn({stackTrace:i,originalError:o,startClocks:H(),nonErrorPrefix:"Uncaught",source:ae.SOURCE,handling:"unhandled"});e.notify(s)},{stop:r}=nS(t),{stop:n}=oS(t);return()=>{r(),n()}})}function nS(e){return Ee(ue(),"onerror",({parameters:[t,r,n,o,i]})=>{let s;Je(i)||(s=VE(t,r,n,o)),e(i!=null?i:t,s)})}function oS(e){return Ee(ue(),"onunhandledrejection",({parameters:[t]})=>{e(t.reason||"Empty reason")})}function nl(e){const t=y({version:"6.25.2",onReady(r){r()}},e);return Object.defineProperty(t,"_setDebug",{get(){return Sy},enumerable:!1}),t}function ol(e,t,r){const n=e[t];n&&!n.q&&n.version&&w.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=r,n&&n.q&&n.q.forEach(o=>bu(o,"onReady callback threw an error:")())}function Rn(e,t){t.silentMultipleInit||w.error(`${e} is already initialized.`)}function U(e,t,r,n,o){return Ke(e,t,[r],n,o)}function Ke(e,t,r,n,{once:o,capture:i,passive:s}={}){const a=T(f=>{!f.isTrusted&&!f.__ddIsTrusted&&!e.allowUntrustedEvents||(o&&d(),n(f))}),u=s?{capture:i,passive:s}:i,c=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,l=Be(c,"addEventListener");r.forEach(f=>l.call(t,f,a,u));function d(){const f=Be(c,"removeEventListener");r.forEach(p=>f.call(t,p,a,u))}return{stop:d}}const Pt={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function il(e,t){const r=[];t.includes(Pt.cspViolation)&&r.push(sS(e));const n=t.filter(o=>o!==Pt.cspViolation);return n.length&&r.push(iS(n)),Su(...r)}function iS(e){return new x(t=>{if(!window.ReportingObserver)return;const r=T((o,i)=>o.forEach(s=>t.notify(aS(s)))),n=new window.ReportingObserver(r,{types:e,buffered:!0});return n.observe(),()=>{n.disconnect()}})}function sS(e){return new x(t=>{const{stop:r}=U(e,document,"securitypolicyviolation",n=>{t.notify(cS(n))});return r})}function aS(e){const{type:t,body:r}=e;return sl({type:r.id,message:`${t}: ${r.message}`,originalError:e,stack:al(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)})}function cS(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return sl({type:e.effectiveDirective,message:`${Pt.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:al(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${Sn(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function sl(e){return y({startClocks:H(),source:ae.REPORT,handling:"unhandled"},e)}function al(e,t,r,n,o){return r?br({name:e,message:t,stack:[{func:"?",url:r,line:n!=null?n:void 0,column:o!=null?o:void 0}]}):void 0}const uS=200;function Wi(e){const{env:t,service:r,version:n,datacenter:o,sdkVersion:i,variant:s}=e,a=[tt("sdk_version",i!=null?i:"6.25.2")];return t&&a.push(tt("env",t)),r&&a.push(tt("service",r)),n&&a.push(tt("version",n)),o&&a.push(tt("datacenter",o)),s&&a.push(tt("variant",s)),a}function tt(e,t){const r=t?`${e}:${t}`:e;return(r.length>uS||lS(r))&&w.warn(`Tag ${r} doesn't meet tag requirements and will be sanitized. ${Bi} ${mn}/getting_started/tagging/#defining-tags`),cl(r)}function cl(e){return e.replace(/,/g,"_")}function lS(e){return dS()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function dS(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch(e){return!1}}function qi(e,t){const r=ge.__ddBrowserSdkExtensionCallback;r&&r({type:e,payload:t})}function cn(e,t,r=fS()){if(t===void 0)return e;if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const o=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,o)}if(r.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){const o=Array.isArray(e)?e:[];for(let i=0;i<t.length;++i)o[i]=cn(o[i],t[i],r);return o}const n=ft(e)==="object"?e:{};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=cn(n[o],t[o],r));return n}function xn(e){return cn(void 0,e)}function fe(...e){let t;for(const r of e)r!=null&&(t=cn(t,r));return t}function fS(){if(typeof WeakSet!="undefined"){const t=new WeakSet;return{hasAlreadyBeenSeen(r){const n=t.has(r);return n||t.add(r),n}}}const e=[];return{hasAlreadyBeenSeen(t){const r=e.indexOf(t)>=0;return r||e.push(t),r}}}function ul(){var e;const t=ge.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:(e=t.connection)===null||e===void 0?void 0:e.effectiveType}}function ll(e){return e>=500}function pS(e){try{return e.clone()}catch(t){return}}const vS=80*Xe,hS=32,dl=20*Zu,gS=se,fl=Q;function pl(e,t,r,n,o,i){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?hl(e,t,r,i,{onSuccess:()=>gl(0,t,r,n,o,i),onFailure:()=>{t.queuedPayloads.enqueue(e)||i.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e}),vl(t,r,n,o,i)}}):t.queuedPayloads.enqueue(e)||i.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e})}function vl(e,t,r,n,o){e.transportStatus===2&&J(()=>{const i=e.queuedPayloads.first();hl(i,e,t,o,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=fl,gl(1,e,t,r,n,o)},onFailure:()=>{e.currentBackoffTime=Math.min(gS,e.currentBackoffTime*2),vl(e,t,r,n,o)}})},e.currentBackoffTime)}function hl(e,t,r,n,{onSuccess:o,onFailure:i}){t.bandwidthMonitor.add(e),r(e,s=>{t.bandwidthMonitor.remove(e),mS(s)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:s.status},n.notify({type:"failure",bandwidth:t.bandwidthMonitor.stats(),payload:e}),i()):(t.transportStatus=0,n.notify({type:"success",bandwidth:t.bandwidthMonitor.stats(),payload:e}),o())})}function gl(e,t,r,n,o,i){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:`Reached max ${n} events size queued for upload: ${dl/Zu}MiB`,source:ae.AGENT,startClocks:H()}),t.queueFullReported=!0);const s=t.queuedPayloads;for(t.queuedPayloads=ml();s.size()>0;)pl(s.dequeue(),t,r,n,o,i)}function mS(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||ll(e.status))}function _S(){return{transportStatus:0,currentBackoffTime:fl,bandwidthMonitor:bS(),queuedPayloads:ml(),queueFullReported:!1}}function ml(){const e=[];return{bytesCount:0,enqueue(t){return this.isFull()?!1:(e.push(t),this.bytesCount+=t.bytesCount,!0)},first(){return e[0]},dequeue(){const t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=dl}}}function bS(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=vS&&this.ongoingRequestCount<hS},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}const pi=16*Xe;function Yi(e,t,r=pi){const n=new x,o=_S();return{observable:n,send:i=>{for(const s of e)pl(i,o,(a,u)=>{mr(ze.AVOID_FETCH_KEEPALIVE)?un(s,a,u):SS(s,r,a,u)},s.trackType,t,n)},sendOnExit:i=>{for(const s of e)yS(s,r,i)}}}function yS(e,t,r){if(!!navigator.sendBeacon&&r.bytesCount<t)try{const o=e.build("beacon",r);if(navigator.sendBeacon(o,r.data))return}catch(o){ES(o)}un(e,r)}let Sa=!1;function ES(e){Sa||(Sa=!0,Ge(e))}function SS(e,t,r,n){if(TS()&&r.bytesCount<t){const i=e.build("fetch-keepalive",r);fetch(i,{method:"POST",body:r.data,keepalive:!0,mode:"cors"}).then(T(s=>n==null?void 0:n({status:s.status,type:s.type}))).catch(T(()=>un(e,r,n)))}else un(e,r,n)}function un(e,t,r){const n=e.build("fetch",t);fetch(n,{method:"POST",body:t.data,mode:"cors"}).then(T(o=>r==null?void 0:r({status:o.status,type:o.type}))).catch(T(()=>r==null?void 0:r({status:0})))}function TS(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}function Bt(){const e=wS();if(e)return{getCapabilities(){var t;return JSON.parse(((t=e.getCapabilities)===null||t===void 0?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return(t=e.getPrivacyLevel)===null||t===void 0?void 0:t.call(e)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,r,n){const o=n?{id:n}:void 0;e.send(JSON.stringify({eventType:t,event:r,view:o}))}}}function _l(e){const t=Bt();return!!t&&t.getCapabilities().includes(e)}function Ce(e){var t;e===void 0&&(e=(t=ue().location)===null||t===void 0?void 0:t.hostname);const r=Bt();return!!r&&r.getAllowedWebViewHosts().some(n=>e===n||e.endsWith(`.${n}`))}function wS(){return ue().DatadogEventBridge}const Ot={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function bl(e){return new x(t=>{const{stop:r}=Ke(e,window,["visibilitychange","freeze"],o=>{o.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:Ot.HIDDEN}):o.type==="freeze"&&t.notify({reason:Ot.FROZEN})},{capture:!0}),n=U(e,window,"beforeunload",()=>{t.notify({reason:Ot.UNLOADING})}).stop;return()=>{r(),n()}})}function IS(e){return an(Ot).includes(e)}const Ta=256*Xe;function Xi({encoder:e,request:t,flushController:r}){let n={};const o=r.flushObservable.subscribe(l=>c(l));function i(l,d,f){r.notifyBeforeAddMessage(d),f!==void 0?(n[f]=l,r.notifyAfterAddMessage()):e.write(e.isEmpty?l:`
7
- ${l}`,p=>{r.notifyAfterAddMessage(p-d)})}function s(l){return l!==void 0&&n[l]!==void 0}function a(l){const d=n[l];delete n[l];const f=e.estimateEncodedBytesCount(d);r.notifyAfterRemoveMessage(f)}function u(l,d){const f=$t(l),p=e.estimateEncodedBytesCount(f);if(p>=Ta){w.warn(`Discarded a message whose size was bigger than the maximum allowed size ${Ta/Xe}KiB. ${Bi} ${by}/#technical-limitations`);return}s(d)&&a(d),i(f,p,d)}function c(l){const d=an(n).join(`
8
- `);n={};const f=IS(l.reason),p=f?t.sendOnExit:t.send;if(f&&e.isAsync){const v=e.finishSync();v.outputBytesCount&&p(wa(v));const h=[v.pendingData,d].filter(Boolean).join(`
9
- `);h&&p({data:h,bytesCount:Qu(h)})}else d&&e.write(e.isEmpty?d:`
10
- ${d}`),e.finish(v=>{p(wa(v))})}return{flushController:r,add:u,upsert:u,stop:o.unsubscribe}}function wa(e){let t;return typeof e.output=="string"?t=e.output:t=new Blob([e.output],{type:"text/plain"}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}const OS=30*Q,AS=dt?1:50;function Ji({pageMayExitObservable:e,sessionExpireObservable:t}){const r=e.subscribe(d=>a(d.reason)),n=t.subscribe(()=>a("session_expire")),o=new x(()=>()=>{r.unsubscribe(),n.unsubscribe()});let i=0,s=0;function a(d){if(s===0)return;const f=s,p=i;s=0,i=0,l(),o.notify({reason:d,messagesCount:f,bytesCount:p})}let u;function c(){u===void 0&&(u=J(()=>{a("duration_limit")},OS))}function l(){de(u),u=void 0}return{flushObservable:o,get messagesCount(){return s},notifyBeforeAddMessage(d){i+d>=pi&&a("bytes_limit"),s+=1,i+=d,c()},notifyAfterAddMessage(d=0){i+=d,s>=AS?a("messages_limit"):i>=pi&&a("bytes_limit")},notifyAfterRemoveMessage(d){i-=d,s-=1,s===0&&l()}}}const me="DISCARDED",q="SKIPPED";function yl(){const e={};return{register(t,r){return e[t]||(e[t]=[]),e[t].push(r),{unregister:()=>{e[t]=e[t].filter(n=>n!==r)}}},triggerHook(t,r){const n=e[t]||[],o=[];for(const i of n){const s=i(r);if(s===me)return me;s!==q&&o.push(s)}return fe(...o)}}}const je={LOG:"log",CONFIGURATION:"configuration",USAGE:"usage"},CS=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],RS=1,xS=[_E],LS=15;let Ro;function Gt(){return Ro||(Ro=new Tu(100)),Ro}function El(e,t,r,n,o,i){const s=new x,{stop:a}=NS(t,n,o,i,s),{enabled:u,metricsEnabled:c}=kS(e,t,r,s);return{stop:a,enabled:u,metricsEnabled:c}}function kS(e,t,r,n,o=RS,i=LS){const s={},a=!xS.includes(t.site)&&Ue(t.telemetrySampleRate),u={[je.LOG]:a,[je.CONFIGURATION]:a&&Ue(t.telemetryConfigurationSampleRate),[je.USAGE]:a&&Ue(t.telemetryUsageSampleRate),metric:a&&Ue(o)},c=$S(),l=Gt();return l.subscribe(({rawEvent:f,metricName:p})=>{if(p&&!u.metric||!u[f.type])return;const v=p||f.status||f.type;let h=s[v];if(h||(h=s[v]=new Set),h.size>=i)return;const m=$t(f);if(h.has(m))return;const E=r.triggerHook(1,{startTime:H().relative});if(E===me)return;const S=d(E,e,f,c);n.notify(S),qi("telemetry",S),h.add(m)}),l.unbuffer(),Ey(Zi),{enabled:a,metricsEnabled:u.metric};function d(f,p,v,h){const E={type:"telemetry",date:H().timeStamp,service:p,version:"6.25.2",source:"browser",_dd:{format_version:2},telemetry:fe(v,{runtime_env:h,connectivity:ul(),sdk_setup:"npm"}),ddtags:Wi(t).join(","),experimental_features:Array.from(RE())};return fe(E,f)}}function NS(e,t,r,n,o){const i=[];if(Ce()){const s=Bt(),a=o.subscribe(u=>s.send("internal_telemetry",u));i.push(a.unsubscribe)}else{const s=[e.rumEndpointBuilder];e.replica&&PS(e)&&s.push(e.replica.rumEndpointBuilder);const a=Xi({encoder:n(4),request:Yi(s,t),flushController:Ji({pageMayExitObservable:r,sessionExpireObservable:new x})});i.push(a.stop);const u=o.subscribe(a.add);i.push(u.unsubscribe)}return{stop:()=>i.forEach(s=>s())}}function $S(){var e;return{is_local_file:((e=ge.location)===null||e===void 0?void 0:e.protocol)==="file:",is_worker:dt}}function PS(e){return e.site===Gu}function zt(e,t){ci(F.debug,e,t),Gt().notify({rawEvent:y({type:je.LOG,message:e,status:"debug"},t)})}function Zi(e,t){Gt().notify({rawEvent:y(y({type:je.LOG,status:"error"},MS(e)),t)})}function Sl(e){Gt().notify({rawEvent:{type:je.CONFIGURATION,configuration:e}})}function Ln(e,t){Gt().notify({rawEvent:y({type:je.LOG,message:e,status:"debug"},t),metricName:e})}function G(e){Gt().notify({rawEvent:{type:je.USAGE,usage:e}})}function MS(e){if(Je(e)){const t=_r(e);return{error:{kind:t.name,stack:br(DS(t))},message:t.message}}return{error:{stack:tl},message:`Uncaught ${$t(e)}`}}function DS(e){return e.stack=e.stack.filter(t=>!t.url||CS.some(r=>t.url.startsWith(r))),e}function US(e){const t=new Set;return e.forEach(r=>t.add(r)),Array.from(t)}function Tl(e,t){const r=e.indexOf(t);r>=0&&e.splice(r,1)}function at(e){return Array.isArray(e)&&e.length>0}const Dr=1/0,FS=se;let Jt=null;const qr=new Set;function VS(){qr.forEach(e=>e())}function pt({expireDelay:e,maxEntries:t}){let r=[];Jt||(Jt=jt(()=>VS(),FS));const n=()=>{const l=ce()-e;for(;r.length>0&&r[r.length-1].endTime<l;)r.pop()};qr.add(n);function o(l,d){const f={value:l,startTime:d,endTime:Dr,remove:()=>{Tl(r,f)},close:p=>{f.endTime=p}};return t&&r.length>=t&&r.pop(),r.unshift(f),f}function i(l=Dr,d={returnInactive:!1}){for(const f of r)if(f.startTime<=l){if(d.returnInactive||l<=f.endTime)return f.value;break}}function s(l){const d=r[0];d&&d.endTime===Dr&&d.close(l)}function a(l=Dr,d=0){const f=qe(l,d);return r.filter(p=>p.startTime<=f&&l<=p.endTime).map(p=>p.value)}function u(){r=[]}function c(){qr.delete(n),qr.size===0&&Jt&&(_n(Jt),Jt=null)}return{add:o,find:i,closeActive:s,findAll:a,reset:u,stop:c}}const jS="datadog-synthetics-public-id",BS="datadog-synthetics-result-id",GS="datadog-synthetics-injects-rum";function kn(){return dt?!1:!!(ge._DATADOG_SYNTHETICS_INJECTS_RUM||Fe(GS))}function wl(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||Fe(jS);return typeof e=="string"?e:void 0}function Il(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||Fe(BS);return typeof e=="string"?e:void 0}function Ol(){return!!(wl()&&Il())}const zS=se,KS=Ye;function Al(e,t,r,n){const o=new x,i=new x,s=lE(e.sessionStoreStrategyType,e,t,r),a=pt({expireDelay:KS});if(s.renewObservable.subscribe(()=>{a.add(u(),ce()),o.notify()}),s.expireObservable.subscribe(()=>{i.notify(),a.closeActive(ce())}),s.expandOrRenewSession(),a.add(u(),Ou().relative),mr(ze.SHORT_SESSION_INVESTIGATION)){const c=s.getSession();c&&XS(e,c)}n.observable.subscribe(()=>{n.isGranted()?s.expandOrRenewSession():s.expire(!1)}),HS(e,()=>{n.isGranted()&&s.expandOrRenewSession()}),WS(e,()=>s.expandSession()),qS(e,()=>s.restartSession());function u(){const c=s.getSession();return c?{id:c.id,trackingType:c[t],isReplayForced:!!c.forcedReplay,anonymousId:c.anonymousId}:(YS(e).catch(()=>{}),{id:"invalid",trackingType:ku,isReplayForced:!1,anonymousId:void 0})}return{findSession:(c,l)=>a.find(c,l),renewObservable:o,expireObservable:i,sessionStateUpdateObservable:s.sessionStateUpdateObservable,expire:s.expire,updateSessionState:s.updateSessionState}}function HS(e,t){const{stop:r}=Ke(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function WS(e,t){const r=()=>{document.visibilityState==="visible"&&t()},{stop:n}=U(e,document,"visibilitychange",r);jt(r,zS)}function qS(e,t){const{stop:r}=U(e,window,"resume",t,{capture:!0})}async function YS(e){const t=e.sessionStoreStrategyType;if(!t)return;let r,n;t.type===xt.COOKIE?(r=Mu(t.cookieOptions,e),n={cookie:await Cl(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):r=Fu(),zt("Unexpected session state",y({sessionStoreStrategyType:t.type,session:r,isSyntheticsTest:Ol(),createdTimestamp:r==null?void 0:r.created,expireTimestamp:r==null?void 0:r.expire},n))}function XS(e,t){if(!window.cookieStore||!t.created)return;const r=Number(t.created),n=re(),{stop:o}=U(e,cookieStore,"change",i);function i(s){const a=xu(s.changed,c=>c.name===Ae);if(!a)return;const u=re()-r;if(u>14*se)o();else{const c=On(a.value);if(c.id&&c.id!==t.id){o();const l=re()-n;Cl().then(d=>{zt("Session cookie changed",{time:l,session_age:u,old:t,new:c,cookie:d})}).catch(Ge)}}}}async function Cl(){let e;return"cookieStore"in window?e=await window.cookieStore.getAll(Ae):e=document.cookie.split(/\s*;\s*/).filter(t=>t.startsWith(Ae)),y({count:e.length,domain:Ru()||"undefined"},e)}function Qi(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(r,n){const o=Qu(r);t+=o,e+=r,n&&n(o)},finish(r){r(this.finishSync())},finishSync(){const r={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,r},estimateEncodedBytesCount(r){return r.length}}}class Rl{constructor(){this.callbacks={}}notify(t,r){const n=this.callbacks[t];n&&n.forEach(o=>o(r))}subscribe(t,r){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(r),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(n=>r!==n)}}}}const JS=3e3;function Yr(e,t,r=JS){let n=0,o=!1;return{isLimitReached(){if(n===0&&J(()=>{n=0},se),n+=1,n<=r||o)return o=!1,!1;if(n===r+1){o=!0;try{t({message:`Reached max number of ${e}s by minute: ${r}`,source:ae.AGENT,startClocks:H()})}finally{o=!1}}return!0}}}function es(e,t,r){return document.readyState===t||document.readyState==="complete"?(r(),{stop:k}):U(e,window,t==="complete"?"load":"DOMContentLoaded",r,{once:!0})}function ZS(e,t){return new Promise(r=>{es(e,t,r)})}let xo;const ts=new WeakMap;function xl(e){return xo||(xo=QS(e)),xo}function QS(e){return new x(t=>{const{stop:r}=Ee(XMLHttpRequest.prototype,"open",eT),{stop:n}=Ee(XMLHttpRequest.prototype,"send",i=>{tT(i,e,t)},{computeHandlingStack:!0}),{stop:o}=Ee(XMLHttpRequest.prototype,"abort",rT);return()=>{r(),n(),o()}})}function eT({target:e,parameters:[t,r]}){ts.set(e,{state:"open",method:String(t).toUpperCase(),url:Gi(String(r))})}function tT({target:e,parameters:[t],handlingStack:r},n,o){const i=ts.get(e);if(!i)return;const s=i;s.state="start",s.startClocks=H(),s.isAborted=!1,s.xhr=e,s.handlingStack=r,s.requestBody=t;let a=!1;const{stop:u}=Ee(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(l(),u(),a)return;a=!0;const d=i;d.state="complete",d.duration=B(s.startClocks.timeStamp,j()),d.status=e.status,typeof e.response=="string"&&(d.responseBody=e.response),o.notify(sr(d))},{stop:l}=U(n,e,"loadend",c);o.notify(s)}function rT({target:e}){const t=ts.get(e);t&&(t.isAborted=!0)}async function nT(e,t){const r=e.getReader(),n=[];for(;;){const o=await r.read();if(o.done)break;t.collectStreamBody&&n.push(o.value)}return r.cancel().catch(k),t.collectStreamBody?el(n):void 0}let Lo;const Ll=[];function Nn({responseBodyAction:e}={}){return e&&Ll.push(e),Lo||(Lo=oT()),Lo}function oT(){return new x(e=>{if(!ge.fetch)return;const{stop:t}=Ee(ge,"fetch",r=>iT(r,e),{computeHandlingStack:!0});return t})}function iT({parameters:e,onPostCall:t,handlingStack:r},n){const[o,i]=e;let s=i&&i.method;s===void 0&&o instanceof Request&&(s=o.method);const a=s!==void 0?String(s).toUpperCase():"GET",u=o instanceof Request?o.url:Gi(String(o)),c=H(),l={state:"start",init:i,input:o,method:a,startClocks:c,url:u,handlingStack:r};n.notify(l),e[0]=l.input,e[1]=l.init,t(d=>{sT(n,d,l).catch(Ge)})}async function sT(e,t,r){var n,o;const i=r;i.state="resolve";let s;try{s=await t}catch(u){i.status=0,i.isAborted=((o=(n=i.init)===null||n===void 0?void 0:n.signal)===null||o===void 0?void 0:o.aborted)||u instanceof DOMException&&u.code===DOMException.ABORT_ERR,i.error=u,e.notify(i);return}i.response=s,i.status=s.status,i.responseType=s.type,i.isAborted=!1;const a=Ll.reduce((u,c)=>Math.max(u,c(i)),0);if(a!==0){const u=pS(s);if(u&&u.body)try{const c=await nT(u.body,{collectStreamBody:a===2});i.responseBody=c&&new TextDecoder().decode(c)}catch(c){}}e.notify(i)}function aT(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const r=window.requestIdleCallback(T(e),t);return()=>window.cancelIdleCallback(r)}return uT(e)}const cT=50;function uT(e){const t=re(),r=J(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,cT-(re()-t))})},0);return()=>de(r)}const lT=Q,dT=30;function fT(){const e=[];function t(n){let o;if(n.didTimeout){const i=performance.now();o=()=>dT-(performance.now()-i)}else o=n.timeRemaining.bind(n);for(;o()>0&&e.length;)e.shift()();e.length&&r()}function r(){aT(t,{timeout:lT})}return{push(n){e.push(n)===1&&r()},stop(){e.length=0}}}let ko={};function kl(e){const t=e.map(r=>(ko[r]||(ko[r]=pT(r)),ko[r]));return Su(...t)}function pT(e){return new x(t=>{const r=ye[e];return ye[e]=(...n)=>{r.apply(console,n);const o=Nt("console error");Oe(()=>{t.notify(vT(n,e,o))})},()=>{ye[e]=r}})}function vT(e,t,r){const n=e.map(o=>hT(o)).join(" ");if(t===F.error){const o=e.find(Je),i=Cn({originalError:o,handlingStack:r,startClocks:H(),source:ae.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return i.message=n,{api:t,message:n,handlingStack:r,error:i}}return{api:t,message:n,error:void 0,handlingStack:r}}function hT(e){return typeof e=="string"?$(e):Je(e)?Ju(_r(e)):$t($(e),void 0,2)}const gT=500;function Nl(){const e=[];return{add:o=>{e.push(o)>gT&&e.splice(0,1)},remove:o=>{Tl(e,o)},drain:o=>{e.forEach(i=>i(o)),e.length=0}}}function mT(e){const t=ft(e)==="object";return t||w.error("Unsupported context:",e),t}function No(e,t,r){const n=y({},e);for(const[o,{required:i,type:s}]of Object.entries(t))s==="string"&&!Ia(n[o])&&(n[o]=String(n[o])),i&&Ia(n[o])&&w.warn(`The property ${o} of ${r} is required; context will not be sent to the intake.`);return n}function Ia(e){return e==null||e===""}function yr(e="",{propertiesConfig:t={}}={}){let r={};const n=new x,o={getContext:()=>xn(r),setContext:i=>{mT(i)?r=$(No(i,t,e)):o.clearContext(),n.notify()},setContextProperty:(i,s)=>{r=$(No(W(y({},r),{[i]:s}),t,e)),n.notify()},removeContextProperty:i=>{delete r[i],No(r,t,e),n.notify()},clearContext:()=>{r={},n.notify()},changeObservable:n};return o}function P(e,t,r,n){return T((...o)=>(n&&G({feature:n}),e()[t][r](...o)))}function $o(e,t,r){e.changeObservable.subscribe(()=>{const n=e.getContext();r.add(o=>o[t].setContext(n))})}const _T="_dd_c",bT=[];function rs(e,t,r,n){const o=yT(r,n);bT.push(U(e,window,"storage",({key:c})=>{o===c&&s()})),t.changeObservable.subscribe(a);const i=fe(u(),t.getContext());We(i)||t.setContext(i);function s(){t.setContext(u())}function a(){localStorage.setItem(o,JSON.stringify(t.getContext()))}function u(){const c=localStorage.getItem(o);return c?JSON.parse(c):{}}}function yT(e,t){return`${_T}_${e}_${t}`}function $l(e,t,r){const n=ns();return t.storeContextsAcrossPages&&rs(t,n,r,4),e.register(0,()=>{const o=n.getContext();return We(o)||!o.id?q:{account:o}}),n}function ns(){return yr("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function Pl(e,t,r,n){const o=os();return t.storeContextsAcrossPages&&rs(t,o,r,2),e.register(0,()=>{const i=o.getContext();return n?{context:i}:i}),o}function os(){return yr("global context")}function Ml(e,t,r,n){const o=is();return t.storeContextsAcrossPages&&rs(t,o,n,1),e.register(0,({eventType:i,startTime:s})=>{const a=o.getContext(),u=r.findTrackedSession(s);return u&&u.anonymousId&&!a.anonymous_id&&t.trackAnonymousUser&&(a.anonymous_id=u.anonymousId),We(a)?q:{type:i,usr:a}}),e.register(1,({startTime:i})=>{var s;return{anonymous_id:(s=r.findTrackedSession(i))===null||s===void 0?void 0:s.anonymousId}}),o}function is(){return yr("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}const L={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},M={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"},te={DOCUMENT:"document",XHR:"xhr",BEACON:"beacon",FETCH:"fetch",CSS:"css",JS:"js",IMAGE:"image",FONT:"font",MEDIA:"media",OTHER:"other"},ut={FETCH:te.FETCH,XHR:te.XHR},ET=500;function Dl(e=rS){const t=new Tu(ET),r=e().subscribe(n=>{t.notify({type:0,error:n})});return{observable:t,stop:()=>{r.unsubscribe()}}}function ST(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}const A={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",VITAL:"vital"},Oa={LONG_TASK:"long-task",LONG_ANIMATION_FRAME:"long-animation-frame"},Ie={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change",BF_CACHE:"bf_cache"},ss={CLICK:"click",CUSTOM:"custom"},Zt={RAGE_CLICK:"rage_click",ERROR_CLICK:"error_click",DEAD_CLICK:"dead_click"},ur={DURATION:"duration",OPERATION_STEP:"operation_step"};function TT(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function wT(e,t,r){function n(s){return!t.wasInPageStateDuringPeriod("frozen",s.startClocks.relative,s.duration)}function o(s){n(s)&&e.notify(12,Aa(s))}function i(s,a,u,c){if(!mr(ze.FEATURE_OPERATION_VITAL))return;const{operationKey:l,context:d,description:f}=u||{},p={name:s,type:ur.OPERATION_STEP,operationKey:l,failureReason:c,stepType:a,startClocks:H(),context:$(d),description:f};e.notify(12,Aa(p))}return{addOperationStepVital:i,addDurationVital:o,startDurationVital:(s,a={})=>Ul(r,s,a),stopDurationVital:(s,a={})=>{Fl(o,r,s,a)}}}function Ul({vitalsByName:e,vitalsByReference:t},r,n={}){const o=y({name:r,startClocks:H()},n),i={__dd_vital_reference:!0};return e.set(r,o),t.set(i,o),i}function Fl(e,{vitalsByName:t,vitalsByReference:r},n,o={}){const i=typeof n=="string"?t.get(n):r.get(n);i&&(e(IT(i,i.startClocks,o,H())),typeof n=="string"?t.delete(n):r.delete(n))}function IT(e,t,r,n){var o;return{name:e.name,type:ur.DURATION,startClocks:t,duration:B(t.timeStamp,n.timeStamp),context:fe(e.context,r.context),description:(o=r.description)!==null&&o!==void 0?o:e.description}}function Aa(e){const{startClocks:t,type:r,name:n,description:o,context:i}=e,s=y({id:oe(),type:r,name:n,description:o},r===ur.DURATION?{duration:O(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason});return{rawRumEvent:{date:t.timeStamp,vital:s,type:A.VITAL,context:i},startTime:t.relative,duration:r===ur.DURATION?e.duration:void 0,domainContext:{}}}function Vl(e,t,r){if(e)for(const n of e){const o=n[t];o&&o(r)}}const Ca=new Map;function jl(e,t){if(t===100)return!0;if(t===0)return!1;const r=Ca.get(t);if(r&&e===r.sessionId)return r.decision;let n;return window.BigInt?n=OT(BigInt(`0x${e.split("-")[4]}`),t):n=Ue(t),Ca.set(t,{sessionId:e,decision:n}),n}function OT(e,t){const r=BigInt("1111111111111111111"),n=BigInt("0x10000000000000000"),o=e*r%n;return Number(o)<=t/100*Number(n)}function AT(){return Gl(64)}function Bl(){return Gl(63)}function Gl(e){const t=crypto.getRandomValues(new Uint32Array(2));return e===63&&(t[t.length-1]>>>=1),{toString(r=10){let n=t[1],o=t[0],i="";do{const s=n%r*4294967296+o;n=Math.floor(n/r),o=Math.floor(s/r),i=(s%r).toString(r)+i}while(n||o);return i}}}function gt(e){return e.toString(16).padStart(16,"0")}function CT(e){const t=e;return ft(t)==="object"&&cr(t.match)&&Array.isArray(t.propagatorTypes)}function RT(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function xT(e,t,r,n){return{clearTracingIfNeeded:RT,traceFetch:o=>Ra(e,o,t,r,n,i=>{var s;if(o.input instanceof Request&&!(!((s=o.init)===null||s===void 0)&&s.headers))o.input=new Request(o.input),Object.keys(i).forEach(a=>{o.input.headers.append(a,i[a])});else{o.init=sr(o.init);const a=[];o.init.headers instanceof Headers?o.init.headers.forEach((u,c)=>{a.push([c,u])}):Array.isArray(o.init.headers)?o.init.headers.forEach(u=>{a.push(u)}):o.init.headers&&Object.keys(o.init.headers).forEach(u=>{a.push([u,o.init.headers[u]])}),o.init.headers=a.concat(zi(i))}}),traceXhr:(o,i)=>Ra(e,o,t,r,n,s=>{Object.keys(s).forEach(a=>{i.setRequestHeader(a,s[a])})})}}function Ra(e,t,r,n,o,i){const s=r.findTrackedSession();if(!s)return;const a=e.allowedTracingUrls.find(l=>An([l.match],t.url,!0));if(!a)return;const u=jl(s.id,e.traceSampleRate);(u||e.traceContextInjection===di.ALL)&&(t.traceSampled=u,t.traceId=AT(),t.spanId=Bl(),i(LT(t.traceId,t.spanId,t.traceSampled,s.id,a.propagatorTypes,n,o,e)))}function LT(e,t,r,n,o,i,s,a){const u={};if(o.forEach(c=>{switch(c){case"datadog":{Object.assign(u,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":r?"1":"0","x-datadog-trace-id":e.toString()});break}case"tracecontext":{Object.assign(u,{traceparent:`00-0000000000000000${gt(e)}-${gt(t)}-0${r?"1":"0"}`,tracestate:`dd=s:${r?"1":"0"};o:rum`});break}case"b3":{Object.assign(u,{b3:`${gt(e)}-${gt(t)}-${r?"1":"0"}`});break}case"b3multi":{Object.assign(u,{"X-B3-TraceId":gt(e),"X-B3-SpanId":gt(t),"X-B3-Sampled":r?"1":"0"});break}}}),a.propagateTraceBaggage){const c={"session.id":n},l=i.getContext().id;typeof l=="string"&&(c["user.id"]=l);const d=s.getContext().id;typeof d=="string"&&(c["account.id"]=d);const f=Object.entries(c).map(([p,v])=>`${p}=${encodeURIComponent(v)}`).join(",");f&&(u.baggage=f)}return u}const zl=["tracecontext","datadog"];function kT(e,t){var r,n,o,i,s,a,u;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&w.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){w.error("Application ID is not configured, no RUM data will be collected.");return}if(!wt(e.sessionReplaySampleRate,"Session Replay")||!wt(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){w.error("Excluded Activity Urls should be an array");return}const c=NT(e);if(!c)return;const l=Hu(e,t),d=PT(e);if(!l)return;const f=(r=e.sessionReplaySampleRate)!==null&&r!==void 0?r:0;return y({applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:f,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually!==void 0?!!e.startSessionReplayRecordingManually:f===0,traceSampleRate:(n=e.traceSampleRate)!==null&&n!==void 0?n:100,rulePsr:hr(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:c,excludedActivityUrls:(o=e.excludedActivityUrls)!==null&&o!==void 0?o:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(!((i=e.trackUserInteractions)!==null&&i!==void 0)||i),trackViewsManually:!!e.trackViewsManually,trackResources:!!(!((s=e.trackResources)!==null&&s!==void 0)||s),trackLongTasks:!!(!((a=e.trackLongTasks)!==null&&a!==void 0)||a),trackBfcacheViews:!!e.trackBfcacheViews,trackEarlyRequests:!!e.trackEarlyRequests,subdomain:e.subdomain,defaultPrivacyLevel:on(Tt,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:Tt.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,traceContextInjection:on(di,e.traceContextInjection)?e.traceContextInjection:di.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:(u=e.profilingSampleRate)!==null&&u!==void 0?u:0,propagateTraceBaggage:!!e.propagateTraceBaggage,allowedGraphQlUrls:d},l)}function NT(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){w.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){w.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(r=>{cr(r)?t.push({match:r,propagatorTypes:zl}):CT(r)?t.push(r):w.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",r)}),t}function $T(e){const t=new Set;return at(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(r=>{cr(r)?zl.forEach(n=>t.add(n)):ft(r)==="object"&&Array.isArray(r.propagatorTypes)&&r.propagatorTypes.forEach(n=>t.add(n))}),Array.from(t)}function PT(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return w.warn("allowedGraphQlUrls should be an array"),[];const t=[];return e.allowedGraphQlUrls.forEach(r=>{cr(r)?t.push({match:r,trackPayload:!1,trackResponseErrors:!1}):r&&typeof r=="object"&&"match"in r&&cr(r.match)&&t.push({match:r.match,trackPayload:!!r.trackPayload,trackResponseErrors:!!r.trackResponseErrors})}),t}function MT(e){return at(e)&&e.some(t=>typeof t=="object"&&"trackPayload"in t?!!t.trackPayload:!1)}function DT(e){return at(e)&&e.some(t=>typeof t=="object"&&"trackResponseErrors"in t?!!t.trackResponseErrors:!1)}function UT(e){var t;const r=Wu(e);return y({session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:at(e.allowedTracingUrls),use_allowed_graph_ql_urls:at(e.allowedGraphQlUrls),use_track_graph_ql_payload:MT(e.allowedGraphQlUrls),use_track_graph_ql_response_errors:DT(e.allowedGraphQlUrls),selected_tracing_propagators:$T(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:at(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,track_bfcache_views:e.trackBfcacheViews,track_early_requests:e.trackEarlyRequests,plugins:(t=e.plugins)===null||t===void 0?void 0:t.map(n=>{var o;return y({name:n.name},(o=n.getConfigurationTelemetry)===null||o===void 0?void 0:o.call(n))}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:e.remoteConfigurationId,profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy},r)}function FT(e){const t=[];let r=0,n;const o={quote:void 0,escapeSequence:void 0};let i="";for(const s of e){if(n=xa[r].find(a=>KT[a](s,o)),!n)return[];if(o.escapeSequence!==void 0&&n!==12){if(!qT(o.escapeSequence))return[];i+=XT(o.escapeSequence),o.escapeSequence=void 0}HT.includes(n)?i+=s:WT.includes(n)&&i!==""?(t.push(i),i=""):n===12?o.escapeSequence=o.escapeSequence?`${o.escapeSequence}${s}`:s:n===8?o.quote=s:n===9&&(o.quote=void 0),r=n}return xa[r].includes(1)?(i!==""&&t.push(i),t):[]}const VT=/[a-zA-Z_$]/,jT=/[a-zA-Z0-9_$]/,BT=/[0-9]/,GT=/[a-fA-F0-9]/,zT=`'"`,KT={0:()=>!1,1:()=>!1,2:e=>VT.test(e),3:e=>jT.test(e),4:e=>e===".",5:e=>e==="[",6:e=>e==="]",7:e=>BT.test(e),8:e=>zT.includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>e==="\\",12:(e,t)=>t.escapeSequence===void 0?`${t.quote}/\\bfnrtu`.includes(e):t.escapeSequence.startsWith("u")&&t.escapeSequence.length<5?GT.test(e):!1},xa={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]},HT=[2,3,7,10],WT=[4,5,6];function qT(e){return`"'/\\bfnrt`.includes(e)||e.startsWith("u")&&e.length===5}const YT={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:`
11
- `,r:"\r",t:" "};function XT(e){return e.startsWith("u")?String.fromCharCode(parseInt(e.slice(1),16)):YT[e]}const JT="v1",ZT=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function QT(e,t){let r;const n=tw(),o=await iw(e);return o.ok?(n.increment("fetch","success"),r=ew(e,o.value,t,n)):(n.increment("fetch","failure"),w.error(o.error)),Ln("remote configuration metrics",{metrics:n.get()}),r}function ew(e,t,r,n){const o=y({},e);return ZT.forEach(f=>{f in t&&(o[f]=i(t[f]))}),Object.keys(r).forEach(f=>{t[f]!==void 0&&s(r[f],t[f])}),o;function i(f){if(Array.isArray(f))return f.map(i);if(rw(f)){if(nw(f)){const p=f.rcSerializedType;switch(p){case"string":return f.value;case"regex":return Kl(f.value);case"dynamic":return a(f);default:w.error(`Unsupported remote configuration: "rcSerializedType": "${p}"`);return}}return yu(f,i)}return f}function s(f,p){p.forEach(({key:v,value:h})=>{f.setContextProperty(v,i(h))})}function a(f){const p=f.strategy;let v;switch(p){case"cookie":v=u(f);break;case"dom":v=c(f);break;case"js":v=d(f);break;default:w.error(`Unsupported remote configuration: "strategy": "${p}"`);return}const h=f.extractor;return h!==void 0&&typeof v=="string"?ow(h,v):v}function u({name:f}){const p=In(f);return n.increment("cookie",p!==void 0?"success":"missing"),p}function c({selector:f,attribute:p}){let v;try{v=document.querySelector(f)}catch(m){w.error(`Invalid selector in the remote configuration: '${f}'`),n.increment("dom","failure");return}if(!v){n.increment("dom","missing");return}if(l(v,p)){w.error(`Forbidden element selected by the remote configuration: '${f}'`),n.increment("dom","failure");return}const h=p!==void 0?v.getAttribute(p):v.textContent;if(h===null){n.increment("dom","missing");return}return n.increment("dom","success"),h}function l(f,p){return f.getAttribute("type")==="password"&&p==="value"}function d({path:f}){let p=window;const v=FT(f);if(v.length===0){w.error(`Invalid JSON path in the remote configuration: '${f}'`),n.increment("js","failure");return}for(const h of v){if(!(h in p)){n.increment("js","missing");return}try{p=p[h]}catch(m){w.error(`Error accessing: '${f}'`,m),n.increment("js","failure");return}}return n.increment("js","success"),p}}function tw(){const e={fetch:{}};return{get:()=>e,increment:(t,r)=>{e[t]||(e[t]={}),e[t][r]||(e[t][r]=0),e[t][r]=e[t][r]+1}}}function rw(e){return typeof e=="object"&&e!==null}function nw(e){return"rcSerializedType"in e}function Kl(e){try{return new RegExp(e)}catch(t){w.error(`Invalid regex in the remote configuration: '${e}'`)}}function ow(e,t){const r=Kl(e.value);if(r===void 0)return;const n=r.exec(t);if(n===null)return;const[o,i]=n;return i||o}async function iw(e){let t;try{t=await fetch(sw(e))}catch(n){t=void 0}if(!t||!t.ok)return{ok:!1,error:new Error("Error fetching the remote configuration.")};const r=await t.json();return r.rum?{ok:!0,value:r.rum}:{ok:!1,error:new Error("No remote configuration for RUM.")}}function sw(e){return e.remoteConfigurationProxy?e.remoteConfigurationProxy:`https://sdk-configuration.${zu("rum",e)}/${JT}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function aw({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t},r,n,o){const i=Nl(),s=os();Po(s,L.globalContext,i);const a=is();Po(a,L.userContext,i);const u=ns();Po(u,L.accountContext,i);let c,l,d,f;const p=r.observable.subscribe(h),v={};function h(){if(!d||!f||!r.isGranted())return;p.unsubscribe();let _;if(f.trackViewsManually){if(!c)return;i.remove(c.callback),_=c.options}const g=o(f,l,_);i.drain(g)}function m(_,g){const b=Ce();if(b&&(_=cw(_)),d=_,Sl(UT(_)),f){Rn("DD_RUM",_);return}const C=kT(_,g);if(C){if(!b&&!C.sessionStoreStrategyType){w.warn("No storage available for session. We will not send any data.");return}C.compressIntakeRequests&&!b&&t&&(l=t(C,"Datadog RUM",k),!l)||(f=C,Nn().subscribe(k),r.tryToInit(C.trackingConsent),h())}}const E=_=>{i.add(g=>g.addDurationVital(_))};return{init(_,g,b){if(!_){w.error("Missing configuration");return}qu(_.enableExperimentalFeatures),d=_,!(e&&kn())&&(Vl(_.plugins,"onInit",{initConfiguration:_,publicApi:g}),_.remoteConfigurationId?QT(_,{user:a,context:s}).then(C=>{C&&m(C,b)}).catch(Ge):m(_,b))},get initConfiguration(){return d},getInternalContext:k,stopSession:k,addTiming(_,g=j()){i.add(b=>b.addTiming(_,g))},startView(_,g=H()){const b=C=>{C.startView(_,g)};i.add(b),c||(c={options:_,callback:b},h())},setViewName(_){i.add(g=>g.setViewName(_))},setViewContext(_){i.add(g=>g.setViewContext(_))},setViewContextProperty(_,g){i.add(b=>b.setViewContextProperty(_,g))},getViewContext:()=>v,globalContext:s,userContext:a,accountContext:u,addAction(_){i.add(g=>g.addAction(_))},addError(_){i.add(g=>g.addError(_))},addFeatureFlagEvaluation(_,g){i.add(b=>b.addFeatureFlagEvaluation(_,g))},startDurationVital(_,g){return Ul(n,_,g)},stopDurationVital(_,g){Fl(E,n,_,g)},addDurationVital:E,addOperationStepVital:(_,g,b,C)=>{i.add(Kt=>Kt.addOperationStepVital($(_),g,$(b),$(C)))}}}function cw(e){var t,r;return W(y({},e),{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:(t=e.defaultPrivacyLevel)!==null&&t!==void 0?t:(r=Bt())===null||r===void 0?void 0:r.getPrivacyLevel()})}function Po(e,t,r){e.changeObservable.subscribe(()=>{const n=e.getContext();r.add(o=>o[t].setContext(n))})}function uw(e,t,r,n={}){const o=Bu(),i=TT(),s=Dl().observable;let a=aw(n,o,i,(d,f,p)=>{const v=f&&n.createDeflateEncoder?m=>n.createDeflateEncoder(d,f,m):Qi,h=e(d,t,r,p,v,o,i,s,n.sdkName);return t.onRumStart(h.lifeCycle,d,h.session,h.viewHistory,f,h.telemetry),r.onRumStart(h.lifeCycle,h.hooks,d,h.session,h.viewHistory,h.longTaskContexts,v),a=lw(a,h),Vl(d.plugins,"onRumStart",{strategy:a,addEvent:h.addEvent}),h});const u=()=>a,c=T(d=>{const f=typeof d=="object"?d:{name:d};a.startView(f),G({feature:"start-view"})}),l=nl({init:d=>{const f=new Error().stack;Oe(()=>a.init(d,l,f))},setTrackingConsent:T(d=>{o.update(d),G({feature:"set-tracking-consent",tracking_consent:d})}),setViewName:T(d=>{a.setViewName(d),G({feature:"set-view-name"})}),setViewContext:T(d=>{a.setViewContext(d),G({feature:"set-view-context"})}),setViewContextProperty:T((d,f)=>{a.setViewContextProperty(d,f),G({feature:"set-view-context-property"})}),getViewContext:T(()=>(G({feature:"set-view-context-property"}),a.getViewContext())),getInternalContext:T(d=>a.getInternalContext(d)),getInitConfiguration:T(()=>xn(a.initConfiguration)),addAction:(d,f)=>{const p=Nt("action");Oe(()=>{a.addAction({name:$(d),context:$(f),startClocks:H(),type:ss.CUSTOM,handlingStack:p}),G({feature:"add-action"})})},addError:(d,f)=>{const p=Nt("error");Oe(()=>{a.addError({error:d,handlingStack:p,context:$(f),startClocks:H()}),G({feature:"add-error"})})},addTiming:T((d,f)=>{a.addTiming($(d),f)}),setGlobalContext:P(u,L.globalContext,M.setContext,"set-global-context"),getGlobalContext:P(u,L.globalContext,M.getContext,"get-global-context"),setGlobalContextProperty:P(u,L.globalContext,M.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:P(u,L.globalContext,M.removeContextProperty,"remove-global-context-property"),clearGlobalContext:P(u,L.globalContext,M.clearContext,"clear-global-context"),setUser:P(u,L.userContext,M.setContext,"set-user"),getUser:P(u,L.userContext,M.getContext,"get-user"),setUserProperty:P(u,L.userContext,M.setContextProperty,"set-user-property"),removeUserProperty:P(u,L.userContext,M.removeContextProperty,"remove-user-property"),clearUser:P(u,L.userContext,M.clearContext,"clear-user"),setAccount:P(u,L.accountContext,M.setContext,"set-account"),getAccount:P(u,L.accountContext,M.getContext,"get-account"),setAccountProperty:P(u,L.accountContext,M.setContextProperty,"set-account-property"),removeAccountProperty:P(u,L.accountContext,M.removeContextProperty,"remove-account-property"),clearAccount:P(u,L.accountContext,M.clearContext,"clear-account"),startView:c,stopSession:T(()=>{a.stopSession(),G({feature:"stop-session"})}),addFeatureFlagEvaluation:T((d,f)=>{a.addFeatureFlagEvaluation($(d),$(f)),G({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:T(()=>t.getSessionReplayLink()),startSessionReplayRecording:T(d=>{t.start(d),G({feature:"start-session-replay-recording",force:d&&d.force})}),stopSessionReplayRecording:T(()=>t.stop()),addDurationVital:T((d,f)=>{G({feature:"add-duration-vital"}),a.addDurationVital({name:$(d),type:ur.DURATION,startClocks:Iy(f.startTime),duration:f.duration,context:$(f&&f.context),description:$(f&&f.description)})}),startDurationVital:T((d,f)=>(G({feature:"start-duration-vital"}),a.startDurationVital($(d),{context:$(f&&f.context),description:$(f&&f.description)}))),stopDurationVital:T((d,f)=>{G({feature:"stop-duration-vital"}),a.stopDurationVital(typeof d=="string"?$(d):d,{context:$(f&&f.context),description:$(f&&f.description)})}),startFeatureOperation:T((d,f)=>{G({feature:"add-operation-step-vital",action_type:"start"}),a.addOperationStepVital(d,"start",f)}),succeedFeatureOperation:T((d,f)=>{G({feature:"add-operation-step-vital",action_type:"succeed"}),a.addOperationStepVital(d,"end",f)}),failFeatureOperation:T((d,f,p)=>{G({feature:"add-operation-step-vital",action_type:"fail"}),a.addOperationStepVital(d,"end",p,f)})});return l}function lw(e,t){return y({init:r=>{Rn("DD_RUM",r)},initConfiguration:e.initConfiguration},t)}function dw(){const e=fw();return new x(t=>{if(!e)return;const r=new e(T(n=>t.notify(n)));return r.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>r.disconnect()})}function fw(){let e;const t=window;if(t.Zone&&(e=Be(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const r=new t.MutationObserver(k),n=Be(r,"originalInstance");e=n&&n.constructor}return e||(e=t.MutationObserver),e}function pw(){const e=new x,{stop:t}=Ee(window,"open",()=>e.notify());return{observable:e,stop:t}}function vw(e,t,r,n,o){return{get:i=>{const s=r.findView(i),a=o.findUrl(i),u=t.findTrackedSession(i);if(u&&s&&a){const c=n.findActionId(i);return{application_id:e,session_id:u.id,user_action:c?{id:c}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}const hw=Rl,gw=Ye;function mw(e){const t=pt({expireDelay:gw});e.subscribe(1,n=>{t.add(r(n),n.startClocks.relative)}),e.subscribe(6,({endClocks:n})=>{t.closeActive(n.relative)}),e.subscribe(3,n=>{const o=t.find(n.startClocks.relative);o&&(n.name&&(o.name=n.name),n.context&&(o.context=n.context),o.sessionIsActive=n.sessionIsActive)}),e.subscribe(10,()=>{t.reset()});function r(n){return{service:n.service,version:n.version,context:n.context,id:n.id,name:n.name,startClocks:n.startClocks}}return{findView:n=>t.find(n),stop:()=>{t.stop()}}}const Hl="initial_document",_w=[[te.DOCUMENT,e=>Hl===e],[te.XHR,e=>e==="xmlhttprequest"],[te.FETCH,e=>e==="fetch"],[te.BEACON,e=>e==="beacon"],[te.CSS,(e,t)=>/\.css$/i.test(t)],[te.JS,(e,t)=>/\.js$/i.test(t)],[te.IMAGE,(e,t)=>["image","img","icon"].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[te.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[te.MEDIA,(e,t)=>["audio","video"].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function bw(e){const t=e.name;if(!$y(t))return te.OTHER;const r=Py(t);for(const[n,o]of _w)if(o(e.initiatorType,r))return n;return te.OTHER}function La(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Wl(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function yw(e){const{duration:t,startTime:r,responseEnd:n}=e;return t===0&&r<n?B(r,n):t}function Ew(e){if(!Yl(e))return;const{startTime:t,fetchStart:r,workerStart:n,redirectStart:o,redirectEnd:i,domainLookupStart:s,domainLookupEnd:a,connectStart:u,secureConnectionStart:c,connectEnd:l,requestStart:d,responseStart:f,responseEnd:p}=e,v={download:Qe(t,f,p),first_byte:Qe(t,d,f)};return 0<n&&n<r&&(v.worker=Qe(t,n,r)),r<l&&(v.connect=Qe(t,u,l),u<=c&&c<=l&&(v.ssl=Qe(t,c,l))),r<a&&(v.dns=Qe(t,s,a)),t<i&&(v.redirect=Qe(t,o,i)),v}function ql(e){return e.duration>=0}function Yl(e){const t=La(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),r=Sw(e)?La(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&r}function Sw(e){return e.redirectEnd>e.startTime}function Qe(e,t,r){if(e<=t&&t<=r)return{duration:O(B(t,r)),start:O(B(e,t))}}function Tw(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function ww(e){return e.deliveryType===""?"other":e.deliveryType}function Iw(e){if(e.startTime<e.responseStart){const{encodedBodySize:t,decodedBodySize:r,transferSize:n}=e;return{size:r,encoded_body_size:t,decoded_body_size:r,transfer_size:n}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function as(e){return e&&(!Ku(e)||mr(ze.TRACK_INTAKE_REQUESTS))}const Ow=/data:(.+)?(;base64)?,/g,Aw=24e3;function Cw(e,t=Aw){if(e.length<=t||!e.startsWith("data:"))return e;const r=e.substring(0,100).match(Ow);return r?`${r[0]}[...]`:e}const Rw=32*Xe;function xw(e,t){const r=kw(e.requestBody,t.trackPayload);if(r){if(t.trackResponseErrors&&e.responseBody){const n=Lw(e.responseBody);n&&(r.error_count=n.length,r.errors=n)}return r}}function Lw(e){let t;try{t=JSON.parse(e)}catch(o){return}if(!t||typeof t!="object")return;const r=t;return at(r.errors)?r.errors.map(o=>{var i;return{message:o.message,path:o.path,locations:o.locations,code:(i=o.extensions)===null||i===void 0?void 0:i.code}}):void 0}function Xl(e,t){return t.allowedGraphQlUrls.find(r=>An([r.match],e))}function kw(e,t=!1){if(!e||typeof e!="string")return;let r;try{r=JSON.parse(e)}catch(a){return}if(!r)return;let n,o;if(r.query){const a=r.query.trim();n=Nw(a),t&&(o=Sn(a,Rw,"..."))}const i=r.operationName;let s;return r.variables&&(s=JSON.stringify(r.variables)),{operationType:n,operationName:i,variables:s,payload:o}}function Nw(e){var t;return(t=e.match(/^\s*(query|mutation|subscription)\b/i))===null||t===void 0?void 0:t[1]}let ka=1;function $w(e,t,r,n,o){const i=xT(t,r,n,o);Pw(e,t,i),Mw(e,t,i)}function Pw(e,t,r){const n=xl(t).subscribe(o=>{const i=o;if(as(i.url))switch(i.state){case"start":r.traceXhr(i,i.xhr),i.requestIndex=Jl(),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"complete":r.clearTracingIfNeeded(i),e.notify(8,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:ut.XHR,url:i.url,xhr:i.xhr,isAborted:i.isAborted,handlingStack:i.handlingStack,requestBody:i.requestBody,responseBody:i.responseBody});break}});return{stop:()=>n.unsubscribe()}}function Mw(e,t,r){const n=Nn({responseBodyAction:o=>{var i;return!((i=Xl(o.url,t))===null||i===void 0)&&i.trackResponseErrors?2:1}}).subscribe(o=>{var i;const s=o;if(as(s.url))switch(s.state){case"start":r.traceFetch(s),s.requestIndex=Jl(),e.notify(7,{requestIndex:s.requestIndex,url:s.url});break;case"resolve":r.clearTracingIfNeeded(s),e.notify(8,{duration:B(s.startClocks.timeStamp,j()),method:s.method,requestIndex:s.requestIndex,responseType:s.responseType,spanId:s.spanId,startClocks:s.startClocks,status:s.status,traceId:s.traceId,traceSampled:s.traceSampled,type:ut.FETCH,url:s.url,response:s.response,init:s.init,input:s.input,isAborted:s.isAborted,handlingStack:s.handlingStack,requestBody:(i=s.init)===null||i===void 0?void 0:i.body,responseBody:s.responseBody});break}});return{stop:()=>n.unsubscribe()}}function Jl(){const e=ka;return ka+=1,e}function Zl(e){return hr(e)&&e<0?void 0:e}function Ql({lifeCycle:e,isChildEvent:t,onChange:r=k}){const n={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=e.subscribe(13,i=>{var s;if(!(i.type==="view"||i.type==="vital"||!t(i)))switch(i.type){case A.ERROR:n.errorCount+=1,r();break;case A.ACTION:n.actionCount+=1,i.action.frustration&&(n.frustrationCount+=i.action.frustration.type.length),r();break;case A.LONG_TASK:n.longTaskCount+=1,r();break;case A.RESOURCE:!((s=i._dd)===null||s===void 0)&&s.discarded||(n.resourceCount+=1,r());break}});return{stop:()=>{o.unsubscribe()},eventCounts:n}}function Dw(e,t){const r=re();let n=!1;const{stop:o}=Ke(e,window,["click","mousedown","keydown","touchstart","pointerdown"],a=>{if(!a.cancelable)return;const u={entryType:"first-input",processingStart:ce(),processingEnd:ce(),startTime:a.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};a.type==="pointerdown"?i(e,u):s(u)},{passive:!0,capture:!0});return{stop:o};function i(a,u){Ke(a,window,["pointerup","pointercancel"],c=>{c.type==="pointerup"&&s(u)},{once:!0})}function s(a){if(!n){n=!0,o();const u=a.processingStart-a.startTime;u>=0&&u<re()-r&&t(a)}}}var N;(function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.LONG_ANIMATION_FRAME="long-animation-frame",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource",e.VISIBILITY_STATE="visibility-state"})(N||(N={}));function Re(e,t){return new x(r=>{if(!window.PerformanceObserver)return;const n=u=>{const c=Vw(u);c.length>0&&r.notify(c)};let o,i=!0;const s=new PerformanceObserver(T(u=>{i?o=J(()=>n(u.getEntries())):n(u.getEntries())}));try{s.observe(t)}catch(u){if([N.RESOURCE,N.NAVIGATION,N.LONG_TASK,N.PAINT].includes(t.type)){t.buffered&&(o=J(()=>n(performance.getEntriesByType(t.type))));try{s.observe({entryTypes:[t.type]})}catch(l){return}}}i=!1,Uw(e);let a;return!vt(N.FIRST_INPUT)&&t.type===N.FIRST_INPUT&&({stop:a}=Dw(e,u=>{n([u])})),()=>{s.disconnect(),a&&a(),de(o)}})}let Qt;function Uw(e){return!Qt&&Fw()&&"addEventListener"in performance&&(Qt=U(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{Qt==null||Qt.stop()}}function Fw(){return window.performance!==void 0&&"getEntries"in performance}function vt(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function Vw(e){return e.filter(t=>!jw(t))}function jw(e){return e.entryType===N.RESOURCE&&(!as(e.name)||!ql(e))}function vi(e){return e.nodeType===Node.TEXT_NODE}function Bw(e){return e.nodeType===Node.COMMENT_NODE}function xe(e){return e.nodeType===Node.ELEMENT_NODE}function ed(e){return xe(e)&&!!e.shadowRoot}function Gw(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&xe(t.host)}function HC(e){return e.childNodes.length>0||ed(e)}function WC(e,t){let r=e.firstChild;for(;r;)t(r),r=r.nextSibling;ed(e)&&t(e.shadowRoot)}function zw(e){return Gw(e)?e.host:e.parentNode}const td=100,Kw=100,Na="data-dd-excluded-activity-mutations";function cs(e,t,r,n,o,i){const s=Ww(e,t,r,n);return Hw(s,o,i)}function Hw(e,t,r){let n,o=!1;const i=J(T(()=>c({hadActivity:!1})),td),s=r!==void 0?J(T(()=>c({hadActivity:!0,end:j()})),r):void 0,a=e.subscribe(({isBusy:l})=>{de(i),de(n);const d=j();l||(n=J(T(()=>c({hadActivity:!0,end:d})),Kw))}),u=()=>{o=!0,de(i),de(n),de(s),a.unsubscribe()};function c(l){o||(u(),t(l))}return{stop:u}}function Ww(e,t,r,n){return new x(o=>{const i=[];let s,a=0;return i.push(t.subscribe(c=>{c.every(qw)||u()}),r.subscribe(u),Re(n,{type:N.RESOURCE}).subscribe(c=>{c.some(l=>!Mo(n,l.name))&&u()}),e.subscribe(7,c=>{Mo(n,c.url)||(s===void 0&&(s=c.requestIndex),a+=1,u())}),e.subscribe(8,c=>{Mo(n,c.url)||s===void 0||c.requestIndex<s||(a-=1,u())})),()=>{i.forEach(c=>c.unsubscribe())};function u(){o.notify({isBusy:a>0})}})}function Mo(e,t){return An(e.excludedActivityUrls,t)}function qw(e){const t=e.type==="characterData"?e.target.parentElement:e.target;return!!(t&&xe(t)&&t.matches(`[${Na}], [${Na}] *`))}const $n="data-dd-action-name",rd="Masked Element",nd=[$n,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],Yw=[id,Jw],Xw=[id,Zw,Qw];function Er(e,t){if(!e.isConnected)return;let r,n=e;for(;n&&n.nodeName!=="HTML";){const o=$a(n,Yw,t0,t,r);if(o)return o;r=$a(n,Xw,r0,t,r)||Pn(e0(n),r),n=n.parentElement}return r}function od(e){return/[0-9]/.test(e)}function Jw(e){if(e.id&&!od(e.id))return`#${CSS.escape(e.id)}`}function Zw(e){if(e.tagName==="BODY")return;const t=e.classList;for(let r=0;r<t.length;r+=1){const n=t[r];if(!od(n))return`${CSS.escape(e.tagName)}.${CSS.escape(n)}`}}function Qw(e){return CSS.escape(e.tagName)}function id(e,t){if(t){const n=r(t);if(n)return n}for(const n of nd){const o=r(n);if(o)return o}function r(n){if(e.hasAttribute(n))return`${CSS.escape(e.tagName)}[${n}="${CSS.escape(e.getAttribute(n))}"]`}}function e0(e){let t=e.parentElement.firstElementChild,r=1;for(;t&&t!==e;)t.tagName===e.tagName&&(r+=1),t=t.nextElementSibling;return`${CSS.escape(e.tagName)}:nth-of-type(${r})`}function $a(e,t,r,n,o){for(const i of t){const s=i(e,n);if(s&&r(e,s,o))return Pn(s,o)}}function t0(e,t,r){return e.ownerDocument.querySelectorAll(Pn(t,r)).length===1}function r0(e,t,r){let n;if(r===void 0)n=s=>s.matches(t);else{const s=Pn(`${t}:scope`,r);n=a=>a.querySelector(s)!==null}let i=e.parentElement.firstElementChild;for(;i;){if(i!==e&&n(i))return!1;i=i.nextElementSibling}return!0}function Pn(e,t){return t?`${e}>${t}`:e}const R={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Tt.ALLOW,MASK:Tt.MASK,MASK_USER_INPUT:Tt.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:Tt.MASK_UNLESS_ALLOWLISTED},sd="data-dd-privacy",qC="hidden",n0="dd-privacy-",Do="***",YC="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",o0={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},i0="x";function it(e){return`[${sd}="${e}"], .${n0}${e}`}function Mn(e,t,r){if(r&&r.has(e))return r.get(e);const n=zw(e),o=n?Mn(n,t,r):t,i=a0(e),s=s0(i,o);return r&&r.set(e,s),s}function s0(e,t){switch(t){case R.HIDDEN:case R.IGNORE:return t}switch(e){case R.ALLOW:case R.MASK:case R.MASK_USER_INPUT:case R.MASK_UNLESS_ALLOWLISTED:case R.HIDDEN:case R.IGNORE:return e;default:return t}}function a0(e){if(xe(e)){if(e.tagName==="BASE")return R.ALLOW;if(e.tagName==="INPUT"){const t=e;if(t.type==="password"||t.type==="email"||t.type==="tel"||t.type==="hidden")return R.MASK;const r=t.getAttribute("autocomplete");if(r&&(r.startsWith("cc-")||r.endsWith("-password")))return R.MASK}if(e.matches(it(R.HIDDEN)))return R.HIDDEN;if(e.matches(it(R.MASK)))return R.MASK;if(e.matches(it(R.MASK_UNLESS_ALLOWLISTED)))return R.MASK_UNLESS_ALLOWLISTED;if(e.matches(it(R.MASK_USER_INPUT)))return R.MASK_USER_INPUT;if(e.matches(it(R.ALLOW)))return R.ALLOW;if(u0(e))return R.IGNORE}}function ad(e,t){switch(t){case R.MASK:case R.HIDDEN:case R.IGNORE:return!0;case R.MASK_UNLESS_ALLOWLISTED:return vi(e)?Ur(e.parentNode)?!0:!ud(e.textContent||""):Ur(e);case R.MASK_USER_INPUT:return vi(e)?Ur(e.parentNode):Ur(e);default:return!1}}function c0(e,t,r,n,o){if(n!==R.MASK&&n!==R.MASK_UNLESS_ALLOWLISTED||t===sd||nd.includes(t)||t===o.actionNameAttribute)return!1;switch(t){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return!!(e==="A"&&t==="href"||e==="IFRAME"&&t==="srcdoc"||r&&t.startsWith("data-")||(e==="IMG"||e==="SOURCE")&&(t==="src"||t==="srcset"))}function Ur(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;const t=e;if(t.tagName==="INPUT")switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!o0[t.tagName]}const cd=e=>e.replace(/\S/g,i0);function XC(e,t){var r;const n=(r=e.parentElement)===null||r===void 0?void 0:r.tagName;let o=e.textContent||"";if(n==="HEAD"&&!o.trim())return;const s=t;if(n==="SCRIPT")o=Do;else if(s===R.HIDDEN)o=Do;else if(ad(e,s))if(n==="DATALIST"||n==="SELECT"||n==="OPTGROUP"){if(!o.trim())return}else n==="OPTION"?o=Do:s===R.MASK_UNLESS_ALLOWLISTED?o=ld(o):o=cd(o);return o}function u0(e){if(e.nodeName==="SCRIPT")return!0;if(e.nodeName==="LINK"){const r=t("rel");return/preload|prefetch/i.test(r)&&t("as")==="script"||r==="shortcut icon"||r==="icon"}if(e.nodeName==="META"){const r=t("name"),n=t("rel"),o=t("property");return/^msapplication-tile(image|color)$/.test(r)||r==="application-name"||n==="icon"||n==="apple-touch-icon"||n==="shortcut icon"||r==="keywords"||r==="description"||/^(og|twitter|fb):/.test(o)||/^(og|twitter):/.test(r)||r==="pinterest"||r==="robots"||r==="googlebot"||r==="bingbot"||e.hasAttribute("http-equiv")||r==="author"||r==="generator"||r==="framework"||r==="publisher"||r==="progid"||/^article:/.test(o)||/^product:/.test(o)||r==="google-site-verification"||r==="yandex-verification"||r==="csrf-token"||r==="p:domain_verify"||r==="verify-v1"||r==="verification"||r==="shopify-checkout-api-token"}function t(r){return(e.getAttribute(r)||"").toLowerCase()}return!1}function ud(e){var t;return!e||!e.trim()?!0:((t=window.$DD_ALLOW)===null||t===void 0?void 0:t.has(e.toLocaleLowerCase()))||!1}function ld(e,t){return ud(e)?e:t||cd(e)}const dd=Q,l0=100;function d0(e,t){const r=[];let n=0,o;i(e);function i(u){u.stopObservable.subscribe(s),r.push(u),de(o),o=J(a,dd)}function s(){n===1&&r.every(u=>u.isStopped())&&(n=2,t(r))}function a(){de(o),n===0&&(n=1,s())}return{tryAppend:u=>n!==0?!1:r.length>0&&!f0(r[r.length-1].event,u.event)?(a(),!1):(i(u),!0),stop:()=>{a()}}}function f0(e,t){return e.target===t.target&&p0(e,t)<=l0&&e.timeStamp-t.timeStamp<=dd}function p0(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function v0(e,t,r=R.ALLOW){const n=new Map,{actionNameAttribute:o}=t,i=Pa(e,$n)||o&&Pa(e,o);return i?{name:i,nameSource:"custom_attribute"}:r===R.MASK?{name:rd,nameSource:"mask_placeholder"}:Ma(e,h0,t,n)||Ma(e,g0,t,n)||{name:"",nameSource:"blank"}}function Pa(e,t){const r=e.closest(`[${t}]`);if(!r)return;const n=r.getAttribute(t);return pd(fd(n.trim()))}const h0=[(e,t,r)=>{if("labels"in e&&e.labels&&e.labels.length>0)return Xr(e.labels[0],t,r)},e=>{if(e.nodeName==="INPUT"){const t=e,r=t.getAttribute("type");if(r==="button"||r==="submit"||r==="reset")return{name:t.value,nameSource:"text_content"}}},(e,t,r)=>{if(e.nodeName==="BUTTON"||e.nodeName==="LABEL"||e.getAttribute("role")==="button")return Xr(e,t,r)},(e,t,r)=>er(e,"aria-label",t,r),(e,t,r)=>{const n=e.getAttribute("aria-labelledby");if(n)return{name:n.split(/\s+/).map(o=>_0(e,o)).filter(o=>!!o).map(o=>vd(o,t,r)).join(" "),nameSource:"text_content"}},(e,t,r)=>er(e,"alt",t,r),(e,t,r)=>er(e,"name",t,r),(e,t,r)=>er(e,"title",t,r),(e,t,r)=>er(e,"placeholder",t,r),(e,t,r)=>{if("options"in e&&e.options.length>0)return Xr(e.options[0],t,r)}],g0=[(e,t,r)=>Xr(e,t,r)],m0=10;function Ma(e,t,r,n){let o=e,i=0;for(;i<=m0&&o&&o.nodeName!=="BODY"&&o.nodeName!=="HTML"&&o.nodeName!=="HEAD";){for(const s of t){const a=s(o,r,n);if(a){const{name:u,nameSource:c}=a,l=u&&u.trim();if(l)return{name:pd(fd(l)),nameSource:c}}}if(o.nodeName==="FORM")break;o=o.parentElement,i+=1}}function fd(e){return e.replace(/\s+/g," ")}function pd(e){return e.length>100?`${Sn(e,100)} [...]`:e}function _0(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function er(e,t,r,n){const{enablePrivacyForActionName:o,defaultPrivacyLevel:i}=r;let s=e.getAttribute(t);if(s&&o){const a=Mn(e,i,n);c0(e.tagName,t,s,a,r)&&(s=ld(s,rd))}else s||(s="");return{name:s,nameSource:"standard_attribute"}}function Xr(e,t,r){return{name:vd(e,t,r)||"",nameSource:"text_content"}}function vd(e,t,r){if(e.isContentEditable)return;const{enablePrivacyForActionName:n,actionNameAttribute:o,defaultPrivacyLevel:i}=t;if(mr(ze.USE_TREE_WALKER_FOR_ACTION_NAME))return b0(e,o,n,i,r);if("innerText"in e){let s=e.innerText;const a=u=>{const c=e.querySelectorAll(u);for(let l=0;l<c.length;l+=1){const d=c[l];if("innerText"in d){const f=d.innerText;f&&f.trim().length>0&&(s=s.replace(f,""))}}};return a(`[${$n}]`),o&&a(`[${o}]`),n&&a(`${it(R.HIDDEN)}, ${it(R.MASK)}`),s}return e.textContent}function b0(e,t,r,n,o){const i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,a);let s="";for(;i.nextNode();){const u=i.currentNode;if(xe(u)){(u.nodeName==="BR"||u.nodeName==="P"||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(u).display))&&(s+=" ");continue}s+=u.textContent||""}return s.replace(/\s+/g," ").trim();function a(u){const c=Mn(u,n,o);if(r&&c&&ad(u,c))return NodeFilter.FILTER_REJECT;if(xe(u)){if(u.hasAttribute($n)||t&&u.hasAttribute(t))return NodeFilter.FILTER_REJECT;const l=getComputedStyle(u);if(l.visibility!=="visible"||l.display==="none"||l.contentVisibility&&l.contentVisibility!=="visible")return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function y0(e,{onPointerDown:t,onPointerUp:r}){let n,o={selection:!1,input:!1,scroll:!1},i;const s=[U(e,window,"pointerdown",a=>{Ua(a)&&(n=Da(),o={selection:!1,input:!1,scroll:!1},i=t(a))},{capture:!0}),U(e,window,"selectionchange",()=>{(!n||!Da())&&(o.selection=!0)},{capture:!0}),U(e,window,"scroll",()=>{o.scroll=!0},{capture:!0,passive:!0}),U(e,window,"pointerup",a=>{if(Ua(a)&&i){const u=o;r(i,a,()=>u),i=void 0}},{capture:!0}),U(e,window,"input",()=>{o.input=!0},{capture:!0})];return{stop:()=>{s.forEach(a=>a.stop())}}}function Da(){const e=window.getSelection();return!e||e.isCollapsed}function Ua(e){return e.target instanceof Element&&e.isPrimary!==!1}const Fa=3;function E0(e,t){if(S0(e))return t.addFrustration(Zt.RAGE_CLICK),e.some(Va)&&t.addFrustration(Zt.DEAD_CLICK),t.hasError&&t.addFrustration(Zt.ERROR_CLICK),{isRage:!0};const r=e.some(n=>n.getUserActivity().selection);return e.forEach(n=>{n.hasError&&n.addFrustration(Zt.ERROR_CLICK),Va(n)&&!r&&n.addFrustration(Zt.DEAD_CLICK)}),{isRage:!1}}function S0(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(Fa-1);t+=1)if(e[t+Fa-1].event.timeStamp-e[t].event.timeStamp<=Q)return!0;return!1}const T0='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function Va(e){if(e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return t.tagName==="LABEL"&&t.hasAttribute("for")&&(t=document.getElementById(t.getAttribute("for"))),!t||!t.matches(T0)}const hd=10*Q,nr=new Map;function w0(e){const t=nr.get(e);return nr.delete(e),t}function gd(e,t){nr.set(e,t),nr.forEach((r,n)=>{B(n,ce())>hd&&nr.delete(n)})}const I0=5*se;function O0(e,t,r,n){const o=pt({expireDelay:I0}),i=new x;let s;e.subscribe(10,()=>{o.reset()}),e.subscribe(5,l),e.subscribe(11,d=>{d.reason===Ot.UNLOADING&&l()});const{stop:a}=y0(n,{onPointerDown:d=>A0(n,e,t,d,r),onPointerUp:({clickActionBase:d,hadActivityOnPointerDown:f},p,v)=>{C0(n,e,t,r,o,i,c,d,p,v,f)}});return{stop:()=>{l(),i.notify(),a()},actionContexts:{findActionId:d=>o.findAll(d)}};function c(d){if(!s||!s.tryAppend(d)){const f=d.clone();s=d0(d,p=>{x0(p,f),s=void 0})}}function l(){s&&s.stop()}}function A0(e,t,r,n,o){let i;if(e.enablePrivacyForActionName?i=Mn(n.target,e.defaultPrivacyLevel):i=R.ALLOW,i===R.HIDDEN)return;const s=R0(n,i,e);let a=!1;return cs(t,r,o,e,u=>{a=u.hadActivity},td),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}function C0(e,t,r,n,o,i,s,a,u,c,l){var d;const f=md(t,o,c,a,u);s(f);const p=(d=a==null?void 0:a.target)===null||d===void 0?void 0:d.selector;p&&gd(u.timeStamp,p);const{stop:v}=cs(t,r,n,e,E=>{E.hadActivity&&E.end<f.startClocks.timeStamp?f.discard():E.hadActivity?f.stop(E.end):l()?f.stop(f.startClocks.timeStamp):f.stop()},hd),h=t.subscribe(5,({endClocks:E})=>{f.stop(E.timeStamp)}),m=i.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{h.unsubscribe(),v(),m.unsubscribe()})}function R0(e,t,r){const n=e.target.getBoundingClientRect(),o=Er(e.target,r.actionNameAttribute);o&&gd(e.timeStamp,o);const{name:i,nameSource:s}=v0(e.target,r,t);return{type:ss.CLICK,target:{width:Math.round(n.width),height:Math.round(n.height),selector:o},position:{x:Math.round(e.clientX-n.left),y:Math.round(e.clientY-n.top)},name:i,nameSource:s}}function md(e,t,r,n,o){const i=oe(),s=bn(o.timeStamp),a=t.add(i,s.relative),u=Ql({lifeCycle:e,isChildEvent:v=>v.action!==void 0&&(Array.isArray(v.action.id)?v.action.id.includes(i):v.action.id===i)});let c=0,l;const d=[],f=new x;function p(v){c===0&&(l=v,c=1,l?a.close(yn(l)):a.remove(),u.stop(),f.notify())}return{event:o,stop:p,stopObservable:f,get hasError(){return u.eventCounts.errorCount>0},get hasPageActivity(){return l!==void 0},getUserActivity:r,addFrustration:v=>{d.push(v)},startClocks:s,isStopped:()=>c===1||c===2,clone:()=>md(e,t,r,n,o),validate:v=>{if(p(),c!==1)return;const{resourceCount:h,errorCount:m,longTaskCount:E}=u.eventCounts,S=y({duration:l&&B(s.timeStamp,l),startClocks:s,id:i,frustrationTypes:d,counts:{resourceCount:h,errorCount:m,longTaskCount:E},events:v!=null?v:[o],event:o},n);e.notify(0,S),c=2},discard:()=>{p(),c=2}}}function x0(e,t){const{isRage:r}=E0(e,t);r?(e.forEach(n=>n.discard()),t.stop(j()),t.validate(e.map(n=>n.event))):(t.discard(),e.forEach(n=>n.validate()))}const L0=1;function k0(e,t,r,n,o){const{unsubscribe:i}=e.subscribe(0,u=>{e.notify(12,ja(u))});t.register(0,({startTime:u,eventType:c})=>{if(c!==A.ERROR&&c!==A.RESOURCE&&c!==A.LONG_TASK)return q;const l=c===A.LONG_TASK?qe(u,L0):u,d=s.findActionId(l);return d?{type:c,action:{id:d}}:q}),t.register(1,({startTime:u})=>({action:{id:s.findActionId(u)}}));let s={findActionId:k},a=k;return o.trackUserInteractions&&({actionContexts:s,stop:a}=O0(e,r,n,o)),{addAction:u=>{e.notify(12,ja(u))},actionContexts:s,stop:()=>{i(),a()}}}function ja(e){const t=Uo(e)?{action:{id:e.id,loading_time:Zl(O(e.duration)),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position,name_source:e.nameSource}}}:{context:e.context},r=fe({action:{id:oe(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:A.ACTION},t),n=Uo(e)?e.duration:void 0,o=Uo(e)?{events:e.events}:{handlingStack:e.handlingStack};return{rawRumEvent:r,duration:n,startTime:e.startClocks.relative,domainContext:o}}function Uo(e){return e.type!==ss.CUSTOM}function N0(e){const t=kl([F.error]).subscribe(r=>e.notify(r.error));return{stop:()=>{t.unsubscribe()}}}function $0(e,t){const r=il(e,[Pt.cspViolation,Pt.intervention]).subscribe(n=>t.notify(n));return{stop:()=>{r.unsubscribe()}}}function P0(e,t,r){const n=new x;return r.subscribe(o=>{o.type===0&&n.notify(o.error)}),N0(n),$0(t,n),n.subscribe(o=>e.notify(14,{error:o})),M0(e)}function M0(e){return e.subscribe(14,({error:t})=>{e.notify(12,D0(t))}),{addError:({error:t,handlingStack:r,componentStack:n,startClocks:o,context:i})=>{const s=Cn({originalError:t,handlingStack:r,componentStack:n,startClocks:o,nonErrorPrefix:"Provided",source:ae.CUSTOM,handling:"handled"});s.context=fe(s.context,i),e.notify(14,{error:s})}}}function D0(e){const t={date:e.startClocks.timeStamp,error:{id:oe(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:A.ERROR,context:e.context},r={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startTime:e.startClocks.relative,domainContext:r}}const Ba=new WeakSet;function U0(e){if(!performance||!("getEntriesByName"in performance))return;const t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;const r=t.filter(n=>!Ba.has(n)).filter(n=>ql(n)&&Yl(n)).filter(n=>F0(n,e.startClocks.relative,_d({startTime:e.startClocks.relative,duration:e.duration})));if(r.length===1)return Ba.add(r[0]),r[0].toJSON()}function _d(e){return qe(e.startTime,e.duration)}function F0(e,t,r){return e.startTime>=t-1&&_d(e)<=qe(r,1)}const V0=2*se;function j0(e){const t=B0(e)||G0(e);if(!(!t||t.traceTime<=re()-V0))return t.traceId}function B0(e){const t=e.querySelector("meta[name=dd-trace-id]"),r=e.querySelector("meta[name=dd-trace-time]");return bd(t&&t.content,r&&r.content)}function G0(e){const t=z0(e);if(t)return bd(ar(t,"trace-id"),ar(t,"trace-time"))}function bd(e,t){const r=t&&Number(t);if(!(!e||!r))return{traceId:e,traceTime:r}}function z0(e){for(let t=0;t<e.childNodes.length;t+=1){const r=Ga(e.childNodes[t]);if(r)return r}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;t-=1){const r=e.body.childNodes[t],n=Ga(r);if(n)return n;if(!vi(r))break}}function Ga(e){if(e&&Bw(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function yd(){if(vt(N.NAVIGATION)){const r=performance.getEntriesByType(N.NAVIGATION)[0];if(r)return r}const e=K0(),t=y({entryType:N.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>W(y({},t),{toJSON:void 0})},e);return t}function K0(){const e={},t=performance.timing;for(const r in t)if(hr(t[r])){const n=r,o=t[n];e[n]=o===0?0:yn(o)}return e}function H0(e,t,r=yd){es(e,"interactive",()=>{const n=r(),o=Object.assign(n.toJSON(),{entryType:N.RESOURCE,initiatorType:Hl,duration:n.responseEnd,traceId:j0(document),toJSON:()=>W(y({},o),{toJSON:void 0})});t(o)})}const W0=1e3;function q0(e){const t=new Set,r=e.subscribe(8,n=>{t.add(n),t.size>W0&&(zt("Too many requests"),t.delete(t.values().next().value))});return{getMatchingRequest(n){let o=1/0,i;for(const s of t){const a=n.startTime-s.startClocks.relative;0<=a&&a<o&&s.url===n.name&&(o=Math.abs(a),i=s)}return i&&t.delete(i),i},stop(){r.unsubscribe()}}}function Y0(e,t,r,n=fT(),o=H0){let i;const s=t.trackEarlyRequests;s?i=q0(e):e.subscribe(8,c=>{u(()=>X0(c,t,r))});const a=Re(t,{type:N.RESOURCE,buffered:!0}).subscribe(c=>{for(const l of c)(s||!Wl(l))&&u(()=>za(l,t,r,i))});o(t,c=>{u(()=>za(c,t,r,i))});function u(c){n.push(()=>{const l=c();l&&e.notify(12,l)})}return{stop:()=>{n.stop(),a.unsubscribe()}}}function X0(e,t,r){const n=U0(e);return Ed(n,e,r,t)}function za(e,t,r,n){const o=Wl(e)&&n?n.getMatchingRequest(e):void 0;return Ed(e,o,r,t)}function Ed(e,t,r,n){if(!e&&!t)return;const o=t?eI(t,n):tI(e,n);if(!n.trackResources&&!o)return;const i=e?bn(e.startTime):t.startClocks,s=e?yw(e):rI(r,i,t.duration),a=t&&J0(t,n),u=fe({date:i.timeStamp,resource:{id:oe(),duration:O(s),type:t?t.type===ut.XHR?te.XHR:te.FETCH:bw(e),method:t?t.method:void 0,status_code:t?t.status:nI(e.responseStatus),url:t?Cw(t.url):e.name,protocol:e&&Tw(e),delivery_type:e&&ww(e),graphql:a},type:A.RESOURCE,_dd:{discarded:!n.trackResources}},o,e&&Q0(e));return{startTime:i.relative,duration:s,rawRumEvent:u,domainContext:Z0(e,t)}}function J0(e,t){const r=Xl(e.url,t);if(r)return xw(e,r)}function Z0(e,t){if(t){const r={performanceEntry:e,isAborted:t.isAborted,handlingStack:t.handlingStack};return t.type===ut.XHR?y({xhr:t.xhr},r):y({requestInput:t.input,requestInit:t.init,response:t.response,error:t.error},r)}return{performanceEntry:e}}function Q0(e){const{renderBlockingStatus:t}=e;return{resource:y(y({render_blocking_status:t},Iw(e)),Ew(e))}}function eI(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function tI(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Bl().toString(),rule_psr:t.rulePsr}}}function rI(e,t,r){return e.wasInPageStateDuringPeriod("frozen",t.relative,r)?void 0:r}function nI(e){return e===0?void 0:e}function oI(e,t,r){const{stop:n,eventCounts:o}=Ql({lifeCycle:e,isChildEvent:i=>i.view.id===t,onChange:r});return{stop:n,eventCounts:o}}const iI=10*se;function sI(e,t,r){return{stop:Re(e,{type:N.PAINT,buffered:!0}).subscribe(o=>{const i=o.find(s=>s.name==="first-contentful-paint"&&s.startTime<t.timeStamp&&s.startTime<iI);i&&r(i.startTime)}).unsubscribe}}function aI(e,t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t(B(e,ce()))})})}function cI(e,t,r){const n=Re(e,{type:N.FIRST_INPUT,buffered:!0}).subscribe(o=>{const i=o.find(s=>s.startTime<t.timeStamp);if(i){const s=B(i.startTime,i.processingStart);let a;i.target&&xe(i.target)&&(a=Er(i.target,e.actionNameAttribute)),r({delay:s>=0?s:0,time:i.startTime,targetSelector:a})}});return{stop:()=>{n.unsubscribe()}}}function uI(e,t,r=yd){return fI(e,()=>{const n=r();dI(n)||t(lI(n))})}function lI(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=ce()?e.responseStart:void 0}}function dI(e){return e.loadEventEnd<=0}function fI(e,t){let r;const{stop:n}=es(e,"complete",()=>{r=J(()=>t())});return{stop:()=>{n(),de(r)}}}const pI=10*se;function vI(e,t,r,n){let o=1/0;const{stop:i}=Ke(e,r,["pointerdown","keydown"],u=>{o=u.timeStamp},{capture:!0,once:!0});let s=0;const a=Re(e,{type:N.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(u=>{const c=xu(u,l=>l.entryType===N.LARGEST_CONTENTFUL_PAINT&&l.startTime<o&&l.startTime<t.timeStamp&&l.startTime<pI&&l.size>s);if(c){let l;c.element&&(l=Er(c.element,e.actionNameAttribute)),n({value:c.startTime,targetSelector:l,resourceUrl:hI(c)}),s=c.size}});return{stop:()=>{i(),a.unsubscribe()}}}function hI(e){return e.url===""?void 0:e.url}function Sd(e,t,r=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:k};if(vt(N.VISIBILITY_STATE)){const i=performance.getEntriesByType(N.VISIBILITY_STATE).filter(s=>s.name==="hidden").find(s=>s.startTime>=t.relative);if(i)return{timeStamp:i.startTime,stop:k}}let n=1/0;const{stop:o}=Ke(e,r,["pagehide","visibilitychange"],i=>{(i.type==="pagehide"||document.visibilityState==="hidden")&&(n=i.timeStamp,o())},{capture:!0});return{get timeStamp(){return n},stop:o}}function gI(e,t,r,n){const o={},{stop:i}=uI(e,d=>{r(d.loadEvent),o.navigationTimings=d,n()}),s=Sd(e,t),{stop:a}=sI(e,s,d=>{o.firstContentfulPaint=d,n()}),{stop:u}=vI(e,s,window,d=>{o.largestContentfulPaint=d,n()}),{stop:c}=cI(e,s,d=>{o.firstInput=d,n()});function l(){i(),a(),u(),c(),s.stop()}return{stop:l,initialViewMetrics:o}}const hi=(e,t)=>e*t,mI=(e,t)=>{const r=Math.max(e.left,t.left),n=Math.max(e.top,t.top),o=Math.min(e.right,t.right),i=Math.min(e.bottom,t.bottom);return r>=o||n>=i?0:hi(o-r,i-n)},Ka=e=>{const t=hi(e.previousRect.width,e.previousRect.height),r=hi(e.currentRect.width,e.currentRect.height),n=mI(e.previousRect,e.currentRect);return t+r-n};function _I(e,t,r){if(!TI())return{stop:k};let n=0,o;r({value:0});const i=SI(),s=Re(e,{type:N.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var u;for(const c of a){if(c.hadRecentInput||c.startTime<t)continue;const{cumulatedValue:l,isMaxValue:d}=i.update(c);if(d){const f=bI(c.sources);o={target:f!=null&&f.node?new WeakRef(f.node):void 0,time:B(t,c.startTime),previousRect:f==null?void 0:f.previousRect,currentRect:f==null?void 0:f.currentRect,devicePixelRatio:window.devicePixelRatio}}if(l>n){n=l;const f=(u=o==null?void 0:o.target)===null||u===void 0?void 0:u.deref();r({value:St(n,4),targetSelector:f&&Er(f,e.actionNameAttribute),time:o==null?void 0:o.time,previousRect:o!=null&&o.previousRect?Ha(o.previousRect):void 0,currentRect:o!=null&&o.currentRect?Ha(o.currentRect):void 0,devicePixelRatio:o==null?void 0:o.devicePixelRatio})}}});return{stop:()=>{s.unsubscribe()}}}function bI(e){let t;for(const r of e)if(r.node&&xe(r.node)){const n=Ka(r);(!t||Ka(t)<n)&&(t=r)}return t}function Ha({x:e,y:t,width:r,height:n}){return{x:e,y:t,width:r,height:n}}const yI=5*Q,EI=Q;function SI(){let e=0,t,r,n=0;return{update:o=>{const i=t===void 0||o.startTime-r>=EI||o.startTime-t>=yI;let s;return i?(t=r=o.startTime,n=e=o.value,s=!0):(e+=o.value,r=o.startTime,s=o.value>n,s&&(n=o.value)),{cumulatedValue:e,isMaxValue:s}}}}function TI(){return vt(N.LAYOUT_SHIFT)&&"WeakRef"in window}let Jr,Td=0,Fo=1/0,Vo=0;function wI(){"interactionCount"in performance||Jr||(Jr=new window.PerformanceObserver(T(e=>{e.getEntries().forEach(t=>{const r=t;r.interactionId&&(Fo=Math.min(Fo,r.interactionId),Vo=Math.max(Vo,r.interactionId),Td=(Vo-Fo)/7+1)})})),Jr.observe({type:"event",buffered:!0,durationThreshold:0}))}const Wa=()=>Jr?Td:window.performance.interactionCount||0,qa=10,II=1*se;function OI(e,t,r){if(!RI())return{getInteractionToNextPaint:()=>{},setViewEnd:k,stop:k};const{getViewInteractionCount:n,stopViewInteractionCount:o}=CI(r);let i=1/0;const s=AI(n);let a=-1,u,c;function l(p){for(const h of p)h.interactionId&&h.startTime>=t&&h.startTime<=i&&s.process(h);const v=s.estimateP98Interaction();v&&v.duration!==a&&(a=v.duration,c=B(t,v.startTime),u=w0(v.startTime),!u&&v.target&&xe(v.target)&&(u=Er(v.target,e.actionNameAttribute)))}const d=Re(e,{type:N.FIRST_INPUT,buffered:!0}).subscribe(l),f=Re(e,{type:N.EVENT,durationThreshold:40,buffered:!0}).subscribe(l);return{getInteractionToNextPaint:()=>{if(a>=0)return{value:Math.min(a,II),targetSelector:u,time:c};if(n())return{value:0}},setViewEnd:p=>{i=p,o()},stop:()=>{f.unsubscribe(),d.unsubscribe()}}}function AI(e){const t=[];function r(){t.sort((n,o)=>o.duration-n.duration).splice(qa)}return{process(n){const o=t.findIndex(s=>n.interactionId===s.interactionId),i=t[t.length-1];o!==-1?n.duration>t[o].duration&&(t[o]=n,r()):(t.length<qa||n.duration>i.duration)&&(t.push(n),r())},estimateP98Interaction(){const n=Math.min(t.length-1,Math.floor(e()/50));return t[n]}}}function CI(e){wI();const t=e===Ie.INITIAL_LOAD?0:Wa();let r={stopped:!1};function n(){return Wa()-t}return{getViewInteractionCount:()=>r.stopped?r.interactionCount:n(),stopViewInteractionCount:()=>{r={stopped:!0,interactionCount:n()}}}}function RI(){return vt(N.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function xI(e,t,r,n,o,i,s){let a=o===Ie.INITIAL_LOAD,u=!0;const c=[],l=Sd(n,i);function d(){if(!u&&!a&&c.length>0){const p=Math.max(...c);p<l.timeStamp-i.relative&&s(p)}}const{stop:f}=cs(e,t,r,n,p=>{u&&(u=!1,p.hadActivity&&c.push(B(i.timeStamp,p.end)),d())});return{stop:()=>{f(),l.stop()},setLoadEvent:p=>{a&&(a=!1,c.push(p),d())}}}function JC(){let e;const t=window.visualViewport;return t?e=t.pageLeft-t.offsetLeft:window.scrollX!==void 0?e=window.scrollX:e=window.pageXOffset||0,Math.round(e)}function LI(){let e;const t=window.visualViewport;return t?e=t.pageTop-t.offsetTop:window.scrollY!==void 0?e=window.scrollY:e=window.pageYOffset||0,Math.round(e)}let jo;function kI(e){return jo||(jo=NI(e)),jo}function NI(e){return new x(t=>{const{throttled:r}=En(()=>{t.notify(us())},200);return U(e,window,"resize",r,{capture:!0,passive:!0}).stop})}function us(){const e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const $I=Q;function PI(e,t,r,n=DI(e)){let o=0,i=0,s=0;const a=n.subscribe(({scrollDepth:u,scrollTop:c,scrollHeight:l})=>{let d=!1;if(u>o&&(o=u,d=!0),l>i){i=l;const f=ce();s=B(t.relative,f),d=!0}d&&r({maxDepth:Math.min(o,i),maxDepthScrollTop:c,maxScrollHeight:i,maxScrollHeightTime:s})});return{stop:()=>a.unsubscribe()}}function MI(){const e=LI(),{height:t}=us(),r=Math.round((document.scrollingElement||document.documentElement).scrollHeight),n=Math.round(t+e);return{scrollHeight:r,scrollDepth:n,scrollTop:e}}function DI(e,t=$I){return new x(r=>{function n(){r.notify(MI())}if(window.ResizeObserver){const o=En(n,t,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,s=new ResizeObserver(T(o.throttled));i&&s.observe(i);const a=U(e,window,"scroll",o.throttled,{passive:!0});return()=>{o.cancel(),s.disconnect(),a.stop()}}})}function UI(e,t,r,n,o,i,s){const a={},{stop:u,setLoadEvent:c}=xI(e,t,r,n,i,s,h=>{a.loadingTime=h,o()}),{stop:l}=PI(n,s,h=>{a.scroll=h}),{stop:d}=_I(n,s.relative,h=>{a.cumulativeLayoutShift=h,o()}),{stop:f,getInteractionToNextPaint:p,setViewEnd:v}=OI(n,s.relative,i);return{stop:()=>{u(),d(),l()},stopINPTracking:f,setLoadEvent:c,setViewEnd:v,getCommonViewMetrics:()=>(a.interactionToNextPaint=p(),a)}}function FI(e,t){const{stop:r}=U(e,window,"pageshow",n=>{n.persisted&&t(n)},{capture:!0});return r}function VI(e,t,r){aI(e.relative,n=>{t.firstContentfulPaint=n,t.largestContentfulPaint={value:n},r()})}const jI=3e3,BI=5*se,GI=5*se;function zI(e,t,r,n,o,i,s,a){const u=new Set;let c=f(Ie.INITIAL_LOAD,Ou(),a),l;p();let d;s&&(d=v(i),o.trackBfcacheViews&&(l=FI(o,h=>{c.end();const m=bn(h.timeStamp);c=f(Ie.BF_CACHE,m,void 0)})));function f(h,m,E){const S=KI(t,r,n,o,e,h,m,E);return u.add(S),S.stopObservable.subscribe(()=>{u.delete(S)}),S}function p(){t.subscribe(10,()=>{c=f(Ie.ROUTE_CHANGE,void 0,{name:c.name,service:c.service,version:c.version,context:c.contextManager.getContext()})}),t.subscribe(9,()=>{c.end({sessionIsActive:!1})})}function v(h){return h.subscribe(({oldLocation:m,newLocation:E})=>{WI(m,E)&&(c.end(),c=f(Ie.ROUTE_CHANGE))})}return{addTiming:(h,m=j())=>{c.addTiming(h,m)},startView:(h,m)=>{c.end({endClocks:m}),c=f(Ie.ROUTE_CHANGE,m,h)},setViewContext:h=>{c.contextManager.setContext(h)},setViewContextProperty:(h,m)=>{c.contextManager.setContextProperty(h,m)},setViewName:h=>{c.setViewName(h)},getViewContext:()=>c.contextManager.getContext(),stop:()=>{d&&d.unsubscribe(),l&&l(),c.end(),u.forEach(h=>h.stop())}}}function KI(e,t,r,n,o,i,s=H(),a){const u=oe(),c=new x,l={};let d=0,f;const p=sr(o),v=yr();let h=!0,m=a==null?void 0:a.name;const E=(a==null?void 0:a.service)||n.service,S=(a==null?void 0:a.version)||n.version,D=a==null?void 0:a.context;D&&v.setContext(D);const _={id:u,name:m,startClocks:s,service:E,version:S,context:D};e.notify(1,_),e.notify(2,_);const{throttled:g,cancel:b}=En(Me,jI,{leading:!1}),{setLoadEvent:C,setViewEnd:Kt,stop:jn,stopINPTracking:Bn,getCommonViewMetrics:Gn}=UI(e,t,r,n,Pe,i,s),{stop:zn,initialViewMetrics:Tr}=i===Ie.INITIAL_LOAD?gI(n,s,C,Pe):{stop:k,initialViewMetrics:{}};i===Ie.BF_CACHE&&VI(s,Tr,Pe);const{stop:Kn,eventCounts:Hn}=oI(e,u,Pe),Wn=jt(Me,BI),qn=e.subscribe(11,ee=>{ee.reason===Ot.UNLOADING&&Me()});Me(),v.changeObservable.subscribe(Pe);function wr(){e.notify(3,{id:u,name:m,context:v.getContext(),startClocks:s,sessionIsActive:h})}function Pe(){wr(),g()}function Me(){b(),wr(),d+=1;const ee=f===void 0?j():f.timeStamp;e.notify(4,{customTimings:l,documentVersion:d,id:u,name:m,service:E,version:S,context:v.getContext(),loadingType:i,location:p,startClocks:s,commonViewMetrics:Gn(),initialViewMetrics:Tr,duration:B(s.timeStamp,ee),isActive:f===void 0,sessionIsActive:h,eventCounts:Hn})}return{get name(){return m},service:E,version:S,contextManager:v,stopObservable:c,end(ee={}){var we,Ze;f||(f=(we=ee.endClocks)!==null&&we!==void 0?we:H(),h=(Ze=ee.sessionIsActive)!==null&&Ze!==void 0?Ze:!0,e.notify(5,{endClocks:f}),e.notify(6,{endClocks:f}),_n(Wn),Kt(f.relative),jn(),qn.unsubscribe(),Me(),J(()=>{this.stop()},GI))},stop(){zn(),Kn(),Bn(),c.notify()},addTiming(ee,we){if(f)return;const Ze=Ry(we)?we:B(s.timeStamp,we);l[HI(ee)]=Ze,Pe()},setViewName(ee){m=ee,Me()}}}function HI(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&w.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function WI(e,t){return e.pathname!==t.pathname||!qI(t.hash)&&Ya(t.hash)!==Ya(e.hash)}function qI(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function Ya(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function YI(e,t,r,n,o,i,s,a,u,c){return e.subscribe(4,l=>e.notify(12,XI(l,r,a))),t.register(0,({startTime:l,eventType:d})=>{const f=u.findView(l);return f?{type:d,service:f.service,version:f.version,context:f.context,view:{id:f.id,name:f.name}}:me}),t.register(1,({startTime:l})=>{var d;return{view:{id:(d=u.findView(l))===null||d===void 0?void 0:d.id}}}),zI(n,e,o,i,r,s,!r.trackViewsManually,c)}function XI(e,t,r){var n,o,i,s,a,u,c,l,d,f,p,v,h,m,E,S,D,_;const g=r.getReplayStats(e.id),b=(o=(n=e.commonViewMetrics)===null||n===void 0?void 0:n.cumulativeLayoutShift)===null||o===void 0?void 0:o.devicePixelRatio,C={_dd:{document_version:e.documentVersion,replay_stats:g,cls:b?{device_pixel_ratio:b}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:A.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:(i=e.commonViewMetrics.cumulativeLayoutShift)===null||i===void 0?void 0:i.value,cumulative_layout_shift_time:O((s=e.commonViewMetrics.cumulativeLayoutShift)===null||s===void 0?void 0:s.time),cumulative_layout_shift_target_selector:(a=e.commonViewMetrics.cumulativeLayoutShift)===null||a===void 0?void 0:a.targetSelector,first_byte:O((u=e.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.firstByte),dom_complete:O((c=e.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.domComplete),dom_content_loaded:O((l=e.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domContentLoaded),dom_interactive:O((d=e.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:O(e.initialViewMetrics.firstContentfulPaint),first_input_delay:O((f=e.initialViewMetrics.firstInput)===null||f===void 0?void 0:f.delay),first_input_time:O((p=e.initialViewMetrics.firstInput)===null||p===void 0?void 0:p.time),first_input_target_selector:(v=e.initialViewMetrics.firstInput)===null||v===void 0?void 0:v.targetSelector,interaction_to_next_paint:O((h=e.commonViewMetrics.interactionToNextPaint)===null||h===void 0?void 0:h.value),interaction_to_next_paint_time:O((m=e.commonViewMetrics.interactionToNextPaint)===null||m===void 0?void 0:m.time),interaction_to_next_paint_target_selector:(E=e.commonViewMetrics.interactionToNextPaint)===null||E===void 0?void 0:E.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:O((S=e.initialViewMetrics.largestContentfulPaint)===null||S===void 0?void 0:S.value),largest_contentful_paint_target_selector:(D=e.initialViewMetrics.largestContentfulPaint)===null||D===void 0?void 0:D.targetSelector,load_event:O((_=e.initialViewMetrics.navigationTimings)===null||_===void 0?void 0:_.loadEvent),loading_time:Zl(O(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:JI(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:O(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:O(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:ST()}};return We(e.customTimings)||(C.view.custom_timings=yu(e.customTimings,O)),{rawRumEvent:C,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}function JI({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:r,firstInput:n,largestContentfulPaint:o}){return{cls:e&&{score:e.value,timestamp:O(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:r&&{timestamp:O(r)},fid:n&&{duration:O(n.delay),timestamp:O(n.time),target_selector:n.targetSelector},inp:t&&{duration:O(t.value),timestamp:O(t.time),target_selector:t.targetSelector},lcp:o&&{timestamp:O(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl}}}const ZI="rum";function QI(e,t,r){const n=Al(e,ZI,o=>tO(e,o),r);return n.expireObservable.subscribe(()=>{t.notify(9)}),n.renewObservable.subscribe(()=>{t.notify(10)}),n.sessionStateUpdateObservable.subscribe(({previousState:o,newState:i})=>{if(!o.forcedReplay&&i.forcedReplay){const s=n.findSession();s&&(s.isReplayForced=!0)}}),{findTrackedSession:o=>{const i=n.findSession(o);if(!(!i||i.trackingType==="0"))return{id:i.id,sessionReplay:i.trackingType==="1"?1:i.isReplayForced?2:0,anonymousId:i.anonymousId}},expire:n.expire,expireObservable:n.expireObservable,setForcedReplay:()=>n.updateSessionState({forcedReplay:"1"})}}function eO(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:_l("records")?1:0};return{findTrackedSession:()=>e,expire:k,expireObservable:new x,setForcedReplay:k}}function tO(e,t){return rO(t)?t:Ue(e.sessionSampleRate)?Ue(e.sessionReplaySampleRate)?"1":"2":"0"}function rO(e){return e==="0"||e==="1"||e==="2"}function nO(e,t,r,n,o,i){const s=[e.rumEndpointBuilder];e.replica&&s.push(e.replica.rumEndpointBuilder);const a=Xi({encoder:i(2),request:Yi(s,r),flushController:Ji({pageMayExitObservable:n,sessionExpireObservable:o})});return t.subscribe(13,u=>{u.type===A.VIEW?a.upsert(u,u.view.id):a.add(u)}),a}function oO(e){const t=Bt();e.subscribe(13,r=>{t.send("rum",r)})}const iO=Ye;function sO(e,t,r,n){const o=pt({expireDelay:iO});let i;e.subscribe(1,({startClocks:u})=>{const c=n.href;o.add(a({url:c,referrer:i||document.referrer}),u.relative),i=c}),e.subscribe(6,({endClocks:u})=>{o.closeActive(u.relative)});const s=r.subscribe(({newLocation:u})=>{const c=o.find();if(c){const l=ce();o.closeActive(l),o.add(a({url:u.href,referrer:c.referrer}),l)}});function a({url:u,referrer:c}){return{url:u,referrer:c}}return t.register(0,({startTime:u,eventType:c})=>{const l=o.find(u);return l?{type:c,view:{url:l.url,referrer:l.referrer}}:me}),{findUrl:u=>o.find(u),stop:()=>{s.unsubscribe(),o.stop()}}}function aO(e,t){let r=sr(t);return new x(n=>{const{stop:o}=cO(e,s),{stop:i}=uO(e,s);function s(){if(r.href===t.href)return;const a=sr(t);n.notify({newLocation:a,oldLocation:r}),r=a}return()=>{o(),i()}})}function cO(e,t){const{stop:r}=Ee(Xa("pushState"),"pushState",({onPostCall:i})=>{i(t)}),{stop:n}=Ee(Xa("replaceState"),"replaceState",({onPostCall:i})=>{i(t)}),{stop:o}=U(e,window,"popstate",t);return{stop:()=>{r(),n(),o()}}}function uO(e,t){return U(e,window,"hashchange",t)}function Xa(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const lO=Ye;function dO(e,t,r){const n=pt({expireDelay:lO});return e.subscribe(1,({startClocks:o})=>{n.add({},o.relative)}),e.subscribe(6,({endClocks:o})=>{n.closeActive(o.relative)}),t.register(0,({startTime:o,eventType:i})=>{if(!r.trackFeatureFlagsForEvents.concat([A.VIEW,A.ERROR]).includes(i))return q;const a=n.find(o);return!a||We(a)?q:{type:i,feature_flags:a}}),{addFeatureFlagEvaluation:(o,i)=>{const s=n.find();s&&(s[o]=i)}}}const fO=10*Q;let At,Fr;function pO(e,t,r){e.metricsEnabled&&(wd(),Fr=!1,t.subscribe(13,()=>{Fr=!0}),r.subscribe(({bytesCount:n,messagesCount:o})=>{Fr&&(Fr=!1,At.batchCount+=1,Za(At.batchBytesCount,n),Za(At.batchMessagesCount,o))}),jt(vO,fO))}function vO(){At.batchCount!==0&&(Ln("Customer data measures",At),wd())}function Ja(){return{min:1/0,max:0,sum:0}}function Za(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function wd(){At={batchCount:0,batchBytesCount:Ja(),batchMessagesCount:Ja()}}const hO=4e3,gO=500,mO=Ye;function _O(e,t,r=gO){const n=pt({expireDelay:mO,maxEntries:hO});let o;vt(N.VISIBILITY_STATE)&&performance.getEntriesByType(N.VISIBILITY_STATE).forEach(c=>{const l=c.name==="hidden"?"hidden":"active";s(l,c.startTime)}),s(Id(),ce());const{stop:i}=Ke(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],u=>{s(yO(u),u.timeStamp)},{capture:!0});function s(u,c=ce()){u!==o&&(o=u,n.closeActive(c),n.add({state:o,startTime:c},c))}function a(u,c,l){return n.findAll(c,l).some(d=>d.state===u)}return e.register(0,({startTime:u,duration:c=0,eventType:l})=>{if(l===A.VIEW){const d=n.findAll(u,c);return{type:l,_dd:{page_states:bO(d,u,r)}}}return l===A.ACTION||l===A.ERROR?{type:l,view:{in_foreground:a("active",u,0)}}:q}),{wasInPageStateDuringPeriod:a,addPageState:s,stop:()=>{i(),n.stop()}}}function bO(e,t,r){if(e.length!==0)return e.slice(-r).reverse().map(({state:n,startTime:o})=>({state:n,start:O(B(t,o))}))}function yO(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":Id()}function Id(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function EO(e,t){let r;const n=requestAnimationFrame(T(()=>{r=us()})),o=kI(t).subscribe(i=>{r=i}).unsubscribe;return e.register(0,({eventType:i})=>({type:i,display:r?{viewport:r}:void 0})),{stop:()=>{o(),n&&cancelAnimationFrame(n)}}}function SO(e,t){const r=window.cookieStore?TO(e):IO;return new x(n=>r(t,o=>n.notify(o)))}function TO(e){return(t,r)=>U(e,window.cookieStore,"change",o=>{const i=o.changed.find(s=>s.name===t)||o.deleted.find(s=>s.name===t);i&&r(i.value)}).stop}const wO=Q;function IO(e,t){const r=ar(document.cookie,e),n=jt(()=>{const o=ar(document.cookie,e);o!==r&&t(o)},wO);return()=>{_n(n)}}const Qa="datadog-ci-visibility-test-execution-id";function OO(e,t,r=SO(e,Qa)){var n;let o=Fe(Qa)||((n=window.Cypress)===null||n===void 0?void 0:n.env("traceId"));const i=r.subscribe(s=>{o=s});return t.register(0,({eventType:s})=>typeof o!="string"?q:{type:s,session:{type:"ci_test"},ci_test:{test_execution_id:o}}),{stop:()=>{i.unsubscribe()}}}const AO=Ye;function CO(e,t){const r=pt({expireDelay:AO}),n=vt(N.LONG_ANIMATION_FRAME)?N.LONG_ANIMATION_FRAME:N.LONG_TASK,o=Re(t,{type:n,buffered:!0}).subscribe(s=>{for(const a of s){if(!t.trackLongTasks)break;const u=bn(a.startTime),c=oe(),l=RO(a,u,c);e.notify(12,{rawRumEvent:l,startTime:u.relative,duration:a.duration,domainContext:{performanceEntry:a}}),r.add({id:c,startClocks:u,duration:a.duration,entryType:n},u.relative),r.closeActive(qe(u.relative,a.duration))}});return{stop:()=>{o.unsubscribe(),r.stop()},longTaskContexts:{findLongTasks:(s,a)=>r.findAll(s,a)}}}function RO(e,t,r){const n={date:t.timeStamp,type:A.LONG_TASK,_dd:{discarded:!1}};return e.entryType===N.LONG_TASK?W(y({},n),{long_task:{id:r,entry_type:Oa.LONG_TASK,duration:O(e.duration)}}):W(y({},n),{long_task:{id:r,entry_type:Oa.LONG_ANIMATION_FRAME,duration:O(e.duration),blocking_duration:O(e.blockingDuration),first_ui_event_timestamp:O(e.firstUIEventTimestamp),render_start:O(e.renderStart),style_and_layout_start:O(e.styleAndLayoutStart),start_time:O(e.startTime),scripts:e.scripts.map(o=>({duration:O(o.duration),pause_duration:O(o.pauseDuration),forced_style_and_layout_duration:O(o.forcedStyleAndLayoutDuration),start_time:O(o.startTime),execution_start:O(o.executionStart),source_url:o.sourceURL,source_function_name:o.sourceFunctionName,source_char_position:o.sourceCharPosition,invoker:o.invoker,invoker_type:o.invokerType,window_attribution:o.windowAttribution}))}})}function xO(e){e.register(0,({eventType:t})=>{if(!Ol())return q;const r=wl(),n=Il();return{type:t,session:{type:"synthetics"},synthetics:{test_id:r,result_id:n,injected:kn()}}})}function LO(e,t,r){const n=xn(e),o=r(n);return zi(t).forEach(([i,s])=>gi(e,n,i.split(/\.|(?=\[\])/),s)),o}function gi(e,t,r,n){const[o,...i]=r;if(o==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((s,a)=>gi(s,t[a],i,n));return}if(!(!ec(e)||!ec(t))){if(i.length>0)return gi(e[o],t[o],i,n);kO(e,o,t[o],n)}}function kO(e,t,r,n){const o=ft(r);o===n?e[t]=$(r):n==="object"&&(o==="undefined"||o==="null")&&(e[t]={})}function ec(e){return ft(e)==="object"}const mt={"view.name":"string","view.url":"string","view.referrer":"string"},_t={context:"object"},bt={service:"string",version:"string"};let Od;function NO(e,t,r,n,o){Od={[A.VIEW]:y(y(y({"view.performance.lcp.resource_url":"string"},_t),mt),bt),[A.ERROR]:y(y(y({"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string"},_t),mt),bt),[A.RESOURCE]:y(y(y({"resource.url":"string","resource.graphql.variables":"string"},_t),mt),bt),[A.ACTION]:y(y(y({"action.target.name":"string"},_t),mt),bt),[A.LONG_TASK]:y(y(y({"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string"},_t),mt),bt),[A.VITAL]:y(y(y({},_t),mt),bt)};const i={[A.ERROR]:Yr(A.ERROR,n,o),[A.ACTION]:Yr(A.ACTION,n,o),[A.VITAL]:Yr(A.VITAL,n,o)};t.subscribe(12,({startTime:s,duration:a,rawRumEvent:u,domainContext:c})=>{const l=r.triggerHook(0,{eventType:u.type,startTime:s,duration:a});if(l===me)return;const d=fe(l,u,{ddtags:Wi(e).join(",")});$O(d,e.beforeSend,c,i)&&(We(d.context)&&delete d.context,t.notify(13,d))})}function $O(e,t,r,n){var o;if(t){const s=LO(e,Od[e.type],a=>t(a,r));if(s===!1&&e.type!==A.VIEW)return!1;s===!1&&w.warn("Can't dismiss view events using beforeSend!")}return!((o=n[e.type])===null||o===void 0?void 0:o.isLimitReached())}function PO(e,t,r,n){e.register(0,({eventType:o,startTime:i})=>{const s=t.findTrackedSession(i),a=n.findView(i);if(!s||!a)return me;let u,c,l;return o===A.VIEW?(u=r.getReplayStats(a.id)?!0:void 0,c=s.sessionReplay===1,l=a.sessionIsActive?void 0:!1):u=r.isRecording()?!0:void 0,{type:o,session:{id:s.id,type:"user",has_replay:u,sampled_for_replay:c,is_active:l}}}),e.register(1,({startTime:o})=>{const i=t.findTrackedSession(o);return i?{session:{id:i.id}}:q})}function MO(e){e.register(0,({eventType:t})=>({type:t,connectivity:ul()}))}function DO(e,t,r){e.register(0,({eventType:n})=>{const o=t.source;return{type:n,_dd:{format_version:2,drift:Ay(),configuration:{session_sample_rate:St(t.sessionSampleRate,3),session_replay_sample_rate:St(t.sessionReplaySampleRate,3),profiling_sample_rate:St(t.profilingSampleRate,3),trace_sample_rate:St(t.traceSampleRate,3),beta_encode_cookie_options:t.betaEncodeCookieOptions},browser_sdk_version:Ce()?"6.25.2":void 0,sdk_name:r},application:{id:t.applicationId},date:j(),source:o}}),e.register(1,()=>({application:{id:t.applicationId}}))}function UO(e,t){e.register(1,()=>t.isGranted()?q:me)}const FO=yl,VO=[A.ACTION,A.ERROR,A.LONG_TASK,A.RESOURCE,A.VITAL];function jO(e){return{addEvent:(t,r,n,o)=>{VO.includes(r.type)&&e.notify(12,{startTime:t,rawRumEvent:r,domainContext:n,duration:o})}}}function BO(e,t){if(!t.metricsEnabled)return{stop:k};const{unsubscribe:r}=e.subscribe(4,({initialViewMetrics:n})=>{!n.largestContentfulPaint||!n.navigationTimings||(Ln("Initial view metrics",{metrics:GO(n.largestContentfulPaint,n.navigationTimings)}),r())});return{stop:r}}function GO(e,t){return{lcp:{value:e.value},navigation:{domComplete:t.domComplete,domContentLoaded:t.domContentLoaded,domInteractive:t.domInteractive,firstByte:t.firstByte,loadEvent:t.loadEvent}}}function zO(e,t,r,n,o,i,s,a,u){const c=[],l=new hw,d=FO();l.subscribe(13,g=>qi("rum",g));const f=g=>{l.notify(14,{error:g}),zt("Error reported to customer",{"error.message":g.message})},p=bl(e),v=p.subscribe(g=>{l.notify(11,g)});c.push(()=>v.unsubscribe());const h=El("browser-rum-sdk",e,d,f,p,o);c.push(h.stop);const m=Ce()?eO():QI(e,l,i);if(Ce())oO(l);else{const g=nO(e,l,f,p,m.expireObservable,o);c.push(()=>g.stop()),pO(h,l,g.flushController.flushObservable)}UO(d,i);const{stop:E}=BO(l,h);c.push(E);const _=KO(l,d,e,m,t,n,s,a,u,f),{stop:S}=_,D=Or(_,["stop"]);return c.push(S),a.unbuffer(),c.push(()=>r.stop()),W(y({},D),{lifeCycle:l,session:m,stopSession:()=>m.expire(),telemetry:h,stop:()=>{c.forEach(g=>g())},hooks:d})}function KO(e,t,r,n,o,i,s,a,u,c){const l=[],d=dw(),f=aO(r,location),{observable:p,stop:v}=pw();l.push(v),DO(t,r,u);const h=_O(t,r);l.push(()=>h.stop());const m=mw(e);l.push(()=>m.stop());const E=sO(e,t,f,location);l.push(()=>E.stop());const S=dO(e,t,r);PO(t,n,o,m),MO(t);const D=Pl(t,r,"rum",!0),_=Ml(t,r,n,"rum"),g=$l(t,r,"rum"),b=k0(e,t,d,p,r);l.push(b.stop);const C=jO(e),Kt=EO(t,r);l.push(Kt.stop);const jn=OO(r,t);l.push(jn.stop),xO(t),NO(r,e,t,c);const{addTiming:Bn,startView:Gn,setViewName:zn,setViewContext:Tr,setViewContextProperty:Kn,getViewContext:Hn,stop:Wn}=YI(e,t,r,location,d,p,f,o,m,i);l.push(Wn);const{stop:qn}=Y0(e,r,h);l.push(qn);const{stop:wr,longTaskContexts:Pe}=CO(e,r);l.push(wr);const{addError:Me}=P0(e,r,a);$w(e,r,n,_,g);const ee=wT(e,h,s),we=vw(r.applicationId,n,m,b.actionContexts,E);return{addAction:b.addAction,addEvent:C.addEvent,addError:Me,addTiming:Bn,addFeatureFlagEvaluation:S.addFeatureFlagEvaluation,startView:Gn,setViewContext:Tr,setViewContextProperty:Kn,getViewContext:Hn,setViewName:zn,viewHistory:m,getInternalContext:we.get,startDurationVital:ee.startDurationVital,stopDurationVital:ee.stopDurationVital,addDurationVital:ee.addDurationVital,addOperationStepVital:ee.addOperationStepVital,globalContext:D,userContext:_,accountContext:g,longTaskContexts:Pe,stop:()=>l.forEach(Ze=>Ze())}}function HO(e,{session:t,viewContext:r,errorType:n}){const o=t?t.id:"no-session-id",i=[];n!==void 0&&i.push(`error-type=${n}`),r&&(i.push(`seed=${r.id}`),i.push(`from=${r.startClocks.timeStamp}`));const s=WO(e),a=`/rum/replay/sessions/${o}`;return`${s}${a}?${i.join("&")}`}function WO(e){const t=e.site,r=e.subdomain||qO(e);return`https://${r?`${r}.`:""}${t}`}function qO(e){switch(e.site){case st:case mE:return"app";case Gu:return"dd";default:return}}const YO=1e3;let le;function ZC(e){return Dn(e).segments_count}function QC(e){Dn(e).segments_count+=1}function eR(e){Dn(e).records_count+=1}function tR(e,t){Dn(e).segments_total_raw_size+=t}function XO(e){return le==null?void 0:le.get(e)}function Dn(e){le||(le=new Map);let t;return le.has(e)?t=le.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},le.set(e,t),le.size>YO&&JO()),t}function JO(){if(!le)return;const e=le.keys().next().value;e&&le.delete(e)}function Ad(e,t,r){let n=0,o=[],i,s=!0,a=0;const u=[],{stop:c}=U(e,t,"message",({data:f})=>{if(f.type!=="wrote"||f.streamId!==r)return;const p=u[0];p&&(p.id===f.id?(u.shift(),n+=f.additionalBytesCount,o.push(f.result),i=f.trailer,p.writeCallback?p.writeCallback(f.result.byteLength):p.finishCallback&&p.finishCallback()):p.id<f.id&&c())});function l(){const f=o.length===0?new Uint8Array(0):el(o.concat(i)),p={rawBytesCount:n,output:f,outputBytesCount:f.byteLength,encoding:"deflate"};return n=0,o=[],p}function d(){s||(t.postMessage({action:"reset",streamId:r}),s=!0)}return{isAsync:!0,get isEmpty(){return s},write(f,p){t.postMessage({action:"write",id:a,data:f,streamId:r}),u.push({id:a,writeCallback:p,data:f}),s=!1,a+=1},finish(f){d(),u.length?(u.forEach(p=>{delete p.writeCallback}),u[u.length-1].finishCallback=()=>f(l())):f(l())},finishSync(){d();const f=u.map(p=>p.data).join("");return u.length=0,W(y({},l()),{pendingData:f})},estimateEncodedBytesCount(f){return f.length/8},stop(){c()}}}function ls({configuredUrl:e,error:t,source:r,scriptType:n}){if(w.error(`${r} failed to start: an error occurred while initializing the ${n}:`,t),t instanceof Event||t instanceof Error&&ZO(t.message)){let o;e?o=`Please make sure the ${n} URL ${e} is correct and CSP is correctly configured.`:o="Please make sure CSP is correctly configured.",w.error(`${o} See documentation at ${mn}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else n==="worker"&&Zi(t)}function ZO(e){return e.includes("Content Security Policy")||e.includes("requires 'TrustedScriptURL'")}const QO=30*Q;function Cd(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.25.2"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let V={status:0};function Rd(e,t,r,n=Cd){switch(V.status===0&&eA(e,t,n),V.status){case 1:return V.initializationFailureCallbacks.push(r),V.worker;case 3:return V.worker}}function tc(){return V.status}function eA(e,t,r=Cd){try{const n=r(e),{stop:o}=U(e,n,"error",a=>{Bo(e,t,a)}),{stop:i}=U(e,n,"message",({data:a})=>{a.type==="errored"?Bo(e,t,a.error,a.streamId):a.type==="initialized"&&rA(a.version)});n.postMessage({action:"init"}),J(()=>tA(t),QO),V={status:1,worker:n,stop:()=>{o(),i()},initializationFailureCallbacks:[]}}catch(n){Bo(e,t,n)}}function tA(e){V.status===1&&(w.error(`${e} failed to start: a timeout occurred while initializing the Worker`),V.initializationFailureCallbacks.forEach(t=>t()),V={status:2})}function rA(e){V.status===1&&(V={status:3,worker:V.worker,stop:V.stop,version:e})}function Bo(e,t,r,n){V.status===1||V.status===0?(ls({configuredUrl:e.workerUrl,error:r,source:t,scriptType:"worker"}),V.status===1&&V.initializationFailureCallbacks.forEach(o=>o()),V={status:2}):Zi(r,{worker_version:V.status===3&&V.version,stream_id:n})}function xd(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function nA(e,t,r,n){const o=t.findTrackedSession(),i=oA(o,n),s=r.findView();return HO(e,{viewContext:s,errorType:i,session:o})}function oA(e,t){if(!xd())return"browser-not-supported";if(!e)return"rum-not-tracked";if(e.sessionReplay===0)return"incorrect-session-plan";if(!t)return"replay-not-started"}function iA(e,t){if(!e.metricsEnabled)return{stop:k};let r,n,o;const{unsubscribe:i}=t.subscribe(s=>{switch(s.type){case"start":r={forced:s.forced,timestamp:j()},n=void 0,o=void 0;break;case"document-ready":r&&(n=B(r.timestamp,j()));break;case"recorder-settled":r&&(o=B(r.timestamp,j()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":i(),r&&Ln("Recorder init metrics",{metrics:sA(r.forced,o,B(r.timestamp,j()),s.type,n)});break}});return{stop:i}}function sA(e,t,r,n,o){return{forced:e,loadRecorderModuleDuration:t,recorderInitDuration:r,result:n,waitForDocReadyDuration:o}}function aA(e,t,r,n,o,i,s){let a=0,u;t.subscribe(9,()=>{(a===2||a===3)&&(f(),a=1)}),t.subscribe(10,()=>{a===1&&d()});const c=new x;iA(s,c);const l=async p=>{c.notify({type:"start",forced:p});const[v]=await Promise.all([rc(c,{type:"recorder-settled"},o()),rc(c,{type:"document-ready"},ZS(e,"interactive"))]);if(a!==2){c.notify({type:"aborted"});return}if(!v){a=0,c.notify({type:"recorder-load-failed"});return}const h=i();if(!h){a=0,c.notify({type:"deflate-encoder-load-failed"});return}({stop:u}=v(t,e,r,n,h,s)),a=3,c.notify({type:"succeeded"})};function d(p){const v=r.findTrackedSession();if(cA(v,p)){a=1;return}if(uA(a))return;a=2;const h=lA(v,p)||!1;l(h).catch(Ge),h&&r.setForcedReplay()}function f(){a===3&&(u==null||u()),a=0}return{start:d,stop:f,getSessionReplayLink(){return nA(e,r,n,a!==0)},isRecording:()=>a===3}}function cA(e,t){return!e||e.sessionReplay===0&&(!t||!t.force)}function uA(e){return e===2||e===3}function lA(e,t){return t&&t.force&&e.sessionReplay===0}async function rc(e,t,r){try{return await r}finally{e.notify(t)}}function dA(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:k},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function fA(e,t){if(Ce()&&!_l("records")||!xd())return{start:k,stop:k,getReplayStats:()=>{},onRumStart:k,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:r,shouldStartImmediately:n}=dA();return{start:i=>r.start(i),stop:()=>r.stop(),getSessionReplayLink:()=>r.getSessionReplayLink(),onRumStart:o,isRecording:()=>tc()===3&&r.isRecording(),getReplayStats:i=>tc()===3?XO(i):void 0};function o(i,s,a,u,c,l){let d;function f(){return d||(c!=null||(c=Rd(s,"Datadog Session Replay",()=>{r.stop()},t)),c&&(d=Ad(s,c,1))),d}r=aA(s,i,a,u,e,f,l),n(s)&&r.start()}}const pA="modulepreload",vA=function(e,t){return new URL(e,t).href},nc={},Ld=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){const s=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),u=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.allSettled(r.map(c=>{if(c=vA(c,n),c in nc)return;nc[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(!!n)for(let v=s.length-1;v>=0;v--){const h=s[v];if(h.href===c&&(!l||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${d}`))return;const p=document.createElement("link");if(p.rel=l?"stylesheet":pA,l||(p.as="script"),p.crossOrigin="",p.href=c,u&&p.setAttribute("nonce",u),document.head.appendChild(p),l)return new Promise((v,h)=>{p.addEventListener("load",v),p.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};async function hA(e=gA){try{return await e()}catch(t){ls({error:t,source:"Recorder",scriptType:"module"})}}async function gA(){return(await Ld(()=>import("./assets/startRecording-CuFdVhxx.js"),[],import.meta.url)).startRecording}function mA(){return ue().Profiler!==void 0}function _A(e){let t={status:"starting"};return e.register(0,({eventType:r})=>r!==A.VIEW&&r!==A.LONG_TASK?q:{type:r,_dd:{profiling:t}}),{get:()=>t,set:r=>{t=r}}}async function bA(e=yA){try{return await e()}catch(t){ls({error:t,source:"Profiler",scriptType:"module"})}}async function yA(){return(await Ld(()=>import("./assets/profiler-BRmTNL9s.js"),[],import.meta.url)).createRumProfiler}function EA(){let e;function t(r,n,o,i,s,a,u){const c=i.findTrackedSession();if(!c||!jl(c.id,o.profilingSampleRate))return;const l=_A(n);if(!mA()){l.set({status:"error",error_reason:"not-supported-by-browser"});return}bA().then(d=>{if(!d){zt("[DD_RUM] Failed to lazy load the RUM Profiler"),l.set({status:"error",error_reason:"failed-to-lazy-load"});return}e=d(o,r,i,l,a,u,s,void 0),e.start()}).catch(Ge)}return{onRumStart:t,stop:()=>{e==null||e.stop().catch(Ge)}}}const SA=fA(hA),TA=EA(),mi=uw(zO,SA,TA,{startDeflateWorker:Rd,createDeflateEncoder:Ad,sdkName:"rum"});ol(ue(),"DD_RUM",mi);function ln(e,t,r){const n=r.getHandler(),o=Array.isArray(n)?n:[n];return oc[e]>=oc[r.getLevel()]&&o.includes(t)}const I={ok:"ok",debug:"debug",info:"info",notice:"notice",warn:"warn",error:"error",critical:"critical",alert:"alert",emerg:"emerg"},oc={[I.ok]:0,[I.debug]:1,[I.info]:2,[I.notice]:4,[I.warn]:5,[I.error]:6,[I.critical]:7,[I.alert]:8,[I.emerg]:9};function Un(e,{includeMessage:t=!1}={}){return{stack:e.stack,kind:e.type,message:t?e.message:void 0,causes:e.causes,fingerprint:e.fingerprint,handling:e.handling}}var wA=function(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i};const lr={console:"console",http:"http"},IA=Object.keys(I);class pe{constructor(t,r,n=lr.http,o=I.debug,i={}){this.handleLogStrategy=t,this.handlerType=n,this.level=o,this.contextManager=yr("logger"),this.tags=[],this.contextManager.setContext(i),r&&this.contextManager.setContextProperty("logger",{name:r})}logImplementation(t,r,n=I.info,o,i){const s=$(r);let a;if(o!=null){const u=Cn({originalError:o,nonErrorPrefix:"Provided",source:ae.LOGGER,handling:"handled",startClocks:H()});a=fe({error:Un(u,{includeMessage:!0})},u.context,s)}else a=s;this.handleLogStrategy({message:$(t),context:a,status:n},this,i)}log(t,r,n=I.info,o){let i;ln(n,lr.http,this)&&(i=Nt("log")),this.logImplementation(t,r,n,o,i)}setContext(t){this.contextManager.setContext(t)}getContext(){return this.contextManager.getContext()}setContextProperty(t,r){this.contextManager.setContextProperty(t,r)}removeContextProperty(t){this.contextManager.removeContextProperty(t)}clearContext(){this.contextManager.clearContext()}addTag(t,r){this.tags.push(tt(t,r))}removeTagsWithKey(t){const r=cl(t);this.tags=this.tags.filter(n=>n!==r&&!n.startsWith(`${r}:`))}getTags(){return this.tags.slice()}setHandler(t){this.handlerType=t}getHandler(){return this.handlerType}setLevel(t){this.level=t}getLevel(){return this.level}}wA([Ty],pe.prototype,"logImplementation",null);pe.prototype.ok=$e(I.ok);pe.prototype.debug=$e(I.debug);pe.prototype.info=$e(I.info);pe.prototype.notice=$e(I.notice);pe.prototype.warn=$e(I.warn);pe.prototype.error=$e(I.error);pe.prototype.critical=$e(I.critical);pe.prototype.alert=$e(I.alert);pe.prototype.emerg=$e(I.emerg);function $e(e){return function(t,r,n){let o;ln(e,lr.http,this)&&(o=Nt("log")),this.logImplementation(t,r,e,n,o)}}function ic(){return dt?{}:{view:{referrer:document.referrer,url:window.location.href}}}const OA=32*Xe;function AA(e,t){e.usePciIntake===!0&&e.site&&e.site!=="datadoghq.com"&&w.warn("PCI compliance for Logs is only available for Datadog organizations in the US1 site. Default intake will be used.");const r=Hu(e,t),n=sc(e.forwardConsoleLogs,an(F),"Forward Console Logs"),o=sc(e.forwardReports,an(Pt),"Forward Reports");if(!(!r||!n||!o))return e.forwardErrorsToLogs&&!n.includes(F.error)&&n.push(F.error),y({forwardErrorsToLogs:e.forwardErrorsToLogs!==!1,forwardConsoleLogs:n,forwardReports:o,requestErrorResponseLengthLimit:OA},r)}function sc(e,t,r){if(e===void 0)return[];if(!(e==="all"||Array.isArray(e)&&e.every(n=>t.includes(n)))){w.error(`${r} should be "all" or an array with allowed values "${t.join('", "')}"`);return}return e==="all"?t:US(e)}function CA(e){const t=Wu(e);return y({forward_errors_to_logs:e.forwardErrorsToLogs,forward_console_logs:e.forwardConsoleLogs,forward_reports:e.forwardReports,use_pci_intake:e.usePciIntake},t)}function RA(e,t,r){const n=Nl(),o=os();$o(o,L.globalContext,n);const i=ns();$o(i,L.accountContext,n);const s=is();$o(s,L.userContext,n);let a,u;const c=t.observable.subscribe(l);function l(){if(!u||!a||!t.isGranted())return;c.unsubscribe();const d=r(a,u);n.drain(d)}return{init(d,f){if(!d){w.error("Missing configuration");return}if(qu(d.enableExperimentalFeatures),Ce()&&(d=xA(d)),a=d,Sl(CA(d)),u){Rn("DD_LOGS",d);return}const p=AA(d,f);p&&(u=p,Nn().subscribe(k),t.tryToInit(p.trackingConsent),l())},get initConfiguration(){return a},globalContext:o,accountContext:i,userContext:s,getInternalContext:k,handleLog(d,f,p,v=e(),h=j()){n.add(m=>m.handleLog(d,f,p,v,h))}}}function xA(e){return W(y({},e),{clientToken:"empty"})}function LA(e){const t=Bu(),r=Dl().observable;let n=RA(ic,t,(a,u)=>{const c=e(u,ic,t,r);return n=kA(a,c),c});const o=()=>n,i={},s=new pe((...a)=>n.handleLog(...a));return nl({logger:s,init:a=>{const u=new Error().stack;Oe(()=>n.init(a,u))},setTrackingConsent:T(a=>{t.update(a),G({feature:"set-tracking-consent",tracking_consent:a})}),getGlobalContext:P(o,L.globalContext,M.getContext),setGlobalContext:P(o,L.globalContext,M.setContext),setGlobalContextProperty:P(o,L.globalContext,M.setContextProperty),removeGlobalContextProperty:P(o,L.globalContext,M.removeContextProperty),clearGlobalContext:P(o,L.globalContext,M.clearContext),createLogger:T((a,u={})=>(i[a]=new pe((...c)=>n.handleLog(...c),$(a),u.handler,u.level,$(u.context)),i[a])),getLogger:T(a=>i[a]),getInitConfiguration:T(()=>xn(n.initConfiguration)),getInternalContext:T(a=>n.getInternalContext(a)),setUser:P(o,L.userContext,M.setContext),getUser:P(o,L.userContext,M.getContext),setUserProperty:P(o,L.userContext,M.setContextProperty),removeUserProperty:P(o,L.userContext,M.removeContextProperty),clearUser:P(o,L.userContext,M.clearContext),setAccount:P(o,L.accountContext,M.setContext),getAccount:P(o,L.accountContext,M.getContext),setAccountProperty:P(o,L.accountContext,M.setContextProperty),removeAccountProperty:P(o,L.accountContext,M.removeContextProperty),clearAccount:P(o,L.accountContext,M.clearContext)})}function kA(e,t){return y({init:r=>{Rn("DD_LOGS",r)},initConfiguration:e},t)}const NA="logs";function $A(e,t){const r=Al(e,NA,n=>kd(e,n),t);return{findTrackedSession:(n,o={returnInactive:!1})=>{const i=r.findSession(n,o);return i&&i.trackingType==="1"?{id:i.id,anonymousId:i.anonymousId}:void 0},expireObservable:r.expireObservable}}function PA(e){const r=kd(e)==="1"?{}:void 0;return{findTrackedSession:()=>r,expireObservable:new x}}function kd(e,t){return MA(t)?t:Ue(e.sessionSampleRate)?"1":"0"}function MA(e){return e==="0"||e==="1"}function DA(e,t,r,n,o,i){const s=IA.concat(["custom"]),a={};s.forEach(u=>{a[u]=Yr(u,o,i)}),t.subscribe(0,({rawLogsEvent:u,messageContext:c=void 0,savedCommonContext:l=void 0,domainContext:d,ddtags:f=[]})=>{var p,v;const h=yn(u.date),m=l||n(),E=r.triggerHook(0,{startTime:h});if(E===me)return;const S=Wi(e),D=fe({view:m.view},E,u,c,{ddtags:S.concat(f).join(",")});((p=e.beforeSend)===null||p===void 0?void 0:p.call(e,D,d))===!1||D.origin!==ae.AGENT&&((v=a[D.status])!==null&&v!==void 0?v:a.custom).isLimitReached()||t.notify(1,D)})}const UA={[F.log]:I.info,[F.debug]:I.debug,[F.info]:I.info,[F.warn]:I.warn,[F.error]:I.error};function FA(e,t){const r=kl(e.forwardConsoleLogs).subscribe(n=>{var o;const i={rawLogsEvent:{date:j(),message:n.message,origin:ae.CONSOLE,error:n.error&&Un(n.error),status:UA[n.api]},messageContext:(o=n.error)===null||o===void 0?void 0:o.context,domainContext:{handlingStack:n.handlingStack}};t.notify(0,i)});return{stop:()=>{r.unsubscribe()}}}function VA(e,t){const r=il(e,e.forwardReports).subscribe(n=>{let o=n.message,i;const s=n.originalError.type==="deprecation"?I.warn:I.error;s===I.error?i=Un(n):n.stack&&(o+=` Found in ${eS(n.stack)}`),t.notify(0,{rawLogsEvent:{date:j(),message:o,origin:ae.REPORT,error:i,status:s}})});return{stop:()=>{r.unsubscribe()}}}function jA(e,t){if(!e.forwardErrorsToLogs)return{stop:k};const r=(dt?new x:xl(e)).subscribe(s=>{s.state==="complete"&&i(ut.XHR,s)}),n=Nn({responseBodyAction:s=>o(s)?2:0}).subscribe(s=>{s.state==="resolve"&&i(ut.FETCH,s)});function o(s){return!Ku(s.url)&&(BA(s)||ll(s.status))}function i(s,a){if(!o(a))return;const u="error"in a&&a.error?br(_r(a.error)):a.responseBody||"Failed to load",c={isAborted:a.isAborted,handlingStack:a.handlingStack};t.notify(0,{rawLogsEvent:{message:`${GA(s)} error ${a.method} ${a.url}`,date:a.startClocks.timeStamp,error:{stack:Sn(u,e.requestErrorResponseLengthLimit,"..."),handling:void 0},http:{method:a.method,status_code:a.status,url:a.url},status:I.error,origin:ae.NETWORK},domainContext:c})}return{stop:()=>{r.unsubscribe(),n.unsubscribe()}}}function BA(e){return e.status===0&&e.responseType!=="opaque"}function GA(e){return ut.XHR===e?"XHR":"Fetch"}function zA(e,t,r){if(!e.forwardErrorsToLogs)return{stop:k};const n=r.subscribe(o=>{if(o.type===0){const i=o.error;t.notify(0,{rawLogsEvent:{message:i.message,date:i.startClocks.timeStamp,error:Un(i),origin:ae.SOURCE,status:I.error},messageContext:i.context})}});return{stop:()=>{n.unsubscribe()}}}const KA=Rl;function HA(e){function t(r,n,o,i,s){const a=fe(n.getContext(),r.context);if(ln(r.status,lr.console,n)&&qA(r,a),ln(r.status,lr.http,n)){const u={rawLogsEvent:{date:s||j(),message:r.message,status:r.status,origin:ae.LOGGER},messageContext:a,savedCommonContext:i,ddtags:n.getTags()};o&&(u.domainContext={handlingStack:o}),e.notify(0,u)}}return{handleLog:t}}const WA={[I.ok]:F.debug,[I.debug]:F.debug,[I.info]:F.info,[I.notice]:F.info,[I.warn]:F.warn,[I.error]:F.error,[I.critical]:F.error,[I.alert]:F.error,[I.emerg]:F.error};function qA({status:e,message:t},r){rt[WA[e]].call(ye,t,r)}function YA(e,t,r,n,o){const i=[e.logsEndpointBuilder];e.replica&&i.push(e.replica.logsEndpointBuilder);const s=Xi({encoder:Qi(),request:Yi(i,r),flushController:Ji({pageMayExitObservable:n,sessionExpireObservable:o.expireObservable})});return t.subscribe(1,a=>{s.add(a)}),s}function XA(e){const t=Bt();e.subscribe(1,r=>{t.send("log",r)})}function JA(e){return{get:t=>{const r=e.findTrackedSession(t);if(r)return{session_id:r.id}}}}function ZA(e){return t=>{e.notify(0,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,origin:ae.AGENT,status:I.error}}),zt("Error reported to customer",{"error.message":t.message})}}const QA=yl;function eC(e){const t=ge;e.register(0,({startTime:o})=>{const i=r(o);return i||q}),e.register(1,({startTime:o})=>{var i,s;const a=r(o);return a?{application:{id:a.application_id},view:{id:(i=a.view)===null||i===void 0?void 0:i.id},action:{id:(s=a.user_action)===null||s===void 0?void 0:s.id}}:q});function r(o){const s=kn()?t.DD_RUM_SYNTHETICS:t.DD_RUM,a=n(o,s);if(a)return a}function n(o,i){if(i&&i.getInternalContext)return i.getInternalContext(o)}}function tC(e,t,r){e.register(0,({startTime:n})=>{const o=r.findTrackedSession(n);return r.findTrackedSession(n,{returnInactive:!0})?{service:t.service,session_id:o?o.id:void 0,session:o?{id:o.id}:void 0}:me}),e.register(1,({startTime:n})=>{const o=r.findTrackedSession(n);return!o||!o.id?q:{session:{id:o.id}}})}function rC(e,t){function r(){return t.isGranted()?q:me}e.register(0,r),e.register(1,r)}const Go="logs";function nC(e,t,r,n){const o=new KA,i=QA(),s=[];o.subscribe(1,m=>qi("logs",m));const a=ZA(o),u=dt?new x:bl(e),c=El("browser-logs-sdk",e,i,a,u,Qi);s.push(c.stop);const l=e.sessionStoreStrategyType&&!Ce()&&!kn()?$A(e,r):PA(e);rC(i,r),tC(i,e,l);const d=$l(i,e,Go),f=Ml(i,e,l,Go),p=Pl(i,e,Go,!1);eC(i),jA(e,o),zA(e,o,n),n.unbuffer(),FA(e,o),VA(e,o);const{handleLog:v}=HA(o);if(DA(e,o,i,t,a),Ce())XA(o);else{const{stop:m}=YA(e,o,a,u,l);s.push(()=>m())}const h=JA(l);return{handleLog:v,getInternalContext:h.get,accountContext:d,globalContext:p,userContext:f,stop:()=>{s.forEach(m=>m())}}}const ds=LA(nC);ol(ue(),"DD_LOGS",ds);var Nd={},$d={},Pd={};Object.defineProperty(Pd,"__esModule",{value:!0});var Md={};Object.defineProperty(Md,"__esModule",{value:!0});var Dd={};Object.defineProperty(Dd,"__esModule",{value:!0});var Ud={};Object.defineProperty(Ud,"__esModule",{value:!0});var Fd={};Object.defineProperty(Fd,"__esModule",{value:!0});var Vd={};Object.defineProperty(Vd,"__esModule",{value:!0});var jd={};Object.defineProperty(jd,"__esModule",{value:!0});(function(e){var t=z&&z.__createBinding||(Object.create?function(n,o,i,s){s===void 0&&(s=i);var a=Object.getOwnPropertyDescriptor(o,i);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,s,a)}:function(n,o,i,s){s===void 0&&(s=i),n[s]=o[i]}),r=z&&z.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Pd,e),r(Md,e),r(Dd,e),r(Ud,e),r(Fd,e),r(Vd,e),r(jd,e)})($d);var Bd={},Fn={},Vn={exports:{}};function oC(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}var iC=sC;function sC(e,t,r){var n=r&&r.stringify||oC,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var s=new Array(i);s[0]=n(e);for(var a=1;a<i;a++)s[a]=n(t[a]);return s.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var c="",l=1-o,d=-1,f=e&&e.length||0,p=0;p<f;){if(e.charCodeAt(p)===37&&p+1<f){switch(d=d>-1?d:0,e.charCodeAt(p+1)){case 100:case 102:if(l>=u||t[l]==null)break;d<p&&(c+=e.slice(d,p)),c+=Number(t[l]),d=p+2,p++;break;case 105:if(l>=u||t[l]==null)break;d<p&&(c+=e.slice(d,p)),c+=Math.floor(Number(t[l])),d=p+2,p++;break;case 79:case 111:case 106:if(l>=u||t[l]===void 0)break;d<p&&(c+=e.slice(d,p));var v=typeof t[l];if(v==="string"){c+="'"+t[l]+"'",d=p+2,p++;break}if(v==="function"){c+=t[l].name||"<anonymous>",d=p+2,p++;break}c+=n(t[l]),d=p+2,p++;break;case 115:if(l>=u)break;d<p&&(c+=e.slice(d,p)),c+=String(t[l]),d=p+2,p++;break;case 37:d<p&&(c+=e.slice(d,p)),c+="%",d=p+2,p++,l--;break}++l}++p}return d===-1?e:(d<f&&(c+=e.slice(d)),c)}const ac=iC;Vn.exports=Le;const dr=EC().console||{},aC={mapHttpRequest:Vr,mapHttpResponse:Vr,wrapRequestSerializer:zo,wrapResponseSerializer:zo,wrapErrorSerializer:zo,req:Vr,res:Vr,err:uc,errWithCause:uc};function Ve(e,t){return e==="silent"?1/0:t.levels.values[e]}const fs=Symbol("pino.logFuncs"),_i=Symbol("pino.hierarchy"),cC={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function cc(e,t){const r={logger:t,parent:e[_i]};t[_i]=r}function uC(e,t,r){const n={};t.forEach(o=>{n[o]=r[o]?r[o]:dr[o]||dr[cC[o]||"log"]||Ct}),e[fs]=n}function lC(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function Le(e){e=e||{},e.browser=e.browser||{};const t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");const r=e.browser.write||dr;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},o=lC(e.browser.serialize,n);let i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);const s=Object.keys(e.customLevels||{}),a=["error","fatal","warn","info","debug","trace"].concat(s);typeof r=="function"&&a.forEach(function(h){r[h]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");const u=e.level||"info",c=Object.create(r);c.log||(c.log=Ct),uC(c,a,r),cc({},c),Object.defineProperty(c,"levelVal",{get:d}),Object.defineProperty(c,"level",{get:f,set:p});const l={transmit:t,serialize:o,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:a,timestamp:_C(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Ct};c.levels=dC(e),c.level=u,c.isLevelEnabled=function(h){return this.levels.values[h]?this.levels.values[h]>=this.levels.values[this.level]:!1},c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=Ct,c.serializers=n,c._serialize=o,c._stdErrSerialize=i,c.child=function(...h){return v.call(this,l,...h)},t&&(c._logEvent=bi());function d(){return Ve(this.level,this)}function f(){return this._level}function p(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,et(this,l,c,"error"),et(this,l,c,"fatal"),et(this,l,c,"warn"),et(this,l,c,"info"),et(this,l,c,"debug"),et(this,l,c,"trace"),s.forEach(m=>{et(this,l,c,m)})}function v(h,m,E){if(!m)throw new Error("missing bindings for child Pino");E=E||{},o&&m.serializers&&(E.serializers=m.serializers);const S=E.serializers;if(o&&S){var D=Object.assign({},n,S),_=e.browser.serialize===!0?Object.keys(D):o;delete m.serializers,ps([m],_,D,this._stdErrSerialize)}function g(C){this._childLevel=(C._childLevel|0)+1,this.bindings=m,D&&(this.serializers=D,this._serialize=_),t&&(this._logEvent=bi([].concat(C._logEvent.bindings,m)))}g.prototype=this;const b=new g(this);return cc(this,b),b.child=function(...C){return v.call(this,h,...C)},b.level=E.level||this.level,h.onChild(b),b}return c}function dC(e){const t=e.customLevels||{},r=Object.assign({},Le.levels.values,t),n=Object.assign({},Le.levels.labels,fC(t));return{values:r,labels:n}}function fC(e){const t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}Le.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};Le.stdSerializers=aC;Le.stdTimeFunctions=Object.assign({},{nullTime:Gd,epochTime:zd,unixTime:bC,isoTime:yC});function pC(e){const t=[];e.bindings&&t.push(e.bindings);let r=e[_i];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function et(e,t,r,n){if(Object.defineProperty(e,n,{value:Ve(e.level,r)>Ve(n,r)?Ct:r[fs][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Ct){if(!t.transmit)return;const i=t.transmit.level||e.level,s=Ve(i,r);if(Ve(n,r)<s)return}e[n]=hC(e,t,r,n);const o=pC(e);o.length!==0&&(e[n]=vC(o,e[n]))}function vC(e,t){return function(){return t.apply(this,[...e,...arguments])}}function hC(e,t,r,n){return function(o){return function(){const s=t.timestamp(),a=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===dr?dr:this;for(var c=0;c<a.length;c++)a[c]=arguments[c];var l=!1;if(t.serialize&&(ps(a,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?o.call(u,...gC(this,n,a,s,t)):o.apply(u,a),t.transmit){const d=t.transmit.level||e._level,f=Ve(d,r),p=Ve(n,r);if(p<f)return;mC(this,{ts:s,methodLevel:n,methodValue:p,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Ve(e._level,r)},a,l)}}}(e[fs][n])}function gC(e,t,r,n,o){const{level:i,log:s=d=>d}=o.formatters||{},a=r.slice();let u=a[0];const c={};let l=(e._childLevel|0)+1;if(l<1&&(l=1),n&&(c.time=n),i){const d=i(t,e.levels.values[t]);Object.assign(c,d)}else c.level=e.levels.values[t];if(o.asObjectBindingsOnly){if(u!==null&&typeof u=="object")for(;l--&&typeof a[0]=="object";)Object.assign(c,a.shift());return[s(c),...a]}else{if(u!==null&&typeof u=="object"){for(;l--&&typeof a[0]=="object";)Object.assign(c,a.shift());u=a.length?ac(a.shift(),a):void 0}else typeof u=="string"&&(u=ac(a.shift(),a));return u!==void 0&&(c[o.messageKey]=u),[s(c)]}}function ps(e,t,r,n){for(const o in e)if(n&&e[o]instanceof Error)e[o]=Le.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(const i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function mC(e,t,r,n=!1){const o=t.send,i=t.ts,s=t.methodLevel,a=t.methodValue,u=t.val,c=e._logEvent.bindings;n||ps(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(l){return c.indexOf(l)===-1}),e._logEvent.level.label=s,e._logEvent.level.value=a,o(s,e._logEvent,u),e._logEvent=bi(c)}function bi(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function uc(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)t[r]===void 0&&(t[r]=e[r]);return t}function _C(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Gd:zd}function Vr(){return{}}function zo(e){return e}function Ct(){}function Gd(){return!1}function zd(){return Date.now()}function bC(){return Math.round(Date.now()/1e3)}function yC(){return new Date(Date.now()).toISOString()}function EC(){function e(t){return typeof t!="undefined"&&t}try{return typeof globalThis!="undefined"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}Vn.exports.default=Le;Vn.exports.pino=Le;var SC=Vn.exports,TC=z&&z.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.createLogger=wC;const lc=TC(SC);function wC(e,t){return e&&"write"in e?(0,lc.default)({level:"info"},e):(0,lc.default)(y({level:"info"},e),t)}var vs={};Object.defineProperty(vs,"__esModule",{value:!0});vs.createLoggerHttpMiddleware=OC;const IC=Fn;function OC(e){const{logger:t,genReqId:r,logRequest:n=!0}=e!=null?e:{};return(o,i,s)=>{const a=(t!=null?t:(0,IC.createLogger)()).child({req:{reqId:r==null?void 0:r(o),method:o.method,url:o.url,headers:o.headers,params:o.params,query:o.query}});if(o.logger=a,i.logger=a,o.startTime=Date.now(),n){const u=c=>{i.removeListener("error",u),i.removeListener("finish",u),i.removeListener("close",u),i.logger.info({err:c,duration:Date.now()-o.startTime},`Request ${o.method} ${o.url} ${c?"failed":"completed"}`)};i.on("finish",u),i.on("close",u),i.on("error",u)}s()}}(function(e){var t=z&&z.__createBinding||(Object.create?function(n,o,i,s){s===void 0&&(s=i);var a=Object.getOwnPropertyDescriptor(o,i);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,s,a)}:function(n,o,i,s){s===void 0&&(s=i),n[s]=o[i]}),r=z&&z.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Fn,e),r(vs,e)})(Bd);(function(e){var t=z&&z.__createBinding||(Object.create?function(n,o,i,s){s===void 0&&(s=i);var a=Object.getOwnPropertyDescriptor(o,i);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,s,a)}:function(n,o,i,s){s===void 0&&(s=i),n[s]=o[i]}),r=z&&z.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r($d,e),r(Bd,e)})(Nd);ds.init({clientToken:void 0,site:"datadoghq.com",service:"vwr-loader",env:void 0,version:void 0,forwardErrorsToLogs:!0,sessionSampleRate:100});function AC(e){const t=e,r=t.msg||"",n=t.error instanceof Error?t.error:void 0,c=t,{msg:o,level:i,time:s,error:a}=c,u=Or(c,["msg","level","time","error"]);return{msg:r,context:u,errorObj:n}}function jr(e,t,r){const{msg:n,context:o}=AC(e);console[t](n,o),ds.logger[r](n,o)}let ne=Nd.createLogger({type:"browser",browser:{asObject:!0,formatters:{level(e){return{level:e}}},write:{trace:e=>jr(e,"debug","debug"),debug:e=>jr(e,"debug","debug"),info:e=>jr(e,"info","info"),warn:e=>jr(e,"warn","warn")}}}).child({service:"vwr-loader",env:void 0,platform:void 0});const dc=void 0,fc=void 0;function CC(e){var t;try{if(!dc||!fc)throw new Error("Datadog credentials not provided");return mi.init({applicationId:dc,clientToken:fc,site:"datadoghq.com",service:(t=e.service)!=null?t:"vwr-loader",env:e.env,version:e.version,sessionSampleRate:100,sessionReplaySampleRate:0,trackResources:!0,trackLongTasks:!0,defaultPrivacyLevel:"mask-user-input",allowFallbackToLocalStorage:!0}),mi}catch(r){ne.error("Failed to initialize Datadog RUM:",r)}}const RC={ENV_VARS_MISSING:"ENV_VARS_MISSING"};class Sr extends Error{constructor(t,r,n={}){super(r),this.reason=t,this.message=r,this.context=n,this.name="InitializationError",Object.setPrototypeOf(this,Sr.prototype)}toJSON(){var t;return W(y({name:this.name,reason:this.reason,message:this.message},this.context),{cause:(t=this.context.cause)==null?void 0:t.message,stack:this.stack})}getContext(){return W(y({},this.context),{reason:this.reason})}}function Kd(e){return e instanceof Error&&e.name==="VWRInitializationError"}function xC(e){try{const r=performance.getEntriesByType("navigation")[0];(r==null?void 0:r.type)==="back_forward"&&(ne.info({platform:e,navigationType:r.type},"[Shell] Back navigation detected, exiting app"),LC(e))}catch(t){ne.warn({error:t},"[Shell] Could not check navigation type")}}function LC(e){switch(e){case"SAMSUNG_TV":kC();break;case"LG_TV":NC();break;case"FIRE_TV":$C();break;default:ne.info({platform:e},"[Shell] No platform-specific exit")}}function kC(){var e,t;try{(t=(e=window.tizen)==null?void 0:e.application)!=null&&t.getCurrentApplication?window.tizen.application.getCurrentApplication().exit():ne.warn("[Shell] Tizen exit API not available")}catch(r){ne.error({error:r},"[Shell] Failed to exit Samsung app")}}function NC(){try{window.close()}catch(e){ne.error({error:e},"[Shell] Failed to exit LG app")}}function $C(){var e,t,r;try{(r=(t=(e=window.Capacitor)==null?void 0:e.Plugins)==null?void 0:t.AppLifecycle)!=null&&r.exitApp?window.Capacitor.Plugins.AppLifecycle.exitApp().catch(n=>{ne.error({error:n},"[Shell] Failed to exit Fire TV app")}):ne.warn("[Shell] Capacitor AppLifecycle plugin not available")}catch(n){ne.error({error:n},"[Shell] Failed to exit Fire TV app")}}const PC=void 0,MC=void 0,DC=async e=>{const t=performance.now();try{await UC(e),e==null||e.addAction("vwr:init:complete",{outcome:"success",duration_ms:performance.now()-t})}catch(r){e==null||e.addAction("vwr:init:complete",{outcome:"failure",duration_ms:performance.now()-t});let n="UNKNOWN_ERROR";throw(r instanceof Sr||Kd(r))&&(n=r.reason),e==null||e.addAction("vwr:fallback",{reason:n,error_type:r instanceof Error?r.name:"UnknownError"}),r}};async function UC(e){throw new Sr(RC.ENV_VARS_MISSING,"[Shell] Required environment variables not injected (PLATFORM, CONFIG_URL, or CONFIG_FILE)",{configUrl:PC,configFile:MC})}const Ko=void 0,FC=void 0,VC=void 0;function jC(e){if(e instanceof Sr||Kd(e))ne.error({context:e.getContext(),error_type:e.name,error:e},`[Shell] FALLBACK TO HUB - ${e.message}`);else{const t=e instanceof Error?e:new Error(String(e));ne.error({reason:t.message,error_type:t.name,error:t},"[Shell] FALLBACK TO HUB - Init failed (unknown error)")}}async function BC(){var r;xC(Ko),ne.info("VWR loader starting init flow");const e=CC({env:"unknown",version:VC,service:"vwr-loader"});let t;try{await DC(e),t==null||t()}catch(n){try{jC(n)}finally{let o;const i=((r=new URLSearchParams(window.location.search).get("gameControllerUrl"))==null?void 0:r.trim())||null;i?(o=new URL(i),ne.info({gameControllerUrl:i},"[Shell] Using gameControllerUrl as fallback")):(o=new URL(FC),o.searchParams.set("volley_platform",Ko),o.searchParams.set("version","unknown"),ne.info({PLATFORM:Ko},"[Shell] No gameControllerUrl, redirecting to Hub")),window.location.href=o.toString()}}}BC();export{Ay as $,ss as A,KC as B,Do as C,aT as D,fw as E,T as F,zw as G,qi as H,eR as I,ZC as J,QC as K,tR as L,IS as M,R as N,de as O,qC as P,J as Q,A as R,Q as S,Ln as T,Bt as U,Yi as V,Ce as W,zt as X,$t as Y,zi as Z,Wi as _,c0 as a,Ge as a0,ue as a1,w as a2,H as a3,Ou as a4,Tn as b,YC as c,Cw as d,a0 as e,sd as f,XC as g,HC as h,zC as i,Gw as j,WC as k,B as l,us as m,LI as n,JC as o,ed as p,En as q,s0 as r,ad as s,j as t,Ke as u,Mn as v,U as w,kI as x,k as y,Ee as z};
1
+ var qd=Object.defineProperty,Yd=Object.defineProperties;var Xd=Object.getOwnPropertyDescriptors;var Ir=Object.getOwnPropertySymbols;var gs=Object.prototype.hasOwnProperty,ms=Object.prototype.propertyIsEnumerable;var hs=(e,t,r)=>t in e?qd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))gs.call(t,r)&&hs(e,r,t[r]);if(Ir)for(var r of Ir(t))ms.call(t,r)&&hs(e,r,t[r]);return e},W=(e,t)=>Yd(e,Xd(t));var Or=(e,t)=>{var r={};for(var n in e)gs.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ir)for(var n of Ir(e))t.indexOf(n)<0&&ms.call(e,n)&&(r[n]=e[n]);return r};(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var z=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Ht=function(e){return e&&e.Math===Math&&e},K=Ht(typeof globalThis=="object"&&globalThis)||Ht(typeof window=="object"&&window)||Ht(typeof self=="object"&&self)||Ht(typeof z=="object"&&z)||Ht(typeof z=="object"&&z)||function(){return this}()||Function("return this")(),yi={},X=function(e){try{return!!e()}catch(t){return!0}},Jd=X,Le=!Jd(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Zd=X,Ei=!Zd(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Qd=Ei,Ar=Function.prototype.call,ve=Qd?Ar.bind(Ar):function(){return Ar.apply(Ar,arguments)},vc={},hc={}.propertyIsEnumerable,gc=Object.getOwnPropertyDescriptor,ef=gc&&!hc.call({1:2},1);vc.f=ef?function(t){var r=gc(this,t);return!!r&&r.enumerable}:hc;var dn=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},mc=Ei,_c=Function.prototype,Ho=_c.call,tf=mc&&_c.bind.bind(Ho,Ho),Q=mc?tf:function(e){return function(){return Ho.apply(e,arguments)}},bc=Q,rf=bc({}.toString),nf=bc("".slice),lt=function(e){return nf(rf(e),8,-1)},of=Q,sf=X,af=lt,Yn=Object,cf=of("".split),uf=sf(function(){return!Yn("z").propertyIsEnumerable(0)})?function(e){return af(e)==="String"?cf(e,""):Yn(e)}:Yn,fn=function(e){return e==null},lf=fn,df=TypeError,Mt=function(e){if(lf(e))throw new df("Can't call method on "+e);return e},ff=uf,pf=Mt,pn=function(e){return ff(pf(e))},Xn=typeof document=="object"&&document.all,J=typeof Xn=="undefined"&&Xn!==void 0?function(e){return typeof e=="function"||e===Xn}:function(e){return typeof e=="function"},vf=J,Se=function(e){return typeof e=="object"?e!==null:vf(e)},Jn=K,hf=J,gf=function(e){return hf(e)?e:void 0},vn=function(e,t){return arguments.length<2?gf(Jn[e]):Jn[e]&&Jn[e][t]},mf=Q,Si=mf({}.isPrototypeOf),_f=K,_s=_f.navigator,bs=_s&&_s.userAgent,yc=bs?String(bs):"",Ec=K,Zn=yc,ys=Ec.process,Es=Ec.Deno,Ss=ys&&ys.versions||Es&&Es.version,Ts=Ss&&Ss.v8,he,Zr;Ts&&(he=Ts.split("."),Zr=he[0]>0&&he[0]<4?1:+(he[0]+he[1]));!Zr&&Zn&&(he=Zn.match(/Edge\/(\d+)/),(!he||he[1]>=74)&&(he=Zn.match(/Chrome\/(\d+)/),he&&(Zr=+he[1])));var Sc=Zr,ws=Sc,bf=X,yf=K,Ef=yf.String,Tc=!!Object.getOwnPropertySymbols&&!bf(function(){var e=Symbol("symbol detection");return!Ef(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ws&&ws<41}),Sf=Tc,wc=Sf&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Tf=vn,wf=J,If=Si,Of=wc,Af=Object,Ic=Of?function(e){return typeof e=="symbol"}:function(e){var t=Tf("Symbol");return wf(t)&&If(t.prototype,Af(e))},Cf=String,hn=function(e){try{return Cf(e)}catch(t){return"Object"}},Rf=J,xf=hn,kf=TypeError,Dt=function(e){if(Rf(e))return e;throw new kf(xf(e)+" is not a function")},Lf=Dt,Nf=fn,fr=function(e,t){var r=e[t];return Nf(r)?void 0:Lf(r)},Qn=ve,eo=J,to=Se,$f=TypeError,Pf=function(e,t){var r,n;if(t==="string"&&eo(r=e.toString)&&!to(n=Qn(r,e))||eo(r=e.valueOf)&&!to(n=Qn(r,e))||t!=="string"&&eo(r=e.toString)&&!to(n=Qn(r,e)))return n;throw new $f("Can't convert object to primitive value")},Oc={exports:{}},Is=K,Mf=Object.defineProperty,Ti=function(e,t){try{Mf(Is,e,{value:t,configurable:!0,writable:!0})}catch(r){Is[e]=t}return t},Df=K,Uf=Ti,Os="__core-js_shared__",As=Oc.exports=Df[Os]||Uf(Os,{});(As.versions||(As.versions=[])).push({version:"3.47.0",mode:"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"});var wi=Oc.exports,Cs=wi,Ii=function(e,t){return Cs[e]||(Cs[e]=t||{})},Ff=Mt,Vf=Object,Ut=function(e){return Vf(Ff(e))},jf=Q,Bf=Ut,Gf=jf({}.hasOwnProperty),Te=Object.hasOwn||function(t,r){return Gf(Bf(t),r)},zf=Q,Kf=0,Hf=Math.random(),Wf=zf(1.1.toString),Ac=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Wf(++Kf+Hf,36)},qf=K,Yf=Ii,Rs=Te,Xf=Ac,Jf=Tc,Zf=wc,yt=qf.Symbol,ro=Yf("wks"),Qf=Zf?yt.for||yt:yt&&yt.withoutSetter||Xf,ie=function(e){return Rs(ro,e)||(ro[e]=Jf&&Rs(yt,e)?yt[e]:Qf("Symbol."+e)),ro[e]},ep=ve,xs=Se,ks=Ic,tp=fr,rp=Pf,np=ie,op=TypeError,ip=np("toPrimitive"),sp=function(e,t){if(!xs(e)||ks(e))return e;var r=tp(e,ip),n;if(r){if(t===void 0&&(t="default"),n=ep(r,e,t),!xs(n)||ks(n))return n;throw new op("Can't convert object to primitive value")}return t===void 0&&(t="number"),rp(e,t)},ap=sp,cp=Ic,Cc=function(e){var t=ap(e,"string");return cp(t)?t:t+""},up=K,Ls=Se,Wo=up.document,lp=Ls(Wo)&&Ls(Wo.createElement),Rc=function(e){return lp?Wo.createElement(e):{}},dp=Le,fp=X,pp=Rc,xc=!dp&&!fp(function(){return Object.defineProperty(pp("div"),"a",{get:function(){return 7}}).a!==7}),vp=Le,hp=ve,gp=vc,mp=dn,_p=pn,bp=Cc,yp=Te,Ep=xc,Ns=Object.getOwnPropertyDescriptor;yi.f=vp?Ns:function(t,r){if(t=_p(t),r=bp(r),Ep)try{return Ns(t,r)}catch(n){}if(yp(t,r))return mp(!hp(gp.f,t,r),t[r])};var He={},Sp=Le,Tp=X,kc=Sp&&Tp(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),wp=Se,Ip=String,Op=TypeError,_e=function(e){if(wp(e))return e;throw new Op(Ip(e)+" is not an object")},Ap=Le,Cp=xc,Rp=kc,Cr=_e,$s=Cc,xp=TypeError,no=Object.defineProperty,kp=Object.getOwnPropertyDescriptor,oo="enumerable",io="configurable",so="writable";He.f=Ap?Rp?function(t,r,n){if(Cr(t),r=$s(r),Cr(n),typeof t=="function"&&r==="prototype"&&"value"in n&&so in n&&!n[so]){var o=kp(t,r);o&&o[so]&&(t[r]=n.value,n={configurable:io in n?n[io]:o[io],enumerable:oo in n?n[oo]:o[oo],writable:!1})}return no(t,r,n)}:no:function(t,r,n){if(Cr(t),r=$s(r),Cr(n),Cp)try{return no(t,r,n)}catch(o){}if("get"in n||"set"in n)throw new xp("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var Lp=Le,Np=He,$p=dn,Lc=Lp?function(e,t,r){return Np.f(e,t,$p(1,r))}:function(e,t,r){return e[t]=r,e},Nc={exports:{}},qo=Le,Pp=Te,$c=Function.prototype,Mp=qo&&Object.getOwnPropertyDescriptor,Dp=Pp($c,"name"),Up=Dp&&(!qo||qo&&Mp($c,"name").configurable),Fp={CONFIGURABLE:Up},Vp=Q,jp=J,Yo=wi,Bp=Vp(Function.toString);jp(Yo.inspectSource)||(Yo.inspectSource=function(e){return Bp(e)});var Oi=Yo.inspectSource,Gp=K,zp=J,Ps=Gp.WeakMap,Kp=zp(Ps)&&/native code/.test(String(Ps)),Hp=Ii,Wp=Ac,Ms=Hp("keys"),Ai=function(e){return Ms[e]||(Ms[e]=Wp(e))},Ci={},qp=Kp,Pc=K,Yp=Se,Xp=Lc,ao=Te,co=wi,Jp=Ai,Zp=Ci,Ds="Object already initialized",Xo=Pc.TypeError,Qp=Pc.WeakMap,Qr,or,en,ev=function(e){return en(e)?or(e):Qr(e,{})},tv=function(e){return function(t){var r;if(!Yp(t)||(r=or(t)).type!==e)throw new Xo("Incompatible receiver, "+e+" required");return r}};if(qp||co.state){var be=co.state||(co.state=new Qp);be.get=be.get,be.has=be.has,be.set=be.set,Qr=function(e,t){if(be.has(e))throw new Xo(Ds);return t.facade=e,be.set(e,t),t},or=function(e){return be.get(e)||{}},en=function(e){return be.has(e)}}else{var ht=Jp("state");Zp[ht]=!0,Qr=function(e,t){if(ao(e,ht))throw new Xo(Ds);return t.facade=e,Xp(e,ht,t),t},or=function(e){return ao(e,ht)?e[ht]:{}},en=function(e){return ao(e,ht)}}var Ri={set:Qr,get:or,has:en,enforce:ev,getterFor:tv},xi=Q,rv=X,nv=J,Rr=Te,Jo=Le,ov=Fp.CONFIGURABLE,iv=Oi,Mc=Ri,sv=Mc.enforce,av=Mc.get,Us=String,Br=Object.defineProperty,cv=xi("".slice),uv=xi("".replace),lv=xi([].join),dv=Jo&&!rv(function(){return Br(function(){},"length",{value:8}).length!==8}),fv=String(String).split("String"),pv=Nc.exports=function(e,t,r){cv(Us(t),0,7)==="Symbol("&&(t="["+uv(Us(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Rr(e,"name")||ov&&e.name!==t)&&(Jo?Br(e,"name",{value:t,configurable:!0}):e.name=t),dv&&r&&Rr(r,"arity")&&e.length!==r.arity&&Br(e,"length",{value:r.arity});try{r&&Rr(r,"constructor")&&r.constructor?Jo&&Br(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(o){}var n=sv(e);return Rr(n,"source")||(n.source=lv(fv,typeof t=="string"?t:"")),e};Function.prototype.toString=pv(function(){return nv(this)&&av(this).source||iv(this)},"toString");var vv=Nc.exports,hv=J,gv=He,mv=vv,_v=Ti,ki=function(e,t,r,n){n||(n={});var o=n.enumerable,i=n.name!==void 0?n.name:t;if(hv(r)&&mv(r,i,n),n.global)o?e[t]=r:_v(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(s){}o?e[t]=r:gv.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Dc={},bv=Math.ceil,yv=Math.floor,Ev=Math.trunc||function(t){var r=+t;return(r>0?yv:bv)(r)},Sv=Ev,Ft=function(e){var t=+e;return t!==t||t===0?0:Sv(t)},Tv=Ft,wv=Math.max,Iv=Math.min,Ov=function(e,t){var r=Tv(e);return r<0?wv(r+t,0):Iv(r,t)},Av=Ft,Cv=Math.min,Uc=function(e){var t=Av(e);return t>0?Cv(t,9007199254740991):0},Rv=Uc,Vt=function(e){return Rv(e.length)},xv=pn,kv=Ov,Lv=Vt,Nv=function(e){return function(t,r,n){var o=xv(t),i=Lv(o);if(i===0)return!e&&-1;var s=kv(n,i),a;if(e&&r!==r){for(;i>s;)if(a=o[s++],a!==a)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},$v={indexOf:Nv(!1)},Pv=Q,uo=Te,Mv=pn,Dv=$v.indexOf,Uv=Ci,Fs=Pv([].push),Fc=function(e,t){var r=Mv(e),n=0,o=[],i;for(i in r)!uo(Uv,i)&&uo(r,i)&&Fs(o,i);for(;t.length>n;)uo(r,i=t[n++])&&(~Dv(o,i)||Fs(o,i));return o},Li=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Fv=Fc,Vv=Li,jv=Vv.concat("length","prototype");Dc.f=Object.getOwnPropertyNames||function(t){return Fv(t,jv)};var Vc={};Vc.f=Object.getOwnPropertySymbols;var Bv=vn,Gv=Q,zv=Dc,Kv=Vc,Hv=_e,Wv=Gv([].concat),qv=Bv("Reflect","ownKeys")||function(t){var r=zv.f(Hv(t)),n=Kv.f;return n?Wv(r,n(t)):r},Vs=Te,Yv=qv,Xv=yi,Jv=He,Zv=function(e,t,r){for(var n=Yv(t),o=Jv.f,i=Xv.f,s=0;s<n.length;s++){var a=n[s];!Vs(e,a)&&!(r&&Vs(r,a))&&o(e,a,i(t,a))}},Qv=X,eh=J,th=/#|\.prototype\./,pr=function(e,t){var r=nh[rh(e)];return r===ih?!0:r===oh?!1:eh(t)?Qv(t):!!t},rh=pr.normalize=function(e){return String(e).replace(th,".").toLowerCase()},nh=pr.data={},oh=pr.NATIVE="N",ih=pr.POLYFILL="P",jc=pr,xr=K,sh=yi.f,ah=Lc,ch=ki,uh=Ti,lh=Zv,dh=jc,Ne=function(e,t){var r=e.target,n=e.global,o=e.stat,i,s,a,u,c,l;if(n?s=xr:o?s=xr[r]||uh(r,{}):s=xr[r]&&xr[r].prototype,s)for(a in t){if(c=t[a],e.dontCallGetSet?(l=sh(s,a),u=l&&l.value):u=s[a],i=dh(n?a:r+(o?".":"#")+a,e.forced),!i&&u!==void 0){if(typeof c==typeof u)continue;lh(c,u)}(e.sham||u&&u.sham)&&ah(c,"sham",!0),ch(s,a,c,e)}},fh=Ne,lo=K;fh({global:!0,forced:lo.globalThis!==lo},{globalThis:lo});var ph=lt,Bc=Array.isArray||function(t){return ph(t)==="Array"},vh=TypeError,hh=9007199254740991,gh=function(e){if(e>hh)throw vh("Maximum allowed index exceeded");return e},mh=lt,_h=Q,Gc=function(e){if(mh(e)==="Function")return _h(e)},js=Gc,bh=Dt,yh=Ei,Eh=js(js.bind),zc=function(e,t){return bh(e),t===void 0?e:yh?Eh(e,t):function(){return e.apply(t,arguments)}},Sh=Bc,Th=Vt,wh=gh,Ih=zc,Kc=function(e,t,r,n,o,i,s,a){for(var u=o,c=0,l=s?Ih(s,a):!1,d,f;c<n;)c in r&&(d=l?l(r[c],c,t):r[c],i>0&&Sh(d)?(f=Th(d),u=Kc(e,t,d,f,u,i-1)-1):(wh(u+1),e[u]=d),u++),c++;return u},Hc=Kc,Oh=ie,Ah=Oh("toStringTag"),Wc={};Wc[Ah]="z";var Ch=String(Wc)==="[object z]",Rh=Ch,xh=J,Gr=lt,kh=ie,Lh=kh("toStringTag"),Nh=Object,$h=Gr(function(){return arguments}())==="Arguments",Ph=function(e,t){try{return e[t]}catch(r){}},Ni=Rh?Gr:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=Ph(t=Nh(e),Lh))=="string"?r:$h?Gr(t):(n=Gr(t))==="Object"&&xh(t.callee)?"Arguments":n},Mh=Q,Dh=X,qc=J,Uh=Ni,Fh=vn,Vh=Oi,Yc=function(){},Xc=Fh("Reflect","construct"),$i=/^\s*(?:class|function)\b/,jh=Mh($i.exec),Bh=!$i.test(Yc),Wt=function(t){if(!qc(t))return!1;try{return Xc(Yc,[],t),!0}catch(r){return!1}},Jc=function(t){if(!qc(t))return!1;switch(Uh(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Bh||!!jh($i,Vh(t))}catch(r){return!0}};Jc.sham=!0;var Zc=!Xc||Dh(function(){var e;return Wt(Wt.call)||!Wt(Object)||!Wt(function(){e=!0})||e})?Jc:Wt,Bs=Bc,Gh=Zc,zh=Se,Kh=ie,Hh=Kh("species"),Gs=Array,Wh=function(e){var t;return Bs(e)&&(t=e.constructor,Gh(t)&&(t===Gs||Bs(t.prototype))?t=void 0:zh(t)&&(t=t[Hh],t===null&&(t=void 0))),t===void 0?Gs:t},qh=Wh,Qc=function(e,t){return new(qh(e))(t===0?0:t)},Yh=Ne,Xh=Hc,Jh=Ut,Zh=Vt,Qh=Ft,eg=Qc;Yh({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,r=Jh(this),n=Zh(r),o=eg(r,0);return o.length=Xh(o,r,r,n,0,t===void 0?1:Qh(t)),o}});var tg=Ne,rg=Hc,ng=Dt,og=Ut,ig=Vt,sg=Qc;tg({target:"Array",proto:!0},{flatMap:function(t){var r=og(this),n=ig(r),o;return ng(t),o=sg(r,0),o.length=rg(o,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),o}});var Pi={},ag=ie,cg=Pi,ug=ag("iterator"),lg=Array.prototype,dg=function(e){return e!==void 0&&(cg.Array===e||lg[ug]===e)},fg=Ni,zs=fr,pg=fn,vg=Pi,hg=ie,gg=hg("iterator"),eu=function(e){if(!pg(e))return zs(e,gg)||zs(e,"@@iterator")||vg[fg(e)]},mg=ve,_g=Dt,bg=_e,yg=hn,Eg=eu,Sg=TypeError,Tg=function(e,t){var r=arguments.length<2?Eg(e):t;if(_g(r))return bg(mg(r,e));throw new Sg(yg(e)+" is not iterable")},wg=ve,Ks=_e,Ig=fr,Og=function(e,t,r){var n,o;Ks(e);try{if(n=Ig(e,"return"),!n){if(t==="throw")throw r;return r}n=wg(n,e)}catch(i){o=!0,n=i}if(t==="throw")throw r;if(o)throw n;return Ks(n),r},Ag=zc,Cg=ve,Rg=_e,xg=hn,kg=dg,Lg=Vt,Hs=Si,Ng=Tg,$g=eu,Ws=Og,Pg=TypeError,zr=function(e,t){this.stopped=e,this.result=t},qs=zr.prototype,tu=function(e,t,r){var n=r&&r.that,o=!!(r&&r.AS_ENTRIES),i=!!(r&&r.IS_RECORD),s=!!(r&&r.IS_ITERATOR),a=!!(r&&r.INTERRUPTED),u=Ag(t,n),c,l,d,f,p,v,h,m=function(S){return c&&Ws(c,"normal"),new zr(!0,S)},E=function(S){return o?(Rg(S),a?u(S[0],S[1],m):u(S[0],S[1])):a?u(S,m):u(S)};if(i)c=e.iterator;else if(s)c=e;else{if(l=$g(e),!l)throw new Pg(xg(e)+" is not iterable");if(kg(l)){for(d=0,f=Lg(e);f>d;d++)if(p=E(e[d]),p&&Hs(qs,p))return p;return new zr(!1)}c=Ng(e,l)}for(v=i?e.next:c.next;!(h=Cg(v,c)).done;){try{p=E(h.value)}catch(S){Ws(c,"throw",S)}if(typeof p=="object"&&p&&Hs(qs,p))return p}return new zr(!1)},Mg=Le,Dg=He,Ug=dn,Fg=function(e,t,r){Mg?Dg.f(e,t,Ug(0,r)):e[t]=r},Vg=Ne,jg=tu,Bg=Fg;Vg({target:"Object",stat:!0},{fromEntries:function(t){var r={};return jg(t,function(n,o){Bg(r,n,o)},{AS_ENTRIES:!0}),r}});var ru={},Gg=Fc,zg=Li,Kg=Object.keys||function(t){return Gg(t,zg)},Hg=Le,Wg=kc,qg=He,Yg=_e,Xg=pn,Jg=Kg;ru.f=Hg&&!Wg?Object.defineProperties:function(t,r){Yg(t);for(var n=Xg(r),o=Jg(r),i=o.length,s=0,a;i>s;)qg.f(t,a=o[s++],n[a]);return t};var Zg=vn,Qg=Zg("document","documentElement"),em=_e,tm=ru,Ys=Li,rm=Ci,nm=Qg,om=Rc,im=Ai,Xs=">",Js="<",Zo="prototype",Qo="script",nu=im("IE_PROTO"),fo=function(){},ou=function(e){return Js+Qo+Xs+e+Js+"/"+Qo+Xs},Zs=function(e){e.write(ou("")),e.close();var t=e.parentWindow.Object;return e=null,t},sm=function(){var e=om("iframe"),t="java"+Qo+":",r;return e.style.display="none",nm.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(ou("document.F=Object")),r.close(),r.F},kr,Kr=function(){try{kr=new ActiveXObject("htmlfile")}catch(t){}Kr=typeof document!="undefined"?document.domain&&kr?Zs(kr):sm():Zs(kr);for(var e=Ys.length;e--;)delete Kr[Zo][Ys[e]];return Kr()};rm[nu]=!0;var Mi=Object.create||function(t,r){var n;return t!==null?(fo[Zo]=em(t),n=new fo,fo[Zo]=null,n[nu]=t):n=Kr(),r===void 0?n:tm.f(n,r)},am=X,cm=!am(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),um=Te,lm=J,dm=Ut,fm=Ai,pm=cm,Qs=fm("IE_PROTO"),ei=Object,vm=ei.prototype,hm=pm?ei.getPrototypeOf:function(e){var t=dm(e);if(um(t,Qs))return t[Qs];var r=t.constructor;return lm(r)&&t instanceof r?r.prototype:t instanceof ei?vm:null},gm=X,mm=J,_m=Se,ea=hm,bm=ki,ym=ie,ti=ym("iterator"),ct,po,vo;[].keys&&(vo=[].keys(),"next"in vo&&(po=ea(ea(vo)),po!==Object.prototype&&(ct=po)));var Em=!_m(ct)||gm(function(){var e={};return ct[ti].call(e)!==e});Em&&(ct={});mm(ct[ti])||bm(ct,ti,function(){return this});var Sm={IteratorPrototype:ct},Tm=He.f,wm=Te,Im=ie,ta=Im("toStringTag"),Om=function(e,t,r){e&&!r&&(e=e.prototype),e&&!wm(e,ta)&&Tm(e,ta,{configurable:!0,value:t})},Am=Sm.IteratorPrototype,Cm=Mi,Rm=dn,xm=Om,km=Pi,Lm=function(){return this},Nm=function(e,t,r,n){var o=t+" Iterator";return e.prototype=Cm(Am,{next:Rm(+!n,r)}),xm(e,o,!1),km[o]=Lm,e},$m=function(e,t){return{value:e,done:t}},Pm=Ni,Mm=String,vr=function(e){if(Pm(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Mm(e)},Dm=Se,Um=lt,Fm=ie,Vm=Fm("match"),iu=function(e){var t;return Dm(e)&&((t=e[Vm])!==void 0?!!t:Um(e)==="RegExp")},jm=K,Bm=X,ra=jm.RegExp,Gm=!Bm(function(){var e=!0;try{ra(".","d")}catch(u){e=!1}var t={},r="",n=e?"dgimsy":"gimsy",o=function(u,c){Object.defineProperty(t,u,{get:function(){return r+=c,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};e&&(i.hasIndices="d");for(var s in i)o(s,i[s]);var a=Object.getOwnPropertyDescriptor(ra.prototype,"flags").get.call(t);return a!==n||r!==n}),zm={correct:Gm},Km=_e,su=function(){var e=Km(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Hm=ve,Wm=Te,qm=Si,na=zm,Ym=su,Xm=RegExp.prototype,au=na.correct?function(e){return e.flags}:function(e){return!na.correct&&qm(Xm,e)&&!Wm(e,"flags")?Hm(Ym,e):e.flags},Jm=Zc,Zm=hn,Qm=TypeError,e_=function(e){if(Jm(e))return e;throw new Qm(Zm(e)+" is not a constructor")},oa=_e,t_=e_,r_=fn,n_=ie,o_=n_("species"),i_=function(e,t){var r=oa(e).constructor,n;return r===void 0||r_(n=oa(r)[o_])?t:t_(n)},Di=Q,s_=Ft,a_=vr,c_=Mt,u_=Di("".charAt),ia=Di("".charCodeAt),l_=Di("".slice),d_=function(e){return function(t,r){var n=a_(c_(t)),o=s_(r),i=n.length,s,a;return o<0||o>=i?e?"":void 0:(s=ia(n,o),s<55296||s>56319||o+1===i||(a=ia(n,o+1))<56320||a>57343?e?u_(n,o):s:e?l_(n,o,o+2):(s-55296<<10)+(a-56320)+65536)}},f_={charAt:d_(!0)},p_=f_.charAt,v_=function(e,t,r){return t+(r?p_(e,t).length:1)},Ui=X,h_=K,Fi=h_.RegExp,cu=Ui(function(){var e=Fi("a","y");return e.lastIndex=2,e.exec("abcd")!==null});cu||Ui(function(){return!Fi("a","y").sticky});var g_=cu||Ui(function(){var e=Fi("^r","gy");return e.lastIndex=2,e.exec("str")!==null}),m_={BROKEN_CARET:g_},__=X,b_=K,y_=b_.RegExp,E_=__(function(){var e=y_(".","s");return!(e.dotAll&&e.test(`
2
+ `)&&e.flags==="s")}),S_=X,T_=K,w_=T_.RegExp,I_=S_(function(){var e=w_("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Et=ve,gn=Q,O_=vr,A_=su,C_=m_,R_=Ii,x_=Mi,k_=Ri.get,L_=E_,N_=I_,$_=R_("native-string-replace",String.prototype.replace),tn=RegExp.prototype.exec,ri=tn,P_=gn("".charAt),M_=gn("".indexOf),D_=gn("".replace),ho=gn("".slice),ni=function(){var e=/a/,t=/b*/g;return Et(tn,e,"a"),Et(tn,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),uu=C_.BROKEN_CARET,oi=/()??/.exec("")[1]!==void 0,U_=ni||oi||uu||L_||N_;U_&&(ri=function(t){var r=this,n=k_(r),o=O_(t),i=n.raw,s,a,u,c,l,d,f;if(i)return i.lastIndex=r.lastIndex,s=Et(ri,i,o),r.lastIndex=i.lastIndex,s;var p=n.groups,v=uu&&r.sticky,h=Et(A_,r),m=r.source,E=0,S=o;if(v&&(h=D_(h,"y",""),M_(h,"g")===-1&&(h+="g"),S=ho(o,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&P_(o,r.lastIndex-1)!==`
3
+ `)&&(m="(?: "+m+")",S=" "+S,E++),a=new RegExp("^(?:"+m+")",h)),oi&&(a=new RegExp("^"+m+"$(?!\\s)",h)),ni&&(u=r.lastIndex),c=Et(tn,v?a:r,S),v?c?(c.input=ho(c.input,E),c[0]=ho(c[0],E),c.index=r.lastIndex,r.lastIndex+=c[0].length):r.lastIndex=0:ni&&c&&(r.lastIndex=r.global?c.index+c[0].length:u),oi&&c&&c.length>1&&Et($_,c[0],a,function(){for(l=1;l<arguments.length-2;l++)arguments[l]===void 0&&(c[l]=void 0)}),c&&p)for(c.groups=d=x_(null),l=0;l<p.length;l++)f=p[l],d[f[0]]=c[f[1]];return c});var F_=ri,sa=ve,V_=_e,j_=J,B_=lt,G_=F_,z_=TypeError,K_=function(e,t){var r=e.exec;if(j_(r)){var n=sa(r,e,t);return n!==null&&V_(n),n}if(B_(e)==="RegExp")return sa(G_,e,t);throw new z_("RegExp#exec called on incompatible receiver")},H_=Ne,W_=ve,lu=Gc,q_=Nm,Lr=$m,aa=Mt,du=Uc,ir=vr,Y_=_e,X_=Se,J_=iu,fu=au,Z_=fr,Q_=ki,eb=X,tb=ie,rb=i_,nb=v_,ob=K_,pu=Ri,rn=tb("matchAll"),vu="RegExp String",hu=vu+" Iterator",ib=pu.set,sb=pu.getterFor(hu),ca=RegExp.prototype,ab=TypeError,ii=lu("".indexOf),nn=lu("".matchAll),go=!!nn&&!eb(function(){nn("a",/./)}),cb=q_(function(t,r,n,o){ib(this,{type:hu,regexp:t,string:r,global:n,unicode:o,done:!1})},vu,function(){var t=sb(this);if(t.done)return Lr(void 0,!0);var r=t.regexp,n=t.string,o=ob(r,n);return o===null?(t.done=!0,Lr(void 0,!0)):t.global?(ir(o[0])===""&&(r.lastIndex=nb(n,du(r.lastIndex),t.unicode)),Lr(o,!1)):(t.done=!0,Lr(o,!1))}),ub=function(e){var t=Y_(this),r=ir(e),n=rb(t,RegExp),o=ir(fu(t)),i,s,a;return i=new n(n===RegExp?t.source:t,o),s=!!~ii(o,"g"),a=!!~ii(o,"u"),i.lastIndex=du(t.lastIndex),new cb(i,r,s,a)};H_({target:"String",proto:!0,forced:go},{matchAll:function(t){var r=aa(this),n,o,i,s;if(X_(t)){if(J_(t)&&(n=ir(aa(fu(t))),!~ii(n,"g")))throw new ab("`.matchAll` does not allow non-global regexes");if(go)return nn(r,t);if(i=Z_(t,rn),i)return W_(i,t,r)}else if(go)return nn(r,t);return o=ir(r),s=new RegExp(t,"g"),s[rn](o)}});rn in ca||Q_(ca,rn,ub);var gu={},ua=Dt,lb=TypeError,db=function(e){var t,r;this.promise=new e(function(n,o){if(t!==void 0||r!==void 0)throw new lb("Bad Promise constructor");t=n,r=o}),this.resolve=ua(t),this.reject=ua(r)};gu.f=function(e){return new db(e)};var fb=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},pb=K,mu=pb.Promise,vb=ie,_u=vb("iterator"),bu=!1;try{var hb=0,la={next:function(){return{done:!!hb++}},return:function(){bu=!0}};la[_u]=function(){return this},Array.from(la,function(){throw 2})}catch(e){}var gb=function(e,t){try{if(!t&&!bu)return!1}catch(o){return!1}var r=!1;try{var n={};n[_u]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(o){}return r},qt=K,mb=yc,_b=lt,Nr=function(e){return mb.slice(0,e.length)===e},bb=function(){return Nr("Bun/")?"BUN":Nr("Cloudflare-Workers")?"CLOUDFLARE":Nr("Deno/")?"DENO":Nr("Node.js/")?"NODE":qt.Bun&&typeof Bun.version=="string"?"BUN":qt.Deno&&typeof Deno.version=="object"?"DENO":_b(qt.process)==="process"?"NODE":qt.window&&qt.document?"BROWSER":"REST"}(),yb=K,tr=mu,Eb=J,Sb=jc,Tb=Oi,wb=ie,da=bb,mo=Sc;tr&&tr.prototype;var Ib=wb("species"),fa=!1,Ob=Eb(yb.PromiseRejectionEvent),Ab=Sb("Promise",function(){var e=Tb(tr),t=e!==String(tr);if(!t&&mo===66)return!0;if(!mo||mo<51||!/native code/.test(e)){var r=new tr(function(i){i(1)}),n=function(i){i(function(){},function(){})},o=r.constructor={};if(o[Ib]=n,fa=r.then(function(){})instanceof n,!fa)return!0}return!t&&(da==="BROWSER"||da==="DENO")&&!Ob}),Cb={CONSTRUCTOR:Ab},Rb=mu,xb=gb,kb=Cb.CONSTRUCTOR,Lb=kb||!xb(function(e){Rb.all(e).then(void 0,function(){})}),Nb=Ne,$b=ve,Pb=Dt,Mb=gu,Db=fb,Ub=tu,Fb=Lb;Nb({target:"Promise",stat:!0,forced:Fb},{allSettled:function(t){var r=this,n=Mb.f(r),o=n.resolve,i=n.reject,s=Db(function(){var a=Pb(r.resolve),u=[],c=0,l=1;Ub(t,function(d){var f=c++,p=!1;l++,$b(a,r,d).then(function(v){p||(p=!0,u[f]={status:"fulfilled",value:v},--l||o(u))},function(v){p||(p=!0,u[f]={status:"rejected",reason:v},--l||o(u))})}),--l||o(u)});return s.error&&i(s.value),n.promise}});var Vi=Q,Vb=Ut,jb=Math.floor,_o=Vi("".charAt),Bb=Vi("".replace),bo=Vi("".slice),Gb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,zb=/\$([$&'`]|\d{1,2})/g,Kb=function(e,t,r,n,o,i){var s=r+e.length,a=n.length,u=zb;return o!==void 0&&(o=Vb(o),u=Gb),Bb(i,u,function(c,l){var d;switch(_o(l,0)){case"$":return"$";case"&":return e;case"`":return bo(t,0,r);case"'":return bo(t,s);case"<":d=o[bo(l,1,-1)];break;default:var f=+l;if(f===0)return c;if(f>a){var p=jb(f/10);return p===0?c:p<=a?n[p-1]===void 0?_o(l,1):n[p-1]+_o(l,1):c}d=n[f-1]}return d===void 0?"":d})},Hb=Ne,Wb=ve,ji=Q,pa=Mt,qb=J,Yb=Se,Xb=iu,Yt=vr,Jb=fr,Zb=au,Qb=Kb,ey=ie,ty=ey("replace"),ry=TypeError,yo=ji("".indexOf);ji("".replace);var va=ji("".slice),ny=Math.max;Hb({target:"String",proto:!0},{replaceAll:function(t,r){var n=pa(this),o,i,s,a,u,c,l,d,f,p,v=0,h="";if(Yb(t)){if(o=Xb(t),o&&(i=Yt(pa(Zb(t))),!~yo(i,"g")))throw new ry("`.replaceAll` does not allow non-global regexes");if(s=Jb(t,ty),s)return Wb(s,t,n,r)}for(a=Yt(n),u=Yt(t),c=qb(r),c||(r=Yt(r)),l=u.length,d=ny(1,l),f=yo(a,u);f!==-1;)p=c?Yt(r(u,f,a)):Qb(u,a,f,[],void 0,r),h+=va(a,v,f)+p,v=f+l,f=f+d>a.length?-1:yo(a,u,f+d);return v<a.length&&(h+=va(a,v)),h}});var oy=ie,iy=Mi,sy=He.f,si=oy("unscopables"),ai=Array.prototype;ai[si]===void 0&&sy(ai,si,{configurable:!0,value:iy(null)});var ay=function(e){ai[si][e]=!0},cy=Ne,uy=Ut,ly=Vt,dy=Ft,fy=ay;cy({target:"Array",proto:!0},{at:function(t){var r=uy(this),n=ly(r),o=dy(t),i=o>=0?o:n+o;return i<0||i>=n?void 0:r[i]}});fy("at");var py=Ne,vy=Q,hy=Mt,gy=Ft,my=vr,_y=X,by=vy("".charAt),yy=_y(function(){return"𠮷".at(-2)!=="\uD842"});py({target:"String",proto:!0,forced:yy},{at:function(t){var r=my(hy(this)),n=r.length,o=gy(t),i=o>=0?o:n+o;return i<0||i>=n?void 0:by(r,i)}});(function(e,t){(function(r,n){n()})(z,function(){function r(o){var i=!0,s=!1,a=null,u={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(g){return!!(g&&g!==document&&g.nodeName!=="HTML"&&g.nodeName!=="BODY"&&"classList"in g&&"contains"in g.classList)}function l(g){var b=g.type,C=g.tagName;return!!(C==="INPUT"&&u[b]&&!g.readOnly||C==="TEXTAREA"&&!g.readOnly||g.isContentEditable)}function d(g){g.classList.contains("focus-visible")||(g.classList.add("focus-visible"),g.setAttribute("data-focus-visible-added",""))}function f(g){g.hasAttribute("data-focus-visible-added")&&(g.classList.remove("focus-visible"),g.removeAttribute("data-focus-visible-added"))}function p(g){g.metaKey||g.altKey||g.ctrlKey||(c(o.activeElement)&&d(o.activeElement),i=!0)}function v(g){i=!1}function h(g){c(g.target)&&(i||l(g.target))&&d(g.target)}function m(g){c(g.target)&&(g.target.classList.contains("focus-visible")||g.target.hasAttribute("data-focus-visible-added"))&&(s=!0,window.clearTimeout(a),a=window.setTimeout(function(){s=!1},100),f(g.target))}function E(g){document.visibilityState==="hidden"&&(s&&(i=!0),S())}function S(){document.addEventListener("mousemove",_),document.addEventListener("mousedown",_),document.addEventListener("mouseup",_),document.addEventListener("pointermove",_),document.addEventListener("pointerdown",_),document.addEventListener("pointerup",_),document.addEventListener("touchmove",_),document.addEventListener("touchstart",_),document.addEventListener("touchend",_)}function D(){document.removeEventListener("mousemove",_),document.removeEventListener("mousedown",_),document.removeEventListener("mouseup",_),document.removeEventListener("pointermove",_),document.removeEventListener("pointerdown",_),document.removeEventListener("pointerup",_),document.removeEventListener("touchmove",_),document.removeEventListener("touchstart",_),document.removeEventListener("touchend",_)}function _(g){g.target.nodeName&&g.target.nodeName.toLowerCase()==="html"||(i=!1,D())}document.addEventListener("keydown",p,!0),document.addEventListener("mousedown",v,!0),document.addEventListener("pointerdown",v,!0),document.addEventListener("touchstart",v,!0),document.addEventListener("visibilitychange",E,!0),S(),o.addEventListener("focus",h,!0),o.addEventListener("blur",m,!0),o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&o.host?o.host.setAttribute("data-js-focus-visible",""):o.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=r;var n;try{n=new CustomEvent("focus-visible-polyfill-ready")}catch(o){n=document.createEvent("CustomEvent"),n.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(n)}typeof document!="undefined"&&r(document)})})();const F={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},ye=console,rt={};Object.keys(F).forEach(e=>{rt[e]=ye[e]});const Xt="Datadog Browser SDK:",w={debug:rt.debug.bind(ye,Xt),log:rt.log.bind(ye,Xt),info:rt.info.bind(ye,Xt),warn:rt.warn.bind(ye,Xt),error:rt.error.bind(ye,Xt)},mn="https://docs.datadoghq.com",Ey=`${mn}/real_user_monitoring/browser/troubleshooting`,Bi="More details:";function yu(e,t){return(...r)=>{try{return e(...r)}catch(n){w.error(t,n)}}}function Ue(e){return e!==0&&Math.random()*100<=e}function St(e,t){return+e.toFixed(t)}function Sy(e){return hr(e)&&e>=0&&e<=100}function hr(e){return typeof e=="number"}function sr(e){return y({},e)}function on(e,t){return Object.keys(e).some(r=>e[r]===t)}function We(e){return Object.keys(e).length===0}function Eu(e,t){const r={};for(const n of Object.keys(e))r[n]=t(e[n]);return r}function ue(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!="object"&&(typeof self=="object"?e=self:typeof window=="object"?e=window:e={}),e}const ge=ue(),dt="WorkerGlobalScope"in ge;function Be(e,t){const r=ue();let n;return r.Zone&&typeof r.Zone.__symbol__=="function"&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}let sn,Su=!1;function Ty(e){sn=e}function wy(e){Su=e}function Iy(e,t,r){const n=r.value;r.value=function(...o){return(sn?T(n):n).apply(this,o)}}function T(e){return function(...t){return Oe(e,this,t)}}function Oe(e,t,r){try{return e.apply(t,r)}catch(n){Ge(n)}}function Ge(e){if(ci(e),sn)try{sn(e)}catch(t){ci(t)}}function ci(...e){Su&&w.error("[MONITOR]",...e)}function Z(e,t){return Be(ue(),"setTimeout")(T(e),t)}function de(e){Be(ue(),"clearTimeout")(e)}function jt(e,t){return Be(ue(),"setInterval")(T(e),t)}function _n(e){Be(ue(),"clearInterval")(e)}function ha(e){var t;const r=(t=ge.queueMicrotask)===null||t===void 0?void 0:t.bind(ge);typeof r=="function"?r(T(e)):Promise.resolve().then(T(e))}class x{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach(r=>r(t))}addObserver(t){this.observers.push(t),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(t){this.observers=this.observers.filter(r=>t!==r),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function Tu(...e){return new x(t=>{const r=e.map(n=>n.subscribe(o=>t.notify(o)));return()=>r.forEach(n=>n.unsubscribe())})}class wu extends x{constructor(t){super(),this.maxBufferSize=t,this.buffer=[]}notify(t){this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(t)}subscribe(t){let r=!1;const n={unsubscribe:()=>{r=!0,this.removeObserver(t)}};return ha(()=>{for(const o of this.buffer){if(r)return;t(o)}r||this.addObserver(t)}),n}unbuffer(){ha(()=>{this.maxBufferSize=this.buffer.length=0})}}const ee=1e3,se=60*ee,Iu=60*se,Oy=24*Iu,Ou=365*Oy;function bn(e){return{relative:e,timeStamp:Cy(e)}}function Ay(e){return{relative:yn(e),timeStamp:e}}function Cy(e){const t=ne()-performance.now();return t>gr()?Math.round(qe(t,e)):xy(e)}function Ry(){return Math.round(ne()-qe(gr(),performance.now()))}function O(e){return hr(e)?St(e*1e6,0):e}function ne(){return new Date().getTime()}function j(){return ne()}function ce(){return performance.now()}function H(){return{relative:ce(),timeStamp:j()}}function Au(){return{relative:0,timeStamp:gr()}}function B(e,t){return t-e}function qe(e,t){return e+t}function yn(e){return e-gr()}function xy(e){return Math.round(qe(gr(),e))}function ky(e){return e<Ou}let Eo;function gr(){var e,t;return Eo===void 0&&(Eo=(t=(e=performance.timing)===null||e===void 0?void 0:e.navigationStart)!==null&&t!==void 0?t:performance.timeOrigin),Eo}function En(e,t,r){const n=r&&r.leading!==void 0?r.leading:!0,o=r&&r.trailing!==void 0?r.trailing:!0;let i=!1,s,a;return{throttled:(...u)=>{if(i){s=u;return}n?e(...u):s=u,i=!0,a=Z(()=>{o&&s&&e(...s),i=!1,s=void 0},t)},cancel:()=>{de(a),i=!1,s=void 0}}}function L(){}function oe(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,oe)}const Rt=/([\w-]+)\s*=\s*([^;]+)/g;function ar(e,t){for(Rt.lastIndex=0;;){const r=Rt.exec(e);if(r){if(r[1]===t)return r[2]}else break}}function Ly(e){const t=new Map;for(Rt.lastIndex=0;;){const r=Rt.exec(e);if(r){const n=r[1],o=r[2];t.has(n)?t.get(n).push(o):t.set(n,[o])}else break}return t}function Ny(e){const t=new Map;for(Rt.lastIndex=0;;){const r=Rt.exec(e);if(r)t.set(r[1],r[2]);else break}return t}function Sn(e,t,r=""){const n=e.charCodeAt(t-1),i=n>=55296&&n<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${r}`}function $y(){return Cu()===0}function WC(){return Cu()===1}let $r;function Cu(){return $r!=null?$r:$r=Py()}function Py(e=window){var t;const r=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(r)?0:((t=e.navigator.vendor)===null||t===void 0?void 0:t.indexOf("Apple"))===0||/safari/i.test(r)&&!/chrome|android/i.test(r)?1:2}function Gi(e){return Tn(e,location.href).href}function My(e){try{return!!Tn(e)}catch(t){return!1}}function Dy(e){const t=Tn(e).pathname;return t[0]==="/"?t:`/${t}`}function Tn(e,t){const{URL:r}=Uy();try{return t!==void 0?new r(e,t):new r(e)}catch(n){throw new Error(`Failed to construct URL: ${String(n)}`)}}let So;function Uy(){if(!So){let e,t;try{e=document.createElement("iframe"),e.style.display="none",document.body.appendChild(e),t=e.contentWindow}catch(r){t=ge}So={URL:t.URL},e==null||e.remove()}return So}function wn(e,t,r=0,n){const o=new Date;o.setTime(o.getTime()+r);const i=`expires=${o.toUTCString()}`,s=n&&n.crossSite?"none":"strict",a=n&&n.domain?`;domain=${n.domain}`:"",u=n&&n.secure?";secure":"",c=n&&n.partitioned?";partitioned":"";document.cookie=`${e}=${t};${i};path=/;samesite=${s}${a}${u}${c}`}function In(e){return ar(document.cookie,e)}function Fy(e){return Ly(document.cookie).get(e)||[]}let To;function Fe(e){return To||(To=Ny(document.cookie)),To.get(e)}function Ru(e,t){wn(e,"",0,t)}function Vy(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${oe()}`,r="test";wn(t,r,se,e);const n=In(t)===r;return Ru(t,e),n}catch(t){return w.error(t),!1}}let wo;function xu(e=location.hostname,t=document.referrer){if(wo===void 0){const r=jy(e,t);if(r){const n=`dd_site_test_${oe()}`,o="test",i=r.split(".");let s=i.pop();for(;i.length&&!In(n);)s=`${i.pop()}.${s}`,wn(n,o,ee,{domain:s});Ru(n,{domain:s}),wo=s}}return wo}function jy(e,t){try{return e||Tn(t).hostname}catch(r){}}const Ae="_dd_s";function ku(e,t){for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(t(n,r,e))return n}}function an(e){return Object.values(e)}function zi(e){return Object.entries(e)}const Ye=4*Iu,Lu=15*se,By=Ou,Nu="0",xt={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},$u=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Ki="&";function Gy(e){return!!e&&(e.indexOf(Ki)!==-1||$u.test(e))}const zy="1";function nt(e,t){const r={isExpired:zy};return t.trackAnonymousUser&&(e!=null&&e.anonymousId)&&(r.anonymousId=e==null?void 0:e.anonymousId),r}function Hr(e){return We(e)}function Pu(e){return!Hr(e)}function rr(e){return e.isExpired!==void 0||!Ky(e)}function Ky(e){return(e.created===void 0||ne()-Number(e.created)<Ye)&&(e.expire===void 0||ne()<Number(e.expire))}function Mu(e){e.expire=String(ne()+Lu)}function ui(e){return zi(e).map(([t,r])=>t==="anonymousId"?`aid=${r}`:`${t}=${r}`).join(Ki)}function On(e){const t={};return Gy(e)&&e.split(Ki).forEach(r=>{const n=$u.exec(r);if(n!==null){const[,o,i]=n;o==="aid"?t.anonymousId=i:t[o]=i}}),t}const Hy="_dd",Wy="_dd_r",qy="_dd_l",Yy="rum",Xy="logs";function Jy(e){if(!Fe(Ae)){const r=Fe(Hy),n=Fe(Wy),o=Fe(qy),i={};r&&(i.id=r),o&&/^[01]$/.test(o)&&(i[Xy]=o),n&&/^[012]$/.test(n)&&(i[Yy]=n),Pu(i)&&(Mu(i),e.persistSession(i))}}const Zy=0;function ga(e){const t=eE(e);return t&&Vy(t)?{type:xt.COOKIE,cookieOptions:t}:void 0}function Qy(e,t){const r={isLockEnabled:$y(),persistSession:n=>ma(t,e,n,Lu),retrieveSession:()=>Du(t,e),expireSession:n=>ma(t,e,nt(n,e),Ye)};return Jy(r),r}function ma(e,t,r,n){let o=ui(r);t.betaEncodeCookieOptions&&(o=ui(y(y({},r),We(r)?{}:{c:Uu(e)}))),wn(Ae,o,t.trackAnonymousUser?By:n,e)}function Du(e,t){if(t.betaEncodeCookieOptions)return tE(e);const r=In(Ae);return On(r)}function eE(e){const t={};if(t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){const r=xu();if(!r)return;t.domain=r}return t}function Uu(e){const t=e.domain?e.domain.split(".").length-1:0;let r=0;return r|=Zy<<5,r|=t<<1,r|=e.crossSite?1:0,r.toString(16)}function tE(e){const t=Fy(Ae),r=Uu(e);let n;for(const o of t.reverse())if(n=On(o),n.c===r)break;return n==null||delete n.c,n!=null?n:{}}const rE="_dd_test_";function _a(){try{const e=oe(),t=`${rE}${e}`;localStorage.setItem(t,e);const r=localStorage.getItem(t);return localStorage.removeItem(t),e===r?{type:xt.LOCAL_STORAGE}:void 0}catch(e){return}}function nE(e){return{isLockEnabled:!1,persistSession:Fu,retrieveSession:Vu,expireSession:t=>oE(t,e)}}function Fu(e){localStorage.setItem(Ae,ui(e))}function Vu(){const e=localStorage.getItem(Ae);return On(e)}function oE(e,t){Fu(nt(e,t))}const iE=10,sE=100,aE=ee,ju="--",Bu=[];let Wr;function ot(e,t,r=0){var n;const{isLockEnabled:o,persistSession:i,expireSession:s}=t,a=f=>i(W(y({},f),{lock:c})),u=()=>{const v=t.retrieveSession(),{lock:f}=v;return{session:Or(v,["lock"]),lock:f&&!uE(f)?f:void 0}};if(Wr||(Wr=e),e!==Wr){Bu.push(e);return}if(o&&r>=sE){ba(t);return}let c,l=u();if(o){if(l.lock){Pr(e,t,r);return}if(c=cE(),a(l.session),l=u(),l.lock!==c){Pr(e,t,r);return}}let d=e.process(l.session);if(o&&(l=u(),l.lock!==c)){Pr(e,t,r);return}if(d&&(rr(d)?s(d):(Mu(d),o?a(d):i(d))),o&&!(d&&rr(d))){if(l=u(),l.lock!==c){Pr(e,t,r);return}i(l.session),d=l.session}(n=e.after)===null||n===void 0||n.call(e,d||l.session),ba(t)}function Pr(e,t,r){Z(()=>{ot(e,t,r+1)},iE)}function ba(e){Wr=void 0;const t=Bu.shift();t&&ot(t,e)}function cE(){return oe()+ju+j()}function uE(e){const[,t]=e.split(ju);return!t||B(Number(t),j())>aE}const ya=ee;function lE(e){switch(e.sessionPersistence){case xt.COOKIE:return ga(e);case xt.LOCAL_STORAGE:return _a();case void 0:{let t=ga(e);return!t&&e.allowFallbackToLocalStorage&&(t=_a()),t}default:w.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}function dE(e,t){return e.type===xt.COOKIE?Qy(t,e.cookieOptions):nE(t)}function fE(e,t,r,n,o=dE(e,t)){const i=new x,s=new x,a=new x,u=jt(p,ya);let c;h();const{throttled:l,cancel:d}=En(()=>{ot({process:b=>{if(Hr(b))return;const C=v(b);return m(C),C},after:b=>{Pu(b)&&!E()&&_(b),c=b}},o)},ya);function f(){ot({process:b=>E()?v(b):void 0},o)}function p(){const b=o.retrieveSession();rr(b)?ot({process:C=>rr(C)?nt(C,t):void 0,after:v},o):v(b)}function v(b){return rr(b)&&(b=nt(b,t)),E()&&(S(b)?D():(a.notify({previousState:c,newState:b}),c=b)),b}function h(){ot({process:b=>{if(Hr(b))return b.anonymousId=oe(),nt(b,t)},after:b=>{c=b}},o)}function m(b){if(Hr(b))return!1;const C=n(b[r]);b[r]=C,delete b.isExpired,C!==Nu&&!b.id&&(b.id=oe(),b.created=String(ne()))}function E(){return(c==null?void 0:c[r])!==void 0}function S(b){return c.id!==b.id||c[r]!==b[r]}function D(){c=nt(c,t),s.notify()}function _(b){c=b,i.notify()}function g(b){ot({process:C=>y(y({},C),b),after:v},o)}return{expandOrRenewSession:l,expandSession:f,getSession:()=>c,renewObservable:i,expireObservable:s,sessionStateUpdateObservable:a,restartSession:h,expire:b=>{d(),b===!1&&c&&delete c.anonymousId,o.expireSession(c),v(nt(c,t))},stop:()=>{_n(u)},updateSessionState:g}}const li={GRANTED:"granted",NOT_GRANTED:"not-granted"};function Gu(e){const t=new x;return{tryToInit(r){e||(e=r)},update(r){e=r,t.notify()},isGranted(){return e===li.GRANTED},observable:t}}function ft(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function cr(e){const t=ft(e);return t==="string"||t==="function"||e instanceof RegExp}function An(e,t,r=!1){return e.some(n=>{try{if(typeof n=="function")return n(t);if(n instanceof RegExp)return n.test(t);if(typeof n=="string")return r?t.startsWith(n):n===t}catch(o){w.error(o)}return!1})}const pE=["chrome-extension://","moz-extension://"];function Ea(e){return pE.some(t=>e.includes(t))}function vE(e,t=""){if(Ea(e))return!1;const n=t.split(`
4
+ `).filter(o=>{const i=o.trim();return i.length&&/^at\s+|@/.test(i)})[1]||"";return Ea(n)}const hE="Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.",gE="SDK initialized on a non-allowed domain.";function mE(e,t,r=typeof location!="undefined"?location.origin:""){const n=e.allowedTrackingOrigins;if(!n)return vE(r,t)?(w.error(hE),!1):!0;const o=An(n,r);return o||w.error(gE),o}const zu="datad0g.com",_E="dd0g-gov.com",st="datadoghq.com",bE="datadoghq.eu",yE="ddog-gov.com",EE="pci.browser-intake-datadoghq.com",SE=["ddsource","dd-api-key","dd-request-id"];function De(e,t,r){const n=TE(e,t);return{build(o,i){const s=wE(e,t,o,i,r);return n(s)},trackType:t}}function TE(e,t){const r=`/api/v2/${t}`,n=e.proxy;if(typeof n=="string"){const i=Gi(n);return s=>`${i}?ddforward=${encodeURIComponent(`${r}?${s}`)}`}if(typeof n=="function")return i=>n({path:r,parameters:i});const o=Ku(t,e);return i=>`https://${o}${r}?${i}`}function Ku(e,t){const{site:r=st,internalAnalyticsSubdomain:n}=t;if(e==="logs"&&t.usePciIntake&&r===st)return EE;if(n&&r===st)return`${n}.${st}`;if(r===_E)return`http-intake.logs.${r}`;const o=r.split("."),i=o.pop();return`browser-intake-${o.join("-")}.${i}`}function wE({clientToken:e,internalAnalyticsSubdomain:t,source:r="browser"},n,o,{retry:i,encoding:s},a=[]){const u=[`ddsource=${r}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.25.2")}`,"dd-evp-origin=browser",`dd-request-id=${oe()}`].concat(a);return s&&u.push(`dd-evp-encoding=${s}`),n==="rum"&&(u.push(`batch_time=${j()}`,`_dd.api=${o}`),i&&u.push(`_dd.retry_count=${i.count}`,`_dd.retry_after=${i.lastFailureStatus}`)),t&&u.reverse(),u.join("&")}function IE(e){const t=e.site||st,r=OE(e.source),n=AE(W(y({},e),{site:t,source:r})),o=CE(W(y({},e),{site:t,source:r}));return y({replica:o,site:t,source:r},n)}function OE(e){return e==="flutter"||e==="unity"?e:"browser"}function AE(e){return{logsEndpointBuilder:De(e,"logs"),rumEndpointBuilder:De(e,"rum"),profilingEndpointBuilder:De(e,"profile"),sessionReplayEndpointBuilder:De(e,"replay"),exposuresEndpointBuilder:De(e,"exposures"),flagEvaluationEndpointBuilder:De(e,"flagevaluation")}}function CE(e){if(!e.replica)return;const t=W(y({},e),{site:st,clientToken:e.replica.clientToken});return{logsEndpointBuilder:De(t,"logs"),rumEndpointBuilder:De(t,"rum",[`application.id=${e.replica.applicationId}`])}}function Hu(e){return SE.every(t=>e.includes(t))}const Tt={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},di={ALL:"all",SAMPLED:"sampled"};function Io(e,t){return e!=null&&typeof e!="string"?(w.error(`${t} must be defined as a string`),!1):!0}function RE(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(w.error(`Site should be a valid Datadog site. ${Bi} ${mn}/getting_started/site/.`),!1):!0}function wt(e,t){return e!==void 0&&!Sy(e)?(w.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function Wu(e,t){var r,n,o,i,s,a,u,c,l,d;if(!e||!e.clientToken){w.error("Client Token is not configured, we will not send any data.");return}if(e.allowedTrackingOrigins!==void 0&&!Array.isArray(e.allowedTrackingOrigins)){w.error("Allowed Tracking Origins must be an array");return}if(!(!RE(e.site)||!wt(e.sessionSampleRate,"Session")||!wt(e.telemetrySampleRate,"Telemetry")||!wt(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!wt(e.telemetryUsageSampleRate,"Telemetry Usage")||!Io(e.version,"Version")||!Io(e.env,"Env")||!Io(e.service,"Service")||!mE(e,t!=null?t:""))){if(e.trackingConsent!==void 0&&!on(li,e.trackingConsent)){w.error('Tracking Consent should be either "granted" or "not-granted"');return}return y({beforeSend:e.beforeSend&&yu(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:dt?void 0:lE(e),sessionSampleRate:(r=e.sessionSampleRate)!==null&&r!==void 0?r:100,telemetrySampleRate:(n=e.telemetrySampleRate)!==null&&n!==void 0?n:20,telemetryConfigurationSampleRate:(o=e.telemetryConfigurationSampleRate)!==null&&o!==void 0?o:5,telemetryUsageSampleRate:(i=e.telemetryUsageSampleRate)!==null&&i!==void 0?i:5,service:(s=e.service)!==null&&s!==void 0?s:void 0,env:(a=e.env)!==null&&a!==void 0?a:void 0,version:(u=e.version)!==null&&u!==void 0?u:void 0,datacenter:(c=e.datacenter)!==null&&c!==void 0?c:void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:(l=e.trackingConsent)!==null&&l!==void 0?l:li.GRANTED,trackAnonymousUser:(d=e.trackAnonymousUser)!==null&&d!==void 0?d:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,betaEncodeCookieOptions:!!e.betaEncodeCookieOptions,variant:e.variant,sdkVersion:e.sdkVersion},IE(e))}}function qu(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),beta_encode_cookie_options:e.betaEncodeCookieOptions,source:e.source,sdk_version:e.sdkVersion,variant:e.variant}}var ze;(function(e){e.TRACK_INTAKE_REQUESTS="track_intake_requests",e.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",e.FEATURE_OPERATION_VITAL="feature_operation_vital",e.SHORT_SESSION_INVESTIGATION="short_session_investigation",e.AVOID_FETCH_KEEPALIVE="avoid_fetch_keepalive"})(ze||(ze={}));const Hi=new Set;function Yu(e){Array.isArray(e)&&xE(e.filter(t=>on(ze,t)))}function xE(e){e.forEach(t=>{Hi.add(t)})}function mr(e){return Hi.has(e)}function kE(){return Hi}const kt="?";function _r(e){var t,r;const n=[];let o=Oo(e,"stack");const i=String(e);if(o&&o.startsWith(i)&&(o=o.slice(i.length)),o&&o.split(`
5
+ `).forEach(s=>{const a=$E(s)||ME(s)||UE(s)||jE(s);a&&(!a.func&&a.line&&(a.func=kt),n.push(a))}),n.length>0&&KE()&&e instanceof Error){const s=[];let a=e;for(;(a=Object.getPrototypeOf(a))&&Ju(a);){const u=((t=a.constructor)===null||t===void 0?void 0:t.name)||kt;s.push(u)}for(let u=s.length-1;u>=0&&((r=n[0])===null||r===void 0?void 0:r.func)===s[u];u--)n.shift()}return{message:Oo(e,"message"),name:Oo(e,"name"),stack:n}}const Xu="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",Lt="(?::(\\d+))",LE=new RegExp(`^\\s*at (.*?) ?\\(${Xu}${Lt}?${Lt}?\\)?\\s*$`,"i"),NE=new RegExp(`\\((\\S*)${Lt}${Lt}\\)`);function $E(e){const t=LE.exec(e);if(!t)return;const r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,o=NE.exec(t[2]);return n&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{args:r?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||kt,line:t[3]?+t[3]:void 0,url:r?void 0:t[2]}}const PE=new RegExp(`^\\s*at ?${Xu}${Lt}?${Lt}??\\s*$`,"i");function ME(e){const t=PE.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:kt,line:t[2]?+t[2]:void 0,url:t[1]}}const DE=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function UE(e){const t=DE.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||kt,line:+t[3],url:t[2]}}const FE=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,VE=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function jE(e){const t=FE.exec(e);if(!t)return;const r=t[3]&&t[3].indexOf(" > eval")>-1,n=VE.exec(t[3]);return r&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||kt,line:t[4]?+t[4]:void 0,url:t[3]}}function Oo(e,t){if(typeof e!="object"||!e||!(t in e))return;const r=e[t];return typeof r=="string"?r:void 0}function BE(e,t,r,n){if(t===void 0)return;const{name:o,message:i}=zE(e);return{name:o,message:i,stack:[{url:t,column:n,line:r}]}}const GE=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function zE(e){let t,r;return{}.toString.call(e)==="[object String]"&&([,t,r]=GE.exec(e)),{name:t,message:r}}function Ju(e){return String(e.constructor).startsWith("class ")}let Mr;function KE(){if(Mr!==void 0)return Mr;class e extends Error{constructor(){super(),this.name="Error"}}const[t,r]=[e,Error].map(n=>new n);return Mr=Ju(Object.getPrototypeOf(t))&&r.stack!==t.stack,Mr}function Nt(e){const r=new Error(e);r.name="HandlingStack";let n;return Oe(()=>{const o=_r(r);o.stack=o.stack.slice(2),n=br(o)}),n}function br(e){let t=Zu(e);return e.stack.forEach(r=>{const n=r.func==="?"?"<anonymous>":r.func,o=r.args&&r.args.length>0?`(${r.args.join(", ")})`:"",i=r.line?`:${r.line}`:"",s=r.line&&r.column?`:${r.column}`:"";t+=`
6
+ at ${n}${o} @ ${r.url}${i}${s}`}),t}function Zu(e){return`${e.name||"Error"}: ${e.message}`}function Ee(e,t,r,{computeHandlingStack:n}={}){let o=e[t];if(typeof o!="function")if(t in e&&typeof t=="string"&&t.startsWith("on"))o=L;else return{stop:L};let i=!1;const s=function(){if(i)return o.apply(this,arguments);const a=Array.from(arguments);let u;Oe(r,null,[{target:this,parameters:a,onPostCall:l=>{u=l},handlingStack:n?Nt("instrumented method"):void 0}]);const c=o.apply(this,a);return u&&Oe(u,null,[c]),c};return e[t]=s,{stop:()=>{i=!0,e[t]===s&&(e[t]=o)}}}function qC(e,t,r){const n=Object.getOwnPropertyDescriptor(e,t);if(!n||!n.set||!n.configurable)return{stop:L};const o=L;let i=(a,u)=>{Z(()=>{i!==o&&r(a,u)},0)};const s=function(a){n.set.call(this,a),i(this,a)};return Object.defineProperty(e,t,{set:s}),{stop:()=>{var a;((a=Object.getOwnPropertyDescriptor(e,t))===null||a===void 0?void 0:a.set)===s&&Object.defineProperty(e,t,n),i=o}}}const Xe=1024,Qu=1024*Xe,HE=/[^\u0000-\u007F]/;function el(e){return HE.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function tl(e){if(e.length===1)return e[0];const t=e.reduce((o,i)=>o+i.length,0),r=new Uint8Array(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return r}function $t(e,t,r){if(typeof e!="object"||e===null)return JSON.stringify(e);const n=It(Object.prototype),o=It(Array.prototype),i=It(Object.getPrototypeOf(e)),s=It(e);try{return JSON.stringify(e,t,r)}catch(a){return"<error: unable to serialize object>"}finally{n(),o(),i(),s()}}function It(e){const t=e,r=t.toJSON;return r?(delete t.toJSON,()=>{t.toJSON=r}):L}const WE=220*Xe,qE="$",YE=3;function $(e,t=WE){const r=It(Object.prototype),n=It(Array.prototype),o=[],i=new WeakMap,s=Ao(e,qE,void 0,o,i),a=JSON.stringify(s);let u=a?a.length:0;if(u>t){Co(t,"discarded",e);return}for(;o.length>0&&u<t;){const c=o.shift();let l=0;if(Array.isArray(c.source))for(let d=0;d<c.source.length;d++){const f=Ao(c.source[d],c.path,d,o,i);if(f!==void 0?u+=JSON.stringify(f).length:u+=4,u+=l,l=1,u>t){Co(t,"truncated",e);break}c.target[d]=f}else for(const d in c.source)if(Object.prototype.hasOwnProperty.call(c.source,d)){const f=Ao(c.source[d],c.path,d,o,i);if(f!==void 0&&(u+=JSON.stringify(f).length+l+d.length+YE,l=1),u>t){Co(t,"truncated",e);break}c.target[d]=f}}return r(),n(),s}function Ao(e,t,r,n,o){const i=ZE(e);if(!i||typeof i!="object")return XE(i);const s=fi(i);if(s!=="[Object]"&&s!=="[Array]"&&s!=="[Error]")return s;const a=e;if(o.has(a))return`[Reference seen at ${o.get(a)}]`;const u=r!==void 0?`${t}.${r}`:t,c=Array.isArray(i)?[]:{};return o.set(a,u),n.push({source:i,target:c,path:u}),c}function XE(e){return typeof e=="bigint"?`[BigInt] ${e.toString()}`:typeof e=="function"?`[Function] ${e.name||"unknown"}`:typeof e=="symbol"?`[Symbol] ${e.description||e.toString()}`:e}function fi(e){try{if(e instanceof Event)return JE(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;const r=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(r&&r[1])return`[${r[1]}]`}catch(t){}return"[Unserializable]"}function JE(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?fi(e.currentTarget):null,target:e.target?fi(e.target):null}}function ZE(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch(r){}return e}function Co(e,t,r){w.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,r)}const rl="No stack, consider using an instance of Error";function nl({originalError:e,stackTrace:t,source:r,useFallbackStack:n=!0,nonErrorPrefix:o}){const i=Je(e);return!t&&i&&(t=_r(e)),{source:r,type:t?t.name:void 0,message:QE(t,i,o,e),stack:t?br(t):n?rl:void 0}}function Cn({stackTrace:e,originalError:t,handlingStack:r,componentStack:n,startClocks:o,nonErrorPrefix:i,useFallbackStack:s=!0,source:a,handling:u}){const c=nl({originalError:t,stackTrace:e,source:a,useFallbackStack:s,nonErrorPrefix:i});return W(y({startClocks:o,handling:u,handlingStack:r,componentStack:n,originalError:t},c),{causes:Je(t)?nS(t,a):void 0,fingerprint:eS(t),context:tS(t)})}function QE(e,t,r,n){return e!=null&&e.message&&(e!=null&&e.name)?e.message:t?"Empty message":r?`${r} ${$t($(n))}`:$t($(n))}function eS(e){return Je(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function tS(e){if(e!==null&&typeof e=="object"&&"dd_context"in e)return e.dd_context}function rS(e){var t;return(t=/@ (.+)/.exec(e))===null||t===void 0?void 0:t[1]}function Je(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function nS(e,t){const r=[];let n=e.cause;for(;n!=null&&r.length<10;){const o=nl({originalError:n,source:t,useFallbackStack:!1});r.push(o),n=Je(n)?n.cause:void 0}return r.length?r:void 0}const ae={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function oS(){return new x(e=>{const t=(o,i)=>{const s=Cn({stackTrace:i,originalError:o,startClocks:H(),nonErrorPrefix:"Uncaught",source:ae.SOURCE,handling:"unhandled"});e.notify(s)},{stop:r}=iS(t),{stop:n}=sS(t);return()=>{r(),n()}})}function iS(e){return Ee(ue(),"onerror",({parameters:[t,r,n,o,i]})=>{let s;Je(i)||(s=BE(t,r,n,o)),e(i!=null?i:t,s)})}function sS(e){return Ee(ue(),"onunhandledrejection",({parameters:[t]})=>{e(t.reason||"Empty reason")})}function ol(e){const t=y({version:"6.25.2",onReady(r){r()}},e);return Object.defineProperty(t,"_setDebug",{get(){return wy},enumerable:!1}),t}function il(e,t,r){const n=e[t];n&&!n.q&&n.version&&w.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=r,n&&n.q&&n.q.forEach(o=>yu(o,"onReady callback threw an error:")())}function Rn(e,t){t.silentMultipleInit||w.error(`${e} is already initialized.`)}function U(e,t,r,n,o){return Ke(e,t,[r],n,o)}function Ke(e,t,r,n,{once:o,capture:i,passive:s}={}){const a=T(f=>{!f.isTrusted&&!f.__ddIsTrusted&&!e.allowUntrustedEvents||(o&&d(),n(f))}),u=s?{capture:i,passive:s}:i,c=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,l=Be(c,"addEventListener");r.forEach(f=>l.call(t,f,a,u));function d(){const f=Be(c,"removeEventListener");r.forEach(p=>f.call(t,p,a,u))}return{stop:d}}const Pt={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function sl(e,t){const r=[];t.includes(Pt.cspViolation)&&r.push(cS(e));const n=t.filter(o=>o!==Pt.cspViolation);return n.length&&r.push(aS(n)),Tu(...r)}function aS(e){return new x(t=>{if(!window.ReportingObserver)return;const r=T((o,i)=>o.forEach(s=>t.notify(uS(s)))),n=new window.ReportingObserver(r,{types:e,buffered:!0});return n.observe(),()=>{n.disconnect()}})}function cS(e){return new x(t=>{const{stop:r}=U(e,document,"securitypolicyviolation",n=>{t.notify(lS(n))});return r})}function uS(e){const{type:t,body:r}=e;return al({type:r.id,message:`${t}: ${r.message}`,originalError:e,stack:cl(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)})}function lS(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return al({type:e.effectiveDirective,message:`${Pt.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:cl(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${Sn(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function al(e){return y({startClocks:H(),source:ae.REPORT,handling:"unhandled"},e)}function cl(e,t,r,n,o){return r?br({name:e,message:t,stack:[{func:"?",url:r,line:n!=null?n:void 0,column:o!=null?o:void 0}]}):void 0}const dS=200;function Wi(e){const{env:t,service:r,version:n,datacenter:o,sdkVersion:i,variant:s}=e,a=[tt("sdk_version",i!=null?i:"6.25.2")];return t&&a.push(tt("env",t)),r&&a.push(tt("service",r)),n&&a.push(tt("version",n)),o&&a.push(tt("datacenter",o)),s&&a.push(tt("variant",s)),a}function tt(e,t){const r=t?`${e}:${t}`:e;return(r.length>dS||fS(r))&&w.warn(`Tag ${r} doesn't meet tag requirements and will be sanitized. ${Bi} ${mn}/getting_started/tagging/#defining-tags`),ul(r)}function ul(e){return e.replace(/,/g,"_")}function fS(e){return pS()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function pS(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch(e){return!1}}function qi(e,t){const r=ge.__ddBrowserSdkExtensionCallback;r&&r({type:e,payload:t})}function cn(e,t,r=vS()){if(t===void 0)return e;if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const o=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,o)}if(r.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){const o=Array.isArray(e)?e:[];for(let i=0;i<t.length;++i)o[i]=cn(o[i],t[i],r);return o}const n=ft(e)==="object"?e:{};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=cn(n[o],t[o],r));return n}function xn(e){return cn(void 0,e)}function fe(...e){let t;for(const r of e)r!=null&&(t=cn(t,r));return t}function vS(){if(typeof WeakSet!="undefined"){const t=new WeakSet;return{hasAlreadyBeenSeen(r){const n=t.has(r);return n||t.add(r),n}}}const e=[];return{hasAlreadyBeenSeen(t){const r=e.indexOf(t)>=0;return r||e.push(t),r}}}function ll(){var e;const t=ge.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:(e=t.connection)===null||e===void 0?void 0:e.effectiveType}}function dl(e){return e>=500}function hS(e){try{return e.clone()}catch(t){return}}const gS=80*Xe,mS=32,fl=20*Qu,_S=se,pl=ee;function vl(e,t,r,n,o,i){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?gl(e,t,r,i,{onSuccess:()=>ml(0,t,r,n,o,i),onFailure:()=>{t.queuedPayloads.enqueue(e)||i.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e}),hl(t,r,n,o,i)}}):t.queuedPayloads.enqueue(e)||i.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e})}function hl(e,t,r,n,o){e.transportStatus===2&&Z(()=>{const i=e.queuedPayloads.first();gl(i,e,t,o,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=pl,ml(1,e,t,r,n,o)},onFailure:()=>{e.currentBackoffTime=Math.min(_S,e.currentBackoffTime*2),hl(e,t,r,n,o)}})},e.currentBackoffTime)}function gl(e,t,r,n,{onSuccess:o,onFailure:i}){t.bandwidthMonitor.add(e),r(e,s=>{t.bandwidthMonitor.remove(e),bS(s)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:s.status},n.notify({type:"failure",bandwidth:t.bandwidthMonitor.stats(),payload:e}),i()):(t.transportStatus=0,n.notify({type:"success",bandwidth:t.bandwidthMonitor.stats(),payload:e}),o())})}function ml(e,t,r,n,o,i){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:`Reached max ${n} events size queued for upload: ${fl/Qu}MiB`,source:ae.AGENT,startClocks:H()}),t.queueFullReported=!0);const s=t.queuedPayloads;for(t.queuedPayloads=_l();s.size()>0;)vl(s.dequeue(),t,r,n,o,i)}function bS(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||dl(e.status))}function yS(){return{transportStatus:0,currentBackoffTime:pl,bandwidthMonitor:ES(),queuedPayloads:_l(),queueFullReported:!1}}function _l(){const e=[];return{bytesCount:0,enqueue(t){return this.isFull()?!1:(e.push(t),this.bytesCount+=t.bytesCount,!0)},first(){return e[0]},dequeue(){const t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=fl}}}function ES(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=gS&&this.ongoingRequestCount<mS},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}const pi=16*Xe;function Yi(e,t,r=pi){const n=new x,o=yS();return{observable:n,send:i=>{for(const s of e)vl(i,o,(a,u)=>{mr(ze.AVOID_FETCH_KEEPALIVE)?un(s,a,u):wS(s,r,a,u)},s.trackType,t,n)},sendOnExit:i=>{for(const s of e)SS(s,r,i)}}}function SS(e,t,r){if(!!navigator.sendBeacon&&r.bytesCount<t)try{const o=e.build("beacon",r);if(navigator.sendBeacon(o,r.data))return}catch(o){TS(o)}un(e,r)}let Sa=!1;function TS(e){Sa||(Sa=!0,Ge(e))}function wS(e,t,r,n){if(IS()&&r.bytesCount<t){const i=e.build("fetch-keepalive",r);fetch(i,{method:"POST",body:r.data,keepalive:!0,mode:"cors"}).then(T(s=>n==null?void 0:n({status:s.status,type:s.type}))).catch(T(()=>un(e,r,n)))}else un(e,r,n)}function un(e,t,r){const n=e.build("fetch",t);fetch(n,{method:"POST",body:t.data,mode:"cors"}).then(T(o=>r==null?void 0:r({status:o.status,type:o.type}))).catch(T(()=>r==null?void 0:r({status:0})))}function IS(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}function Bt(){const e=OS();if(e)return{getCapabilities(){var t;return JSON.parse(((t=e.getCapabilities)===null||t===void 0?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return(t=e.getPrivacyLevel)===null||t===void 0?void 0:t.call(e)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,r,n){const o=n?{id:n}:void 0;e.send(JSON.stringify({eventType:t,event:r,view:o}))}}}function bl(e){const t=Bt();return!!t&&t.getCapabilities().includes(e)}function Ce(e){var t;e===void 0&&(e=(t=ue().location)===null||t===void 0?void 0:t.hostname);const r=Bt();return!!r&&r.getAllowedWebViewHosts().some(n=>e===n||e.endsWith(`.${n}`))}function OS(){return ue().DatadogEventBridge}const Ot={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function yl(e){return new x(t=>{const{stop:r}=Ke(e,window,["visibilitychange","freeze"],o=>{o.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:Ot.HIDDEN}):o.type==="freeze"&&t.notify({reason:Ot.FROZEN})},{capture:!0}),n=U(e,window,"beforeunload",()=>{t.notify({reason:Ot.UNLOADING})}).stop;return()=>{r(),n()}})}function AS(e){return an(Ot).includes(e)}const Ta=256*Xe;function Xi({encoder:e,request:t,flushController:r}){let n={};const o=r.flushObservable.subscribe(l=>c(l));function i(l,d,f){r.notifyBeforeAddMessage(d),f!==void 0?(n[f]=l,r.notifyAfterAddMessage()):e.write(e.isEmpty?l:`
7
+ ${l}`,p=>{r.notifyAfterAddMessage(p-d)})}function s(l){return l!==void 0&&n[l]!==void 0}function a(l){const d=n[l];delete n[l];const f=e.estimateEncodedBytesCount(d);r.notifyAfterRemoveMessage(f)}function u(l,d){const f=$t(l),p=e.estimateEncodedBytesCount(f);if(p>=Ta){w.warn(`Discarded a message whose size was bigger than the maximum allowed size ${Ta/Xe}KiB. ${Bi} ${Ey}/#technical-limitations`);return}s(d)&&a(d),i(f,p,d)}function c(l){const d=an(n).join(`
8
+ `);n={};const f=AS(l.reason),p=f?t.sendOnExit:t.send;if(f&&e.isAsync){const v=e.finishSync();v.outputBytesCount&&p(wa(v));const h=[v.pendingData,d].filter(Boolean).join(`
9
+ `);h&&p({data:h,bytesCount:el(h)})}else d&&e.write(e.isEmpty?d:`
10
+ ${d}`),e.finish(v=>{p(wa(v))})}return{flushController:r,add:u,upsert:u,stop:o.unsubscribe}}function wa(e){let t;return typeof e.output=="string"?t=e.output:t=new Blob([e.output],{type:"text/plain"}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}const CS=30*ee,RS=dt?1:50;function Ji({pageMayExitObservable:e,sessionExpireObservable:t}){const r=e.subscribe(d=>a(d.reason)),n=t.subscribe(()=>a("session_expire")),o=new x(()=>()=>{r.unsubscribe(),n.unsubscribe()});let i=0,s=0;function a(d){if(s===0)return;const f=s,p=i;s=0,i=0,l(),o.notify({reason:d,messagesCount:f,bytesCount:p})}let u;function c(){u===void 0&&(u=Z(()=>{a("duration_limit")},CS))}function l(){de(u),u=void 0}return{flushObservable:o,get messagesCount(){return s},notifyBeforeAddMessage(d){i+d>=pi&&a("bytes_limit"),s+=1,i+=d,c()},notifyAfterAddMessage(d=0){i+=d,s>=RS?a("messages_limit"):i>=pi&&a("bytes_limit")},notifyAfterRemoveMessage(d){i-=d,s-=1,s===0&&l()}}}const me="DISCARDED",Y="SKIPPED";function El(){const e={};return{register(t,r){return e[t]||(e[t]=[]),e[t].push(r),{unregister:()=>{e[t]=e[t].filter(n=>n!==r)}}},triggerHook(t,r){const n=e[t]||[],o=[];for(const i of n){const s=i(r);if(s===me)return me;s!==Y&&o.push(s)}return fe(...o)}}}const je={LOG:"log",CONFIGURATION:"configuration",USAGE:"usage"},xS=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],kS=1,LS=[yE],NS=15;let Ro;function Gt(){return Ro||(Ro=new wu(100)),Ro}function Sl(e,t,r,n,o,i){const s=new x,{stop:a}=PS(t,n,o,i,s),{enabled:u,metricsEnabled:c}=$S(e,t,r,s);return{stop:a,enabled:u,metricsEnabled:c}}function $S(e,t,r,n,o=kS,i=NS){const s={},a=!LS.includes(t.site)&&Ue(t.telemetrySampleRate),u={[je.LOG]:a,[je.CONFIGURATION]:a&&Ue(t.telemetryConfigurationSampleRate),[je.USAGE]:a&&Ue(t.telemetryUsageSampleRate),metric:a&&Ue(o)},c=MS(),l=Gt();return l.subscribe(({rawEvent:f,metricName:p})=>{if(p&&!u.metric||!u[f.type])return;const v=p||f.status||f.type;let h=s[v];if(h||(h=s[v]=new Set),h.size>=i)return;const m=$t(f);if(h.has(m))return;const E=r.triggerHook(1,{startTime:H().relative});if(E===me)return;const S=d(E,e,f,c);n.notify(S),qi("telemetry",S),h.add(m)}),l.unbuffer(),Ty(Zi),{enabled:a,metricsEnabled:u.metric};function d(f,p,v,h){const E={type:"telemetry",date:H().timeStamp,service:p,version:"6.25.2",source:"browser",_dd:{format_version:2},telemetry:fe(v,{runtime_env:h,connectivity:ll(),sdk_setup:"npm"}),ddtags:Wi(t).join(","),experimental_features:Array.from(kE())};return fe(E,f)}}function PS(e,t,r,n,o){const i=[];if(Ce()){const s=Bt(),a=o.subscribe(u=>s.send("internal_telemetry",u));i.push(a.unsubscribe)}else{const s=[e.rumEndpointBuilder];e.replica&&DS(e)&&s.push(e.replica.rumEndpointBuilder);const a=Xi({encoder:n(4),request:Yi(s,t),flushController:Ji({pageMayExitObservable:r,sessionExpireObservable:new x})});i.push(a.stop);const u=o.subscribe(a.add);i.push(u.unsubscribe)}return{stop:()=>i.forEach(s=>s())}}function MS(){var e;return{is_local_file:((e=ge.location)===null||e===void 0?void 0:e.protocol)==="file:",is_worker:dt}}function DS(e){return e.site===zu}function zt(e,t){ci(F.debug,e,t),Gt().notify({rawEvent:y({type:je.LOG,message:e,status:"debug"},t)})}function Zi(e,t){Gt().notify({rawEvent:y(y({type:je.LOG,status:"error"},US(e)),t)})}function Tl(e){Gt().notify({rawEvent:{type:je.CONFIGURATION,configuration:e}})}function kn(e,t){Gt().notify({rawEvent:y({type:je.LOG,message:e,status:"debug"},t),metricName:e})}function G(e){Gt().notify({rawEvent:{type:je.USAGE,usage:e}})}function US(e){if(Je(e)){const t=_r(e);return{error:{kind:t.name,stack:br(FS(t))},message:t.message}}return{error:{stack:rl},message:`Uncaught ${$t(e)}`}}function FS(e){return e.stack=e.stack.filter(t=>!t.url||xS.some(r=>t.url.startsWith(r))),e}function VS(e){const t=new Set;return e.forEach(r=>t.add(r)),Array.from(t)}function wl(e,t){const r=e.indexOf(t);r>=0&&e.splice(r,1)}function at(e){return Array.isArray(e)&&e.length>0}const Dr=1/0,jS=se;let Jt=null;const qr=new Set;function BS(){qr.forEach(e=>e())}function pt({expireDelay:e,maxEntries:t}){let r=[];Jt||(Jt=jt(()=>BS(),jS));const n=()=>{const l=ce()-e;for(;r.length>0&&r[r.length-1].endTime<l;)r.pop()};qr.add(n);function o(l,d){const f={value:l,startTime:d,endTime:Dr,remove:()=>{wl(r,f)},close:p=>{f.endTime=p}};return t&&r.length>=t&&r.pop(),r.unshift(f),f}function i(l=Dr,d={returnInactive:!1}){for(const f of r)if(f.startTime<=l){if(d.returnInactive||l<=f.endTime)return f.value;break}}function s(l){const d=r[0];d&&d.endTime===Dr&&d.close(l)}function a(l=Dr,d=0){const f=qe(l,d);return r.filter(p=>p.startTime<=f&&l<=p.endTime).map(p=>p.value)}function u(){r=[]}function c(){qr.delete(n),qr.size===0&&Jt&&(_n(Jt),Jt=null)}return{add:o,find:i,closeActive:s,findAll:a,reset:u,stop:c}}const GS="datadog-synthetics-public-id",zS="datadog-synthetics-result-id",KS="datadog-synthetics-injects-rum";function Ln(){return dt?!1:!!(ge._DATADOG_SYNTHETICS_INJECTS_RUM||Fe(KS))}function Il(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||Fe(GS);return typeof e=="string"?e:void 0}function Ol(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||Fe(zS);return typeof e=="string"?e:void 0}function Al(){return!!(Il()&&Ol())}const HS=se,WS=Ye;function Cl(e,t,r,n){const o=new x,i=new x,s=fE(e.sessionStoreStrategyType,e,t,r),a=pt({expireDelay:WS});if(s.renewObservable.subscribe(()=>{a.add(u(),ce()),o.notify()}),s.expireObservable.subscribe(()=>{i.notify(),a.closeActive(ce())}),s.expandOrRenewSession(),a.add(u(),Au().relative),mr(ze.SHORT_SESSION_INVESTIGATION)){const c=s.getSession();c&&ZS(e,c)}n.observable.subscribe(()=>{n.isGranted()?s.expandOrRenewSession():s.expire(!1)}),qS(e,()=>{n.isGranted()&&s.expandOrRenewSession()}),YS(e,()=>s.expandSession()),XS(e,()=>s.restartSession());function u(){const c=s.getSession();return c?{id:c.id,trackingType:c[t],isReplayForced:!!c.forcedReplay,anonymousId:c.anonymousId}:(JS(e).catch(()=>{}),{id:"invalid",trackingType:Nu,isReplayForced:!1,anonymousId:void 0})}return{findSession:(c,l)=>a.find(c,l),renewObservable:o,expireObservable:i,sessionStateUpdateObservable:s.sessionStateUpdateObservable,expire:s.expire,updateSessionState:s.updateSessionState}}function qS(e,t){const{stop:r}=Ke(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function YS(e,t){const r=()=>{document.visibilityState==="visible"&&t()},{stop:n}=U(e,document,"visibilitychange",r);jt(r,HS)}function XS(e,t){const{stop:r}=U(e,window,"resume",t,{capture:!0})}async function JS(e){const t=e.sessionStoreStrategyType;if(!t)return;let r,n;t.type===xt.COOKIE?(r=Du(t.cookieOptions,e),n={cookie:await Rl(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):r=Vu(),zt("Unexpected session state",y({sessionStoreStrategyType:t.type,session:r,isSyntheticsTest:Al(),createdTimestamp:r==null?void 0:r.created,expireTimestamp:r==null?void 0:r.expire},n))}function ZS(e,t){if(!window.cookieStore||!t.created)return;const r=Number(t.created),n=ne(),{stop:o}=U(e,cookieStore,"change",i);function i(s){const a=ku(s.changed,c=>c.name===Ae);if(!a)return;const u=ne()-r;if(u>14*se)o();else{const c=On(a.value);if(c.id&&c.id!==t.id){o();const l=ne()-n;Rl().then(d=>{zt("Session cookie changed",{time:l,session_age:u,old:t,new:c,cookie:d})}).catch(Ge)}}}}async function Rl(){let e;return"cookieStore"in window?e=await window.cookieStore.getAll(Ae):e=document.cookie.split(/\s*;\s*/).filter(t=>t.startsWith(Ae)),y({count:e.length,domain:xu()||"undefined"},e)}function Qi(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(r,n){const o=el(r);t+=o,e+=r,n&&n(o)},finish(r){r(this.finishSync())},finishSync(){const r={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,r},estimateEncodedBytesCount(r){return r.length}}}class xl{constructor(){this.callbacks={}}notify(t,r){const n=this.callbacks[t];n&&n.forEach(o=>o(r))}subscribe(t,r){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(r),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(n=>r!==n)}}}}const QS=3e3;function Yr(e,t,r=QS){let n=0,o=!1;return{isLimitReached(){if(n===0&&Z(()=>{n=0},se),n+=1,n<=r||o)return o=!1,!1;if(n===r+1){o=!0;try{t({message:`Reached max number of ${e}s by minute: ${r}`,source:ae.AGENT,startClocks:H()})}finally{o=!1}}return!0}}}function es(e,t,r){return document.readyState===t||document.readyState==="complete"?(r(),{stop:L}):U(e,window,t==="complete"?"load":"DOMContentLoaded",r,{once:!0})}function eT(e,t){return new Promise(r=>{es(e,t,r)})}let xo;const ts=new WeakMap;function kl(e){return xo||(xo=tT(e)),xo}function tT(e){return new x(t=>{const{stop:r}=Ee(XMLHttpRequest.prototype,"open",rT),{stop:n}=Ee(XMLHttpRequest.prototype,"send",i=>{nT(i,e,t)},{computeHandlingStack:!0}),{stop:o}=Ee(XMLHttpRequest.prototype,"abort",oT);return()=>{r(),n(),o()}})}function rT({target:e,parameters:[t,r]}){ts.set(e,{state:"open",method:String(t).toUpperCase(),url:Gi(String(r))})}function nT({target:e,parameters:[t],handlingStack:r},n,o){const i=ts.get(e);if(!i)return;const s=i;s.state="start",s.startClocks=H(),s.isAborted=!1,s.xhr=e,s.handlingStack=r,s.requestBody=t;let a=!1;const{stop:u}=Ee(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(l(),u(),a)return;a=!0;const d=i;d.state="complete",d.duration=B(s.startClocks.timeStamp,j()),d.status=e.status,typeof e.response=="string"&&(d.responseBody=e.response),o.notify(sr(d))},{stop:l}=U(n,e,"loadend",c);o.notify(s)}function oT({target:e}){const t=ts.get(e);t&&(t.isAborted=!0)}async function iT(e,t){const r=e.getReader(),n=[];for(;;){const o=await r.read();if(o.done)break;t.collectStreamBody&&n.push(o.value)}return r.cancel().catch(L),t.collectStreamBody?tl(n):void 0}let ko;const Ll=[];function Nn({responseBodyAction:e}={}){return e&&Ll.push(e),ko||(ko=sT()),ko}function sT(){return new x(e=>{if(!ge.fetch)return;const{stop:t}=Ee(ge,"fetch",r=>aT(r,e),{computeHandlingStack:!0});return t})}function aT({parameters:e,onPostCall:t,handlingStack:r},n){const[o,i]=e;let s=i&&i.method;s===void 0&&o instanceof Request&&(s=o.method);const a=s!==void 0?String(s).toUpperCase():"GET",u=o instanceof Request?o.url:Gi(String(o)),c=H(),l={state:"start",init:i,input:o,method:a,startClocks:c,url:u,handlingStack:r};n.notify(l),e[0]=l.input,e[1]=l.init,t(d=>{cT(n,d,l).catch(Ge)})}async function cT(e,t,r){var n,o;const i=r;i.state="resolve";let s;try{s=await t}catch(u){i.status=0,i.isAborted=((o=(n=i.init)===null||n===void 0?void 0:n.signal)===null||o===void 0?void 0:o.aborted)||u instanceof DOMException&&u.code===DOMException.ABORT_ERR,i.error=u,e.notify(i);return}i.response=s,i.status=s.status,i.responseType=s.type,i.isAborted=!1;const a=Ll.reduce((u,c)=>Math.max(u,c(i)),0);if(a!==0){const u=hS(s);if(u&&u.body)try{const c=await iT(u.body,{collectStreamBody:a===2});i.responseBody=c&&new TextDecoder().decode(c)}catch(c){}}e.notify(i)}function uT(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const r=window.requestIdleCallback(T(e),t);return()=>window.cancelIdleCallback(r)}return dT(e)}const lT=50;function dT(e){const t=ne(),r=Z(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,lT-(ne()-t))})},0);return()=>de(r)}const fT=ee,pT=30;function vT(){const e=[];function t(n){let o;if(n.didTimeout){const i=performance.now();o=()=>pT-(performance.now()-i)}else o=n.timeRemaining.bind(n);for(;o()>0&&e.length;)e.shift()();e.length&&r()}function r(){uT(t,{timeout:fT})}return{push(n){e.push(n)===1&&r()},stop(){e.length=0}}}let Lo={};function Nl(e){const t=e.map(r=>(Lo[r]||(Lo[r]=hT(r)),Lo[r]));return Tu(...t)}function hT(e){return new x(t=>{const r=ye[e];return ye[e]=(...n)=>{r.apply(console,n);const o=Nt("console error");Oe(()=>{t.notify(gT(n,e,o))})},()=>{ye[e]=r}})}function gT(e,t,r){const n=e.map(o=>mT(o)).join(" ");if(t===F.error){const o=e.find(Je),i=Cn({originalError:o,handlingStack:r,startClocks:H(),source:ae.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return i.message=n,{api:t,message:n,handlingStack:r,error:i}}return{api:t,message:n,error:void 0,handlingStack:r}}function mT(e){return typeof e=="string"?$(e):Je(e)?Zu(_r(e)):$t($(e),void 0,2)}const _T=500;function $l(){const e=[];return{add:o=>{e.push(o)>_T&&e.splice(0,1)},remove:o=>{wl(e,o)},drain:o=>{e.forEach(i=>i(o)),e.length=0}}}function bT(e){const t=ft(e)==="object";return t||w.error("Unsupported context:",e),t}function No(e,t,r){const n=y({},e);for(const[o,{required:i,type:s}]of Object.entries(t))s==="string"&&!Ia(n[o])&&(n[o]=String(n[o])),i&&Ia(n[o])&&w.warn(`The property ${o} of ${r} is required; context will not be sent to the intake.`);return n}function Ia(e){return e==null||e===""}function yr(e="",{propertiesConfig:t={}}={}){let r={};const n=new x,o={getContext:()=>xn(r),setContext:i=>{bT(i)?r=$(No(i,t,e)):o.clearContext(),n.notify()},setContextProperty:(i,s)=>{r=$(No(W(y({},r),{[i]:s}),t,e)),n.notify()},removeContextProperty:i=>{delete r[i],No(r,t,e),n.notify()},clearContext:()=>{r={},n.notify()},changeObservable:n};return o}function P(e,t,r,n){return T((...o)=>(n&&G({feature:n}),e()[t][r](...o)))}function $o(e,t,r){e.changeObservable.subscribe(()=>{const n=e.getContext();r.add(o=>o[t].setContext(n))})}const yT="_dd_c",ET=[];function rs(e,t,r,n){const o=ST(r,n);ET.push(U(e,window,"storage",({key:c})=>{o===c&&s()})),t.changeObservable.subscribe(a);const i=fe(u(),t.getContext());We(i)||t.setContext(i);function s(){t.setContext(u())}function a(){localStorage.setItem(o,JSON.stringify(t.getContext()))}function u(){const c=localStorage.getItem(o);return c?JSON.parse(c):{}}}function ST(e,t){return`${yT}_${e}_${t}`}function Pl(e,t,r){const n=ns();return t.storeContextsAcrossPages&&rs(t,n,r,4),e.register(0,()=>{const o=n.getContext();return We(o)||!o.id?Y:{account:o}}),n}function ns(){return yr("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function Ml(e,t,r,n){const o=os();return t.storeContextsAcrossPages&&rs(t,o,r,2),e.register(0,()=>{const i=o.getContext();return n?{context:i}:i}),o}function os(){return yr("global context")}function Dl(e,t,r,n){const o=is();return t.storeContextsAcrossPages&&rs(t,o,n,1),e.register(0,({eventType:i,startTime:s})=>{const a=o.getContext(),u=r.findTrackedSession(s);return u&&u.anonymousId&&!a.anonymous_id&&t.trackAnonymousUser&&(a.anonymous_id=u.anonymousId),We(a)?Y:{type:i,usr:a}}),e.register(1,({startTime:i})=>{var s;return{anonymous_id:(s=r.findTrackedSession(i))===null||s===void 0?void 0:s.anonymousId}}),o}function is(){return yr("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}const k={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},M={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"},re={DOCUMENT:"document",XHR:"xhr",BEACON:"beacon",FETCH:"fetch",CSS:"css",JS:"js",IMAGE:"image",FONT:"font",MEDIA:"media",OTHER:"other"},ut={FETCH:re.FETCH,XHR:re.XHR},TT=500;function Ul(e=oS){const t=new wu(TT),r=e().subscribe(n=>{t.notify({type:0,error:n})});return{observable:t,stop:()=>{r.unsubscribe()}}}function wT(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}const A={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",VITAL:"vital"},Oa={LONG_TASK:"long-task",LONG_ANIMATION_FRAME:"long-animation-frame"},Ie={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change",BF_CACHE:"bf_cache"},ss={CLICK:"click",CUSTOM:"custom"},Zt={RAGE_CLICK:"rage_click",ERROR_CLICK:"error_click",DEAD_CLICK:"dead_click"},ur={DURATION:"duration",OPERATION_STEP:"operation_step"};function IT(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function OT(e,t,r){function n(s){return!t.wasInPageStateDuringPeriod("frozen",s.startClocks.relative,s.duration)}function o(s){n(s)&&e.notify(12,Aa(s))}function i(s,a,u,c){if(!mr(ze.FEATURE_OPERATION_VITAL))return;const{operationKey:l,context:d,description:f}=u||{},p={name:s,type:ur.OPERATION_STEP,operationKey:l,failureReason:c,stepType:a,startClocks:H(),context:$(d),description:f};e.notify(12,Aa(p))}return{addOperationStepVital:i,addDurationVital:o,startDurationVital:(s,a={})=>Fl(r,s,a),stopDurationVital:(s,a={})=>{Vl(o,r,s,a)}}}function Fl({vitalsByName:e,vitalsByReference:t},r,n={}){const o=y({name:r,startClocks:H()},n),i={__dd_vital_reference:!0};return e.set(r,o),t.set(i,o),i}function Vl(e,{vitalsByName:t,vitalsByReference:r},n,o={}){const i=typeof n=="string"?t.get(n):r.get(n);i&&(e(AT(i,i.startClocks,o,H())),typeof n=="string"?t.delete(n):r.delete(n))}function AT(e,t,r,n){var o;return{name:e.name,type:ur.DURATION,startClocks:t,duration:B(t.timeStamp,n.timeStamp),context:fe(e.context,r.context),description:(o=r.description)!==null&&o!==void 0?o:e.description}}function Aa(e){const{startClocks:t,type:r,name:n,description:o,context:i}=e,s=y({id:oe(),type:r,name:n,description:o},r===ur.DURATION?{duration:O(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason});return{rawRumEvent:{date:t.timeStamp,vital:s,type:A.VITAL,context:i},startTime:t.relative,duration:r===ur.DURATION?e.duration:void 0,domainContext:{}}}function jl(e,t,r){if(e)for(const n of e){const o=n[t];o&&o(r)}}const Ca=new Map;function Bl(e,t){if(t===100)return!0;if(t===0)return!1;const r=Ca.get(t);if(r&&e===r.sessionId)return r.decision;let n;return window.BigInt?n=CT(BigInt(`0x${e.split("-")[4]}`),t):n=Ue(t),Ca.set(t,{sessionId:e,decision:n}),n}function CT(e,t){const r=BigInt("1111111111111111111"),n=BigInt("0x10000000000000000"),o=e*r%n;return Number(o)<=t/100*Number(n)}function RT(){return zl(64)}function Gl(){return zl(63)}function zl(e){const t=crypto.getRandomValues(new Uint32Array(2));return e===63&&(t[t.length-1]>>>=1),{toString(r=10){let n=t[1],o=t[0],i="";do{const s=n%r*4294967296+o;n=Math.floor(n/r),o=Math.floor(s/r),i=(s%r).toString(r)+i}while(n||o);return i}}}function gt(e){return e.toString(16).padStart(16,"0")}function xT(e){const t=e;return ft(t)==="object"&&cr(t.match)&&Array.isArray(t.propagatorTypes)}function kT(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function LT(e,t,r,n){return{clearTracingIfNeeded:kT,traceFetch:o=>Ra(e,o,t,r,n,i=>{var s;if(o.input instanceof Request&&!(!((s=o.init)===null||s===void 0)&&s.headers))o.input=new Request(o.input),Object.keys(i).forEach(a=>{o.input.headers.append(a,i[a])});else{o.init=sr(o.init);const a=[];o.init.headers instanceof Headers?o.init.headers.forEach((u,c)=>{a.push([c,u])}):Array.isArray(o.init.headers)?o.init.headers.forEach(u=>{a.push(u)}):o.init.headers&&Object.keys(o.init.headers).forEach(u=>{a.push([u,o.init.headers[u]])}),o.init.headers=a.concat(zi(i))}}),traceXhr:(o,i)=>Ra(e,o,t,r,n,s=>{Object.keys(s).forEach(a=>{i.setRequestHeader(a,s[a])})})}}function Ra(e,t,r,n,o,i){const s=r.findTrackedSession();if(!s)return;const a=e.allowedTracingUrls.find(l=>An([l.match],t.url,!0));if(!a)return;const u=Bl(s.id,e.traceSampleRate);(u||e.traceContextInjection===di.ALL)&&(t.traceSampled=u,t.traceId=RT(),t.spanId=Gl(),i(NT(t.traceId,t.spanId,t.traceSampled,s.id,a.propagatorTypes,n,o,e)))}function NT(e,t,r,n,o,i,s,a){const u={};if(o.forEach(c=>{switch(c){case"datadog":{Object.assign(u,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":r?"1":"0","x-datadog-trace-id":e.toString()});break}case"tracecontext":{Object.assign(u,{traceparent:`00-0000000000000000${gt(e)}-${gt(t)}-0${r?"1":"0"}`,tracestate:`dd=s:${r?"1":"0"};o:rum`});break}case"b3":{Object.assign(u,{b3:`${gt(e)}-${gt(t)}-${r?"1":"0"}`});break}case"b3multi":{Object.assign(u,{"X-B3-TraceId":gt(e),"X-B3-SpanId":gt(t),"X-B3-Sampled":r?"1":"0"});break}}}),a.propagateTraceBaggage){const c={"session.id":n},l=i.getContext().id;typeof l=="string"&&(c["user.id"]=l);const d=s.getContext().id;typeof d=="string"&&(c["account.id"]=d);const f=Object.entries(c).map(([p,v])=>`${p}=${encodeURIComponent(v)}`).join(",");f&&(u.baggage=f)}return u}const Kl=["tracecontext","datadog"];function $T(e,t){var r,n,o,i,s,a,u;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&w.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){w.error("Application ID is not configured, no RUM data will be collected.");return}if(!wt(e.sessionReplaySampleRate,"Session Replay")||!wt(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){w.error("Excluded Activity Urls should be an array");return}const c=PT(e);if(!c)return;const l=Wu(e,t),d=DT(e);if(!l)return;const f=(r=e.sessionReplaySampleRate)!==null&&r!==void 0?r:0;return y({applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:f,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually!==void 0?!!e.startSessionReplayRecordingManually:f===0,traceSampleRate:(n=e.traceSampleRate)!==null&&n!==void 0?n:100,rulePsr:hr(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:c,excludedActivityUrls:(o=e.excludedActivityUrls)!==null&&o!==void 0?o:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(!((i=e.trackUserInteractions)!==null&&i!==void 0)||i),trackViewsManually:!!e.trackViewsManually,trackResources:!!(!((s=e.trackResources)!==null&&s!==void 0)||s),trackLongTasks:!!(!((a=e.trackLongTasks)!==null&&a!==void 0)||a),trackBfcacheViews:!!e.trackBfcacheViews,trackEarlyRequests:!!e.trackEarlyRequests,subdomain:e.subdomain,defaultPrivacyLevel:on(Tt,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:Tt.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,traceContextInjection:on(di,e.traceContextInjection)?e.traceContextInjection:di.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:(u=e.profilingSampleRate)!==null&&u!==void 0?u:0,propagateTraceBaggage:!!e.propagateTraceBaggage,allowedGraphQlUrls:d},l)}function PT(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){w.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){w.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(r=>{cr(r)?t.push({match:r,propagatorTypes:Kl}):xT(r)?t.push(r):w.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",r)}),t}function MT(e){const t=new Set;return at(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(r=>{cr(r)?Kl.forEach(n=>t.add(n)):ft(r)==="object"&&Array.isArray(r.propagatorTypes)&&r.propagatorTypes.forEach(n=>t.add(n))}),Array.from(t)}function DT(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return w.warn("allowedGraphQlUrls should be an array"),[];const t=[];return e.allowedGraphQlUrls.forEach(r=>{cr(r)?t.push({match:r,trackPayload:!1,trackResponseErrors:!1}):r&&typeof r=="object"&&"match"in r&&cr(r.match)&&t.push({match:r.match,trackPayload:!!r.trackPayload,trackResponseErrors:!!r.trackResponseErrors})}),t}function UT(e){return at(e)&&e.some(t=>typeof t=="object"&&"trackPayload"in t?!!t.trackPayload:!1)}function FT(e){return at(e)&&e.some(t=>typeof t=="object"&&"trackResponseErrors"in t?!!t.trackResponseErrors:!1)}function VT(e){var t;const r=qu(e);return y({session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:at(e.allowedTracingUrls),use_allowed_graph_ql_urls:at(e.allowedGraphQlUrls),use_track_graph_ql_payload:UT(e.allowedGraphQlUrls),use_track_graph_ql_response_errors:FT(e.allowedGraphQlUrls),selected_tracing_propagators:MT(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:at(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,track_bfcache_views:e.trackBfcacheViews,track_early_requests:e.trackEarlyRequests,plugins:(t=e.plugins)===null||t===void 0?void 0:t.map(n=>{var o;return y({name:n.name},(o=n.getConfigurationTelemetry)===null||o===void 0?void 0:o.call(n))}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:e.remoteConfigurationId,profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy},r)}function jT(e){const t=[];let r=0,n;const o={quote:void 0,escapeSequence:void 0};let i="";for(const s of e){if(n=xa[r].find(a=>WT[a](s,o)),!n)return[];if(o.escapeSequence!==void 0&&n!==12){if(!XT(o.escapeSequence))return[];i+=ZT(o.escapeSequence),o.escapeSequence=void 0}qT.includes(n)?i+=s:YT.includes(n)&&i!==""?(t.push(i),i=""):n===12?o.escapeSequence=o.escapeSequence?`${o.escapeSequence}${s}`:s:n===8?o.quote=s:n===9&&(o.quote=void 0),r=n}return xa[r].includes(1)?(i!==""&&t.push(i),t):[]}const BT=/[a-zA-Z_$]/,GT=/[a-zA-Z0-9_$]/,zT=/[0-9]/,KT=/[a-fA-F0-9]/,HT=`'"`,WT={0:()=>!1,1:()=>!1,2:e=>BT.test(e),3:e=>GT.test(e),4:e=>e===".",5:e=>e==="[",6:e=>e==="]",7:e=>zT.test(e),8:e=>HT.includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>e==="\\",12:(e,t)=>t.escapeSequence===void 0?`${t.quote}/\\bfnrtu`.includes(e):t.escapeSequence.startsWith("u")&&t.escapeSequence.length<5?KT.test(e):!1},xa={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]},qT=[2,3,7,10],YT=[4,5,6];function XT(e){return`"'/\\bfnrt`.includes(e)||e.startsWith("u")&&e.length===5}const JT={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:`
11
+ `,r:"\r",t:" "};function ZT(e){return e.startsWith("u")?String.fromCharCode(parseInt(e.slice(1),16)):JT[e]}const QT="v1",ew=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function tw(e,t){let r;const n=nw(),o=await aw(e);return o.ok?(n.increment("fetch","success"),r=rw(e,o.value,t,n)):(n.increment("fetch","failure"),w.error(o.error)),kn("remote configuration metrics",{metrics:n.get()}),r}function rw(e,t,r,n){const o=y({},e);return ew.forEach(f=>{f in t&&(o[f]=i(t[f]))}),Object.keys(r).forEach(f=>{t[f]!==void 0&&s(r[f],t[f])}),o;function i(f){if(Array.isArray(f))return f.map(i);if(ow(f)){if(iw(f)){const p=f.rcSerializedType;switch(p){case"string":return f.value;case"regex":return Hl(f.value);case"dynamic":return a(f);default:w.error(`Unsupported remote configuration: "rcSerializedType": "${p}"`);return}}return Eu(f,i)}return f}function s(f,p){p.forEach(({key:v,value:h})=>{f.setContextProperty(v,i(h))})}function a(f){const p=f.strategy;let v;switch(p){case"cookie":v=u(f);break;case"dom":v=c(f);break;case"js":v=d(f);break;default:w.error(`Unsupported remote configuration: "strategy": "${p}"`);return}const h=f.extractor;return h!==void 0&&typeof v=="string"?sw(h,v):v}function u({name:f}){const p=In(f);return n.increment("cookie",p!==void 0?"success":"missing"),p}function c({selector:f,attribute:p}){let v;try{v=document.querySelector(f)}catch(m){w.error(`Invalid selector in the remote configuration: '${f}'`),n.increment("dom","failure");return}if(!v){n.increment("dom","missing");return}if(l(v,p)){w.error(`Forbidden element selected by the remote configuration: '${f}'`),n.increment("dom","failure");return}const h=p!==void 0?v.getAttribute(p):v.textContent;if(h===null){n.increment("dom","missing");return}return n.increment("dom","success"),h}function l(f,p){return f.getAttribute("type")==="password"&&p==="value"}function d({path:f}){let p=window;const v=jT(f);if(v.length===0){w.error(`Invalid JSON path in the remote configuration: '${f}'`),n.increment("js","failure");return}for(const h of v){if(!(h in p)){n.increment("js","missing");return}try{p=p[h]}catch(m){w.error(`Error accessing: '${f}'`,m),n.increment("js","failure");return}}return n.increment("js","success"),p}}function nw(){const e={fetch:{}};return{get:()=>e,increment:(t,r)=>{e[t]||(e[t]={}),e[t][r]||(e[t][r]=0),e[t][r]=e[t][r]+1}}}function ow(e){return typeof e=="object"&&e!==null}function iw(e){return"rcSerializedType"in e}function Hl(e){try{return new RegExp(e)}catch(t){w.error(`Invalid regex in the remote configuration: '${e}'`)}}function sw(e,t){const r=Hl(e.value);if(r===void 0)return;const n=r.exec(t);if(n===null)return;const[o,i]=n;return i||o}async function aw(e){let t;try{t=await fetch(cw(e))}catch(n){t=void 0}if(!t||!t.ok)return{ok:!1,error:new Error("Error fetching the remote configuration.")};const r=await t.json();return r.rum?{ok:!0,value:r.rum}:{ok:!1,error:new Error("No remote configuration for RUM.")}}function cw(e){return e.remoteConfigurationProxy?e.remoteConfigurationProxy:`https://sdk-configuration.${Ku("rum",e)}/${QT}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function uw({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t},r,n,o){const i=$l(),s=os();Po(s,k.globalContext,i);const a=is();Po(a,k.userContext,i);const u=ns();Po(u,k.accountContext,i);let c,l,d,f;const p=r.observable.subscribe(h),v={};function h(){if(!d||!f||!r.isGranted())return;p.unsubscribe();let _;if(f.trackViewsManually){if(!c)return;i.remove(c.callback),_=c.options}const g=o(f,l,_);i.drain(g)}function m(_,g){const b=Ce();if(b&&(_=lw(_)),d=_,Tl(VT(_)),f){Rn("DD_RUM",_);return}const C=$T(_,g);if(C){if(!b&&!C.sessionStoreStrategyType){w.warn("No storage available for session. We will not send any data.");return}C.compressIntakeRequests&&!b&&t&&(l=t(C,"Datadog RUM",L),!l)||(f=C,Nn().subscribe(L),r.tryToInit(C.trackingConsent),h())}}const E=_=>{i.add(g=>g.addDurationVital(_))};return{init(_,g,b){if(!_){w.error("Missing configuration");return}Yu(_.enableExperimentalFeatures),d=_,!(e&&Ln())&&(jl(_.plugins,"onInit",{initConfiguration:_,publicApi:g}),_.remoteConfigurationId?tw(_,{user:a,context:s}).then(C=>{C&&m(C,b)}).catch(Ge):m(_,b))},get initConfiguration(){return d},getInternalContext:L,stopSession:L,addTiming(_,g=j()){i.add(b=>b.addTiming(_,g))},startView(_,g=H()){const b=C=>{C.startView(_,g)};i.add(b),c||(c={options:_,callback:b},h())},setViewName(_){i.add(g=>g.setViewName(_))},setViewContext(_){i.add(g=>g.setViewContext(_))},setViewContextProperty(_,g){i.add(b=>b.setViewContextProperty(_,g))},getViewContext:()=>v,globalContext:s,userContext:a,accountContext:u,addAction(_){i.add(g=>g.addAction(_))},addError(_){i.add(g=>g.addError(_))},addFeatureFlagEvaluation(_,g){i.add(b=>b.addFeatureFlagEvaluation(_,g))},startDurationVital(_,g){return Fl(n,_,g)},stopDurationVital(_,g){Vl(E,n,_,g)},addDurationVital:E,addOperationStepVital:(_,g,b,C)=>{i.add(Kt=>Kt.addOperationStepVital($(_),g,$(b),$(C)))}}}function lw(e){var t,r;return W(y({},e),{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:(t=e.defaultPrivacyLevel)!==null&&t!==void 0?t:(r=Bt())===null||r===void 0?void 0:r.getPrivacyLevel()})}function Po(e,t,r){e.changeObservable.subscribe(()=>{const n=e.getContext();r.add(o=>o[t].setContext(n))})}function dw(e,t,r,n={}){const o=Gu(),i=IT(),s=Ul().observable;let a=uw(n,o,i,(d,f,p)=>{const v=f&&n.createDeflateEncoder?m=>n.createDeflateEncoder(d,f,m):Qi,h=e(d,t,r,p,v,o,i,s,n.sdkName);return t.onRumStart(h.lifeCycle,d,h.session,h.viewHistory,f,h.telemetry),r.onRumStart(h.lifeCycle,h.hooks,d,h.session,h.viewHistory,h.longTaskContexts,v),a=fw(a,h),jl(d.plugins,"onRumStart",{strategy:a,addEvent:h.addEvent}),h});const u=()=>a,c=T(d=>{const f=typeof d=="object"?d:{name:d};a.startView(f),G({feature:"start-view"})}),l=ol({init:d=>{const f=new Error().stack;Oe(()=>a.init(d,l,f))},setTrackingConsent:T(d=>{o.update(d),G({feature:"set-tracking-consent",tracking_consent:d})}),setViewName:T(d=>{a.setViewName(d),G({feature:"set-view-name"})}),setViewContext:T(d=>{a.setViewContext(d),G({feature:"set-view-context"})}),setViewContextProperty:T((d,f)=>{a.setViewContextProperty(d,f),G({feature:"set-view-context-property"})}),getViewContext:T(()=>(G({feature:"set-view-context-property"}),a.getViewContext())),getInternalContext:T(d=>a.getInternalContext(d)),getInitConfiguration:T(()=>xn(a.initConfiguration)),addAction:(d,f)=>{const p=Nt("action");Oe(()=>{a.addAction({name:$(d),context:$(f),startClocks:H(),type:ss.CUSTOM,handlingStack:p}),G({feature:"add-action"})})},addError:(d,f)=>{const p=Nt("error");Oe(()=>{a.addError({error:d,handlingStack:p,context:$(f),startClocks:H()}),G({feature:"add-error"})})},addTiming:T((d,f)=>{a.addTiming($(d),f)}),setGlobalContext:P(u,k.globalContext,M.setContext,"set-global-context"),getGlobalContext:P(u,k.globalContext,M.getContext,"get-global-context"),setGlobalContextProperty:P(u,k.globalContext,M.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:P(u,k.globalContext,M.removeContextProperty,"remove-global-context-property"),clearGlobalContext:P(u,k.globalContext,M.clearContext,"clear-global-context"),setUser:P(u,k.userContext,M.setContext,"set-user"),getUser:P(u,k.userContext,M.getContext,"get-user"),setUserProperty:P(u,k.userContext,M.setContextProperty,"set-user-property"),removeUserProperty:P(u,k.userContext,M.removeContextProperty,"remove-user-property"),clearUser:P(u,k.userContext,M.clearContext,"clear-user"),setAccount:P(u,k.accountContext,M.setContext,"set-account"),getAccount:P(u,k.accountContext,M.getContext,"get-account"),setAccountProperty:P(u,k.accountContext,M.setContextProperty,"set-account-property"),removeAccountProperty:P(u,k.accountContext,M.removeContextProperty,"remove-account-property"),clearAccount:P(u,k.accountContext,M.clearContext,"clear-account"),startView:c,stopSession:T(()=>{a.stopSession(),G({feature:"stop-session"})}),addFeatureFlagEvaluation:T((d,f)=>{a.addFeatureFlagEvaluation($(d),$(f)),G({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:T(()=>t.getSessionReplayLink()),startSessionReplayRecording:T(d=>{t.start(d),G({feature:"start-session-replay-recording",force:d&&d.force})}),stopSessionReplayRecording:T(()=>t.stop()),addDurationVital:T((d,f)=>{G({feature:"add-duration-vital"}),a.addDurationVital({name:$(d),type:ur.DURATION,startClocks:Ay(f.startTime),duration:f.duration,context:$(f&&f.context),description:$(f&&f.description)})}),startDurationVital:T((d,f)=>(G({feature:"start-duration-vital"}),a.startDurationVital($(d),{context:$(f&&f.context),description:$(f&&f.description)}))),stopDurationVital:T((d,f)=>{G({feature:"stop-duration-vital"}),a.stopDurationVital(typeof d=="string"?$(d):d,{context:$(f&&f.context),description:$(f&&f.description)})}),startFeatureOperation:T((d,f)=>{G({feature:"add-operation-step-vital",action_type:"start"}),a.addOperationStepVital(d,"start",f)}),succeedFeatureOperation:T((d,f)=>{G({feature:"add-operation-step-vital",action_type:"succeed"}),a.addOperationStepVital(d,"end",f)}),failFeatureOperation:T((d,f,p)=>{G({feature:"add-operation-step-vital",action_type:"fail"}),a.addOperationStepVital(d,"end",p,f)})});return l}function fw(e,t){return y({init:r=>{Rn("DD_RUM",r)},initConfiguration:e.initConfiguration},t)}function pw(){const e=vw();return new x(t=>{if(!e)return;const r=new e(T(n=>t.notify(n)));return r.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>r.disconnect()})}function vw(){let e;const t=window;if(t.Zone&&(e=Be(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const r=new t.MutationObserver(L),n=Be(r,"originalInstance");e=n&&n.constructor}return e||(e=t.MutationObserver),e}function hw(){const e=new x,{stop:t}=Ee(window,"open",()=>e.notify());return{observable:e,stop:t}}function gw(e,t,r,n,o){return{get:i=>{const s=r.findView(i),a=o.findUrl(i),u=t.findTrackedSession(i);if(u&&s&&a){const c=n.findActionId(i);return{application_id:e,session_id:u.id,user_action:c?{id:c}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}const mw=xl,_w=Ye;function bw(e){const t=pt({expireDelay:_w});e.subscribe(1,n=>{t.add(r(n),n.startClocks.relative)}),e.subscribe(6,({endClocks:n})=>{t.closeActive(n.relative)}),e.subscribe(3,n=>{const o=t.find(n.startClocks.relative);o&&(n.name&&(o.name=n.name),n.context&&(o.context=n.context),o.sessionIsActive=n.sessionIsActive)}),e.subscribe(10,()=>{t.reset()});function r(n){return{service:n.service,version:n.version,context:n.context,id:n.id,name:n.name,startClocks:n.startClocks}}return{findView:n=>t.find(n),stop:()=>{t.stop()}}}const Wl="initial_document",yw=[[re.DOCUMENT,e=>Wl===e],[re.XHR,e=>e==="xmlhttprequest"],[re.FETCH,e=>e==="fetch"],[re.BEACON,e=>e==="beacon"],[re.CSS,(e,t)=>/\.css$/i.test(t)],[re.JS,(e,t)=>/\.js$/i.test(t)],[re.IMAGE,(e,t)=>["image","img","icon"].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[re.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[re.MEDIA,(e,t)=>["audio","video"].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function Ew(e){const t=e.name;if(!My(t))return re.OTHER;const r=Dy(t);for(const[n,o]of yw)if(o(e.initiatorType,r))return n;return re.OTHER}function ka(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function ql(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function Sw(e){const{duration:t,startTime:r,responseEnd:n}=e;return t===0&&r<n?B(r,n):t}function Tw(e){if(!Xl(e))return;const{startTime:t,fetchStart:r,workerStart:n,redirectStart:o,redirectEnd:i,domainLookupStart:s,domainLookupEnd:a,connectStart:u,secureConnectionStart:c,connectEnd:l,requestStart:d,responseStart:f,responseEnd:p}=e,v={download:Qe(t,f,p),first_byte:Qe(t,d,f)};return 0<n&&n<r&&(v.worker=Qe(t,n,r)),r<l&&(v.connect=Qe(t,u,l),u<=c&&c<=l&&(v.ssl=Qe(t,c,l))),r<a&&(v.dns=Qe(t,s,a)),t<i&&(v.redirect=Qe(t,o,i)),v}function Yl(e){return e.duration>=0}function Xl(e){const t=ka(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),r=ww(e)?ka(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&r}function ww(e){return e.redirectEnd>e.startTime}function Qe(e,t,r){if(e<=t&&t<=r)return{duration:O(B(t,r)),start:O(B(e,t))}}function Iw(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function Ow(e){return e.deliveryType===""?"other":e.deliveryType}function Aw(e){if(e.startTime<e.responseStart){const{encodedBodySize:t,decodedBodySize:r,transferSize:n}=e;return{size:r,encoded_body_size:t,decoded_body_size:r,transfer_size:n}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function as(e){return e&&(!Hu(e)||mr(ze.TRACK_INTAKE_REQUESTS))}const Cw=/data:(.+)?(;base64)?,/g,Rw=24e3;function xw(e,t=Rw){if(e.length<=t||!e.startsWith("data:"))return e;const r=e.substring(0,100).match(Cw);return r?`${r[0]}[...]`:e}const kw=32*Xe;function Lw(e,t){const r=$w(e.requestBody,t.trackPayload);if(r){if(t.trackResponseErrors&&e.responseBody){const n=Nw(e.responseBody);n&&(r.error_count=n.length,r.errors=n)}return r}}function Nw(e){let t;try{t=JSON.parse(e)}catch(o){return}if(!t||typeof t!="object")return;const r=t;return at(r.errors)?r.errors.map(o=>{var i;return{message:o.message,path:o.path,locations:o.locations,code:(i=o.extensions)===null||i===void 0?void 0:i.code}}):void 0}function Jl(e,t){return t.allowedGraphQlUrls.find(r=>An([r.match],e))}function $w(e,t=!1){if(!e||typeof e!="string")return;let r;try{r=JSON.parse(e)}catch(a){return}if(!r)return;let n,o;if(r.query){const a=r.query.trim();n=Pw(a),t&&(o=Sn(a,kw,"..."))}const i=r.operationName;let s;return r.variables&&(s=JSON.stringify(r.variables)),{operationType:n,operationName:i,variables:s,payload:o}}function Pw(e){var t;return(t=e.match(/^\s*(query|mutation|subscription)\b/i))===null||t===void 0?void 0:t[1]}let La=1;function Mw(e,t,r,n,o){const i=LT(t,r,n,o);Dw(e,t,i),Uw(e,t,i)}function Dw(e,t,r){const n=kl(t).subscribe(o=>{const i=o;if(as(i.url))switch(i.state){case"start":r.traceXhr(i,i.xhr),i.requestIndex=Zl(),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"complete":r.clearTracingIfNeeded(i),e.notify(8,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:ut.XHR,url:i.url,xhr:i.xhr,isAborted:i.isAborted,handlingStack:i.handlingStack,requestBody:i.requestBody,responseBody:i.responseBody});break}});return{stop:()=>n.unsubscribe()}}function Uw(e,t,r){const n=Nn({responseBodyAction:o=>{var i;return!((i=Jl(o.url,t))===null||i===void 0)&&i.trackResponseErrors?2:1}}).subscribe(o=>{var i;const s=o;if(as(s.url))switch(s.state){case"start":r.traceFetch(s),s.requestIndex=Zl(),e.notify(7,{requestIndex:s.requestIndex,url:s.url});break;case"resolve":r.clearTracingIfNeeded(s),e.notify(8,{duration:B(s.startClocks.timeStamp,j()),method:s.method,requestIndex:s.requestIndex,responseType:s.responseType,spanId:s.spanId,startClocks:s.startClocks,status:s.status,traceId:s.traceId,traceSampled:s.traceSampled,type:ut.FETCH,url:s.url,response:s.response,init:s.init,input:s.input,isAborted:s.isAborted,handlingStack:s.handlingStack,requestBody:(i=s.init)===null||i===void 0?void 0:i.body,responseBody:s.responseBody});break}});return{stop:()=>n.unsubscribe()}}function Zl(){const e=La;return La+=1,e}function Ql(e){return hr(e)&&e<0?void 0:e}function ed({lifeCycle:e,isChildEvent:t,onChange:r=L}){const n={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=e.subscribe(13,i=>{var s;if(!(i.type==="view"||i.type==="vital"||!t(i)))switch(i.type){case A.ERROR:n.errorCount+=1,r();break;case A.ACTION:n.actionCount+=1,i.action.frustration&&(n.frustrationCount+=i.action.frustration.type.length),r();break;case A.LONG_TASK:n.longTaskCount+=1,r();break;case A.RESOURCE:!((s=i._dd)===null||s===void 0)&&s.discarded||(n.resourceCount+=1,r());break}});return{stop:()=>{o.unsubscribe()},eventCounts:n}}function Fw(e,t){const r=ne();let n=!1;const{stop:o}=Ke(e,window,["click","mousedown","keydown","touchstart","pointerdown"],a=>{if(!a.cancelable)return;const u={entryType:"first-input",processingStart:ce(),processingEnd:ce(),startTime:a.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};a.type==="pointerdown"?i(e,u):s(u)},{passive:!0,capture:!0});return{stop:o};function i(a,u){Ke(a,window,["pointerup","pointercancel"],c=>{c.type==="pointerup"&&s(u)},{once:!0})}function s(a){if(!n){n=!0,o();const u=a.processingStart-a.startTime;u>=0&&u<ne()-r&&t(a)}}}var N;(function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.LONG_ANIMATION_FRAME="long-animation-frame",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource",e.VISIBILITY_STATE="visibility-state"})(N||(N={}));function Re(e,t){return new x(r=>{if(!window.PerformanceObserver)return;const n=u=>{const c=Bw(u);c.length>0&&r.notify(c)};let o,i=!0;const s=new PerformanceObserver(T(u=>{i?o=Z(()=>n(u.getEntries())):n(u.getEntries())}));try{s.observe(t)}catch(u){if([N.RESOURCE,N.NAVIGATION,N.LONG_TASK,N.PAINT].includes(t.type)){t.buffered&&(o=Z(()=>n(performance.getEntriesByType(t.type))));try{s.observe({entryTypes:[t.type]})}catch(l){return}}}i=!1,Vw(e);let a;return!vt(N.FIRST_INPUT)&&t.type===N.FIRST_INPUT&&({stop:a}=Fw(e,u=>{n([u])})),()=>{s.disconnect(),a&&a(),de(o)}})}let Qt;function Vw(e){return!Qt&&jw()&&"addEventListener"in performance&&(Qt=U(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{Qt==null||Qt.stop()}}function jw(){return window.performance!==void 0&&"getEntries"in performance}function vt(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function Bw(e){return e.filter(t=>!Gw(t))}function Gw(e){return e.entryType===N.RESOURCE&&(!as(e.name)||!Yl(e))}function vi(e){return e.nodeType===Node.TEXT_NODE}function zw(e){return e.nodeType===Node.COMMENT_NODE}function xe(e){return e.nodeType===Node.ELEMENT_NODE}function td(e){return xe(e)&&!!e.shadowRoot}function Kw(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&xe(t.host)}function YC(e){return e.childNodes.length>0||td(e)}function XC(e,t){let r=e.firstChild;for(;r;)t(r),r=r.nextSibling;td(e)&&t(e.shadowRoot)}function Hw(e){return Kw(e)?e.host:e.parentNode}const rd=100,Ww=100,Na="data-dd-excluded-activity-mutations";function cs(e,t,r,n,o,i){const s=Yw(e,t,r,n);return qw(s,o,i)}function qw(e,t,r){let n,o=!1;const i=Z(T(()=>c({hadActivity:!1})),rd),s=r!==void 0?Z(T(()=>c({hadActivity:!0,end:j()})),r):void 0,a=e.subscribe(({isBusy:l})=>{de(i),de(n);const d=j();l||(n=Z(T(()=>c({hadActivity:!0,end:d})),Ww))}),u=()=>{o=!0,de(i),de(n),de(s),a.unsubscribe()};function c(l){o||(u(),t(l))}return{stop:u}}function Yw(e,t,r,n){return new x(o=>{const i=[];let s,a=0;return i.push(t.subscribe(c=>{c.every(Xw)||u()}),r.subscribe(u),Re(n,{type:N.RESOURCE}).subscribe(c=>{c.some(l=>!Mo(n,l.name))&&u()}),e.subscribe(7,c=>{Mo(n,c.url)||(s===void 0&&(s=c.requestIndex),a+=1,u())}),e.subscribe(8,c=>{Mo(n,c.url)||s===void 0||c.requestIndex<s||(a-=1,u())})),()=>{i.forEach(c=>c.unsubscribe())};function u(){o.notify({isBusy:a>0})}})}function Mo(e,t){return An(e.excludedActivityUrls,t)}function Xw(e){const t=e.type==="characterData"?e.target.parentElement:e.target;return!!(t&&xe(t)&&t.matches(`[${Na}], [${Na}] *`))}const $n="data-dd-action-name",nd="Masked Element",od=[$n,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],Jw=[sd,Qw],Zw=[sd,e0,t0];function Er(e,t){if(!e.isConnected)return;let r,n=e;for(;n&&n.nodeName!=="HTML";){const o=$a(n,Jw,n0,t,r);if(o)return o;r=$a(n,Zw,o0,t,r)||Pn(r0(n),r),n=n.parentElement}return r}function id(e){return/[0-9]/.test(e)}function Qw(e){if(e.id&&!id(e.id))return`#${CSS.escape(e.id)}`}function e0(e){if(e.tagName==="BODY")return;const t=e.classList;for(let r=0;r<t.length;r+=1){const n=t[r];if(!id(n))return`${CSS.escape(e.tagName)}.${CSS.escape(n)}`}}function t0(e){return CSS.escape(e.tagName)}function sd(e,t){if(t){const n=r(t);if(n)return n}for(const n of od){const o=r(n);if(o)return o}function r(n){if(e.hasAttribute(n))return`${CSS.escape(e.tagName)}[${n}="${CSS.escape(e.getAttribute(n))}"]`}}function r0(e){let t=e.parentElement.firstElementChild,r=1;for(;t&&t!==e;)t.tagName===e.tagName&&(r+=1),t=t.nextElementSibling;return`${CSS.escape(e.tagName)}:nth-of-type(${r})`}function $a(e,t,r,n,o){for(const i of t){const s=i(e,n);if(s&&r(e,s,o))return Pn(s,o)}}function n0(e,t,r){return e.ownerDocument.querySelectorAll(Pn(t,r)).length===1}function o0(e,t,r){let n;if(r===void 0)n=s=>s.matches(t);else{const s=Pn(`${t}:scope`,r);n=a=>a.querySelector(s)!==null}let i=e.parentElement.firstElementChild;for(;i;){if(i!==e&&n(i))return!1;i=i.nextElementSibling}return!0}function Pn(e,t){return t?`${e}>${t}`:e}const R={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Tt.ALLOW,MASK:Tt.MASK,MASK_USER_INPUT:Tt.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:Tt.MASK_UNLESS_ALLOWLISTED},ad="data-dd-privacy",JC="hidden",i0="dd-privacy-",Do="***",ZC="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",s0={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},a0="x";function it(e){return`[${ad}="${e}"], .${i0}${e}`}function Mn(e,t,r){if(r&&r.has(e))return r.get(e);const n=Hw(e),o=n?Mn(n,t,r):t,i=u0(e),s=c0(i,o);return r&&r.set(e,s),s}function c0(e,t){switch(t){case R.HIDDEN:case R.IGNORE:return t}switch(e){case R.ALLOW:case R.MASK:case R.MASK_USER_INPUT:case R.MASK_UNLESS_ALLOWLISTED:case R.HIDDEN:case R.IGNORE:return e;default:return t}}function u0(e){if(xe(e)){if(e.tagName==="BASE")return R.ALLOW;if(e.tagName==="INPUT"){const t=e;if(t.type==="password"||t.type==="email"||t.type==="tel"||t.type==="hidden")return R.MASK;const r=t.getAttribute("autocomplete");if(r&&(r.startsWith("cc-")||r.endsWith("-password")))return R.MASK}if(e.matches(it(R.HIDDEN)))return R.HIDDEN;if(e.matches(it(R.MASK)))return R.MASK;if(e.matches(it(R.MASK_UNLESS_ALLOWLISTED)))return R.MASK_UNLESS_ALLOWLISTED;if(e.matches(it(R.MASK_USER_INPUT)))return R.MASK_USER_INPUT;if(e.matches(it(R.ALLOW)))return R.ALLOW;if(d0(e))return R.IGNORE}}function cd(e,t){switch(t){case R.MASK:case R.HIDDEN:case R.IGNORE:return!0;case R.MASK_UNLESS_ALLOWLISTED:return vi(e)?Ur(e.parentNode)?!0:!ld(e.textContent||""):Ur(e);case R.MASK_USER_INPUT:return vi(e)?Ur(e.parentNode):Ur(e);default:return!1}}function l0(e,t,r,n,o){if(n!==R.MASK&&n!==R.MASK_UNLESS_ALLOWLISTED||t===ad||od.includes(t)||t===o.actionNameAttribute)return!1;switch(t){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return!!(e==="A"&&t==="href"||e==="IFRAME"&&t==="srcdoc"||r&&t.startsWith("data-")||(e==="IMG"||e==="SOURCE")&&(t==="src"||t==="srcset"))}function Ur(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;const t=e;if(t.tagName==="INPUT")switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!s0[t.tagName]}const ud=e=>e.replace(/\S/g,a0);function QC(e,t){var r;const n=(r=e.parentElement)===null||r===void 0?void 0:r.tagName;let o=e.textContent||"";if(n==="HEAD"&&!o.trim())return;const s=t;if(n==="SCRIPT")o=Do;else if(s===R.HIDDEN)o=Do;else if(cd(e,s))if(n==="DATALIST"||n==="SELECT"||n==="OPTGROUP"){if(!o.trim())return}else n==="OPTION"?o=Do:s===R.MASK_UNLESS_ALLOWLISTED?o=dd(o):o=ud(o);return o}function d0(e){if(e.nodeName==="SCRIPT")return!0;if(e.nodeName==="LINK"){const r=t("rel");return/preload|prefetch/i.test(r)&&t("as")==="script"||r==="shortcut icon"||r==="icon"}if(e.nodeName==="META"){const r=t("name"),n=t("rel"),o=t("property");return/^msapplication-tile(image|color)$/.test(r)||r==="application-name"||n==="icon"||n==="apple-touch-icon"||n==="shortcut icon"||r==="keywords"||r==="description"||/^(og|twitter|fb):/.test(o)||/^(og|twitter):/.test(r)||r==="pinterest"||r==="robots"||r==="googlebot"||r==="bingbot"||e.hasAttribute("http-equiv")||r==="author"||r==="generator"||r==="framework"||r==="publisher"||r==="progid"||/^article:/.test(o)||/^product:/.test(o)||r==="google-site-verification"||r==="yandex-verification"||r==="csrf-token"||r==="p:domain_verify"||r==="verify-v1"||r==="verification"||r==="shopify-checkout-api-token"}function t(r){return(e.getAttribute(r)||"").toLowerCase()}return!1}function ld(e){var t;return!e||!e.trim()?!0:((t=window.$DD_ALLOW)===null||t===void 0?void 0:t.has(e.toLocaleLowerCase()))||!1}function dd(e,t){return ld(e)?e:t||ud(e)}const fd=ee,f0=100;function p0(e,t){const r=[];let n=0,o;i(e);function i(u){u.stopObservable.subscribe(s),r.push(u),de(o),o=Z(a,fd)}function s(){n===1&&r.every(u=>u.isStopped())&&(n=2,t(r))}function a(){de(o),n===0&&(n=1,s())}return{tryAppend:u=>n!==0?!1:r.length>0&&!v0(r[r.length-1].event,u.event)?(a(),!1):(i(u),!0),stop:()=>{a()}}}function v0(e,t){return e.target===t.target&&h0(e,t)<=f0&&e.timeStamp-t.timeStamp<=fd}function h0(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function g0(e,t,r=R.ALLOW){const n=new Map,{actionNameAttribute:o}=t,i=Pa(e,$n)||o&&Pa(e,o);return i?{name:i,nameSource:"custom_attribute"}:r===R.MASK?{name:nd,nameSource:"mask_placeholder"}:Ma(e,m0,t,n)||Ma(e,_0,t,n)||{name:"",nameSource:"blank"}}function Pa(e,t){const r=e.closest(`[${t}]`);if(!r)return;const n=r.getAttribute(t);return vd(pd(n.trim()))}const m0=[(e,t,r)=>{if("labels"in e&&e.labels&&e.labels.length>0)return Xr(e.labels[0],t,r)},e=>{if(e.nodeName==="INPUT"){const t=e,r=t.getAttribute("type");if(r==="button"||r==="submit"||r==="reset")return{name:t.value,nameSource:"text_content"}}},(e,t,r)=>{if(e.nodeName==="BUTTON"||e.nodeName==="LABEL"||e.getAttribute("role")==="button")return Xr(e,t,r)},(e,t,r)=>er(e,"aria-label",t,r),(e,t,r)=>{const n=e.getAttribute("aria-labelledby");if(n)return{name:n.split(/\s+/).map(o=>y0(e,o)).filter(o=>!!o).map(o=>hd(o,t,r)).join(" "),nameSource:"text_content"}},(e,t,r)=>er(e,"alt",t,r),(e,t,r)=>er(e,"name",t,r),(e,t,r)=>er(e,"title",t,r),(e,t,r)=>er(e,"placeholder",t,r),(e,t,r)=>{if("options"in e&&e.options.length>0)return Xr(e.options[0],t,r)}],_0=[(e,t,r)=>Xr(e,t,r)],b0=10;function Ma(e,t,r,n){let o=e,i=0;for(;i<=b0&&o&&o.nodeName!=="BODY"&&o.nodeName!=="HTML"&&o.nodeName!=="HEAD";){for(const s of t){const a=s(o,r,n);if(a){const{name:u,nameSource:c}=a,l=u&&u.trim();if(l)return{name:vd(pd(l)),nameSource:c}}}if(o.nodeName==="FORM")break;o=o.parentElement,i+=1}}function pd(e){return e.replace(/\s+/g," ")}function vd(e){return e.length>100?`${Sn(e,100)} [...]`:e}function y0(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function er(e,t,r,n){const{enablePrivacyForActionName:o,defaultPrivacyLevel:i}=r;let s=e.getAttribute(t);if(s&&o){const a=Mn(e,i,n);l0(e.tagName,t,s,a,r)&&(s=dd(s,nd))}else s||(s="");return{name:s,nameSource:"standard_attribute"}}function Xr(e,t,r){return{name:hd(e,t,r)||"",nameSource:"text_content"}}function hd(e,t,r){if(e.isContentEditable)return;const{enablePrivacyForActionName:n,actionNameAttribute:o,defaultPrivacyLevel:i}=t;if(mr(ze.USE_TREE_WALKER_FOR_ACTION_NAME))return E0(e,o,n,i,r);if("innerText"in e){let s=e.innerText;const a=u=>{const c=e.querySelectorAll(u);for(let l=0;l<c.length;l+=1){const d=c[l];if("innerText"in d){const f=d.innerText;f&&f.trim().length>0&&(s=s.replace(f,""))}}};return a(`[${$n}]`),o&&a(`[${o}]`),n&&a(`${it(R.HIDDEN)}, ${it(R.MASK)}`),s}return e.textContent}function E0(e,t,r,n,o){const i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,a);let s="";for(;i.nextNode();){const u=i.currentNode;if(xe(u)){(u.nodeName==="BR"||u.nodeName==="P"||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(u).display))&&(s+=" ");continue}s+=u.textContent||""}return s.replace(/\s+/g," ").trim();function a(u){const c=Mn(u,n,o);if(r&&c&&cd(u,c))return NodeFilter.FILTER_REJECT;if(xe(u)){if(u.hasAttribute($n)||t&&u.hasAttribute(t))return NodeFilter.FILTER_REJECT;const l=getComputedStyle(u);if(l.visibility!=="visible"||l.display==="none"||l.contentVisibility&&l.contentVisibility!=="visible")return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function S0(e,{onPointerDown:t,onPointerUp:r}){let n,o={selection:!1,input:!1,scroll:!1},i;const s=[U(e,window,"pointerdown",a=>{Ua(a)&&(n=Da(),o={selection:!1,input:!1,scroll:!1},i=t(a))},{capture:!0}),U(e,window,"selectionchange",()=>{(!n||!Da())&&(o.selection=!0)},{capture:!0}),U(e,window,"scroll",()=>{o.scroll=!0},{capture:!0,passive:!0}),U(e,window,"pointerup",a=>{if(Ua(a)&&i){const u=o;r(i,a,()=>u),i=void 0}},{capture:!0}),U(e,window,"input",()=>{o.input=!0},{capture:!0})];return{stop:()=>{s.forEach(a=>a.stop())}}}function Da(){const e=window.getSelection();return!e||e.isCollapsed}function Ua(e){return e.target instanceof Element&&e.isPrimary!==!1}const Fa=3;function T0(e,t){if(w0(e))return t.addFrustration(Zt.RAGE_CLICK),e.some(Va)&&t.addFrustration(Zt.DEAD_CLICK),t.hasError&&t.addFrustration(Zt.ERROR_CLICK),{isRage:!0};const r=e.some(n=>n.getUserActivity().selection);return e.forEach(n=>{n.hasError&&n.addFrustration(Zt.ERROR_CLICK),Va(n)&&!r&&n.addFrustration(Zt.DEAD_CLICK)}),{isRage:!1}}function w0(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(Fa-1);t+=1)if(e[t+Fa-1].event.timeStamp-e[t].event.timeStamp<=ee)return!0;return!1}const I0='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function Va(e){if(e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return t.tagName==="LABEL"&&t.hasAttribute("for")&&(t=document.getElementById(t.getAttribute("for"))),!t||!t.matches(I0)}const gd=10*ee,nr=new Map;function O0(e){const t=nr.get(e);return nr.delete(e),t}function md(e,t){nr.set(e,t),nr.forEach((r,n)=>{B(n,ce())>gd&&nr.delete(n)})}const A0=5*se;function C0(e,t,r,n){const o=pt({expireDelay:A0}),i=new x;let s;e.subscribe(10,()=>{o.reset()}),e.subscribe(5,l),e.subscribe(11,d=>{d.reason===Ot.UNLOADING&&l()});const{stop:a}=S0(n,{onPointerDown:d=>R0(n,e,t,d,r),onPointerUp:({clickActionBase:d,hadActivityOnPointerDown:f},p,v)=>{x0(n,e,t,r,o,i,c,d,p,v,f)}});return{stop:()=>{l(),i.notify(),a()},actionContexts:{findActionId:d=>o.findAll(d)}};function c(d){if(!s||!s.tryAppend(d)){const f=d.clone();s=p0(d,p=>{L0(p,f),s=void 0})}}function l(){s&&s.stop()}}function R0(e,t,r,n,o){let i;if(e.enablePrivacyForActionName?i=Mn(n.target,e.defaultPrivacyLevel):i=R.ALLOW,i===R.HIDDEN)return;const s=k0(n,i,e);let a=!1;return cs(t,r,o,e,u=>{a=u.hadActivity},rd),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}function x0(e,t,r,n,o,i,s,a,u,c,l){var d;const f=_d(t,o,c,a,u);s(f);const p=(d=a==null?void 0:a.target)===null||d===void 0?void 0:d.selector;p&&md(u.timeStamp,p);const{stop:v}=cs(t,r,n,e,E=>{E.hadActivity&&E.end<f.startClocks.timeStamp?f.discard():E.hadActivity?f.stop(E.end):l()?f.stop(f.startClocks.timeStamp):f.stop()},gd),h=t.subscribe(5,({endClocks:E})=>{f.stop(E.timeStamp)}),m=i.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{h.unsubscribe(),v(),m.unsubscribe()})}function k0(e,t,r){const n=e.target.getBoundingClientRect(),o=Er(e.target,r.actionNameAttribute);o&&md(e.timeStamp,o);const{name:i,nameSource:s}=g0(e.target,r,t);return{type:ss.CLICK,target:{width:Math.round(n.width),height:Math.round(n.height),selector:o},position:{x:Math.round(e.clientX-n.left),y:Math.round(e.clientY-n.top)},name:i,nameSource:s}}function _d(e,t,r,n,o){const i=oe(),s=bn(o.timeStamp),a=t.add(i,s.relative),u=ed({lifeCycle:e,isChildEvent:v=>v.action!==void 0&&(Array.isArray(v.action.id)?v.action.id.includes(i):v.action.id===i)});let c=0,l;const d=[],f=new x;function p(v){c===0&&(l=v,c=1,l?a.close(yn(l)):a.remove(),u.stop(),f.notify())}return{event:o,stop:p,stopObservable:f,get hasError(){return u.eventCounts.errorCount>0},get hasPageActivity(){return l!==void 0},getUserActivity:r,addFrustration:v=>{d.push(v)},startClocks:s,isStopped:()=>c===1||c===2,clone:()=>_d(e,t,r,n,o),validate:v=>{if(p(),c!==1)return;const{resourceCount:h,errorCount:m,longTaskCount:E}=u.eventCounts,S=y({duration:l&&B(s.timeStamp,l),startClocks:s,id:i,frustrationTypes:d,counts:{resourceCount:h,errorCount:m,longTaskCount:E},events:v!=null?v:[o],event:o},n);e.notify(0,S),c=2},discard:()=>{p(),c=2}}}function L0(e,t){const{isRage:r}=T0(e,t);r?(e.forEach(n=>n.discard()),t.stop(j()),t.validate(e.map(n=>n.event))):(t.discard(),e.forEach(n=>n.validate()))}const N0=1;function $0(e,t,r,n,o){const{unsubscribe:i}=e.subscribe(0,u=>{e.notify(12,ja(u))});t.register(0,({startTime:u,eventType:c})=>{if(c!==A.ERROR&&c!==A.RESOURCE&&c!==A.LONG_TASK)return Y;const l=c===A.LONG_TASK?qe(u,N0):u,d=s.findActionId(l);return d?{type:c,action:{id:d}}:Y}),t.register(1,({startTime:u})=>({action:{id:s.findActionId(u)}}));let s={findActionId:L},a=L;return o.trackUserInteractions&&({actionContexts:s,stop:a}=C0(e,r,n,o)),{addAction:u=>{e.notify(12,ja(u))},actionContexts:s,stop:()=>{i(),a()}}}function ja(e){const t=Uo(e)?{action:{id:e.id,loading_time:Ql(O(e.duration)),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position,name_source:e.nameSource}}}:{context:e.context},r=fe({action:{id:oe(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:A.ACTION},t),n=Uo(e)?e.duration:void 0,o=Uo(e)?{events:e.events}:{handlingStack:e.handlingStack};return{rawRumEvent:r,duration:n,startTime:e.startClocks.relative,domainContext:o}}function Uo(e){return e.type!==ss.CUSTOM}function P0(e){const t=Nl([F.error]).subscribe(r=>e.notify(r.error));return{stop:()=>{t.unsubscribe()}}}function M0(e,t){const r=sl(e,[Pt.cspViolation,Pt.intervention]).subscribe(n=>t.notify(n));return{stop:()=>{r.unsubscribe()}}}function D0(e,t,r){const n=new x;return r.subscribe(o=>{o.type===0&&n.notify(o.error)}),P0(n),M0(t,n),n.subscribe(o=>e.notify(14,{error:o})),U0(e)}function U0(e){return e.subscribe(14,({error:t})=>{e.notify(12,F0(t))}),{addError:({error:t,handlingStack:r,componentStack:n,startClocks:o,context:i})=>{const s=Cn({originalError:t,handlingStack:r,componentStack:n,startClocks:o,nonErrorPrefix:"Provided",source:ae.CUSTOM,handling:"handled"});s.context=fe(s.context,i),e.notify(14,{error:s})}}}function F0(e){const t={date:e.startClocks.timeStamp,error:{id:oe(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:A.ERROR,context:e.context},r={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startTime:e.startClocks.relative,domainContext:r}}const Ba=new WeakSet;function V0(e){if(!performance||!("getEntriesByName"in performance))return;const t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;const r=t.filter(n=>!Ba.has(n)).filter(n=>Yl(n)&&Xl(n)).filter(n=>j0(n,e.startClocks.relative,bd({startTime:e.startClocks.relative,duration:e.duration})));if(r.length===1)return Ba.add(r[0]),r[0].toJSON()}function bd(e){return qe(e.startTime,e.duration)}function j0(e,t,r){return e.startTime>=t-1&&bd(e)<=qe(r,1)}const B0=2*se;function G0(e){const t=z0(e)||K0(e);if(!(!t||t.traceTime<=ne()-B0))return t.traceId}function z0(e){const t=e.querySelector("meta[name=dd-trace-id]"),r=e.querySelector("meta[name=dd-trace-time]");return yd(t&&t.content,r&&r.content)}function K0(e){const t=H0(e);if(t)return yd(ar(t,"trace-id"),ar(t,"trace-time"))}function yd(e,t){const r=t&&Number(t);if(!(!e||!r))return{traceId:e,traceTime:r}}function H0(e){for(let t=0;t<e.childNodes.length;t+=1){const r=Ga(e.childNodes[t]);if(r)return r}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;t-=1){const r=e.body.childNodes[t],n=Ga(r);if(n)return n;if(!vi(r))break}}function Ga(e){if(e&&zw(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function Ed(){if(vt(N.NAVIGATION)){const r=performance.getEntriesByType(N.NAVIGATION)[0];if(r)return r}const e=W0(),t=y({entryType:N.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>W(y({},t),{toJSON:void 0})},e);return t}function W0(){const e={},t=performance.timing;for(const r in t)if(hr(t[r])){const n=r,o=t[n];e[n]=o===0?0:yn(o)}return e}function q0(e,t,r=Ed){es(e,"interactive",()=>{const n=r(),o=Object.assign(n.toJSON(),{entryType:N.RESOURCE,initiatorType:Wl,duration:n.responseEnd,traceId:G0(document),toJSON:()=>W(y({},o),{toJSON:void 0})});t(o)})}const Y0=1e3;function X0(e){const t=new Set,r=e.subscribe(8,n=>{t.add(n),t.size>Y0&&(zt("Too many requests"),t.delete(t.values().next().value))});return{getMatchingRequest(n){let o=1/0,i;for(const s of t){const a=n.startTime-s.startClocks.relative;0<=a&&a<o&&s.url===n.name&&(o=Math.abs(a),i=s)}return i&&t.delete(i),i},stop(){r.unsubscribe()}}}function J0(e,t,r,n=vT(),o=q0){let i;const s=t.trackEarlyRequests;s?i=X0(e):e.subscribe(8,c=>{u(()=>Z0(c,t,r))});const a=Re(t,{type:N.RESOURCE,buffered:!0}).subscribe(c=>{for(const l of c)(s||!ql(l))&&u(()=>za(l,t,r,i))});o(t,c=>{u(()=>za(c,t,r,i))});function u(c){n.push(()=>{const l=c();l&&e.notify(12,l)})}return{stop:()=>{n.stop(),a.unsubscribe()}}}function Z0(e,t,r){const n=V0(e);return Sd(n,e,r,t)}function za(e,t,r,n){const o=ql(e)&&n?n.getMatchingRequest(e):void 0;return Sd(e,o,r,t)}function Sd(e,t,r,n){if(!e&&!t)return;const o=t?rI(t,n):nI(e,n);if(!n.trackResources&&!o)return;const i=e?bn(e.startTime):t.startClocks,s=e?Sw(e):oI(r,i,t.duration),a=t&&Q0(t,n),u=fe({date:i.timeStamp,resource:{id:oe(),duration:O(s),type:t?t.type===ut.XHR?re.XHR:re.FETCH:Ew(e),method:t?t.method:void 0,status_code:t?t.status:iI(e.responseStatus),url:t?xw(t.url):e.name,protocol:e&&Iw(e),delivery_type:e&&Ow(e),graphql:a},type:A.RESOURCE,_dd:{discarded:!n.trackResources}},o,e&&tI(e));return{startTime:i.relative,duration:s,rawRumEvent:u,domainContext:eI(e,t)}}function Q0(e,t){const r=Jl(e.url,t);if(r)return Lw(e,r)}function eI(e,t){if(t){const r={performanceEntry:e,isAborted:t.isAborted,handlingStack:t.handlingStack};return t.type===ut.XHR?y({xhr:t.xhr},r):y({requestInput:t.input,requestInit:t.init,response:t.response,error:t.error},r)}return{performanceEntry:e}}function tI(e){const{renderBlockingStatus:t}=e;return{resource:y(y({render_blocking_status:t},Aw(e)),Tw(e))}}function rI(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function nI(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Gl().toString(),rule_psr:t.rulePsr}}}function oI(e,t,r){return e.wasInPageStateDuringPeriod("frozen",t.relative,r)?void 0:r}function iI(e){return e===0?void 0:e}function sI(e,t,r){const{stop:n,eventCounts:o}=ed({lifeCycle:e,isChildEvent:i=>i.view.id===t,onChange:r});return{stop:n,eventCounts:o}}const aI=10*se;function cI(e,t,r){return{stop:Re(e,{type:N.PAINT,buffered:!0}).subscribe(o=>{const i=o.find(s=>s.name==="first-contentful-paint"&&s.startTime<t.timeStamp&&s.startTime<aI);i&&r(i.startTime)}).unsubscribe}}function uI(e,t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t(B(e,ce()))})})}function lI(e,t,r){const n=Re(e,{type:N.FIRST_INPUT,buffered:!0}).subscribe(o=>{const i=o.find(s=>s.startTime<t.timeStamp);if(i){const s=B(i.startTime,i.processingStart);let a;i.target&&xe(i.target)&&(a=Er(i.target,e.actionNameAttribute)),r({delay:s>=0?s:0,time:i.startTime,targetSelector:a})}});return{stop:()=>{n.unsubscribe()}}}function dI(e,t,r=Ed){return vI(e,()=>{const n=r();pI(n)||t(fI(n))})}function fI(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=ce()?e.responseStart:void 0}}function pI(e){return e.loadEventEnd<=0}function vI(e,t){let r;const{stop:n}=es(e,"complete",()=>{r=Z(()=>t())});return{stop:()=>{n(),de(r)}}}const hI=10*se;function gI(e,t,r,n){let o=1/0;const{stop:i}=Ke(e,r,["pointerdown","keydown"],u=>{o=u.timeStamp},{capture:!0,once:!0});let s=0;const a=Re(e,{type:N.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(u=>{const c=ku(u,l=>l.entryType===N.LARGEST_CONTENTFUL_PAINT&&l.startTime<o&&l.startTime<t.timeStamp&&l.startTime<hI&&l.size>s);if(c){let l;c.element&&(l=Er(c.element,e.actionNameAttribute)),n({value:c.startTime,targetSelector:l,resourceUrl:mI(c)}),s=c.size}});return{stop:()=>{i(),a.unsubscribe()}}}function mI(e){return e.url===""?void 0:e.url}function Td(e,t,r=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:L};if(vt(N.VISIBILITY_STATE)){const i=performance.getEntriesByType(N.VISIBILITY_STATE).filter(s=>s.name==="hidden").find(s=>s.startTime>=t.relative);if(i)return{timeStamp:i.startTime,stop:L}}let n=1/0;const{stop:o}=Ke(e,r,["pagehide","visibilitychange"],i=>{(i.type==="pagehide"||document.visibilityState==="hidden")&&(n=i.timeStamp,o())},{capture:!0});return{get timeStamp(){return n},stop:o}}function _I(e,t,r,n){const o={},{stop:i}=dI(e,d=>{r(d.loadEvent),o.navigationTimings=d,n()}),s=Td(e,t),{stop:a}=cI(e,s,d=>{o.firstContentfulPaint=d,n()}),{stop:u}=gI(e,s,window,d=>{o.largestContentfulPaint=d,n()}),{stop:c}=lI(e,s,d=>{o.firstInput=d,n()});function l(){i(),a(),u(),c(),s.stop()}return{stop:l,initialViewMetrics:o}}const hi=(e,t)=>e*t,bI=(e,t)=>{const r=Math.max(e.left,t.left),n=Math.max(e.top,t.top),o=Math.min(e.right,t.right),i=Math.min(e.bottom,t.bottom);return r>=o||n>=i?0:hi(o-r,i-n)},Ka=e=>{const t=hi(e.previousRect.width,e.previousRect.height),r=hi(e.currentRect.width,e.currentRect.height),n=bI(e.previousRect,e.currentRect);return t+r-n};function yI(e,t,r){if(!II())return{stop:L};let n=0,o;r({value:0});const i=wI(),s=Re(e,{type:N.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var u;for(const c of a){if(c.hadRecentInput||c.startTime<t)continue;const{cumulatedValue:l,isMaxValue:d}=i.update(c);if(d){const f=EI(c.sources);o={target:f!=null&&f.node?new WeakRef(f.node):void 0,time:B(t,c.startTime),previousRect:f==null?void 0:f.previousRect,currentRect:f==null?void 0:f.currentRect,devicePixelRatio:window.devicePixelRatio}}if(l>n){n=l;const f=(u=o==null?void 0:o.target)===null||u===void 0?void 0:u.deref();r({value:St(n,4),targetSelector:f&&Er(f,e.actionNameAttribute),time:o==null?void 0:o.time,previousRect:o!=null&&o.previousRect?Ha(o.previousRect):void 0,currentRect:o!=null&&o.currentRect?Ha(o.currentRect):void 0,devicePixelRatio:o==null?void 0:o.devicePixelRatio})}}});return{stop:()=>{s.unsubscribe()}}}function EI(e){let t;for(const r of e)if(r.node&&xe(r.node)){const n=Ka(r);(!t||Ka(t)<n)&&(t=r)}return t}function Ha({x:e,y:t,width:r,height:n}){return{x:e,y:t,width:r,height:n}}const SI=5*ee,TI=ee;function wI(){let e=0,t,r,n=0;return{update:o=>{const i=t===void 0||o.startTime-r>=TI||o.startTime-t>=SI;let s;return i?(t=r=o.startTime,n=e=o.value,s=!0):(e+=o.value,r=o.startTime,s=o.value>n,s&&(n=o.value)),{cumulatedValue:e,isMaxValue:s}}}}function II(){return vt(N.LAYOUT_SHIFT)&&"WeakRef"in window}let Jr,wd=0,Fo=1/0,Vo=0;function OI(){"interactionCount"in performance||Jr||(Jr=new window.PerformanceObserver(T(e=>{e.getEntries().forEach(t=>{const r=t;r.interactionId&&(Fo=Math.min(Fo,r.interactionId),Vo=Math.max(Vo,r.interactionId),wd=(Vo-Fo)/7+1)})})),Jr.observe({type:"event",buffered:!0,durationThreshold:0}))}const Wa=()=>Jr?wd:window.performance.interactionCount||0,qa=10,AI=1*se;function CI(e,t,r){if(!kI())return{getInteractionToNextPaint:()=>{},setViewEnd:L,stop:L};const{getViewInteractionCount:n,stopViewInteractionCount:o}=xI(r);let i=1/0;const s=RI(n);let a=-1,u,c;function l(p){for(const h of p)h.interactionId&&h.startTime>=t&&h.startTime<=i&&s.process(h);const v=s.estimateP98Interaction();v&&v.duration!==a&&(a=v.duration,c=B(t,v.startTime),u=O0(v.startTime),!u&&v.target&&xe(v.target)&&(u=Er(v.target,e.actionNameAttribute)))}const d=Re(e,{type:N.FIRST_INPUT,buffered:!0}).subscribe(l),f=Re(e,{type:N.EVENT,durationThreshold:40,buffered:!0}).subscribe(l);return{getInteractionToNextPaint:()=>{if(a>=0)return{value:Math.min(a,AI),targetSelector:u,time:c};if(n())return{value:0}},setViewEnd:p=>{i=p,o()},stop:()=>{f.unsubscribe(),d.unsubscribe()}}}function RI(e){const t=[];function r(){t.sort((n,o)=>o.duration-n.duration).splice(qa)}return{process(n){const o=t.findIndex(s=>n.interactionId===s.interactionId),i=t[t.length-1];o!==-1?n.duration>t[o].duration&&(t[o]=n,r()):(t.length<qa||n.duration>i.duration)&&(t.push(n),r())},estimateP98Interaction(){const n=Math.min(t.length-1,Math.floor(e()/50));return t[n]}}}function xI(e){OI();const t=e===Ie.INITIAL_LOAD?0:Wa();let r={stopped:!1};function n(){return Wa()-t}return{getViewInteractionCount:()=>r.stopped?r.interactionCount:n(),stopViewInteractionCount:()=>{r={stopped:!0,interactionCount:n()}}}}function kI(){return vt(N.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function LI(e,t,r,n,o,i,s){let a=o===Ie.INITIAL_LOAD,u=!0;const c=[],l=Td(n,i);function d(){if(!u&&!a&&c.length>0){const p=Math.max(...c);p<l.timeStamp-i.relative&&s(p)}}const{stop:f}=cs(e,t,r,n,p=>{u&&(u=!1,p.hadActivity&&c.push(B(i.timeStamp,p.end)),d())});return{stop:()=>{f(),l.stop()},setLoadEvent:p=>{a&&(a=!1,c.push(p),d())}}}function eR(){let e;const t=window.visualViewport;return t?e=t.pageLeft-t.offsetLeft:window.scrollX!==void 0?e=window.scrollX:e=window.pageXOffset||0,Math.round(e)}function NI(){let e;const t=window.visualViewport;return t?e=t.pageTop-t.offsetTop:window.scrollY!==void 0?e=window.scrollY:e=window.pageYOffset||0,Math.round(e)}let jo;function $I(e){return jo||(jo=PI(e)),jo}function PI(e){return new x(t=>{const{throttled:r}=En(()=>{t.notify(us())},200);return U(e,window,"resize",r,{capture:!0,passive:!0}).stop})}function us(){const e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const MI=ee;function DI(e,t,r,n=FI(e)){let o=0,i=0,s=0;const a=n.subscribe(({scrollDepth:u,scrollTop:c,scrollHeight:l})=>{let d=!1;if(u>o&&(o=u,d=!0),l>i){i=l;const f=ce();s=B(t.relative,f),d=!0}d&&r({maxDepth:Math.min(o,i),maxDepthScrollTop:c,maxScrollHeight:i,maxScrollHeightTime:s})});return{stop:()=>a.unsubscribe()}}function UI(){const e=NI(),{height:t}=us(),r=Math.round((document.scrollingElement||document.documentElement).scrollHeight),n=Math.round(t+e);return{scrollHeight:r,scrollDepth:n,scrollTop:e}}function FI(e,t=MI){return new x(r=>{function n(){r.notify(UI())}if(window.ResizeObserver){const o=En(n,t,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,s=new ResizeObserver(T(o.throttled));i&&s.observe(i);const a=U(e,window,"scroll",o.throttled,{passive:!0});return()=>{o.cancel(),s.disconnect(),a.stop()}}})}function VI(e,t,r,n,o,i,s){const a={},{stop:u,setLoadEvent:c}=LI(e,t,r,n,i,s,h=>{a.loadingTime=h,o()}),{stop:l}=DI(n,s,h=>{a.scroll=h}),{stop:d}=yI(n,s.relative,h=>{a.cumulativeLayoutShift=h,o()}),{stop:f,getInteractionToNextPaint:p,setViewEnd:v}=CI(n,s.relative,i);return{stop:()=>{u(),d(),l()},stopINPTracking:f,setLoadEvent:c,setViewEnd:v,getCommonViewMetrics:()=>(a.interactionToNextPaint=p(),a)}}function jI(e,t){const{stop:r}=U(e,window,"pageshow",n=>{n.persisted&&t(n)},{capture:!0});return r}function BI(e,t,r){uI(e.relative,n=>{t.firstContentfulPaint=n,t.largestContentfulPaint={value:n},r()})}const GI=3e3,zI=5*se,KI=5*se;function HI(e,t,r,n,o,i,s,a){const u=new Set;let c=f(Ie.INITIAL_LOAD,Au(),a),l;p();let d;s&&(d=v(i),o.trackBfcacheViews&&(l=jI(o,h=>{c.end();const m=bn(h.timeStamp);c=f(Ie.BF_CACHE,m,void 0)})));function f(h,m,E){const S=WI(t,r,n,o,e,h,m,E);return u.add(S),S.stopObservable.subscribe(()=>{u.delete(S)}),S}function p(){t.subscribe(10,()=>{c=f(Ie.ROUTE_CHANGE,void 0,{name:c.name,service:c.service,version:c.version,context:c.contextManager.getContext()})}),t.subscribe(9,()=>{c.end({sessionIsActive:!1})})}function v(h){return h.subscribe(({oldLocation:m,newLocation:E})=>{YI(m,E)&&(c.end(),c=f(Ie.ROUTE_CHANGE))})}return{addTiming:(h,m=j())=>{c.addTiming(h,m)},startView:(h,m)=>{c.end({endClocks:m}),c=f(Ie.ROUTE_CHANGE,m,h)},setViewContext:h=>{c.contextManager.setContext(h)},setViewContextProperty:(h,m)=>{c.contextManager.setContextProperty(h,m)},setViewName:h=>{c.setViewName(h)},getViewContext:()=>c.contextManager.getContext(),stop:()=>{d&&d.unsubscribe(),l&&l(),c.end(),u.forEach(h=>h.stop())}}}function WI(e,t,r,n,o,i,s=H(),a){const u=oe(),c=new x,l={};let d=0,f;const p=sr(o),v=yr();let h=!0,m=a==null?void 0:a.name;const E=(a==null?void 0:a.service)||n.service,S=(a==null?void 0:a.version)||n.version,D=a==null?void 0:a.context;D&&v.setContext(D);const _={id:u,name:m,startClocks:s,service:E,version:S,context:D};e.notify(1,_),e.notify(2,_);const{throttled:g,cancel:b}=En(Me,GI,{leading:!1}),{setLoadEvent:C,setViewEnd:Kt,stop:jn,stopINPTracking:Bn,getCommonViewMetrics:Gn}=VI(e,t,r,n,Pe,i,s),{stop:zn,initialViewMetrics:Tr}=i===Ie.INITIAL_LOAD?_I(n,s,C,Pe):{stop:L,initialViewMetrics:{}};i===Ie.BF_CACHE&&BI(s,Tr,Pe);const{stop:Kn,eventCounts:Hn}=sI(e,u,Pe),Wn=jt(Me,zI),qn=e.subscribe(11,te=>{te.reason===Ot.UNLOADING&&Me()});Me(),v.changeObservable.subscribe(Pe);function wr(){e.notify(3,{id:u,name:m,context:v.getContext(),startClocks:s,sessionIsActive:h})}function Pe(){wr(),g()}function Me(){b(),wr(),d+=1;const te=f===void 0?j():f.timeStamp;e.notify(4,{customTimings:l,documentVersion:d,id:u,name:m,service:E,version:S,context:v.getContext(),loadingType:i,location:p,startClocks:s,commonViewMetrics:Gn(),initialViewMetrics:Tr,duration:B(s.timeStamp,te),isActive:f===void 0,sessionIsActive:h,eventCounts:Hn})}return{get name(){return m},service:E,version:S,contextManager:v,stopObservable:c,end(te={}){var we,Ze;f||(f=(we=te.endClocks)!==null&&we!==void 0?we:H(),h=(Ze=te.sessionIsActive)!==null&&Ze!==void 0?Ze:!0,e.notify(5,{endClocks:f}),e.notify(6,{endClocks:f}),_n(Wn),Kt(f.relative),jn(),qn.unsubscribe(),Me(),Z(()=>{this.stop()},KI))},stop(){zn(),Kn(),Bn(),c.notify()},addTiming(te,we){if(f)return;const Ze=ky(we)?we:B(s.timeStamp,we);l[qI(te)]=Ze,Pe()},setViewName(te){m=te,Me()}}}function qI(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&w.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function YI(e,t){return e.pathname!==t.pathname||!XI(t.hash)&&Ya(t.hash)!==Ya(e.hash)}function XI(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function Ya(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function JI(e,t,r,n,o,i,s,a,u,c){return e.subscribe(4,l=>e.notify(12,ZI(l,r,a))),t.register(0,({startTime:l,eventType:d})=>{const f=u.findView(l);return f?{type:d,service:f.service,version:f.version,context:f.context,view:{id:f.id,name:f.name}}:me}),t.register(1,({startTime:l})=>{var d;return{view:{id:(d=u.findView(l))===null||d===void 0?void 0:d.id}}}),HI(n,e,o,i,r,s,!r.trackViewsManually,c)}function ZI(e,t,r){var n,o,i,s,a,u,c,l,d,f,p,v,h,m,E,S,D,_;const g=r.getReplayStats(e.id),b=(o=(n=e.commonViewMetrics)===null||n===void 0?void 0:n.cumulativeLayoutShift)===null||o===void 0?void 0:o.devicePixelRatio,C={_dd:{document_version:e.documentVersion,replay_stats:g,cls:b?{device_pixel_ratio:b}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:A.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:(i=e.commonViewMetrics.cumulativeLayoutShift)===null||i===void 0?void 0:i.value,cumulative_layout_shift_time:O((s=e.commonViewMetrics.cumulativeLayoutShift)===null||s===void 0?void 0:s.time),cumulative_layout_shift_target_selector:(a=e.commonViewMetrics.cumulativeLayoutShift)===null||a===void 0?void 0:a.targetSelector,first_byte:O((u=e.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.firstByte),dom_complete:O((c=e.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.domComplete),dom_content_loaded:O((l=e.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domContentLoaded),dom_interactive:O((d=e.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:O(e.initialViewMetrics.firstContentfulPaint),first_input_delay:O((f=e.initialViewMetrics.firstInput)===null||f===void 0?void 0:f.delay),first_input_time:O((p=e.initialViewMetrics.firstInput)===null||p===void 0?void 0:p.time),first_input_target_selector:(v=e.initialViewMetrics.firstInput)===null||v===void 0?void 0:v.targetSelector,interaction_to_next_paint:O((h=e.commonViewMetrics.interactionToNextPaint)===null||h===void 0?void 0:h.value),interaction_to_next_paint_time:O((m=e.commonViewMetrics.interactionToNextPaint)===null||m===void 0?void 0:m.time),interaction_to_next_paint_target_selector:(E=e.commonViewMetrics.interactionToNextPaint)===null||E===void 0?void 0:E.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:O((S=e.initialViewMetrics.largestContentfulPaint)===null||S===void 0?void 0:S.value),largest_contentful_paint_target_selector:(D=e.initialViewMetrics.largestContentfulPaint)===null||D===void 0?void 0:D.targetSelector,load_event:O((_=e.initialViewMetrics.navigationTimings)===null||_===void 0?void 0:_.loadEvent),loading_time:Ql(O(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:QI(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:O(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:O(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:wT()}};return We(e.customTimings)||(C.view.custom_timings=Eu(e.customTimings,O)),{rawRumEvent:C,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}function QI({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:r,firstInput:n,largestContentfulPaint:o}){return{cls:e&&{score:e.value,timestamp:O(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:r&&{timestamp:O(r)},fid:n&&{duration:O(n.delay),timestamp:O(n.time),target_selector:n.targetSelector},inp:t&&{duration:O(t.value),timestamp:O(t.time),target_selector:t.targetSelector},lcp:o&&{timestamp:O(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl}}}const eO="rum";function tO(e,t,r){const n=Cl(e,eO,o=>nO(e,o),r);return n.expireObservable.subscribe(()=>{t.notify(9)}),n.renewObservable.subscribe(()=>{t.notify(10)}),n.sessionStateUpdateObservable.subscribe(({previousState:o,newState:i})=>{if(!o.forcedReplay&&i.forcedReplay){const s=n.findSession();s&&(s.isReplayForced=!0)}}),{findTrackedSession:o=>{const i=n.findSession(o);if(!(!i||i.trackingType==="0"))return{id:i.id,sessionReplay:i.trackingType==="1"?1:i.isReplayForced?2:0,anonymousId:i.anonymousId}},expire:n.expire,expireObservable:n.expireObservable,setForcedReplay:()=>n.updateSessionState({forcedReplay:"1"})}}function rO(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:bl("records")?1:0};return{findTrackedSession:()=>e,expire:L,expireObservable:new x,setForcedReplay:L}}function nO(e,t){return oO(t)?t:Ue(e.sessionSampleRate)?Ue(e.sessionReplaySampleRate)?"1":"2":"0"}function oO(e){return e==="0"||e==="1"||e==="2"}function iO(e,t,r,n,o,i){const s=[e.rumEndpointBuilder];e.replica&&s.push(e.replica.rumEndpointBuilder);const a=Xi({encoder:i(2),request:Yi(s,r),flushController:Ji({pageMayExitObservable:n,sessionExpireObservable:o})});return t.subscribe(13,u=>{u.type===A.VIEW?a.upsert(u,u.view.id):a.add(u)}),a}function sO(e){const t=Bt();e.subscribe(13,r=>{t.send("rum",r)})}const aO=Ye;function cO(e,t,r,n){const o=pt({expireDelay:aO});let i;e.subscribe(1,({startClocks:u})=>{const c=n.href;o.add(a({url:c,referrer:i||document.referrer}),u.relative),i=c}),e.subscribe(6,({endClocks:u})=>{o.closeActive(u.relative)});const s=r.subscribe(({newLocation:u})=>{const c=o.find();if(c){const l=ce();o.closeActive(l),o.add(a({url:u.href,referrer:c.referrer}),l)}});function a({url:u,referrer:c}){return{url:u,referrer:c}}return t.register(0,({startTime:u,eventType:c})=>{const l=o.find(u);return l?{type:c,view:{url:l.url,referrer:l.referrer}}:me}),{findUrl:u=>o.find(u),stop:()=>{s.unsubscribe(),o.stop()}}}function uO(e,t){let r=sr(t);return new x(n=>{const{stop:o}=lO(e,s),{stop:i}=dO(e,s);function s(){if(r.href===t.href)return;const a=sr(t);n.notify({newLocation:a,oldLocation:r}),r=a}return()=>{o(),i()}})}function lO(e,t){const{stop:r}=Ee(Xa("pushState"),"pushState",({onPostCall:i})=>{i(t)}),{stop:n}=Ee(Xa("replaceState"),"replaceState",({onPostCall:i})=>{i(t)}),{stop:o}=U(e,window,"popstate",t);return{stop:()=>{r(),n(),o()}}}function dO(e,t){return U(e,window,"hashchange",t)}function Xa(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const fO=Ye;function pO(e,t,r){const n=pt({expireDelay:fO});return e.subscribe(1,({startClocks:o})=>{n.add({},o.relative)}),e.subscribe(6,({endClocks:o})=>{n.closeActive(o.relative)}),t.register(0,({startTime:o,eventType:i})=>{if(!r.trackFeatureFlagsForEvents.concat([A.VIEW,A.ERROR]).includes(i))return Y;const a=n.find(o);return!a||We(a)?Y:{type:i,feature_flags:a}}),{addFeatureFlagEvaluation:(o,i)=>{const s=n.find();s&&(s[o]=i)}}}const vO=10*ee;let At,Fr;function hO(e,t,r){e.metricsEnabled&&(Id(),Fr=!1,t.subscribe(13,()=>{Fr=!0}),r.subscribe(({bytesCount:n,messagesCount:o})=>{Fr&&(Fr=!1,At.batchCount+=1,Za(At.batchBytesCount,n),Za(At.batchMessagesCount,o))}),jt(gO,vO))}function gO(){At.batchCount!==0&&(kn("Customer data measures",At),Id())}function Ja(){return{min:1/0,max:0,sum:0}}function Za(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function Id(){At={batchCount:0,batchBytesCount:Ja(),batchMessagesCount:Ja()}}const mO=4e3,_O=500,bO=Ye;function yO(e,t,r=_O){const n=pt({expireDelay:bO,maxEntries:mO});let o;vt(N.VISIBILITY_STATE)&&performance.getEntriesByType(N.VISIBILITY_STATE).forEach(c=>{const l=c.name==="hidden"?"hidden":"active";s(l,c.startTime)}),s(Od(),ce());const{stop:i}=Ke(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],u=>{s(SO(u),u.timeStamp)},{capture:!0});function s(u,c=ce()){u!==o&&(o=u,n.closeActive(c),n.add({state:o,startTime:c},c))}function a(u,c,l){return n.findAll(c,l).some(d=>d.state===u)}return e.register(0,({startTime:u,duration:c=0,eventType:l})=>{if(l===A.VIEW){const d=n.findAll(u,c);return{type:l,_dd:{page_states:EO(d,u,r)}}}return l===A.ACTION||l===A.ERROR?{type:l,view:{in_foreground:a("active",u,0)}}:Y}),{wasInPageStateDuringPeriod:a,addPageState:s,stop:()=>{i(),n.stop()}}}function EO(e,t,r){if(e.length!==0)return e.slice(-r).reverse().map(({state:n,startTime:o})=>({state:n,start:O(B(t,o))}))}function SO(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":Od()}function Od(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function TO(e,t){let r;const n=requestAnimationFrame(T(()=>{r=us()})),o=$I(t).subscribe(i=>{r=i}).unsubscribe;return e.register(0,({eventType:i})=>({type:i,display:r?{viewport:r}:void 0})),{stop:()=>{o(),n&&cancelAnimationFrame(n)}}}function wO(e,t){const r=window.cookieStore?IO(e):AO;return new x(n=>r(t,o=>n.notify(o)))}function IO(e){return(t,r)=>U(e,window.cookieStore,"change",o=>{const i=o.changed.find(s=>s.name===t)||o.deleted.find(s=>s.name===t);i&&r(i.value)}).stop}const OO=ee;function AO(e,t){const r=ar(document.cookie,e),n=jt(()=>{const o=ar(document.cookie,e);o!==r&&t(o)},OO);return()=>{_n(n)}}const Qa="datadog-ci-visibility-test-execution-id";function CO(e,t,r=wO(e,Qa)){var n;let o=Fe(Qa)||((n=window.Cypress)===null||n===void 0?void 0:n.env("traceId"));const i=r.subscribe(s=>{o=s});return t.register(0,({eventType:s})=>typeof o!="string"?Y:{type:s,session:{type:"ci_test"},ci_test:{test_execution_id:o}}),{stop:()=>{i.unsubscribe()}}}const RO=Ye;function xO(e,t){const r=pt({expireDelay:RO}),n=vt(N.LONG_ANIMATION_FRAME)?N.LONG_ANIMATION_FRAME:N.LONG_TASK,o=Re(t,{type:n,buffered:!0}).subscribe(s=>{for(const a of s){if(!t.trackLongTasks)break;const u=bn(a.startTime),c=oe(),l=kO(a,u,c);e.notify(12,{rawRumEvent:l,startTime:u.relative,duration:a.duration,domainContext:{performanceEntry:a}}),r.add({id:c,startClocks:u,duration:a.duration,entryType:n},u.relative),r.closeActive(qe(u.relative,a.duration))}});return{stop:()=>{o.unsubscribe(),r.stop()},longTaskContexts:{findLongTasks:(s,a)=>r.findAll(s,a)}}}function kO(e,t,r){const n={date:t.timeStamp,type:A.LONG_TASK,_dd:{discarded:!1}};return e.entryType===N.LONG_TASK?W(y({},n),{long_task:{id:r,entry_type:Oa.LONG_TASK,duration:O(e.duration)}}):W(y({},n),{long_task:{id:r,entry_type:Oa.LONG_ANIMATION_FRAME,duration:O(e.duration),blocking_duration:O(e.blockingDuration),first_ui_event_timestamp:O(e.firstUIEventTimestamp),render_start:O(e.renderStart),style_and_layout_start:O(e.styleAndLayoutStart),start_time:O(e.startTime),scripts:e.scripts.map(o=>({duration:O(o.duration),pause_duration:O(o.pauseDuration),forced_style_and_layout_duration:O(o.forcedStyleAndLayoutDuration),start_time:O(o.startTime),execution_start:O(o.executionStart),source_url:o.sourceURL,source_function_name:o.sourceFunctionName,source_char_position:o.sourceCharPosition,invoker:o.invoker,invoker_type:o.invokerType,window_attribution:o.windowAttribution}))}})}function LO(e){e.register(0,({eventType:t})=>{if(!Al())return Y;const r=Il(),n=Ol();return{type:t,session:{type:"synthetics"},synthetics:{test_id:r,result_id:n,injected:Ln()}}})}function NO(e,t,r){const n=xn(e),o=r(n);return zi(t).forEach(([i,s])=>gi(e,n,i.split(/\.|(?=\[\])/),s)),o}function gi(e,t,r,n){const[o,...i]=r;if(o==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((s,a)=>gi(s,t[a],i,n));return}if(!(!ec(e)||!ec(t))){if(i.length>0)return gi(e[o],t[o],i,n);$O(e,o,t[o],n)}}function $O(e,t,r,n){const o=ft(r);o===n?e[t]=$(r):n==="object"&&(o==="undefined"||o==="null")&&(e[t]={})}function ec(e){return ft(e)==="object"}const mt={"view.name":"string","view.url":"string","view.referrer":"string"},_t={context:"object"},bt={service:"string",version:"string"};let Ad;function PO(e,t,r,n,o){Ad={[A.VIEW]:y(y(y({"view.performance.lcp.resource_url":"string"},_t),mt),bt),[A.ERROR]:y(y(y({"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string"},_t),mt),bt),[A.RESOURCE]:y(y(y({"resource.url":"string","resource.graphql.variables":"string"},_t),mt),bt),[A.ACTION]:y(y(y({"action.target.name":"string"},_t),mt),bt),[A.LONG_TASK]:y(y(y({"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string"},_t),mt),bt),[A.VITAL]:y(y(y({},_t),mt),bt)};const i={[A.ERROR]:Yr(A.ERROR,n,o),[A.ACTION]:Yr(A.ACTION,n,o),[A.VITAL]:Yr(A.VITAL,n,o)};t.subscribe(12,({startTime:s,duration:a,rawRumEvent:u,domainContext:c})=>{const l=r.triggerHook(0,{eventType:u.type,startTime:s,duration:a});if(l===me)return;const d=fe(l,u,{ddtags:Wi(e).join(",")});MO(d,e.beforeSend,c,i)&&(We(d.context)&&delete d.context,t.notify(13,d))})}function MO(e,t,r,n){var o;if(t){const s=NO(e,Ad[e.type],a=>t(a,r));if(s===!1&&e.type!==A.VIEW)return!1;s===!1&&w.warn("Can't dismiss view events using beforeSend!")}return!((o=n[e.type])===null||o===void 0?void 0:o.isLimitReached())}function DO(e,t,r,n){e.register(0,({eventType:o,startTime:i})=>{const s=t.findTrackedSession(i),a=n.findView(i);if(!s||!a)return me;let u,c,l;return o===A.VIEW?(u=r.getReplayStats(a.id)?!0:void 0,c=s.sessionReplay===1,l=a.sessionIsActive?void 0:!1):u=r.isRecording()?!0:void 0,{type:o,session:{id:s.id,type:"user",has_replay:u,sampled_for_replay:c,is_active:l}}}),e.register(1,({startTime:o})=>{const i=t.findTrackedSession(o);return i?{session:{id:i.id}}:Y})}function UO(e){e.register(0,({eventType:t})=>({type:t,connectivity:ll()}))}function FO(e,t,r){e.register(0,({eventType:n})=>{const o=t.source;return{type:n,_dd:{format_version:2,drift:Ry(),configuration:{session_sample_rate:St(t.sessionSampleRate,3),session_replay_sample_rate:St(t.sessionReplaySampleRate,3),profiling_sample_rate:St(t.profilingSampleRate,3),trace_sample_rate:St(t.traceSampleRate,3),beta_encode_cookie_options:t.betaEncodeCookieOptions},browser_sdk_version:Ce()?"6.25.2":void 0,sdk_name:r},application:{id:t.applicationId},date:j(),source:o}}),e.register(1,()=>({application:{id:t.applicationId}}))}function VO(e,t){e.register(1,()=>t.isGranted()?Y:me)}const jO=El,BO=[A.ACTION,A.ERROR,A.LONG_TASK,A.RESOURCE,A.VITAL];function GO(e){return{addEvent:(t,r,n,o)=>{BO.includes(r.type)&&e.notify(12,{startTime:t,rawRumEvent:r,domainContext:n,duration:o})}}}function zO(e,t){if(!t.metricsEnabled)return{stop:L};const{unsubscribe:r}=e.subscribe(4,({initialViewMetrics:n})=>{!n.largestContentfulPaint||!n.navigationTimings||(kn("Initial view metrics",{metrics:KO(n.largestContentfulPaint,n.navigationTimings)}),r())});return{stop:r}}function KO(e,t){return{lcp:{value:e.value},navigation:{domComplete:t.domComplete,domContentLoaded:t.domContentLoaded,domInteractive:t.domInteractive,firstByte:t.firstByte,loadEvent:t.loadEvent}}}function HO(e,t,r,n,o,i,s,a,u){const c=[],l=new mw,d=jO();l.subscribe(13,g=>qi("rum",g));const f=g=>{l.notify(14,{error:g}),zt("Error reported to customer",{"error.message":g.message})},p=yl(e),v=p.subscribe(g=>{l.notify(11,g)});c.push(()=>v.unsubscribe());const h=Sl("browser-rum-sdk",e,d,f,p,o);c.push(h.stop);const m=Ce()?rO():tO(e,l,i);if(Ce())sO(l);else{const g=iO(e,l,f,p,m.expireObservable,o);c.push(()=>g.stop()),hO(h,l,g.flushController.flushObservable)}VO(d,i);const{stop:E}=zO(l,h);c.push(E);const _=WO(l,d,e,m,t,n,s,a,u,f),{stop:S}=_,D=Or(_,["stop"]);return c.push(S),a.unbuffer(),c.push(()=>r.stop()),W(y({},D),{lifeCycle:l,session:m,stopSession:()=>m.expire(),telemetry:h,stop:()=>{c.forEach(g=>g())},hooks:d})}function WO(e,t,r,n,o,i,s,a,u,c){const l=[],d=pw(),f=uO(r,location),{observable:p,stop:v}=hw();l.push(v),FO(t,r,u);const h=yO(t,r);l.push(()=>h.stop());const m=bw(e);l.push(()=>m.stop());const E=cO(e,t,f,location);l.push(()=>E.stop());const S=pO(e,t,r);DO(t,n,o,m),UO(t);const D=Ml(t,r,"rum",!0),_=Dl(t,r,n,"rum"),g=Pl(t,r,"rum"),b=$0(e,t,d,p,r);l.push(b.stop);const C=GO(e),Kt=TO(t,r);l.push(Kt.stop);const jn=CO(r,t);l.push(jn.stop),LO(t),PO(r,e,t,c);const{addTiming:Bn,startView:Gn,setViewName:zn,setViewContext:Tr,setViewContextProperty:Kn,getViewContext:Hn,stop:Wn}=JI(e,t,r,location,d,p,f,o,m,i);l.push(Wn);const{stop:qn}=J0(e,r,h);l.push(qn);const{stop:wr,longTaskContexts:Pe}=xO(e,r);l.push(wr);const{addError:Me}=D0(e,r,a);Mw(e,r,n,_,g);const te=OT(e,h,s),we=gw(r.applicationId,n,m,b.actionContexts,E);return{addAction:b.addAction,addEvent:C.addEvent,addError:Me,addTiming:Bn,addFeatureFlagEvaluation:S.addFeatureFlagEvaluation,startView:Gn,setViewContext:Tr,setViewContextProperty:Kn,getViewContext:Hn,setViewName:zn,viewHistory:m,getInternalContext:we.get,startDurationVital:te.startDurationVital,stopDurationVital:te.stopDurationVital,addDurationVital:te.addDurationVital,addOperationStepVital:te.addOperationStepVital,globalContext:D,userContext:_,accountContext:g,longTaskContexts:Pe,stop:()=>l.forEach(Ze=>Ze())}}function qO(e,{session:t,viewContext:r,errorType:n}){const o=t?t.id:"no-session-id",i=[];n!==void 0&&i.push(`error-type=${n}`),r&&(i.push(`seed=${r.id}`),i.push(`from=${r.startClocks.timeStamp}`));const s=YO(e),a=`/rum/replay/sessions/${o}`;return`${s}${a}?${i.join("&")}`}function YO(e){const t=e.site,r=e.subdomain||XO(e);return`https://${r?`${r}.`:""}${t}`}function XO(e){switch(e.site){case st:case bE:return"app";case zu:return"dd";default:return}}const JO=1e3;let le;function tR(e){return Dn(e).segments_count}function rR(e){Dn(e).segments_count+=1}function nR(e){Dn(e).records_count+=1}function oR(e,t){Dn(e).segments_total_raw_size+=t}function ZO(e){return le==null?void 0:le.get(e)}function Dn(e){le||(le=new Map);let t;return le.has(e)?t=le.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},le.set(e,t),le.size>JO&&QO()),t}function QO(){if(!le)return;const e=le.keys().next().value;e&&le.delete(e)}function Cd(e,t,r){let n=0,o=[],i,s=!0,a=0;const u=[],{stop:c}=U(e,t,"message",({data:f})=>{if(f.type!=="wrote"||f.streamId!==r)return;const p=u[0];p&&(p.id===f.id?(u.shift(),n+=f.additionalBytesCount,o.push(f.result),i=f.trailer,p.writeCallback?p.writeCallback(f.result.byteLength):p.finishCallback&&p.finishCallback()):p.id<f.id&&c())});function l(){const f=o.length===0?new Uint8Array(0):tl(o.concat(i)),p={rawBytesCount:n,output:f,outputBytesCount:f.byteLength,encoding:"deflate"};return n=0,o=[],p}function d(){s||(t.postMessage({action:"reset",streamId:r}),s=!0)}return{isAsync:!0,get isEmpty(){return s},write(f,p){t.postMessage({action:"write",id:a,data:f,streamId:r}),u.push({id:a,writeCallback:p,data:f}),s=!1,a+=1},finish(f){d(),u.length?(u.forEach(p=>{delete p.writeCallback}),u[u.length-1].finishCallback=()=>f(l())):f(l())},finishSync(){d();const f=u.map(p=>p.data).join("");return u.length=0,W(y({},l()),{pendingData:f})},estimateEncodedBytesCount(f){return f.length/8},stop(){c()}}}function ls({configuredUrl:e,error:t,source:r,scriptType:n}){if(w.error(`${r} failed to start: an error occurred while initializing the ${n}:`,t),t instanceof Event||t instanceof Error&&eA(t.message)){let o;e?o=`Please make sure the ${n} URL ${e} is correct and CSP is correctly configured.`:o="Please make sure CSP is correctly configured.",w.error(`${o} See documentation at ${mn}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else n==="worker"&&Zi(t)}function eA(e){return e.includes("Content Security Policy")||e.includes("requires 'TrustedScriptURL'")}const tA=30*ee;function Rd(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.25.2"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let V={status:0};function xd(e,t,r,n=Rd){switch(V.status===0&&rA(e,t,n),V.status){case 1:return V.initializationFailureCallbacks.push(r),V.worker;case 3:return V.worker}}function tc(){return V.status}function rA(e,t,r=Rd){try{const n=r(e),{stop:o}=U(e,n,"error",a=>{Bo(e,t,a)}),{stop:i}=U(e,n,"message",({data:a})=>{a.type==="errored"?Bo(e,t,a.error,a.streamId):a.type==="initialized"&&oA(a.version)});n.postMessage({action:"init"}),Z(()=>nA(t),tA),V={status:1,worker:n,stop:()=>{o(),i()},initializationFailureCallbacks:[]}}catch(n){Bo(e,t,n)}}function nA(e){V.status===1&&(w.error(`${e} failed to start: a timeout occurred while initializing the Worker`),V.initializationFailureCallbacks.forEach(t=>t()),V={status:2})}function oA(e){V.status===1&&(V={status:3,worker:V.worker,stop:V.stop,version:e})}function Bo(e,t,r,n){V.status===1||V.status===0?(ls({configuredUrl:e.workerUrl,error:r,source:t,scriptType:"worker"}),V.status===1&&V.initializationFailureCallbacks.forEach(o=>o()),V={status:2}):Zi(r,{worker_version:V.status===3&&V.version,stream_id:n})}function kd(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function iA(e,t,r,n){const o=t.findTrackedSession(),i=sA(o,n),s=r.findView();return qO(e,{viewContext:s,errorType:i,session:o})}function sA(e,t){if(!kd())return"browser-not-supported";if(!e)return"rum-not-tracked";if(e.sessionReplay===0)return"incorrect-session-plan";if(!t)return"replay-not-started"}function aA(e,t){if(!e.metricsEnabled)return{stop:L};let r,n,o;const{unsubscribe:i}=t.subscribe(s=>{switch(s.type){case"start":r={forced:s.forced,timestamp:j()},n=void 0,o=void 0;break;case"document-ready":r&&(n=B(r.timestamp,j()));break;case"recorder-settled":r&&(o=B(r.timestamp,j()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":i(),r&&kn("Recorder init metrics",{metrics:cA(r.forced,o,B(r.timestamp,j()),s.type,n)});break}});return{stop:i}}function cA(e,t,r,n,o){return{forced:e,loadRecorderModuleDuration:t,recorderInitDuration:r,result:n,waitForDocReadyDuration:o}}function uA(e,t,r,n,o,i,s){let a=0,u;t.subscribe(9,()=>{(a===2||a===3)&&(f(),a=1)}),t.subscribe(10,()=>{a===1&&d()});const c=new x;aA(s,c);const l=async p=>{c.notify({type:"start",forced:p});const[v]=await Promise.all([rc(c,{type:"recorder-settled"},o()),rc(c,{type:"document-ready"},eT(e,"interactive"))]);if(a!==2){c.notify({type:"aborted"});return}if(!v){a=0,c.notify({type:"recorder-load-failed"});return}const h=i();if(!h){a=0,c.notify({type:"deflate-encoder-load-failed"});return}({stop:u}=v(t,e,r,n,h,s)),a=3,c.notify({type:"succeeded"})};function d(p){const v=r.findTrackedSession();if(lA(v,p)){a=1;return}if(dA(a))return;a=2;const h=fA(v,p)||!1;l(h).catch(Ge),h&&r.setForcedReplay()}function f(){a===3&&(u==null||u()),a=0}return{start:d,stop:f,getSessionReplayLink(){return iA(e,r,n,a!==0)},isRecording:()=>a===3}}function lA(e,t){return!e||e.sessionReplay===0&&(!t||!t.force)}function dA(e){return e===2||e===3}function fA(e,t){return t&&t.force&&e.sessionReplay===0}async function rc(e,t,r){try{return await r}finally{e.notify(t)}}function pA(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:L},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function vA(e,t){if(Ce()&&!bl("records")||!kd())return{start:L,stop:L,getReplayStats:()=>{},onRumStart:L,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:r,shouldStartImmediately:n}=pA();return{start:i=>r.start(i),stop:()=>r.stop(),getSessionReplayLink:()=>r.getSessionReplayLink(),onRumStart:o,isRecording:()=>tc()===3&&r.isRecording(),getReplayStats:i=>tc()===3?ZO(i):void 0};function o(i,s,a,u,c,l){let d;function f(){return d||(c!=null||(c=xd(s,"Datadog Session Replay",()=>{r.stop()},t)),c&&(d=Cd(s,c,1))),d}r=uA(s,i,a,u,e,f,l),n(s)&&r.start()}}const hA="modulepreload",gA=function(e,t){return new URL(e,t).href},nc={},Ld=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){const s=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),u=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.allSettled(r.map(c=>{if(c=gA(c,n),c in nc)return;nc[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(!!n)for(let v=s.length-1;v>=0;v--){const h=s[v];if(h.href===c&&(!l||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${d}`))return;const p=document.createElement("link");if(p.rel=l?"stylesheet":hA,l||(p.as="script"),p.crossOrigin="",p.href=c,u&&p.setAttribute("nonce",u),document.head.appendChild(p),l)return new Promise((v,h)=>{p.addEventListener("load",v),p.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};async function mA(e=_A){try{return await e()}catch(t){ls({error:t,source:"Recorder",scriptType:"module"})}}async function _A(){return(await Ld(()=>import("./assets/startRecording-CuFdVhxx.js"),[],import.meta.url)).startRecording}function bA(){return ue().Profiler!==void 0}function yA(e){let t={status:"starting"};return e.register(0,({eventType:r})=>r!==A.VIEW&&r!==A.LONG_TASK?Y:{type:r,_dd:{profiling:t}}),{get:()=>t,set:r=>{t=r}}}async function EA(e=SA){try{return await e()}catch(t){ls({error:t,source:"Profiler",scriptType:"module"})}}async function SA(){return(await Ld(()=>import("./assets/profiler-BRmTNL9s.js"),[],import.meta.url)).createRumProfiler}function TA(){let e;function t(r,n,o,i,s,a,u){const c=i.findTrackedSession();if(!c||!Bl(c.id,o.profilingSampleRate))return;const l=yA(n);if(!bA()){l.set({status:"error",error_reason:"not-supported-by-browser"});return}EA().then(d=>{if(!d){zt("[DD_RUM] Failed to lazy load the RUM Profiler"),l.set({status:"error",error_reason:"failed-to-lazy-load"});return}e=d(o,r,i,l,a,u,s,void 0),e.start()}).catch(Ge)}return{onRumStart:t,stop:()=>{e==null||e.stop().catch(Ge)}}}const wA=vA(mA),IA=TA(),mi=dw(HO,wA,IA,{startDeflateWorker:xd,createDeflateEncoder:Cd,sdkName:"rum"});il(ue(),"DD_RUM",mi);function ln(e,t,r){const n=r.getHandler(),o=Array.isArray(n)?n:[n];return oc[e]>=oc[r.getLevel()]&&o.includes(t)}const I={ok:"ok",debug:"debug",info:"info",notice:"notice",warn:"warn",error:"error",critical:"critical",alert:"alert",emerg:"emerg"},oc={[I.ok]:0,[I.debug]:1,[I.info]:2,[I.notice]:4,[I.warn]:5,[I.error]:6,[I.critical]:7,[I.alert]:8,[I.emerg]:9};function Un(e,{includeMessage:t=!1}={}){return{stack:e.stack,kind:e.type,message:t?e.message:void 0,causes:e.causes,fingerprint:e.fingerprint,handling:e.handling}}var OA=function(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i};const lr={console:"console",http:"http"},AA=Object.keys(I);class pe{constructor(t,r,n=lr.http,o=I.debug,i={}){this.handleLogStrategy=t,this.handlerType=n,this.level=o,this.contextManager=yr("logger"),this.tags=[],this.contextManager.setContext(i),r&&this.contextManager.setContextProperty("logger",{name:r})}logImplementation(t,r,n=I.info,o,i){const s=$(r);let a;if(o!=null){const u=Cn({originalError:o,nonErrorPrefix:"Provided",source:ae.LOGGER,handling:"handled",startClocks:H()});a=fe({error:Un(u,{includeMessage:!0})},u.context,s)}else a=s;this.handleLogStrategy({message:$(t),context:a,status:n},this,i)}log(t,r,n=I.info,o){let i;ln(n,lr.http,this)&&(i=Nt("log")),this.logImplementation(t,r,n,o,i)}setContext(t){this.contextManager.setContext(t)}getContext(){return this.contextManager.getContext()}setContextProperty(t,r){this.contextManager.setContextProperty(t,r)}removeContextProperty(t){this.contextManager.removeContextProperty(t)}clearContext(){this.contextManager.clearContext()}addTag(t,r){this.tags.push(tt(t,r))}removeTagsWithKey(t){const r=ul(t);this.tags=this.tags.filter(n=>n!==r&&!n.startsWith(`${r}:`))}getTags(){return this.tags.slice()}setHandler(t){this.handlerType=t}getHandler(){return this.handlerType}setLevel(t){this.level=t}getLevel(){return this.level}}OA([Iy],pe.prototype,"logImplementation",null);pe.prototype.ok=$e(I.ok);pe.prototype.debug=$e(I.debug);pe.prototype.info=$e(I.info);pe.prototype.notice=$e(I.notice);pe.prototype.warn=$e(I.warn);pe.prototype.error=$e(I.error);pe.prototype.critical=$e(I.critical);pe.prototype.alert=$e(I.alert);pe.prototype.emerg=$e(I.emerg);function $e(e){return function(t,r,n){let o;ln(e,lr.http,this)&&(o=Nt("log")),this.logImplementation(t,r,e,n,o)}}function ic(){return dt?{}:{view:{referrer:document.referrer,url:window.location.href}}}const CA=32*Xe;function RA(e,t){e.usePciIntake===!0&&e.site&&e.site!=="datadoghq.com"&&w.warn("PCI compliance for Logs is only available for Datadog organizations in the US1 site. Default intake will be used.");const r=Wu(e,t),n=sc(e.forwardConsoleLogs,an(F),"Forward Console Logs"),o=sc(e.forwardReports,an(Pt),"Forward Reports");if(!(!r||!n||!o))return e.forwardErrorsToLogs&&!n.includes(F.error)&&n.push(F.error),y({forwardErrorsToLogs:e.forwardErrorsToLogs!==!1,forwardConsoleLogs:n,forwardReports:o,requestErrorResponseLengthLimit:CA},r)}function sc(e,t,r){if(e===void 0)return[];if(!(e==="all"||Array.isArray(e)&&e.every(n=>t.includes(n)))){w.error(`${r} should be "all" or an array with allowed values "${t.join('", "')}"`);return}return e==="all"?t:VS(e)}function xA(e){const t=qu(e);return y({forward_errors_to_logs:e.forwardErrorsToLogs,forward_console_logs:e.forwardConsoleLogs,forward_reports:e.forwardReports,use_pci_intake:e.usePciIntake},t)}function kA(e,t,r){const n=$l(),o=os();$o(o,k.globalContext,n);const i=ns();$o(i,k.accountContext,n);const s=is();$o(s,k.userContext,n);let a,u;const c=t.observable.subscribe(l);function l(){if(!u||!a||!t.isGranted())return;c.unsubscribe();const d=r(a,u);n.drain(d)}return{init(d,f){if(!d){w.error("Missing configuration");return}if(Yu(d.enableExperimentalFeatures),Ce()&&(d=LA(d)),a=d,Tl(xA(d)),u){Rn("DD_LOGS",d);return}const p=RA(d,f);p&&(u=p,Nn().subscribe(L),t.tryToInit(p.trackingConsent),l())},get initConfiguration(){return a},globalContext:o,accountContext:i,userContext:s,getInternalContext:L,handleLog(d,f,p,v=e(),h=j()){n.add(m=>m.handleLog(d,f,p,v,h))}}}function LA(e){return W(y({},e),{clientToken:"empty"})}function NA(e){const t=Gu(),r=Ul().observable;let n=kA(ic,t,(a,u)=>{const c=e(u,ic,t,r);return n=$A(a,c),c});const o=()=>n,i={},s=new pe((...a)=>n.handleLog(...a));return ol({logger:s,init:a=>{const u=new Error().stack;Oe(()=>n.init(a,u))},setTrackingConsent:T(a=>{t.update(a),G({feature:"set-tracking-consent",tracking_consent:a})}),getGlobalContext:P(o,k.globalContext,M.getContext),setGlobalContext:P(o,k.globalContext,M.setContext),setGlobalContextProperty:P(o,k.globalContext,M.setContextProperty),removeGlobalContextProperty:P(o,k.globalContext,M.removeContextProperty),clearGlobalContext:P(o,k.globalContext,M.clearContext),createLogger:T((a,u={})=>(i[a]=new pe((...c)=>n.handleLog(...c),$(a),u.handler,u.level,$(u.context)),i[a])),getLogger:T(a=>i[a]),getInitConfiguration:T(()=>xn(n.initConfiguration)),getInternalContext:T(a=>n.getInternalContext(a)),setUser:P(o,k.userContext,M.setContext),getUser:P(o,k.userContext,M.getContext),setUserProperty:P(o,k.userContext,M.setContextProperty),removeUserProperty:P(o,k.userContext,M.removeContextProperty),clearUser:P(o,k.userContext,M.clearContext),setAccount:P(o,k.accountContext,M.setContext),getAccount:P(o,k.accountContext,M.getContext),setAccountProperty:P(o,k.accountContext,M.setContextProperty),removeAccountProperty:P(o,k.accountContext,M.removeContextProperty),clearAccount:P(o,k.accountContext,M.clearContext)})}function $A(e,t){return y({init:r=>{Rn("DD_LOGS",r)},initConfiguration:e},t)}const PA="logs";function MA(e,t){const r=Cl(e,PA,n=>Nd(e,n),t);return{findTrackedSession:(n,o={returnInactive:!1})=>{const i=r.findSession(n,o);return i&&i.trackingType==="1"?{id:i.id,anonymousId:i.anonymousId}:void 0},expireObservable:r.expireObservable}}function DA(e){const r=Nd(e)==="1"?{}:void 0;return{findTrackedSession:()=>r,expireObservable:new x}}function Nd(e,t){return UA(t)?t:Ue(e.sessionSampleRate)?"1":"0"}function UA(e){return e==="0"||e==="1"}function FA(e,t,r,n,o,i){const s=AA.concat(["custom"]),a={};s.forEach(u=>{a[u]=Yr(u,o,i)}),t.subscribe(0,({rawLogsEvent:u,messageContext:c=void 0,savedCommonContext:l=void 0,domainContext:d,ddtags:f=[]})=>{var p,v;const h=yn(u.date),m=l||n(),E=r.triggerHook(0,{startTime:h});if(E===me)return;const S=Wi(e),D=fe({view:m.view},E,u,c,{ddtags:S.concat(f).join(",")});((p=e.beforeSend)===null||p===void 0?void 0:p.call(e,D,d))===!1||D.origin!==ae.AGENT&&((v=a[D.status])!==null&&v!==void 0?v:a.custom).isLimitReached()||t.notify(1,D)})}const VA={[F.log]:I.info,[F.debug]:I.debug,[F.info]:I.info,[F.warn]:I.warn,[F.error]:I.error};function jA(e,t){const r=Nl(e.forwardConsoleLogs).subscribe(n=>{var o;const i={rawLogsEvent:{date:j(),message:n.message,origin:ae.CONSOLE,error:n.error&&Un(n.error),status:VA[n.api]},messageContext:(o=n.error)===null||o===void 0?void 0:o.context,domainContext:{handlingStack:n.handlingStack}};t.notify(0,i)});return{stop:()=>{r.unsubscribe()}}}function BA(e,t){const r=sl(e,e.forwardReports).subscribe(n=>{let o=n.message,i;const s=n.originalError.type==="deprecation"?I.warn:I.error;s===I.error?i=Un(n):n.stack&&(o+=` Found in ${rS(n.stack)}`),t.notify(0,{rawLogsEvent:{date:j(),message:o,origin:ae.REPORT,error:i,status:s}})});return{stop:()=>{r.unsubscribe()}}}function GA(e,t){if(!e.forwardErrorsToLogs)return{stop:L};const r=(dt?new x:kl(e)).subscribe(s=>{s.state==="complete"&&i(ut.XHR,s)}),n=Nn({responseBodyAction:s=>o(s)?2:0}).subscribe(s=>{s.state==="resolve"&&i(ut.FETCH,s)});function o(s){return!Hu(s.url)&&(zA(s)||dl(s.status))}function i(s,a){if(!o(a))return;const u="error"in a&&a.error?br(_r(a.error)):a.responseBody||"Failed to load",c={isAborted:a.isAborted,handlingStack:a.handlingStack};t.notify(0,{rawLogsEvent:{message:`${KA(s)} error ${a.method} ${a.url}`,date:a.startClocks.timeStamp,error:{stack:Sn(u,e.requestErrorResponseLengthLimit,"..."),handling:void 0},http:{method:a.method,status_code:a.status,url:a.url},status:I.error,origin:ae.NETWORK},domainContext:c})}return{stop:()=>{r.unsubscribe(),n.unsubscribe()}}}function zA(e){return e.status===0&&e.responseType!=="opaque"}function KA(e){return ut.XHR===e?"XHR":"Fetch"}function HA(e,t,r){if(!e.forwardErrorsToLogs)return{stop:L};const n=r.subscribe(o=>{if(o.type===0){const i=o.error;t.notify(0,{rawLogsEvent:{message:i.message,date:i.startClocks.timeStamp,error:Un(i),origin:ae.SOURCE,status:I.error},messageContext:i.context})}});return{stop:()=>{n.unsubscribe()}}}const WA=xl;function qA(e){function t(r,n,o,i,s){const a=fe(n.getContext(),r.context);if(ln(r.status,lr.console,n)&&XA(r,a),ln(r.status,lr.http,n)){const u={rawLogsEvent:{date:s||j(),message:r.message,status:r.status,origin:ae.LOGGER},messageContext:a,savedCommonContext:i,ddtags:n.getTags()};o&&(u.domainContext={handlingStack:o}),e.notify(0,u)}}return{handleLog:t}}const YA={[I.ok]:F.debug,[I.debug]:F.debug,[I.info]:F.info,[I.notice]:F.info,[I.warn]:F.warn,[I.error]:F.error,[I.critical]:F.error,[I.alert]:F.error,[I.emerg]:F.error};function XA({status:e,message:t},r){rt[YA[e]].call(ye,t,r)}function JA(e,t,r,n,o){const i=[e.logsEndpointBuilder];e.replica&&i.push(e.replica.logsEndpointBuilder);const s=Xi({encoder:Qi(),request:Yi(i,r),flushController:Ji({pageMayExitObservable:n,sessionExpireObservable:o.expireObservable})});return t.subscribe(1,a=>{s.add(a)}),s}function ZA(e){const t=Bt();e.subscribe(1,r=>{t.send("log",r)})}function QA(e){return{get:t=>{const r=e.findTrackedSession(t);if(r)return{session_id:r.id}}}}function eC(e){return t=>{e.notify(0,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,origin:ae.AGENT,status:I.error}}),zt("Error reported to customer",{"error.message":t.message})}}const tC=El;function rC(e){const t=ge;e.register(0,({startTime:o})=>{const i=r(o);return i||Y}),e.register(1,({startTime:o})=>{var i,s;const a=r(o);return a?{application:{id:a.application_id},view:{id:(i=a.view)===null||i===void 0?void 0:i.id},action:{id:(s=a.user_action)===null||s===void 0?void 0:s.id}}:Y});function r(o){const s=Ln()?t.DD_RUM_SYNTHETICS:t.DD_RUM,a=n(o,s);if(a)return a}function n(o,i){if(i&&i.getInternalContext)return i.getInternalContext(o)}}function nC(e,t,r){e.register(0,({startTime:n})=>{const o=r.findTrackedSession(n);return r.findTrackedSession(n,{returnInactive:!0})?{service:t.service,session_id:o?o.id:void 0,session:o?{id:o.id}:void 0}:me}),e.register(1,({startTime:n})=>{const o=r.findTrackedSession(n);return!o||!o.id?Y:{session:{id:o.id}}})}function oC(e,t){function r(){return t.isGranted()?Y:me}e.register(0,r),e.register(1,r)}const Go="logs";function iC(e,t,r,n){const o=new WA,i=tC(),s=[];o.subscribe(1,m=>qi("logs",m));const a=eC(o),u=dt?new x:yl(e),c=Sl("browser-logs-sdk",e,i,a,u,Qi);s.push(c.stop);const l=e.sessionStoreStrategyType&&!Ce()&&!Ln()?MA(e,r):DA(e);oC(i,r),nC(i,e,l);const d=Pl(i,e,Go),f=Dl(i,e,l,Go),p=Ml(i,e,Go,!1);rC(i),GA(e,o),HA(e,o,n),n.unbuffer(),jA(e,o),BA(e,o);const{handleLog:v}=qA(o);if(FA(e,o,i,t,a),Ce())ZA(o);else{const{stop:m}=JA(e,o,a,u,l);s.push(()=>m())}const h=QA(l);return{handleLog:v,getInternalContext:h.get,accountContext:d,globalContext:p,userContext:f,stop:()=>{s.forEach(m=>m())}}}const ds=NA(iC);il(ue(),"DD_LOGS",ds);var $d={},Pd={},Md={};Object.defineProperty(Md,"__esModule",{value:!0});var Dd={};Object.defineProperty(Dd,"__esModule",{value:!0});var Ud={};Object.defineProperty(Ud,"__esModule",{value:!0});var Fd={};Object.defineProperty(Fd,"__esModule",{value:!0});var Vd={};Object.defineProperty(Vd,"__esModule",{value:!0});var jd={};Object.defineProperty(jd,"__esModule",{value:!0});var Bd={};Object.defineProperty(Bd,"__esModule",{value:!0});(function(e){var t=z&&z.__createBinding||(Object.create?function(n,o,i,s){s===void 0&&(s=i);var a=Object.getOwnPropertyDescriptor(o,i);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,s,a)}:function(n,o,i,s){s===void 0&&(s=i),n[s]=o[i]}),r=z&&z.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Md,e),r(Dd,e),r(Ud,e),r(Fd,e),r(Vd,e),r(jd,e),r(Bd,e)})(Pd);var Gd={},Fn={},Vn={exports:{}};function sC(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}var aC=cC;function cC(e,t,r){var n=r&&r.stringify||sC,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var s=new Array(i);s[0]=n(e);for(var a=1;a<i;a++)s[a]=n(t[a]);return s.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var c="",l=1-o,d=-1,f=e&&e.length||0,p=0;p<f;){if(e.charCodeAt(p)===37&&p+1<f){switch(d=d>-1?d:0,e.charCodeAt(p+1)){case 100:case 102:if(l>=u||t[l]==null)break;d<p&&(c+=e.slice(d,p)),c+=Number(t[l]),d=p+2,p++;break;case 105:if(l>=u||t[l]==null)break;d<p&&(c+=e.slice(d,p)),c+=Math.floor(Number(t[l])),d=p+2,p++;break;case 79:case 111:case 106:if(l>=u||t[l]===void 0)break;d<p&&(c+=e.slice(d,p));var v=typeof t[l];if(v==="string"){c+="'"+t[l]+"'",d=p+2,p++;break}if(v==="function"){c+=t[l].name||"<anonymous>",d=p+2,p++;break}c+=n(t[l]),d=p+2,p++;break;case 115:if(l>=u)break;d<p&&(c+=e.slice(d,p)),c+=String(t[l]),d=p+2,p++;break;case 37:d<p&&(c+=e.slice(d,p)),c+="%",d=p+2,p++,l--;break}++l}++p}return d===-1?e:(d<f&&(c+=e.slice(d)),c)}const ac=aC;Vn.exports=ke;const dr=TC().console||{},uC={mapHttpRequest:Vr,mapHttpResponse:Vr,wrapRequestSerializer:zo,wrapResponseSerializer:zo,wrapErrorSerializer:zo,req:Vr,res:Vr,err:uc,errWithCause:uc};function Ve(e,t){return e==="silent"?1/0:t.levels.values[e]}const fs=Symbol("pino.logFuncs"),_i=Symbol("pino.hierarchy"),lC={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function cc(e,t){const r={logger:t,parent:e[_i]};t[_i]=r}function dC(e,t,r){const n={};t.forEach(o=>{n[o]=r[o]?r[o]:dr[o]||dr[lC[o]||"log"]||Ct}),e[fs]=n}function fC(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function ke(e){e=e||{},e.browser=e.browser||{};const t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");const r=e.browser.write||dr;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},o=fC(e.browser.serialize,n);let i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);const s=Object.keys(e.customLevels||{}),a=["error","fatal","warn","info","debug","trace"].concat(s);typeof r=="function"&&a.forEach(function(h){r[h]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");const u=e.level||"info",c=Object.create(r);c.log||(c.log=Ct),dC(c,a,r),cc({},c),Object.defineProperty(c,"levelVal",{get:d}),Object.defineProperty(c,"level",{get:f,set:p});const l={transmit:t,serialize:o,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:a,timestamp:yC(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Ct};c.levels=pC(e),c.level=u,c.isLevelEnabled=function(h){return this.levels.values[h]?this.levels.values[h]>=this.levels.values[this.level]:!1},c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=Ct,c.serializers=n,c._serialize=o,c._stdErrSerialize=i,c.child=function(...h){return v.call(this,l,...h)},t&&(c._logEvent=bi());function d(){return Ve(this.level,this)}function f(){return this._level}function p(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,et(this,l,c,"error"),et(this,l,c,"fatal"),et(this,l,c,"warn"),et(this,l,c,"info"),et(this,l,c,"debug"),et(this,l,c,"trace"),s.forEach(m=>{et(this,l,c,m)})}function v(h,m,E){if(!m)throw new Error("missing bindings for child Pino");E=E||{},o&&m.serializers&&(E.serializers=m.serializers);const S=E.serializers;if(o&&S){var D=Object.assign({},n,S),_=e.browser.serialize===!0?Object.keys(D):o;delete m.serializers,ps([m],_,D,this._stdErrSerialize)}function g(C){this._childLevel=(C._childLevel|0)+1,this.bindings=m,D&&(this.serializers=D,this._serialize=_),t&&(this._logEvent=bi([].concat(C._logEvent.bindings,m)))}g.prototype=this;const b=new g(this);return cc(this,b),b.child=function(...C){return v.call(this,h,...C)},b.level=E.level||this.level,h.onChild(b),b}return c}function pC(e){const t=e.customLevels||{},r=Object.assign({},ke.levels.values,t),n=Object.assign({},ke.levels.labels,vC(t));return{values:r,labels:n}}function vC(e){const t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}ke.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};ke.stdSerializers=uC;ke.stdTimeFunctions=Object.assign({},{nullTime:zd,epochTime:Kd,unixTime:EC,isoTime:SC});function hC(e){const t=[];e.bindings&&t.push(e.bindings);let r=e[_i];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function et(e,t,r,n){if(Object.defineProperty(e,n,{value:Ve(e.level,r)>Ve(n,r)?Ct:r[fs][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Ct){if(!t.transmit)return;const i=t.transmit.level||e.level,s=Ve(i,r);if(Ve(n,r)<s)return}e[n]=mC(e,t,r,n);const o=hC(e);o.length!==0&&(e[n]=gC(o,e[n]))}function gC(e,t){return function(){return t.apply(this,[...e,...arguments])}}function mC(e,t,r,n){return function(o){return function(){const s=t.timestamp(),a=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===dr?dr:this;for(var c=0;c<a.length;c++)a[c]=arguments[c];var l=!1;if(t.serialize&&(ps(a,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?o.call(u,..._C(this,n,a,s,t)):o.apply(u,a),t.transmit){const d=t.transmit.level||e._level,f=Ve(d,r),p=Ve(n,r);if(p<f)return;bC(this,{ts:s,methodLevel:n,methodValue:p,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Ve(e._level,r)},a,l)}}}(e[fs][n])}function _C(e,t,r,n,o){const{level:i,log:s=d=>d}=o.formatters||{},a=r.slice();let u=a[0];const c={};let l=(e._childLevel|0)+1;if(l<1&&(l=1),n&&(c.time=n),i){const d=i(t,e.levels.values[t]);Object.assign(c,d)}else c.level=e.levels.values[t];if(o.asObjectBindingsOnly){if(u!==null&&typeof u=="object")for(;l--&&typeof a[0]=="object";)Object.assign(c,a.shift());return[s(c),...a]}else{if(u!==null&&typeof u=="object"){for(;l--&&typeof a[0]=="object";)Object.assign(c,a.shift());u=a.length?ac(a.shift(),a):void 0}else typeof u=="string"&&(u=ac(a.shift(),a));return u!==void 0&&(c[o.messageKey]=u),[s(c)]}}function ps(e,t,r,n){for(const o in e)if(n&&e[o]instanceof Error)e[o]=ke.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(const i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function bC(e,t,r,n=!1){const o=t.send,i=t.ts,s=t.methodLevel,a=t.methodValue,u=t.val,c=e._logEvent.bindings;n||ps(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(l){return c.indexOf(l)===-1}),e._logEvent.level.label=s,e._logEvent.level.value=a,o(s,e._logEvent,u),e._logEvent=bi(c)}function bi(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function uc(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)t[r]===void 0&&(t[r]=e[r]);return t}function yC(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?zd:Kd}function Vr(){return{}}function zo(e){return e}function Ct(){}function zd(){return!1}function Kd(){return Date.now()}function EC(){return Math.round(Date.now()/1e3)}function SC(){return new Date(Date.now()).toISOString()}function TC(){function e(t){return typeof t!="undefined"&&t}try{return typeof globalThis!="undefined"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}Vn.exports.default=ke;Vn.exports.pino=ke;var wC=Vn.exports,IC=z&&z.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.createLogger=OC;const lc=IC(wC);function OC(e,t){return e&&"write"in e?(0,lc.default)({level:"info"},e):(0,lc.default)(y({level:"info"},e),t)}var vs={};Object.defineProperty(vs,"__esModule",{value:!0});vs.createLoggerHttpMiddleware=CC;const AC=Fn;function CC(e){const{logger:t,genReqId:r,logRequest:n=!0}=e!=null?e:{};return(o,i,s)=>{const a=(t!=null?t:(0,AC.createLogger)()).child({req:{reqId:r==null?void 0:r(o),method:o.method,url:o.url,headers:o.headers,params:o.params,query:o.query}});if(o.logger=a,i.logger=a,o.startTime=Date.now(),n){const u=c=>{i.removeListener("error",u),i.removeListener("finish",u),i.removeListener("close",u),i.logger.info({err:c,duration:Date.now()-o.startTime},`Request ${o.method} ${o.url} ${c?"failed":"completed"}`)};i.on("finish",u),i.on("close",u),i.on("error",u)}s()}}(function(e){var t=z&&z.__createBinding||(Object.create?function(n,o,i,s){s===void 0&&(s=i);var a=Object.getOwnPropertyDescriptor(o,i);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,s,a)}:function(n,o,i,s){s===void 0&&(s=i),n[s]=o[i]}),r=z&&z.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Fn,e),r(vs,e)})(Gd);(function(e){var t=z&&z.__createBinding||(Object.create?function(n,o,i,s){s===void 0&&(s=i);var a=Object.getOwnPropertyDescriptor(o,i);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,s,a)}:function(n,o,i,s){s===void 0&&(s=i),n[s]=o[i]}),r=z&&z.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Pd,e),r(Gd,e)})($d);function RC(e){ds.init({clientToken:e==null?void 0:e.clientToken,site:"datadoghq.com",service:e.service,env:e.env,version:e.version,forwardErrorsToLogs:!0,sessionSampleRate:100})}function Hd(e){const t=e,r=t.msg||"",n=t.error instanceof Error?t.error:void 0,c=t,{msg:o,level:i,time:s,error:a}=c,u=Or(c,["msg","level","time","error"]);return{msg:r,context:u,errorObj:n}}function jr(e,t,r){const{msg:n,context:o}=Hd(e);console[t](n,o),ds.logger[r](n,o)}function dc(e){const{msg:t,context:r,errorObj:n}=Hd(e);n?console.error(t,r,n):console.error(t,r)}let q=$d.createLogger({type:"browser",browser:{asObject:!0,formatters:{level(e){return{level:e}}},write:{trace:e=>jr(e,"debug","debug"),debug:e=>jr(e,"debug","debug"),info:e=>jr(e,"info","info"),warn:e=>jr(e,"warn","warn"),error:dc,fatal:dc}}});function xC(e){q=e}const fc=void 0,pc=void 0;function kC(e){var t,r,n;try{if(!fc&&!e.applicationId||!pc&&!e.clientToken)throw new Error("Datadog credentials not provided");return mi.init({applicationId:(t=e.applicationId)!=null?t:fc,clientToken:(r=e.clientToken)!=null?r:pc,site:"datadoghq.com",service:(n=e.service)!=null?n:"vwr-loader",env:e.env,version:e.version,sessionSampleRate:100,sessionReplaySampleRate:0,trackResources:!0,trackLongTasks:!0,defaultPrivacyLevel:"mask-user-input",allowFallbackToLocalStorage:!0}),mi}catch(o){q.error("Failed to initialize Datadog RUM:",o)}}const LC={ENV_VARS_MISSING:"ENV_VARS_MISSING"};class Sr extends Error{constructor(t,r,n={}){super(r),this.reason=t,this.message=r,this.context=n,this.name="InitializationError",Object.setPrototypeOf(this,Sr.prototype)}toJSON(){var t;return W(y({name:this.name,reason:this.reason,message:this.message},this.context),{cause:(t=this.context.cause)==null?void 0:t.message,stack:this.stack})}getContext(){return W(y({},this.context),{reason:this.reason})}}function Wd(e){return e instanceof Error&&e.name==="VWRInitializationError"}RC({service:"vwr-loader",clientToken:void 0,env:void 0,version:void 0});function NC(e){try{const r=performance.getEntriesByType("navigation")[0];(r==null?void 0:r.type)==="back_forward"&&(q.info({platform:e,navigationType:r.type},"[Shell] Back navigation detected, exiting app"),$C(e))}catch(t){q.warn({error:t},"[Shell] Could not check navigation type")}}function $C(e){switch(e){case"SAMSUNG_TV":PC();break;case"LG_TV":MC();break;case"FIRE_TV":DC();break;default:q.info({platform:e},"[Shell] No platform-specific exit")}}function PC(){var e,t;try{(t=(e=window.tizen)==null?void 0:e.application)!=null&&t.getCurrentApplication?window.tizen.application.getCurrentApplication().exit():q.warn("[Shell] Tizen exit API not available")}catch(r){q.error({error:r},"[Shell] Failed to exit Samsung app")}}function MC(){try{window.close()}catch(e){q.error({error:e},"[Shell] Failed to exit LG app")}}function DC(){var e,t,r;try{(r=(t=(e=window.Capacitor)==null?void 0:e.Plugins)==null?void 0:t.AppLifecycle)!=null&&r.exitApp?window.Capacitor.Plugins.AppLifecycle.exitApp().catch(n=>{q.error({error:n},"[Shell] Failed to exit Fire TV app")}):q.warn("[Shell] Capacitor AppLifecycle plugin not available")}catch(n){q.error({error:n},"[Shell] Failed to exit Fire TV app")}}const UC=void 0,FC=void 0,VC=async e=>{xC(q.child({service:"vwr-loader",env:void 0,platform:void 0}));const t=performance.now();try{await jC(e),e==null||e.addAction("vwr:init:complete",{outcome:"success",duration_ms:performance.now()-t})}catch(r){e==null||e.addAction("vwr:init:complete",{outcome:"failure",duration_ms:performance.now()-t});let n="UNKNOWN_ERROR";throw(r instanceof Sr||Wd(r))&&(n=r.reason),e==null||e.addAction("vwr:fallback",{reason:n,error_type:r instanceof Error?r.name:"UnknownError"}),r}};async function jC(e){throw new Sr(LC.ENV_VARS_MISSING,"[Shell] Required environment variables not injected (PLATFORM, CONFIG_URL, or CONFIG_FILE)",{configUrl:UC,configFile:FC})}const Ko=void 0,BC=void 0,GC=void 0;function zC(e){if(e instanceof Sr||Wd(e))q.error({context:e.getContext(),error_type:e.name,error:e},`[Shell] FALLBACK TO HUB - ${e.message}`);else{const t=e instanceof Error?e:new Error(String(e));q.error({reason:t.message,error_type:t.name,error:t},"[Shell] FALLBACK TO HUB - Init failed (unknown error)")}}async function KC(){var r;NC(Ko),q.info("VWR loader starting init flow");const e=kC({env:"unknown",version:GC,service:"vwr-loader"});let t;try{await VC(e),t==null||t()}catch(n){try{zC(n)}finally{let o;const i=((r=new URLSearchParams(window.location.search).get("gameControllerUrl"))==null?void 0:r.trim())||null;i?(o=new URL(i),q.info({gameControllerUrl:i},"[Shell] Using gameControllerUrl as fallback")):(o=new URL(BC),o.searchParams.set("volley_platform",Ko),o.searchParams.set("version","unknown"),q.info({PLATFORM:Ko},"[Shell] No gameControllerUrl, redirecting to Hub")),window.location.href=o.toString()}}}KC();export{Ry as $,ss as A,qC as B,Do as C,uT as D,vw as E,T as F,Hw as G,qi as H,nR as I,tR as J,rR as K,oR as L,AS as M,R as N,de as O,JC as P,Z as Q,A as R,ee as S,kn as T,Bt as U,Yi as V,Ce as W,zt as X,$t as Y,zi as Z,Wi as _,l0 as a,Ge as a0,ue as a1,w as a2,H as a3,Au as a4,Tn as b,ZC as c,xw as d,u0 as e,ad as f,QC as g,YC as h,WC as i,Kw as j,XC as k,B as l,us as m,NI as n,eR as o,td as p,En as q,c0 as r,cd as s,j as t,Ke as u,Mn as v,U as w,$I as x,L as y,Ee as z};
12
12
  //# sourceMappingURL=main.js.map