Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 832
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 839
import{c as mn,g as Ht}from"./_commonjsHelpers-BosuxZz1.js";const zT=e=>e==="query"?"queries":`${e}s`,YT=e=>e==="queries"?"query":e.slice(0,-1),XT=(e,...t)=>{let n="";for(let r=0;r[...e,t],QT=(e,t,n)=>[...e.slice(0,t),n,...e.slice(t+1)],ZT=(e,t)=>[...e.slice(0,t),...e.slice(t+1)],eS=(e,t)=>e.reduce(([n,r],o)=>t(o)?[[...n,o],r]:[n,[...r,o]],[[],[]]);function tS(e,t){window.dataLayer=window.dataLayer||[],window.dataLayer.push(t),window.dataLayer.push({event:e})}const cu=(e,t=!1)=>{const n=new URL(e,window.location.origin);if(n.searchParams.set("_cb",new Date().getTime().toString()),t)return window.open(n.toString(),"_blank");window.location.assign(n.toString())};async function nS(){return new Promise(e=>{setTimeout(e,0)})}function rS(e){const t=e.startsWith("--")?e:`--${e}`;return getComputedStyle(document.documentElement).getPropertyValue(t).trim()}function xo(){const e=[];let t=null;const n=(s,i,a)=>{s.addEventListener(i,a),e.push({element:s,event:i,handler:a})},o=Object.assign(()=>{e.forEach(({element:s,event:i,handler:a})=>{s.removeEventListener(i,a)}),e.length=0},{withPageRestore:s=>{t=s,window.addEventListener("pageshow",i=>{i.persisted&&t&&t()})}});return{addListener:n,cleanup:o}}/*! js-cookie v3.0.5 | MIT */function Vn(e){for(var t=1;t"u")){i=Vn({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in i)i[c]&&(a+="; "+c,i[c]!==!0&&(a+="="+i[c].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a{Mt[e]=Xe[e]});const tn="Datadog Browser SDK:",K={debug:Mt.debug.bind(Xe,tn),log:Mt.log.bind(Xe,tn),info:Mt.info.bind(Xe,tn),warn:Mt.warn.bind(Xe,tn),error:Mt.error.bind(Xe,tn)},Lo="https://docs.datadoghq.com",du=`${Lo}/real_user_monitoring/browser/troubleshooting`,ko="More details:";function Mi(e,t){return(...n)=>{try{return e(...n)}catch(r){K.error(t,r)}}}function nt(e){return e!==0&&Math.random()*100<=e}function hn(e,t){return+e.toFixed(t)}function fu(e){return In(e)&&e>=0&&e<=100}function In(e){return typeof e=="number"}const ve=1e3,Ce=60*ve,Di=60*Ce,pu=24*Di,Pi=365*pu;function pr(e){return{relative:e,timeStamp:hu(e)}}function mu(e){return{relative:No(e),timeStamp:e}}function hu(e){const t=Ne()-performance.now();return t>Cn()?Math.round(Gt(t,e)):yu(e)}function gu(){return Math.round(Ne()-Gt(Cn(),performance.now()))}function P(e){return In(e)?hn(e*1e6,0):e}function Ne(){return new Date().getTime()}function Ie(){return Ne()}function xe(){return performance.now()}function fe(){return{relative:xe(),timeStamp:Ie()}}function Ui(){return{relative:0,timeStamp:Cn()}}function ie(e,t){return t-e}function Gt(e,t){return e+t}function No(e){return e-Cn()}function yu(e){return Math.round(Gt(Cn(),e))}function bu(e){return ee[n]===t)}function bt(e){return Object.keys(e).length===0}function $i(e,t){const n={};for(const r of Object.keys(e))n[r]=t(e[r]);return n}function We(){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}function rt(e,t){const n=We();let r;return n.Zone&&typeof n.Zone.__symbol__=="function"&&(r=e[n.Zone.__symbol__(t)]),r||(r=e[t]),r}let lo,Vi=!1;function _u(e){lo=e}function Tu(e){Vi=e}function D(e){return function(){return gt(e,this,arguments)}}function gt(e,t,n){try{return e.apply(t,n)}catch(r){Mo(r)}}function Mo(e){if(fo(e),lo)try{lo(e)}catch(t){fo(t)}}function fo(...e){Vi&&K.error("[MONITOR]",...e)}function we(e,t){return rt(We(),"setTimeout")(D(e),t)}function ke(e){rt(We(),"clearTimeout")(e)}function Wt(e,t){return rt(We(),"setInterval")(D(e),t)}function mr(e){rt(We(),"clearInterval")(e)}function Ts(e){const t=window.queueMicrotask;typeof t=="function"?t(D(e)):Promise.resolve().then(D(e))}class q{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach(n=>n(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(n=>t!==n),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function ji(...e){return new q(t=>{const n=e.map(r=>r.subscribe(o=>t.notify(o)));return()=>n.forEach(r=>r.unsubscribe())})}class Hi extends q{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 n=!1;const r={unsubscribe:()=>{n=!0,this.removeObserver(t)}};return Ts(()=>{for(const o of this.buffer){if(n)return;t(o)}n||this.addObserver(t)}),r}unbuffer(){Ts(()=>{this.maxBufferSize=this.buffer.length=0})}}function hr(e,t,n){const r=n&&n.leading!==void 0?n.leading:!0,o=n&&n.trailing!==void 0?n.trailing:!0;let s=!1,i,a;return{throttled:(...c)=>{if(s){i=c;return}r?e(...c):i=c,s=!0,a=we(()=>{o&&i&&e(...i),s=!1,i=void 0},t)},cancel:()=>{ke(a),s=!1,i=void 0}}}function X(){}function he(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,he)}const or=/([\w-]+)\s*=\s*([^;]+)/g;function Tn(e,t){for(or.lastIndex=0;;){const n=or.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function Su(e){const t=new Map;for(or.lastIndex=0;;){const n=or.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function Gi(e,t,n=""){const r=e.charCodeAt(t-1),s=r>=55296&&r<=56319?t+1:t;return e.length<=s?e:`${e.slice(0,s)}${n}`}function vu(){return Au()===0}let jn;function Au(){return jn??(jn=wu())}function wu(e=window){var t;const n=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(n)?0:((t=e.navigator.vendor)===null||t===void 0?void 0:t.indexOf("Apple"))===0||/safari/i.test(n)&&!/chrome|android/i.test(n)?1:2}function gr(e,t,n=0,r){const o=new Date;o.setTime(o.getTime()+n);const s=`expires=${o.toUTCString()}`,i=r&&r.crossSite?"none":"strict",a=r&&r.domain?`;domain=${r.domain}`:"",c=r&&r.secure?";secure":"",u=r&&r.partitioned?";partitioned":"";document.cookie=`${e}=${t};${s};path=/;samesite=${i}${a}${c}${u}`}function Do(e){return Tn(document.cookie,e)}let Dr;function tt(e){return Dr||(Dr=Su(document.cookie)),Dr.get(e)}function Wi(e,t){gr(e,"",0,t)}function Iu(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${he()}`,n="test";gr(t,n,Ce,e);const r=Do(t)===n;return Wi(t,e),r}catch(t){return K.error(t),!1}}let Pr;function Ki(){if(Pr===void 0){const e=`dd_site_test_${he()}`,t="test",n=window.location.hostname.split(".");let r=n.pop();for(;n.length&&!Do(e);)r=`${n.pop()}.${r}`,gr(e,t,ve,{domain:r});Wi(e,{domain:r}),Pr=r}return Pr}const Rn="_dd_s";function Cu(e,t){for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(t(r,n,e))return r}}function qi(e){return Object.values(e)}function Po(e){return Object.entries(e)}const Et=4*Di,zi=15*Ce,Ru=Pi,Yi="0",Sn={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},Xi=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Uo="&";function Ou(e){return!!e&&(e.indexOf(Uo)!==-1||Xi.test(e))}const xu="1";function dt(e,t){const n={isExpired:xu};return t.trackAnonymousUser&&(e!=null&&e.anonymousId?n.anonymousId=e==null?void 0:e.anonymousId:n.anonymousId=he()),n}function Xn(e){return bt(e)}function Ji(e){return!Xn(e)}function gn(e){return e.isExpired!==void 0||!Lu(e)}function Lu(e){return(e.created===void 0||Ne()-Number(e.created)t==="anonymousId"?`aid=${n}`:`${t}=${n}`).join(Uo)}function ea(e){const t={};return Ou(e)&&e.split(Uo).forEach(n=>{const r=Xi.exec(n);if(r!==null){const[,o,s]=r;o==="aid"?t.anonymousId=s:t[o]=s}}),t}const ku="_dd",Nu="_dd_r",Mu="_dd_l",Du="rum",Pu="logs";function Uu(e){if(!tt(Rn)){const n=tt(ku),r=tt(Nu),o=tt(Mu),s={};n&&(s.id=n),o&&/^[01]$/.test(o)&&(s[Pu]=o),r&&/^[012]$/.test(r)&&(s[Du]=r),Ji(s)&&(Qi(s),e.persistSession(s))}}function Ss(e){const t=Bu(e);return Iu(t)?{type:Sn.COOKIE,cookieOptions:t}:void 0}function Fu(e,t){const n={isLockEnabled:vu(),persistSession:r=>vs(t,e,r,zi),retrieveSession:ta,expireSession:r=>vs(t,e,dt(r,e),Et)};return Uu(n),n}function vs(e,t,n,r){gr(Rn,Zi(n),t.trackAnonymousUser?Ru:r,e)}function ta(){const e=Do(Rn);return ea(e)}function Bu(e){const t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=Ki()),t}const $u="_dd_test_";function As(){try{const e=he(),t=`${$u}${e}`;localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:Sn.LOCAL_STORAGE}:void 0}catch{return}}function Vu(e){return{isLockEnabled:!1,persistSession:na,retrieveSession:ju,expireSession:t=>Hu(t,e)}}function na(e){localStorage.setItem(Rn,Zi(e))}function ju(){const e=localStorage.getItem(Rn);return ea(e)}function Hu(e,t){na(dt(e,t))}function Kt(e,t,n){if(typeof e!="object"||e===null)return JSON.stringify(e);const r=Dt(Object.prototype),o=Dt(Array.prototype),s=Dt(Object.getPrototypeOf(e)),i=Dt(e);try{return JSON.stringify(e,t,n)}catch{return""}finally{r(),o(),s(),i()}}function Dt(e){const t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):X}const Gu=220*En,Wu="$",Ku=3;function ne(e,t=Gu){const n=Dt(Object.prototype),r=Dt(Array.prototype),o=[],s=new WeakMap,i=Ur(e,Wu,void 0,o,s),a=JSON.stringify(i);let c=a?a.length:0;if(c>t){Fr(t,"discarded",e);return}for(;o.length>0&&ct){Fr(t,"truncated",e);break}u.target[d]=f}else for(const d in u.source)if(Object.prototype.hasOwnProperty.call(u.source,d)){const f=Ur(u.source[d],u.path,d,o,s);if(f!==void 0&&(c+=JSON.stringify(f).length+l+d.length+Ku,l=1),c>t){Fr(t,"truncated",e);break}u.target[d]=f}}return n(),r(),i}function Ur(e,t,n,r,o){const s=Yu(e);if(!s||typeof s!="object")return qu(s);const i=po(s);if(i!=="[Object]"&&i!=="[Array]"&&i!=="[Error]")return i;const a=e;if(o.has(a))return`[Reference seen at ${o.get(a)}]`;const c=n!==void 0?`${t}.${n}`:t,u=Array.isArray(s)?[]:{};return o.set(a,c),r.push({source:s,target:u,path:c}),u}function qu(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 po(e){try{if(e instanceof Event)return zu(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;const n=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch{}return"[Unserializable]"}function zu(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?po(e.currentTarget):null,target:e.target?po(e.target):null}}function Yu(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch{}return e}function Fr(e,t,n){K.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}const $t="?";function On(e){var t,n;const r=[];let o=Br(e,"stack");const s=String(e);if(o&&o.startsWith(s)&&(o=o.slice(s.length)),o&&o.split(`
`).forEach(i=>{const a=Qu(i)||el(i)||nl(i)||sl(i);a&&(!a.func&&a.line&&(a.func=$t),r.push(a))}),r.length>0&&ul()&&e instanceof Error){const i=[];let a=e;for(;(a=Object.getPrototypeOf(a))&&oa(a);){const c=((t=a.constructor)===null||t===void 0?void 0:t.name)||$t;i.push(c)}for(let c=i.length-1;c>=0&&((n=r[0])===null||n===void 0?void 0:n.func)===i[c];c--)r.shift()}return{message:Br(e,"message"),name:Br(e,"name"),stack:r}}const ra="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet||\\w+\\.|\\/).*?)",Vt="(?::(\\d+))",Xu=new RegExp(`^\\s*at (.*?) ?\\(${ra}${Vt}?${Vt}?\\)?\\s*$`,"i"),Ju=new RegExp(`\\((\\S*)${Vt}${Vt}\\)`);function Qu(e){const t=Xu.exec(e);if(!t)return;const n=t[2]&&t[2].indexOf("native")===0,r=t[2]&&t[2].indexOf("eval")===0,o=Ju.exec(t[2]);return r&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||$t,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}const Zu=new RegExp(`^\\s*at ?${ra}${Vt}?${Vt}??\\s*$`,"i");function el(e){const t=Zu.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:$t,line:t[2]?+t[2]:void 0,url:t[1]}}const tl=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function nl(e){const t=tl.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||$t,line:+t[3],url:t[2]}}const rl=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,ol=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function sl(e){const t=rl.exec(e);if(!t)return;const n=t[3]&&t[3].indexOf(" > eval")>-1,r=ol.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||$t,line:t[4]?+t[4]:void 0,url:t[3]}}function Br(e,t){if(typeof e!="object"||!e||!(t in e))return;const n=e[t];return typeof n=="string"?n:void 0}function il(e,t,n,r){if(t===void 0)return;const{name:o,message:s}=cl(e);return{name:o,message:s,stack:[{url:t,column:r,line:n}]}}const al=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function cl(e){let t,n;return{}.toString.call(e)==="[object String]"&&([,t,n]=al.exec(e)),{name:t,message:n}}function oa(e){return String(e.constructor).startsWith("class ")}let Hn;function ul(){if(Hn!==void 0)return Hn;class e extends Error{constructor(){super(),this.name="Error"}}const[t,n]=[e,Error].map(r=>new r);return Hn=oa(Object.getPrototypeOf(t))&&n.stack!==t.stack,Hn}function sr(e){const n=new Error(e);n.name="HandlingStack";let r;return gt(()=>{const o=On(n);o.stack=o.stack.slice(2),r=xn(o)}),r}function xn(e){let t=sa(e);return e.stack.forEach(n=>{const r=n.func==="?"?"":n.func,o=n.args&&n.args.length>0?`(${n.args.join(", ")})`:"",s=n.line?`:${n.line}`:"",i=n.line&&n.column?`:${n.column}`:"";t+=`
at ${r}${o} @ ${n.url}${s}${i}`}),t}function sa(e){return`${e.name||"Error"}: ${e.message}`}const ia="No stack, consider using an instance of Error";function Fo({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:s,useFallbackStack:i=!0,source:a,handling:c}){const u=_t(t);return!e&&u&&(e=On(t)),{startClocks:o,source:a,handling:c,handlingStack:n,componentStack:r,originalError:t,type:e?e.name:void 0,message:ll(e,u,s,t),stack:e?xn(e):i?ia:void 0,causes:u?pl(t,a):void 0,fingerprint:dl(t),context:fl(t)}}function ll(e,t,n,r){return e!=null&&e.message&&(e!=null&&e.name)?e.message:t?"Empty message":`${n} ${Kt(ne(r))}`}function dl(e){return _t(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function fl(e){if(e!==null&&typeof e=="object"&&"dd_context"in e)return e.dd_context}function _t(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function pl(e,t){let n=e;const r=[];for(;_t(n==null?void 0:n.cause)&&r.length<10;){const o=On(n.cause);r.push({message:n.cause.message,source:t,type:o==null?void 0:o.name,stack:o&&xn(o)}),n=n.cause}return r.length?r:void 0}var yt;(function(e){e.TRACK_INTAKE_REQUESTS="track_intake_requests",e.WRITABLE_RESOURCE_GRAPHQL="writable_resource_graphql",e.EARLY_REQUEST_COLLECTION="early_request_collection",e.WATCH_COOKIE_WITHOUT_LOCK="watch_cookie_without_lock",e.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name"})(yt||(yt={}));const Bo=new Set;function ml(e){Array.isArray(e)&&hl(e.filter(t=>rr(yt,t)))}function hl(e){e.forEach(t=>{Bo.add(t)})}function yr(e){return Bo.has(e)}function gl(){return Bo}const aa="datad0g.com",yl="dd0g-gov.com",ht="datadoghq.com",bl="datadoghq.eu",El="ddog-gov.com",_l="pci.browser-intake-datadoghq.com",Tl=["ddsource","dd-api-key","dd-request-id"];function ca(e,t){const n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function Tt(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function ir(e,t,n=Sl()){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(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){const o=Array.isArray(e)?e:[];for(let s=0;s=0;return n||e.push(t),n}}}function ua(){var e;const t=window.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 vl(e){return e>=500}function Al(e){try{return e.clone()}catch{return}}const qt={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"},wl=80*En,Il=32,la=3*Fi,Cl=Ce,da=ve;function fa(e,t,n,r,o,s){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?ma(e,t,n,s,{onSuccess:()=>ha(0,t,n,r,o,s),onFailure:()=>{t.queuedPayloads.enqueue(e)||s.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e}),pa(t,n,r,o,s)}}):t.queuedPayloads.enqueue(e)||s.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e})}function pa(e,t,n,r,o){e.transportStatus===2&&we(()=>{const s=e.queuedPayloads.first();ma(s,e,t,o,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=da,ha(1,e,t,n,r,o)},onFailure:()=>{e.currentBackoffTime=Math.min(Cl,e.currentBackoffTime*2),pa(e,t,n,r,o)}})},e.currentBackoffTime)}function ma(e,t,n,r,{onSuccess:o,onFailure:s}){t.bandwidthMonitor.add(e),n(e,i=>{t.bandwidthMonitor.remove(e),Rl(i)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:i.status},r.notify({type:"failure",bandwidth:t.bandwidthMonitor.stats(),payload:e}),s()):(t.transportStatus=0,r.notify({type:"success",bandwidth:t.bandwidthMonitor.stats(),payload:e}),o())})}function ha(e,t,n,r,o,s){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:`Reached max ${r} events size queued for upload: ${la/Fi}MiB`,source:qt.AGENT,startClocks:fe()}),t.queueFullReported=!0);const i=t.queuedPayloads;for(t.queuedPayloads=ga();i.size()>0;)fa(i.dequeue(),t,n,r,o,s)}function Rl(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||vl(e.status))}function Ol(){return{transportStatus:0,currentBackoffTime:da,bandwidthMonitor:xl(),queuedPayloads:ga(),queueFullReported:!1}}function ga(){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>=la}}}function xl(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=wl&&this.ongoingRequestCount{for(const i of e)fa(s,o,(a,c)=>Nl(i,t,a,c),i.trackType,n,r)},sendOnExit:s=>{for(const i of e)Ll(i,t,s)}}}function Ll(e,t,n){if(!!navigator.sendBeacon&&n.bytesCountr==null?void 0:r({status:i.status,type:i.type}))).catch(D(()=>mo(e,n,r)))}else mo(e,n,r)}function mo(e,t,n){const r=e.build("fetch",t);fetch(r,{method:"POST",body:t.data,mode:"cors"}).then(D(o=>n==null?void 0:n({status:o.status,type:o.type}))).catch(D(()=>n==null?void 0:n({status:0})))}function Ml(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function Ln(){const e=Pl();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,n,r){const o=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:o}))}}}function Dl(e){const t=Ln();return!!t&&t.getCapabilities().includes(e)}function vn(e){var t;e===void 0&&(e=(t=We().location)===null||t===void 0?void 0:t.hostname);const n=Ln();return!!n&&n.getAllowedWebViewHosts().some(r=>e===r||e.endsWith(`.${r}`))}function Pl(){return We().DatadogEventBridge}function se(e,t,n,r,o){return ot(e,t,[n],r,o)}function ot(e,t,n,r,{once:o,capture:s,passive:i}={}){const a=D(f=>{!f.isTrusted&&!f.__ddIsTrusted&&!e.allowUntrustedEvents||(o&&d(),r(f))}),c=i?{capture:s,passive:i}:s,u=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,l=rt(u,"addEventListener");n.forEach(f=>l.call(t,f,a,c));function d(){const f=rt(u,"removeEventListener");n.forEach(h=>f.call(t,h,a,c))}return{stop:d}}const Ft={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function Ul(e){return new q(t=>{const{stop:n}=ot(e,window,["visibilitychange","freeze"],o=>{o.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:Ft.HIDDEN}):o.type==="freeze"&&t.notify({reason:Ft.FROZEN})},{capture:!0}),r=se(e,window,"beforeunload",()=>{t.notify({reason:Ft.UNLOADING})}).stop;return()=>{n(),r()}})}function Fl(e){return qi(Ft).includes(e)}function ba({encoder:e,request:t,flushController:n,messageBytesLimit:r}){let o={};const s=n.flushObservable.subscribe(d=>l(d));function i(d,f,h){n.notifyBeforeAddMessage(f),h!==void 0?(o[h]=d,n.notifyAfterAddMessage()):e.write(e.isEmpty?d:`
${d}`,m=>{n.notifyAfterAddMessage(m-f)})}function a(d){return d!==void 0&&o[d]!==void 0}function c(d){const f=o[d];delete o[d];const h=e.estimateEncodedBytesCount(f);n.notifyAfterRemoveMessage(h)}function u(d,f){const h=Kt(d),m=e.estimateEncodedBytesCount(h);if(m>=r){K.warn(`Discarded a message whose size was bigger than the maximum allowed size ${r}KB. ${ko} ${du}/#technical-limitations`);return}a(f)&&c(f),i(h,m,f)}function l(d){const f=qi(o).join(`
`);o={};const h=Fl(d.reason),m=h?t.sendOnExit:t.send;if(h&&e.isAsync){const g=e.finishSync();g.outputBytesCount&&m(Is(g));const S=[g.pendingData,f].filter(Boolean).join(`
`);S&&m({data:S,bytesCount:Bi(S)})}else f&&e.write(e.isEmpty?f:`
${f}`),e.finish(g=>{m(Is(g))})}return{flushController:n,add:u,upsert:u,stop:s.unsubscribe}}function Is(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}}function Ea({messagesLimit:e,bytesLimit:t,durationLimit:n,pageMayExitObservable:r,sessionExpireObservable:o}){const s=r.subscribe(m=>l(m.reason)),i=o.subscribe(()=>l("session_expire")),a=new q(()=>()=>{s.unsubscribe(),i.unsubscribe()});let c=0,u=0;function l(m){if(u===0)return;const g=u,S=c;u=0,c=0,h(),a.notify({reason:m,messagesCount:g,bytesCount:S})}let d;function f(){d===void 0&&(d=we(()=>{l("duration_limit")},n))}function h(){ke(d),d=void 0}return{flushObservable:a,get messagesCount(){return u},notifyBeforeAddMessage(m){c+m>=t&&l("bytes_limit"),u+=1,c+=m,f()},notifyAfterAddMessage(m=0){c+=m,u>=e?l("messages_limit"):c>=t&&l("bytes_limit")},notifyAfterRemoveMessage(m){c-=m,u-=1,u===0&&h()}}}const st="DISCARDED",Me="SKIPPED";function Bl(){const e={};return{register(t,n){return e[t]||(e[t]=[]),e[t].push(n),{unregister:()=>{e[t]=e[t].filter(r=>r!==n)}}},triggerHook(t,n){const r=e[t]||[],o=[];for(const s of r){const i=s(n);if(i===st)return st;i!==Me&&o.push(i)}return Ze(...o)}}}const je={LOG:"log",CONFIGURATION:"configuration",USAGE:"usage"},$l=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost",""],Vl=[El];let $r;function zt(){return $r||($r=new Hi(100)),$r}function jl(e,t,n,r,o,s){const i=new q,{stop:a}=Gl(t,r,o,s,i),{enabled:c}=Hl(e,t,n,i);return{stop:a,enabled:c}}function Hl(e,t,n,r){const o={},s=!Vl.includes(t.site)&&nt(t.telemetrySampleRate),i={[je.LOG]:s,[je.CONFIGURATION]:s&&nt(t.telemetryConfigurationSampleRate),[je.USAGE]:s&&nt(t.telemetryUsageSampleRate)},a=Wl(),c=zt();return c.subscribe(({rawEvent:l,kind:d})=>{if(!i[l.type])return;let f=o[d];if(f||(f=o[d]=new Set),f.size>=t.maxTelemetryEventsPerPage)return;const h=Kt(l);if(f.has(h))return;const m=n.triggerHook(1,{startTime:fe().relative});if(m===st)return;const g=u(m,e,l,a);r.notify(g),ca("telemetry",g),f.add(h)}),c.unbuffer(),_u(ql),{enabled:s};function u(l,d,f,h){const g={type:"telemetry",date:fe().timeStamp,service:d,version:"6.18.1",source:"browser",_dd:{format_version:2},telemetry:Ze(f,{runtime_env:h,connectivity:ua(),sdk_setup:"npm"}),experimental_features:Array.from(gl())};return Ze(g,l)}}function Gl(e,t,n,r,o){const s=[];if(vn()){const i=Ln(),a=o.subscribe(c=>i.send("internal_telemetry",c));s.push(a.unsubscribe)}else{const i=[e.rumEndpointBuilder];e.replica&&Kl(e)&&i.push(e.replica.rumEndpointBuilder);const a=ba({encoder:r(4),request:ya(i,e.batchBytesLimit,t),flushController:Ea({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageMayExitObservable:n,sessionExpireObservable:new q}),messageBytesLimit:e.messageBytesLimit});s.push(a.stop);const c=o.subscribe(a.add);s.push(c.unsubscribe)}return{stop:()=>s.forEach(i=>i())}}function Wl(){return{is_local_file:window.location.protocol==="file:",is_worker:"WorkerGlobalScope"in self}}function Kl(e){return e.site===aa}function Yt(e,t){fo(fr.debug,e,t),zt().notify({rawEvent:{type:je.LOG,message:e,status:"debug",...t},kind:"debug"})}function ql(e,t){zt().notify({rawEvent:{type:je.LOG,status:"error",...Yl(e),...t},kind:"error"})}function zl(e){zt().notify({rawEvent:{type:je.CONFIGURATION,configuration:e},kind:je.CONFIGURATION})}function _a(e,t){zt().notify({rawEvent:{type:je.LOG,message:e,status:"debug",...t},kind:e})}function Ee(e){zt().notify({rawEvent:{type:je.USAGE,usage:e},kind:je.USAGE})}function Yl(e){if(_t(e)){const t=On(e);return{error:{kind:t.name,stack:xn(Xl(t))},message:t.message}}return{error:{stack:ia},message:`Uncaught ${Kt(e)}`}}function Xl(e){return e.stack=e.stack.filter(t=>!t.url||$l.some(n=>t.url.startsWith(n))),e}const Jl=10,Ql=100,Zl=ve,Ta="--",Sa=[];let Jn;function ft(e,t,n=0){var r;const{isLockEnabled:o,persistSession:s,expireSession:i}=t,a=f=>s({...f,lock:u}),c=()=>{const{lock:f,...h}=t.retrieveSession();return{session:h,lock:f&&!td(f)?f:void 0}};if(Jn||(Jn=e),e!==Jn){Sa.push(e);return}if(o&&n>=Ql){Yt("Aborted session operation after max lock retries",{currentStore:c()}),Cs(t);return}let u,l=c();if(o){if(l.lock){Gn(e,t,n);return}if(u=ed(),a(l.session),l=c(),l.lock!==u){Gn(e,t,n);return}}let d=e.process(l.session);if(o&&(l=c(),l.lock!==u)){Gn(e,t,n);return}if(d&&(gn(d)?i(d):(Qi(d),o?a(d):s(d))),o&&!(d&&gn(d))){if(l=c(),l.lock!==u){Gn(e,t,n);return}s(l.session),d=l.session}(r=e.after)===null||r===void 0||r.call(e,d||l.session),Cs(t)}function Gn(e,t,n){we(()=>{ft(e,t,n+1)},Jl)}function Cs(e){Jn=void 0;const t=Sa.shift();t&&ft(t,e)}function ed(){return he()+Ta+Ie()}function td(e){const[,t]=e.split(Ta);return!t||ie(Number(t),Ie())>Zl}const Rs=ve;function nd(e){switch(e.sessionPersistence){case Sn.COOKIE:return Ss(e);case Sn.LOCAL_STORAGE:return As();case void 0:{let t=Ss(e);return!t&&e.allowFallbackToLocalStorage&&(t=As()),t}default:K.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}function rd(e,t){return e.type===Sn.COOKIE?Fu(t,e.cookieOptions):Vu(t)}function od(e,t,n,r,o=rd(e,t)){const s=new q,i=new q,a=new q,c=Wt(h,Rs);let u;g();const{throttled:l,cancel:d}=hr(()=>{ft({process:E=>{if(Xn(E))return;const O=m(E);return S(O),O},after:E=>{Ji(E)&&!I()&&w(E),u=E}},o)},Rs);function f(){ft({process:E=>I()?m(E):void 0},o)}function h(){const E=o.retrieveSession();gn(E)?ft({process:O=>gn(O)?dt(O,t):void 0,after:m},o):m(E)}function m(E){return gn(E)&&(E=dt(E,t)),I()&&(k(E)?T():(a.notify({previousState:u,newState:E}),u=E)),E}function g(){ft({process:E=>{if(Xn(E))return dt(E,t)},after:E=>{u=E}},o)}function S(E){if(Xn(E))return!1;const O=r(E[n]);E[n]=O,delete E.isExpired,O!==Yi&&!E.id&&(E.id=he(),E.created=String(Ne()))}function I(){return(u==null?void 0:u[n])!==void 0}function k(E){return u.id!==E.id||u[n]!==E[n]}function T(){u=dt(u,t),i.notify()}function w(E){u=E,s.notify()}function L(E){ft({process:O=>({...O,...E}),after:m},o)}return{expandOrRenewSession:l,expandSession:f,getSession:()=>u,renewObservable:s,expireObservable:i,sessionStateUpdateObservable:a,restartSession:g,expire:()=>{d(),o.expireSession(u),m(dt(u,t))},stop:()=>{mr(c)},updateSessionState:L}}const ho={GRANTED:"granted",NOT_GRANTED:"not-granted"};function sd(e){const t=new q;return{tryToInit(n){e||(e=n)},update(n){e=n,t.notify()},isGranted(){return e===ho.GRANTED},observable:t}}function Vo(e){const t=Tt(e);return t==="string"||t==="function"||e instanceof RegExp}function jo(e,t,n=!1){return e.some(r=>{try{if(typeof r=="function")return r(t);if(r instanceof RegExp)return r.test(t);if(typeof r=="string")return n?t.startsWith(r):r===t}catch(o){K.error(o)}return!1})}const va=["chrome-extension://","moz-extension://"];function Os(e){return va.some(t=>e.includes(t))}function id(e,t=""){return!Os(e)&&Os(t)}function ad(e=""){for(const t of va){const n=e.match(new RegExp(`${t}[^/]+`));if(n)return n[0]}}const xs="Running the Browser SDK in a Web extension content script is discouraged and will be forbidden in a future major release unless the `allowedTrackingOrigins` option is provided.",cd="SDK initialized on a non-allowed domain.";function ud(e,t=typeof location<"u"?location.origin:"",n=new Error().stack){const r=e.allowedTrackingOrigins;if(!r){if(id(t,n)){K.warn(xs);const s=ad(n);Yt(xs,{extensionUrl:s||"unknown"})}return!0}const o=jo(r,t);return o||K.error(cd),o}function Ho(e){return Go(e,location.href).href}function ld(e){try{return!!Go(e)}catch{return!1}}function dd(e){const t=Go(e).pathname;return t[0]==="/"?t:`/${t}`}function Go(e,t){const{URL:n}=fd();try{return t!==void 0?new n(e,t):new n(e)}catch(r){throw new Error(`Failed to construct URL: ${String(r)} ${Kt({url:e,base:t})}`)}}let Vr;function fd(){if(!Vr){let e,t;try{e=document.createElement("iframe"),e.style.display="none",document.body.appendChild(e),t=e.contentWindow}catch{t=window}Vr={URL:t.URL},e==null||e.remove()}return Vr}function pt(e,t,n){const r=pd(e,t);return{build(o,s){const i=md(e,t,o,s,n);return r(i)},trackType:t}}function pd(e,t){const n=`/api/v2/${t}`,r=e.proxy;if(typeof r=="string"){const s=Ho(r);return i=>`${s}?ddforward=${encodeURIComponent(`${n}?${i}`)}`}if(typeof r=="function")return s=>r({path:n,parameters:s});const o=Aa(t,e);return s=>`https://${o}${n}?${s}`}function Aa(e,t){const{site:n=ht,internalAnalyticsSubdomain:r}=t;if(e==="logs"&&t.usePciIntake&&n===ht)return _l;if(r&&n===ht)return`${r}.${ht}`;if(n===yl)return`http-intake.logs.${n}`;const o=n.split("."),s=o.pop();return`browser-intake-${o.join("-")}.${s}`}function md({clientToken:e,internalAnalyticsSubdomain:t},n,r,{retry:o,encoding:s},i=[]){const a=["ddsource=browser",`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.18.1")}`,"dd-evp-origin=browser",`dd-request-id=${he()}`].concat(i);return s&&a.push(`dd-evp-encoding=${s}`),n==="rum"&&(a.push(`batch_time=${Ie()}`,`_dd.api=${r}`),o&&a.push(`_dd.retry_count=${o.count}`,`_dd.retry_after=${o.lastFailureStatus}`)),t&&a.reverse(),a.join("&")}function hd(e){const t=e.site||ht,n=gd(e);return{replica:yd(e),site:t,...n}}function gd(e){return{logsEndpointBuilder:pt(e,"logs"),rumEndpointBuilder:pt(e,"rum"),profilingEndpointBuilder:pt(e,"profile"),sessionReplayEndpointBuilder:pt(e,"replay"),exposuresEndpointBuilder:pt(e,"exposures")}}function yd(e){if(!e.replica)return;const t={...e,site:ht,clientToken:e.replica.clientToken};return{logsEndpointBuilder:pt(t,"logs"),rumEndpointBuilder:pt(t,"rum",[`application.id=${e.replica.applicationId}`])}}function bd(e){return Tl.every(t=>e.includes(t))}const yn={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"},go={ALL:"all",SAMPLED:"sampled"};function jr(e,t){return e!=null&&typeof e!="string"?(K.error(`${t} must be defined as a string`),!1):!0}function Ed(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(K.error(`Site should be a valid Datadog site. ${ko} ${Lo}/getting_started/site/.`),!1):!0}function Pt(e,t){return e!==void 0&&!fu(e)?(K.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function _d(e){var t,n,r,o,s,i,a,c,u,l;if(!e||!e.clientToken){K.error("Client Token is not configured, we will not send any data.");return}if(e.allowedTrackingOrigins!==void 0&&!Array.isArray(e.allowedTrackingOrigins)){K.error("Allowed Tracking Origins must be an array");return}if(!(!Ed(e.site)||!Pt(e.sessionSampleRate,"Session")||!Pt(e.telemetrySampleRate,"Telemetry")||!Pt(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!Pt(e.telemetryUsageSampleRate,"Telemetry Usage")||!jr(e.version,"Version")||!jr(e.env,"Env")||!jr(e.service,"Service")||!ud(e))){if(e.trackingConsent!==void 0&&!rr(ho,e.trackingConsent)){K.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:e.beforeSend&&Mi(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:nd(e),sessionSampleRate:(t=e.sessionSampleRate)!==null&&t!==void 0?t:100,telemetrySampleRate:(n=e.telemetrySampleRate)!==null&&n!==void 0?n:20,telemetryConfigurationSampleRate:(r=e.telemetryConfigurationSampleRate)!==null&&r!==void 0?r:5,telemetryUsageSampleRate:(o=e.telemetryUsageSampleRate)!==null&&o!==void 0?o:5,service:(s=e.service)!==null&&s!==void 0?s:void 0,env:(i=e.env)!==null&&i!==void 0?i:void 0,version:(a=e.version)!==null&&a!==void 0?a:void 0,datacenter:(c=e.datacenter)!==null&&c!==void 0?c:void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:(u=e.trackingConsent)!==null&&u!==void 0?u:ho.GRANTED,trackAnonymousUser:(l=e.trackAnonymousUser)!==null&&l!==void 0?l:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,batchBytesLimit:16*En,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*ve,batchMessagesLimit:50,messageBytesLimit:256*En,...hd(e)}}}function Td(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)}}const Sd=200;function vd(e){const{env:t,service:n,version:r,datacenter:o}=e,s=[nn("sdk_version","6.18.1")];return t&&s.push(nn("env",t)),n&&s.push(nn("service",n)),r&&s.push(nn("version",r)),o&&s.push(nn("datacenter",o)),s}function nn(e,t){const n=t?`${e}:${t}`:e;return(n.length>Sd||wd(n))&&K.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${ko} ${Lo}/getting_started/tagging/#defining-tags`),Ad(n)}function Ad(e){return e.replace(/,/g,"_")}function wd(e){return Id()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function Id(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}function He(e,t,n,{computeHandlingStack:r}={}){let o=e[t];if(typeof o!="function")if(t in e&&t.startsWith("on"))o=X;else return{stop:X};let s=!1;const i=function(){if(s)return o.apply(this,arguments);const a=Array.from(arguments);let c;gt(n,null,[{target:this,parameters:a,onPostCall:l=>{c=l},handlingStack:r?sr("instrumented method"):void 0}]);const u=o.apply(this,a);return c&>(c,null,[u]),u};return e[t]=i,{stop:()=>{s=!0,e[t]===i&&(e[t]=o)}}}function Cd(){return new q(e=>{const t=(o,s)=>{const i=Fo({stackTrace:s,originalError:o,startClocks:fe(),nonErrorPrefix:"Uncaught",source:qt.SOURCE,handling:"unhandled"});e.notify(i)},{stop:n}=Rd(t),{stop:r}=Od(t);return()=>{n(),r()}})}function Rd(e){return He(We(),"onerror",({parameters:[t,n,r,o,s]})=>{let i;_t(s)||(i=il(t,n,r,o)),e(s??t,i)})}function Od(e){return He(We(),"onunhandledrejection",({parameters:[t]})=>{e(t.reason||"Empty reason")})}function xd(e){const t={version:"6.18.1",onReady(n){n()},...e};return Object.defineProperty(t,"_setDebug",{get(){return Tu},enumerable:!1}),t}function Ld(e,t,n){const r=e[t];r&&!r.q&&r.version&&K.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=n,r&&r.q&&r.q.forEach(o=>Mi(o,"onReady callback threw an error:")())}function wa(e,t){t.silentMultipleInit||K.error(`${e} is already initialized.`)}const An={intervention:"intervention",cspViolation:"csp_violation"};function kd(e,t){const n=[];t.includes(An.cspViolation)&&n.push(Md(e));const r=t.filter(o=>o!==An.cspViolation);return r.length&&n.push(Nd(r)),ji(...n)}function Nd(e){return new q(t=>{if(!window.ReportingObserver)return;const n=D((o,s)=>o.forEach(i=>t.notify(Dd(i)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function Md(e){return new q(t=>{const{stop:n}=se(e,document,"securitypolicyviolation",r=>{t.notify(Pd(r))});return n})}function Dd(e){const{type:t,body:n}=e;return Ia({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:Ca(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function Pd(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return Ia({type:e.effectiveDirective,message:`${An.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:Ca(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${Gi(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function Ia(e){return{startClocks:fe(),source:qt.REPORT,handling:"unhandled",...e}}function Ca(e,t,n,r,o){return n?xn({name:e,message:t,stack:[{func:"?",url:n,line:r??void 0,column:o??void 0}]}):void 0}function Ra(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}const Wn=1/0,Ud=Ce;let rn=null;const Qn=new Set;function Fd(){Qn.forEach(e=>e())}function Xt({expireDelay:e,maxEntries:t}){let n=[];rn||(rn=Wt(()=>Fd(),Ud));const r=()=>{const l=xe()-e;for(;n.length>0&&n[n.length-1].endTime{Ra(n,f)},close:h=>{f.endTime=h}};return t&&n.length>=t&&n.pop(),n.unshift(f),f}function s(l=Wn,d={returnInactive:!1}){for(const f of n)if(f.startTime<=l){if(d.returnInactive||l<=f.endTime)return f.value;break}}function i(l){const d=n[0];d&&d.endTime===Wn&&d.close(l)}function a(l=Wn,d=0){const f=Gt(l,d);return n.filter(h=>h.startTime<=f&&l<=h.endTime).map(h=>h.value)}function c(){n=[]}function u(){Qn.delete(r),Qn.size===0&&rn&&(mr(rn),rn=null)}return{add:o,find:s,closeActive:i,findAll:a,reset:c,stop:u}}const Bd="datadog-synthetics-public-id",$d="datadog-synthetics-result-id",Vd="datadog-synthetics-injects-rum";function Oa(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||tt(Vd))}function xa(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||tt(Bd);return typeof e=="string"?e:void 0}function La(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||tt($d);return typeof e=="string"?e:void 0}function ka(){return!!(xa()&&La())}const jd=Ce,Hd=Et;function Gd(e,t,n,r){const o=new q,s=new q,i=od(e.sessionStoreStrategyType,e,t,n),a=Xt({expireDelay:Hd});i.renewObservable.subscribe(()=>{a.add(c(),xe()),o.notify()}),i.expireObservable.subscribe(()=>{s.notify(),a.closeActive(xe())}),i.expandOrRenewSession(),a.add(c(),Ui().relative),r.observable.subscribe(()=>{r.isGranted()?i.expandOrRenewSession():i.expire()}),Wd(e,()=>{r.isGranted()&&i.expandOrRenewSession()}),Kd(e,()=>i.expandSession()),qd(e,()=>i.restartSession());function c(){const u=i.getSession();return u?{id:u.id,trackingType:u[t],isReplayForced:!!u.forcedReplay,anonymousId:u.anonymousId}:(zd().catch(()=>{}),{id:"invalid",trackingType:Yi,isReplayForced:!1,anonymousId:void 0})}return{findSession:(u,l)=>a.find(u,l),renewObservable:o,expireObservable:s,sessionStateUpdateObservable:i.sessionStateUpdateObservable,expire:i.expire,updateSessionState:i.updateSessionState}}function Wd(e,t){const{stop:n}=ot(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function Kd(e,t){const n=()=>{document.visibilityState==="visible"&&t()},{stop:r}=se(e,document,"visibilitychange",n);Wt(n,jd)}function qd(e,t){const{stop:n}=se(e,window,"resume",t,{capture:!0})}async function zd(){const e=ta();let t=[];"cookieStore"in window?t=await window.cookieStore.getAll("_dd_s"):t=document.cookie.split(/\s*;\s*/).filter(n=>n.startsWith("_dd_s")),Yt("Unexpected session state",{session:e,isSyntheticsTest:ka(),createdTimestamp:e==null?void 0:e.created,expireTimestamp:e==null?void 0:e.expire,cookie:{count:t.length,domain:Ki(),...t},currentDomain:`${window.location.protocol}//${window.location.hostname}`})}function Yd(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){const o=Bi(n);t+=o,e+=n,r&&r(o)},finish(n){n(this.finishSync())},finishSync(){const n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,n},estimateEncodedBytesCount(n){return n.length}}}class Xd{constructor(){this.callbacks={}}notify(t,n){const r=this.callbacks[t];r&&r.forEach(o=>o(n))}subscribe(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(r=>n!==r)}}}}function Hr(e,t,n){let r=0,o=!1;return{isLimitReached(){if(r===0&&we(()=>{r=0},Ce),r+=1,r<=t||o)return o=!1,!1;if(r===t+1){o=!0;try{n({message:`Reached max number of ${e}s by minute: ${t}`,source:qt.AGENT,startClocks:fe()})}finally{o=!1}}return!0}}}function Na(e,t,n){return document.readyState===t||document.readyState==="complete"?(n(),{stop:X}):se(e,window,t==="complete"?"load":"DOMContentLoaded",n,{once:!0})}let Gr;const Wo=new WeakMap;function Jd(e){return Gr||(Gr=Qd(e)),Gr}function Qd(e){return new q(t=>{const{stop:n}=He(XMLHttpRequest.prototype,"open",Zd),{stop:r}=He(XMLHttpRequest.prototype,"send",s=>{ef(s,e,t)},{computeHandlingStack:!0}),{stop:o}=He(XMLHttpRequest.prototype,"abort",tf);return()=>{n(),r(),o()}})}function Zd({target:e,parameters:[t,n]}){Wo.set(e,{state:"open",method:String(t).toUpperCase(),url:Ho(String(n))})}function ef({target:e,handlingStack:t},n,r){const o=Wo.get(e);if(!o)return;const s=o;s.state="start",s.startClocks=fe(),s.isAborted=!1,s.xhr=e,s.handlingStack=t;let i=!1;const{stop:a}=He(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(u(),a(),i)return;i=!0;const l=o;l.state="complete",l.duration=ie(s.startClocks.timeStamp,Ie()),l.status=e.status,r.notify(_n(l))},{stop:u}=se(n,e,"loadend",c);r.notify(s)}function tf({target:e}){const t=Wo.get(e);t&&(t.isAborted=!0)}let Wr;function Ma(){return Wr||(Wr=nf()),Wr}function nf(){return new q(e=>{if(!window.fetch)return;const{stop:t}=He(window,"fetch",n=>rf(n,e),{computeHandlingStack:!0});return t})}function rf({parameters:e,onPostCall:t,handlingStack:n},r){const[o,s]=e;let i=s&&s.method;i===void 0&&o instanceof Request&&(i=o.method);const a=i!==void 0?String(i).toUpperCase():"GET",c=o instanceof Request?o.url:Ho(String(o)),u=fe(),l={state:"start",init:s,input:o,method:a,startClocks:u,url:c,handlingStack:n};r.notify(l),e[0]=l.input,e[1]=l.init,t(d=>of(r,d,l))}function of(e,t,n){const r=n;function o(s){r.state="resolve",Object.assign(r,s),e.notify(r)}t.then(D(s=>{o({response:s,responseType:s.type,status:s.status,isAborted:!1})}),D(s=>{var i,a;o({status:0,isAborted:((a=(i=r.init)===null||i===void 0?void 0:i.signal)===null||a===void 0?void 0:a.aborted)||s instanceof DOMException&&s.code===DOMException.ABORT_ERR,error:s})}))}function sf(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback(D(e),t);return()=>window.cancelIdleCallback(n)}return cf(e)}const af=50;function cf(e){const t=Ne(),n=we(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,af-(Ne()-t))})},0);return()=>ke(n)}const uf=ve,lf=30;function df(){const e=[];function t(r){let o;if(r.didTimeout){const s=performance.now();o=()=>lf-(performance.now()-s)}else o=r.timeRemaining.bind(r);for(;o()>0&&e.length;)e.shift()();e.length&&n()}function n(){sf(t,{timeout:uf})}return{push(r){e.push(r)===1&&n()}}}let Kr={};function ff(e){const t=e.map(n=>(Kr[n]||(Kr[n]=pf(n)),Kr[n]));return ji(...t)}function pf(e){return new q(t=>{const n=Xe[e];return Xe[e]=(...r)=>{n.apply(console,r);const o=sr("console error");gt(()=>{t.notify(mf(r,e,o))})},()=>{Xe[e]=n}})}function mf(e,t,n){const r=e.map(o=>hf(o)).join(" ");if(t===fr.error){const o=e.find(_t),s=Fo({originalError:o,handlingStack:n,startClocks:fe(),source:qt.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return s.message=r,{api:t,message:r,handlingStack:n,error:s}}return{api:t,message:r,error:void 0,handlingStack:n}}function hf(e){return typeof e=="string"?ne(e):_t(e)?sa(On(e)):Kt(ne(e),void 0,2)}const gf=500;function yf(){const e=[];return{add:o=>{e.push(o)>gf&&e.splice(0,1)},remove:o=>{Ra(e,o)},drain:o=>{e.forEach(s=>s(o)),e.length=0}}}function bf(e){const t=Tt(e)==="object";return t||K.error("Unsupported context:",e),t}function qr(e,t,n){const r={...e};for(const[o,{required:s,type:i}]of Object.entries(t))i==="string"&&!Ls(r[o])&&(r[o]=String(r[o])),s&&Ls(r[o])&&K.warn(`The property ${o} of ${n} is required; context will not be sent to the intake.`);return r}function Ls(e){return e==null||e===""}function br(e="",{propertiesConfig:t={}}={}){let n={};const r=new q,o={getContext:()=>$o(n),setContext:s=>{bf(s)?n=ne(qr(s,t,e)):o.clearContext(),r.notify()},setContextProperty:(s,i)=>{n=ne(qr({...n,[s]:i},t,e)),r.notify()},removeContextProperty:s=>{delete n[s],qr(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return o}function ge(e,t,n,r){return D((...o)=>(r&&Ee({feature:r}),e()[t][n](...o)))}const Ef="_dd_c",_f=[];function Ko(e,t,n,r){const o=Tf(n,r);_f.push(se(e,window,"storage",({key:u})=>{o===u&&i()})),t.changeObservable.subscribe(a);const s=Ze(c(),t.getContext());bt(s)||t.setContext(s);function i(){t.setContext(c())}function a(){localStorage.setItem(o,JSON.stringify(t.getContext()))}function c(){const u=localStorage.getItem(o);return u?JSON.parse(u):{}}}function Tf(e,t){return`${Ef}_${e}_${t}`}function Sf(e,t,n){const r=Da();return t.storeContextsAcrossPages&&Ko(t,r,n,4),e.register(0,()=>{const o=r.getContext();return bt(o)||!o.id?Me:{account:o}}),r}function Da(){return br("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function vf(e,t,n,r){const o=Pa();return t.storeContextsAcrossPages&&Ko(t,o,n,2),e.register(0,()=>({context:o.getContext()})),o}function Pa(){return br("global context")}function Af(e,t,n,r){const o=Ua();return t.storeContextsAcrossPages&&Ko(t,o,r,1),e.register(0,({eventType:s,startTime:i})=>{const a=o.getContext(),c=n.findTrackedSession(i);return c&&c.anonymousId&&!a.anonymous_id&&t.trackAnonymousUser&&(a.anonymous_id=c.anonymousId),bt(a)?Me:{type:s,usr:a}}),e.register(1,({startTime:s})=>{var i;return{anonymous_id:(i=n.findTrackedSession(s))===null||i===void 0?void 0:i.anonymousId}}),o}function Ua(){return br("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}const ce={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},ye={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"};function wf(e,t,n){const r=e.getReader();let o=0;s();function s(){r.read().then(D(a=>{if(a.done){i();return}o+=a.value.length,o>n.bytesLimit?i():s()}),D(a=>t(a)))}function i(){r.cancel().catch(X),t(void 0,void 0,void 0)}}const _e={DOCUMENT:"document",XHR:"xhr",BEACON:"beacon",FETCH:"fetch",CSS:"css",JS:"js",IMAGE:"image",FONT:"font",MEDIA:"media",OTHER:"other"},Er={FETCH:_e.FETCH,XHR:_e.XHR},If=500;function Cf(e=Cd){const t=new Hi(If),n=e().subscribe(r=>{t.notify({type:0,error:r})});return{observable:t,stop:()=>{n.unsubscribe()}}}function Rf(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}const F={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",VITAL:"vital"},Fa={LONG_TASK:"long-task",LONG_ANIMATION_FRAME:"long-animation-frame"},Je={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change",BF_CACHE:"bf_cache"},qo={CLICK:"click",CUSTOM:"custom"},on={RAGE_CLICK:"rage_click",ERROR_CLICK:"error_click",DEAD_CLICK:"dead_click"},Ba={DURATION:"duration"};function Of(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function xf(e,t,n){function r(s){return!t.wasInPageStateDuringPeriod("frozen",s.startClocks.relative,s.duration)}function o(s){r(s)&&e.notify(12,kf(s))}return{addDurationVital:o,startDurationVital:(s,i={})=>$a(n,s,i),stopDurationVital:(s,i={})=>{Va(o,n,s,i)}}}function $a({vitalsByName:e,vitalsByReference:t},n,r={}){const o={name:n,startClocks:fe(),context:r.context,description:r.description},s={__dd_vital_reference:!0};return e.set(n,o),t.set(s,o),s}function Va(e,{vitalsByName:t,vitalsByReference:n},r,o={}){const s=typeof r=="string"?t.get(r):n.get(r);s&&(e(Lf(s,s.startClocks,o,fe())),typeof r=="string"?t.delete(r):n.delete(r))}function Lf(e,t,n,r){var o;return{name:e.name,type:Ba.DURATION,startClocks:t,duration:ie(t.timeStamp,r.timeStamp),context:Ze(e.context,n.context),description:(o=n.description)!==null&&o!==void 0?o:e.description}}function kf(e,t){const n={date:e.startClocks.timeStamp,vital:{id:he(),type:e.type,name:e.name,duration:P(e.duration),description:e.description},type:F.VITAL,context:e.context};return n._dd={vital:{computed_value:!0}},{rawRumEvent:n,startTime:e.startClocks.relative,duration:e.duration,domainContext:{}}}function ja(e,t,n){if(e)for(const r of e){const o=r[t];o&&o(n)}}const ks=new Map;function Nf(e,t){if(t===100)return!0;if(t===0)return!1;const n=ks.get(t);if(n&&e===n.sessionId)return n.decision;let r;return window.BigInt?r=Mf(BigInt(`0x${e.split("-")[4]}`),t):r=nt(t),ks.set(t,{sessionId:e,decision:r}),r}function Mf(e,t){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000"),o=e*n%r;return Number(o)<=t/100*Number(r)}function Df(){return Ga(64)}function Ha(){return Ga(63)}function Ga(e){const t=crypto.getRandomValues(new Uint32Array(2));return e===63&&(t[t.length-1]>>>=1),{toString(n=10){let r=t[1],o=t[0],s="";do{const i=r%n*4294967296+o;r=Math.floor(r/n),o=Math.floor(i/n),s=(i%n).toString(n)+s}while(r||o);return s}}}function xt(e){return e.toString(16).padStart(16,"0")}function Pf(e){const t=e;return Tt(t)==="object"&&Vo(t.match)&&Array.isArray(t.propagatorTypes)}function Uf(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function Ff(e,t,n,r){return{clearTracingIfNeeded:Uf,traceFetch:o=>Ns(e,o,t,n,r,s=>{var i;if(o.input instanceof Request&&!(!((i=o.init)===null||i===void 0)&&i.headers))o.input=new Request(o.input),Object.keys(s).forEach(a=>{o.input.headers.append(a,s[a])});else{o.init=_n(o.init);const a=[];o.init.headers instanceof Headers?o.init.headers.forEach((c,u)=>{a.push([u,c])}):Array.isArray(o.init.headers)?o.init.headers.forEach(c=>{a.push(c)}):o.init.headers&&Object.keys(o.init.headers).forEach(c=>{a.push([c,o.init.headers[c]])}),o.init.headers=a.concat(Po(s))}}),traceXhr:(o,s)=>Ns(e,o,t,n,r,i=>{Object.keys(i).forEach(a=>{s.setRequestHeader(a,i[a])})})}}function Ns(e,t,n,r,o,s){const i=n.findTrackedSession();if(!i)return;const a=e.allowedTracingUrls.find(l=>jo([l.match],t.url,!0));if(!a)return;const c=Nf(i.id,e.traceSampleRate);(c||e.traceContextInjection===go.ALL)&&(t.traceSampled=c,t.traceId=Df(),t.spanId=Ha(),s(Bf(t.traceId,t.spanId,t.traceSampled,i.id,a.propagatorTypes,r,o,e)))}function Bf(e,t,n,r,o,s,i,a){const c={};if(o.forEach(u=>{switch(u){case"datadog":{Object.assign(c,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":e.toString()});break}case"tracecontext":{Object.assign(c,{traceparent:`00-0000000000000000${xt(e)}-${xt(t)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break}case"b3":{Object.assign(c,{b3:`${xt(e)}-${xt(t)}-${n?"1":"0"}`});break}case"b3multi":{Object.assign(c,{"X-B3-TraceId":xt(e),"X-B3-SpanId":xt(t),"X-B3-Sampled":n?"1":"0"});break}}}),a.propagateTraceBaggage){const u={"session.id":r},l=s.getContext().id;typeof l=="string"&&(u["user.id"]=l);const d=i.getContext().id;typeof d=="string"&&(u["account.id"]=d);const f=Object.entries(u).map(([h,m])=>`${h}=${encodeURIComponent(m)}`).join(",");f&&(c.baggage=f)}return c}const Wa=["tracecontext","datadog"];function $f(e){var t,n,r,o,s,i,a;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&K.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){K.error("Application ID is not configured, no RUM data will be collected.");return}if(!Pt(e.sessionReplaySampleRate,"Session Replay")||!Pt(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){K.error("Excluded Activity Urls should be an array");return}const c=Vf(e);if(!c)return;const u=_d(e);if(!u)return;const l=(t=e.sessionReplaySampleRate)!==null&&t!==void 0?t:0;return{applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:l,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually!==void 0?!!e.startSessionReplayRecordingManually:l===0,traceSampleRate:(n=e.traceSampleRate)!==null&&n!==void 0?n:100,rulePsr:In(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:c,excludedActivityUrls:(r=e.excludedActivityUrls)!==null&&r!==void 0?r:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(!((o=e.trackUserInteractions)!==null&&o!==void 0)||o),trackViewsManually:!!e.trackViewsManually,trackResources:!!(!((s=e.trackResources)!==null&&s!==void 0)||s),trackLongTasks:!!(!((i=e.trackLongTasks)!==null&&i!==void 0)||i),trackBfcacheViews:!!e.trackBfcacheViews,subdomain:e.subdomain,defaultPrivacyLevel:rr(yn,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:yn.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,customerDataTelemetrySampleRate:1,initialViewMetricsTelemetrySampleRate:1,replayTelemetrySampleRate:1,traceContextInjection:rr(go,e.traceContextInjection)?e.traceContextInjection:go.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:(a=e.profilingSampleRate)!==null&&a!==void 0?a:0,propagateTraceBaggage:!!e.propagateTraceBaggage,...u}}function Vf(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){K.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){K.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(n=>{Vo(n)?t.push({match:n,propagatorTypes:Wa}):Pf(n)?t.push(n):K.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",n)}),t}function jf(e){const t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach(n=>{Vo(n)?Wa.forEach(r=>t.add(r)):Tt(n)==="object"&&Array.isArray(n.propagatorTypes)&&n.propagatorTypes.forEach(r=>t.add(r))}),Array.from(t)}function Hf(e){var t;const n=Td(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0,selected_tracing_propagators:jf(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:Array.isArray(e.excludedActivityUrls)&&e.excludedActivityUrls.length>0,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,plugins:(t=e.plugins)===null||t===void 0?void 0:t.map(r=>{var o;return{name:r.name,...(o=r.getConfigurationTelemetry)===null||o===void 0?void 0:o.call(r)}}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,...n}}const Gf="v1",Wf=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function Kf(e){const t=await Jf(e);if(!t.ok){K.error(t.error);return}return qf(e,t.value)}function qf(e,t){const n={...e};return Wf.forEach(r=>{r in t&&(n[r]=yo(t[r]))}),n}function yo(e){if(Array.isArray(e))return e.map(yo);if(zf(e)){if(Yf(e)){const t=e.rcSerializedType;switch(t){case"string":return e.value;case"regex":return Xf(e.value);default:K.error(`Unsupported remote configuration: "rcSerializedType": "${t}"`);return}}return $i(e,yo)}return e}function zf(e){return typeof e=="object"&&e!==null}function Yf(e){return"rcSerializedType"in e}function Xf(e){try{return new RegExp(e)}catch{K.error(`Invalid regex in the remote configuration: '${e}'`)}}async function Jf(e){let t;try{t=await fetch(Qf(e))}catch{t=void 0}if(!t||!t.ok)return{ok:!1,error:new Error("Error fetching the remote configuration.")};const n=await t.json();return n.rum?{ok:!0,value:n.rum}:{ok:!1,error:new Error("No remote configuration for RUM.")}}function Qf(e){return e.remoteConfigurationProxy?e.remoteConfigurationProxy:`https://sdk-configuration.${Aa("rum",e)}/${Gf}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function Zf({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t},n,r,o){const s=yf(),i=Pa();zr(i,ce.globalContext,s);const a=Ua();zr(a,ce.userContext,s);const c=Da();zr(c,ce.accountContext,s);let u,l,d,f;const h=n.observable.subscribe(g),m={};function g(){if(!d||!f||!n.isGranted())return;h.unsubscribe();let T;if(f.trackViewsManually){if(!u)return;s.remove(u.callback),T=u.options}const w=o(f,l,T);s.drain(w)}function S(T){const w=vn();if(w&&(T=ep(T)),d=T,zl(Hf(T)),f){wa("DD_RUM",T);return}const L=$f(T);if(L){if(!w&&!L.sessionStoreStrategyType){K.warn("No storage available for session. We will not send any data.");return}L.compressIntakeRequests&&!w&&t&&(l=t(L,"Datadog RUM",X),!l)||(f=L,Ma().subscribe(X),n.tryToInit(L.trackingConsent),g())}}const I=T=>{s.add(w=>w.addDurationVital(T))};return{init(T,w){if(!T){K.error("Missing configuration");return}ml(T.enableExperimentalFeatures),d=T,!(e&&Oa())&&(ja(T.plugins,"onInit",{initConfiguration:T,publicApi:w}),T.remoteConfigurationId?Kf(T).then(L=>{L&&S(L)}).catch(Mo):S(T))},get initConfiguration(){return d},getInternalContext:X,stopSession:X,addTiming(T,w=Ie()){s.add(L=>L.addTiming(T,w))},startView(T,w=fe()){const L=E=>{E.startView(T,w)};s.add(L),u||(u={options:T,callback:L},g())},setViewName(T){s.add(w=>w.setViewName(T))},setViewContext(T){s.add(w=>w.setViewContext(T))},setViewContextProperty(T,w){s.add(L=>L.setViewContextProperty(T,w))},getViewContext:()=>m,globalContext:i,userContext:a,accountContext:c,addAction(T){s.add(w=>w.addAction(T))},addError(T){s.add(w=>w.addError(T))},addFeatureFlagEvaluation(T,w){s.add(L=>L.addFeatureFlagEvaluation(T,w))},startDurationVital(T,w){return $a(r,T,w)},stopDurationVital(T,w){Va(I,r,T,w)},addDurationVital:I}}function ep(e){var t,n;return{...e,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:(t=e.defaultPrivacyLevel)!==null&&t!==void 0?t:(n=Ln())===null||n===void 0?void 0:n.getPrivacyLevel()}}function zr(e,t,n){e.changeObservable.subscribe(()=>{const r=e.getContext();n.add(o=>o[t].setContext(r))})}function tp(e,t,n,r={}){const o=sd(),s=Of(),i=Cf().observable;let a=Zf(r,o,s,(d,f,h)=>{const m=e(d,t,n,h,f&&r.createDeflateEncoder?g=>r.createDeflateEncoder(d,f,g):Yd,o,s,i,r.sdkName);return t.onRumStart(m.lifeCycle,d,m.session,m.viewHistory,f,m.telemetry),n.onRumStart(m.lifeCycle,m.hooks,d,m.session,m.viewHistory),a=np(a,m),ja(d.plugins,"onRumStart",{strategy:a,addEvent:m.addEvent}),m});const c=()=>a,u=D(d=>{const f=typeof d=="object"?d:{name:d};a.startView(f),Ee({feature:"start-view"})}),l=xd({init:D(d=>{a.init(d,l)}),setTrackingConsent:D(d=>{o.update(d),Ee({feature:"set-tracking-consent",tracking_consent:d})}),setViewName:D(d=>{a.setViewName(d),Ee({feature:"set-view-name"})}),setViewContext:D(d=>{a.setViewContext(d),Ee({feature:"set-view-context"})}),setViewContextProperty:D((d,f)=>{a.setViewContextProperty(d,f),Ee({feature:"set-view-context-property"})}),getViewContext:D(()=>(Ee({feature:"set-view-context-property"}),a.getViewContext())),getInternalContext:D(d=>a.getInternalContext(d)),getInitConfiguration:D(()=>$o(a.initConfiguration)),addAction:(d,f)=>{const h=sr("action");gt(()=>{a.addAction({name:ne(d),context:ne(f),startClocks:fe(),type:qo.CUSTOM,handlingStack:h}),Ee({feature:"add-action"})})},addError:(d,f)=>{const h=sr("error");gt(()=>{a.addError({error:d,handlingStack:h,context:ne(f),startClocks:fe()}),Ee({feature:"add-error"})})},addTiming:D((d,f)=>{a.addTiming(ne(d),f)}),setGlobalContext:ge(c,ce.globalContext,ye.setContext,"set-global-context"),getGlobalContext:ge(c,ce.globalContext,ye.getContext,"get-global-context"),setGlobalContextProperty:ge(c,ce.globalContext,ye.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:ge(c,ce.globalContext,ye.removeContextProperty,"remove-global-context-property"),clearGlobalContext:ge(c,ce.globalContext,ye.clearContext,"clear-global-context"),setUser:ge(c,ce.userContext,ye.setContext,"set-user"),getUser:ge(c,ce.userContext,ye.getContext,"get-user"),setUserProperty:ge(c,ce.userContext,ye.setContextProperty,"set-user-property"),removeUserProperty:ge(c,ce.userContext,ye.removeContextProperty,"remove-user-property"),clearUser:ge(c,ce.userContext,ye.clearContext,"clear-user"),setAccount:ge(c,ce.accountContext,ye.setContext,"set-account"),getAccount:ge(c,ce.accountContext,ye.getContext,"get-account"),setAccountProperty:ge(c,ce.accountContext,ye.setContextProperty,"set-account-property"),removeAccountProperty:ge(c,ce.accountContext,ye.removeContextProperty,"remove-account-property"),clearAccount:ge(c,ce.accountContext,ye.clearContext,"clear-account"),startView:u,stopSession:D(()=>{a.stopSession(),Ee({feature:"stop-session"})}),addFeatureFlagEvaluation:D((d,f)=>{a.addFeatureFlagEvaluation(ne(d),ne(f)),Ee({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:D(()=>t.getSessionReplayLink()),startSessionReplayRecording:D(d=>{t.start(d),Ee({feature:"start-session-replay-recording",force:d&&d.force})}),stopSessionReplayRecording:D(()=>t.stop()),addDurationVital:D((d,f)=>{Ee({feature:"add-duration-vital"}),a.addDurationVital({name:ne(d),type:Ba.DURATION,startClocks:mu(f.startTime),duration:f.duration,context:ne(f&&f.context),description:ne(f&&f.description)})}),startDurationVital:D((d,f)=>(Ee({feature:"start-duration-vital"}),a.startDurationVital(ne(d),{context:ne(f&&f.context),description:ne(f&&f.description)}))),stopDurationVital:D((d,f)=>{Ee({feature:"stop-duration-vital"}),a.stopDurationVital(typeof d=="string"?ne(d):d,{context:ne(f&&f.context),description:ne(f&&f.description)})})});return l}function np(e,t){return{init:n=>{wa("DD_RUM",n)},initConfiguration:e.initConfiguration,...t}}function rp(){const e=op();return new q(t=>{if(!e)return;const n=new e(D(r=>t.notify(r)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function op(){let e;const t=window;if(t.Zone&&(e=rt(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const n=new t.MutationObserver(X),r=rt(n,"originalInstance");e=r&&r.constructor}return e||(e=t.MutationObserver),e}function sp(){const e=new q,{stop:t}=He(window,"open",()=>e.notify());return{observable:e,stop:t}}function ip(e,t,n,r,o){return{get:s=>{const i=n.findView(s),a=o.findUrl(s),c=t.findTrackedSession(s);if(c&&i&&a){const u=r.findActionId(s);return{application_id:e,session_id:c.id,user_action:u?{id:u}:void 0,view:{id:i.id,name:i.name,referrer:a.referrer,url:a.url}}}}}}const ap=Xd,cp=Et;function up(e){const t=Xt({expireDelay:cp});e.subscribe(1,r=>{t.add(n(r),r.startClocks.relative)}),e.subscribe(6,({endClocks:r})=>{t.closeActive(r.relative)}),e.subscribe(3,r=>{const o=t.find(r.startClocks.relative);o&&(r.name&&(o.name=r.name),r.context&&(o.context=r.context),o.sessionIsActive=r.sessionIsActive)}),e.subscribe(10,()=>{t.reset()});function n(r){return{service:r.service,version:r.version,context:r.context,id:r.id,name:r.name,startClocks:r.startClocks}}return{findView:r=>t.find(r),stop:()=>{t.stop()}}}const Ka="initial_document",lp=[[_e.DOCUMENT,e=>Ka===e],[_e.XHR,e=>e==="xmlhttprequest"],[_e.FETCH,e=>e==="fetch"],[_e.BEACON,e=>e==="beacon"],[_e.CSS,(e,t)=>/\.css$/i.test(t)],[_e.JS,(e,t)=>/\.js$/i.test(t)],[_e.IMAGE,(e,t)=>["image","img","icon"].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[_e.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[_e.MEDIA,(e,t)=>["audio","video"].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function dp(e){const t=e.name;if(!ld(t))return Yt(`Failed to construct URL for "${e.name}"`),_e.OTHER;const n=dd(t);for(const[r,o]of lp)if(o(e.initiatorType,n))return r;return _e.OTHER}function Ms(...e){for(let t=1;te[t])return!1;return!0}function qa(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function fp(e){const{duration:t,startTime:n,responseEnd:r}=e;return t===0&&n=0}function Ya(e){const t=Ms(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=mp(e)?Ms(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function mp(e){return e.redirectEnd>e.startTime}function lt(e,t,n){if(e<=t&&t<=n)return{duration:P(ie(t,n)),start:P(ie(e,t))}}function hp(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function gp(e){return e.deliveryType===""?"other":e.deliveryType}function yp(e){if(e.startTime{const s=o;if(zo(s.url))switch(s.state){case"start":n.traceXhr(s,s.xhr),s.requestIndex=Xa(),e.notify(7,{requestIndex:s.requestIndex,url:s.url});break;case"complete":n.clearTracingIfNeeded(s),e.notify(8,{duration:s.duration,method:s.method,requestIndex:s.requestIndex,spanId:s.spanId,startClocks:s.startClocks,status:s.status,traceId:s.traceId,traceSampled:s.traceSampled,type:Er.XHR,url:s.url,xhr:s.xhr,isAborted:s.isAborted,handlingStack:s.handlingStack});break}});return{stop:()=>r.unsubscribe()}}function vp(e,t){const n=Ma().subscribe(r=>{const o=r;if(zo(o.url))switch(o.state){case"start":t.traceFetch(o),o.requestIndex=Xa(),e.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"resolve":Ap(o,s=>{t.clearTracingIfNeeded(o),e.notify(8,{duration:s,method:o.method,requestIndex:o.requestIndex,responseType:o.responseType,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:Er.FETCH,url:o.url,response:o.response,init:o.init,input:o.input,isAborted:o.isAborted,handlingStack:o.handlingStack})});break}});return{stop:()=>n.unsubscribe()}}function Xa(){const e=Ds;return Ds+=1,e}function Ap(e,t){const n=e.response&&Al(e.response);!n||!n.body?t(ie(e.startClocks.timeStamp,Ie())):wf(n.body,()=>{t(ie(e.startClocks.timeStamp,Ie()))},{bytesLimit:Number.POSITIVE_INFINITY})}function Ja(e){return In(e)&&e<0?void 0:e}function Qa({lifeCycle:e,isChildEvent:t,onChange:n=X}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=e.subscribe(13,s=>{var i;if(!(s.type==="view"||s.type==="vital"||!t(s)))switch(s.type){case F.ERROR:r.errorCount+=1,n();break;case F.ACTION:r.actionCount+=1,s.action.frustration&&(r.frustrationCount+=s.action.frustration.type.length),n();break;case F.LONG_TASK:r.longTaskCount+=1,n();break;case F.RESOURCE:!((i=s._dd)===null||i===void 0)&&i.discarded||(r.resourceCount+=1,n());break}});return{stop:()=>{o.unsubscribe()},eventCounts:r}}function wp(e,t){const n=Ne();let r=!1;const{stop:o}=ot(e,window,["click","mousedown","keydown","touchstart","pointerdown"],a=>{if(!a.cancelable)return;const c={entryType:"first-input",processingStart:xe(),processingEnd:xe(),startTime:a.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};a.type==="pointerdown"?s(e,c):i(c)},{passive:!0,capture:!0});return{stop:o};function s(a,c){ot(a,window,["pointerup","pointercancel"],u=>{u.type==="pointerup"&&i(c)},{once:!0})}function i(a){if(!r){r=!0,o();const c=a.processingStart-a.startTime;c>=0&&c{if(!window.PerformanceObserver)return;const r=c=>{const u=Rp(c);u.length>0&&n.notify(u)};let o,s=!0;const i=new PerformanceObserver(D(c=>{s?o=we(()=>r(c.getEntries())):r(c.getEntries())}));try{i.observe(t)}catch{if([z.RESOURCE,z.NAVIGATION,z.LONG_TASK,z.PAINT].includes(t.type)){t.buffered&&(o=we(()=>r(performance.getEntriesByType(t.type))));try{i.observe({entryTypes:[t.type]})}catch{return}}}s=!1,Ip(e);let a;return!St(z.FIRST_INPUT)&&t.type===z.FIRST_INPUT&&({stop:a}=wp(e,c=>{r([c])})),()=>{i.disconnect(),a&&a(),ke(o)}})}let sn;function Ip(e){return!sn&&Cp()&&"addEventListener"in performance&&(sn=se(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{sn==null||sn.stop()}}function Cp(){return window.performance!==void 0&&"getEntries"in performance}function St(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function Rp(e){return e.filter(t=>!Op(t))}function Op(e){return e.entryType===z.RESOURCE&&(!zo(e.name)||!za(e))}function Za(e){return e.nodeType===Node.TEXT_NODE}function xp(e){return e.nodeType===Node.COMMENT_NODE}function it(e){return e.nodeType===Node.ELEMENT_NODE}function Lp(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&it(t.host)}function kp(e){return Lp(e)?e.host:e.parentNode}const ec=100,Np=100,Ps="data-dd-excluded-activity-mutations";function Yo(e,t,n,r,o,s){const i=Dp(e,t,n,r);return Mp(i,o,s)}function Mp(e,t,n){let r,o=!1;const s=we(D(()=>u({hadActivity:!1})),ec),i=n!==void 0?we(D(()=>u({hadActivity:!0,end:Ie()})),n):void 0,a=e.subscribe(({isBusy:l})=>{ke(s),ke(r);const d=Ie();l||(r=we(D(()=>u({hadActivity:!0,end:d})),Np))}),c=()=>{o=!0,ke(s),ke(r),ke(i),a.unsubscribe()};function u(l){o||(c(),t(l))}return{stop:c}}function Dp(e,t,n,r){return new q(o=>{const s=[];let i,a=0;return s.push(t.subscribe(u=>{u.every(Pp)||c()}),n.subscribe(c),Ge(r,{type:z.RESOURCE}).subscribe(u=>{u.some(l=>!Yr(r,l.name))&&c()}),e.subscribe(7,u=>{Yr(r,u.url)||(i===void 0&&(i=u.requestIndex),a+=1,c())}),e.subscribe(8,u=>{Yr(r,u.url)||i===void 0||u.requestIndex{s.forEach(u=>u.unsubscribe())};function c(){o.notify({isBusy:a>0})}})}function Yr(e,t){return jo(e.excludedActivityUrls,t)}function Pp(e){const t=e.type==="characterData"?e.target.parentElement:e.target;return!!(t&&it(t)&&t.matches(`[${Ps}], [${Ps}] *`))}const Y={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:yn.ALLOW,MASK:yn.MASK,MASK_USER_INPUT:yn.MASK_USER_INPUT},Up="data-dd-privacy",Fp="dd-privacy-",Bp={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function tc(e,t,n){const r=kp(e),o=r?tc(r,t):t,s=nc(e);return $p(s,o)}function $p(e,t){switch(t){case Y.HIDDEN:case Y.IGNORE:return t}switch(e){case Y.ALLOW:case Y.MASK:case Y.MASK_USER_INPUT:case Y.HIDDEN:case Y.IGNORE:return e;default:return t}}function nc(e){if(it(e)){if(e.tagName==="BASE")return Y.ALLOW;if(e.tagName==="INPUT"){const t=e;if(t.type==="password"||t.type==="email"||t.type==="tel"||t.type==="hidden")return Y.MASK;const n=t.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return Y.MASK}if(e.matches(Ut(Y.HIDDEN)))return Y.HIDDEN;if(e.matches(Ut(Y.MASK)))return Y.MASK;if(e.matches(Ut(Y.MASK_USER_INPUT)))return Y.MASK_USER_INPUT;if(e.matches(Ut(Y.ALLOW)))return Y.ALLOW;if(jp(e))return Y.IGNORE}}function Vp(e,t){switch(t){case Y.MASK:case Y.HIDDEN:case Y.IGNORE:return!0;case Y.MASK_USER_INPUT:return Za(e)?Us(e.parentNode):Us(e);default:return!1}}function Us(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!!Bp[t.tagName]}function jp(e){if(e.nodeName==="SCRIPT")return!0;if(e.nodeName==="LINK"){const n=t("rel");return/preload|prefetch/i.test(n)&&t("as")==="script"||n==="shortcut icon"||n==="icon"}if(e.nodeName==="META"){const n=t("name"),r=t("rel"),o=t("property");return/^msapplication-tile(image|color)$/.test(n)||n==="application-name"||r==="icon"||r==="apple-touch-icon"||r==="shortcut icon"||n==="keywords"||n==="description"||/^(og|twitter|fb):/.test(o)||/^(og|twitter):/.test(n)||n==="pinterest"||n==="robots"||n==="googlebot"||n==="bingbot"||e.hasAttribute("http-equiv")||n==="author"||n==="generator"||n==="framework"||n==="publisher"||n==="progid"||/^article:/.test(o)||/^product:/.test(o)||n==="google-site-verification"||n==="yandex-verification"||n==="csrf-token"||n==="p:domain_verify"||n==="verify-v1"||n==="verification"||n==="shopify-checkout-api-token"}function t(n){return(e.getAttribute(n)||"").toLowerCase()}return!1}function Ut(e){return`[${Up}="${e}"], .${Fp}${e}`}const _r="data-dd-action-name",Hp="Masked Element";function Gp(e,{enablePrivacyForActionName:t,actionNameAttribute:n},r=Y.ALLOW){const o=Fs(e,_r)||n&&Fs(e,n);return o?{name:o,nameSource:"custom_attribute"}:r===Y.MASK?{name:Hp,nameSource:"mask_placeholder"}:Bs(e,n,Wp,t)||Bs(e,n,Kp,t)||{name:"",nameSource:"blank"}}function Fs(e,t){const n=e.closest(`[${t}]`);if(!n)return;const r=n.getAttribute(t);return oc(rc(r.trim()))}const Wp=[(e,t,n)=>{if("labels"in e&&e.labels&&e.labels.length>0)return Zn(e.labels[0],t,n)},e=>{if(e.nodeName==="INPUT"){const t=e,n=t.getAttribute("type");if(n==="button"||n==="submit"||n==="reset")return{name:t.value,nameSource:"text_content"}}},(e,t,n)=>{if(e.nodeName==="BUTTON"||e.nodeName==="LABEL"||e.getAttribute("role")==="button")return Zn(e,t,n)},e=>an(e,"aria-label"),(e,t,n)=>{const r=e.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(o=>zp(e,o)).filter(o=>!!o).map(o=>sc(o,t,n)).join(" "),nameSource:"text_content"}},e=>an(e,"alt"),e=>an(e,"name"),e=>an(e,"title"),e=>an(e,"placeholder"),(e,t,n)=>{if("options"in e&&e.options.length>0)return Zn(e.options[0],t,n)}],Kp=[(e,t,n)=>Zn(e,t,n)],qp=10;function Bs(e,t,n,r){let o=e,s=0;for(;s<=qp&&o&&o.nodeName!=="BODY"&&o.nodeName!=="HTML"&&o.nodeName!=="HEAD";){for(const i of n){const a=i(o,t,r);if(a){const{name:c,nameSource:u}=a,l=c&&c.trim();if(l)return{name:oc(rc(l)),nameSource:u}}}if(o.nodeName==="FORM")break;o=o.parentElement,s+=1}}function rc(e){return e.replace(/\s+/g," ")}function oc(e){return e.length>100?`${Gi(e,100)} [...]`:e}function zp(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function an(e,t){return{name:e.getAttribute(t)||"",nameSource:"standard_attribute"}}function Zn(e,t,n){return{name:sc(e,t,n)||"",nameSource:"text_content"}}function sc(e,t,n){if(!e.isContentEditable){if(yr(yt.USE_TREE_WALKER_FOR_ACTION_NAME))return Yp(e,t,n);if("innerText"in e){let r=e.innerText;const o=s=>{const i=e.querySelectorAll(s);for(let a=0;a0&&(r=r.replace(u,""))}}};return o(`[${_r}]`),t&&o(`[${t}]`),n&&o(`${Ut(Y.HIDDEN)}, ${Ut(Y.MASK)}`),r}return e.textContent}}function Yp(e,t,n){const r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,s);let o="";for(;r.nextNode();){const i=r.currentNode;if(it(i)){(i.nodeName==="BR"||i.nodeName==="P"||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(i).display))&&(o+=" ");continue}o+=i.textContent||""}return o.replace(/\s+/g," ").trim();function s(i){if(it(i)){const a=nc(i);if(i.hasAttribute(_r)||t&&i.hasAttribute(t)||n&&a&&Vp(i,a))return NodeFilter.FILTER_REJECT;const c=getComputedStyle(i);if(c.visibility!=="visible"||c.display==="none"||c.contentVisibility&&c.contentVisibility!=="visible")return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}const Xp=[_r,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],Jp=[ac,Zp],Qp=[ac,em,tm];function kn(e,t){if(!e.isConnected)return;let n,r=e;for(;r&&r.nodeName!=="HTML";){const o=$s(r,Jp,rm,t,n);if(o)return o;n=$s(r,Qp,om,t,n)||Tr(nm(r),n),r=r.parentElement}return n}function ic(e){return/[0-9]/.test(e)}function Zp(e){if(e.id&&!ic(e.id))return`#${CSS.escape(e.id)}`}function em(e){if(e.tagName==="BODY")return;const t=e.classList;for(let n=0;ni.matches(t);else{const i=Tr(`${t}:scope`,n);r=a=>a.querySelector(i)!==null}let s=e.parentElement.firstElementChild;for(;s;){if(s!==e&&r(s))return!1;s=s.nextElementSibling}return!0}function Tr(e,t){return t?`${e}>${t}`:e}const cc=ve,sm=100;function im(e,t){const n=[];let r=0,o;s(e);function s(c){c.stopObservable.subscribe(i),n.push(c),ke(o),o=we(a,cc)}function i(){r===1&&n.every(c=>c.isStopped())&&(r=2,t(n))}function a(){ke(o),r===0&&(r=1,i())}return{tryAppend:c=>r!==0?!1:n.length>0&&!am(n[n.length-1].event,c.event)?(a(),!1):(s(c),!0),stop:()=>{a()}}}function am(e,t){return e.target===t.target&&cm(e,t)<=sm&&e.timeStamp-t.timeStamp<=cc}function cm(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function um(e,{onPointerDown:t,onPointerUp:n}){let r,o={selection:!1,input:!1,scroll:!1},s;const i=[se(e,window,"pointerdown",a=>{js(a)&&(r=Vs(),o={selection:!1,input:!1,scroll:!1},s=t(a))},{capture:!0}),se(e,window,"selectionchange",()=>{(!r||!Vs())&&(o.selection=!0)},{capture:!0}),se(e,window,"scroll",()=>{o.scroll=!0},{capture:!0,passive:!0}),se(e,window,"pointerup",a=>{if(js(a)&&s){const c=o;n(s,a,()=>c),s=void 0}},{capture:!0}),se(e,window,"input",()=>{o.input=!0},{capture:!0})];return{stop:()=>{i.forEach(a=>a.stop())}}}function Vs(){const e=window.getSelection();return!e||e.isCollapsed}function js(e){return e.target instanceof Element&&e.isPrimary!==!1}const Hs=3;function lm(e,t){if(dm(e))return t.addFrustration(on.RAGE_CLICK),e.some(Gs)&&t.addFrustration(on.DEAD_CLICK),t.hasError&&t.addFrustration(on.ERROR_CLICK),{isRage:!0};const n=e.some(r=>r.getUserActivity().selection);return e.forEach(r=>{r.hasError&&r.addFrustration(on.ERROR_CLICK),Gs(r)&&!n&&r.addFrustration(on.DEAD_CLICK)}),{isRage:!1}}function dm(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t{ie(r,xe())>uc&&bn.delete(r)})}const mm=5*Ce;function hm(e,t,n,r){const o=Xt({expireDelay:mm}),s=new q;let i;e.subscribe(10,()=>{o.reset()}),e.subscribe(5,l),e.subscribe(11,d=>{d.reason===Ft.UNLOADING&&l()});const{stop:a}=um(r,{onPointerDown:d=>gm(r,e,t,d,n),onPointerUp:({clickActionBase:d,hadActivityOnPointerDown:f},h,m)=>{ym(r,e,t,n,o,s,u,d,h,m,f)}});return{stop:()=>{l(),s.notify(),a()},actionContexts:{findActionId:d=>o.findAll(d)}};function u(d){if(!i||!i.tryAppend(d)){const f=d.clone();i=im(d,h=>{Em(h,f)})}}function l(){i&&i.stop()}}function gm(e,t,n,r,o){const s=e.enablePrivacyForActionName?tc(r.target,e.defaultPrivacyLevel):Y.ALLOW;if(s===Y.HIDDEN)return;const i=bm(r,s,e);let a=!1;return Yo(t,n,o,e,c=>{a=c.hadActivity},ec),{clickActionBase:i,hadActivityOnPointerDown:()=>a}}function ym(e,t,n,r,o,s,i,a,c,u,l){var d;const f=dc(t,o,u,a,c);i(f);const h=(d=a==null?void 0:a.target)===null||d===void 0?void 0:d.selector;h&&lc(c.timeStamp,h);const{stop:m}=Yo(t,n,r,e,I=>{I.hadActivity&&I.end{f.stop(I.timeStamp)}),S=s.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{g.unsubscribe(),m(),S.unsubscribe()})}function bm(e,t,n){const r=e.target.getBoundingClientRect(),o=kn(e.target,n.actionNameAttribute);o&&lc(e.timeStamp,o);const s=Gp(e.target,n,t);return{type:qo.CLICK,target:{width:Math.round(r.width),height:Math.round(r.height),selector:o},position:{x:Math.round(e.clientX-r.left),y:Math.round(e.clientY-r.top)},name:s.name,nameSource:s.nameSource}}function dc(e,t,n,r,o){const s=he(),i=fe(),a=t.add(s,i.relative),c=Qa({lifeCycle:e,isChildEvent:m=>m.action!==void 0&&(Array.isArray(m.action.id)?m.action.id.includes(s):m.action.id===s)});let u=0,l;const d=[],f=new q;function h(m){u===0&&(l=m,u=1,l?a.close(No(l)):a.remove(),c.stop(),f.notify())}return{event:o,stop:h,stopObservable:f,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return l!==void 0},getUserActivity:n,addFrustration:m=>{d.push(m)},startClocks:i,isStopped:()=>u===1||u===2,clone:()=>dc(e,t,n,r,o),validate:m=>{if(h(),u!==1)return;const{resourceCount:g,errorCount:S,longTaskCount:I}=c.eventCounts,k={duration:l&&ie(i.timeStamp,l),startClocks:i,id:s,frustrationTypes:d,counts:{resourceCount:g,errorCount:S,longTaskCount:I},events:m??[o],event:o,...r};e.notify(0,k),u=2},discard:()=>{h(),u=2}}}function Em(e,t){const{isRage:n}=lm(e,t);n?(e.forEach(r=>r.discard()),t.stop(Ie()),t.validate(e.map(r=>r.event))):(t.discard(),e.forEach(r=>r.validate()))}function _m(e,t,n,r,o){e.subscribe(0,a=>e.notify(12,Ws(a))),t.register(0,({startTime:a,eventType:c})=>{if(c!==F.ERROR&&c!==F.RESOURCE&&c!==F.LONG_TASK)return Me;const u=s.findActionId(a);return u?{type:c,action:{id:u}}:Me}),t.register(1,({startTime:a})=>({action:{id:s.findActionId(a)}}));let s={findActionId:X},i=X;return o.trackUserInteractions&&({actionContexts:s,stop:i}=hm(e,n,r,o)),{addAction:a=>{e.notify(12,Ws(a))},actionContexts:s,stop:i}}function Ws(e){const t=Xr(e)?{action:{id:e.id,loading_time:Ja(P(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},n=Ze({action:{id:he(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:F.ACTION},t),r=Xr(e)?e.duration:void 0,o=Xr(e)?{events:e.events}:{handlingStack:e.handlingStack};return{rawRumEvent:n,duration:r,startTime:e.startClocks.relative,domainContext:o}}function Xr(e){return e.type!==qo.CUSTOM}function Tm(e){const t=ff([fr.error]).subscribe(n=>e.notify(n.error));return{stop:()=>{t.unsubscribe()}}}function Sm(e,t){const n=kd(e,[An.cspViolation,An.intervention]).subscribe(r=>t.notify(r));return{stop:()=>{n.unsubscribe()}}}function vm(e,t,n){const r=new q;return n.subscribe(o=>{o.type===0&&r.notify(o.error)}),Tm(r),Sm(t,r),r.subscribe(o=>e.notify(14,{error:o})),Am(e)}function Am(e){return e.subscribe(14,({error:t})=>{e.notify(12,wm(t))}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:o,context:s})=>{const i=Fo({originalError:t,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:"Provided",source:qt.CUSTOM,handling:"handled"});i.context=Ze(i.context,s),e.notify(14,{error:i})}}}function wm(e){const t={date:e.startClocks.timeStamp,error:{id:he(),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:F.ERROR,context:e.context},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startTime:e.startClocks.relative,domainContext:n}}const Ks=new WeakSet;function Im(e){if(!performance||!("getEntriesByName"in performance))return;const t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;const n=t.filter(r=>!Ks.has(r)).filter(r=>za(r)&&Ya(r)).filter(r=>Cm(r,e.startClocks.relative,fc({startTime:e.startClocks.relative,duration:e.duration})));if(n.length===1)return Ks.add(n[0]),n[0].toJSON()}function fc(e){return Gt(e.startTime,e.duration)}function Cm(e,t,n){return e.startTime>=t-1&&fc(e)<=Gt(n,1)}const Rm=2*Ce;function Om(e){const t=xm(e)||Lm(e);if(!(!t||t.traceTime<=Ne()-Rm))return t.traceId}function xm(e){const t=e.querySelector("meta[name=dd-trace-id]"),n=e.querySelector("meta[name=dd-trace-time]");return pc(t&&t.content,n&&n.content)}function Lm(e){const t=km(e);if(t)return pc(Tn(t,"trace-id"),Tn(t,"trace-time"))}function pc(e,t){const n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function km(e){for(let t=0;t=0;t-=1){const n=e.body.childNodes[t],r=qs(n);if(r)return r;if(!Za(n))break}}function qs(e){if(e&&xp(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function mc(){if(St(z.NAVIGATION)){const n=performance.getEntriesByType(z.NAVIGATION)[0];if(n)return n}const e=Nm(),t={entryType:z.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function Nm(){const e={},t=performance.timing;for(const n in t)if(In(t[n])){const r=n,o=t[r];e[r]=o===0?0:No(o)}return e}function Mm(e,t,n=mc){Na(e,"interactive",()=>{const r=n(),o=Object.assign(r.toJSON(),{entryType:z.RESOURCE,initiatorType:Ka,duration:r.responseEnd,traceId:Om(document),toJSON:()=>({...o,toJSON:void 0})});t(o)})}const Dm=1e3;function Pm(e){const t=new Set,n=e.subscribe(8,r=>{t.add(r),t.size>Dm&&(Yt("Too many requests"),t.delete(t.values().next().value))});return{getMatchingRequest(r){let o=1/0,s;for(const i of t){const a=r.startTime-i.startClocks.relative;0<=a&&a{c(()=>Fm(u,t,n))});const a=Ge(t,{type:z.RESOURCE,buffered:!0}).subscribe(u=>{for(const l of u)(i||!qa(l))&&c(()=>zs(l,t,n,s))});o(t,u=>{c(()=>zs(u,t,n,s))});function c(u){r.push(()=>{const l=u();l&&e.notify(12,l)})}return{stop:()=>{a.unsubscribe()}}}function Fm(e,t,n){const r=Im(e);return hc(r,e,n,t)}function zs(e,t,n,r){const o=qa(e)&&r?r.getMatchingRequest(e):void 0;return hc(e,o,n,t)}function hc(e,t,n,r){if(!e&&!t)return;const o=t?Vm(t,r):jm(e,r);if(!r.trackResources&&!o)return;const s=e?pr(e.startTime):t.startClocks,i=e?fp(e):Hm(n,s,t.duration),a=Ze({date:s.timeStamp,resource:{id:he(),duration:P(i),type:t?t.type===Er.XHR?_e.XHR:_e.FETCH:dp(e),method:t?t.method:void 0,status_code:t?t.status:Gm(e.responseStatus),url:t?_p(t.url):e.name,protocol:e&&hp(e),delivery_type:e&&gp(e)},type:F.RESOURCE,_dd:{discarded:!r.trackResources}},o,e&&$m(e));return{startTime:s.relative,duration:i,rawRumEvent:a,domainContext:Bm(e,t)}}function Bm(e,t){if(t){const n={performanceEntry:e,isAborted:t.isAborted,handlingStack:t.handlingStack};return t.type===Er.XHR?{xhr:t.xhr,...n}:{requestInput:t.input,requestInit:t.init,response:t.response,error:t.error,...n}}return{performanceEntry:e}}function $m(e){const{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...yp(e),...pp(e)}}}function Vm(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 jm(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Ha().toString(),rule_psr:t.rulePsr}}}function Hm(e,t,n){return e.wasInPageStateDuringPeriod("frozen",t.relative,n)?void 0:n}function Gm(e){return e===0?void 0:e}function Wm(e,t,n){const{stop:r,eventCounts:o}=Qa({lifeCycle:e,isChildEvent:s=>s.view.id===t,onChange:n});return{stop:r,eventCounts:o}}const Km=10*Ce;function qm(e,t,n){return{stop:Ge(e,{type:z.PAINT,buffered:!0}).subscribe(o=>{const s=o.find(i=>i.name==="first-contentful-paint"&&i.startTime{requestAnimationFrame(()=>{t(ie(e,xe()))})})}function Ym(e,t,n){const r=Ge(e,{type:z.FIRST_INPUT,buffered:!0}).subscribe(o=>{const s=o.find(i=>i.startTime=0?i:0,time:s.startTime,targetSelector:a})}});return{stop:()=>{r.unsubscribe()}}}function Xm(e,t,n=mc){return Zm(e,()=>{const r=n();Qm(r)||t(Jm(r))})}function Jm(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=xe()?e.responseStart:void 0}}function Qm(e){return e.loadEventEnd<=0}function Zm(e,t){let n;const{stop:r}=Na(e,"complete",()=>{n=we(()=>t())});return{stop:()=>{r(),ke(n)}}}const eh=10*Ce;function th(e,t,n,r){let o=1/0;const{stop:s}=ot(e,n,["pointerdown","keydown"],c=>{o=c.timeStamp},{capture:!0,once:!0});let i=0;const a=Ge(e,{type:z.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(c=>{const u=Cu(c,l=>l.entryType===z.LARGEST_CONTENTFUL_PAINT&&l.startTimei);if(u){let l;u.element&&(l=kn(u.element,e.actionNameAttribute)),r({value:u.startTime,targetSelector:l,resourceUrl:nh(u)}),i=u.size}});return{stop:()=>{s(),a.unsubscribe()}}}function nh(e){return e.url===""?void 0:e.url}function gc(e,t,n=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:X};if(St(z.VISIBILITY_STATE)){const s=performance.getEntriesByType(z.VISIBILITY_STATE).filter(i=>i.name==="hidden").find(i=>i.startTime>=t.relative);if(s)return{timeStamp:s.startTime,stop:X}}let r=1/0;const{stop:o}=ot(e,n,["pagehide","visibilitychange"],s=>{(s.type==="pagehide"||document.visibilityState==="hidden")&&(r=s.timeStamp,o())},{capture:!0});return{get timeStamp(){return r},stop:o}}function rh(e,t,n,r){const o={},{stop:s}=Xm(e,d=>{n(d.loadEvent),o.navigationTimings=d,r()}),i=gc(e,t),{stop:a}=qm(e,i,d=>{o.firstContentfulPaint=d,r()}),{stop:c}=th(e,i,window,d=>{o.largestContentfulPaint=d,r()}),{stop:u}=Ym(e,i,d=>{o.firstInput=d,r()});function l(){s(),a(),c(),u(),i.stop()}return{stop:l,initialViewMetrics:o}}const bo=(e,t)=>e*t,oh=(e,t)=>{const n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),o=Math.min(e.right,t.right),s=Math.min(e.bottom,t.bottom);return n>=o||r>=s?0:bo(o-n,s-r)},Ys=e=>{const t=bo(e.previousRect.width,e.previousRect.height),n=bo(e.currentRect.width,e.currentRect.height),r=oh(e.previousRect,e.currentRect);return t+n-r};function sh(e,t,n){if(!lh())return{stop:X};let r=0,o;n({value:0});const s=uh(),i=Ge(e,{type:z.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var c;for(const u of a){if(u.hadRecentInput||u.startTimer){r=l;const f=(c=o==null?void 0:o.target)===null||c===void 0?void 0:c.deref();n({value:hn(r,4),targetSelector:f&&kn(f,e.actionNameAttribute),time:o==null?void 0:o.time,previousRect:o!=null&&o.previousRect?Xs(o.previousRect):void 0,currentRect:o!=null&&o.currentRect?Xs(o.currentRect):void 0,devicePixelRatio:o==null?void 0:o.devicePixelRatio})}}});return{stop:()=>{i.unsubscribe()}}}function ih(e){let t;for(const n of e)if(n.node&&it(n.node)){const r=Ys(n);(!t||Ys(t){const s=t===void 0||o.startTime-n>=ch||o.startTime-t>=ah;let i;return s?(t=n=o.startTime,r=e=o.value,i=!0):(e+=o.value,n=o.startTime,i=o.value>r,i&&(r=o.value)),{cumulatedValue:e,isMaxValue:i}}}}function lh(){return St(z.LAYOUT_SHIFT)&&"WeakRef"in window}let er,yc=0,Jr=1/0,Qr=0;function dh(){"interactionCount"in performance||er||(er=new window.PerformanceObserver(D(e=>{e.getEntries().forEach(t=>{const n=t;n.interactionId&&(Jr=Math.min(Jr,n.interactionId),Qr=Math.max(Qr,n.interactionId),yc=(Qr-Jr)/7+1)})})),er.observe({type:"event",buffered:!0,durationThreshold:0}))}const Js=()=>er?yc:window.performance.interactionCount||0,Qs=10,fh=1*Ce;function ph(e,t,n){if(!gh())return{getInteractionToNextPaint:()=>{},setViewEnd:X,stop:X};const{getViewInteractionCount:r,stopViewInteractionCount:o}=hh(n);let s=1/0;const i=mh(r);let a=-1,c,u;function l(h){for(const g of h)g.interactionId&&g.startTime>=t&&g.startTime<=s&&i.process(g);const m=i.estimateP98Interaction();m&&m.duration!==a&&(a=m.duration,u=ie(t,m.startTime),c=pm(m.startTime),!c&&m.target&&it(m.target)&&(c=kn(m.target,e.actionNameAttribute)))}const d=Ge(e,{type:z.FIRST_INPUT,buffered:!0}).subscribe(l),f=Ge(e,{type:z.EVENT,durationThreshold:40,buffered:!0}).subscribe(l);return{getInteractionToNextPaint:()=>{if(a>=0)return{value:Math.min(a,fh),targetSelector:c,time:u};if(r())return{value:0}},setViewEnd:h=>{s=h,o()},stop:()=>{f.unsubscribe(),d.unsubscribe()}}}function mh(e){const t=[];function n(){t.sort((r,o)=>o.duration-r.duration).splice(Qs)}return{process(r){const o=t.findIndex(i=>r.interactionId===i.interactionId),s=t[t.length-1];o!==-1?r.duration>t[o].duration&&(t[o]=r,n()):(t.lengths.duration)&&(t.push(r),n())},estimateP98Interaction(){const r=Math.min(t.length-1,Math.floor(e()/50));return t[r]}}}function hh(e){dh();const t=e===Je.INITIAL_LOAD?0:Js();let n={stopped:!1};function r(){return Js()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function gh(){return St(z.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function yh(e,t,n,r,o,s,i){let a=o===Je.INITIAL_LOAD,c=!0;const u=[],l=gc(r,s);function d(){if(!c&&!a&&u.length>0){const h=Math.max(...u);h{c&&(c=!1,h.hadActivity&&u.push(ie(s.timeStamp,h.end)),d())});return{stop:()=>{f(),l.stop()},setLoadEvent:h=>{a&&(a=!1,u.push(h),d())}}}function bh(){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 Zr;function Eh(e){return Zr||(Zr=_h(e)),Zr}function _h(e){return new q(t=>{const{throttled:n}=hr(()=>{t.notify(Xo())},200);return se(e,window,"resize",n,{capture:!0,passive:!0}).stop})}function Xo(){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 Th=ve;function Sh(e,t,n,r=Ah(e)){let o=0,s=0,i=0;const a=r.subscribe(({scrollDepth:c,scrollTop:u,scrollHeight:l})=>{let d=!1;if(c>o&&(o=c,d=!0),l>s){s=l;const f=xe();i=ie(t.relative,f),d=!0}d&&n({maxDepth:Math.min(o,s),maxDepthScrollTop:u,maxScrollHeight:s,maxScrollHeightTime:i})});return{stop:()=>a.unsubscribe()}}function vh(){const e=bh(),{height:t}=Xo(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(t+e);return{scrollHeight:n,scrollDepth:r,scrollTop:e}}function Ah(e,t=Th){return new q(n=>{function r(){n.notify(vh())}if(window.ResizeObserver){const o=hr(r,t,{leading:!1,trailing:!0}),s=document.scrollingElement||document.documentElement,i=new ResizeObserver(D(o.throttled));s&&i.observe(s);const a=se(e,window,"scroll",o.throttled,{passive:!0});return()=>{o.cancel(),i.disconnect(),a.stop()}}})}function wh(e,t,n,r,o,s,i){const a={},{stop:c,setLoadEvent:u}=yh(e,t,n,r,s,i,g=>{a.loadingTime=g,o()}),{stop:l}=Sh(r,i,g=>{a.scroll=g}),{stop:d}=sh(r,i.relative,g=>{a.cumulativeLayoutShift=g,o()}),{stop:f,getInteractionToNextPaint:h,setViewEnd:m}=ph(r,i.relative,s);return{stop:()=>{c(),d(),l()},stopINPTracking:f,setLoadEvent:u,setViewEnd:m,getCommonViewMetrics:()=>(a.interactionToNextPaint=h(),a)}}function Ih(e,t){const{stop:n}=se(e,window,"pageshow",r=>{r.persisted&&t(r)},{capture:!0});return n}function Ch(e,t,n){zm(e.relative,r=>{t.firstContentfulPaint=r,t.largestContentfulPaint={value:r},n()})}const Rh=3e3,Oh=5*Ce,xh=5*Ce;function Lh(e,t,n,r,o,s,i,a){const c=new Set;let u=f(Je.INITIAL_LOAD,Ui(),a),l;h();let d;i&&(d=m(s),o.trackBfcacheViews&&(l=Ih(o,g=>{u.end();const S=pr(g.timeStamp);u=f(Je.BF_CACHE,S,void 0)})));function f(g,S,I){const k=kh(t,n,r,o,e,g,S,I);return c.add(k),k.stopObservable.subscribe(()=>{c.delete(k)}),k}function h(){t.subscribe(10,()=>{u=f(Je.ROUTE_CHANGE,void 0,{name:u.name,service:u.service,version:u.version,context:u.contextManager.getContext()})}),t.subscribe(9,()=>{u.end({sessionIsActive:!1})})}function m(g){return g.subscribe(({oldLocation:S,newLocation:I})=>{Mh(S,I)&&(u.end(),u=f(Je.ROUTE_CHANGE))})}return{addTiming:(g,S=Ie())=>{u.addTiming(g,S)},startView:(g,S)=>{u.end({endClocks:S}),u=f(Je.ROUTE_CHANGE,S,g)},setViewContext:g=>{u.contextManager.setContext(g)},setViewContextProperty:(g,S)=>{u.contextManager.setContextProperty(g,S)},setViewName:g=>{u.setViewName(g)},getViewContext:()=>u.contextManager.getContext(),stop:()=>{d&&d.unsubscribe(),l&&l(),u.end(),c.forEach(g=>g.stop())}}}function kh(e,t,n,r,o,s,i=fe(),a){const c=he(),u=new q,l={};let d=0,f;const h=_n(o),m=br();let g=!0,S=a==null?void 0:a.name;const I=(a==null?void 0:a.service)||r.service,k=(a==null?void 0:a.version)||r.version,T=a==null?void 0:a.context;T&&m.setContext(T);const w={id:c,name:S,startClocks:i,service:I,version:k,context:T};e.notify(1,w),e.notify(2,w);const{throttled:L,cancel:E}=hr(Q,Rh,{leading:!1}),{setLoadEvent:O,setViewEnd:U,stop:H,stopINPTracking:ue,getCommonViewMetrics:v}=wh(e,t,n,r,J,s,i),{stop:_,initialViewMetrics:A}=s===Je.INITIAL_LOAD?rh(r,i,O,J):{stop:X,initialViewMetrics:{}};s===Je.BF_CACHE&&Ch(i,A,J);const{stop:y,eventCounts:R}=Wm(e,c,J),$=Wt(Q,Oh),W=e.subscribe(11,B=>{B.reason===Ft.UNLOADING&&Q()});Q(),m.changeObservable.subscribe(J);function V(){e.notify(3,{id:c,name:S,context:m.getContext(),startClocks:i,sessionIsActive:g})}function J(){V(),L()}function Q(){E(),V(),d+=1;const B=f===void 0?Ie():f.timeStamp;e.notify(4,{customTimings:l,documentVersion:d,id:c,name:S,service:I,version:k,context:m.getContext(),loadingType:s,location:h,startClocks:i,commonViewMetrics:v(),initialViewMetrics:A,duration:ie(i.timeStamp,B),isActive:f===void 0,sessionIsActive:g,eventCounts:R})}return{get name(){return S},service:I,version:k,contextManager:m,stopObservable:u,end(B={}){var le,M;f||(f=(le=B.endClocks)!==null&&le!==void 0?le:fe(),g=(M=B.sessionIsActive)!==null&&M!==void 0?M:!0,e.notify(5,{endClocks:f}),e.notify(6,{endClocks:f}),mr($),U(f.relative),H(),W.unsubscribe(),Q(),we(()=>{this.stop()},xh))},stop(){_(),y(),ue(),u.notify()},addTiming(B,le){if(f)return;const M=bu(le)?le:ie(i.timeStamp,le);l[Nh(B)]=M,J()},setViewName(B){S=B,Q()}}}function Nh(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&K.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function Mh(e,t){return e.pathname!==t.pathname||!Dh(t.hash)&&Zs(t.hash)!==Zs(e.hash)}function Dh(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function Zs(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Ph(e,t,n,r,o,s,i,a,c,u){return e.subscribe(4,l=>e.notify(12,Uh(l,n,a))),t.register(0,({startTime:l,eventType:d})=>{const f=c.findView(l);return f?{type:d,service:f.service,version:f.version,context:f.context,view:{id:f.id,name:f.name}}:st}),t.register(1,({startTime:l})=>{var d;return{view:{id:(d=c.findView(l))===null||d===void 0?void 0:d.id}}}),Lh(r,e,o,s,n,i,!n.trackViewsManually,u)}function Uh(e,t,n){var r,o,s,i,a,c,u,l,d,f,h,m,g,S,I,k,T,w;const L=n.getReplayStats(e.id),E=(o=(r=e.commonViewMetrics)===null||r===void 0?void 0:r.cumulativeLayoutShift)===null||o===void 0?void 0:o.devicePixelRatio,O={_dd:{document_version:e.documentVersion,replay_stats:L,cls:E?{device_pixel_ratio:E}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:F.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:(s=e.commonViewMetrics.cumulativeLayoutShift)===null||s===void 0?void 0:s.value,cumulative_layout_shift_time:P((i=e.commonViewMetrics.cumulativeLayoutShift)===null||i===void 0?void 0:i.time),cumulative_layout_shift_target_selector:(a=e.commonViewMetrics.cumulativeLayoutShift)===null||a===void 0?void 0:a.targetSelector,first_byte:P((c=e.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.firstByte),dom_complete:P((u=e.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.domComplete),dom_content_loaded:P((l=e.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domContentLoaded),dom_interactive:P((d=e.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:P(e.initialViewMetrics.firstContentfulPaint),first_input_delay:P((f=e.initialViewMetrics.firstInput)===null||f===void 0?void 0:f.delay),first_input_time:P((h=e.initialViewMetrics.firstInput)===null||h===void 0?void 0:h.time),first_input_target_selector:(m=e.initialViewMetrics.firstInput)===null||m===void 0?void 0:m.targetSelector,interaction_to_next_paint:P((g=e.commonViewMetrics.interactionToNextPaint)===null||g===void 0?void 0:g.value),interaction_to_next_paint_time:P((S=e.commonViewMetrics.interactionToNextPaint)===null||S===void 0?void 0:S.time),interaction_to_next_paint_target_selector:(I=e.commonViewMetrics.interactionToNextPaint)===null||I===void 0?void 0:I.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:P((k=e.initialViewMetrics.largestContentfulPaint)===null||k===void 0?void 0:k.value),largest_contentful_paint_target_selector:(T=e.initialViewMetrics.largestContentfulPaint)===null||T===void 0?void 0:T.targetSelector,load_event:P((w=e.initialViewMetrics.navigationTimings)===null||w===void 0?void 0:w.loadEvent),loading_time:Ja(P(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:Fh(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:P(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:P(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:Rf()}};return bt(e.customTimings)||(O.view.custom_timings=$i(e.customTimings,P)),{rawRumEvent:O,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}function Fh({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:o}){return{cls:e&&{score:e.value,timestamp:P(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:P(n)},fid:r&&{duration:P(r.delay),timestamp:P(r.time),target_selector:r.targetSelector},inp:t&&{duration:P(t.value),timestamp:P(t.time),target_selector:t.targetSelector},lcp:o&&{timestamp:P(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl}}}const Bh="rum";function $h(e,t,n){const r=Gd(e,Bh,o=>jh(e,o),n);return r.expireObservable.subscribe(()=>{t.notify(9)}),r.renewObservable.subscribe(()=>{t.notify(10)}),r.sessionStateUpdateObservable.subscribe(({previousState:o,newState:s})=>{if(!o.forcedReplay&&s.forcedReplay){const i=r.findSession();i&&(i.isReplayForced=!0)}}),{findTrackedSession:o=>{const s=r.findSession(o);if(!(!s||s.trackingType==="0"))return{id:s.id,sessionReplay:s.trackingType==="1"?1:s.isReplayForced?2:0,anonymousId:s.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:"1"})}}function Vh(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:Dl("records")?1:0};return{findTrackedSession:()=>e,expire:X,expireObservable:new q,setForcedReplay:X}}function jh(e,t){return Hh(t)?t:nt(e.sessionSampleRate)?nt(e.sessionReplaySampleRate)?"1":"2":"0"}function Hh(e){return e==="0"||e==="1"||e==="2"}function Gh(e,t,n,r,o,s){const i=[e.rumEndpointBuilder];e.replica&&i.push(e.replica.rumEndpointBuilder);const a=ba({encoder:s(2),request:ya(i,e.batchBytesLimit,n),flushController:Ea({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageMayExitObservable:r,sessionExpireObservable:o}),messageBytesLimit:e.messageBytesLimit});return t.subscribe(13,c=>{c.type===F.VIEW?a.upsert(c,c.view.id):a.add(c)}),a}function Wh(e){const t=Ln();e.subscribe(13,n=>{t.send("rum",n)})}const Kh=Et;function qh(e,t,n,r){const o=Xt({expireDelay:Kh});let s;e.subscribe(1,({startClocks:c})=>{const u=r.href;o.add(a({url:u,referrer:s||document.referrer}),c.relative),s=u}),e.subscribe(6,({endClocks:c})=>{o.closeActive(c.relative)});const i=n.subscribe(({newLocation:c})=>{const u=o.find();if(u){const l=xe();o.closeActive(l),o.add(a({url:c.href,referrer:u.referrer}),l)}});function a({url:c,referrer:u}){return{url:c,referrer:u}}return t.register(0,({startTime:c,eventType:u})=>{const l=o.find(c);return l?{type:u,view:{url:l.url,referrer:l.referrer}}:st}),{findUrl:c=>o.find(c),stop:()=>{i.unsubscribe(),o.stop()}}}function zh(e,t){let n=_n(t);return new q(r=>{const{stop:o}=Yh(e,i),{stop:s}=Xh(e,i);function i(){if(n.href===t.href)return;const a=_n(t);r.notify({newLocation:a,oldLocation:n}),n=a}return()=>{o(),s()}})}function Yh(e,t){const{stop:n}=He(ei("pushState"),"pushState",({onPostCall:s})=>{s(t)}),{stop:r}=He(ei("replaceState"),"replaceState",({onPostCall:s})=>{s(t)}),{stop:o}=se(e,window,"popstate",t);return{stop:()=>{n(),r(),o()}}}function Xh(e,t){return se(e,window,"hashchange",t)}function ei(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const Jh=Et;function Qh(e,t,n){const r=Xt({expireDelay:Jh});return e.subscribe(1,({startClocks:o})=>{r.add({},o.relative)}),e.subscribe(6,({endClocks:o})=>{r.closeActive(o.relative)}),t.register(0,({startTime:o,eventType:s})=>{if(!n.trackFeatureFlagsForEvents.concat([F.VIEW,F.ERROR]).includes(s))return Me;const a=r.find(o);return!a||bt(a)?Me:{type:s,feature_flags:a}}),{addFeatureFlagEvaluation:(o,s)=>{const i=r.find();i&&(i[o]=s)}}}const Zh=10*ve;let Bt,Kn;function eg(e,t,n,r){t.enabled&&nt(e.customerDataTelemetrySampleRate)&&(bc(),Kn=!1,n.subscribe(13,()=>{Kn=!0}),r.subscribe(({bytesCount:s,messagesCount:i})=>{Kn&&(Kn=!1,Bt.batchCount+=1,ni(Bt.batchBytesCount,s),ni(Bt.batchMessagesCount,i))}),Wt(tg,Zh))}function tg(){Bt.batchCount!==0&&(_a("Customer data measures",Bt),bc())}function ti(){return{min:1/0,max:0,sum:0}}function ni(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function bc(){Bt={batchCount:0,batchBytesCount:ti(),batchMessagesCount:ti()}}const ng=4e3,rg=500,og=Et;function sg(e,t,n=rg){const r=Xt({expireDelay:og,maxEntries:ng});let o;St(z.VISIBILITY_STATE)&&performance.getEntriesByType(z.VISIBILITY_STATE).forEach(u=>{const l=u.name==="hidden"?"hidden":"active";i(l,u.startTime)}),i(Ec(),xe());const{stop:s}=ot(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],c=>{i(ag(c),c.timeStamp)},{capture:!0});function i(c,u=xe()){c!==o&&(o=c,r.closeActive(u),r.add({state:o,startTime:u},u))}function a(c,u,l){return r.findAll(u,l).some(d=>d.state===c)}return e.register(0,({startTime:c,duration:u=0,eventType:l})=>{if(l===F.VIEW){const d=r.findAll(c,u);return{type:l,_dd:{page_states:ig(d,c,n)}}}return l===F.ACTION||l===F.ERROR?{type:l,view:{in_foreground:a("active",c,0)}}:Me}),{wasInPageStateDuringPeriod:a,addPageState:i,stop:()=>{s(),r.stop()}}}function ig(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:r,startTime:o})=>({state:r,start:P(ie(t,o))}))}function ag(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":Ec()}function Ec(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function cg(e,t){let n;const r=requestAnimationFrame(D(()=>{n=Xo()})),o=Eh(t).subscribe(s=>{n=s}).unsubscribe;return e.register(0,({eventType:s})=>({type:s,display:n?{viewport:n}:void 0})),{stop:()=>{o(),r&&cancelAnimationFrame(r)}}}function ug(e,t){const n=window.cookieStore?lg(e):fg;return new q(r=>n(t,o=>r.notify(o)))}function lg(e){return(t,n)=>se(e,window.cookieStore,"change",o=>{const s=o.changed.find(i=>i.name===t)||o.deleted.find(i=>i.name===t);s&&n(s.value)}).stop}const dg=ve;function fg(e,t){const n=Tn(document.cookie,e),r=Wt(()=>{const o=Tn(document.cookie,e);o!==n&&t(o)},dg);return()=>{mr(r)}}const ri="datadog-ci-visibility-test-execution-id";function pg(e,t,n=ug(e,ri)){var r;let o=tt(ri)||((r=window.Cypress)===null||r===void 0?void 0:r.env("traceId"));const s=n.subscribe(i=>{o=i});return t.register(0,({eventType:i})=>typeof o!="string"?Me:{type:i,session:{type:"ci_test"},ci_test:{test_execution_id:o}}),{stop:()=>{s.unsubscribe()}}}function mg(e,t){const n=Ge(t,{type:z.LONG_ANIMATION_FRAME,buffered:!0}).subscribe(r=>{for(const o of r){const s=pr(o.startTime),i={date:s.timeStamp,long_task:{id:he(),entry_type:Fa.LONG_ANIMATION_FRAME,duration:P(o.duration),blocking_duration:P(o.blockingDuration),first_ui_event_timestamp:P(o.firstUIEventTimestamp),render_start:P(o.renderStart),style_and_layout_start:P(o.styleAndLayoutStart),start_time:P(o.startTime),scripts:o.scripts.map(a=>({duration:P(a.duration),pause_duration:P(a.pauseDuration),forced_style_and_layout_duration:P(a.forcedStyleAndLayoutDuration),start_time:P(a.startTime),execution_start:P(a.executionStart),source_url:a.sourceURL,source_function_name:a.sourceFunctionName,source_char_position:a.sourceCharPosition,invoker:a.invoker,invoker_type:a.invokerType,window_attribution:a.windowAttribution}))},type:F.LONG_TASK,_dd:{discarded:!1}};e.notify(12,{rawRumEvent:i,startTime:s.relative,duration:o.duration,domainContext:{performanceEntry:o}})}});return{stop:()=>n.unsubscribe()}}function hg(e,t){const n=Ge(t,{type:z.LONG_TASK,buffered:!0}).subscribe(r=>{for(const o of r){if(o.entryType!==z.LONG_TASK||!t.trackLongTasks)break;const s=pr(o.startTime),i={date:s.timeStamp,long_task:{id:he(),entry_type:Fa.LONG_TASK,duration:P(o.duration)},type:F.LONG_TASK,_dd:{discarded:!1}};e.notify(12,{rawRumEvent:i,startTime:s.relative,duration:o.duration,domainContext:{performanceEntry:o}})}});return{stop(){n.unsubscribe()}}}function gg(e){e.register(0,({eventType:t})=>{if(!ka())return Me;const n=xa(),r=La();return{type:t,session:{type:"synthetics"},synthetics:{test_id:n,result_id:r,injected:Oa()}}})}function yg(e,t,n){const r=$o(e),o=n(r);return Po(t).forEach(([s,i])=>Eo(e,r,s.split(/\.|(?=\[\])/),i)),o}function Eo(e,t,n,r){const[o,...s]=n;if(o==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((i,a)=>Eo(i,t[a],s,r));return}if(!(!oi(e)||!oi(t))){if(s.length>0)return Eo(e[o],t[o],s,r);bg(e,o,t[o],r)}}function bg(e,t,n,r){const o=Tt(n);o===r?e[t]=ne(n):r==="object"&&(o==="undefined"||o==="null")&&(e[t]={})}function oi(e){return Tt(e)==="object"}const Lt={"view.name":"string","view.url":"string","view.referrer":"string"},kt={context:"object"},Nt={service:"string",version:"string"};let _c;function Eg(e,t,n,r){_c={[F.VIEW]:{"view.performance.lcp.resource_url":"string",...kt,...Lt,...Nt},[F.ERROR]:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...kt,...Lt,...Nt},[F.RESOURCE]:{"resource.url":"string",...yr(yt.WRITABLE_RESOURCE_GRAPHQL)?{"resource.graphql":"object"}:{},...kt,...Lt,...Nt},[F.ACTION]:{"action.target.name":"string",...kt,...Lt,...Nt},[F.LONG_TASK]:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...kt,...Lt,...Nt},[F.VITAL]:{...kt,...Lt,...Nt}};const o={[F.ERROR]:Hr(F.ERROR,e.eventRateLimiterThreshold,r),[F.ACTION]:Hr(F.ACTION,e.eventRateLimiterThreshold,r),[F.VITAL]:Hr(F.VITAL,e.eventRateLimiterThreshold,r)};t.subscribe(12,({startTime:s,duration:i,rawRumEvent:a,domainContext:c})=>{const u=n.triggerHook(0,{eventType:a.type,startTime:s,duration:i});if(u===st)return;const l=Ze(u,a,{ddtags:vd(e).join(",")});_g(l,e.beforeSend,c,o)&&(bt(l.context)&&delete l.context,t.notify(13,l))})}function _g(e,t,n,r){var o;if(t){const i=yg(e,_c[e.type],a=>t(a,n));if(i===!1&&e.type!==F.VIEW)return!1;i===!1&&K.warn("Can't dismiss view events using beforeSend!")}return!((o=r[e.type])===null||o===void 0?void 0:o.isLimitReached())}function Tg(e,t,n,r){e.register(0,({eventType:o,startTime:s})=>{const i=t.findTrackedSession(s),a=r.findView(s);if(!i||!a)return st;let c,u,l;return o===F.VIEW?(c=n.getReplayStats(a.id)?!0:void 0,u=i.sessionReplay===1,l=a.sessionIsActive?void 0:!1):c=n.isRecording()?!0:void 0,{type:o,session:{id:i.id,type:"user",has_replay:c,sampled_for_replay:u,is_active:l}}}),e.register(1,({startTime:o})=>{const s=t.findTrackedSession(o);return s?{session:{id:s.id}}:Me})}function Sg(e){e.register(0,({eventType:t})=>({type:t,connectivity:ua()}))}function vg(e,t,n){e.register(0,({eventType:r})=>({type:r,_dd:{format_version:2,drift:gu(),configuration:{session_sample_rate:hn(t.sessionSampleRate,3),session_replay_sample_rate:hn(t.sessionReplaySampleRate,3),profiling_sample_rate:hn(t.profilingSampleRate,3)},browser_sdk_version:vn()?"6.18.1":void 0,sdk_name:n},application:{id:t.applicationId},date:Ie(),source:"browser"})),e.register(1,()=>({application:{id:t.applicationId}}))}function Ag(e,t){e.register(1,()=>t.isGranted()?Me:st)}const wg=Bl,Ig=[F.ACTION,F.ERROR,F.LONG_TASK,F.RESOURCE,F.VITAL];function Cg(e){return{addEvent:(t,n,r,o)=>{Ig.includes(n.type)&&e.notify(12,{startTime:t,rawRumEvent:n,domainContext:r,duration:o})}}}const Rg="Initial view metrics";function Og(e,t,n){if(!(n.enabled&&nt(e.initialViewMetricsTelemetrySampleRate)))return{stop:X};const{unsubscribe:o}=t.subscribe(4,({initialViewMetrics:s})=>{!s.largestContentfulPaint||!s.navigationTimings||(_a(Rg,{metrics:xg(s.largestContentfulPaint,s.navigationTimings)}),o())});return{stop:o}}function xg(e,t){return{lcp:{value:e.value},navigation:{domComplete:t.domComplete,domContentLoaded:t.domContentLoaded,domInteractive:t.domInteractive,firstByte:t.firstByte,loadEvent:t.loadEvent}}}function Lg(e,t,n,r,o,s,i,a,c){const u=[],l=new ap,d=wg();l.subscribe(13,re=>ca("rum",re));const f=re=>{l.notify(14,{error:re}),Yt("Error reported to customer",{"error.message":re.message})},h=Ul(e),m=h.subscribe(re=>{l.notify(11,re)});u.push(()=>m.unsubscribe());const g=jl("browser-rum-sdk",e,d,f,h,o);u.push(g.stop);const S=vn()?Vh():$h(e,l,s);if(vn())Wh(l);else{const re=Gh(e,l,f,h,S.expireObservable,o);u.push(()=>re.stop()),eg(e,g,l,re.flushController.flushObservable)}const I=rp(),k=zh(e,location),{observable:T,stop:w}=sp();u.push(w),vg(d,e,c);const L=sg(d,e),E=up(l);u.push(()=>E.stop());const O=qh(l,d,k,location);u.push(()=>O.stop());const U=Qh(l,d,e);Tg(d,S,t,E),Sg(d),Ag(d,s);const H=vf(d,e,"rum"),ue=Af(d,e,S,"rum"),v=Sf(d,e,"rum"),{actionContexts:_,addAction:A,addEvent:y,stop:R}=kg(l,d,e,L,I,T,f);u.push(R);const{addTiming:$,startView:W,setViewName:V,setViewContext:J,setViewContextProperty:Q,getViewContext:B,stop:le}=Ph(l,d,e,location,I,T,k,t,E,r);u.push(le);const{stop:M}=Og(e,l,g);u.push(M);const{stop:Le}=Um(l,e,L);if(u.push(Le),e.trackLongTasks)if(St(z.LONG_ANIMATION_FRAME)){const{stop:re}=mg(l,e);u.push(re)}else hg(l,e);const{addError:G}=vm(l,e,a);a.unbuffer(),Tp(l,e,S,ue,v);const te=xf(l,L,i),Fe=ip(e.applicationId,S,E,_,O);return u.push(()=>n.stop()),{addAction:A,addEvent:y,addError:G,addTiming:$,addFeatureFlagEvaluation:U.addFeatureFlagEvaluation,startView:W,setViewContext:J,setViewContextProperty:Q,getViewContext:B,setViewName:V,lifeCycle:l,viewHistory:E,session:S,stopSession:()=>S.expire(),getInternalContext:Fe.get,startDurationVital:te.startDurationVital,stopDurationVital:te.stopDurationVital,addDurationVital:te.addDurationVital,globalContext:H,userContext:ue,accountContext:v,telemetry:g,stop:()=>{u.forEach(re=>re())},hooks:d}}function kg(e,t,n,r,o,s,i){const a=_m(e,t,o,s,n),c=Cg(e),u=cg(t,n),l=pg(n,t);return gg(t),Eg(n,e,t,i),{pageStateHistory:r,addAction:a.addAction,addEvent:c.addEvent,actionContexts:a.actionContexts,stop:()=>{a.stop(),l.stop(),u.stop(),r.stop()}}}function Ng(e,{session:t,viewContext:n,errorType:r}){const o=t?t.id:"no-session-id",s=[];s.push(`error-type=${r}`),n&&(s.push(`seed=${n.id}`),s.push(`from=${n.startClocks.timeStamp}`));const i=Mg(e),a=`/rum/replay/sessions/${o}`;return`${i}${a}?${s.join("&")}`}function Mg(e){const t=e.site,n=e.subdomain||Dg(e);return`https://${n?`${n}.`:""}${t}`}function Dg(e){switch(e.site){case ht:case bl:return"app";case aa:return"dd";default:return}}function Pg(e){return Ng(e,{errorType:"slim-package"})}function Ug(){let e=X;return{start:X,stop:X,onRumStart(t,n){e=()=>Pg(n)},isRecording:()=>!1,getReplayStats:()=>{},getSessionReplayLink:()=>e()}}function Fg(){return{onRumStart:X,stop:X}}const jt=tp(Lg,Ug(),Fg(),{sdkName:"rum-slim"});Ld(We(),"DD_RUM",jt);const Bg=["YsAppBridge is not defined","MtPopUpList is not defined","GEOCODER_GEOCODE: ZERO_RESULTS","No identifiers allowed directly after numeric literal","window.yandexReadabilityChecker.isProbablyReaderable","window.TelegramWebview.post is not a function","Java bridge method invocation error","Argument 1 ('element') to Window.getComputedStyle must be an instance of Element","Window.getComputedStyle: Argument 1 is not an object","Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'","Object Not Found Matching Id","csp_violation: 'https://accounts.google.com' blocked by 'frame-src' directive","csp_violation: 'https://accounts.google.com/' blocked by 'frame-src' directive","Could not find file: 'inmemory://model/1'","Script error.",'Uncaught "Empty reason"',"grecaptcha is not defined",'Uncaught "Timeout"'];/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */const{entries:Tc,setPrototypeOf:si,isFrozen:$g,getPrototypeOf:Vg,getOwnPropertyDescriptor:jg}=Object;let{freeze:Te,seal:De,create:Sc}=Object,{apply:_o,construct:To}=typeof Reflect<"u"&&Reflect;Te||(Te=function(t){return t});De||(De=function(t){return t});_o||(_o=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s1?n-1:0),o=1;o1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:tr;si&&si(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const s=n(o);s!==o&&($g(t)||(t[r]=s),o=s)}e[o]=!0}return e}function zg(e){for(let t=0;t/gm),Zg=De(/\$\{[\w\W]*/gm),ey=De(/^data-[\-\w.\u00B7-\uFFFF]+$/),ty=De(/^aria-[\-\w]+$/),vc=De(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ny=De(/^(?:\w+script|data):/i),ry=De(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ac=De(/^html$/i),oy=De(/^[a-z][.\w]*(-[.\w]+)+$/i);var di=Object.freeze({__proto__:null,ARIA_ATTR:ty,ATTR_WHITESPACE:ry,CUSTOM_ELEMENT:oy,DATA_ATTR:ey,DOCTYPE_NAME:Ac,ERB_EXPR:Qg,IS_ALLOWED_URI:vc,IS_SCRIPT_OR_DATA:ny,MUSTACHE_EXPR:Jg,TMPLIT_EXPR:Zg});const fn={element:1,text:3,progressingInstruction:7,comment:8,document:9},sy=function(){return typeof window>"u"?null:window},iy=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},fi=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function wc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sy();const t=x=>wc(x);if(t.version="3.2.7",t.removed=[],!e||!e.document||e.document.nodeType!==fn.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:a,Element:c,NodeFilter:u,NamedNodeMap:l=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=e,m=c.prototype,g=dn(m,"cloneNode"),S=dn(m,"remove"),I=dn(m,"nextSibling"),k=dn(m,"childNodes"),T=dn(m,"parentNode");if(typeof i=="function"){const x=n.createElement("template");x.content&&x.content.ownerDocument&&(n=x.content.ownerDocument)}let w,L="";const{implementation:E,createNodeIterator:O,createDocumentFragment:U,getElementsByTagName:H}=n,{importNode:ue}=r;let v=fi();t.isSupported=typeof Tc=="function"&&typeof T=="function"&&E&&E.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:_,ERB_EXPR:A,TMPLIT_EXPR:y,DATA_ATTR:R,ARIA_ATTR:$,IS_SCRIPT_OR_DATA:W,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:J}=di;let{IS_ALLOWED_URI:Q}=di,B=null;const le=j({},[...ai,...no,...ro,...oo,...ci]);let M=null;const Le=j({},[...ui,...so,...li,...zn]);let G=Object.seal(Sc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,Fe=null,re=!0,Pe=!0,vt=!1,Nn=!0,pe=!1,Mn=!0,ct=!1,wr=!1,Ir=!1,At=!1,Dn=!1,Pn=!1,ns=!0,rs=!1;const eu="user-content-";let Cr=!0,Zt=!1,wt={},It=null;const os=j({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ss=null;const is=j({},["audio","video","img","source","image","track"]);let Rr=null;const as=j({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Un="http://www.w3.org/1998/Math/MathML",Fn="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let Ct=Ke,Or=!1,xr=null;const tu=j({},[Un,Fn,Ke],eo);let Bn=j({},["mi","mo","mn","ms","mtext"]),$n=j({},["annotation-xml"]);const nu=j({},["title","style","font","a","script"]);let en=null;const ru=["application/xhtml+xml","text/html"],ou="text/html";let ae=null,Rt=null;const su=n.createElement("form"),cs=function(p){return p instanceof RegExp||p instanceof Function},Lr=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rt&&Rt===p)){if((!p||typeof p!="object")&&(p={}),p=Ye(p),en=ru.indexOf(p.PARSER_MEDIA_TYPE)===-1?ou:p.PARSER_MEDIA_TYPE,ae=en==="application/xhtml+xml"?eo:tr,B=Ue(p,"ALLOWED_TAGS")?j({},p.ALLOWED_TAGS,ae):le,M=Ue(p,"ALLOWED_ATTR")?j({},p.ALLOWED_ATTR,ae):Le,xr=Ue(p,"ALLOWED_NAMESPACES")?j({},p.ALLOWED_NAMESPACES,eo):tu,Rr=Ue(p,"ADD_URI_SAFE_ATTR")?j(Ye(as),p.ADD_URI_SAFE_ATTR,ae):as,ss=Ue(p,"ADD_DATA_URI_TAGS")?j(Ye(is),p.ADD_DATA_URI_TAGS,ae):is,It=Ue(p,"FORBID_CONTENTS")?j({},p.FORBID_CONTENTS,ae):os,te=Ue(p,"FORBID_TAGS")?j({},p.FORBID_TAGS,ae):Ye({}),Fe=Ue(p,"FORBID_ATTR")?j({},p.FORBID_ATTR,ae):Ye({}),wt=Ue(p,"USE_PROFILES")?p.USE_PROFILES:!1,re=p.ALLOW_ARIA_ATTR!==!1,Pe=p.ALLOW_DATA_ATTR!==!1,vt=p.ALLOW_UNKNOWN_PROTOCOLS||!1,Nn=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,pe=p.SAFE_FOR_TEMPLATES||!1,Mn=p.SAFE_FOR_XML!==!1,ct=p.WHOLE_DOCUMENT||!1,At=p.RETURN_DOM||!1,Dn=p.RETURN_DOM_FRAGMENT||!1,Pn=p.RETURN_TRUSTED_TYPE||!1,Ir=p.FORCE_BODY||!1,ns=p.SANITIZE_DOM!==!1,rs=p.SANITIZE_NAMED_PROPS||!1,Cr=p.KEEP_CONTENT!==!1,Zt=p.IN_PLACE||!1,Q=p.ALLOWED_URI_REGEXP||vc,Ct=p.NAMESPACE||Ke,Bn=p.MATHML_TEXT_INTEGRATION_POINTS||Bn,$n=p.HTML_INTEGRATION_POINTS||$n,G=p.CUSTOM_ELEMENT_HANDLING||{},p.CUSTOM_ELEMENT_HANDLING&&cs(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=p.CUSTOM_ELEMENT_HANDLING.tagNameCheck),p.CUSTOM_ELEMENT_HANDLING&&cs(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),p.CUSTOM_ELEMENT_HANDLING&&typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),pe&&(Pe=!1),Dn&&(At=!0),wt&&(B=j({},ci),M=[],wt.html===!0&&(j(B,ai),j(M,ui)),wt.svg===!0&&(j(B,no),j(M,so),j(M,zn)),wt.svgFilters===!0&&(j(B,ro),j(M,so),j(M,zn)),wt.mathMl===!0&&(j(B,oo),j(M,li),j(M,zn))),p.ADD_TAGS&&(B===le&&(B=Ye(B)),j(B,p.ADD_TAGS,ae)),p.ADD_ATTR&&(M===Le&&(M=Ye(M)),j(M,p.ADD_ATTR,ae)),p.ADD_URI_SAFE_ATTR&&j(Rr,p.ADD_URI_SAFE_ATTR,ae),p.FORBID_CONTENTS&&(It===os&&(It=Ye(It)),j(It,p.FORBID_CONTENTS,ae)),Cr&&(B["#text"]=!0),ct&&j(B,["html","head","body"]),B.table&&(j(B,["tbody"]),delete te.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw ln('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ln('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=p.TRUSTED_TYPES_POLICY,L=w.createHTML("")}else w===void 0&&(w=iy(h,o)),w!==null&&typeof L=="string"&&(L=w.createHTML(""));Te&&Te(p),Rt=p}},us=j({},[...no,...ro,...Yg]),ls=j({},[...oo,...Xg]),iu=function(p){let b=T(p);(!b||!b.tagName)&&(b={namespaceURI:Ct,tagName:"template"});const C=tr(p.tagName),ee=tr(b.tagName);return xr[p.namespaceURI]?p.namespaceURI===Fn?b.namespaceURI===Ke?C==="svg":b.namespaceURI===Un?C==="svg"&&(ee==="annotation-xml"||Bn[ee]):!!us[C]:p.namespaceURI===Un?b.namespaceURI===Ke?C==="math":b.namespaceURI===Fn?C==="math"&&$n[ee]:!!ls[C]:p.namespaceURI===Ke?b.namespaceURI===Fn&&!$n[ee]||b.namespaceURI===Un&&!Bn[ee]?!1:!ls[C]&&(nu[C]||!us[C]):!!(en==="application/xhtml+xml"&&xr[p.namespaceURI]):!1},Be=function(p){cn(t.removed,{element:p});try{T(p).removeChild(p)}catch{S(p)}},ut=function(p,b){try{cn(t.removed,{attribute:b.getAttributeNode(p),from:b})}catch{cn(t.removed,{attribute:null,from:b})}if(b.removeAttribute(p),p==="is")if(At||Dn)try{Be(b)}catch{}else try{b.setAttribute(p,"")}catch{}},ds=function(p){let b=null,C=null;if(Ir)p=""+p;else{const oe=to(p,/^[\r\n\t ]+/);C=oe&&oe[0]}en==="application/xhtml+xml"&&Ct===Ke&&(p=''+p+"");const ee=w?w.createHTML(p):p;if(Ct===Ke)try{b=new f().parseFromString(ee,en)}catch{}if(!b||!b.documentElement){b=E.createDocument(Ct,"template",null);try{b.documentElement.innerHTML=Or?L:ee}catch{}}const me=b.body||b.documentElement;return p&&C&&me.insertBefore(n.createTextNode(C),me.childNodes[0]||null),Ct===Ke?H.call(b,ct?"html":"body")[0]:ct?b.documentElement:me},fs=function(p){return O.call(p.ownerDocument||p,p,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},kr=function(p){return p instanceof d&&(typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||!(p.attributes instanceof l)||typeof p.removeAttribute!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function")},ps=function(p){return typeof a=="function"&&p instanceof a};function qe(x,p,b){qn(x,C=>{C.call(t,p,b,Rt)})}const ms=function(p){let b=null;if(qe(v.beforeSanitizeElements,p,null),kr(p))return Be(p),!0;const C=ae(p.nodeName);if(qe(v.uponSanitizeElement,p,{tagName:C,allowedTags:B}),Mn&&p.hasChildNodes()&&!ps(p.firstElementChild)&&be(/<[/\w!]/g,p.innerHTML)&&be(/<[/\w!]/g,p.textContent)||p.nodeType===fn.progressingInstruction||Mn&&p.nodeType===fn.comment&&be(/<[/\w]/g,p.data))return Be(p),!0;if(!B[C]||te[C]){if(!te[C]&&gs(C)&&(G.tagNameCheck instanceof RegExp&&be(G.tagNameCheck,C)||G.tagNameCheck instanceof Function&&G.tagNameCheck(C)))return!1;if(Cr&&!It[C]){const ee=T(p)||p.parentNode,me=k(p)||p.childNodes;if(me&&ee){const oe=me.length;for(let Ae=oe-1;Ae>=0;--Ae){const ze=g(me[Ae],!0);ze.__removalCount=(p.__removalCount||0)+1,ee.insertBefore(ze,I(p))}}}return Be(p),!0}return p instanceof c&&!iu(p)||(C==="noscript"||C==="noembed"||C==="noframes")&&be(/<\/no(script|embed|frames)/i,p.innerHTML)?(Be(p),!0):(pe&&p.nodeType===fn.text&&(b=p.textContent,qn([_,A,y],ee=>{b=un(b,ee," ")}),p.textContent!==b&&(cn(t.removed,{element:p.cloneNode()}),p.textContent=b)),qe(v.afterSanitizeElements,p,null),!1)},hs=function(p,b,C){if(ns&&(b==="id"||b==="name")&&(C in n||C in su))return!1;if(!(Pe&&!Fe[b]&&be(R,b))){if(!(re&&be($,b))){if(!M[b]||Fe[b]){if(!(gs(p)&&(G.tagNameCheck instanceof RegExp&&be(G.tagNameCheck,p)||G.tagNameCheck instanceof Function&&G.tagNameCheck(p))&&(G.attributeNameCheck instanceof RegExp&&be(G.attributeNameCheck,b)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(b,p))||b==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&be(G.tagNameCheck,C)||G.tagNameCheck instanceof Function&&G.tagNameCheck(C))))return!1}else if(!Rr[b]){if(!be(Q,un(C,V,""))){if(!((b==="src"||b==="xlink:href"||b==="href")&&p!=="script"&&Wg(C,"data:")===0&&ss[p])){if(!(vt&&!be(W,un(C,V,"")))){if(C)return!1}}}}}}return!0},gs=function(p){return p!=="annotation-xml"&&to(p,J)},ys=function(p){qe(v.beforeSanitizeAttributes,p,null);const{attributes:b}=p;if(!b||kr(p))return;const C={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:M,forceKeepAttr:void 0};let ee=b.length;for(;ee--;){const me=b[ee],{name:oe,namespaceURI:Ae,value:ze}=me,Ot=ae(oe),Nr=ze;let de=oe==="value"?Nr:Kg(Nr);if(C.attrName=Ot,C.attrValue=de,C.keepAttr=!0,C.forceKeepAttr=void 0,qe(v.uponSanitizeAttribute,p,C),de=C.attrValue,rs&&(Ot==="id"||Ot==="name")&&(ut(oe,p),de=eu+de),Mn&&be(/((--!?|])>)|<\/(style|title|textarea)/i,de)){ut(oe,p);continue}if(Ot==="attributename"&&to(de,"href")){ut(oe,p);continue}if(C.forceKeepAttr)continue;if(!C.keepAttr){ut(oe,p);continue}if(!Nn&&be(/\/>/i,de)){ut(oe,p);continue}pe&&qn([_,A,y],Es=>{de=un(de,Es," ")});const bs=ae(p.nodeName);if(!hs(bs,Ot,de)){ut(oe,p);continue}if(w&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Ae)switch(h.getAttributeType(bs,Ot)){case"TrustedHTML":{de=w.createHTML(de);break}case"TrustedScriptURL":{de=w.createScriptURL(de);break}}if(de!==Nr)try{Ae?p.setAttributeNS(Ae,oe,de):p.setAttribute(oe,de),kr(p)?Be(p):ii(t.removed)}catch{ut(oe,p)}}qe(v.afterSanitizeAttributes,p,null)},au=function x(p){let b=null;const C=fs(p);for(qe(v.beforeSanitizeShadowDOM,p,null);b=C.nextNode();)qe(v.uponSanitizeShadowNode,b,null),ms(b),ys(b),b.content instanceof s&&x(b.content);qe(v.afterSanitizeShadowDOM,p,null)};return t.sanitize=function(x){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=null,C=null,ee=null,me=null;if(Or=!x,Or&&(x=""),typeof x!="string"&&!ps(x))if(typeof x.toString=="function"){if(x=x.toString(),typeof x!="string")throw ln("dirty is not a string, aborting")}else throw ln("toString is not a function");if(!t.isSupported)return x;if(wr||Lr(p),t.removed=[],typeof x=="string"&&(Zt=!1),Zt){if(x.nodeName){const ze=ae(x.nodeName);if(!B[ze]||te[ze])throw ln("root node is forbidden and cannot be sanitized in-place")}}else if(x instanceof a)b=ds(""),C=b.ownerDocument.importNode(x,!0),C.nodeType===fn.element&&C.nodeName==="BODY"||C.nodeName==="HTML"?b=C:b.appendChild(C);else{if(!At&&!pe&&!ct&&x.indexOf("<")===-1)return w&&Pn?w.createHTML(x):x;if(b=ds(x),!b)return At?null:Pn?L:""}b&&Ir&&Be(b.firstChild);const oe=fs(Zt?x:b);for(;ee=oe.nextNode();)ms(ee),ys(ee),ee.content instanceof s&&au(ee.content);if(Zt)return x;if(At){if(Dn)for(me=U.call(b.ownerDocument);b.firstChild;)me.appendChild(b.firstChild);else me=b;return(M.shadowroot||M.shadowrootmode)&&(me=ue.call(r,me,!0)),me}let Ae=ct?b.outerHTML:b.innerHTML;return ct&&B["!doctype"]&&b.ownerDocument&&b.ownerDocument.doctype&&b.ownerDocument.doctype.name&&be(Ac,b.ownerDocument.doctype.name)&&(Ae="
`+Ae),pe&&qn([_,A,y],ze=>{Ae=un(Ae,ze," ")}),w&&Pn?w.createHTML(Ae):Ae},t.setConfig=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Lr(x),wr=!0},t.clearConfig=function(){Rt=null,wr=!1},t.isValidAttribute=function(x,p,b){Rt||Lr({});const C=ae(x),ee=ae(p);return hs(C,ee,b)},t.addHook=function(x,p){typeof p=="function"&&cn(v[x],p)},t.removeHook=function(x,p){if(p!==void 0){const b=Hg(v[x],p);return b===-1?void 0:Gg(v[x],b,1)[0]}return ii(v[x])},t.removeHooks=function(x){v[x]=[]},t.removeAllHooks=function(){v=fi()},t}var ay=wc();const cy=["chrome-extension://"],uy=e=>{if(!e.target.closest("header.unified-header.signed-in a[data-intercept-mobile-users]"))return;e.preventDefault();const t=e.target.dataset.interceptMobileUsers;t==="apple"?window.appendFlash("You currently have a Pro subscription on Apple. Please upgrade to Pro+ on your iOS device.","danger"):t==="google"&&window.appendFlash("You currently have a Pro subscription on Google. Please upgrade to Pro+ on your Android device.","danger")};function oS(){document.addEventListener("click",uy),lu()}const ly=e=>!!(e.type==="error"&&(Bg.some(t=>{var n,r;return(r=(n=e.error)==null?void 0:n.message)==null?void 0:r.includes(t)})||cy.some(t=>{var n,r;return(r=(n=e.error)==null?void 0:n.stack)==null?void 0:r.includes(t)})));function sS(){var r,o,s,i,a;if(window.appendFlash=function(c,u="success",l=null,d=!1){const f=m=>{m.classList.remove("fadein"),m.classList.add("fadeout"),setTimeout(()=>{m.style.display="none",m.remove()},500)};document.querySelectorAll("#flash-messages .sticky").forEach(m=>{f(m)});let h=document.createElement("div");h.className=`flash-msg alert alert-${u} fadein`,d&&h.classList.add("sticky"),h.append(ay.sanitize(c)),document.querySelector("#flash-messages").appendChild(h),d||setTimeout(()=>{f(h),l==null||l()},3e3)},document.querySelectorAll(".flash-msg:not(.sticky)").forEach(c=>{setInterval(function(){c.classList.add("fadeout"),setTimeout(()=>{c.style.display="none"},500)},3e3)}),(r=window.App)!=null&&r.datadogClientToken&&window.App.trackSession&&(jt.init({applicationId:window.App.datadogApplicationId,clientToken:window.App.datadogClientToken,site:"datadoghq.com",service:window.App.datadogService,version:window.App.datadogVersion,sessionSampleRate:Number(window.App.datadogSessionSampleRate),allowedTracingUrls:window.App.datadogAllowedTracingUrls,trackUserInteractions:!0,trackResources:!0,trackLongTasks:!0,defaultPrivacyLevel:"mask-user-input",beforeSend:(c,u)=>{var l;if(ly(c))return!1;if(c.type==="resource"&&(c.resource.type==="fetch"||c.resource.type==="document"||c.resource.type==="xhr")){let d=((l=u.performanceEntry)==null?void 0:l.serverTiming)||[];if(d.length>0){let f=d.map(h=>[h.name,{duration:h.duration,description:h.description}]);c.context.serverTiming=Object.fromEntries(f)}}},proxy:c=>`/dri${c.path}/p?${c.parameters}`}),window.App.user)){let c={...window.App.user};c.id||(c.id=window.App.browserSessionId),c.tier||(c.tier="free"),jt.setUser(c)}if(window.App.mixpanelKey){window.App.mixpanelKey;const c=window.location.origin,u=c+"/lib.min.js";let l={autocapture:!0,persistence:"localStorage",api_host:c,api_routes:{track:"mxpnl/track",engage:"mxpnl/engage",groups:"mxpnl/groups",record:"mxpnl/record"}};(window.App.env==="development"||window.location.hostname==="web-rehearsal.ifttt.com")&&(l.debug=!0),function(d,f){if(!f.__SV){var h,m,g,S;window.mixpanel=f,f._i=[],f.init=function(I,k,T){function w(O,U){var H=U.split(".");H.length==2&&(O=O[H[0]],U=H[1]),O[U]=function(){O.push([U].concat(Array.prototype.slice.call(arguments,0)))}}var L=f;for(typeof T<"u"?L=f[T]=[]:T="mixpanel",L.people=L.people||[],L.toString=function(O){var U="mixpanel";return T!=="mixpanel"&&(U+="."+T),O||(U+=" (stub)"),U},L.people.toString=function(){return L.toString(1)+".people (stub)"},g="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" "),S=0;S{mixpanel.reset()},{once:!0})}const e=new URL(window.location.href),t=["🧂","_cb"];t.some(c=>e.searchParams.has(c))&&(t.forEach(c=>{e.searchParams.has(c)&&e.searchParams.delete(c)}),window.history.replaceState({},"",e.pathname+e.search)),((a=(i=window.App)==null?void 0:i.user)==null?void 0:a.segment)!=="unauthenticated"&&document.querySelectorAll(`a[href='${window.location.origin}/explore']:not([data-target])`).forEach(c=>{c.addEventListener("click",u=>{u.preventDefault(),cu(u.target.href,u.metaKey)})}),window.addEventListener("offline",()=>{window.appendFlash("Your network connection has been lost.","danger",null,!0)}),window.addEventListener("online",()=>{window.appendFlash("Your network connection has been restored.","success")})}function iS(e,t={}){window.App.allowDebugErrorMessages&&console.log("Logging to Datadog",e,t),setTimeout(()=>{jt.addAction(e,t)})}function dy(e){window.App.allowDebugErrorMessages&&console.warn("Logging error to Datadog",dy),setTimeout(()=>{jt.addError(e)})}function aS(e,t){jt.setViewContextProperty(e,t)}const Jt=e=>{try{const t=localStorage.getItem(e);return t===null?void 0:JSON.parse(t)}catch{return}},Qe=(e,t)=>{try{const n=JSON.stringify(e);localStorage.setItem(t,n)}catch{return}},cS=e=>{try{localStorage.removeItem(e)}catch{return}},pi="data-allow-new-badge",Oe=()=>{var e;return`newBadgeForSubscribers-${(e=window.App.user)==null?void 0:e.id}`},fy=7,py=new Date().setDate(new Date().getDate()+fy);function uS(e,t){var o,s,i,a;const n=Jt(Oe()),r={ttl:py,header_create_cta:!0,filter_code:e==="pro"&&((o=t.filter_code)==null?void 0:o.permitted),queries:e==="pro"&&((s=t.queries)==null?void 0:s.permitted),multi_service_account:e==="pro"&&((i=t.multi_service_account)==null?void 0:i.permitted),multi_action:(a=t.multi_action)==null?void 0:a.permitted};Qe(n?{...n,...r}:{...r},Oe()),So()}function my(e){Object.entries(e).forEach(([t,n])=>{n===!0&&(e[t]=!1)}),Qe({...e},Oe())}function So(){const e=Jt(Oe());if(!e)return;if(new Date().getTime()>e.ttl){my(e);return}const t=Object.entries(e).filter(([n,r])=>r===!0).map(([n,r])=>n);t.length!==0&&(t.length===1&&t[0]==="header_create_cta"?(Qe({...e,header_create_cta:!1},Oe()),So()):t.length===2&&t.includes("header_create_cta")&&t.includes("multi_service_account")?(Qe({...e,header_create_cta:!1},Oe()),So()):t&&document.querySelectorAll(`[${pi}]`).forEach(n=>{const r=n.getAttribute(pi);if(!r)return;const o=r==="filter_code_queries_delay"&&(e.queries||e.filter_code);if(!n.classList.contains("button-with-badge-new")&&(e[r]||o)){if(n.classList.add("button-with-badge-new"),r==="header_create_cta")return;n.addEventListener("click",()=>{Qe({...e,[r]:!1},Oe())},{once:!0})}}))}function lS(){const e=Jt(Oe());return e&&e.multi_service_account}function dS(){const e=Jt(Oe());Qe({...e,multi_service_account:!1},Oe())}function fS(e,t){const n=Jt(Oe());n&&e in n&&(n[e]=t,Qe({...n},Oe()))}const Ic=({fontSizePx:e,minFontSizePx:t,fontSizePrecisionPx:n,updateFontSizePx:r,breakPredicate:o})=>{const s=Math.ceil(1/n);let i=0;for(;e>t&&i{const t=getComputedStyle(e);return e.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},mi=e=>{const t=getComputedStyle(e);return e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},hy=e=>{e.innerEl.style.whiteSpace="nowrap",Cc(e),e.innerEl.scrollWidth>wn(e.containerEl)&&(e.innerEl.style.whiteSpace="normal")},Cc=({innerEl:e,containerEl:t,fontSizePx:n,minFontSizePx:r,maxFontSizePx:o,fontSizePrecisionPx:s,updateFontSizePx:i})=>{let c=0,u=1;for(;c<10;){const l=e.scrollWidth,d=wn(t),f=nr&&l>d,m=l/d;if(u===m||!(f||h))break;const g=n/m-n,S=n;if(n=i(n+g),Math.abs(n-S)<=s)break;u=m,c++}Ic({fontSizePx:n,minFontSizePx:r,updateFontSizePx:i,fontSizePrecisionPx:s,breakPredicate:()=>e.scrollWidth<=wn(t)})},hi=({innerEl:e,containerEl:t,fontSizePx:n,minFontSizePx:r,maxFontSizePx:o,fontSizePrecisionPx:s,updateFontSizePx:i})=>{n=i((o-r)*.5);let c=(o-r)*.25,u=0;for(;c>s&&u<100;){const l=e.scrollWidth,d=wn(t),f=e.scrollHeight,h=mi(t);if(l===d&&f===h)break;nr&&(l>d||f>h)&&(n=i(n-c)),c*=.5,u++}Ic({fontSizePx:n,minFontSizePx:r,updateFontSizePx:i,fontSizePrecisionPx:s,breakPredicate:()=>e.scrollWidth<=wn(t)&&e.scrollHeight<=mi(t)})};function gy({innerEl:e,containerEl:t,mode:n="multiline",minFontSizePx:r=8,maxFontSizePx:o=160,fontSizePrecisionPx:s=.1}){if(performance.now(),!isFinite(r))throw new Error(`Invalid minFontSizePx (${r})`);if(!isFinite(r))throw new Error(`Invalid maxFontSizePx (${o})`);if(!isFinite(s)||s===0)throw new Error(`Invalid fontSizePrecisionPx (${s})`);t.children.length>1&&console.warn(`AutoTextSize has ${t.children.length-1} siblings. This may interfere with the algorithm.`);const i={display:"flex",alignItems:"start"},a={display:"block"};n==="oneline"?a.whiteSpace="nowrap":n==="multiline"?a.wordBreak="break-word":n==="box"?(a.whiteSpace="pre-wrap",a.wordBreak="break-word"):n==="boxoneline"&&(a.whiteSpace="nowrap"),Object.assign(t.style,i),Object.assign(e.style,a);const c=window.getComputedStyle(e,null).getPropertyValue("font-size");let u=parseFloat(c);const l=f=>(f=Math.min(Math.max(f,r),o),u=f,e.style.fontSize=`${u}px`,u);(u>o||u{(e||document).querySelectorAll("[data-fittty]").forEach(t=>{const n=t;if(n.clientHeight===0)return;const r=n.children[0];gy({innerEl:r,containerEl:n,mode:t.dataset.fitttyMode||"box",minFontSizePx:t.dataset.fitttyMin||20,maxFontSizePx:t.dataset.fitttyMax||52,fontSizePrecisionPx:.1}),t.removeAttribute("data-fittty")}),window.dispatchEvent(new CustomEvent("VanillaFittty",{}))};function mS(e={}){const t=document.querySelector("body"),n=document.documentElement;Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight);const r=[".story-header-container",".connect-header-container",".header-container",".connection-header",".service-header",".site-header",".unified-header"],o=[".site-footer"],s=e.color||gi(r),i=gi(o)||s;if(s){if(e.updateBottomBg){const a=document.createElement("div");a.style.position="absolute",a.style.top="50vh",a.style.height="1px",a.style.width="100%",t.appendChild(a);const c=new IntersectionObserver(u=>{u.forEach(l=>{if(t.classList.contains("mobile-universal-search-enabled"))return;const d=l.boundingClientRect.top<0;e.platform?t.style.backgroundColor=d?"#fff":s:t.style.backgroundColor=d?i:s})},{threshold:0});c.observe(a),window.addEventListener("pagehide",()=>{c.disconnect(),a.remove()})}setTimeout(()=>{t.style.backgroundColor=s})}}function gi(e){let t,n;return e.find(r=>t=document.querySelector(r)),t?(n=window.getComputedStyle(t,null),n.backgroundColor):null}function hS(e){const t=document.referrer,n=t?new URL(t).hostname:null;n!=null&&n.endsWith(window.location.hostname)?window.history.back():location.href=e}function gS(){const e=new IntersectionObserver((n,r)=>{n.forEach(o=>{if(o.isIntersecting){const s=o.target;s.classList.remove("lazy-bg-img"),r.unobserve(s)}})},{threshold:0});document.querySelectorAll(".lazy-bg-img").forEach(n=>e.observe(n))}function yS(){let e=null,t=null;const n=()=>{e==null||e.disconnect(),t==null||t.disconnect()},r=()=>{const s=document.querySelector(".site-footer"),i=document.querySelector("#zendesk-widget-button .help-button");if(!s||!i)return;const a=s.offsetTop,c=window.innerHeight-a,u=Math.max(c,0);document.documentElement.style.setProperty("--zendesk-widget-bottom",`${u}px`),e==null||e.disconnect(),requestAnimationFrame(()=>{e=new IntersectionObserver(l=>{l.forEach(d=>{const f=i.getBoundingClientRect(),h=d.boundingClientRect,m=f.top>h.top;i.style.visibility=m?"hidden":"visible"})},{threshold:[0,.1,.2,.3,.4,.5,.66,.75]}),e.observe(s)})};r();const o=document.querySelector("main");return o&&(t=new ResizeObserver(()=>{r()}),t.observe(o)),n}const{addListener:io,cleanup:yi}=xo(),yy=()=>{const e=t=>{const n=t==null?void 0:t.querySelector("input");n&&(n.value="",window.dispatchEvent(new CustomEvent(`clean-search:${t.id}`,{})))};document.querySelectorAll(".icon.clean-search").forEach(t=>{io(t,"click",n=>{n.preventDefault(),n.stopPropagation();const r=n.target.closest(".ifttt-search");r&&e(r)})}),document.querySelectorAll(".ifttt-search input").forEach(t=>{io(t,"keydown",n=>{if(n.key==="Escape"){const r=n.target.closest(".ifttt-search");r&&(r.querySelector(".highlighted")||e(r))}})}),document.querySelectorAll(".ifttt-search a.search-navigation").forEach(t=>{var r;const n=(r=t.closest(".ifttt-search"))==null?void 0:r.querySelector("input");io(n,"input",o=>{const i=o.target.value.trim();i&&(t.href=`/search/query/${encodeURIComponent(i.toLowerCase())}`)})}),yi.withPageRestore(()=>{yy()}),window.addEventListener("beforeunload",yi)};var Rc={};/*!
* mustache.js - Logic-less {{mustache}} templates with JavaScript
* http://github.com/janl/mustache.js
*/(function(e){(function(n,r){e&&typeof e.nodeName!="string"?r(e):(n.Mustache={},r(n.Mustache))})(mn,function(n){var r=Object.prototype.toString,o=Array.isArray||function(_){return r.call(_)==="[object Array]"};function s(v){return typeof v=="function"}function i(v){return o(v)?"array":typeof v}function a(v){return v.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function c(v,_){return v!=null&&typeof v=="object"&&_ in v}var u=RegExp.prototype.test;function l(v,_){return u.call(v,_)}var d=/\S/;function f(v){return!l(d,v)}var h={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function m(v){return String(v).replace(/[&<>"'`=\/]/g,function(A){return h[A]})}var g=/\s*/,S=/\s+/,I=/\s*=/,k=/\s*\}/,T=/#|\^|\/|>|\{|&|=|!/;function w(v,_){if(!v)return[];var A=[],y=[],R=[],$=!1,W=!1;function V(){if($&&!W)for(;R.length;)delete y[R.pop()];else R=[];$=!1,W=!1}var J,Q,B;function le(pe){if(typeof pe=="string"&&(pe=pe.split(S,2)),!o(pe)||pe.length!==2)throw new Error("Invalid tags: "+pe);J=new RegExp(a(pe[0])+"\\s*"),Q=new RegExp("\\s*"+a(pe[1])),B=new RegExp("\\s*"+a("}"+pe[1]))}le(_||n.tags);for(var M=new O(v),Le,G,te,Fe,re,Pe;!M.eos();){if(Le=M.pos,te=M.scanUntil(J),te)for(var vt=0,Nn=te.length;vt0?y[y.length-1][4]:_;break;default:A.push(R)}return _}function O(v){this.string=v,this.tail=v,this.pos=0}O.prototype.eos=function(){return this.tail===""},O.prototype.scan=function(_){var A=this.tail.match(_);if(!A||A.index!==0)return"";var y=A[0];return this.tail=this.tail.substring(y.length),this.pos+=y.length,y},O.prototype.scanUntil=function(_){var A=this.tail.search(_),y;switch(A){case-1:y=this.tail,this.tail="";break;case 0:y="";break;default:y=this.tail.substring(0,A),this.tail=this.tail.substring(A)}return this.pos+=y.length,y};function U(v,_){this.view=v,this.cache={".":this.view},this.parent=_}U.prototype.push=function(_){return new U(_,this)},U.prototype.lookup=function(_){var A=this.cache,y;if(A.hasOwnProperty(_))y=A[_];else{for(var R=this,$,W,V=!1;R;){if(_.indexOf(".")>0)for(y=R.view,$=_.split("."),W=0;y!=null&&W<$.length;)W===$.length-1&&(V=c(y,$[W])),y=y[$[W++]];else y=R.view[_],V=c(R.view,_);if(V)break;R=R.parent}A[_]=y}return s(y)&&(y=y.call(this.view)),y};function H(){this.cache={}}H.prototype.clearCache=function(){this.cache={}},H.prototype.parse=function(_,A){var y=this.cache,R=y[_];return R==null&&(R=y[_]=w(_,A)),R},H.prototype.render=function(_,A,y){var R=this.parse(_),$=A instanceof U?A:new U(A);return this.renderTokens(R,$,y,_)},H.prototype.renderTokens=function(_,A,y,R){for(var $="",W,V,J,Q=0,B=_.length;Q"?J=this.renderPartial(W,A,y,R):V==="&"?J=this.unescapedValue(W,A):V==="name"?J=this.escapedValue(W,A):V==="text"&&(J=this.rawValue(W)),J!==void 0&&($+=J);return $},H.prototype.renderSection=function(_,A,y,R){var $=this,W="",V=A.lookup(_[1]);function J(le){return $.render(le,A,y)}if(V){if(o(V))for(var Q=0,B=V.length;Q`Invalid value for key ${e}`,Ay=e=>`Pattern length exceeds max of ${e}.`,wy=e=>`Missing ${e} property in key`,Iy=e=>`Property 'weight' in key '${e}' must be a positive integer`,bi=Object.prototype.hasOwnProperty;class Cy{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let o=kc(r);this._keys.push(o),this._keyMap[o.id]=o,n+=o.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function kc(e){let t=null,n=null,r=null,o=1,s=null;if(Ve(e)||et(e))r=e,t=Ei(e),n=vo(e);else{if(!bi.call(e,"name"))throw new Error(wy("name"));const i=e.name;if(r=i,bi.call(e,"weight")&&(o=e.weight,o<=0))throw new Error(Iy(i));t=Ei(i),n=vo(i),s=e.getFn}return{path:t,id:n,weight:o,src:r,getFn:s}}function Ei(e){return et(e)?e:e.split(".")}function vo(e){return et(e)?e.join("."):e}function Ry(e,t){let n=[],r=!1;const o=(s,i,a)=>{if(Re(s))if(!i[a])n.push(s);else{let c=i[a];const u=s[c];if(!Re(u))return;if(a===i.length-1&&(Ve(u)||Oc(u)||_y(u)))n.push(Ey(u));else if(et(u)){r=!0;for(let l=0,d=u.length;le.score===t.score?e.idx{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Ve(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();Ve(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n{let i=o.getFn?o.getFn(t):this.getFn(t,o.path);if(Re(i)){if(et(i)){let a=[];const c=[{nestedArrIndex:-1,value:i}];for(;c.length;){const{nestedArrIndex:u,value:l}=c.pop();if(Re(l))if(Ve(l)&&!ao(l)){let d={v:l,i:u,n:this.norm.get(l)};a.push(d)}else et(l)&&l.forEach((d,f)=>{c.push({nestedArrIndex:f,value:d})})}r.$[s]=a}else if(Ve(i)&&!ao(i)){let a={v:i,n:this.norm.get(i)};r.$[s]=a}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function Nc(e,t,{getFn:n=N.getFn,fieldNormWeight:r=N.fieldNormWeight}={}){const o=new Qo({getFn:n,fieldNormWeight:r});return o.setKeys(e.map(kc)),o.setSources(t),o.create(),o}function Dy(e,{getFn:t=N.getFn,fieldNormWeight:n=N.fieldNormWeight}={}){const{keys:r,records:o}=e,s=new Qo({getFn:t,fieldNormWeight:n});return s.setKeys(r),s.setIndexRecords(o),s}function Yn(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:o=N.distance,ignoreLocation:s=N.ignoreLocation}={}){const i=t/e.length;if(s)return i;const a=Math.abs(r-n);return o?i+a/o:a?1:i}function Py(e=[],t=N.minMatchCharLength){let n=[],r=-1,o=-1,s=0;for(let i=e.length;s=t&&n.push([r,o]),r=-1)}return e[s-1]&&s-r>=t&&n.push([r,s-1]),n}const mt=32;function Uy(e,t,n,{location:r=N.location,distance:o=N.distance,threshold:s=N.threshold,findAllMatches:i=N.findAllMatches,minMatchCharLength:a=N.minMatchCharLength,includeMatches:c=N.includeMatches,ignoreLocation:u=N.ignoreLocation}={}){if(t.length>mt)throw new Error(Ay(mt));const l=t.length,d=e.length,f=Math.max(0,Math.min(r,d));let h=s,m=f;const g=a>1||c,S=g?Array(d):[];let I;for(;(I=e.indexOf(t,m))>-1;){let O=Yn(t,{currentLocation:I,expectedLocation:f,distance:o,ignoreLocation:u});if(h=Math.min(O,h),m=I+l,g){let U=0;for(;U=ue;y-=1){let R=y-1,$=n[e.charAt(R)];if(g&&(S[R]=+!!$),_[y]=(_[y+1]<<1|1)&$,O&&(_[y]|=(k[y+1]|k[y])<<1|1|k[y+1]),_[y]&L&&(T=Yn(t,{errors:O,currentLocation:R,expectedLocation:f,distance:o,ignoreLocation:u}),T<=h)){if(h=T,m=R,m<=f)break;ue=Math.max(1,2*f-m)}}if(Yn(t,{errors:O+1,currentLocation:f,expectedLocation:f,distance:o,ignoreLocation:u})>h)break;k=_}const E={isMatch:m>=0,score:Math.max(.001,T)};if(g){const O=Py(S,a);O.length?c&&(E.indices=O):E.isMatch=!1}return E}function Fy(e){let t={};for(let n=0,r=e.length;ne.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):e=>e;class Mc{constructor(t,{location:n=N.location,threshold:r=N.threshold,distance:o=N.distance,includeMatches:s=N.includeMatches,findAllMatches:i=N.findAllMatches,minMatchCharLength:a=N.minMatchCharLength,isCaseSensitive:c=N.isCaseSensitive,ignoreDiacritics:u=N.ignoreDiacritics,ignoreLocation:l=N.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:o,includeMatches:s,findAllMatches:i,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:u,ignoreLocation:l},t=c?t:t.toLowerCase(),t=u?ar(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const d=(h,m)=>{this.chunks.push({pattern:h,alphabet:Fy(h),startIndex:m})},f=this.pattern.length;if(f>mt){let h=0;const m=f%mt,g=f-m;for(;h{const{isMatch:k,score:T,indices:w}=Uy(t,g,S,{location:s+I,distance:i,threshold:a,findAllMatches:c,minMatchCharLength:u,includeMatches:o,ignoreLocation:l});k&&(h=!0),f+=T,k&&w&&(d=[...d,...w])});let m={isMatch:h,score:h?f/this.chunks.length:1};return h&&o&&(m.indices=d),m}}class at{constructor(t){this.pattern=t}static isMultiMatch(t){return _i(t,this.multiRegex)}static isSingleMatch(t){return _i(t,this.singleRegex)}search(){}}function _i(e,t){const n=e.match(t);return n?n[1]:null}class By extends at{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class $y extends at{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class Vy extends at{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class jy extends at{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Hy extends at{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Gy extends at{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Dc extends at{constructor(t,{location:n=N.location,threshold:r=N.threshold,distance:o=N.distance,includeMatches:s=N.includeMatches,findAllMatches:i=N.findAllMatches,minMatchCharLength:a=N.minMatchCharLength,isCaseSensitive:c=N.isCaseSensitive,ignoreDiacritics:u=N.ignoreDiacritics,ignoreLocation:l=N.ignoreLocation}={}){super(t),this._bitapSearch=new Mc(t,{location:n,threshold:r,distance:o,includeMatches:s,findAllMatches:i,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:u,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Pc extends at{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const o=[],s=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+s,o.push([r,n-1]);const i=!!o.length;return{isMatch:i,score:i?0:1,indices:o}}}const Ao=[By,Pc,Vy,jy,Gy,Hy,$y,Dc],Ti=Ao.length,Wy=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Ky="|";function qy(e,t={}){return e.split(Ky).map(n=>{let r=n.trim().split(Wy).filter(s=>s&&!!s.trim()),o=[];for(let s=0,i=r.length;s!!(e[cr.AND]||e[cr.OR]),Jy=e=>!!e[Co.PATH],Qy=e=>!et(e)&&xc(e)&&!Ro(e),Si=e=>({[cr.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Uc(e,t,{auto:n=!0}={}){const r=o=>{let s=Object.keys(o);const i=Jy(o);if(!i&&s.length>1&&!Ro(o))return r(Si(o));if(Qy(o)){const c=i?o[Co.PATH]:s[0],u=i?o[Co.PATTERN]:o[c];if(!Ve(u))throw new Error(vy(c));const l={keyId:vo(c),pattern:u};return n&&(l.searcher=Io(u,t)),l}let a={children:[],operator:s[0]};return s.forEach(c=>{const u=o[c];et(u)&&u.forEach(l=>{a.children.push(r(l))})}),a};return Ro(e)||(e=Si(e)),r(e)}function Zy(e,{ignoreFieldNorm:t=N.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:o,norm:s,score:i})=>{const a=o?o.weight:null;r*=Math.pow(i===0&&a?Number.EPSILON:i,(a||1)*(t?1:s))}),n.score=r})}function eb(e,t){const n=e.matches;t.matches=[],Re(n)&&n.forEach(r=>{if(!Re(r.indices)||!r.indices.length)return;const{indices:o,value:s}=r;let i={indices:o,value:s};r.key&&(i.key=r.key.src),r.idx>-1&&(i.refIndex=r.idx),t.matches.push(i)})}function tb(e,t){t.score=e.score}function nb(e,t,{includeMatches:n=N.includeMatches,includeScore:r=N.includeScore}={}){const o=[];return n&&o.push(eb),r&&o.push(tb),e.map(s=>{const{idx:i}=s,a={item:t[i],refIndex:i};return o.length&&o.forEach(c=>{c(s,a)}),a})}class Qt{constructor(t,n={},r){this.options={...N,...n},this.options.useExtendedSearch,this._keyStore=new Cy(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Qo))throw new Error(Sy);this._myIndex=n||Nc(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Re(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let r=0,o=this._docs.length;r-1&&(c=c.slice(0,n)),nb(c,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(t){const n=Io(t,this.options),{records:r}=this._myIndex,o=[];return r.forEach(({v:s,i,n:a})=>{if(!Re(s))return;const{isMatch:c,score:u,indices:l}=n.searchIn(s);c&&o.push({item:s,idx:i,matches:[{score:u,value:s,norm:a,indices:l}]})}),o}_searchLogical(t){const n=Uc(t,this.options),r=(a,c,u)=>{if(!a.children){const{keyId:d,searcher:f}=a,h=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(c,d),searcher:f});return h&&h.length?[{idx:u,item:c,matches:h}]:[]}const l=[];for(let d=0,f=a.children.length;d{if(Re(a)){let u=r(n,a,c);u.length&&(s[c]||(s[c]={idx:c,item:a,matches:[]},i.push(s[c])),u.forEach(({matches:l})=>{s[c].matches.push(...l)}))}}),i}_searchObjectList(t){const n=Io(t,this.options),{keys:r,records:o}=this._myIndex,s=[];return o.forEach(({$:i,i:a})=>{if(!Re(i))return;let c=[];r.forEach((u,l)=>{c.push(...this._findMatches({key:u,value:i[l],searcher:n}))}),c.length&&s.push({idx:a,item:i,matches:c})}),s}_findMatches({key:t,value:n,searcher:r}){if(!Re(n))return[];let o=[];if(et(n))n.forEach(({v:s,i,n:a})=>{if(!Re(s))return;const{isMatch:c,score:u,indices:l}=r.searchIn(s);c&&o.push({score:u,key:t,value:s,idx:i,norm:a,indices:l})});else{const{v:s,n:i}=n,{isMatch:a,score:c,indices:u}=r.searchIn(s);a&&o.push({score:c,key:t,value:s,norm:i,indices:u})}return o}}Qt.version="7.1.0";Qt.createIndex=Nc;Qt.parseIndex=Dy;Qt.config=N;Qt.parseQuery=Uc;Xy(Yy);function rb(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Sr=rb,ob=typeof mn=="object"&&mn&&mn.Object===Object&&mn,Fc=ob,sb=Fc,ib=typeof self=="object"&&self&&self.Object===Object&&self,ab=sb||ib||Function("return this")(),Zo=ab,cb=Zo,ub=function(){return cb.Date.now()},lb=ub,db=/\s/;function fb(e){for(var t=e.length;t--&&db.test(e.charAt(t)););return t}var pb=fb,mb=pb,hb=/^\s+/;function gb(e){return e&&e.slice(0,mb(e)+1).replace(hb,"")}var yb=gb,bb=Zo,Eb=bb.Symbol,Bc=Eb,vi=Bc,$c=Object.prototype,_b=$c.hasOwnProperty,Tb=$c.toString,pn=vi?vi.toStringTag:void 0;function Sb(e){var t=_b.call(e,pn),n=e[pn];try{e[pn]=void 0;var r=!0}catch{}var o=Tb.call(e);return r&&(t?e[pn]=n:delete e[pn]),o}var vb=Sb,Ab=Object.prototype,wb=Ab.toString;function Ib(e){return wb.call(e)}var Cb=Ib,Ai=Bc,Rb=vb,Ob=Cb,xb="[object Null]",Lb="[object Undefined]",wi=Ai?Ai.toStringTag:void 0;function kb(e){return e==null?e===void 0?Lb:xb:wi&&wi in Object(e)?Rb(e):Ob(e)}var vr=kb;function Nb(e){return e!=null&&typeof e=="object"}var Ar=Nb,Mb=vr,Db=Ar,Pb="[object Symbol]";function Ub(e){return typeof e=="symbol"||Db(e)&&Mb(e)==Pb}var Fb=Ub,Bb=yb,Ii=Sr,$b=Fb,Ci=NaN,Vb=/^[-+]0x[0-9a-f]+$/i,jb=/^0b[01]+$/i,Hb=/^0o[0-7]+$/i,Gb=parseInt;function Wb(e){if(typeof e=="number")return e;if($b(e))return Ci;if(Ii(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ii(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Bb(e);var n=jb.test(e);return n||Hb.test(e)?Gb(e.slice(2),n?2:8):Vb.test(e)?Ci:+e}var Vc=Wb,Kb=Sr,co=lb,Ri=Vc,qb="Expected a function",zb=Math.max,Yb=Math.min;function Xb(e,t,n){var r,o,s,i,a,c,u=0,l=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(qb);t=Ri(t)||0,Kb(n)&&(l=!!n.leading,d="maxWait"in n,s=d?zb(Ri(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function h(E){var O=r,U=o;return r=o=void 0,u=E,i=e.apply(U,O),i}function m(E){return u=E,a=setTimeout(I,t),l?h(E):i}function g(E){var O=E-c,U=E-u,H=t-O;return d?Yb(H,s-U):H}function S(E){var O=E-c,U=E-u;return c===void 0||O>=t||O<0||d&&U>=s}function I(){var E=co();if(S(E))return k(E);a=setTimeout(I,g(E))}function k(E){return a=void 0,f&&r?h(E):(r=o=void 0,i)}function T(){a!==void 0&&clearTimeout(a),u=0,r=c=o=a=void 0}function w(){return a===void 0?i:k(co())}function L(){var E=co(),O=S(E);if(r=arguments,o=this,c=E,O){if(a===void 0)return m(c);if(d)return clearTimeout(a),a=setTimeout(I,t),h(c)}return a===void 0&&(a=setTimeout(I,t)),i}return L.cancel=T,L.flush=w,L}var Jb=Xb;const Qb=Ht(Jb);function Zb(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}var jc=Zb;function eE(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n-1&&e%1==0&&e-1&&e%1==0&&e<=UE}var Kc=FE,BE=vr,$E=Kc,VE=Ar,jE="[object Arguments]",HE="[object Array]",GE="[object Boolean]",WE="[object Date]",KE="[object Error]",qE="[object Function]",zE="[object Map]",YE="[object Number]",XE="[object Object]",JE="[object RegExp]",QE="[object Set]",ZE="[object String]",e_="[object WeakMap]",t_="[object ArrayBuffer]",n_="[object DataView]",r_="[object Float32Array]",o_="[object Float64Array]",s_="[object Int8Array]",i_="[object Int16Array]",a_="[object Int32Array]",c_="[object Uint8Array]",u_="[object Uint8ClampedArray]",l_="[object Uint16Array]",d_="[object Uint32Array]",Z={};Z[r_]=Z[o_]=Z[s_]=Z[i_]=Z[a_]=Z[c_]=Z[u_]=Z[l_]=Z[d_]=!0;Z[jE]=Z[HE]=Z[t_]=Z[GE]=Z[n_]=Z[WE]=Z[KE]=Z[qE]=Z[zE]=Z[YE]=Z[XE]=Z[JE]=Z[QE]=Z[ZE]=Z[e_]=!1;function f_(e){return VE(e)&&$E(e.length)&&!!Z[BE(e)]}var p_=f_;function m_(e){return function(t){return e(t)}}var h_=m_,lr={exports:{}};lr.exports;(function(e,t){var n=Fc,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,i=s&&n.process,a=function(){try{var c=o&&o.require&&o.require("util").types;return c||i&&i.binding&&i.binding("util")}catch{}}();e.exports=a})(lr,lr.exports);var g_=lr.exports,y_=p_,b_=h_,xi=g_,Li=xi&&xi.isTypedArray,E_=Li?b_(Li):y_,__=E_,T_=EE,S_=OE,v_=es,A_=NE,w_=Wc,I_=__,C_=Object.prototype,R_=C_.hasOwnProperty;function O_(e,t){var n=v_(e),r=!n&&S_(e),o=!n&&!r&&A_(e),s=!n&&!r&&!o&&I_(e),i=n||r||o||s,a=i?T_(e.length,String):[],c=a.length;for(var u in e)(t||R_.call(e,u))&&!(i&&(u=="length"||o&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||w_(u,c)))&&a.push(u);return a}var x_=O_,L_=Object.prototype;function k_(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||L_;return e===n}var N_=k_;function M_(e,t){return function(n){return e(t(n))}}var D_=M_,P_=D_,U_=P_(Object.keys,Object),F_=U_,B_=N_,$_=F_,V_=Object.prototype,j_=V_.hasOwnProperty;function H_(e){if(!B_(e))return $_(e);var t=[];for(var n in Object(e))j_.call(e,n)&&n!="constructor"&&t.push(n);return t}var G_=H_,W_=vr,K_=Sr,q_="[object AsyncFunction]",z_="[object Function]",Y_="[object GeneratorFunction]",X_="[object Proxy]";function J_(e){if(!K_(e))return!1;var t=W_(e);return t==z_||t==Y_||t==q_||t==X_}var Q_=J_,Z_=Q_,eT=Kc;function tT(e){return e!=null&&eT(e.length)&&!Z_(e)}var qc=tT,nT=x_,rT=G_,oT=qc;function sT(e){return oT(e)?nT(e):rT(e)}var zc=sT;const ES=Ht(zc);var iT=yE,aT=zc;function cT(e){return e==null?[]:iT(e,aT(e))}var Yc=cT;const _S=Ht(Yc);var uT=jc,lT=Hc,dT=Yc;function fT(e,t){var n=dT(e);return lT(n,uT(t,0,n.length))}var pT=fT;function mT(e,t){return e===t||e!==e&&t!==t}var hT=mT,gT=hT,yT=qc,bT=Wc,ET=Sr;function _T(e,t,n){if(!ET(n))return!1;var r=typeof t;return(r=="number"?yT(n)&&bT(t,n.length):r=="string"&&t in n)?gT(n[t],e):!1}var TT=_T,ST=Vc,vT=1/0,AT=17976931348623157e292;function wT(e){if(!e)return e===0?e:0;if(e=ST(e),e===vT||e===-1/0){var t=e<0?-1:1;return t*AT}return e===e?e:0}var IT=wT,CT=IT;function RT(e){var t=CT(e),n=t%1;return t===t?n?t-n:t:0}var OT=RT,xT=fE,LT=pT,kT=es,NT=TT,MT=OT;function DT(e,t,n){(n?NT(e,t,n):t===void 0)?t=1:t=MT(t);var r=kT(e)?xT:LT;return r(e,t)}var PT=DT;const UT=Ht(PT),ts=`
{{name}}
Service
`,FT=`
{{term}}
`,Xc=e=>`search_history:${e}`,BT=4,$T=10,dr=()=>{var e;return(e=window.App.user)!=null&&e.id?Jt(Xc(window.App.user.id))||[]:[]},nr=({type:e,term:t,details:n})=>{var r;return!((r=window.App.user)!=null&&r.id)||t===""||t.length{var r;return!((r=window.App.user)!=null&&r.id)||t===""?[]:Jc({type:e,term:t,details:n})},Jc=({type:e,term:t,details:n})=>{const r=Xc(window.App.user.id),o={type:e,term:t,details:n};let s=dr();return s.length===0?s.push(o):(s.unshift(o),s=VT(s).slice(0,$T)),Qe(s,r),dispatchEvent(new CustomEvent("search-history:updated",{})),s},VT=e=>{const t=new Map;return e.forEach(n=>{const r=n.term.toLowerCase(),o=t.get(r);o?n.type==="service"&&o.type==="search"&&t.set(r,n):t.set(r,n)}),Array.from(t.values())},Qc=e=>e.dataset.moduleName?{type:"service",term:e.dataset.term,details:{name:e.dataset.term,brand_color:e.dataset.brandColor,module_name:e.dataset.moduleName,image:e.dataset.image}}:{type:"search",term:e.dataset.term},{addListener:jT,cleanup:ki}=xo(),Oo=4,Zc=()=>{const e=dr().slice(0,Oo),t=n=>{document.querySelectorAll(".recent-searches").forEach(r=>{if(n.length>0){r.classList.remove("hide");const o=r.querySelector("ul.universal-search-helper-list");if(!o)return;o.innerHTML="",n.forEach(({type:s,term:i,details:a})=>{const c={term:i,query_term:i.toLowerCase(),...a},u=Jo.render(s==="service"?ts:FT,c);o.insertAdjacentHTML("beforeend",u)})}else r.classList.add("hide")})};document.querySelector("#explore-search")&&jT(window,"search-history:updated",()=>{t(dr().slice(0,Oo))}),t(e),ki.withPageRestore(()=>{Zc()}),window.addEventListener("beforeunload",ki)},HT=(e,t)=>{const n=e.filter(o=>o.recommended),r=UT(n,t);r.forEach(o=>{const s=document.createElement("link");s.rel="preload",s.as="image",s.href=o.image,document.head.appendChild(s)}),document.querySelectorAll(".recommended-services > ul.universal-search-helper-list").forEach(o=>{o.innerHTML="",r.forEach(s=>{const i=Jo.render(ts,s);o.insertAdjacentHTML("beforeend",i)})})},GT=async()=>{var i,a;const e=8-(dr().slice(0,Oo).length||0);let t=[];const n="recommended-services-cache",r="/explore/services.json",o=async c=>{c.ok&&(t=await c.json(),HT(t,e))},s=async()=>{try{const c=await caches.open(n),u=await c.match(r);if(u){await o(u);return}const l=await fetch(r);if(l.ok){const d=l.clone();await c.put(r,d),await o(l);return}throw new Error(`Network response not ok: ${l.status}`)}catch{const u=await fetch(r);await o(u)}};try{await s()}catch(c){(a=(i=window.App)==null?void 0:i.Sentry)==null||a.captureException(c,{tags:{component:"RecommendedServices",action:"fetch"}})}return t},WT=e=>{if(!e)return;const t=e.querySelector("input");if(!t)return;let n=-1;const r=()=>{const u=t.value.trim()?".search-preview li, a.search-navigation":".default-recommendations li";return Array.from(e.querySelectorAll(u))},o=c=>{const u=r();e.querySelectorAll(".universal-search-helper .highlighted").forEach(l=>l.classList.remove("highlighted")),c>=0&&c{const u=r();if(u.length===0)return;let l;c==="up"?l=n<=0?u.length-1:n-1:l=n===-1||n>=u.length-1?0:n+1,o(l)},i=()=>{const c=r();if(n>=0&&n{n=-1,o(-1)};t.addEventListener("input",a),t.addEventListener("keydown",c=>{switch(c.key){case"ArrowUp":c.preventDefault(),s("up");break;case"ArrowDown":c.preventDefault(),s("down");break;case"Enter":n>=0&&(c.preventDefault(),i());break;case"Escape":c.preventDefault(),a();break}})},{addListener:$e,cleanup:Ni}=xo(),KT=async()=>{const e=document.querySelector("#universal-search");if(!e)return;const t=e.querySelector("input"),n=e.querySelector(".search-preview > ul");Zc();const r=await GT();WT(e);const o=new Qt(r,{includeScore:!0,threshold:.3,keys:["name"]}),s=g=>{const S=g,I=S.target.value.trim();if(I&&S.key==="Enter"){window.App.Utils.logCustomDatadogAction("universal_search_trigger_via_enter",{term:I});const k=r.find(T=>T.name.toLowerCase()===I.toLowerCase()||T.module_name.toLowerCase()===I.toLowerCase());k?(nr({type:"service",term:I,details:{name:k.name,brand_color:k.brand_color,module_name:k.module_name,image:k.image}}),window.location.assign(`/${k.module_name}`)):(nr({type:"search",term:I}),window.location.assign(`/search/query/${encodeURIComponent(I.toLowerCase())}`))}},i=g=>S=>{const I=S.target.value.trim();if(!I)return;const k=o.search(I).slice(0,12);g&&(g.innerHTML="",k.forEach(T=>{const w=Jo.render(ts,T.item);g.insertAdjacentHTML("beforeend",w)}))},a=g=>{const S=g.target.closest("li > a"),I=Qc(S);nr(I),t.value.trim()?window.App.Utils.logCustomDatadogAction("universal_search_service_filter_clicked",{service:S.dataset.term}):I.type==="search"?window.App.Utils.logCustomDatadogAction("universal_search_recent_searches_clicked",{term:S.dataset.term}):window.App.Utils.logCustomDatadogAction("universal_search_recommended_service_clicked",{service:S.dataset.term})},c=Qb(i(n),100);$e(t,"input",c),$e(t,"keydown",s);const u=e.querySelector(".recent-searches");u&&$e(u,"click",a);const l=e.querySelector(".recommended-services");l&&$e(l,"click",a);const d=e.querySelector(".search-preview");d&&$e(d,"click",a);const f=e.querySelector("a.search-navigation");f&&$e(f,"click",()=>{window.App.Utils.logCustomDatadogAction("universal_search_trigger_via_navigation_link",{term:t==null?void 0:t.value.trim()})}),$e(t,"focus",()=>{window.App.Utils.logCustomDatadogAction("universal_search_click_search_bar")});const h=document.querySelector("span.mobile-icon-search");h&&$e(h,"click",()=>{document.body.classList.add("mobile-universal-search-enabled"),t==null||t.focus(),window.App.Utils.logCustomDatadogAction("mobile_universal_search_view")});const m=document.querySelector(".mobile-close-search-icon");m&&$e(m,"click",()=>{document.body.classList.remove("mobile-universal-search-enabled"),t==null||t.blur()}),$e(window,"scroll",()=>{document.body.classList.contains("mobile-universal-search-enabled")&&(t==null||t.blur())}),Ni.withPageRestore(()=>{t&&(t.value="",t.dispatchEvent(new Event("input",{bubbles:!0}))),n&&(n.innerHTML=""),KT()}),window.addEventListener("beforeunload",Ni)};export{Bc as $,Qc as A,BT as B,TS as C,uS as D,ay as E,Qt as F,es as G,_S as H,bS as I,TT as J,ES as K,rS as L,Jo as M,Jb as N,Yc as O,qc as P,mE as Q,mS as R,WT as S,hT as T,zc as U,pS as V,N_ as W,x_ as X,Zo as Y,D_ as Z,vr as _,cu as a,tE as a0,NE as a1,Wc as a2,IT as a3,yb as a4,Fb as a5,Q_ as a6,__ as a7,Kc as a8,OE as a9,G_ as aa,tS as ab,YT as ac,Bg as ad,oS as ae,yy as af,KT as ag,sS as ah,gS as ai,yS as aj,hS as ak,dy as al,nS as am,XT as an,g_ as b,cS as c,h_ as d,Sr as e,_s as f,Qb as g,lS as h,Ar as i,So as j,eS as k,Jt as l,ZT as m,QT as n,JT as o,zT as p,aS as q,dS as r,Qe as s,OT as t,fS as u,xo as v,iS as w,Zc as x,GT as y,nr as z};
//# sourceMappingURL=header-CqELusxt.js.map